﻿/* ============================================================
   ROOT VARIABLES
============================================================ */
:root {
    --sb-bg: #0f1623;
    --sb-bg-hover: #162033;
    --sb-bg-active: #1a6bff;
    --sb-text: #8b9bb5;
    --sb-text-hover: #e2e8f0;
    --sb-border: rgba(255,255,255,0.06);
    --sb-width: 270px;
    --sb-collapsed: 72px;
    --accent: #1a6bff;
    --accent-light: rgba(26,107,255,0.12);
    --main-bg: #e5e7eb;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --border-color: #e2e8f0;
    --bg-primary: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* ── متغير رأس الجدول — Dark Theme افتراضي ── */
    --table-head-bg: #0f1623;
    --table-head-color: #ffffff;
}

/* ============================================================
   RESET & BASE
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Cairo;
    background: var(--main-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* ============================================================
   SIDEBAR — DEFAULT DARK THEME
============================================================ */
.sidebar {
    width: var(--sb-width);
    min-height: 100vh;
    background: var(--sb-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: width var(--transition), background 0.4s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
}

    .sidebar.collapsed {
        width: var(--sb-collapsed);
    }

    /* ============================================================
   SIDEBAR — GRADIENT THEME
============================================================ */
    .sidebar.gradient-theme {
        background: linear-gradient(127deg, #2d1b69 0%, #1e2d8a 25%, #1a3a9f 45%, #7b1f5e 70%, #7b1f5e 82%, #c0334d 100%);
    }

        /* أيقونات الـ nav — أبيض في gradient */
        .sidebar.gradient-theme .nav-icon {
            color: rgba(255, 255, 255, 0.80);
        }

        /* نصوص الـ nav links — أبيض في gradient */
        .sidebar.gradient-theme .nav-link-custom {
            color: rgba(255, 255, 255, 0.85);
        }

            .sidebar.gradient-theme .nav-link-custom:hover {
                background: rgba(255, 255, 255, 0.12);
                color: #ffffff;
            }

                .sidebar.gradient-theme .nav-link-custom:hover .nav-icon {
                    color: #ffffff;
                }

        /* section labels — أبيض شفاف في gradient */
        .sidebar.gradient-theme .nav-section-label {
            color: rgba(255, 255, 255, 0.42);
        }

        /* user role */
        .sidebar.gradient-theme .user-role {
            color: rgba(255, 255, 255, 0.55);
        }

        /* user card hover */
        .sidebar.gradient-theme .user-card:hover {
            background: rgba(255, 255, 255, 0.10);
        }

/* ============================================================
   TABLE HEAD — DARK THEME (افتراضي)
============================================================ */
.customers-table thead,
.custom-table thead,
table.table thead,
.ep-table thead {
    background: #0f1623;
    transition: background 0.4s ease;
}

    .customers-table thead th,
    .custom-table thead th,
    table.table thead th,
    .ep-table thead th {
        color: #ffffff;
        font-weight: 700;
        font-size: 13px;
        padding: 15px 16px;
        text-align: right;
        border-bottom: none;
    }

        .customers-table thead th.text-center,
        .custom-table thead th.text-center,
        table.table thead th.text-center,
        .ep-table thead th.text-center {
            text-align: center;
        }

/* ============================================================
   TABLE HEAD — GRADIENT THEME
============================================================ */
body.gradient-theme .customers-table thead,
body.gradient-theme .custom-table thead,
body.gradient-theme table.table thead,
body.gradient-theme .ep-table thead {
    background: linear-gradient(127deg, #2d1b69 0%, #1e2d8a 25%, #1a3a9f 45%, #7b1f5e 70%, #7b1f5e 82%, #c0334d 100%);
}

/* ============================================================
   TOPBAR — DEFAULT (داكن)
============================================================ */
.topbar {
    background: #0f1623;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.4s ease, border-color 0.4s ease;
}

/* ============================================================
   TOPBAR — GRADIENT THEME (يُفعَّل بـ class على body)
============================================================ */
body.gradient-theme .topbar {
    background: linear-gradient(201deg, #2d1b69 0%, #1e2d8a 25%, #1a3a9f 45%, #1a2e7a 65%, #1a2e7a 100% );
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.gradient-theme .notif-dot {
    border-color: #1a2e7a;
}

/* ============================================================
   THEME TOGGLE BUTTON
============================================================ */
.btn-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    font-size: 18px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

    .btn-theme-toggle:hover {
        background: rgba(255, 255, 255, 0.16);
        border-color: rgba(255, 255, 255, 0.30);
        color: #ffffff;
    }

    .btn-theme-toggle.is-gradient {
        border-color: #c0334d;
        background: linear-gradient(135deg, #2d1b69, #c0334d);
        color: #fff;
        box-shadow: 0 2px 10px rgba(192, 51, 77, 0.35);
    }

        .btn-theme-toggle.is-gradient:hover {
            box-shadow: 0 4px 16px rgba(192, 51, 77, 0.45);
            transform: translateY(-1px);
        }

/* --- Logo --- */
.sb-logo {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    overflow: hidden;
}

/* --- Toggle btn --- */
.sb-toggle {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 10;
}

    .sb-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: #f0f7ff;
    }

    .sb-toggle i {
        font-size: 13px;
        transition: transform var(--transition);
    }

.sidebar.collapsed .sb-toggle i {
    transform: rotate(180deg);
}

/* --- Nav scroll area --- */
.sb-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

    .sb-nav::-webkit-scrollbar {
        width: 4px;
    }

    .sb-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .sb-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.1);
        border-radius: 2px;
    }

/* --- Section label --- */
.nav-section-label {
    font-size: 10.5px;
    font-weight: 600;
    color: rgba(139,155,181,0.45);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 18px 14px 8px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition), color 0.4s ease;
}

.sidebar.collapsed .nav-section-label {
    opacity: 0;
    padding: 10px 0;
}

/* --- Nav item --- */
.nav-item {
    position: relative;
    margin-bottom: 2px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--sb-text);
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

    .nav-link-custom:hover {
        background: var(--sb-bg-hover);
        color: var(--sb-text-hover);
    }

    .nav-link-custom.active {
        background: var(--sb-bg-active);
        color: #fff;
        box-shadow: 0 2px 12px rgba(26,107,255,0.3);
    }

        .nav-link-custom.active .nav-icon {
            color: #fff;
        }

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: var(--sb-text);
    transition: color var(--transition);
}

.nav-link-custom:hover .nav-icon {
    color: var(--sb-text-hover);
}

.nav-label {
    font-size: 13.5px;
    font-weight: 500;
    flex: 1;
}

.nav-badge {
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    transition: opacity var(--transition);
}

/* hide label / badge when collapsed */
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* --- Bottom user card --- */
.sb-bottom {
    padding: 12px 10px;
    border-top: 1px solid var(--sb-border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s;
}

    .user-card:hover {
        background: var(--sb-bg-hover);
    }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg,#6a4fff,#1a6bff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.user-role {
    font-size: 11px;
    color: var(--sb-text);
    white-space: nowrap;
    transition: color 0.4s ease;
}

/* ============================================================
   MAIN CONTENT AREA
============================================================ */
.main-content {
    margin-right: var(--sb-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-right var(--transition);
    overflow-y: auto;
    max-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-right: var(--sb-collapsed);
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    transition: color 0.4s ease;
}

.topbar-bread {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 2px;
    transition: color 0.4s ease;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    font-size: 18px;
    position: relative;
}

    .topbar-btn:hover {
        background: rgba(255, 255, 255, 0.16);
        border-color: rgba(255, 255, 255, 0.30);
        color: #ffffff;
    }

.notif-dot {
    position: absolute;
    top: 7px;
    left: 9px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #0f1623;
    transition: border-color 0.4s ease;
}

/* ============================================================
   PAGE BODY
============================================================ */
.page-body {
    padding: 20px;
}

/* Welcome header */
.welcome-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

    .welcome-header h1 {
        font-size: 42px;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .welcome-header p {
        font-size: 18px;
        opacity: 0.9;
    }

    .welcome-header a {
        color: white;
        text-decoration: underline;
    }

        .welcome-header a:hover {
            opacity: 0.8;
        }

/* Action buttons row */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

    .action-buttons .btn {
        border-radius: 10px;
        padding: 10px 22px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: all .2s;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

        .action-buttons .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(0,0,0,0.15);
        }

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
        background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
        color: white;
    }

.btn-success-custom {
    background: #16a34a;
    color: #fff;
}

.btn-warning-custom {
    background: #ca8a04;
    color: #fff;
}

.btn-danger-custom {
    background: #dc2626;
    color: #fff;
}

/* ============================================================
   CUSTOMERS PAGE - IMPROVED DESIGN
============================================================ */

/* Page Header */
.customers-page-header {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-right {
    flex: 1;
}

.page-main-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .page-main-title i {
        font-size: 22px;
        color: #1a6bff;
    }

.page-main-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.btn-add-customer {
    background: #16a34a;
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

    .btn-add-customer:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
        background: #15803d;
        color: #fff;
    }

/* ============================================================
   STATISTICS CARDS
============================================================ */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    background: #ffffff;
    padding: 20px 18px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: none;
}

    .stat-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat-primary .stat-icon-wrapper {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.stat-success .stat-icon-wrapper {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.stat-info .stat-icon-wrapper {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff;
}

.stat-warning .stat-icon-wrapper {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Search & Filter */
.search-filter-section {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.search-filter-wrapper {
    display: grid;
    grid-template-columns: 1fr 240px 180px 140px;
    gap: 12px;
    align-items: center;
}

.search-input-container {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    pointer-events: none;
}

.search-field {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .search-field:focus {
        outline: none;
        border-color: #1a6bff;
        box-shadow: 0 0 0 3px rgba(26, 107, 255, 0.1);
    }

    .search-field::placeholder {
        color: #94a3b8;
    }

.filter-select-container {
    position: relative;
}

.filter-select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .filter-select:focus {
        outline: none;
        border-color: #1a6bff;
        box-shadow: 0 0 0 3px rgba(26, 107, 255, 0.1);
    }

.btn-reset-filter {
    width: 100%;
    height: 42px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .btn-reset-filter:hover {
        background: #e2e8f0;
        border-color: #cbd5e1;
        color: #1e293b;
    }

    .btn-reset-filter i {
        font-size: 14px;
    }

/* Table Container */
.customers-table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13.5px;
}

    .customers-table tbody td {
        padding: 14px 16px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
        background: #ffffff;
    }

    .customers-table tbody tr.table-row {
        transition: all 0.2s ease;
    }

        .customers-table tbody tr.table-row:hover {
            background: #f8fafc !important;
        }

.customer-photo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a6bff, #3b82f6);
    color: white;
    font-size: 20px;
}

    .customer-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.customer-name-wrapper {
    display: flex;
    align-items: center;
}

.customer-name-text {
    color: #1e293b;
    font-weight: 600;
    font-size: 13.5px;
}

.state-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(26, 107, 255, 0.12), rgba(59, 130, 246, 0.12));
    color: #1a6bff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.card-num {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.phone-num {
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .phone-num i {
        font-size: 13px;
    }

.date-text {
    color: #94a3b8;
    font-size: 12.5px;
}

.table-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.edit-btn {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(34, 197, 94, 0.12));
    color: #16a34a;
    text-decoration: none;
}

    .edit-btn:hover {
        background: #16a34a;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    }

.delete-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.12));
    color: #ef4444;
}

    .delete-btn:hover {
        background: #ef4444;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

.view-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    color: #667eea;
    text-decoration: none;
}

    .view-btn:hover {
        background: #667eea;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

/* Empty State */
.no-data-state {
    padding: 50px 20px;
    text-align: center;
}

    .no-data-state i {
        font-size: 64px;
        color: #cbd5e1;
        margin-bottom: 16px;
    }

    .no-data-state h5 {
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 8px;
    }

    .no-data-state p {
        font-size: 13.5px;
        color: #64748b;
        margin-bottom: 20px;
    }

.btn-add-first {
    background: linear-gradient(135deg, #1a6bff, #3b82f6);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(26, 107, 255, 0.25);
}

    .btn-add-first:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(26, 107, 255, 0.35);
        color: #fff;
    }

/* Alert Styles */
.custom-alert {
    border-radius: 10px;
    border: none;
    padding: 14px 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    font-size: 13.5px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(34, 197, 94, 0.12));
    color: #16a34a;
}

.custom-alert i {
    font-size: 18px;
}

/* ============================================
   FORM PAGE STYLES
============================================ */

.form-card {
    background: var(--card-bg);
    padding: 26px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.form-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.form-left-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.image-upload-section {
    width: 100%;
}

.image-upload-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.image-preview {
    width: 100%;
    height: 280px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    background: var(--bg-primary);
}

    .image-preview:hover {
        border-color: var(--primary-color);
        background: rgba(37, 99, 235, 0.05);
    }

    .image-preview i {
        font-size: 56px;
        color: var(--text-secondary);
        margin-bottom: 10px;
    }

    .image-preview p {
        color: var(--text-secondary);
        margin: 0;
        font-size: 13px;
    }

    .image-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.form-right-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.form-group-custom {
    margin-bottom: 0;
}

    .form-group-custom.full-width {
        grid-column: 1 / -1;
    }

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.3s;
    height: 44px;
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    height: 44px;
    padding: 0 14px;
    transition: all 0.3s;
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
}

    .form-select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
}

    .btn-outline-secondary:hover {
        border-color: var(--text-primary);
        color: var(--text-primary);
        background: var(--bg-primary);
    }

/* ============================================
   RESPONSIVE STYLES
============================================ */

@media (max-width: 1400px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-filter-wrapper {
        grid-template-columns: 1fr 200px 160px 120px;
    }
}

@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-filter-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .form-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-preview {
        max-width: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content {
        margin-right: 0;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .search-filter-wrapper {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-left {
        width: 100%;
    }

    .btn-add-customer {
        width: 100%;
        justify-content: center;
    }

    .stat-box {
        margin-bottom: 12px;
    }

    .form-fields-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 14px 15px;
    }

    .page-body {
        padding: 15px;
    }

    .topbar-title {
        font-size: 18px;
    }

    .table-responsive {
        font-size: 13px;
    }

    .customers-table thead {
        display: none;
    }

    .customers-table tbody td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border: none;
    }

        .customers-table tbody td:first-child {
            padding-top: 18px;
        }

        .customers-table tbody td:last-child {
            padding-bottom: 18px;
            border-bottom: 2px solid #e2e8f0;
        }

        .customers-table tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #64748b;
            display: block;
            margin-bottom: 5px;
            font-size: 11.5px;
        }

    .custom-table thead th,
    .custom-table tbody td {
        padding: 10px 8px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Page Header Card */
.page-header-card {
    background: var(--card-bg);
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.page-title-main {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.page-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
}

/* =====================================================
   FORM LAYOUT - Professional Design
===================================================== */

.form-page-wrapper {
    margin: 0 auto;
}

.form-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.form-page-header-left h4 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .form-page-header-left h4 i {
        color: #1a6bff;
        font-size: 22px;
    }

.form-page-header-left p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-back:hover {
        border-color: #1a6bff;
        color: #1a6bff;
        background: #f0f7ff;
    }

.form-main-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    overflow: hidden;
}

.form-card-header {
    background: linear-gradient(135deg, #1a6bff 0%, #3b82f6 100%);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .form-card-header i {
        font-size: 22px;
        color: rgba(255,255,255,0.9);
    }

    .form-card-header span {
        font-size: 15px;
        font-weight: 700;
        color: #fff;
    }

.form-card-body {
    padding: 28px;
}

.form-two-col {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
}

.image-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.image-panel-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.img-upload-box {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px dashed #c7d4e8;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

    .img-upload-box:hover {
        border-color: #1a6bff;
        background: #f0f7ff;
    }

        .img-upload-box:hover .img-upload-overlay {
            opacity: 1;
        }

.img-upload-icon {
    font-size: 42px;
    color: #c7d4e8;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.img-upload-box:hover .img-upload-icon {
    color: #1a6bff;
}

.img-upload-hint {
    font-size: 11.5px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
    padding: 0 8px;
}

.img-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.img-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,107,255,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

    .img-upload-overlay i {
        font-size: 26px;
        color: #fff;
    }

    .img-upload-overlay span {
        font-size: 11.5px;
        color: #fff;
        margin-top: 4px;
    }

.img-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

.fields-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fields-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .fields-section-title i {
        font-size: 14px;
        color: #1a6bff;
    }

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

    .fields-grid .full-col {
        grid-column: 1 / -1;
    }

.fgroup {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flabel {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .flabel i {
        font-size: 13px;
        color: #1a6bff;
    }

    .flabel .req {
        color: #ef4444;
        font-size: 14px;
    }

.finput,
.fselect {
    height: 42px;
    padding: 0 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    color: #1e293b;
    background: #fdfdfe;
    font-family: inherit;
    transition: all 0.25s;
    width: 100%;
}

    .finput:focus,
    .fselect:focus {
        outline: none;
        border-color: #1a6bff;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(26,107,255,0.1);
    }

    .finput::placeholder {
        color: #b0bac9;
        font-size: 13px;
    }

.fselect {
    cursor: pointer;
}

    .fselect option[value=""] {
        color: #b0bac9;
    }

.ferror {
    font-size: 11.5px;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   FORM FOOTER / ACTIONS
===================================================== */

.form-footer {
    display: flex;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

.footer-hint {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .footer-hint i {
        color: #f59e0b;
        font-size: 14px;
    }

.footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: linear-gradient(135deg, #1a6bff, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(26,107,255,0.3);
}

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(26,107,255,0.38);
        background: linear-gradient(135deg, #1560f0, #2563eb);
    }

    .btn-save:active {
        transform: translateY(0);
    }

    .btn-save.loading {
        pointer-events: none;
        opacity: 0.8;
    }

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

    .btn-cancel:hover {
        border-color: #94a3b8;
        color: #1e293b;
        background: #f8fafc;
    }

.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

    .form-alert.success {
        background: rgba(16,185,129,0.1);
        color: #059669;
        border: 1.5px solid rgba(16,185,129,0.25);
    }

@media (max-width: 768px) {
    .form-two-col {
        grid-template-columns: 1fr;
    }

    .image-panel {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 16px;
        background: #f8fafc;
        border-radius: 12px;
    }

    .img-upload-box {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .fields-grid {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-actions {
        flex-direction: column;
    }

    .btn-save, .btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .form-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ================================================================
   EasyPay — ep-forms
================================================================ */

.ep-form-wrapper {
    margin: 0 auto;
}

.ep-form-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.ep-form-page-header__title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .ep-form-page-header__title i {
        font-size: 22px;
        color: #1a6bff;
    }

.ep-form-page-header__sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.ep-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

    .ep-btn-back:hover {
        border-color: #1a6bff;
        color: #1a6bff;
        background: #f0f7ff;
    }

.ep-form-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.ep-form-card__header {
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a6bff 0%, #3b82f6 100%);
}

.ep-form-card__header--green {
    background: linear-gradient(135deg, #1e293b 0%, #2a3953 100%);
}

.ep-form-card__header--orange {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.ep-form-card__header i {
    font-size: 22px;
    color: rgba(255,255,255,0.9);
}

.ep-form-card__header span {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.ep-form-card__body {
    padding: 28px;
}

.ep-fsection-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 9px;
    border-bottom: 1.5px solid #f1f5f9;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ep-fsection-title i {
        font-size: 14px;
        color: #1a6bff;
    }

.ep-fsection-title--mt {
    margin-top: 26px;
}

.ep-form-two-col {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
}

.ep-fgrid {
    display: grid;
    gap: 16px 20px;
}

.ep-fgrid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.ep-fgrid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.ep-fgrid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.ep-fgroup--span2 {
    grid-column: span 2;
}

.ep-fgroup--span3 {
    grid-column: span 3;
}

.ep-fgroup--span-full {
    grid-column: 1 / -1;
}

.ep-image-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ep-image-panel__label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.ep-img-upload-box {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px dashed #c7d4e8;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

    .ep-img-upload-box:hover {
        border-color: #1a6bff;
        background: #f0f7ff;
    }

        .ep-img-upload-box:hover .ep-img-upload-overlay {
            opacity: 1;
        }

.ep-img-upload-icon {
    font-size: 42px;
    color: #c7d4e8;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.ep-img-upload-box:hover .ep-img-upload-icon {
    color: #1a6bff;
}

.ep-img-upload-hint {
    font-size: 11.5px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
    padding: 0 8px;
}

.ep-img-upload-box img.ep-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.ep-img-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 107, 255, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    gap: 4px;
}

    .ep-img-upload-overlay i {
        font-size: 26px;
        color: #fff;
    }

    .ep-img-upload-overlay span {
        font-size: 11.5px;
        color: #fff;
    }

.ep-img-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

.ep-fgroup {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-flabel {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

    .ep-flabel i {
        font-size: 13px;
        color: #1a6bff;
    }

.ep-req {
    color: #ef4444;
    font-size: 14px;
    line-height: 1;
}

.ep-finput,
.ep-fselect,
.ep-ftextarea {
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    color: #1e293b;
    background: #fdfdfe;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    width: 100%;
}

.ep-finput, .ep-fselect {
    height: 42px;
    padding: 0 13px;
}

.ep-ftextarea {
    padding: 10px 13px;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

    .ep-finput:focus, .ep-fselect:focus, .ep-ftextarea:focus {
        outline: none;
        border-color: #1a6bff;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(26, 107, 255, 0.1);
    }

    .ep-finput::placeholder, .ep-ftextarea::placeholder {
        color: #b0bac9;
        font-size: 13px;
    }

.ep-fselect {
    cursor: pointer;
    appearance: auto;
}

.ep-finput-addon {
    position: relative;
    display: flex;
    align-items: center;
}

.ep-finput--has-addon {
    padding-left: 52px;
}

.ep-finput-addon__badge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px 9px 9px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    border-left: none;
    padding: 0 8px;
    pointer-events: none;
}

.ep-ferror {
    font-size: 11.5px;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 16px;
}

.ep-calc-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    margin-top: 20px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease, padding 0.35s ease;
}

.ep-calc-box--visible {
    max-height: 200px;
    opacity: 1;
}

.ep-calc-box__header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ep-calc-box__header i {
        color: #fbbf24;
        font-size: 15px;
    }

.ep-calc-box__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.ep-calc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-align: center;
    border-left: 1px solid #e2e8f0;
    gap: 4px;
}

    .ep-calc-item:last-child {
        border-left: none;
    }

.ep-calc-item__label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

.ep-calc-item__value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.ep-calc-item__unit {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.ep-calc-item--blue .ep-calc-item__value {
    color: #1a6bff;
}

.ep-calc-item--green .ep-calc-item__value {
    color: #059669;
}

.ep-calc-item--orange .ep-calc-item__value {
    color: #d97706;
}

.ep-form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ep-form-alert--success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, 0.25);
}

.ep-form-alert--info {
    background: rgba(26, 107, 255, 0.08);
    color: #1a6bff;
    border: 1.5px solid rgba(26, 107, 255, 0.2);
}

.ep-form-footer {
    padding: 18px 28px;
    background: #f8fafc;
    border-top: 1.5px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ep-form-footer__hint {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .ep-form-footer__hint i {
        color: #f59e0b;
        font-size: 14px;
    }

.ep-form-footer__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ep-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: linear-gradient(135deg, #1a6bff, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(26, 107, 255, 0.3);
    white-space: nowrap;
}

    .ep-btn-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(26, 107, 255, 0.38);
        background: linear-gradient(135deg, #1560f0, #2563eb);
    }

    .ep-btn-save:active {
        transform: translateY(0);
    }

    .ep-btn-save:disabled {
        opacity: 0.75;
        pointer-events: none;
    }

.ep-btn-save--green {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3);
}

    .ep-btn-save--green:hover {
        background: linear-gradient(135deg, #047857, #059669);
        box-shadow: 0 6px 18px rgba(5, 150, 105, 0.38);
    }

.ep-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .ep-btn-cancel:hover {
        border-color: #94a3b8;
        color: #1e293b;
        background: #f8fafc;
    }

.ep-spin {
    display: inline-block;
    animation: ep-spin-kf 0.75s linear infinite;
}

@keyframes ep-spin-kf {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ep-forms ── */
@media (max-width: 1280px) {
    .ep-fgrid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .ep-form-two-col {
        grid-template-columns: 1fr;
    }

    .ep-image-panel {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        background: #f8fafc;
        border-radius: 12px;
        padding: 16px;
    }

    .ep-img-upload-box {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .ep-img-upload-icon {
        font-size: 28px;
    }

    .ep-fgrid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ep-fgroup--span2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .ep-form-wrapper {
        max-width: 100%;
    }

    .ep-form-card__body {
        padding: 18px;
    }

    .ep-form-footer {
        padding: 16px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .ep-form-footer__actions {
        flex-direction: column;
    }

    .ep-btn-save, .ep-btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .ep-form-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ep-btn-back {
        width: 100%;
        justify-content: center;
    }

    .ep-fgrid--2, .ep-fgrid--3, .ep-fgrid--4 {
        grid-template-columns: 1fr;
    }

    .ep-fgroup--span2, .ep-fgroup--span3 {
        grid-column: 1 / -1;
    }

    .ep-calc-box__grid {
        grid-template-columns: 1fr;
    }

    .ep-calc-item {
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }

        .ep-calc-item:last-child {
            border-bottom: none;
        }
}

/* ══════════════════════════════
                                   Reset & Base
                                ══════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --lp-top: #7b1fa2;
    --lp-mid: #6a1b9a;
    --lp-bottom: #1a2a4a;
    --rp-top: #2e7da6;
    --rp-mid: #1f5f80;
    --rp-bottom: #14405a;
    --input-bg: #d0d3d7;
    --btn-gold-start: #c9960a;
    --btn-gold-end: #a97b06;
    --font: 'Cairo', sans-serif;
}

/* ══════════════════════════════
                                   FIX: إجبار html/body على ملء الشاشة كاملاً
                                ══════════════════════════════ */
html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    overflow: hidden;
    /* إلغاء أي padding أو margin قد يأتي من theme.css */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ══════════════════════════════
                                   Layout — Two Panels
                                ══════════════════════════════ */
.ep-page {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    min-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    direction: ltr;
}

/* ══════════════════════════════
                                   LEFT PANEL — Purple
                                ══════════════════════════════ */
.ep-left {
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow: hidden;
    background: linear-gradient( 150deg, #8e24aa 0%, #7b1fa2 20%, #5e1585 45%, #3b1060 65%, #1e2f50 82%, #162540 100% );
}

    .ep-left::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 55% at 25% 30%, rgba(186, 80, 230, 0.45) 0%, transparent 65%), radial-gradient(ellipse 50% 40% at 75% 70%, rgba(80, 30, 120, 0.3) 0%, transparent 60%);
        pointer-events: none;
    }

.ep-left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    top:-7%;
}

/* Logo */
.ep-logo {
    margin-bottom: -64px;
}

    .ep-logo img {
        max-width: 370px;
        height: auto;
        display: block;
    }

.ep-logo-fallback {
    display: none;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

/* Welcome text */
.ep-welcome-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 0.6;
    margin-bottom: 14px;
    text-align: center;
    width: 100%;
}

.ep-welcome-sub {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    width: 100%;
}

/* ══════════════════════════════
                                   RIGHT PANEL — Teal Blue
                                ══════════════════════════════ */
.ep-right {
    width: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 60px;
    overflow: hidden;
    background: linear-gradient( 160deg, #2e7da6 0%, #256d93 25%, #1c5a7a 50%, #154c68 75%, #103d55 100% );
}

    .ep-right::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 65% 50% at 60% 20%, rgba(60, 140, 180, 0.35) 0%, transparent 65%);
        pointer-events: none;
    }

.ep-form-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
}

/* ══════════════════════════════
                                   Error Alert
                                ══════════════════════════════ */
.ep-alert {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.38);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: .85rem;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: right;
}

/* ══════════════════════════════
                                   Form Groups
                                ══════════════════════════════ */
.ep-group {
    margin-bottom: 24px;
}

.ep-label {
    display: block;
    font-size: .95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 10px;
    text-align: right;
}

.ep-input-wrap {
    position: relative;
}

.ep-input {
    width: 100%;
    padding: 13px 22px;
    border: none;
    border-radius: 50px;
    font-size: .95rem;
    font-family: var(--font);
    font-weight: 400;
    color: #374151;
    background: var(--input-bg);
    outline: none;
    transition: background .2s, box-shadow .2s;
    text-align: right;
    -webkit-appearance: none;
    appearance: none;
}

    .ep-input::placeholder {
        color: #9ca3af;
    }

    .ep-input:focus {
        background: #dde0e4;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
    }

    .ep-input.is-invalid {
        box-shadow: 0 0 0 2px #ef4444;
    }

/* Eye toggle */
.ep-eye {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    transition: color .15s;
}

    .ep-eye:hover {
        color: #374151;
    }

/* Validation messages */
.ep-error {
    font-size: .78rem;
    color: #fca5a5;
    margin-top: 6px;
    display: block;
    text-align: right;
    padding-right: 8px;
}

/* ══════════════════════════════
                                   Remember Me
                                ══════════════════════════════ */
.ep-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    justify-content: flex-end;
}

    .ep-remember label {
        font-size: .88rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.75);
        cursor: pointer;
    }

    .ep-remember input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #c9960a;
        cursor: pointer;
        flex-shrink: 0;
    }

/* ══════════════════════════════
                                   Submit Button — Gold
                                ══════════════════════════════ */
.ep-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--btn-gold-start), var(--btn-gold-end));
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.4px;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(180, 120, 6, 0.45);
    margin-top: 4px;
}

    .ep-btn:hover {
        opacity: .93;
        transform: translateY(-1px);
        box-shadow: 0 6px 26px rgba(180, 120, 6, 0.55);
    }

    .ep-btn:active {
        transform: translateY(0);
    }

/* ══════════════════════════════
                                   RESPONSIVE — Tablet
                                ══════════════════════════════ */
@media (max-width: 900px) {
    .ep-left {
        padding: 36px 28px;
    }

    .ep-right {
        padding: 36px 32px;
    }

    .ep-welcome-title {
        font-size: 1.3rem;
    }

    .ep-welcome-sub {
        font-size: 1.1rem;
    }

    .ep-logo img {
        max-width: 190px;
    }
}

/* ══════════════════════════════
                                   RESPONSIVE — Mobile
                                ══════════════════════════════ */
@media (max-width: 640px) {
    html, body {
        overflow: auto;
    }

    .ep-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        position: static;
    }

    .ep-right {
        width: 100%;
        order: 1;
        padding: 48px 24px 40px;
    }

    .ep-left {
        width: 100%;
        order: 2;
        padding: 40px 24px 48px;
        min-height: 260px;
    }

    .ep-left-content {
        align-items: center;
        text-align: center;
    }

    .ep-logo {
        margin-bottom: 28px;
    }

        .ep-logo img {
            max-width: 180px;
        }

    .ep-welcome-title,
    .ep-welcome-sub {
        text-align: center;
    }

    .ep-welcome-title {
        font-size: 1.2rem;
    }

    .ep-welcome-sub {
        font-size: 1rem;
    }

    .ep-form-wrap {
        max-width: 100%;
    }
}

/* ══════════════════════════════
                                   RESPONSIVE — Small Mobile
                                ══════════════════════════════ */
@media (max-width: 380px) {
    .ep-right {
        padding: 36px 16px 32px;
    }

    .ep-input {
        padding: 13px 18px;
        font-size: .9rem;
    }

    .ep-btn {
        padding: 13px 20px;
        font-size: .95rem;
    }
}




/* ══════════════════════════════════════════════════════════
                   NOTIFICATION BELL & DROPDOWN
                ══════════════════════════════════════════════════════════ */
.notif-bell-wrap {
    position: relative;
    display: inline-flex;
}

.notif-bell-btn {
    position: relative;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 1.15rem;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .notif-bell-btn:hover {
        background: rgba(255,255,255,.12);
    }

.notif-dot-count {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid transparent;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 360px;
    max-width: 95vw;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.15);
    z-index: 99999;
    overflow: hidden;
    display: none;
    direction: rtl;
    font-family: Cairo, sans-serif;
}

    .notif-dropdown.open {
        display: block;
    }

.nd-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nd-header-title {
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
}

.nd-header-badge {
    background: rgba(255,255,255,.25);
    border-radius: 99px;
    padding: 2px 9px;
    font-size: .75rem;
    font-weight: 700;
}

.nd-actions {
    display: flex;
    gap: 8px;
}

.nd-act-btn {
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .nd-act-btn:hover {
        background: rgba(255,255,255,.32);
    }

.nd-list {
    max-height: 360px;
    overflow-y: auto;
}

    .nd-list::-webkit-scrollbar {
        width: 4px;
    }

    .nd-list::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .nd-list::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 99px;
    }

.nd-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background .15s;
    position: relative;
}

    .nd-item:hover {
        background: #f9fafb;
    }

    .nd-item.unread {
        background: #f0f6ff;
    }

        .nd-item.unread:hover {
            background: #e0efff;
        }

        .nd-item.unread::after {
            content: '';
            position: absolute;
            top: 16px;
            left: 14px;
            width: 7px;
            height: 7px;
            background: #2563eb;
            border-radius: 50%;
        }

.nd-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nd-icon--red {
    background: #fee2e2;
    color: #dc2626;
}

.nd-icon--orange {
    background: #fef3c7;
    color: #d97706;
}

.nd-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.nd-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.nd-icon--gray {
    background: #f3f4f6;
    color: #6b7280;
}

.nd-content {
    flex: 1;
    min-width: 0;
}

.nd-title {
    font-size: .84rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.nd-msg {
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-time {
    font-size: .72rem;
    color: #9ca3af;
    margin-top: 3px;
}

.nd-del-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 3px;
    border-radius: 6px;
    font-size: .85rem;
    flex-shrink: 0;
    transition: color .2s;
}

    .nd-del-btn:hover {
        color: #ef4444;
    }

.nd-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

    .nd-empty i {
        font-size: 2.4rem;
        opacity: .3;
        display: block;
        margin-bottom: 10px;
    }

    .nd-empty p {
        font-size: .85rem;
    }

.nd-footer {
    padding: 10px 18px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

    .nd-footer a {
        font-size: .82rem;
        font-weight: 600;
        color: #2563eb;
        text-decoration: none;
    }

        .nd-footer a:hover {
            text-decoration: underline;
        }

/* ══════════════════════════════════════════════════════════
                   ROLE BADGES
                ══════════════════════════════════════════════════════════ */
.user-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 700;
    margin-top: 3px;
}

.role-manager {
    background: rgba(239,68,68,.2);
    color: #fca5a5;
}

.role-staff {
    background: rgba(251,191,36,.2);
    color: #fcd34d;
}

.role-basic {
    background: rgba(156,163,175,.2);
    color: #d1d5db;
}

/* ══════════════════════════════════════════════════════════
                   SIDEBAR QUICK BUTTONS
                ══════════════════════════════════════════════════════════ */
.sb-quick-btns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    padding: 10px 10px;
    border-bottom: 1px solid var(--sb-border);
    flex-wrap: nowrap;
}

.sb-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 54px;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.22s, transform 0.18s;
    color: rgba(255,255,255,0.85);
    padding: 0;
    min-width: 0;
    font-family: Cairo, sans-serif;
    position: relative;
}

    .sb-quick-btn:hover {
        background: rgba(255,255,255,0.22);
        transform: translateY(-2px);
        color: #fff;
    }

    .sb-quick-btn i {
        font-size: 18px;
        line-height: 1;
    }

    .sb-quick-btn span {
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
        line-height: 1;
    }

.sb-quick-btn--logout i {
    color: #ff6b6b;
}

.sb-quick-btn--logout:hover {
    background: rgba(255,77,77,0.18);
}

.sb-quick-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.sidebar.collapsed .sb-quick-btns {
    gap: 4px;
    padding: 8px 4px;
    flex-wrap: wrap;
}

.sidebar.collapsed .sb-quick-btn {
    flex: unset;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

    .sidebar.collapsed .sb-quick-btn span {
        display: none;
    }

    .sidebar.collapsed .sb-quick-btn i {
        font-size: 16px;
    }

/* ══════════════════════════════════════════════════════════
                   MOBILE OVERLAY — خلفية معتمة عند فتح السايدبار
                ══════════════════════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

/* ══════════════════════════════════════════════════════════
                   MOBILE TOPBAR TOGGLE BUTTON
                ══════════════════════════════════════════════════════════ */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all .25s ease;
    flex-shrink: 0;
}

    .mobile-menu-btn:hover {
        background: rgba(255,255,255,0.16);
        color: #fff;
    }

/* ══════════════════════════════════════════════════════════
                   RESPONSIVE — TABLET (≤ 1024px)
                ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    :root {
        --sb-width: 250px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-filter-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

        .search-filter-wrapper .btn-reset-filter {
            grid-column: 1 / -1;
        }

    .form-two-col,
    .ep-form-two-col {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-preview {
        max-width: 280px;
        margin: 0 auto;
    }

    .ep-fgrid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-title {
        font-size: 17px;
    }
}

/* ══════════════════════════════════════════════════════════
                   RESPONSIVE — MOBILE (≤ 992px)
                   السايدبار يتحول إلى drawer يُفتح/يُغلق
                ══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    /* ── إخفاء السايدبار خارج الشاشة ── */
    .sidebar {
        transform: translateX(110%);
        width: var(--sb-width) !important;
        box-shadow: none;
        transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), box-shadow 0.32s ease;
    }
        /* فتح السايدبار */
        .sidebar.mobile-open {
            transform: translateX(0);
            box-shadow: -8px 0 32px rgba(0,0,0,0.35);
        }
        /* إخفاء زر collapse الداخلي على الموبايل */
        .sidebar .sb-toggle {
            display: none;
        }
    /* ── المحتوى الرئيسي يأخذ كامل العرض ── */
    .main-content {
        margin-right: 0 !important;
        width: 100%;
    }
    /* ── إظهار زر الفتح في الـ Topbar ── */
    .mobile-menu-btn {
        display: flex;
    }
    /* ── إخفاء بعض عناصر الـ Topbar لتوفير مساحة ── */
    .topbar-bread {
        display: none;
    }

    .topbar {
        padding: 12px 16px;
        gap: 8px;
    }

    .topbar-title {
        font-size: 16px;
    }
    /* ── الـ Page Body ── */
    .page-body {
        padding: 14px;
    }
    /* ── Stats Grid ── */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    /* ── Search/Filter ── */
    .search-filter-wrapper {
        grid-template-columns: 1fr;
    }
    /* ── Header buttons ── */
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-add-customer {
        width: 100%;
        justify-content: center;
    }
    /* ── Forms ── */
    .form-two-col,
    .ep-form-two-col {
        grid-template-columns: 1fr;
    }

    .fields-grid,
    .ep-fgrid--2,
    .ep-fgrid--3,
    .ep-fgrid--4 {
        grid-template-columns: 1fr;
    }

        .ep-fgroup--span2,
        .ep-fgroup--span3,
        .ep-fgroup--span-full,
        .fields-grid .full-col {
            grid-column: 1 / -1;
        }
    /* ── Image Panel (موبايل: أفقي) ── */
    .ep-image-panel,
    .image-panel {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        background: #f8fafc;
        border-radius: 12px;
        padding: 16px;
    }

    .ep-img-upload-box,
    .img-upload-box {
        width: 80px !important;
        height: 80px !important;
        flex-shrink: 0;
    }
    /* ── Table ── */
    .customers-table thead {
        display: none;
    }

    .customers-table tbody td {
        display: block;
        text-align: right;
        padding: 8px 14px;
        border: none;
        background: #fff;
    }

        .customers-table tbody td:first-child {
            padding-top: 16px;
        }

        .customers-table tbody td:last-child {
            padding-bottom: 16px;
            border-bottom: 2px solid #e2e8f0;
        }

        .customers-table tbody td::before {
            content: attr(data-label);
            font-weight: 700;
            color: #64748b;
            display: block;
            margin-bottom: 4px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
    /* ── Form Footer ── */
    .ep-form-footer {
        padding: 14px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .ep-form-footer__actions {
        flex-direction: column;
    }

    .ep-btn-save,
    .ep-btn-cancel {
        width: 100%;
        justify-content: center;
    }
    /* ── Page Header ── */
    .ep-form-page-header,
    .form-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ep-btn-back,
    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

/* ══════════════════════════════════════════════════════════
                   RESPONSIVE — SMALL MOBILE (≤ 600px)
                ══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    :root {
        --sb-width: 280px;
    }

    .topbar {
        padding: 10px 12px;
    }

    .topbar-title {
        font-size: 15px;
    }
    /* ── إخفاء بعض أزرار الـ Topbar لتوفير مساحة ── */
    .topbar-right .topbar-btn:not(:last-of-type):not(.mobile-notif-keep) {
        display: none;
    }
    /* الاحتفاظ بزر الإشعارات والمستخدم فقط */
    .notif-bell-wrap {
        display: inline-flex !important;
    }

    .page-body {
        padding: 10px;
    }
    /* ── Stats: عمود واحد ── */
    .stats-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-box {
        flex-direction: row;
        text-align: right;
        gap: 16px;
        padding: 16px;
    }

    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 22px;
        flex-shrink: 0;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 13px;
    }
    /* ── Table ── */
    .customers-table-container {
        border-radius: 8px;
    }
    /* ── Calc Box ── */
    .ep-calc-box__grid {
        grid-template-columns: 1fr;
    }

    .ep-calc-item {
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }

        .ep-calc-item:last-child {
            border-bottom: none;
        }
    /* ── Quick Actions ── */
    .action-buttons {
        flex-direction: column;
    }

        .action-buttons .btn {
            width: 100%;
            justify-content: center;
        }
    /* ── Form Card Body ── */
    .ep-form-card__body,
    .form-card-body {
        padding: 16px;
    }
    /* ── Dropdown Notifications ── */
    .notif-dropdown {
        width: calc(100vw - 24px);
        left: auto;
        right: -12px;
    }
    /* ── Topbar Dropdowns: full width on mobile ── */
    #userMenu {
        width: calc(100vw - 24px);
        right: -50px;
        left: auto;
    }
    /* ── Page Main Title ── */
    .page-main-title {
        font-size: 17px;
    }

    .page-main-subtitle {
        font-size: 12px;
    }
    /* ── Customers Page Header ── */
    .customers-page-header {
        padding: 14px 16px;
    }
}

/* ══════════════════════════════════════════════════════════
                   RESPONSIVE — EXTRA SMALL (≤ 380px)
                ══════════════════════════════════════════════════════════ */
@media (max-width: 380px) {

    :root {
        --sb-width: 260px;
    }

    .topbar {
        padding: 9px 10px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .page-body {
        padding: 8px;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-number {
        font-size: 20px;
    }

    .sb-quick-btn {
        height: 48px;
    }

        .sb-quick-btn i {
            font-size: 16px;
        }
}

/* ══════════════════════════════════════════════════════════
                   SMOOTH SCROLL على المحتوى
                ══════════════════════════════════════════════════════════ */
.main-content {
    scroll-behavior: smooth;
}

/* ══════════════════════════════════════════════════════════
                   SIDEBAR SCROLLBAR احترافي
                ══════════════════════════════════════════════════════════ */
.sb-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* ══════════════════════════════════════════════════════════
                   ACTIVE NAV LINK — تحديد الصفحة الحالية تلقائيًا
                ══════════════════════════════════════════════════════════ */
.nav-link-custom.router-active {
    background: var(--sb-bg-active);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26,107,255,0.3);
}

    .nav-link-custom.router-active .nav-icon {
        color: #fff;
    }




