/* ═══════════════════════════════════════════════════════════════════════
   ADMIN PANEL - MASTER STYLESHEET (Part 1/4: Foundation & Shell)
   دادگستری سانست | Justice Administration Panel
   طراحی: مینیمال لاکچری | پالت: Navy + Gold + Glassmorphism
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   §1. DESIGN TOKENS (LIGHT MODE - پیش‌فرض)
   ────────────────────────────────────────────────────────────────────── */
:root {
    /* ── پالت طلایی (برند) ── */
    --gold-50:  #fffbeb;
    --gold-100: #fef3c7;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-glow:    rgba(245, 158, 11, 0.25);
    --gold-glow-sm: rgba(245, 158, 11, 0.12);
    --gold-dim:     rgba(245, 158, 11, 0.08);
    --gold-border:  rgba(245, 158, 11, 0.35);
    --grad-gold: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%);

    /* ── پالت نیوی / سرمه‌ای (پایه تاریک سایدبار) ── */
    --navy-900: #0b0f1e;
    --navy-800: #111827;
    --navy-700: #1a2235;
    --navy-600: #1e2d45;

    /* ── اسلیت (پس‌زمینه‌های روشن) ── */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-800: #1e293b;

    /* ── رنگ‌های معنایی (Status) ── */
    --c-success: #10b981; --c-success-bg: rgba(16,185,129,.10);
    --c-danger:  #ef4444; --c-danger-bg:  rgba(239,68,68,.10);
    --c-warning: #f59e0b; --c-warning-bg: rgba(245,158,11,.10);
    --c-info:    #3b82f6; --c-info-bg:    rgba(59,130,246,.10);

    /* ── پس‌زمینه و شیشه‌ای (Light) ── */
    --bg-page:    #f0f4f8;
    --bg-surface: #ffffff;
    --bg-glass:   rgba(255, 255, 255, 0.82);
    --bg-card:    rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.06);

    /* ── متن (Light) ── */
    --text-primary:   #1e293b;
    --text-secondary: #475569;
    --text-tertiary:  #64748b;
    --text-muted:     #94a3b8;

    /* ── سایه‌ها ── */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.18);
    --shadow-gold: 0 4px 24px var(--gold-glow);

    /* ── ابعاد و شعاع ── */
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 28px; --r-full: 9999px;
    --sidebar-w: 268px;
    --sidebar-col: 72px;
    --header-h: 64px;

    /* ── انیمیشن ── */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: 0.15s; --t-mid: 0.25s; --t-slow: 0.4s;
}

/* ──────────────────────────────────────────────────────────────────────
   §2. DESIGN TOKENS (DARK MODE)
   ────────────────────────────────────────────────────────────────────── */
body.dark-mode {
    --bg-page:    var(--navy-900);
    --bg-surface: var(--navy-800);
    --bg-glass:   rgba(17, 24, 39, 0.85);
    --bg-card:    rgba(26, 34, 53, 0.95);
    --glass-border: rgba(255, 255, 255, 0.06);

    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-tertiary:  #64748b;
    --text-muted:     #475569;

    --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
    --shadow-md: 0 6px 20px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.6);
}

/* ──────────────────────────────────────────────────────────────────────
   §3. RESET & BASE
   ────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--t-slow), color var(--t-mid);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }
::selection { background: var(--gold-dim); color: var(--gold-600); }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: var(--r-sm); }

/* ── اسکرول‌بار سفارشی ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

/* ──────────────────────────────────────────────────────────────────────
   §4. ANIMATED BACKGROUND (پس‌زمینه متحرک شیشه‌ای)
   ────────────────────────────────────────────────────────────────────── */
.animated-bg {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: var(--bg-page); overflow: hidden;
    transition: background var(--t-slow);
}
.floating-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.6;
    animation: orbFloat 25s ease-in-out infinite alternate;
    will-change: transform;
}
.orb-1 { width: 500px; height: 500px; top: -150px; right: -100px; background: radial-gradient(circle, rgba(245,158,11,.15) 0%, transparent 70%); }
.orb-2 { width: 450px; height: 450px; bottom: -100px; left: -100px; background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%); animation-delay: -10s; }
.orb-3 { width: 350px; height: 350px; top: 40%; left: 30%; background: radial-gradient(circle, rgba(139,92,246,.10) 0%, transparent 70%); animation-delay: -5s; }

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -40px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}
.grid-pattern {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--glass-border) 1px, transparent 1px), linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
.noise-overlay {
    position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ──────────────────────────────────────────────────────────────────────
   §5. GLOBAL LOADER (لودر سراسری)
   ────────────────────────────────────────────────────────────────────── */
#globalLoader {
    position: fixed; inset: 0; background: var(--navy-900); z-index: 99999;
    display: none; align-items: center; justify-content: center; flex-direction: column; gap: 1.5rem;
}
#globalLoader.active { display: flex; }
.loader-seal { position: relative; width: 70px; height: 70px; }
.seal-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid transparent; border-top-color: var(--gold-500);
    animation: ringSpin 1.2s linear infinite;
}
.seal-ring:nth-child(2) { inset: 8px; border-top-color: var(--gold-300); animation-duration: 1.8s; animation-direction: reverse; }
.seal-ring:nth-child(3) { inset: 16px; border-top-color: var(--gold-100); animation-duration: 2.4s; }
.seal-center {
    position: absolute; inset: 24px; background: var(--gold-dim); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.seal-center i { color: var(--gold-500); font-size: 1.2rem; filter: drop-shadow(0 0 8px var(--gold-glow)); }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.loader-text { text-align: center; }
.loader-title { font-size: 1.2rem; font-weight: 800; color: var(--gold-400); letter-spacing: 1px; margin-bottom: 0.25rem; }
.loader-subtitle { font-size: 0.7rem; color: var(--slate-500); letter-spacing: 2px; text-transform: uppercase; }

/* ──────────────────────────────────────────────────────────────────────
   §6. LOGIN PAGE (صفحه ورود)
   ────────────────────────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 10; padding: 1.5rem;
}
.login-card {
    background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border); border-radius: var(--r-2xl);
    padding: 2.5rem 2rem; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-xl), var(--shadow-gold);
    animation: loginIn 0.5s var(--ease-spring) both;
    position: relative; overflow: hidden;
}
.login-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-gold);
}
@keyframes loginIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo {
    width: 72px; height: 72px; margin: 0 auto 1.25rem;
    background: var(--navy-800); border: 2px solid var(--gold-border); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px var(--gold-glow);
}
.login-logo i { font-size: 1.8rem; color: var(--gold-500); }
.login-title {
    font-size: 1.5rem; font-weight: 800;
    background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 0.2rem;
}
.login-subtitle { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

/* ── فرم و اینپوت‌های لاگین ── */
.login-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    display: flex; align-items: center; gap: 0.4rem;
}
.form-label i { color: var(--gold-500); font-size: 0.8rem; }
.form-input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid var(--glass-border); border-radius: var(--r-md);
    background: rgba(255,255,255,0.5); color: var(--text-primary);
    font-family: inherit; font-size: 0.9rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-input:focus {
    outline: none; border-color: var(--gold-500);
    background: rgba(255,255,255,0.9); box-shadow: 0 0 0 3px var(--gold-glow-sm);
}
body.dark-mode .form-input { background: rgba(255,255,255,0.05); color: var(--text-primary); }
body.dark-mode .form-input:focus { background: rgba(255,255,255,0.08); }

.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-left: 2.8rem; }
.password-toggle {
    position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem; transition: color var(--t-fast);
}
.password-toggle:hover { color: var(--gold-500); }

.btn-login {
    margin-top: 0.5rem; width: 100%; padding: 0.85rem;
    background: var(--grad-gold); color: var(--navy-900);
    font-weight: 700; font-size: 0.95rem; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    box-shadow: 0 4px 16px var(--gold-glow);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--gold-glow); }
.btn-login:active { transform: translateY(0); }

.login-footer { text-align: center; margin-top: 1.5rem; }
.btn-link {
    color: var(--text-muted); font-size: 0.82rem;
    display: inline-flex; align-items: center; gap: 0.4rem; transition: color var(--t-fast);
}
.btn-link:hover { color: var(--gold-500); }

/* ── آلرت‌ها ── */
.alert {
    border-radius: var(--r-md); padding: 0.75rem 1rem; font-size: 0.85rem;
    display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-error   { background: var(--c-danger-bg);  color: var(--c-danger); border-color: rgba(239,68,68,0.2); }
.alert-warning { background: var(--c-warning-bg); color: var(--c-warning); border-color: rgba(245,158,11,0.2); }
.alert-success { background: var(--c-success-bg); color: var(--c-success); border-color: rgba(16,185,129,0.2); }

/* ──────────────────────────────────────────────────────────────────────
   §7. APP SHELL & TOPBAR (پوسته اصلی و تاپ‌بار شیشه‌ای)
   ────────────────────────────────────────────────────────────────────── */
.admin-shell {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-h);
}

.admin-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h); z-index: 200;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center;
    padding: 0 1.5rem; gap: 1rem;
    transition: background var(--t-slow), border-color var(--t-mid);
}
body.dark-mode .admin-topbar {
    background: rgba(11, 15, 30, 0.85);
    border-bottom-color: rgba(255,255,255,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ── بخش راست تاپ‌بار (بردکرامپ و منو موبایل) ── */
.topbar-right {
    display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0;
}
.mobile-menu-btn {
    display: none; width: 38px; height: 38px; border-radius: var(--r-md);
    background: var(--bg-card); border: 1px solid var(--glass-border);
    color: var(--text-secondary); font-size: 1rem;
    align-items: center; justify-content: center; transition: all var(--t-fast);
}
.mobile-menu-btn:hover { background: var(--gold-dim); color: var(--gold-600); border-color: var(--gold-border); }

.topbar-breadcrumb {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-muted); min-width: 0;
}
.topbar-breadcrumb i { color: var(--gold-500); font-size: 0.8rem; }
.topbar-breadcrumb .sep { opacity: 0.4; font-size: 0.7rem; }
.topbar-breadcrumb .current {
    color: var(--text-primary); font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── بخش چپ تاپ‌بار (جستجو، ساعت، اعلان‌ها) ── */
.topbar-left {
    display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
}
.topbar-search {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--r-full); padding: 0 1rem; height: 38px;
    transition: all var(--t-fast); width: 220px;
}
.topbar-search:focus-within {
    border-color: var(--gold-500); background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--gold-glow-sm); width: 280px;
}
.topbar-search i { color: var(--text-muted); font-size: 0.8rem; }
.topbar-search input {
    flex: 1; border: none; background: transparent; outline: none;
    color: var(--text-primary); font-size: 0.82rem; font-family: inherit;
}
.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-clock {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--text-secondary);
    padding: 0 0.8rem; height: 38px;
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--r-full);
}
.topbar-clock i { color: var(--gold-500); font-size: 0.75rem; }

.topbar-icon-btn {
    width: 38px; height: 38px; border-radius: var(--r-md);
    background: var(--bg-card); border: 1px solid var(--glass-border);
    color: var(--text-secondary); font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    position: relative; cursor: pointer; transition: all var(--t-fast);
}
.topbar-icon-btn:hover {
    background: var(--gold-dim); color: var(--gold-600); border-color: var(--gold-border);
    transform: translateY(-1px);
}

/* ──────────────────────────────────────────────────────────────────────
   §8. NOTIFICATIONS DROPDOWN
   ────────────────────────────────────────────────────────────────────── */
.notif-dropdown {
    position: absolute; top: calc(100% + 10px); left: 0;
    width: 360px; background: var(--bg-card);
    border: 1px solid var(--glass-border); border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl); overflow: hidden; z-index: 500;
    animation: dropIn 0.25s var(--ease-spring) both;
    display: none;
}
.notif-dropdown.active { display: block; }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-header {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
}
.notif-header h3 {
    font-size: 0.9rem; font-weight: 800; color: var(--text-primary);
    display: flex; align-items: center; gap: 0.5rem;
}
.notif-header h3 i { color: var(--gold-500); }
.notif-mark-read {
    font-size: 0.72rem; color: var(--gold-600); padding: 0.25rem 0.7rem;
    border-radius: var(--r-full); border: 1px solid var(--gold-border);
    background: var(--gold-dim); font-weight: 600; transition: all var(--t-fast);
}
.notif-mark-read:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }

.notif-list { max-height: 340px; overflow-y: auto; }
.notif-empty {
    padding: 3rem 1rem; text-align: center; color: var(--text-muted);
    font-size: 0.82rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.notif-empty i { font-size: 2rem; opacity: 0.3; }
.notif-item {
    display: flex; gap: 0.8rem; padding: 0.9rem 1.25rem;
    cursor: pointer; border-bottom: 1px solid var(--glass-border);
    transition: background var(--t-fast);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(0,0,0,0.02); }
.notif-item.unread { background: var(--gold-dim); border-right: 3px solid var(--gold-500); }

/* ──────────────────────────────────────────────────────────────────────
   §9. SIDEBAR (منوی کناری تاریک و پریمیوم)
   ────────────────────────────────────────────────────────────────────── */
.admin-sidebar {
    position: fixed; top: var(--header-h); right: 0; bottom: 0;
    width: var(--sidebar-w); z-index: 150;
    background: var(--navy-800);
    border-left: 1px solid rgba(255,255,255,0.05);
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: width var(--t-slow) var(--ease-smooth);
}
body.dark-mode .admin-sidebar {
    background: #070a13;
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
}

/* ── هدر سایدبار (لوگو) ── */
.sidebar-header {
    padding: 0 1rem; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; overflow: hidden; }
.sidebar-logo-icon {
    width: 36px; height: 36px; border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 0 12px var(--gold-glow);
}
.sidebar-logo-icon i { color: var(--gold-500); font-size: 0.95rem; }
.sidebar-logo-text { overflow: hidden; white-space: nowrap; transition: opacity var(--t-mid); }
.sidebar-logo-text h2 {
    font-family: 'Cinzel', 'Vazirmatn', serif; font-size: 0.85rem; font-weight: 700;
    color: var(--gold-400); letter-spacing: 0.5px;
}
.sidebar-logo-text p { font-size: 0.6rem; color: var(--slate-500); letter-spacing: 1px; text-transform: uppercase; }

.sidebar-collapse-btn {
    width: 28px; height: 28px; border-radius: var(--r-sm);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: var(--slate-400); font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all var(--t-fast); flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: var(--gold-dim); color: var(--gold-400); border-color: var(--gold-border); }
.sidebar-collapse-btn i { transition: transform var(--t-mid) var(--ease-spring); }

/* ── ناوبری سایدبار ── */
.sidebar-nav {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 0.75rem 0.6rem;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.menu-section { margin-bottom: 0.5rem; }
.menu-section-title {
    font-size: 0.62rem; font-weight: 700; color: var(--slate-500);
    letter-spacing: 2px; text-transform: uppercase;
    padding: 0.6rem 0.75rem 0.4rem; white-space: nowrap;
    transition: opacity var(--t-mid);
}

.menu-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.8rem; border-radius: var(--r-md);
    color: var(--slate-400); font-size: 0.84rem; font-weight: 500;
    cursor: pointer; transition: all var(--t-fast);
    position: relative; border: 1px solid transparent;
    white-space: nowrap; overflow: hidden; margin-bottom: 2px;
    text-decoration: none;
}
.menu-item i {
    font-size: 0.95rem; width: 20px; text-align: center; flex-shrink: 0;
    transition: color var(--t-fast), transform var(--t-fast);
}
.menu-item:hover {
    background: rgba(255,255,255,0.05); color: #e2e8f0;
}
.menu-item:hover i { color: var(--gold-400); transform: scale(1.1); }

.menu-item.active {
    background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.05) 100%);
    color: var(--gold-400); border-color: rgba(245,158,11,0.2);
}
.menu-item.active i { color: var(--gold-400); }
.menu-item.active::before {
    content: ''; position: absolute; right: 0; top: 20%; bottom: 20%;
    width: 3px; background: var(--grad-gold); border-radius: 3px 0 0 3px;
    box-shadow: 0 0 8px var(--gold-glow);
}

.menu-badge {
    margin-right: auto; font-size: 0.6rem; font-weight: 700;
    padding: 0.12rem 0.5rem; border-radius: var(--r-full);
    background: var(--gold-dim); color: var(--gold-400); border: 1px solid var(--gold-border);
    flex-shrink: 0; transition: opacity var(--t-mid);
}
.menu-badge.new {
    background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.3);
    animation: badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.nav-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0.5rem 0.75rem; }

/* ── فوتر سایدبار (پروفایل و خروج) ── */
.sidebar-footer {
    padding: 0.75rem 0.6rem; border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0; display: flex; flex-direction: column; gap: 0.5rem;
}
.sidebar-user {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.5rem 0.6rem; border-radius: var(--r-md);
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    transition: all var(--t-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.sidebar-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-600), var(--navy-500));
    border: 1.5px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user-avatar i { font-size: 0.85rem; color: var(--gold-400); }
.sidebar-user-info { overflow: hidden; transition: opacity var(--t-mid); }
.sidebar-user-name { font-size: 0.82rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.sidebar-user-role { font-size: 0.65rem; color: var(--gold-400); letter-spacing: 0.5px; }

.sidebar-logout {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.8rem; border-radius: var(--r-md);
    background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15);
    color: #f87171; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.sidebar-logout:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); transform: translateY(-1px); }
.sidebar-logout i { font-size: 0.85rem; width: 20px; text-align: center; }

/* ── حالت جمع شده (Collapsed) ── */
.admin-sidebar.collapsed { width: var(--sidebar-col); }
.admin-sidebar.collapsed .sidebar-logo-text,
.admin-sidebar.collapsed .menu-section-title,
.admin-sidebar.collapsed .menu-item span:not(.menu-badge),
.admin-sidebar.collapsed .menu-badge,
.admin-sidebar.collapsed .sidebar-user-info,
.admin-sidebar.collapsed .sidebar-logout span {
    opacity: 0; pointer-events: none; width: 0; overflow: hidden;
}
.admin-sidebar.collapsed .menu-item { justify-content: center; padding: 0.65rem; }
.admin-sidebar.collapsed .menu-item i { width: auto; }
.admin-sidebar.collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

/* تولتیپ در حالت جمع شده */
.admin-sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute; right: calc(100% + 12px); top: 50%;
    transform: translateY(-50%);
    background: var(--navy-700); border: 1px solid var(--gold-border);
    color: #e2e8f0; font-size: 0.78rem; font-weight: 600;
    padding: 0.4rem 0.8rem; border-radius: var(--r-sm);
    white-space: nowrap; z-index: 300;
    box-shadow: var(--shadow-lg); pointer-events: none;
    animation: tooltipFade 0.2s var(--ease-spring);
}
@keyframes tooltipFade {
    from { opacity: 0; transform: translateY(-50%) translateX(8px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ──────────────────────────────────────────────────────────────────────
   §10. MAIN CONTENT & IFRAME
   ────────────────────────────────────────────────────────────────────── */
.admin-main {
    flex: 1; margin-right: var(--sidebar-w);
    min-width: 0; min-height: calc(100vh - var(--header-h));
    display: flex; flex-direction: column;
    transition: margin-right var(--t-slow) var(--ease-smooth);
    position: relative;
}
.admin-sidebar.collapsed ~ .admin-main { margin-right: var(--sidebar-col); }

.admin-iframe-wrap {
    flex: 1; position: relative;
    background: var(--bg-page);
}
#dynamic-content {
    width: 100%; height: 100%; border: none; display: block;
    min-height: calc(100vh - var(--header-h));
    transition: opacity 0.2s ease;
}

/* ──────────────────────────────────────────────────────────────────────
   §11. IMMERSIVE MODE & RADIAL MENU (Game UI Style)
   ────────────────────────────────────────────────────────────────────── */
/* منطق Immersive Mode (مخفی کردن شل پنل) */
body.immersive-mode .admin-topbar {
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
}
body.immersive-mode .admin-sidebar {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}
body.immersive-mode .admin-shell {
    padding-top: 0 !important;
}
body.immersive-mode .admin-main {
    margin-right: 0 !important;
}
body.immersive-mode #dynamic-content {
    min-height: 100vh !important;
}

/* دکمه شناور (Floating Trigger) */
.immersive-trigger {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-400);
    font-size: 1.2rem;
    transition: all 0.4s var(--ease-spring);
}
body.dark-mode .immersive-trigger {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}
.immersive-trigger:hover {
    transform: translateY(-50%) scale(1.1);
    border-color: var(--gold-500);
    box-shadow: 0 0 30px var(--gold-glow);
}
.immersive-trigger.active {
    background: var(--grad-gold);
    color: var(--navy-900);
    border-color: transparent;
    transform: translateY(-50%) rotate(45deg) scale(1.1);
}
/* انیمیشن پالس برای جلب توجه */
.immersive-trigger::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--gold-500);
    opacity: 0;
    animation: triggerPulse 2.5s infinite;
}
@keyframes triggerPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* منوی شعاعی (Radial Menu) */
.radial-menu {
    position: fixed;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    z-index: 9998;
    pointer-events: none;
}
.radial-menu.active {
    pointer-events: all;
}
.radial-item {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.4s var(--ease-spring);
}
.radial-menu.active .radial-item {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1);
}
.radial-item:hover {
    background: var(--gold-dim);
    border-color: var(--gold-500);
    color: var(--gold-500);
    transform: translate(var(--tx), var(--ty)) scale(1.2) !important;
    box-shadow: 0 0 20px var(--gold-glow);
}
/* تولتیپ آیتم‌ها */
.radial-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--navy-800);
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid var(--gold-border);
}
.radial-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* اورلی تیره پشت منو (برای حس بازی) */
.immersive-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.immersive-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ──────────────────────────────────────────────────────────────────────
   §12. MOBILE OVERLAY & RESPONSIVE (پایه)
   ────────────────────────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 140; opacity: 0; transition: opacity var(--t-mid);
}
.sidebar-overlay.active { display: block; opacity: 1; }

/* تبلت و موبایل */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(100%); width: var(--sidebar-w) !important;
        box-shadow: none; transition: transform var(--t-slow) var(--ease-smooth);
    }
    .admin-sidebar.mobile-active { transform: translateX(0); box-shadow: -8px 0 40px rgba(0,0,0,0.5); }
    .admin-main { margin-right: 0 !important; }
    .mobile-menu-btn { display: flex; }
    .topbar-search { display: none; }
    .topbar-clock span { display: none; }
    .topbar-clock { padding: 0 0.6rem; }
}

@media (max-width: 768px) {
    :root { --header-h: 58px; }
    .admin-topbar { padding: 0 1rem; gap: 0.5rem; }
    .topbar-breadcrumb { font-size: 0.8rem; }
    .notif-dropdown { width: calc(100vw - 2rem); left: auto; right: -1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ADMIN PANEL - GLOBAL UI COMPONENTS (Part 2/4)
   ✅ دکمه‌ها، فرم‌ها، مودال‌ها، بج‌ها و ادیتور
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   §13. BUTTONS (دکمه‌های گلوبال)
   ────────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; font-family: inherit; font-weight: 600;
    border: none; cursor: pointer; white-space: nowrap;
    transition: all var(--t-fast) var(--ease-smooth);
    position: relative; overflow: hidden;
}
.btn-primary {
    padding: 0.65rem 1.35rem; background: var(--grad-gold);
    color: var(--navy-900); font-size: 0.85rem;
    border-radius: var(--r-md);
    box-shadow: 0 2px 10px var(--gold-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--gold-glow); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    padding: 0.65rem 1.35rem; background: var(--bg-card);
    border: 1px solid var(--glass-border); color: var(--text-secondary);
    font-size: 0.85rem; border-radius: var(--r-md);
}
.btn-secondary:hover { border-color: var(--gold-500); color: var(--gold-600); background: var(--gold-dim); }
body.dark-mode .btn-secondary:hover { color: var(--gold-400); }

.btn-danger {
    padding: 0.65rem 1.35rem; background: var(--c-danger-bg);
    border: 1px solid rgba(239,68,68,0.2); color: var(--c-danger);
    font-size: 0.85rem; border-radius: var(--r-md);
}
.btn-danger:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); transform: translateY(-1px); }

.btn-ghost {
    padding: 0.5rem 1rem; background: transparent;
    color: var(--text-secondary); font-size: 0.82rem;
}
.btn-ghost:hover { background: var(--gold-dim); color: var(--gold-600); }
body.dark-mode .btn-ghost:hover { color: var(--gold-400); }

/* دکمه‌های آیکونی (برای جدول‌ها و اکشن‌ها) */
.btn-icon {
    width: 32px; height: 32px; border-radius: var(--r-sm);
    background: var(--bg-card); border: 1px solid var(--glass-border);
    color: var(--text-tertiary); font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-fast);
}
.btn-icon:hover { background: var(--gold-dim); border-color: var(--gold-500); color: var(--gold-600); transform: scale(1.08); }
body.dark-mode .btn-icon:hover { color: var(--gold-400); }
.btn-icon.danger:hover { background: var(--c-danger-bg); border-color: rgba(239,68,68,0.3); color: var(--c-danger); }
.btn-icon.success:hover { background: var(--c-success-bg); border-color: rgba(16,185,129,0.3); color: var(--c-success); }

/* ──────────────────────────────────────────────────────────────────────
   §14. FORMS & INPUTS (فرم‌ها و اینپوت‌ها)
   ────────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    display: flex; align-items: center; gap: 0.4rem;
}
.form-label i { color: var(--gold-500); font-size: 0.8rem; }
.form-label .req { color: var(--c-danger); margin-right: 0.2rem; }

.form-control {
    width: 100%; padding: 0.7rem 1rem;
    background: var(--bg-surface); border: 1.5px solid var(--glass-border);
    border-radius: var(--r-md); color: var(--text-primary);
    font-family: inherit; font-size: 0.88rem;
    transition: all var(--t-fast);
}
.form-control:focus {
    outline: none; border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--gold-glow-sm); background: var(--bg-card);
}
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.8; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 0.8rem center; background-size: 1.2rem; padding-left: 2.5rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ──────────────────────────────────────────────────────────────────────
   §15. TOGGLES & CHECKBOXES (تاگل‌ها و چک‌باکس‌ها)
   ────────────────────────────────────────────────────────────────────── */
/* چک‌باکس سفارشی */
.form-check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.form-check input[type="checkbox"] { display: none; }
.custom-check {
    width: 20px; height: 20px; border-radius: 5px;
    border: 1.5px solid var(--glass-border); background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all var(--t-fast);
}
.form-check input:checked + .custom-check {
    background: var(--gold-500); border-color: var(--gold-500);
    box-shadow: 0 0 8px var(--gold-glow-sm);
    animation: checkPop 0.25s var(--ease-spring);
}
@keyframes checkPop { from { transform: scale(0.7); } to { transform: scale(1); } }
.form-check input:checked + .custom-check::after { content: '✓'; font-size: 0.7rem; color: #fff; font-weight: 900; }

/* تاگل سوئیچ */
.toggle-wrap { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; }
.toggle-switch {
    width: 42px; height: 24px; border-radius: 12px;
    background: var(--slate-300); position: relative;
    transition: background var(--t-fast); flex-shrink: 0;
}
body.dark-mode .toggle-switch { background: var(--slate-600); }
.toggle-switch::after {
    content: ''; position: absolute;
    right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform var(--t-mid) var(--ease-spring);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-wrap input { display: none; }
.toggle-wrap input:checked + .toggle-switch { background: var(--gold-500); }
.toggle-wrap input:checked + .toggle-switch::after { transform: translateX(-18px); }

/* ──────────────────────────────────────────────────────────────────────
   §16. BADGES & STATUS (بج‌ها و نشانگرهای وضعیت)
   ────────────────────────────────────────────────────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.75rem;
    border-radius: var(--r-full);
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-badge.active   { background: var(--c-success-bg); color: var(--c-success); border: 1px solid rgba(16,185,129,0.2); }
.status-badge.active::before { background: var(--c-success); }
.status-badge.inactive { background: var(--c-danger-bg);  color: var(--c-danger);  border: 1px solid rgba(239,68,68,0.2); }
.status-badge.inactive::before { background: var(--c-danger); }
.status-badge.pending  { background: var(--c-warning-bg); color: var(--c-warning); border: 1px solid rgba(245,158,11,0.2); }
.status-badge.pending::before { background: var(--c-warning); }

.badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 22px; padding: 0 0.5rem;
    background: var(--gold-dim); border: 1px solid var(--gold-border);
    border-radius: var(--r-full); font-size: 0.7rem; font-weight: 800; color: var(--gold-600);
}
body.dark-mode .badge-count { color: var(--gold-400); }

/* ──────────────────────────────────────────────────────────────────────
   §17. MODALS (مودال‌های استاندارد)
   ────────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    animation: overlayIn 0.2s ease both;
}
.modal-overlay.hidden { display: none !important; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--r-xl); width: 100%; max-width: 520px; max-height: 90vh;
    box-shadow: var(--shadow-xl); overflow: hidden;
    animation: modalIn 0.25s var(--ease-spring) both;
    position: relative; display: flex; flex-direction: column;
}
.modal-box::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--grad-gold);
}
.modal-box.lg { max-width: 720px; }
.modal-box.xl { max-width: 960px; }

@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(12px); } to { opacity: 1; transform: none; } }

.modal-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--gold-dim), transparent);
    flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.modal-title i { color: var(--gold-500); }
.modal-close {
    width: 32px; height: 32px; border-radius: var(--r-sm);
    color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: all var(--t-fast);
}
.modal-close:hover { background: var(--c-danger-bg); color: var(--c-danger); transform: rotate(90deg); }

.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem;
    flex-shrink: 0; background: var(--bg-surface);
}
body.dark-mode .modal-footer { background: rgba(0,0,0,0.2); }

.modal-field { display: flex; flex-direction: column; gap: 0.4rem; }
.modal-field label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.modal-field label i { color: var(--gold-500); font-size: 0.8rem; }
.modal-field input, .modal-field select, .modal-field textarea {
    padding: 0.65rem 0.9rem; border: 1.5px solid var(--glass-border);
    border-radius: var(--r-md); background: var(--bg-surface); color: var(--text-primary);
    font-family: inherit; font-size: 0.85rem; transition: all var(--t-fast);
}
.modal-field input:focus, .modal-field select:focus, .modal-field textarea:focus {
    outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-glow-sm);
}

/* ──────────────────────────────────────────────────────────────────────
   §18. CONFIRM DIALOG (مودال تأیید عملیات - استایل پریمیوم)
   ────────────────────────────────────────────────────────────────────── */
.confirm-modal-overlay {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.confirm-modal-overlay.active { opacity: 1; visibility: visible; }

.confirm-modal {
    max-width: 400px; width: 100%;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px); transition: transform 0.3s var(--ease-spring);
}
.confirm-modal-overlay.active .confirm-modal { transform: scale(1) translateY(0); }

.confirm-modal-header {
    padding: 2rem 1.5rem 1.5rem; text-align: center;
    background: linear-gradient(180deg, var(--gold-dim) 0%, transparent 100%);
}
.confirm-modal-icon {
    width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    background: var(--gold-dim); border: 2px solid var(--gold-border); color: var(--gold-600);
}
body.dark-mode .confirm-modal-icon { color: var(--gold-400); }
.confirm-modal-icon.danger  { background: var(--c-danger-bg);  border-color: rgba(239,68,68,0.3);  color: var(--c-danger); }
.confirm-modal-icon.success { background: var(--c-success-bg); border-color: rgba(16,185,129,0.3); color: var(--c-success); }
.confirm-modal-icon.warning { background: var(--c-warning-bg); border-color: rgba(245,158,11,0.3); color: var(--c-warning); }

.confirm-modal-title { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.4rem; }
.confirm-modal-subtitle { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.7; }

.confirm-modal-footer { padding: 1.2rem 1.5rem; display: flex; gap: 0.75rem; justify-content: center; border-top: 1px solid var(--glass-border); }
.confirm-btn {
    padding: 0.6rem 1.5rem; border-radius: var(--r-md); font-weight: 700;
    font-size: 0.85rem; cursor: pointer; border: none; transition: all var(--t-fast);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.confirm-btn-primary { background: var(--grad-gold); color: var(--navy-900); box-shadow: 0 2px 10px var(--gold-glow); }
.confirm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--gold-glow); }
.confirm-btn-secondary { background: var(--bg-surface); border: 1px solid var(--glass-border); color: var(--text-secondary); }
.confirm-btn-secondary:hover { border-color: var(--gold-500); color: var(--gold-600); background: var(--gold-dim); }
.confirm-btn-danger { background: var(--c-danger); color: #fff; }
.confirm-btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239,68,68,0.4); }

/* ──────────────────────────────────────────────────────────────────────
   §19. RICH TEXT EDITOR (ادیتور متن حرفه‌ای)
   ────────────────────────────────────────────────────────────────────── */
.editor-wrap {
    background: var(--bg-surface); border: 1.5px solid var(--glass-border);
    border-radius: var(--r-lg); overflow: hidden;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.editor-wrap:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-glow-sm); }

.editor-toolbar {
    display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap;
    padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--glass-border);
    background: var(--bg-elevated, rgba(0,0,0,0.02));
}
body.dark-mode .editor-toolbar { background: rgba(255,255,255,0.03); }

.editor-btn {
    width: 32px; height: 32px; border-radius: var(--r-sm);
    background: transparent; border: 1px solid transparent;
    color: var(--text-tertiary); font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-fast);
}
.editor-btn:hover { background: var(--gold-dim); border-color: var(--gold-border); color: var(--gold-600); }
body.dark-mode .editor-btn:hover { color: var(--gold-400); }
.editor-btn.active { background: var(--gold-dim); border-color: var(--gold-border); color: var(--gold-500); }

.editor-divider { width: 1px; height: 20px; background: var(--glass-border); margin: 0 0.3rem; }

.editor-content {
    min-height: 240px; padding: 1.2rem 1.5rem;
    color: var(--text-primary); font-size: 0.92rem; line-height: 2;
    outline: none; direction: rtl;
}
.editor-content:empty::before {
    content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}
.editor-content img, .editor-content video {
    max-width: 100%; border-radius: var(--r-md); margin: 0.75rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   ADMIN PANEL - DATA & CONTENT ELEMENTS (Part 3/4)
   ✅ جداول حرفه‌ای، کارت‌های آماری، تب‌ها، هدر صفحات، نتایج جستجو
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   §20. SECTION / PAGE HEADER (هدر داخلی صفحات Iframe)
   ────────────────────────────────────────────────────────────────────── */
.section-page-header {
    padding: 2rem 2.25rem 1.35rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(180deg, var(--gold-dim) 0%, transparent 100%);
    animation: fadeUp 0.45s var(--ease-smooth) both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-breadcrumb {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.73rem; color: var(--text-muted); margin-bottom: 0.75rem;
}
.section-breadcrumb a { color: var(--text-muted); transition: color var(--t-fast); }
.section-breadcrumb a:hover { color: var(--gold-600); }
.section-breadcrumb .sep { opacity: 0.4; font-size: 0.6rem; }

.section-title-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
}
.section-title-left { display: flex; align-items: center; gap: 1rem; }

.section-icon {
    width: 44px; height: 44px; border-radius: var(--r-lg);
    background: var(--grad-gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff; flex-shrink: 0;
    box-shadow: var(--shadow-gold);
    animation: iconPop 0.5s var(--ease-spring) 0.1s both;
}
@keyframes iconPop {
    from { opacity: 0; transform: scale(0.7) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

.section-title h2 {
    font-size: 1.55rem; font-weight: 800;
    color: var(--text-primary); line-height: 1.2;
}
.section-subtitle {
    font-size: 0.845rem; color: var(--text-tertiary); margin-top: 0.25rem;
}
.section-actions {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────────────────
   §21. DASHBOARD STATS (کارت‌های آماری داشبورد)
   ────────────────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.75rem 2.25rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: 1.35rem;
    display: flex; align-items: center; gap: 1rem;
    transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
    animation: cardIn 0.45s var(--ease-smooth) both;
    cursor: default; position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.stat-card::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    transform: scaleX(0); transform-origin: right;
    transition: transform var(--t-mid);
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-border);
}

/* رنگ‌بندی کارت‌ها */
.stat-card.gold::before   { background: var(--grad-gold); }
.stat-card.blue::before   { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.green::before  { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.teal::before   { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.stat-card.red::before    { background: linear-gradient(90deg, #ef4444, #f87171); }

.stat-icon {
    width: 48px; height: 48px; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; flex-shrink: 0;
    border: 1px solid var(--glass-border);
    transition: transform var(--t-mid);
}
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

.stat-card.gold   .stat-icon { background: var(--gold-dim); color: var(--gold-600); border-color: var(--gold-border); }
.stat-card.blue   .stat-icon { background: var(--c-info-bg); color: var(--c-info); border-color: rgba(59,130,246,0.2); }
.stat-card.green  .stat-icon { background: var(--c-success-bg); color: var(--c-success); border-color: rgba(16,185,129,0.2); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.08); color: #8b5cf6; border-color: rgba(139,92,246,0.2); }
.stat-card.teal   .stat-icon { background: rgba(20,184,166,0.08); color: #14b8a6; border-color: rgba(20,184,166,0.2); }
.stat-card.red    .stat-icon { background: var(--c-danger-bg); color: var(--c-danger); border-color: rgba(239,68,68,0.2); }

body.dark-mode .stat-card.gold .stat-icon { color: var(--gold-400); }

.stat-body { flex: 1; min-width: 0; }
.stat-value {
    font-size: 2rem; font-weight: 900;
    color: var(--text-primary); line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem;
}
.stat-delta {
    font-size: 0.7rem; margin-top: 0.4rem;
    display: flex; align-items: center; gap: 0.3rem;
    font-weight: 600;
}
.stat-delta.up   { color: var(--c-success); }
.stat-delta.down { color: var(--c-danger); }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* تاخیر انیمیشن برای افکت Stagger */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.10s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.20s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.30s; }

/* ──────────────────────────────────────────────────────────────────────
   §22. DASHBOARD GRID (کارت‌های داشبورد مثل Popular Laws)
   ────────────────────────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 1.5rem 2.25rem;
}
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg); overflow: hidden;
    transition: box-shadow var(--t-mid), border-color var(--t-mid);
    backdrop-filter: blur(10px);
}
.dash-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold-border);
}
.dash-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--gold-dim), transparent);
}
.dash-card-header h4 {
    font-size: 0.88rem; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 0.45rem;
}
.dash-card-header h4 i { color: var(--gold-500); }
.dash-card-body { padding: 1rem 1.25rem; }

.popular-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.82rem; color: var(--text-secondary);
    transition: background var(--t-fast);
    border-radius: var(--r-sm);
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { background: var(--gold-dim); }
.popular-count {
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    border-radius: var(--r-full); padding: 0.14rem 0.55rem;
    font-size: 0.7rem; font-weight: 700; color: var(--gold-600); flex-shrink: 0;
}
body.dark-mode .popular-count { color: var(--gold-400); }

/* ──────────────────────────────────────────────────────────────────────
   §23. TABLES (جداول حرفه‌ای با تولبار و Pagination)
   ────────────────────────────────────────────────────────────────────── */
.table-section { padding: 1.5rem 2.25rem; }

.table-toolbar {
    display: flex; align-items: center; gap: 0.75rem;
    flex-wrap: wrap; margin-bottom: 1.1rem;
}

.table-search-box {
    display: flex; align-items: center; gap: 0.45rem;
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    border-radius: var(--r-md); padding: 0 0.75rem;
    height: 38px; min-width: 240px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.table-search-box:focus-within {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--gold-glow-sm);
}
.table-search-box input {
    background: transparent; border: none; outline: none;
    font-size: 0.82rem; color: var(--text-primary); flex: 1;
    font-family: inherit;
}
.table-search-box input::placeholder { color: var(--text-muted); }
.table-search-box i { color: var(--text-muted); font-size: 0.8rem; }

.filter-select {
    height: 38px; padding: 0 0.85rem;
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    border-radius: var(--r-md); color: var(--text-primary);
    font-size: 0.82rem; cursor: pointer;
    transition: border-color var(--t-fast);
    outline: none; font-family: inherit;
}
.filter-select:focus { border-color: var(--gold-500); }

.table-wrap {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}
.admin-table { width: 100%; border-collapse: collapse; }

.admin-table thead tr {
    background: var(--bg-surface);
    border-bottom: 1.5px solid var(--glass-border);
}
.admin-table th {
    padding: 0.85rem 1rem; text-align: right;
    font-size: 0.73rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); white-space: nowrap;
}
.admin-table th i {
    margin-left: 0.3rem; color: var(--gold-500); font-size: 0.7rem;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--t-fast);
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--gold-dim); }

.admin-table td {
    padding: 0.9rem 1rem;
    font-size: 0.845rem; color: var(--text-secondary);
    vertical-align: middle;
}
.admin-table td strong {
    color: var(--text-primary); font-weight: 700;
}

/* ── Table Empty State ── */
.empty-state-cell {
    text-align: center; padding: 3.5rem 1rem;
    color: var(--text-muted); font-size: 0.88rem;
}
.empty-state-cell i {
    display: block; font-size: 2.5rem; margin-bottom: 1rem;
    opacity: 0.3;
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-8px); }
}

/* ── Pagination ── */
.table-pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.78rem; color: var(--text-muted);
    background: var(--bg-surface);
}
.pagination-btns { display: flex; gap: 0.35rem; }
.pagination-btn {
    width: 32px; height: 32px; border-radius: var(--r-sm);
    background: var(--bg-card); border: 1px solid var(--glass-border);
    color: var(--text-secondary); font-size: 0.78rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-fast);
}
.pagination-btn:hover {
    border-color: var(--gold-500); color: var(--gold-600);
    background: var(--gold-dim);
}
.pagination-btn.active {
    background: var(--grad-gold);
    border-color: var(--gold-500);
    color: #fff;
    box-shadow: var(--shadow-gold);
}
body.dark-mode .pagination-btn:hover { color: var(--gold-400); }

/* ──────────────────────────────────────────────────────────────────────
   §24. ACTION BUTTONS (دکمه‌های عملیات در جدول)
   ────────────────────────────────────────────────────────────────────── */
.action-buttons {
    display: flex; align-items: center; gap: 0.35rem;
}

/* ──────────────────────────────────────────────────────────────────────
   §25. TABS (تب‌های داخلی صفحات)
   ────────────────────────────────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.35rem;
    padding: 0 2.25rem;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
    padding: 0.75rem 1.25rem;
    background: transparent; border: none;
    color: var(--text-tertiary);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; position: relative;
    transition: color var(--t-fast);
    white-space: nowrap;
    display: flex; align-items: center; gap: 0.45rem;
}
.admin-tab:hover { color: var(--gold-600); }
body.dark-mode .admin-tab:hover { color: var(--gold-400); }

.admin-tab.active { color: var(--gold-600); font-weight: 700; }
body.dark-mode .admin-tab.active { color: var(--gold-400); }

.admin-tab.active::after {
    content: ''; position: absolute;
    bottom: -1px; left: 0; right: 0; height: 2px;
    background: var(--grad-gold);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 8px var(--gold-glow);
}
.admin-tab i { font-size: 0.85rem; }

.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: fadeUp 0.3s var(--ease-smooth);
}

/* ──────────────────────────────────────────────────────────────────────
   §26. CATEGORY / ICON / COLOR PICKERS (انتخابگرها)
   ────────────────────────────────────────────────────────────────────── */
/* Color picker row */
.color-row {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.color-option {
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
    position: relative;
}
.color-option:hover { transform: scale(1.15); }
.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px currentColor;
}
.color-option.selected::after {
    content: '✓'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.75rem; font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Icon picker */
.icon-picker {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    max-height: 160px; overflow-y: auto;
    padding: 0.5rem; background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
}
.icon-option {
    width: 38px; height: 38px; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    color: var(--text-tertiary); font-size: 1rem; cursor: pointer;
    transition: all var(--t-fast);
}
.icon-option:hover {
    background: var(--gold-dim); border-color: var(--gold-500);
    color: var(--gold-600); transform: scale(1.08);
}
.icon-option.selected {
    background: var(--gold-dim); border-color: var(--gold-border);
    color: var(--gold-600);
    box-shadow: 0 0 0 2px var(--gold-glow-sm);
}
body.dark-mode .icon-option.selected,
body.dark-mode .icon-option:hover { color: var(--gold-400); }

.category-icon-preview {
    width: 36px; height: 36px; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────────────
   §27. CHAPTER HIERARCHY / TREE (درخت فصل‌ها و دسته‌بندی‌ها)
   ────────────────────────────────────────────────────────────────────── */
.chapter-tree-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--r-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    margin-bottom: 0.45rem;
    transition: all var(--t-fast);
}
.chapter-tree-item:hover {
    border-color: var(--gold-border);
    background: var(--gold-dim);
    transform: translateX(-2px);
}
.chapter-tree-item.sub { margin-right: 1.5rem; }

.chapter-drag-handle {
    color: var(--text-muted); cursor: grab;
    font-size: 0.9rem; transition: color var(--t-fast);
}
.chapter-drag-handle:hover { color: var(--gold-500); }
.chapter-drag-handle:active { cursor: grabbing; }

.chapter-tree-item .chapter-num {
    font-size: 0.72rem; font-weight: 800;
    padding: 0.18rem 0.6rem;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    border-radius: var(--r-full);
    color: var(--gold-600); flex-shrink: 0;
}
body.dark-mode .chapter-tree-item .chapter-num { color: var(--gold-400); }

.chapter-tree-item .chapter-title {
    flex: 1; font-size: 0.85rem; font-weight: 600;
    color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────────────────
   §28. NOTES SECTION (یادداشت‌های داخل فرم)
   ────────────────────────────────────────────────────────────────────── */
.notes-container {
    display: flex; flex-direction: column; gap: 0.65rem;
    margin-top: 0.75rem;
}
.note-item {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-right: 3px solid var(--gold-500);
    border-radius: var(--r-md); padding: 1rem;
    animation: fadeUp 0.3s var(--ease-smooth) both;
    transition: all var(--t-fast);
}
.note-item:hover {
    border-right-color: var(--gold-600);
    box-shadow: var(--shadow-sm);
}
.note-item-header {
    display: flex; align-items: center; gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.btn-add-note {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--text-tertiary);
    cursor: pointer;
    background: var(--bg-surface);
    border: 1px dashed var(--glass-border);
    border-radius: var(--r-md);
    padding: 0.55rem 1rem;
    transition: all var(--t-fast);
    margin-top: 0.65rem;
    font-family: inherit;
}
.btn-add-note:hover {
    border-color: var(--gold-500); color: var(--gold-600);
    background: var(--gold-dim); border-style: solid;
}
body.dark-mode .btn-add-note:hover { color: var(--gold-400); }

/* ──────────────────────────────────────────────────────────────────────
   §29. SEARCH RESULTS (نتایج جستجوی پیشرفته)
   ────────────────────────────────────────────────────────────────────── */
.search-results-container {
    padding: 1.5rem 2.25rem;
}
.search-results-info {
    font-size: 0.82rem; color: var(--text-muted);
    margin-bottom: 1rem; display: flex;
    align-items: center; gap: 0.5rem;
}
.search-results-info i { color: var(--c-success); }

.search-result-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    cursor: pointer;
}
.search-result-item:hover {
    border-color: var(--gold-border);
    box-shadow: var(--shadow-md);
    transform: translateX(-3px);
}

.search-result-header {
    display: flex; align-items: center; gap: 0.65rem;
    margin-bottom: 0.5rem; flex-wrap: wrap;
}
.search-result-badge {
    font-size: 0.7rem; font-weight: 800;
    padding: 0.18rem 0.65rem;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    border-radius: var(--r-full);
    color: var(--gold-600);
}
body.dark-mode .search-result-badge { color: var(--gold-400); }

.search-result-path {
    font-size: 0.75rem; color: var(--text-muted);
}
.search-result-content {
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.65;
}
.search-result-content mark {
    background: rgba(245, 158, 11, 0.2);
    border-radius: 3px; padding: 0 3px;
    color: var(--text-primary);
    box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.35);
}

/* ──────────────────────────────────────────────────────────────────────
   §30. IMPORT / EXPORT DROP ZONE (ناحیه آپلود فایل)
   ────────────────────────────────────────────────────────────────────── */
.import-drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--r-lg);
    padding: 2.5rem; text-align: center;
    cursor: pointer;
    transition: all var(--t-mid);
    background: var(--bg-surface);
}
.import-drop-zone:hover,
.import-drop-zone.drag-over {
    border-color: var(--gold-500);
    background: var(--gold-dim);
    transform: scale(1.01);
}
.import-drop-zone i {
    font-size: 2.5rem; color: var(--text-muted);
    margin-bottom: 0.85rem; display: block;
    transition: transform var(--t-mid);
}
.import-drop-zone:hover i {
    transform: translateY(-5px);
    color: var(--gold-500);
}
.import-drop-zone p {
    color: var(--text-secondary);
    font-size: 0.88rem; font-weight: 600;
}
.import-drop-zone span {
    color: var(--text-muted);
    font-size: 0.78rem;
    display: block; margin-top: 0.35rem;
}

/* ──────────────────────────────────────────────────────────────────────
   §31. QUICK ACTIONS GRID (کارت‌های دسترسی سریع داشبورد)
   ────────────────────────────────────────────────────────────────────── */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2.25rem;
}
.action-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all var(--t-mid);
    position: relative; overflow: hidden;
    text-decoration: none;
}
.action-card::after {
    content: ''; position: absolute;
    top: 0; right: -100%; bottom: 0; width: 50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: right 0.6s var(--ease-smooth);
    pointer-events: none;
}
.action-card:hover::after { right: 150%; }

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-border);
}
.action-icon {
    width: 48px; height: 48px;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
    background: var(--gold-dim); color: var(--gold-600);
    border: 1px solid var(--gold-border);
    transition: all var(--t-mid);
}
.action-card:hover .action-icon {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 4px 12px var(--gold-glow-sm);
}

.action-text { flex: 1; min-width: 0; }
.action-text h4 {
    font-size: 0.92rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 0.2rem;
}
.action-text p {
    font-size: 0.76rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.action-arrow {
    color: var(--text-muted);
    font-size: 0.82rem; flex-shrink: 0;
    transition: all var(--t-fast);
}
.action-card:hover .action-arrow {
    color: var(--gold-500);
    transform: translateX(-4px);
}

/* ──────────────────────────────────────────────────────────────────────
   §32. ACTIVITY FEED (فعالیت‌های اخیر داشبورد)
   ────────────────────────────────────────────────────────────────────── */
.activity-feed {
    display: flex; flex-direction: column;
    max-height: 400px; overflow-y: auto;
}
.activity-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--t-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--gold-dim); border-radius: var(--r-sm); }

.activity-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-600); font-size: 0.78rem;
    flex-shrink: 0;
}
body.dark-mode .activity-dot { color: var(--gold-400); }

.activity-content { flex: 1; min-width: 0; }
.activity-title {
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 0.25rem;
}
.activity-meta {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.7rem; color: var(--text-muted);
    flex-wrap: wrap;
}
.activity-badge {
    padding: 0.1rem 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full);
    font-weight: 600;
}

/* ──────────────────────────────────────────────────────────────────────
   §33. SUMMARY ROWS (ردیف‌های خلاصه در مودال‌ها)
   ────────────────────────────────────────────────────────────────────── */
.summary-row {
    display: flex; align-items: baseline; gap: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
    color: var(--text-muted);
    min-width: 110px; font-weight: 600;
}
.summary-value {
    color: var(--text-primary); font-weight: 700;
    flex: 1;
}

/* ──────────────────────────────────────────────────────────────────────
   §34. IFRAME DYNAMIC CONTENT WRAPPER
   ────────────────────────────────────────────────────────────────────── */
.iframe-content-wrap {
    padding: 0;
    min-height: calc(100vh - var(--header-h));
    background: var(--bg-page);
}

/* کلاس‌های کمکی برای صفحات داخلی Iframe */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-wrapper {
    animation: pageIn 0.35s var(--ease-smooth) both;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────────────
   §35. EMPTY STATE (حالت خالی عمومی)
   ────────────────────────────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 4.5rem 2rem; text-align: center;
    color: var(--text-muted);
    grid-column: 1 / -1;
}
.empty-state i {
    font-size: 3rem; margin-bottom: 1.1rem;
    opacity: 0.35;
    animation: floatIcon 3s ease-in-out infinite;
}
.empty-state h3 {
    font-size: 1.1rem; color: var(--text-tertiary);
    margin-bottom: 0.4rem; font-weight: 700;
}
.empty-state p {
    font-size: 0.85rem; color: var(--text-muted);
    max-width: 400px; line-height: 1.7;
}
.empty-state .btn-primary { margin-top: 1.25rem; }

/* ──────────────────────────────────────────────────────────────────────
   §36. PROGRESS BARS (نوارهای پیشرفت)
   ────────────────────────────────────────────────────────────────────── */
.progress-list {
    display: flex; flex-direction: column; gap: 0.75rem;
}
.progress-item {
    display: flex; align-items: center; gap: 0.85rem;
}
.progress-item .law-name {
    flex: 1; font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
}
.progress-bar-container {
    width: 120px; height: 5px;
    background: var(--glass-border);
    border-radius: var(--r-full);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--grad-gold);
    border-radius: var(--r-full);
    box-shadow: 0 0 8px var(--gold-glow-sm);
    transition: width 0.6s var(--ease-smooth);
}
.progress-item .percent {
    min-width: 40px; text-align: left;
    font-size: 0.76rem; font-weight: 700;
    color: var(--gold-600);
}
body.dark-mode .progress-item .percent { color: var(--gold-400); }

/* ═══════════════════════════════════════════════════════════════════════
   ADMIN PANEL - FINAL POLISH & UTILITIES (Part 4/4)
   ✅ انیمیشن‌های پیشرفته و میکرواینتراکشن‌ها
   ✅ کلاس‌های کمکی (Utility Classes)
   ✅ ریسپانسیو کامل (موبایل، تبلت، دسکتاپ)
   ✅ Accessibility و Print Styles
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   §37. ADVANCED ANIMATIONS & MICRO-INTERACTIONS
   ────────────────────────────────────────────────────────────────────── */
/* ── Ripple Effect (نیاز به کلاس .ripple داره که تو JS ساخته میشه) ── */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 100%);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}
@keyframes rippleAnim {
    to { transform: scale(2.5); opacity: 0; }
}

/* ── Glow Pulse روی آیتم فعال سایدبار ── */
.menu-item.active {
    animation: sidebarGlow 3s ease-in-out infinite;
}
@keyframes sidebarGlow {
    0%, 100% { box-shadow: none; }
    50%      { box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.08); }
}

/* ── Stagger Fade-in برای آیتم‌های سایدبار ── */
.sidebar-nav .menu-item:nth-child(1)  { animation: navItemIn 0.3s 0.05s both; }
.sidebar-nav .menu-item:nth-child(2)  { animation: navItemIn 0.3s 0.10s both; }
.sidebar-nav .menu-item:nth-child(3)  { animation: navItemIn 0.3s 0.15s both; }
.sidebar-nav .menu-item:nth-child(4)  { animation: navItemIn 0.3s 0.20s both; }
.sidebar-nav .menu-item:nth-child(5)  { animation: navItemIn 0.3s 0.25s both; }
.sidebar-nav .menu-item:nth-child(6)  { animation: navItemIn 0.3s 0.30s both; }
.sidebar-nav .menu-item:nth-child(7)  { animation: navItemIn 0.3s 0.35s both; }
.sidebar-nav .menu-item:nth-child(8)  { animation: navItemIn 0.3s 0.40s both; }
@keyframes navItemIn {
    from { opacity: 0; transform: translateX(15px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Bounce روی آیکون‌های کارت‌ها هنگام هاور ── */
.stat-card:hover .stat-icon,
.action-card:hover .action-icon {
    animation: iconBounce 0.5s var(--ease-spring);
}
@keyframes iconBounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25) rotate(5deg); }
    70%  { transform: scale(0.95) rotate(-3deg); }
    100% { transform: scale(1.08) rotate(0); }
}

/* ── Shimmer روی آیکون دسته‌بندی‌ها ── */
.action-card:hover .action-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    border-radius: inherit;
    animation: iconShimmer 0.8s var(--ease-smooth);
}
@keyframes iconShimmer {
    from { opacity: 0; transform: translateX(-100%) rotate(15deg); }
    to   { opacity: 1; transform: translateX(100%) rotate(15deg); }
}

/* ── Smooth Collapse Transition برای متن‌های سایدبار ── */
.sidebar-nav .menu-item span,
.sidebar-nav .menu-section-title {
    transition: opacity var(--t-mid), transform var(--t-mid);
    transform-origin: right;
}
.admin-sidebar.collapsed .sidebar-nav .menu-item span,
.admin-sidebar.collapsed .sidebar-nav .menu-section-title {
    opacity: 0;
    transform: scaleX(0.8);
    pointer-events: none;
}

/* ── Highlight روی کارت‌های فعال (مثل نتایج جستجو) ── */
.search-result-item.highlight {
    animation: resultHighlight 1.5s var(--ease-smooth);
}
@keyframes resultHighlight {
    0%   { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-glow-sm); }
    100% { border-color: var(--glass-border); box-shadow: none; }
}

/* ──────────────────────────────────────────────────────────────────────
   §38. UTILITY CLASSES (کلاس‌های کمکی)
   ────────────────────────────────────────────────────────────────────── */
.hidden      { display: none !important; }
.d-none      { display: none !important; }
.d-block     { display: block !important; }
.d-flex      { display: flex !important; }
.d-grid      { display: grid !important; }

.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-left   { text-align: left !important; }

.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-gold      { color: var(--gold-500) !important; }
.text-success   { color: var(--c-success) !important; }
.text-danger    { color: var(--c-danger) !important; }
.text-warning   { color: var(--c-warning) !important; }
.text-info      { color: var(--c-info) !important; }

.text-gradient-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.bg-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.bg-surface { background: var(--bg-surface) !important; }
.bg-card    { background: var(--bg-card) !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }

.rounded-sm { border-radius: var(--r-sm) !important; }
.rounded-md { border-radius: var(--r-md) !important; }
.rounded-lg { border-radius: var(--r-lg) !important; }
.rounded-xl { border-radius: var(--r-xl) !important; }
.rounded-full { border-radius: var(--r-full) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.empty-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ──────────────────────────────────────────────────────────────────────
   §39. RESPONSIVE DESIGN (ریسپانسیو کامل)
   ────────────────────────────────────────────────────────────────────── */
/* ── دسکتاپ بزرگ (1440px+) ── */
@media (min-width: 1440px) {
    :root {
        --sidebar-w: 288px;
    }
    .topbar-search { width: 260px; }
    .topbar-search:focus-within { width: 320px; }
}

/* ── تبلت و دسکتاپ کوچک (1024px - 1280px) ── */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

/* ── تبلت (768px - 1024px) ── */
@media (max-width: 1024px) {
    :root {
        --sidebar-w: 240px;
    }
    
    /* سایدبار تبدیل به Drawer میشه */
    .admin-sidebar {
        transform: translateX(100%);
        width: var(--sidebar-w) !important;
        box-shadow: none;
        transition: transform var(--t-slow) var(--ease-smooth);
    }
    .admin-sidebar.mobile-active {
        transform: translateX(0);
        box-shadow: -8px 0 40px rgba(0,0,0,0.4);
    }
    
    .admin-main { margin-right: 0 !important; }
    .mobile-menu-btn { display: flex !important; }
    
    /* مخفی کردن جستجو و ساعت در تاپ‌بار */
    .topbar-search { display: none; }
    .topbar-clock span { display: none; }
    .topbar-clock { padding: 0 0.6rem; }
    
    /* گرید آمار */
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions-grid { grid-template-columns: 1fr 1fr; }
    
    /* جداول */
    .table-section { padding: 1.25rem; }
    .section-page-header { padding: 1.5rem 1.25rem 1rem; }
    
    /* مودال‌ها */
    .modal-box.lg, .modal-box.xl { max-width: 95%; }
}

/* ── موبایل (480px - 768px) ── */
@media (max-width: 768px) {
    :root {
        --header-h: 58px;
        --sidebar-w: 280px;
    }
    
    .admin-topbar { padding: 0 1rem; gap: 0.5rem; }
    .topbar-breadcrumb { font-size: 0.8rem; }
    
    /* دراپ‌داون اعلان‌ها فول‌ویدث میشه */
    .notif-dropdown { 
        width: calc(100vw - 2rem); 
        left: auto; 
        right: -1rem; 
    }
    
    /* توست‌ها */
    #toastContainer { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { min-width: unset; max-width: 100%; width: 100%; }
    
    /* فرم‌ها */
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    
    /* گرید آمار و اکشن‌ها */
    .stats-grid { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: 1fr; }
    
    /* هدر صفحات */
    .section-title-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .section-actions { width: 100%; justify-content: flex-start; }
    
    /* فوتر مودال */
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer .btn-primary, 
    .modal-footer .btn-secondary { width: 100%; justify-content: center; }
    
    /* مودال تأیید */
    .confirm-modal-footer { flex-direction: column; }
    .confirm-btn { width: 100%; }
    
    /* Immersive Trigger */
    .immersive-trigger { left: 16px; width: 48px; height: 48px; font-size: 1rem; }
    .radial-menu { left: 44px; }
}

/* ── موبایل کوچک (زیر 480px) ── */
@media (max-width: 480px) {
    .topbar-icon-btn { width: 34px; height: 34px; font-size: 0.85rem; }
    .sidebar-logo-icon { width: 32px; height: 32px; }
    
    /* لاگین */
    .login-card { padding: 2rem 1.5rem; }
    .login-title { font-size: 1.3rem; }
    .login-logo { width: 60px; height: 60px; }
    .login-logo i { font-size: 1.5rem; }
}

/* ──────────────────────────────────────────────────────────────────────
   §40. ACCESSIBILITY & REDUCED MOTION
   ────────────────────────────────────────────────────────────────────── */
/* غیرفعال کردن انیمیشن‌ها برای کاربرانی که Reduced Motion رو فعال کردن */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-orb { animation: none !important; }
    .grid-pattern { mask-image: none; }
}

/* فوکوس واضح برای کیبورد (Accessibility) */
:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* ──────────────────────────────────────────────────────────────────────
   §41. PRINT STYLES (استایل‌های پرینت)
   ────────────────────────────────────────────────────────────────────── */
@media print {
    /* مخفی کردن المان‌های غیرضروری */
    .animated-bg, .noise-overlay, .admin-sidebar, .admin-topbar,
    .mobile-menu-btn, .immersive-trigger, .radial-menu, .immersive-overlay,
    #toastContainer, .modal-overlay, #globalLoader, .sidebar-overlay {
        display: none !important;
    }
    
    /* تنظیمات پایه پرینت */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }
    
    .admin-main {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .admin-iframe-wrap {
        background: #fff !important;
    }
    
    #dynamic-content {
        min-height: auto !important;
        height: auto !important;
    }
    
    /* جلوگیری از برش کارت‌ها و جداول */
    .stat-card, .dash-card, .table-wrap, .search-result-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    /* لینک‌ها */
    a { text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
}


/* ═══════════════════════════════════════════════════════════════════════
   🎉 END OF ADMIN PANEL MASTER STYLESHEET
   ✅ Total Parts: 4/4
   ✅ Design System: Navy + Gold + Glassmorphism
   ✅ Status: COMPLETE & PRODUCTION-READY
   ═══════════════════════════════════════════════════════════════════════ */
   
   /* ═══════════════════════════════════════════════════════════════════════
   PATCH v1.0 – رفع مشکلات گزارش شده
   ✅ Toast Notifications (جا افتاده بود)
   ✅ Sidebar & Topbar Compatibility (هماهنگی با HTML)
   ✅ Dark Mode Complete (تم تاریک کامل)
   ✅ Animations & Effects
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-1. TOAST NOTIFICATIONS (کامل)
   ────────────────────────────────────────────────────────────────────── */
#toastContainer {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--r-lg, 16px);
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.12));
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.toast.out {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-20px); }
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary, #1e293b);
}

.toast-close {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted, #94a3b8);
    font-size: 0.8rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.15s;
}

.toast-close:hover {
    color: var(--text-primary, #1e293b);
}

/* رنگ‌بندی توست‌ها */
.toast.success {
    border-right: 3px solid var(--c-success, #10b981);
}
.toast.success .toast-icon {
    color: var(--c-success, #10b981);
}

.toast.error {
    border-right: 3px solid var(--c-danger, #ef4444);
}
.toast.error .toast-icon {
    color: var(--c-danger, #ef4444);
}

.toast.warning {
    border-right: 3px solid var(--c-warning, #f59e0b);
}
.toast.warning .toast-icon {
    color: var(--c-warning, #f59e0b);
}

.toast.info {
    border-right: 3px solid var(--gold-500, #f59e0b);
}
.toast.info .toast-icon {
    color: var(--gold-500, #f59e0b);
}

/* دارک مود توست */
body.dark-mode .toast {
    background: var(--bg-card, rgba(26, 34, 53, 0.95));
    border-color: var(--glass-border, rgba(255,255,255,0.06));
}

/* ریسپانسیو توست */
@media (max-width: 768px) {
    #toastContainer {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .toast {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-2. SIDEBAR COMPATIBILITY (هماهنگی با HTML فعلی)
   ────────────────────────────────────────────────────────────────────── */
/* اگر HTML از کلاس .sidebar استفاده می‌کنه (نه .admin-sidebar) */
.sidebar {
    position: fixed;
    top: var(--header-h, 64px);
    right: 0;
    bottom: 0;
    width: var(--sidebar-w, 268px);
    z-index: 150;
    background: var(--navy-800, #111827);
    border-left: 1px solid rgba(255,255,255,0.05);
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .sidebar {
    background: #070a13;
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
}

/* هدر سایدبار */
.sidebar-header {
    padding: 0 1rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a2235, #1e2d45);
    border: 1px solid rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.logo-icon i {
    color: #f59e0b;
    font-size: 0.95rem;
}

.logo-text {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.25s;
}

.logo-text h2 {
    font-family: 'Cinzel', 'Vazirmatn', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 0.6rem;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* دکمه جمع کردن سایدبار */
.sidebar-collapse {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.sidebar-collapse:hover {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.sidebar-collapse i {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ناوبری سایدبار */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.menu-section {
    margin-bottom: 0.5rem;
}

.menu-section-title {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.6rem 0.75rem 0.4rem;
    white-space: nowrap;
    transition: opacity 0.25s;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 2px;
    text-decoration: none;
}

.menu-item i {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.menu-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
}

.menu-item:hover i {
    color: #fbbf24;
    transform: scale(1.1);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.05) 100%);
    color: #fbbf24;
    border-color: rgba(245,158,11,0.2);
}

.menu-item.active i {
    color: #fbbf24;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%);
    border-radius: 3px 0 0 3px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.menu-badge {
    margin-right: auto;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    flex-shrink: 0;
    transition: opacity 0.25s;
}

.menu-badge.new {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border-color: rgba(16,185,129,0.3);
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 0.5rem 0.75rem;
}

/* فوتر سایدبار */
.sidebar-footer {
    padding: 0.75rem 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.15s;
}

.user-info-sidebar:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e2d45, #263350);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 0.85rem;
    color: #fbbf24;
}

.user-details {
    overflow: hidden;
    transition: opacity 0.25s;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.65rem;
    color: #fbbf24;
    letter-spacing: 0.5px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    color: #f87171;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    transform: translateY(-1px);
}

.btn-logout i {
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
}

/* حالت جمع شده سایدبار */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .menu-item span:not(.menu-badge),
.sidebar.collapsed .menu-badge,
.sidebar.collapsed .user-details,
.sidebar.collapsed .btn-logout span {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.65rem;
}

.sidebar.collapsed .menu-item i {
    width: auto;
}

.sidebar.collapsed .sidebar-collapse i {
    transform: rotate(180deg);
}

/* تولتیپ در حالت جمع شده */
.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a2235;
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 300;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    pointer-events: none;
    animation: tooltipFade 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translateY(-50%) translateX(8px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-3. MAIN CONTENT & TOPBAR COMPATIBILITY
   ────────────────────────────────────────────────────────────────────── */
/* اگر HTML از کلاس .main-content استفاده می‌کنه (نه .admin-main) */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-w, 268px);
    min-width: 0;
    min-height: calc(100vh - var(--header-h, 64px));
    display: flex;
    flex-direction: column;
    transition: margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar.collapsed ~ .main-content {
    margin-right: 72px;
}

/* اگر HTML از کلاس .content-header استفاده می‌کنه (نه .admin-topbar) */
.content-header {
    position: sticky;
    top: 0;
    height: var(--header-h, 64px);
    background: var(--bg-glass, rgba(255, 255, 255, 0.82));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
    z-index: 100;
    flex-shrink: 0;
    transition: background 0.4s, border-color 0.25s;
}

body.dark-mode .content-header {
    background: rgba(11, 15, 30, 0.85);
    border-bottom-color: rgba(255,255,255,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    color: #475569;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.mobile-menu-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
    min-width: 0;
}

.breadcrumb i {
    color: #f59e0b;
    font-size: 0.8rem;
}

.breadcrumb-sep {
    opacity: 0.4;
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: var(--text-primary, #1e293b);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    border-radius: 9999px;
    padding: 0 1rem;
    height: 38px;
    transition: all 0.15s;
    width: 220px;
}

.header-search:focus-within {
    border-color: #f59e0b;
    background: var(--bg-surface, #ffffff);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    width: 280px;
}

.header-search i {
    color: #94a3b8;
    font-size: 0.8rem;
}

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-primary, #1e293b);
    font-size: 0.82rem;
    font-family: inherit;
}

.header-search input::placeholder {
    color: #94a3b8;
}

body.dark-mode .header-search {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.header-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #475569;
    padding: 0 0.8rem;
    height: 38px;
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    border-radius: 9999px;
}

.header-time i {
    color: #f59e0b;
    font-size: 0.75rem;
}

body.dark-mode .header-time {
    background: rgba(255,255,255,0.05);
}

.header-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s;
}

.header-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

body.dark-mode .header-btn:hover {
    color: #fbbf24;
}

/* بج اعلان */
.badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 9999px;
    border: 2px solid var(--bg-surface, #ffffff);
    display: none;
    align-items: center;
    justify-content: center;
    animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.badge.active {
    display: flex;
}

@keyframes badgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-4. NOTIFICATIONS DROPDOWN
   ────────────────────────────────────────────────────────────────────── */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 360px;
    background: var(--bg-card, rgba(255,255,255,0.95));
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 500;
    animation: dropIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    display: none;
}

.notif-dropdown.active {
    display: block;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-header h3 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-header h3 i {
    color: #f59e0b;
}

.notif-mark-read {
    font-size: 0.72rem;
    color: #d97706;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    font-weight: 600;
    transition: all 0.15s;
}

.notif-mark-read:hover {
    background: #f59e0b;
    color: #0b0f1e;
    border-color: #f59e0b;
}

body.dark-mode .notif-mark-read {
    color: #fbbf24;
}

.notif-list {
    max-height: 340px;
    overflow-y: auto;
}

.notif-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.notif-empty i {
    font-size: 2rem;
    opacity: 0.3;
}

.notif-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    transition: background 0.15s;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: rgba(0,0,0,0.02);
}

.notif-item.unread {
    background: rgba(245, 158, 11, 0.08);
    border-right: 3px solid #f59e0b;
}

body.dark-mode .notif-item:hover {
    background: rgba(255,255,255,0.03);
}

.notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-item-icon.from-super {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.notif-item-icon.system {
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.2);
}

body.dark-mode .notif-item-icon.from-super {
    color: #fbbf24;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 0.2rem;
}

.notif-item-body {
    font-size: 0.76rem;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.notif-item-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════
FEEDBACK SYSTEM STYLES
═══════════════════════════════════════════════════════════════ */

/* Feedback tab content */
.feedback-tab-content {
    animation: fadeUp 0.3s var(--ease-out);
}

/* Feedback item hover effect */
.feedback-item:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    #section-feedback .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    #section-feedback .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-5. DARK MODE COMPLETE (تم تاریک کامل)
   ────────────────────────────────────────────────────────────────────── */
body.dark-mode {
    --bg-page: #0b0f1e;
    --bg-surface: #111827;
    --bg-glass: rgba(17, 24, 39, 0.85);
    --bg-card: rgba(26, 34, 53, 0.95);
    --glass-border: rgba(255, 255, 255, 0.06);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
    --shadow-md: 0 6px 20px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.6);
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-6. RIPPLE EFFECT
   ────────────────────────────────────────────────────────────────────── */
@keyframes rippleAnimation {
    from { transform: scale(0); opacity: 0.5; }
    to   { transform: scale(2.5); opacity: 0; }
}

/* ──────────────────────────────────────────────────────────────────────
   §PATCH-7. RESPONSIVE (ریسپانسیو)
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
        width: var(--sidebar-w, 268px) !important;
        box-shadow: none;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
        box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-search {
        display: none;
    }
    
    .header-time span {
        display: none;
    }
    
    .header-time {
        padding: 0 0.6rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 58px;
    }
    
    .content-header {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .notif-dropdown {
        width: calc(100vw - 2rem);
        left: auto;
        right: -1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   END OF PATCH v1.0
   ═══════════════════════════════════════════════════════════════════════ */