/* ================================================================
   اللوحة الإدارية — QuickData
   ملف التصميم المشترك (Theme) لكل صفحات اللوحة الإدارية.
   يُستخدم في كل صفحات اللوحة الإدارية عبر: <link rel="stylesheet" href="theme.css">
   ================================================================ */

:root {
    --primary: #0e1c2e;
    --primary-light: #1a2e46;
    --primary-dark: #08131f;
    --accent: #9c7a3c;
    --accent-light: #c9a86a;
    --accent-dark: #755a29;
    --accent-tint: rgba(156, 122, 60, 0.08);
    --success: #1c7a4e;
    --success-bg: #e6f3ec;
    --danger: #ad3f39;
    --danger-bg: #f7e8e6;
    --info: #2d6088;
    --info-bg: #e6edf4;
    --warning: #ad7f2e;
    --warning-bg: #f6eee1;
    --bg: #f3f1eb;
    --surface: #ffffff;
    --surface-alt: #faf8f3;
    --border: #e0dccf;
    --border-light: #ebe7db;
    --text: #181712;
    --text-secondary: #5c5648;
    --text-tertiary: #746f5f;
    --text-inverse: #f5f3ec;
    --shadow-sm: 0 1px 2px rgba(14,28,46,0.04), 0 1px 3px rgba(14,28,46,0.06);
    --shadow-md: 0 2px 8px rgba(14,28,46,0.06), 0 6px 16px rgba(14,28,46,0.06);
    --shadow-lg: 0 10px 30px rgba(14,28,46,0.10);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-full: 9999px;
    --t-base: 0.2s ease;
    --sidebar-width: 260px;
    --header-height: 60px;
    --font-display: 'Inter', 'Cairo', sans-serif;
    --font-body: 'Cairo', 'Inter', sans-serif;

    /* ألوان زاهية للنصوص داخل صفحات المحتوى (بدون الشريط الجانبي) */
    --vivid-1: #e63946;
    --vivid-2: #d84315;
    --vivid-3: #2e7d32;
    --vivid-4: #00838f;
    --vivid-5: #1565c0;
    --vivid-6: #6a1b9a;
    --vivid-7: #ad1457;
    --vivid-8: #ef6c00;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    z-index: 1050;
    overflow-y: auto;
    transition: transform 0.3s ease;
    border-left: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
.sidebar.collapsed { transform: translateX(calc(var(--sidebar-width) + 20px)); }

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-logo-img {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    padding: 2px;
    display: none;
}
.brand-logo-img.visible { display: block; }
.brand-mark {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800; font-size: 14px;
    color: var(--text-inverse);
    flex-shrink: 0;
}
.brand-mark.hidden { display: none; }
.brand-text { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-inverse); line-height: 1.2; }
.brand-text span { color: var(--accent-light); }
.brand-text small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 0.5px; color: rgba(255,255,255,0.45); margin-top: 1px; }

.sidebar-nav { padding: 10px 8px; flex: 1; }
.nav-section-title {
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.38);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 14px 12px 6px;
    font-family: var(--font-display);
}
.nav-list { list-style: none; padding: 0; margin: 0; }
.nav-list li { margin-bottom: 0; }
.nav-list a {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.66);
    font-size: 13px; font-weight: 500;
    transition: var(--t-base);
    position: relative;
}
.nav-list a:hover { background: rgba(255,255,255,0.05); color: var(--text-inverse); }
.nav-list a.active { background: rgba(139, 122, 75, 0.12); color: var(--text-inverse); font-weight: 600; }
.nav-list a.active i { color: var(--accent-light); }
.nav-list a.active::before {
    content: ''; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 16px;
    background: var(--accent);
}
.nav-list a i { width: 16px; text-align: center; font-size: 14px; flex-shrink: 0; opacity: 0.7; }

.sidebar-badge {
    margin-right: auto;
    font-size: 9px; font-weight: 700;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    background: rgba(139, 122, 75, 0.18);
    color: var(--accent-light);
    border: 1px solid rgba(139, 122, 75, 0.15);
    font-family: var(--font-display);
}
.sidebar-badge.badge-soon {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.08);
}

.sidebar-footer { padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.logout-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px; border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    transition: var(--t-base);
    font-size: 13px; font-weight: 500;
}
.logout-btn:hover { background: rgba(184, 74, 62, 0.12); color: #e8a09a; }
.logout-btn i { font-size: 14px; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 1045; }
.sidebar-overlay.active { display: block; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-right 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.main-content.expanded { margin-right: 0; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar-custom {
    background: var(--bg);
    padding: 0 24px;
    height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1040;
    border-bottom: 1px solid var(--border);
}
.navbar-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 16px; color: var(--text-secondary);
    transition: var(--t-base);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: var(--surface); border-color: var(--text-tertiary); }
.navbar-logo-container { display: flex; align-items: center; gap: 8px; margin-right: 4px; }
.navbar-logo-img { height: 28px; width: 28px; object-fit: contain; border-radius: var(--radius-sm); display: none; }
.navbar-logo-img.visible { display: block; }
.navbar-logo-text { font-size: 13px; font-weight: 700; color: var(--text); font-family: var(--font-display); }
.navbar-logo-text span { color: var(--accent); }
.page-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); }
.page-title small { font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-right: 6px; }
.navbar-right { display: flex; align-items: center; gap: 4px; }
.nav-btn {
    width: 32px; height: 32px; border: none; background: transparent;
    color: var(--text-secondary); font-size: 15px;
    transition: var(--t-base); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.nav-btn:hover { background: var(--surface); color: var(--text); }
.notification-dot {
    position: absolute; top: 5px; left: 5px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid var(--bg);
    display: none;
}
.notification-dot.show { display: block; }
.user-profile {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 4px 3px 12px;
    border-radius: var(--radius-full);
    cursor: pointer; transition: var(--t-base);
    border: 1px solid transparent;
}
.user-profile:hover { background: var(--surface); border-color: var(--border); }
.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent); color: var(--text-inverse);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 12px; font-family: var(--font-display);
    flex-shrink: 0;
}
.user-info { line-height: 1.2; }
.user-name { font-size: 12px; font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--text-tertiary); }

/* ================================================================
   PAGE CONTENT
   ================================================================ */
.dashboard-content { padding: 20px 24px 30px; flex: 1; }

.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
    margin-bottom: 18px; flex-wrap: wrap; gap: 8px;
}
.page-header .ph-left h2 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.page-header .ph-left p { font-size: 13px; color: var(--text-tertiary); margin: 0; }
.page-header .ph-right { font-size: 13px; color: var(--text-tertiary); text-align: left; }
.page-header .ph-right strong { display: block; font-weight: 600; color: var(--text); font-size: 13px; }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; transition: var(--t-base); cursor: pointer; }
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-card .stat-number { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-card .stat-label { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.stat-card .stat-icon { float: left; font-size: 18px; color: var(--accent-light); opacity: 0.5; }
.stat-blue .stat-number { color: var(--info); }
.stat-green .stat-number { color: var(--success); }
.stat-gold .stat-number { color: var(--accent); }
.stat-red .stat-number { color: var(--danger); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-action { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 12px; transition: var(--t-base); border: 1px solid transparent; font-family: var(--font-display); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--text-inverse); }
.btn-success { background: var(--success); border-color: var(--success); color: white; }
.btn-success:hover { background: #166a4a; border-color: #166a4a; color: white; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-danger:hover { background: #a03d32; border-color: #a03d32; color: white; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-tint); }
.btn-sm { font-size: 10px; padding: 4px 10px; }
.btn-icon { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 12px; transition: var(--t-base); }
.btn-icon-edit { background: var(--info-bg); color: var(--info); border-color: var(--border); }
.btn-icon-edit:hover { background: var(--info); color: white; }
.btn-icon-delete { background: var(--danger-bg); color: var(--danger); border-color: var(--border); }
.btn-icon-delete:hover { background: var(--danger); color: white; }

/* ================================================================
   PANEL
   ================================================================ */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.panel-header { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.panel-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; margin: 0; }
.panel-title i { color: var(--accent); font-size: 13px; }
.record-count { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }

/* ================================================================
   TABLE
   ================================================================ */
.table-wrap { overflow-x: auto; }
.table-custom { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-custom thead { background: var(--bg); }
.table-custom th { padding: 8px 12px; text-align: right; font-weight: 700; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border); font-family: var(--font-display); white-space: nowrap; }
.table-custom td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; color: var(--text); }
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: var(--surface-alt); }

.badge-custom { padding: 2px 9px; border-radius: var(--radius-full); font-size: 10.5px; font-weight: 700; display: inline-block; font-family: var(--font-display); }
.badge-admin { background: var(--info-bg); color: var(--info); }
.badge-finance { background: var(--success-bg); color: var(--success); }
.badge-user { background: var(--warning-bg); color: var(--warning); }

.status-badge { padding: 2px 9px; border-radius: var(--radius-full); font-size: 10.5px; font-weight: 700; display: inline-block; font-family: var(--font-display); }
.status-active { background: var(--success-bg); color: var(--success); }
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-completed { background: var(--info-bg); color: var(--info); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }
.status-info { background: var(--info-bg); color: var(--info); }
.status-danger { background: var(--danger-bg); color: var(--danger); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1060; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); padding: 28px 32px; max-width: 520px; width: 92%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalFadeIn 0.3s ease; }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-box h3 { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.modal-box h3 i { color: var(--accent); margin-left: 8px; }
.modal-box label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.modal-box select, .modal-box input, .modal-box textarea {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 13px; margin-bottom: 12px; transition: var(--t-base);
    background: var(--surface); color: var(--text);
}
.modal-box select:focus, .modal-box input:focus, .modal-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 122, 75, 0.08); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* ================================================================
   TOAST
   ================================================================ */
.toast-notification {
    position: fixed; bottom: 20px; left: 20px;
    background: var(--surface); padding: 12px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-right: 3px solid var(--accent);
    z-index: 9999;
    animation: slideUp 0.3s ease forwards;
    max-width: 380px; font-size: 12.5px;
}
.toast-notification.toast-success { border-right-color: var(--success); }
.toast-notification.toast-error { border-right-color: var(--danger); }
.toast-notification.toast-warning { border-right-color: var(--warning); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-15px); } }

/* ================================================================
   SHIMMER / EMPTY STATE
   ================================================================ */
.shimmer { background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%); background-size: 200% 100%; animation: shimmer-animation 1.5s ease-in-out infinite; border-radius: var(--radius-sm); }
@keyframes shimmer-animation { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state-row td { text-align: center; padding: 26px; color: var(--text-tertiary); }
.empty-state-row i { font-size: 1.1rem; display: block; margin-bottom: 6px; opacity: 0.35; }

/* ================================================================
   QUICK ACTIONS / MODULE CARDS
   ================================================================ */
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.quick-action { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; transition: var(--t-base); color: var(--text); position: relative; }
.quick-action:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.quick-action i { font-size: 20px; color: var(--accent-dark); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--accent-tint); border-radius: var(--radius-sm); flex-shrink: 0; }
.quick-action strong { font-size: 13px; font-weight: 700; display: block; }
.quick-action span { font-size: 12px; color: var(--text-tertiary); }
.quick-action .soon-tag {
    position: absolute; top: 8px; left: 8px;
    font-size: 9.5px; font-weight: 700; padding: 1px 7px;
    border-radius: var(--radius-full);
    background: var(--warning-bg); color: var(--warning);
    font-family: var(--font-display);
}

.error-banner { display: none; align-items: center; justify-content: space-between; gap: 10px; background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(173,63,57,0.25); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 12.5px; margin-bottom: 20px; }
.error-banner.show { display: flex; }
.error-banner button { background: none; border: none; color: var(--danger); text-decoration: underline; font-size: 11.5px; font-weight: 700; cursor: pointer; }

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer-custom { background: var(--surface); border-top: 2px solid var(--border); padding: 12px 24px; flex-shrink: 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.03); margin-top: auto; }
.footer-custom .footer-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 1400px; margin: 0 auto; }
.footer-custom .footer-right { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-tertiary); }
.footer-custom .footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: 13px; }
.footer-custom .footer-brand span { color: var(--accent); }
.footer-custom .footer-copy { font-size: 12px; }
.footer-custom .footer-copy strong { color: var(--accent-dark); font-weight: 700; }
.footer-custom .footer-divider { color: var(--border); font-size: 14px; }
.footer-custom .footer-left { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-tertiary); }
.footer-custom .footer-version { font-family: var(--font-display); font-size: 12px; color: var(--text-tertiary); background: var(--bg); padding: 2px 10px; border-radius: var(--radius-full); }
.footer-custom .footer-link { color: var(--text-tertiary); transition: var(--t-base); display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.footer-custom .footer-link:hover { color: var(--accent); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1200px) {
    .sidebar { transform: translateX(calc(var(--sidebar-width) + 20px)); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .sidebar-overlay.active { display: block; }
}
@media (max-width: 992px) {
    .dashboard-content { padding: 16px 18px; }
    .navbar-custom { padding: 0 16px; }
    .user-info { display: none; }
    .page-header .ph-right { display: none; }
    .navbar-logo-text { display: none; }
    .footer-custom .footer-divider { display: none; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .navbar-right .nav-btn:not(:first-child) { display: none; }
    .navbar-custom { height: 54px; padding: 0 12px; }
    .page-title { font-size: 14px; }
    .page-title small { display: none; }
    .sidebar-toggle { width: 28px; height: 28px; font-size: 14px; }
    .dashboard-content { padding: 12px 12px; }
    .page-header h2 { font-size: 15px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card .stat-number { font-size: 16px; }
    .table-custom { font-size: 12.5px; }
    .table-custom th, .table-custom td { padding: 6px 8px; }
    .modal-box { padding: 20px; }
    .navbar-logo-img { height: 24px; width: 24px; }
    .footer-custom { padding: 8px 14px; }
    .footer-custom .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
    .footer-custom .footer-right { flex-wrap: wrap; justify-content: center; font-size: 11px; }
    .footer-custom .footer-left { font-size: 11px; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 576px) {
    .dashboard-content { padding: 10px 10px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-card { padding: 10px 12px; }
    .stat-card .stat-number { font-size: 14px; }
    .stat-card .stat-label { font-size: 10.5px; }
    .stat-card .stat-icon { font-size: 14px; }
    .user-avatar { width: 28px; height: 28px; font-size: 11px; }
    .modal-box { padding: 16px; }
    .modal-box h3 { font-size: 15px; }
    .footer-custom .footer-copy { font-size: 10px; }
    .footer-custom .footer-version { font-size: 10px; padding: 1px 8px; }
}

/* ================================================================
   DARK MODE
   ================================================================ */
body.dark-mode { background: var(--primary-dark); color: #e0dcd2; }
body.dark-mode .navbar-custom { background: var(--primary-dark); border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .navbar-logo-text { color: #e0dcd2; }
body.dark-mode .stat-card { background: var(--primary); border-color: rgba(255,255,255,0.06); }
body.dark-mode .stat-card .stat-number { color: #e0dcd2; }
body.dark-mode .panel { background: var(--primary); border-color: rgba(255,255,255,0.06); }
body.dark-mode .panel-header { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .table-custom thead { background: var(--primary-light); }
body.dark-mode .table-custom th { color: rgba(232,228,220,0.4); border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .table-custom td { border-bottom-color: rgba(255,255,255,0.04); color: #e0dcd2; }
body.dark-mode .table-custom tr:hover td { background: var(--primary-light); }
body.dark-mode .page-header { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .page-header .ph-left h2 { color: #e0dcd2; }
body.dark-mode .page-header .ph-left p { color: rgba(232,228,220,0.5); }
body.dark-mode .btn-outline { border-color: rgba(255,255,255,0.08); color: rgba(232,228,220,0.6); }
body.dark-mode .btn-outline:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(139, 122, 75, 0.1); }
body.dark-mode .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--text); }
body.dark-mode .btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--text); }
body.dark-mode .btn-success { background: #166a4a; border-color: #166a4a; }
body.dark-mode .btn-danger { background: #a03d32; border-color: #a03d32; }
body.dark-mode .sidebar-toggle { border-color: rgba(255,255,255,0.08); color: rgba(232,228,220,0.5); }
body.dark-mode .sidebar-toggle:hover { background: var(--primary); border-color: rgba(255,255,255,0.15); color: #e0dcd2; }
body.dark-mode .nav-btn { color: rgba(232,228,220,0.5); }
body.dark-mode .nav-btn:hover { background: var(--primary); color: #e0dcd2; }
body.dark-mode .user-profile:hover { background: var(--primary); border-color: rgba(255,255,255,0.08); }
body.dark-mode .user-name { color: #e0dcd2; }
body.dark-mode .toast-notification { background: var(--primary); color: #e0dcd2; border-right-color: var(--accent); }
body.dark-mode .toast-notification.toast-success { border-right-color: var(--success); }
body.dark-mode .toast-notification.toast-error { border-right-color: var(--danger); }
body.dark-mode .toast-notification.toast-warning { border-right-color: var(--warning); }
body.dark-mode .modal-box { background: var(--primary); color: #e0dcd2; }
body.dark-mode .modal-box h3 { color: #e0dcd2; }
body.dark-mode .modal-box select, body.dark-mode .modal-box input, body.dark-mode .modal-box textarea { background: var(--primary-light); color: #e0dcd2; border-color: rgba(255,255,255,0.08); }
body.dark-mode .modal-box select:focus, body.dark-mode .modal-box input:focus, body.dark-mode .modal-box textarea:focus { border-color: var(--accent); }
body.dark-mode .badge-admin { background: rgba(58, 107, 143, 0.2); color: #8ab4d4; }
body.dark-mode .badge-finance { background: rgba(30, 122, 85, 0.2); color: #7bc4a0; }
body.dark-mode .badge-user { background: rgba(184, 148, 58, 0.2); color: #d4b87a; }
body.dark-mode .btn-icon-edit { background: rgba(58, 107, 143, 0.2); color: #8ab4d4; }
body.dark-mode .btn-icon-edit:hover { background: var(--info); color: white; }
body.dark-mode .btn-icon-delete { background: rgba(184, 74, 62, 0.2); color: #dba09a; }
body.dark-mode .btn-icon-delete:hover { background: var(--danger); color: white; }
body.dark-mode .shimmer { background: linear-gradient(90deg, var(--primary-light) 25%, var(--primary) 50%, var(--primary-light) 75%); }
body.dark-mode .footer-custom { background: var(--primary); border-top-color: rgba(255,255,255,0.06); }
body.dark-mode .footer-custom .footer-brand { color: #e0dcd2; }
body.dark-mode .footer-custom .footer-copy { color: rgba(232,228,220,0.5); }
body.dark-mode .footer-custom .footer-copy strong { color: var(--accent-light); }
body.dark-mode .footer-custom .footer-version { background: var(--primary-light); color: rgba(232,228,220,0.5); }
body.dark-mode .footer-custom .footer-link { color: rgba(232,228,220,0.5); }
body.dark-mode .footer-custom .footer-link:hover { color: var(--accent-light); }

/* ================================================================
   طلب مخصص: نصوص بولد وبألوان زاهية داخل المحتوى الرئيسي
   (يستثني الشريط الجانبي .sidebar، ويستثني صفحة الدعم والتواصل
   عبر كلاس body.no-vivid-text)
   ================================================================ */
body:not(.no-vivid-text) .main-content,
body:not(.no-vivid-text) .main-content * {
    font-weight: 700 !important;
}

body:not(.no-vivid-text) .main-content h1,
body:not(.no-vivid-text) .main-content h2,
body:not(.no-vivid-text) .main-content h3 {
    color: var(--vivid-5) !important;
}
body:not(.no-vivid-text) .main-content h4,
body:not(.no-vivid-text) .main-content h5,
body:not(.no-vivid-text) .main-content h6 {
    color: var(--vivid-4) !important;
}
body:not(.no-vivid-text) .main-content p {
    color: var(--vivid-7) !important;
}
body:not(.no-vivid-text) .main-content td {
    color: var(--vivid-4) !important;
}
body:not(.no-vivid-text) .main-content th {
    color: var(--vivid-1) !important;
}
body:not(.no-vivid-text) .main-content label,
body:not(.no-vivid-text) .main-content .form-label {
    color: var(--vivid-8) !important;
}
body:not(.no-vivid-text) .main-content li:not(.nav-list li) {
    color: var(--vivid-6) !important;
}
body:not(.no-vivid-text) .main-content strong {
    color: var(--vivid-1) !important;
}
body:not(.no-vivid-text) .main-content small {
    color: var(--vivid-2) !important;
}
body:not(.no-vivid-text) .main-content .stat-number {
    color: var(--vivid-1) !important;
}
body:not(.no-vivid-text) .main-content .stat-label {
    color: var(--vivid-7) !important;
}
body:not(.no-vivid-text) .main-content span:not(.badge):not(.badge-admin):not(.badge-finance):not(.badge-user):not(.notification-dot):not(.soon-tag):not(.footer-version):not(.footer-divider):not(.stat-icon):not(.user-avatar) {
    color: var(--vivid-2) !important;
}

/* استثناء الشارات والأزرار والأيقونات من تغيير اللون (تبقى بألوانها الدلالية) مع الحفاظ على الخط البارز */
body:not(.no-vivid-text) .main-content .badge,
body:not(.no-vivid-text) .main-content .badge-admin,
body:not(.no-vivid-text) .main-content .badge-finance,
body:not(.no-vivid-text) .main-content .badge-user,
body:not(.no-vivid-text) .main-content .btn,
body:not(.no-vivid-text) .main-content .btn-primary,
body:not(.no-vivid-text) .main-content .btn-outline,
body:not(.no-vivid-text) .main-content .btn-success,
body:not(.no-vivid-text) .main-content .btn-danger,
body:not(.no-vivid-text) .main-content .nav-btn,
body:not(.no-vivid-text) .main-content .stat-icon,
body:not(.no-vivid-text) .main-content i,
body:not(.no-vivid-text) .main-content .error-banner,
body:not(.no-vivid-text) .main-content .toast-notification {
    color: inherit;
}
body:not(.no-vivid-text) .main-content .error-banner { color: var(--danger) !important; }
body:not(.no-vivid-text) .main-content .toast-notification { color: inherit !important; }
