/* ============================================
   Baridy - Kuwait Post Admin Dashboard
   Modern Production-Ready Design System
   RTL Support | Bootstrap 5 | Glassmorphism
   Primary: #055DAC (Kuwait Post Blue)
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* --- Brand Colors --- */
    --primary: #055DAC;
    --primary-dark: #044a8a;
    --primary-darker: #033868;
    --primary-light: #e6f0fa;
    --primary-lighter: #f0f6fd;
    --primary-gradient: linear-gradient(135deg, #055DAC 0%, #033868 100%);
    --primary-gradient-soft: linear-gradient(135deg, #066bc7 0%, #055DAC 50%, #044a8a 100%);

    /* --- Semantic Colors --- */
    --secondary: #64748b;
    --success: #059669;
    --success-light: #d1fae5;
    --success-dark: #047857;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --warning-dark: #b45309;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --danger-dark: #b91c1c;
    --info: #0284c7;
    --info-light: #e0f2fe;
    --info-dark: #0369a1;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --teal: #0d9488;
    --teal-light: #ccfbf1;

    /* --- Neutral Colors --- */
    --dark: #0f172a;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --sidebar-width: 264px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* --- Text Colors --- */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    /* --- Border Radius --- */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-colored: 0 4px 14px rgba(5, 93, 172, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);

    /* --- Transitions --- */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ============================================
   2. GLOBAL & RESET
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    font-size: 14px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
}

::selection {
    background: rgba(5, 93, 172, 0.15);
    color: var(--primary-dark);
}


/* ============================================
   3. LUCIDE ICONS
   ============================================ */
.lucide {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.lucide-sm {
    width: 16px;
    height: 16px;
}

.lucide-lg {
    width: 24px;
    height: 24px;
}

.lucide-xl {
    width: 28px;
    height: 28px;
}


/* ============================================
   4. SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}


/* ============================================
   5. SIDEBAR (Glassmorphism)
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg,
        rgba(5, 93, 172, 0.97) 0%,
        rgba(3, 56, 104, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-brand {
    padding: 24px 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-logo {
    height: 44px;
    width: auto;
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.sidebar-brand h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.nav-item {
    margin: 2px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link i,
.nav-link .lucide {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}


/* ============================================
   6. MAIN CONTENT
   ============================================ */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}


/* ============================================
   7. TOPBAR
   ============================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
}

.topbar-search {
    position: relative;
    flex: 1;
    max-width: 520px;
}

.topbar-search input {
    width: 100%;
    padding: 9px 44px 9px 16px;
    background: var(--body-bg);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.1);
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-search .search-icon {
    position: absolute;
    left: auto;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 4px;
    border: 2px solid #fff;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--body-bg);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(5, 93, 172, 0.25);
}

.user-info h6 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.user-info small {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--body-bg);
    color: var(--primary);
}


/* ============================================
   8. PAGE CONTENT & HEADERS
   ============================================ */
.page-content {
    padding: 28px;
    flex: 1;
    animation: fadeInUp 0.35s ease-out;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}


/* ============================================
   9. STAT CARDS (Colored right border for RTL)
   ============================================ */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(5, 93, 172, 0.02) 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #e6f0fa 0%, #d0e4f7 100%);
    color: var(--primary);
}

.stat-icon.green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--warning);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: var(--purple);
}

.stat-icon.red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--danger);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--info);
}

/* Colored border per stat variant */
.stat-card:has(.stat-icon.green) { border-right-color: var(--success); }
.stat-card:has(.stat-icon.orange) { border-right-color: var(--warning); }
.stat-card:has(.stat-icon.purple) { border-right-color: var(--purple); }
.stat-card:has(.stat-icon.red) { border-right-color: var(--danger); }
.stat-card:has(.stat-icon.cyan) { border-right-color: var(--info); }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info .label {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-info .value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-info .change {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.stat-info .change.up { color: var(--success); }
.stat-info .change.down { color: var(--danger); }


/* ============================================
   10. CARDS
   ============================================ */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.card-custom:hover {
    box-shadow: var(--shadow-md);
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom .card-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-custom .card-body {
    padding: 22px;
}


/* ============================================
   11. WELCOME BANNER
   ============================================ */
.welcome-banner {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-banner h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.welcome-banner p {
    opacity: 0.85;
    margin: 0;
    font-size: 14px;
    position: relative;
    z-index: 1;
}


/* ============================================
   12. QUICK ACTIONS (Icon-based)
   ============================================ */
.quick-action {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.quick-action:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-colored);
    transform: translateY(-4px);
}

.quick-action:hover::before {
    transform: scaleX(1);
}

.quick-action .icon {
    font-size: 28px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    transition: var(--transition);
}

.quick-action:hover .icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    transition: var(--transition);
}

.quick-action-icon i,
.quick-action-icon svg {
    width: 28px;
    height: 28px;
}

.quick-action h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.quick-action p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}


/* ============================================
   13. QUICK LINKS
   ============================================ */
.quick-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--body-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.quick-link-item:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: rgba(5, 93, 172, 0.15);
    transform: translateX(-4px);
}

.quick-link-item:last-child {
    margin-bottom: 0;
}

.quick-link-item i {
    transition: var(--transition);
}

.quick-link-item:hover i {
    transform: translateX(-4px);
}


/* ============================================
   14. NOTIFICATION ITEMS
   ============================================ */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.notification-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notification-item:first-child {
    padding-top: 0;
}

.notification-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-item-content {
    flex: 1;
}

.notification-item .title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.5;
}

.notification-item .time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ============================================
   15. TABLES (Zebra stripes, modern styling)
   ============================================ */
.table-wrapper {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.table-wrapper:hover {
    box-shadow: var(--shadow-md);
}

.table-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
}

.table-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.table-custom {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--body-bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12.5px;
    padding: 12px 16px;
    border: none;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.2px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-custom tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    transition: var(--transition-fast);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Zebra stripes */
.table-custom tbody tr:nth-child(even) {
    background: rgba(241, 245, 249, 0.5);
}

.table-custom tbody tr:hover {
    background: rgba(5, 93, 172, 0.03);
}

/* Responsive table scroll */
.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-custom::-webkit-scrollbar {
    height: 5px;
}

.table-responsive-custom::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}


/* ============================================
   16. STATUS BADGES
   ============================================ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

.badge-delivered   { background: var(--success-light); color: var(--success-dark); }
.badge-pending     { background: var(--warning-light); color: var(--warning-dark); }
.badge-customs     { background: #fef3c7; color: #92400e; }
.badge-shipped     { background: var(--info-light); color: var(--info-dark); }
.badge-confirmed   { background: var(--success-light); color: var(--success-dark); }
.badge-waiting     { background: var(--warning-light); color: var(--warning-dark); }
.badge-cancelled   { background: var(--danger-light); color: var(--danger-dark); }
.badge-sent        { background: var(--success-light); color: var(--success-dark); }
.badge-scheduled   { background: var(--info-light); color: var(--info-dark); }
.badge-active      { background: var(--success-light); color: var(--success-dark); }
.badge-inactive    { background: var(--danger-light); color: var(--danger-dark); }
.badge-suspended   { background: var(--warning-light); color: var(--warning-dark); }
.badge-maintenance { background: var(--warning-light); color: var(--warning-dark); }


/* ============================================
   17. TYPE BADGES
   ============================================ */
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-type.delivery    { background: var(--info-light); color: var(--info-dark); }
.badge-type.offer       { background: #fef3c7; color: #92400e; }
.badge-type.alert       { background: var(--danger-light); color: var(--danger-dark); }
.badge-type.appointment { background: var(--purple-light); color: var(--purple); }


/* ============================================
   18. ACTION BUTTONS
   ============================================ */
.btn-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    background: transparent;
    position: relative;
}

.btn-action.view { color: var(--primary); }
.btn-action.view:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-action.edit { color: var(--warning); }
.btn-action.edit:hover { background: var(--warning-light); color: var(--warning-dark); }
.btn-action.delete { color: var(--danger); }
.btn-action.delete:hover { background: var(--danger-light); color: var(--danger-dark); }

.btn-action.confirm {
    background: var(--success);
    color: #fff;
    border-radius: var(--radius-full);
    width: auto;
    padding: 6px 16px;
    font-size: 12px;
    height: auto;
    font-weight: 600;
    gap: 4px;
}

.btn-action.confirm:hover {
    background: var(--success-dark);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}


/* ============================================
   19. FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar .search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.filter-bar .search-box input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    background: var(--card-bg);
    transition: var(--transition);
    color: var(--text-primary);
}

.filter-bar .search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.1);
    background: #fff;
}

.filter-bar .search-box input::placeholder {
    color: var(--text-muted);
}

.filter-bar .search-box .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-bar select {
    padding: 10px 36px 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    background: var(--card-bg);
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    cursor: pointer;
    transition: var(--transition);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.1);
}


/* ============================================
   20. PRIMARY & OUTLINE BUTTONS
   ============================================ */
.btn-primary-custom {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(5, 93, 172, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #044a8a 0%, #033868 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

.btn-primary-custom:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(5, 93, 172, 0.2);
}

.btn-primary-custom i,
.btn-primary-custom .lucide {
    font-size: 16px;
}

.btn-outline-custom {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.btn-outline-custom:active {
    background: var(--primary-lighter);
}


/* ============================================
   21. USER CARDS
   ============================================ */
.user-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.user-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(5, 93, 172, 0.15);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
}

.user-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-card-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.user-card-civil {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Segoe UI', monospace;
    direction: ltr;
    text-align: right;
}

.user-card-badge {
    position: absolute;
    top: 0;
    left: 0;
}

.user-card-details {
    margin-bottom: 16px;
    flex: 1;
}

.user-card-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-card-detail i {
    color: var(--text-muted);
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.user-card-detail .po-box {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Segoe UI', monospace;
}

.user-card-shipments {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.user-card-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
    margin-top: auto;
}

.user-card-actions .btn {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}


/* ============================================
   22. EMPLOYEE ROWS
   ============================================ */
.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.employee-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}


/* ============================================
   23. BRANCH BADGES
   ============================================ */
.branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(5, 93, 172, 0.1);
}


/* ============================================
   24. SETTINGS TABS & FORMS
   ============================================ */
.settings-tabs .nav-tabs {
    border: none;
    background: var(--card-bg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 0;
    overflow-x: auto;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.settings-tabs .nav-tabs::-webkit-scrollbar {
    height: 0;
}

.settings-tabs .nav-tabs .nav-link {
    border: none;
    padding: 16px 28px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-tabs .nav-tabs .nav-link i,
.settings-tabs .nav-tabs .nav-link .lucide {
    font-size: 16px;
}

.settings-tabs .nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(5, 93, 172, 0.03);
}

.settings-tabs .nav-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom-color: var(--primary);
}

.settings-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.settings-section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.settings-section-header h5 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-section-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.settings-form .form-label {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-form .form-control,
.settings-form .form-select {
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background: var(--body-bg);
    transition: var(--transition);
    color: var(--text-primary);
}

.settings-form .form-control:focus,
.settings-form .form-select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.1);
}

.settings-form .form-control::placeholder {
    color: var(--text-muted);
}

/* Form switch styling */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.15);
    border-color: var(--primary);
}


/* ============================================
   25. CHART CONTAINERS
   ============================================ */
.chart-container {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    transition: var(--transition);
}

.chart-container:hover {
    box-shadow: var(--shadow-md);
}

.chart-container h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-placeholder {
    height: 280px;
    background: var(--body-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    border: 1px dashed var(--border-color);
}

/* Kuwait Map */
.kuwait-map-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kuwait-map-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

#kuwaitMap {
    width: 100%;
    height: auto;
}

.gov-region {
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: filter 0.2s ease, stroke-width 0.2s ease;
}

.map-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    white-space: nowrap;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
}

.map-tooltip.show {
    opacity: 1;
}

.map-legend {
    width: 100%;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.map-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.map-legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.map-legend-item strong {
    color: var(--text-primary);
    font-weight: 700;
}


/* ============================================
   26. REVENUE STATS
   ============================================ */
.revenue-stat {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.revenue-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.revenue-stat:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.revenue-stat .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.revenue-stat .value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
}

.revenue-stat .sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}


/* ============================================
   27. LOGIN PAGE (Frosted glass card)
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    top: -300px;
    left: -200px;
    border-radius: 50%;
    animation: float-slow 12s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 60%);
    bottom: -200px;
    right: -100px;
    border-radius: 50%;
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.05); }
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand .shield-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--primary);
}

.login-brand h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 13px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-form .form-control {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.12);
    background: #fff;
}

.login-form .form-control::placeholder {
    color: var(--text-muted);
}

.login-form .input-group {
    position: relative;
}

.login-form .toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.login-form .toggle-password:hover {
    color: var(--primary);
}

.login-form .btn-login {
    width: 100%;
    padding: 13px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(5, 93, 172, 0.25);
    position: relative;
    overflow: hidden;
}

.login-form .btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.login-form .btn-login:hover {
    box-shadow: 0 6px 20px rgba(5, 93, 172, 0.35);
    transform: translateY(-1px);
}

.login-form .btn-login:hover::before {
    left: 100%;
}

.login-form .btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.login-bg-text {
    position: relative;
    z-index: 10;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    margin-top: 24px;
    letter-spacing: 0.3px;
}


/* ============================================
   28. FOOTER
   ============================================ */
.main-footer {
    text-align: center;
    padding: 20px 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    margin-top: auto;
}

.main-footer small {
    color: var(--text-light);
}


/* ============================================
   29. MODALS
   ============================================ */
.modal-custom .modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-custom .modal-header {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 0;
    padding: 18px 24px;
    border: none;
}

.modal-custom .modal-header .modal-title {
    font-weight: 700;
    font-size: 16px;
}

.modal-custom .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: var(--transition-fast);
}

.modal-custom .modal-header .btn-close:hover {
    opacity: 1;
}

.modal-custom .modal-body {
    padding: 28px;
}

.modal-custom .modal-body .form-label {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-custom .modal-body .form-control,
.modal-custom .modal-body .form-select {
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.modal-custom .modal-body .form-control:focus,
.modal-custom .modal-body .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 93, 172, 0.1);
}

.modal-custom .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    gap: 8px;
}

/* Modal backdrop */
.modal-backdrop.show {
    opacity: 0.4;
}

/* --- View Modal Detail List --- */
.modal-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-detail-list li {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.modal-detail-list li:last-child {
    border-bottom: none;
}

.modal-detail-list .detail-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 130px;
    flex-shrink: 0;
}

.modal-detail-list .detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* --- View Modal Header Variant --- */
.modal-custom.modal-view .modal-header {
    background: linear-gradient(135deg, #055DAC 0%, #0369a1 100%);
}

.modal-custom.modal-edit .modal-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.modal-custom.modal-delete .modal-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* --- Delete Modal --- */
.delete-modal-body {
    text-align: center;
    padding: 32px 28px;
}

.delete-modal-body .delete-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--danger-light);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.delete-modal-body h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.delete-modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.7;
}

.delete-modal-body .item-name {
    font-weight: 700;
    color: var(--danger);
}

/* --- Modal Buttons --- */
.btn-modal-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-modal-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

.btn-modal-success {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-modal-success:hover {
    background: var(--success-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-modal-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-modal-danger:hover {
    background: var(--danger-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-modal-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-modal-cancel:hover {
    background: var(--body-bg);
    border-color: var(--text-muted);
}

/* --- User Profile Dropdown --- */
.user-profile.dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-family: inherit;
}

.user-profile-btn::after {
    display: none;
}

.user-profile-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.user-dropdown {
    min-width: 240px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0;
    overflow: hidden;
    margin-top: 8px !important;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--body-bg);
}

.user-dropdown-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-dropdown-email {
    font-size: 13px;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
}

.user-dropdown .dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.user-dropdown .dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.user-dropdown .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.user-dropdown .dropdown-item:hover i {
    color: var(--primary);
}

.user-dropdown .dropdown-divider {
    margin: 0;
    border-color: var(--border-color);
}

.user-dropdown-logout {
    color: var(--danger) !important;
}

.user-dropdown-logout:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.user-dropdown-logout i {
    color: var(--danger) !important;
}

/* --- Chart Container Equal Heights --- */
.row > [class*="col-"] > .chart-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.row > [class*="col-"] > .chart-container canvas {
    flex: 1;
    min-height: 0;
}

/* --- Leaflet Zoom Controls RTL Fix --- */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    color: var(--primary) !important;
    background: var(--card-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
    transition: var(--transition-fast);
}

.leaflet-control-zoom a:hover {
    background: var(--primary-light) !important;
    color: var(--primary-dark) !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}


/* ============================================
   30. RESPONSIVE BREAKPOINTS
   ============================================ */

/* XL: 1200px and below */
@media (max-width: 1199.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
        animation: fadeIn 0.2s ease;
    }
}

/* LG: 992px and below */
@media (max-width: 991.98px) {
    .page-content {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .stat-info .value {
        font-size: 24px;
    }

    .welcome-banner {
        padding: 24px;
    }
}

/* MD: 768px and below */
@media (max-width: 767.98px) {
    .page-content {
        padding: 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-info .value {
        font-size: 22px;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-search {
        display: none;
    }

    .user-info {
        display: none;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .search-box {
        min-width: 100%;
    }

    .filter-bar select {
        width: 100%;
    }

    .table-custom {
        font-size: 13px;
    }

    .table-custom thead th,
    .table-custom tbody td {
        padding: 10px 12px;
    }

    .card-custom .card-header,
    .card-custom .card-body {
        padding: 16px;
    }

    .welcome-banner {
        padding: 20px;
    }

    .welcome-banner h3 {
        font-size: 19px;
    }

    .quick-action {
        padding: 20px 16px;
    }

    .settings-form {
        padding: 20px;
    }

    .settings-tabs .nav-tabs .nav-link {
        padding: 14px 20px;
        font-size: 13px;
    }
}

/* SM: 576px and below */
@media (max-width: 575.98px) {
    .login-card {
        margin: 16px;
        padding: 28px 24px;
    }

    .login-brand h1 {
        font-size: 28px;
    }

    .welcome-banner h3 {
        font-size: 18px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .stat-info .value {
        font-size: 20px;
    }

    .topbar-actions {
        gap: 4px;
    }

    .user-profile {
        padding: 6px 8px;
    }

    .btn-primary-custom {
        padding: 9px 16px;
        font-size: 13px;
    }

    .btn-outline-custom {
        padding: 8px 14px;
        font-size: 12px;
    }

    .revenue-stat .value {
        font-size: 18px;
    }

    .table-header {
        padding: 14px 16px;
    }

    .chart-container {
        padding: 16px;
    }
}


/* ============================================
   31. UTILITY CLASSES
   ============================================ */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.text-primary-dark { color: var(--primary-dark) !important; }
.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.gap-20 { gap: 20px; }
.gap-12 { gap: 12px; }
.radius-md { border-radius: var(--radius-md) !important; }
.radius-lg { border-radius: var(--radius-lg) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.text-muted { color: var(--text-muted) !important; }
.border-primary { border-color: var(--primary) !important; }

/* Hover lift effect */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Truncate text */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}


/* ============================================
   32. ANIMATIONS (@keyframes)
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation utility classes */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.35s ease-out; }
.animate-slide-in { animation: slideIn 0.3s ease-out; }
.animate-scale-in { animation: scaleIn 0.25s ease-out; }

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.05s; animation-fill-mode: both; }
.animate-delay-2 { animation-delay: 0.1s; animation-fill-mode: both; }
.animate-delay-3 { animation-delay: 0.15s; animation-fill-mode: both; }
.animate-delay-4 { animation-delay: 0.2s; animation-fill-mode: both; }
.animate-delay-5 { animation-delay: 0.25s; animation-fill-mode: both; }


/* ============================================
   33. PRINT STYLES
   ============================================ */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        direction: rtl;
    }

    .sidebar,
    .sidebar-overlay,
    .topbar,
    .sidebar-toggle,
    .btn-primary-custom,
    .btn-outline-custom,
    .btn-action,
    .btn-logout,
    .filter-bar,
    .notification-btn,
    .user-profile,
    .main-footer {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }

    .stat-card,
    .card-custom,
    .table-wrapper,
    .chart-container,
    .revenue-stat,
    .user-card {
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }

    .table-custom thead th {
        background: #f0f0f0 !important;
    }

    a {
        text-decoration: underline;
    }

    .page-header h1 {
        font-size: 18pt;
    }

    .stat-info .value {
        font-size: 16pt;
    }

    @page {
        margin: 1.5cm;
    }
}


/* ============================================
   34. SKELETON LOADING (Optional utility)
   ============================================ */
.skeleton {
    background: linear-gradient(90deg,
        var(--border-light) 25%,
        var(--body-bg) 50%,
        var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
}
