/* ============================================================
   p.mathi.ir — style.css
   نسخه ۳.۴ — رفع کامل باگ نوار موبایل + همبرگر تمیز
   ============================================================ */

/* ============================================================
   1) TOKENS
   ============================================================ */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-hover: #f4f5fa;
    --surface-active: #eef0f7;
    --surface-subtle: #fafbfd;

    --text: #14171f;
    --text-secondary: #4a5260;
    --text-muted: #98a0b0;

    --border: #ebeef5;
    --border-strong: #d8dce8;

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #a5b4fc;
    --accent-soft: #eef1fe;
    --accent-rgb: 99, 102, 241;
    --accent-glow: 0 0 0 4px rgba(99,102,241,0.18);
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --danger: #ef4444;   --danger-soft: #fef2f2;   --danger-rgb: 239,68,68;
    --success: #10b981;  --success-soft: #ecfdf5;  --success-rgb: 16,185,129;
    --warn: #f59e0b;     --warn-soft: #fffaf0;     --warn-rgb: 245,158,11;
    --info: #3b82f6;     --info-soft: #eff6ff;     --info-rgb: 59,130,246;

    --shadow-xs: 0 1px 2px rgba(20,23,31,0.04);
    --shadow-sm: 0 2px 6px rgba(20,23,31,0.05);
    --shadow-md: 0 6px 20px rgba(20,23,31,0.07);
    --shadow-lg: 0 14px 40px rgba(20,23,31,0.10);
    --shadow-accent: 0 6px 20px rgba(99,102,241,0.24);

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
    --spring: cubic-bezier(0.34,1.56,0.64,1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --dur-fast: 0.15s;
    --dur-base: 0.22s;
    --dur-entrance: 0.35s;
}

[data-theme="dark"] {
    --bg: #0c0f16;
    --surface: #151a24;
    --surface-hover: #1f2632;
    --surface-active: #262e3d;
    --surface-subtle: #101827;

    --text: #f1f3f9;
    --text-secondary: #a1a9b8;
    --text-muted: #6c7686;

    --border: #232b3a;
    --border-strong: #313b4d;

    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-light: #c7d2fe;
    --accent-soft: rgba(129,140,248,0.12);
    --accent-rgb: 129, 140, 248;
    --accent-glow: 0 0 0 4px rgba(129,140,248,0.22);

    --danger: #f87171; --danger-soft: rgba(248,113,113,0.12);
    --success: #34d399; --success-soft: rgba(52,211,153,0.12);
    --warn: #fbbf24; --warn-soft: rgba(251,191,36,0.12);
    --info: #60a5fa; --info-soft: rgba(96,165,250,0.12);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.35);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.4);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.5);
    --shadow-lg: 0 14px 40px rgba(0,0,0,0.6);
    --shadow-accent: 0 6px 20px rgba(129,140,248,0.3);
}

/* ============================================================
   2) RESET + BASE (Sticky Footer)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 12% -10%, rgba(var(--accent-rgb),0.10), transparent 50%),
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(var(--accent-rgb),0.06), transparent 55%),
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(var(--accent-rgb),0.04), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    padding: 24px 20px;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb),0.25);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb),0.45); background-clip: content-box; }

/* ============================================================
   3) TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.5rem, 3vw, 1.95rem); margin: 0 0 10px; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); margin: 8px 0 16px; }
h3 { font-size: 1.08rem; margin: 0 0 14px; font-weight: 600; }
h4 { font-size: 0.96rem; font-weight: 600; }
.muted { color: var(--text-secondary); font-size: 0.88rem; }
h1 .bi, h2 .bi, h3 .bi { color: var(--accent); margin-left: 6px; }

.bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.icon-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform var(--dur-base) var(--spring);
}
.icon-block.sm { width: 40px; height: 40px; font-size: 1.15rem; border-radius: var(--radius-sm); }
.icon-block.xl { width: 64px; height: 64px; font-size: 1.9rem; border-radius: var(--radius-lg); }

/* ============================================================
   4) CARDS
   ============================================================ */
.card, .admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out);
    animation: fadeInUp var(--dur-entrance) var(--ease-out) both;
}
.card:hover, .admin-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}
.admin-card > h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    min-height: 36px;
}
.admin-card > h3 > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}
.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}
.card-badge.success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

/* ============================================================
   5) BUTTONS
   ============================================================ */
button, .btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--gradient-main);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    min-height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                filter var(--dur-fast);
    box-shadow: var(--shadow-accent);
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
button .bi, .btn .bi { font-size: 1.05em; }

button::after, .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    pointer-events: none;
}
button:active::after, .btn:active::after {
    opacity: 1;
    transform: scale(2);
    transition: transform 0s, opacity 0s;
}

button:hover, .btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent), 0 12px 32px rgba(var(--accent-rgb),0.45);
    filter: brightness(1.05);
}
button:active, .btn:active { transform: translateY(0) scale(0.97); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; box-shadow: none; }

.btn-circle,
button.btn-circle,
.btn-icon,
button.btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
    gap: 0;
}
.btn-circle .bi,
.btn-icon .bi { font-size: 1rem; margin: 0; transition: transform var(--dur-base) var(--ease-out); }
.btn-circle:hover .bi,
.btn-icon:hover .bi { transform: scale(1.15); }

.btn-circle.sm,
.btn-icon.sm,
.btn-sm.btn-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
}
.btn-circle.sm .bi,
.btn-icon.sm .bi { font-size: 0.85rem; }

.btn-circle.lg,
.btn-icon.lg {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
}
.btn-circle.lg .bi { font-size: 1.15rem; }

.btn-circle.gray,
.btn-icon.gray {
    background: var(--surface-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-circle.gray:hover,
.btn-icon.gray:hover {
    background: var(--surface-active);
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    filter: none;
}
.btn-circle.red,
.btn-icon.red {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid transparent;
    box-shadow: none;
}
.btn-circle.red:hover,
.btn-icon.red:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 8px 24px rgba(239,68,68,0.4);
    filter: none;
}
.btn-circle.green,
.btn-icon.green {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid transparent;
    box-shadow: none;
}
.btn-circle.green:hover,
.btn-icon.green:hover {
    background: var(--success);
    color: #fff;
    filter: none;
}

td button:has(> .bi:only-child),
td a:has(> .bi:only-child),
.item-actions button,
.item-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    line-height: 1;
    box-sizing: border-box;
}

.btn-gray {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-gray:hover {
    background: var(--surface-active);
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-red { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; }
.btn-red:hover { box-shadow: 0 10px 30px rgba(239,68,68,0.4); color: #fff; }
.btn-green { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.btn-green:hover { box-shadow: 0 10px 30px rgba(16,185,129,0.4); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; min-height: 34px; height: 34px; border-radius: var(--radius-sm); }

/* ============================================================
   6) FORMS — ★ FIX: background-color برای حفظ فلش select
   ============================================================ */
input, select, textarea {
    background-color: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 6px 0;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: right;
    box-sizing: border-box;
    transition: border-color var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                background-color var(--dur-base);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--accent-glow);
    background-color: var(--surface);
}
textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: var(--text-muted); transition: opacity var(--dur-base); }
input:focus::placeholder, textarea:focus::placeholder { opacity: 0.5; }

/* SELECT — فلش سفارشی در همه states */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 38px;
    padding-right: 14px;
    cursor: pointer;

    background-color: var(--surface);
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a0b0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 15px;
}
select:hover { border-color: var(--border-strong); }
select:focus,
select:focus-visible,
select:active {
    border-color: var(--accent);
    box-shadow: var(--accent-glow);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a0b0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 15px;
}
[data-theme="dark"] select,
[data-theme="dark"] select:hover,
[data-theme="dark"] select:focus,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] select:active {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c7686' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text);
}
label .bi { color: var(--accent); margin-left: 4px; }

input[type="color"] {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    max-width: 52px !important;
    padding: 3px !important;
    margin: 0 !important;
    border: 2px solid var(--border) !important;
    border-radius: 50% !important;
    cursor: pointer;
    background-color: var(--surface) !important;
    overflow: hidden;
    transition: transform var(--dur-base) var(--spring);
}
input[type="color"]:hover { transform: scale(1.08); }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }

.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-field label .req { color: var(--danger); }
.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--surface);
    font-family: inherit;
    font-size: 14px;
    margin: 0;
    color: var(--text);
    box-sizing: border-box;
}
.form-field .title-input { font-size: 17px; font-weight: 700; padding: 14px 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color var(--dur-base), color var(--dur-base);
}
.pin-toggle:hover { border-color: var(--warn); color: var(--warn); }
.pin-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--warn);
}

/* ============================================================
   7) ALERTS
   ============================================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 17px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    border-right: 4px solid;
    background: var(--surface);
    animation: slideInRight 0.35s var(--ease-out) both;
}
.alert .bi { font-size: 1.15em; flex-shrink: 0; }
.alert-success { color: var(--success); border-right-color: var(--success); background: linear-gradient(90deg, var(--success-soft), var(--surface)); }
.alert-error { color: var(--danger); border-right-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), var(--surface)); }
.alert-info { color: var(--info); border-right-color: var(--info); background: linear-gradient(90deg, var(--info-soft), var(--surface)); }
.alert-warn { color: var(--warn); border-right-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), var(--surface)); }

/* ============================================================
   8) BADGES
   ============================================================ */
.ui-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}
.ui-badge.default { background: var(--accent-soft); color: var(--accent); }
.ui-badge.success { background: var(--success-soft); color: var(--success); }
.ui-badge.warn { background: var(--warn-soft); color: var(--warn); }
.ui-badge.danger {
    background: var(--danger-soft);
    color: var(--danger);
    animation: subtlePulse 2.5s ease-in-out infinite;
}
.ui-badge.info { background: var(--info-soft); color: var(--info); }

@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* ============================================================
   9) TABLES
   ============================================================ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 14px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}
th {
    background: var(--surface-hover);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 14px;
    text-align: right;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 13px 14px;
    text-align: right;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: background var(--dur-fast);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-hover); }
td form { margin: 0; display: inline-flex; }

/* ============================================================
   10) NAVBAR
   ============================================================ */
.navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 12px;
    z-index: 100;
    animation: fadeInDown 0.35s var(--ease-out) both;
}
[data-theme="dark"] .navbar { background: rgba(21,26,36,0.85); }

.nav-menu { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; justify-content: center; }
.nav-user { display: flex; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; }

.navbar a {
    position: relative;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    transition: all var(--dur-base) var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.navbar a:not(.navbar-logo)::before {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 50%;
    left: 50%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: left var(--dur-base) var(--ease-out), right var(--dur-base) var(--ease-out);
}
.navbar a:not(.navbar-logo):hover::before { left: 12px; right: 12px; }
.navbar a:not(.navbar-logo):hover { color: var(--text); background: var(--surface-hover); }
.navbar a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.navbar a.active::before { left: 12px; right: 12px; }
.navbar .logout-link::before { display: none; }

.navbar .user-greeting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 5px 12px;
    background: var(--surface-hover);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    transition: border-color var(--dur-base);
}
.navbar .user-greeting:hover { border-color: var(--accent); }
.navbar .user-greeting .username { font-weight: 600; color: var(--text); }
.navbar .logout-link {
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
}
.navbar .logout-link:hover { color: var(--danger); background: var(--danger-soft); }

.role-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb),0.15);
}

/* ★ FIX: wrapper لوگو + همبرگر */
.navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

/* ★ FIX: همبرگر تمیز — مربع ۴۰×۴۰، بدون هاله/ریپل/gap اضافی */
.navbar-toggle {
    display: none;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    border-radius: var(--radius-sm) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    gap: 4px !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    -webkit-tap-highlight-color: transparent;
}
.navbar-toggle::after,
.navbar-toggle::before {
    display: none !important;
    content: none !important;
}
.navbar-toggle:hover {
    background: var(--surface-hover) !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}
.navbar-toggle:active {
    background: var(--surface-active) !important;
    transform: none !important;
    box-shadow: none !important;
}
.navbar-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 0;
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.25s;
}
.navbar-toggle.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar-toggle.open .bar:nth-child(2) { opacity: 0; }
.navbar-toggle.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   11) TABS — ★ FIX: بدون اسکرول عمودی
   ============================================================ */
.school-tabs, .content-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0 0 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    border-radius: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.school-tabs::-webkit-scrollbar,
.content-tabs::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}
.school-tabs a,
.content-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--dur-base), box-shadow var(--dur-base);
    font-family: inherit;
    box-shadow: none;
    min-height: auto;
    flex-shrink: 0;
}
.school-tabs a:hover,
.content-tabs a:hover {
    color: var(--accent);
    background: transparent;
}
.school-tabs a.active,
.content-tabs a.active {
    color: var(--accent);
    background: transparent;
    box-shadow: 0 2px 0 var(--accent);
    animation: tabBounce 0.35s var(--spring);
}
@keyframes tabBounce {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}
.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: fadeInUp 0.3s var(--ease-out) both;
}

/* ============================================================
   12) SCHOOL
   ============================================================ */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.grade-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-weight: 700;
    font-size: 1.02rem;
    text-decoration: none;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.grade-btn:nth-child(1) { animation-delay: 0.03s; }
.grade-btn:nth-child(2) { animation-delay: 0.08s; }
.grade-btn:nth-child(3) { animation-delay: 0.13s; }
.grade-btn:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--accent);
}
.grade-btn .icon-block {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
    transition: transform 0.3s var(--spring);
}
.grade-btn:hover .icon-block { transform: scale(1.15) rotate(-6deg); }
.grade-btn.g10 .icon-block { background: rgba(59,130,246,0.12); color: #3b82f6; }
.grade-btn.g11 .icon-block { background: rgba(239,68,68,0.12); color: #ef4444; }
.grade-btn.g12 .icon-block { background: rgba(245,158,11,0.12); color: #f59e0b; }

.lesson-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.lesson-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    min-height: 48px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.lesson-chip:nth-child(1) { animation-delay: 0.02s; }
.lesson-chip:nth-child(2) { animation-delay: 0.04s; }
.lesson-chip:nth-child(3) { animation-delay: 0.06s; }
.lesson-chip:nth-child(4) { animation-delay: 0.08s; }
.lesson-chip:nth-child(5) { animation-delay: 0.10s; }
.lesson-chip:nth-child(n+6) { animation-delay: 0.12s; }
.lesson-chip:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.lesson-chip .bi { color: var(--accent); font-size: 1.1rem; }
.lesson-chip button,
.lesson-chip form button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    border: none;
    box-shadow: none;
    font-size: 0.8rem;
}
.lesson-chip button:hover,
.lesson-chip form button:hover {
    background: var(--danger);
    color: #fff;
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(239,68,68,0.35) !important;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px;
    min-height: 70px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.type-btn:nth-child(1) { animation-delay: 0.03s; }
.type-btn:nth-child(2) { animation-delay: 0.08s; }
.type-btn:nth-child(3) { animation-delay: 0.13s; }
.type-btn .bi { font-size: 1.4rem; transition: transform var(--dur-base) var(--spring); }
.type-btn.t1 .bi { color: #8b5cf6; }
.type-btn.t2 .bi { color: #ec4899; }
.type-btn.t3 .bi { color: #64748b; }
.type-btn:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--accent);
}
.type-btn:hover .bi { transform: scale(1.15); }

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.file-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    min-height: 110px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
}
.file-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--text);
}
.file-card .name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}
.file-card .name .bi { color: var(--accent); font-size: 1.15rem; }
.file-card .meta { font-size: 0.78rem; color: var(--text-secondary); }
.file-card .price {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

/* ============================================================
   13) PANSION
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.stat-box {
    text-align: center;
    padding: 20px 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    border: 1px solid rgba(var(--accent-rgb),0.12);
    transition: all var(--dur-base) var(--ease-out);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.stat-box:nth-child(1) { animation-delay: 0.03s; }
.stat-box:nth-child(2) { animation-delay: 0.08s; }
.stat-box:nth-child(3) { animation-delay: 0.13s; }
.stat-box:nth-child(4) { animation-delay: 0.18s; }
.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-box .num {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
    transition: transform var(--dur-base);
}
.stat-box:hover .num { transform: scale(1.1); }
.stat-box .lbl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.stat-box.male .num { color: #2563eb; }
.stat-box.female .num { color: #db2777; }

.package-card {
    padding: 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--surface);
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.package-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.package-card.is-active {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%);
}
.package-card.is-used, .package-card.is-cancelled { opacity: 0.65; }

.pkg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pkg-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--gradient-main);
    color: #fff;
    box-shadow: var(--shadow-accent);
}
.pkg-type-badge.used {
    background: var(--surface-active);
    color: var(--text-secondary);
    box-shadow: none;
}
.pkg-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.85;
    padding: 10px 12px;
    background: var(--surface-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.pkg-meta b { color: var(--text); font-weight: 600; }
.pkg-meta .bi { color: var(--accent); margin-left: 2px; }
.pkg-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pkg-expand {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    display: none;
}
.pkg-expand.open {
    display: block;
    animation: fadeInUp 0.25s var(--ease-out) both;
}
.pkg-expand .field-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text);
}

.date-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.date-row select, .date-row input { margin: 0; width: auto; min-width: 90px; }

.res-list { display: flex; flex-direction: column; gap: 10px; }
.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.res-item:nth-child(1) { animation-delay: 0.02s; }
.res-item:nth-child(2) { animation-delay: 0.05s; }
.res-item:nth-child(3) { animation-delay: 0.08s; }
.res-item:nth-child(4) { animation-delay: 0.11s; }
.res-item:nth-child(5) { animation-delay: 0.14s; }
.res-item:nth-child(n+6) { animation: none; }
.res-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.res-item.is-today {
    border-color: var(--accent);
    background: linear-gradient(90deg, var(--accent-soft), var(--surface));
}
.res-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.res-date-block {
    text-align: center;
    min-width: 66px;
    padding: 8px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--accent-rgb),0.15);
}
.res-day-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.res-month {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 600;
}
.res-weekday {
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.res-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.res-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
}
.today-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--gradient-main);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: var(--shadow-accent);
}

/* ============================================================
   14) SETTINGS
   ============================================================ */
.visibility-panel {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}
.visibility-panel h4 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.visibility-panel h4 .bi { color: var(--accent); }
.visibility-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.65;
}
.visibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.visibility-options > label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    margin: 0;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-out);
}
.visibility-options > label:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.visibility-options > label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12);
}
.visibility-options input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    margin: 0;
    min-height: unset;
    padding: 0;
    transition: all var(--dur-base);
}
.visibility-options input[type="radio"]:checked {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface);
}

.color-selection-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin: 14px 0 22px;
    padding: 18px;
    background: var(--surface-hover);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.custom-color-picker { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.custom-color-picker label { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin: 0; text-align: center; }
.suggested-colors { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: 1; }
.suggested-color-btn {
    display: inline-block;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: all var(--dur-base) var(--spring);
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.12);
}
.suggested-color-btn:hover {
    transform: scale(1.15) rotate(-4deg);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 6px 18px rgba(0,0,0,0.22);
}
.suggested-color-btn.selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 0 0 3px var(--accent-soft), 0 4px 14px rgba(0,0,0,0.18);
    transform: scale(1.08);
}
.suggested-color-btn.selected::after {
    content: '\F26E';
    font-family: 'bootstrap-icons';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* hp-chips — fallback (استایل اصلی در settings.css یا inline) */
.hp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    margin-bottom: 18px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.hp-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all var(--dur-base) var(--ease-out);
}
.hp-chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.hp-chip.on { background: var(--gradient-main); color: #fff; border-color: transparent; box-shadow: var(--shadow-accent); }
.hp-chip.off { background: var(--surface); color: var(--text-secondary); }
.hp-chip.locked { cursor: not-allowed; opacity: 0.7; }

/* ============================================================
   15) MESSAGES
   ============================================================ */
.msg-thread {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.msg-thread:nth-child(1) { animation-delay: 0.02s; }
.msg-thread:nth-child(2) { animation-delay: 0.05s; }
.msg-thread:nth-child(3) { animation-delay: 0.08s; }
.msg-thread:nth-child(4) { animation-delay: 0.11s; }
.msg-thread:nth-child(5) { animation-delay: 0.14s; }
.msg-thread:nth-child(n+6) { animation: none; }
.msg-thread:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.msg-thread.unread {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-soft), var(--surface));
}
.msg-thread.unread::before {
    content: '';
    position: absolute;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    top: 16px; right: 16px;
    animation: subtlePulse 2s ease-in-out infinite;
}
.msg-thread-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.msg-thread-head strong { display: inline-flex; align-items: center; gap: 5px; font-size: 0.9rem; }
.msg-thread-head strong .bi { color: var(--accent); }
.msg-thread-body { font-size: 0.9rem; line-height: 1.75; }
.msg-thread-answer {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--surface-hover);
    border-right: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}
.msg-thread-answer .lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ============================================================
   16) BELLS
   ============================================================ */
.bell-list { display: grid; gap: 10px; }
.bell-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--dur-base) var(--ease-out);
    flex-wrap: wrap;
}
.bell-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.bell-item.current {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12);
    animation: bellGlow 2s ease-in-out infinite;
}
@keyframes bellGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12); }
    50%      { box-shadow: 0 0 0 6px rgba(var(--accent-rgb),0.22); }
}
.bell-time {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    direction: ltr;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.bell-name { font-weight: 600; font-size: 0.92rem; }
.bell-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 600;
    background: var(--gradient-main);
    color: #fff;
}

/* ============================================================
   17) INTRO / DASHBOARD
   ============================================================ */
.intro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.intro-stat {
    text-align: center;
    padding: 22px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.intro-stat:nth-child(1) { animation-delay: 0.03s; }
.intro-stat:nth-child(2) { animation-delay: 0.08s; }
.intro-stat:nth-child(3) { animation-delay: 0.13s; }
.intro-stat:nth-child(4) { animation-delay: 0.18s; }
.intro-stat:nth-child(5) { animation-delay: 0.23s; }
.intro-stat:nth-child(6) { animation-delay: 0.28s; }
.intro-stat:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.intro-stat > .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 10px;
    transition: transform var(--dur-base) var(--spring);
}
.intro-stat:hover > .bi { transform: scale(1.15) rotate(-6deg); }
.intro-stat .num {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    transition: transform var(--dur-base);
}
.intro-stat:hover .num { transform: scale(1.08); }
.intro-stat .lbl { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; font-weight: 500; }

.intro-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.intro-feature {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--dur-base) var(--ease-out);
    text-decoration: none;
    color: var(--text);
    display: block;
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.intro-feature:nth-child(1) { animation-delay: 0.03s; }
.intro-feature:nth-child(2) { animation-delay: 0.08s; }
.intro-feature:nth-child(3) { animation-delay: 0.13s; }
.intro-feature:nth-child(4) { animation-delay: 0.18s; }
.intro-feature:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--text);
}
.intro-feature .icon-block { background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.intro-feature:hover .icon-block { transform: scale(1.1) rotate(-6deg); }
.intro-feature h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.intro-feature p { margin: 0; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.7; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-xs);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.dash-card:nth-child(1) { animation-delay: 0.03s; }
.dash-card:nth-child(2) { animation-delay: 0.08s; }
.dash-card:nth-child(3) { animation-delay: 0.13s; }
.dash-card:nth-child(4) { animation-delay: 0.18s; }
.dash-card:nth-child(5) { animation-delay: 0.23s; }
.dash-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.dash-card h4 {
    margin: 0 0 12px;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}
.dash-card h4 .bi { color: var(--accent); font-size: 1.15em; }

/* Empty state icon — float */
.empty-state .icon-block {
    animation: floatInPlace 3s ease-in-out infinite;
}
@keyframes floatInPlace {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* ============================================================
   18) SLIDER — ★ نسبت ۲۱:۹ در همه دستگاه‌ها
   ============================================================ */
.slider-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--surface-hover);
    box-shadow: var(--shadow-md);
    direction: ltr;
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
    animation: fadeInUp 0.4s var(--ease-out) both;
}
.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.slide {
    flex: 0 0 100%;
    position: relative;
    height: 100%;
    overflow: hidden;
}
.slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 30%, transparent 55%);
    pointer-events: none;
}
.slide-content {
    position: relative;
    z-index: 2;
    padding: 24px 28px 26px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    direction: rtl;
    text-align: right;
}
.slide-title {
    color: #ffffff;
    font-size: clamp(1.1rem, 2.6vw, 1.7rem);
    font-weight: 800;
    margin: 0 0 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
    line-height: 1.3;
}
.slide-subtitle {
    color: rgba(255,255,255,0.92);
    font-size: clamp(0.82rem, 1.4vw, 0.98rem);
    margin: 0 0 14px;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.slide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
    transition: background var(--dur-base), transform var(--dur-base);
    align-self: flex-start;
}
.slide-link:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translate3d(0, -50%, 0);
    width: 40px; height: 40px;
    min-width: 40px; min-height: 40px;
    max-width: 40px; max-height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 5;
    transition: background var(--dur-base), transform var(--dur-base) var(--ease-out);
    box-sizing: border-box;
    padding: 0;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.slider-nav:hover { background: #fff; transform: translate3d(0, -50%, 0) scale(1.1); }
.slider-nav:active { transform: translate3d(0, -50%, 0) scale(0.95); }
.slider-nav.prev { left: 14px; }
.slider-nav.next { right: 14px; }
.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    padding: 6px 10px;
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    direction: ltr;
}
.slider-dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 0;
    border: none;
    margin: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.slider-dot:hover { background: rgba(255,255,255,0.8); transform: scale(1.2); }
.slider-dot.active { background: #ffffff; width: 28px; }

/* ============================================================
   19) NEWS
   ============================================================ */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 0 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.section-title h2 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title h2 .bi { color: var(--accent); }
.section-title a {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform var(--dur-base);
}
.section-title a:hover { transform: translateX(-3px); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-align: right;
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.news-card:nth-child(1) { animation-delay: 0.03s; }
.news-card:nth-child(2) { animation-delay: 0.08s; }
.news-card:nth-child(3) { animation-delay: 0.13s; }
.news-card:nth-child(4) { animation-delay: 0.18s; }
.news-card:nth-child(5) { animation-delay: 0.23s; }
.news-card:nth-child(6) { animation-delay: 0.28s; }
.news-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}
.news-card.pinned { border-color: var(--warn); }
.news-card.pinned::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warn), #fbbf24);
    z-index: 4;
}
.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--surface-hover);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    direction: ltr;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}
.news-card:hover .news-image { transform: scale(1.05); }
.news-image.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.4rem;
}
.news-image-slider .ni-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-image-slider .ni-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-hover);
}
.ni-btn {
    position: absolute;
    top: 50%;
    transform: translate3d(0, -50%, 0);
    width: 28px; height: 28px;
    min-width: 28px; min-height: 28px;
    max-width: 28px; max-height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: background var(--dur-base), transform var(--dur-base);
    box-sizing: border-box;
    padding: 0;
    border: none;
    outline: none;
    user-select: none;
}
.ni-btn:hover { background: rgba(0,0,0,0.85); transform: translate3d(0, -50%, 0) scale(1.1); }
.ni-btn.prev { left: 8px; }
.ni-btn.next { right: 8px; }
.ni-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    z-index: 3;
    font-weight: 600;
}
.news-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.news-meta .bi { color: var(--text-muted); }
.news-meta .pin-badge {
    background: var(--warn-soft);
    color: var(--warn);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 10.5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.news-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.45;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-summary {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.news-footer {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    border-top: 1px solid var(--border);
    transition: gap var(--dur-base);
}
.news-card:hover .news-footer { gap: 6px; }
.news-card:hover .news-footer .bi { transform: translateX(-4px); transition: transform var(--dur-base); }
.news-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.news-empty .bi { font-size: 2.4rem; color: var(--text-muted); display: block; margin-bottom: 10px; }

/* ============================================================
   20) NEWS MODAL
   ============================================================ */
.news-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    overflow-y: auto;
}
.news-modal.show { display: flex; animation: fadeIn 0.25s var(--ease-out); }
.news-modal.show .news-modal-box { animation: scaleIn 0.3s var(--spring) both; }
.news-modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    direction: rtl;
}
.news-modal-close {
    position: absolute;
    top: 12px; left: 12px;
    width: 36px !important; height: 36px !important;
    min-width: 36px !important; min-height: 36px !important;
    max-width: 36px !important; max-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    transition: background var(--dur-base), transform var(--dur-base);
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
}
.news-modal-close:hover {
    background: rgba(0,0,0,0.85);
    transform: rotate(90deg);
}
.news-modal-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0b0f16;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 320px;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    direction: ltr;
    touch-action: pan-y;
}
.modal-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0b0f16;
}
.modal-slider-btn {
    position: absolute;
    top: 50%;
    transform: translate3d(0, -50%, 0);
    width: 38px; height: 38px;
    min-width: 38px; min-height: 38px;
    max-width: 38px; max-height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: background var(--dur-base), transform var(--dur-base);
    box-sizing: border-box;
    padding: 0;
    border: none;
    outline: none;
    user-select: none;
}
.modal-slider-btn:hover { background: rgba(0,0,0,0.85); transform: translate3d(0, -50%, 0) scale(1.08); }
.modal-slider-btn.prev { left: 12px; }
.modal-slider-btn.next { right: 12px; }
.modal-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
    padding: 5px 10px;
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius-pill);
    direction: ltr;
}
.modal-slider-dot {
    width: 7px; height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 0;
    border: none;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}
.modal-slider-dot.active { background: #fff; width: 22px; }
.modal-slider-count {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    z-index: 3;
    direction: ltr;
}
.news-modal-body { padding: 28px; }
.news-modal-body h2 {
    margin: 0 0 12px;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    line-height: 1.35;
    color: var(--text);
}
.news-modal-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.news-modal-meta .bi { margin-left: 3px; }
.news-modal-content {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text);
    white-space: pre-wrap;
}
.news-modal-loading {
    padding: 60px 30px;
    text-align: center;
    color: var(--text-secondary);
}
.news-modal-loading .spinner-ring {
    margin: 0 auto 14px;
    width: 36px; height: 36px;
    border-width: 3px;
}

/* ============================================================
   21) ADMIN CONTENT
   ============================================================ */
.editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.editor-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--dur-base);
}
.back-btn:hover {
    background: var(--surface-active);
    color: var(--text);
    transform: translateX(3px);
}

.list-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    margin-bottom: 12px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--dur-base);
}
.list-add:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateY(-2px);
    border-style: solid;
}

/* ============================================================
   22) ADMIN — Drag List
   ============================================================ */
.drag-list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), opacity var(--dur-fast), transform var(--dur-fast);
    cursor: grab;
    position: relative;
    user-select: none;
}
.list-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.list-item.dragging { opacity: 0.4; cursor: grabbing; transform: scale(0.98); }
.list-item.inactive { opacity: 0.55; }
.list-item.pinned { border-color: var(--warn); }
.list-item.pinned::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 3px;
    background: var(--warn);
    border-radius: 3px 0 0 3px;
}
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 40px;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: grab;
    flex-shrink: 0;
    transition: color var(--dur-base);
}
.list-item:hover .drag-handle { color: var(--accent); }
.drag-handle:active { cursor: grabbing; }

/* ============================================================
   23) ADMIN — Thumbnails
   ============================================================ */
.item-thumb {
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-hover);
    position: relative;
    pointer-events: none;
}
.item-thumb.slide { width: 140px; aspect-ratio: 21 / 9; }
.item-thumb.news  { width: 120px; aspect-ratio: 16 / 9; }
.item-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
.item-thumb.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}
.item-thumb-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    z-index: 2;
}
.thumb-mini-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}
.thumb-mini-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-hover);
}

.item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--text-secondary);
}
.item-meta .bi { color: var(--text-muted); margin-left: 2px; }
.item-meta .badge {
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    font-size: 10.5px;
    font-weight: 600;
}
.item-meta .badge.warn { background: var(--warn-soft); color: var(--warn); }
.item-meta .badge.info { background: var(--info-soft); color: var(--info); }
.item-meta .badge.danger { background: var(--danger-soft); color: var(--danger); }

.item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ============================================================
   24) ADMIN — Editor
   ============================================================ */
.post-editor {
    max-width: 760px;
    margin: 0 auto;
    animation: fadeInUp 0.35s var(--ease-out) both;
}

.preview-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}
.preview-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-hover);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    border: 1px solid var(--border);
    transition: box-shadow var(--dur-base);
}
.preview-viewport.dragging { box-shadow: 0 0 0 2px var(--accent); }
.preview-viewport.slide { aspect-ratio: 21 / 9; }
.preview-viewport.news  { aspect-ratio: 16 / 9; }
.preview-viewport:active { cursor: grabbing; }
.preview-viewport.empty {
    border: 2px dashed var(--border-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    transition: all var(--dur-base);
}
.preview-viewport.empty:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: scale(1.005);
}
.preview-viewport.empty .icon { font-size: 2.4rem; transition: transform var(--dur-base) var(--spring); }
.preview-viewport.empty:hover .icon { transform: scale(1.15) rotate(-6deg); }
.preview-viewport.empty .text { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

.preview-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}
.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 30%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    pointer-events: none;
    z-index: 2;
}
.preview-overlay .o-title {
    color: #ffffff;
    margin: 0 0 4px;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    min-height: 1.3em;
}
.preview-overlay .o-title:empty::before { content: 'عنوان...'; opacity: 0.5; font-weight: 400; }
.preview-overlay .o-sub {
    color: rgba(255,255,255,0.92);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    min-height: 1.2em;
}
.preview-overlay .o-sub:empty::before { content: 'زیرعنوان...'; opacity: 0.5; }

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    animation: fadeInDown 0.3s var(--ease-out) both;
}
.zoom-display {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    min-width: 52px;
    text-align: center;
    color: var(--text);
    transition: transform var(--dur-base);
}
.zoom-display:not(:empty) { animation: pulseZoom 0.3s var(--ease-out); }
@keyframes pulseZoom {
    0%   { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.preview-hint {
    margin-right: auto;
    font-size: 12px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   25) ADMIN — Images Manager
   ============================================================ */
.images-manager {
    margin-bottom: 20px;
    padding: 14px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.images-manager h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.images-manager h4 .hint { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.img-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.img-thumb {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--surface);
    position: relative;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-out);
}
.img-thumb:hover {
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-sm);
}
.img-thumb.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.25);
}
.img-thumb .remove-btn {
    position: absolute;
    top: 4px; left: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform var(--dur-base) var(--spring);
    z-index: 3;
}
.img-thumb .remove-btn:hover { transform: scale(1.2) rotate(90deg); }
.img-thumb .badge-first {
    position: absolute;
    bottom: 4px; right: 4px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.img-thumb .badge-new {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--success);
    color: #fff;
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    animation: subtlePulse 2s ease-in-out infinite;
}
.img-thumbs-empty {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}
.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--dur-base);
}
.upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    border-style: solid;
    transform: translateY(-1px);
}
.upload-btn input { display: none; }
.new-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.new-thumb {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--surface);
    border: 2px dashed var(--accent);
    position: relative;
    animation: scaleIn 0.25s var(--spring) both;
}
.new-thumb .new-badge {
    position: absolute;
    bottom: 4px; right: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.selected-image-label {
    padding: 10px 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(var(--accent-rgb),0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

/* ============================================================
   26) ADMIN — Editor Actions
   ============================================================ */
.editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.editor-actions .btn-save {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    padding: 12px 24px;
    min-height: 46px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: filter var(--dur-base), transform var(--dur-base), box-shadow var(--dur-base);
    box-shadow: var(--shadow-accent);
}
.editor-actions .btn-save:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent), 0 12px 32px rgba(var(--accent-rgb),0.45);
}
.editor-actions .btn-save:active { transform: translateY(0) scale(0.98); }
.editor-actions .btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    min-height: 46px;
    border-radius: var(--radius-sm);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--dur-base);
}
.editor-actions .btn-cancel:hover {
    background: var(--surface-active);
    color: var(--text);
    transform: translateY(-1px);
}

/* ============================================================
   27) ADMIN — Pansion Day Cards
   ============================================================ */
.day-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-out);
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.day-card:nth-child(1) { animation-delay: 0.02s; }
.day-card:nth-child(2) { animation-delay: 0.05s; }
.day-card:nth-child(3) { animation-delay: 0.08s; }
.day-card:nth-child(4) { animation-delay: 0.11s; }
.day-card:nth-child(5) { animation-delay: 0.14s; }
.day-card:nth-child(n+6) { animation: none; }
.day-card.is-today {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.10);
}
.day-card.is-closed { opacity: 0.75; border-style: dashed; }
.day-card.full { border-color: var(--danger); }
.day-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background var(--dur-base);
}
.day-card-header:hover { background: var(--surface-hover); }
.day-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 8px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--accent-rgb),0.15);
    transition: transform var(--dur-base);
}
.day-card-header:hover .day-card-date { transform: scale(1.05); }
.day-card-date .d { font-size: 1.25rem; font-weight: 800; color: var(--accent); line-height: 1; }
.day-card-date .m { font-size: .65rem; color: var(--text-secondary); margin-top: 3px; font-weight: 600; }
.day-card-title { flex: 1; min-width: 0; }
.day-card-title .weekday { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-card-title .info { font-size: .78rem; color: var(--text-secondary); margin-top: 3px; }
.day-card-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.day-card-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--dur-base) var(--ease-out);
    flex-shrink: 0;
}
.day-card.open .day-card-toggle {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: rotate(180deg);
}
.day-card-body {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--surface-hover);
}
.day-card.open .day-card-body {
    display: block;
    animation: expandDown 0.3s var(--ease-out) both;
}
@keyframes expandDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.capacity-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.capacity-form label { margin: 0; font-weight: 600; font-size: .85rem; }
.capacity-form input[type="number"] { width: 90px; margin: 0; text-align: center; font-weight: 700; }
.capacity-form .hint { font-size: .78rem; color: var(--text-secondary); margin-right: auto; }
.res-list-mini { display: flex; flex-direction: column; gap: 8px; }
.res-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    transition: all var(--dur-base);
}
.res-mini:hover { border-color: var(--accent); }
.res-mini .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.res-mini .name { font-weight: 600; font-size: .88rem; }
.res-mini .name small { display: block; font-weight: 400; font-size: .72rem; color: var(--text-secondary); }
.res-mini .time { font-size: .75rem; color: var(--text-secondary); margin-right: auto; }

/* ============================================================
   28) TOAST / LOADER / EMPTY
   ============================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: var(--surface);
    padding: 13px 22px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000000;
    opacity: 0;
    transition: all 0.3s var(--ease-out);
    max-width: 90vw;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: toastBounce 0.4s var(--spring);
}
@keyframes toastBounce {
    0%   { transform: translateX(-50%) translateY(80px); }
    60%  { transform: translateX(-50%) translateY(-6px); }
    100% { transform: translateX(-50%) translateY(0); }
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }

.global-loader {
    position: fixed;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--gradient-main);
    background-size: 300% 100%;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease-out);
    z-index: 999999;
    pointer-events: none;
    animation: loaderFlow 1.5s linear infinite;
    animation-play-state: paused;
}
.global-loader.active {
    transform: scaleX(1);
    animation-play-state: running;
}
@keyframes loaderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.global-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.35);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.global-overlay.show { display: flex; opacity: 1; }
.global-overlay-box {
    background: var(--surface);
    padding: 22px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    animation: scaleIn 0.3s var(--spring) both;
}
.spinner-ring {
    width: 28px; height: 28px;
    border: 3px solid rgba(var(--accent-rgb),0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinRing 0.7s linear infinite;
    flex-shrink: 0;
}

/* ============================================================
   ★ FIX: spinRing — انیمیشن بدون transform: none
   ============================================================ */
@keyframes spinRing {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   ★ FIX: btn-loading — اسپینر دقیقاً وسط دکمه
   ============================================================ */
.btn-loading {
    position: relative !important;
    pointer-events: none !important;
    color: transparent !important;
    opacity: 0.85 !important;
}
.btn-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 18px;
    height: 18px;
    margin: auto;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinRing 0.7s linear infinite;
    opacity: 1 !important;
    background: none !important;
    box-sizing: border-box;
}
.btn-loading .bi { visibility: hidden; }

/* اسپینر روی دکمه‌های روشن (outline) — رنگ تیره */
.btn-loading.btn-gray::after,
.btn-loading.btn-cancel::after,
.btn-loading[class*="gray"]::after,
.nav-pill-btn.nav-login-btn.btn-loading::after {
    border-color: rgba(var(--accent-rgb), 0.25);
    border-top-color: var(--accent);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
}
.empty-state .icon-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    font-size: 2.2rem;
    margin-bottom: 14px;
    background: var(--surface-hover);
    color: var(--text-muted);
    border-radius: 50%;
}
.empty-mini {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================================
   29) AUTH
   ============================================================ */
.auth-card {
    max-width: 420px;
    margin: 40px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.auth-card .icon-block {
    display: flex;
    width: 56px; height: 56px;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}
.auth-card h2 { text-align: center; margin: 0 0 24px; }

/* ============================================================
   30) KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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

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

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

/* ============================================================
   31) UTILITY
   ============================================================ */
.animate-in { animation: fadeInUp 0.4s var(--ease-out) both; }
.animate-fade { animation: fadeIn 0.35s var(--ease-out) both; }
.animate-scale { animation: scaleIn 0.3s var(--spring) both; }

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================
   32) RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding: 14px 12px;
        background-image: none;
        background-color: var(--bg);
        background-attachment: scroll;
    }
    .card, .admin-card { padding: 18px; border-radius: var(--radius-md); }
    .card:hover, .admin-card:hover { transform: none; }

    .navbar {
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        position: static;
    }

    .navbar .nav-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 3px; justify-content: flex-start; }
    .navbar .nav-menu.open { display: flex; }
    .navbar .nav-menu a { padding: 10px 14px; text-align: right; }
    .navbar .nav-user { width: 100%; justify-content: space-between; order: 3; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); flex-wrap: wrap; }

    /* ★ FIX: نمایش همبرگر در موبایل */
    .navbar .navbar-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    .navbar-top { width: 100%; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .intro-stats { grid-template-columns: repeat(2, 1fr); }

    .date-row { flex-direction: column; align-items: stretch; }
    .date-row select, .date-row input, .date-row button { width: 100%; }
    .form-row { grid-template-columns: 1fr; }

    .list-item { flex-wrap: wrap; }
    .item-thumb.slide { width: 100px; }
    .item-thumb.news { width: 90px; }
    .item-actions { width: 100%; justify-content: flex-end; }
    .editor-actions { flex-direction: column; }
    .editor-actions .btn-cancel { width: 100%; }

    .color-selection-row { flex-direction: column; align-items: stretch; }

    .slider-wrap {
        aspect-ratio: 21 / 9;
        border-radius: var(--radius-md);
    }
    .slide-content { padding: 16px 18px 18px; }
    .slider-nav {
        width: 34px; height: 34px;
        min-width: 34px; min-height: 34px;
        max-width: 34px; max-height: 34px;
        font-size: 0.9rem;
    }
    .slider-nav.prev { left: 8px; }
    .slider-nav.next { right: 8px; }

    .modal-slider { max-height: 220px; }
    .news-modal-body { padding: 20px; }
    .btn-circle { width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; max-width: 34px !important; max-height: 34px !important; }
    .img-thumb, .new-thumb { width: 70px; height: 70px; }

    table, thead, tbody, th, td, tr { display: block; }
    table { border: none; background: transparent; }
    thead { display: none; }
    tr {
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        overflow: hidden;
    }
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 11px 15px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
    }
    td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        margin-left: 10px;
        font-size: 12px;
    }
    td:last-child { border-bottom: none; }
    input, select, textarea, button { font-size: 16px; }
}

@media (max-width: 480px) {
    .card, .admin-card { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .intro-stats { grid-template-columns: 1fr; }
    h2 { font-size: 1.18rem; }
    .btn { padding: 9px 16px; font-size: 13.5px; }
    .btn-sm { padding: 7px 12px; font-size: 12.5px; }
    .suggested-color-btn { width: 32px !important; height: 32px !important; }
    input[type="color"] { width: 44px !important; height: 44px !important; }
    .lesson-chip { padding: 10px 16px; min-height: 44px; }
}

/* ============================================================
   33) 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;
    }
    .slide-img { transition: none !important; transform: none !important; }
    .intro-logo, .empty-state .icon-block { animation: none !important; }
    .btn-loading::after { animation: none !important; opacity: 0.5 !important; }
}