/* ==========================================================================
   چکاپ — دیزاین‌سیستم مشترک (تم تیره، بدون حالت روز)
   پالت بر پایه‌ی همان هویت آبی/سرمه‌ای سایت، فقط تمیزتر و یکدست‌تر.
   ========================================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Variable.woff2') format('woff2-variations'),
         url('fonts/Vazirmatn-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- توکن‌ها ---------- */
:root {
    /* پس‌زمینه و سطوح */
    --bg-1:      #1a1a2e;
    --bg-2:      #16213e;
    --surface:   #1e1e2f;
    --surface-2: #252540;
    --surface-3: #2c2c45;

    --line:        #2f2f4a;
    --line-strong: #3d3d5c;

    /* متن */
    --text:       #ecf0f1;
    --text-soft:  #c4cdd6;
    --text-muted: #95a5a6;
    --text-faint: #6b7a8a;

    /* رنگ‌های اصلی */
    --blue:       #3498db;
    --blue-light: #5dade2;
    --blue-deep:  #2980b9;
    --teal:       #1abc9c;
    --teal-light: #48c9b0;
    --purple:     #6c5ce7;
    --purple-deep:#5b4cc4;

    --primary:    var(--blue);
    --accent:     var(--teal);

    --danger:  #e74c3c;
    --warning: #f1c40f;
    --success: #2ecc71;

    /* رنگ انواع فایل */
    --t1: #2ecc71; /* جزوه */
    --t2: #e67e22; /* پاورپوینت */
    --t3: #e74c3c; /* ویس استاد */
    --t4: #3498db; /* نمونه سوال */
    --t5: #9b59b6; /* رفرنس */
    --t6: #f1c40f; /* خلاصه */
    --t7: #00bcd4; /* گایدلاین */

    /* شعاع */
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

    /* سایه */
    --shadow-1: 0 4px 12px rgba(0,0,0,.25);
    --shadow-2: 0 10px 24px rgba(0,0,0,.35);
    --shadow-3: 0 18px 44px rgba(0,0,0,.45);

    /* فاصله */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
    --s-12: 48px; --s-16: 64px;

    /* حرکت */
    --dur-press: 110ms;
    --dur-state: 200ms;
    --dur-enter: 320ms;
    --ease:        cubic-bezier(.25,.8,.25,1);
    --ease-spring: cubic-bezier(.34,1.42,.64,1);

    --z-sticky: 40; --z-float: 60; --z-modal: 100; --z-toast: 140;
    --container: 1150px;
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100dvh;
    padding: var(--s-5) 0 var(--s-10);
    font-family: 'Vazirmatn', 'IranSans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.4; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; font-weight: 700; }
p  { margin: 0; }

a { color: var(--blue-light); text-decoration: none; transition: color var(--dur-state) var(--ease); }
a:hover { color: #85c7ec; }

img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
/* پیش‌فرض اندازه‌ی آیکون‌های درون‌خطی؛ قواعد اختصاصی کامپوننت‌ها پایین‌تر آمده و این را بازنویسی می‌کنند */
svg:not([width]) { width: 1.15em; height: 1.15em; }
.step__num svg { width: 14px; height: 14px; }
.section-head > svg { width: 20px; height: 20px; color: var(--blue); }

::selection { background: rgba(52,152,219,.35); }

:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: #4a4a70; }

.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- چیدمان ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }

/* ---------- سربرگ صفحه ---------- */
.pagehead {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: var(--s-10) var(--s-5);
    margin-bottom: var(--s-6);
    box-shadow: var(--shadow-2);
}
.pagehead::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
}
.pagehead h1 { margin-bottom: var(--s-2); }
.pagehead p { color: var(--text-muted); font-size: .98rem; }
.pagehead .brand { justify-content: center; margin-bottom: var(--s-3); }
.pagehead__login { position: absolute; top: var(--s-4); inset-inline-start: var(--s-4); }
/* گوشه‌ی بالای سربرگ: حساب دانشجو + ورود نمایندگان */
.pagehead__top { position: absolute; top: var(--s-4); inset-inline-start: var(--s-4); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.pagehead h1 {
    font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem);
    font-weight: 900;
    letter-spacing: .01em;
    line-height: 1.5;
    background: linear-gradient(115deg, var(--blue-light) 10%, var(--teal) 55%, #7ee8cf 95%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 18px rgba(26, 188, 156, .22));
}
.pagehead__org {
    margin-top: var(--s-2);
    font-size: .84rem;
    color: var(--text-faint);
    max-width: 62ch;
    margin-inline: auto;
    text-wrap: balance;
}

/* نشان رسمی — روی پلاک روشن تا رنگ‌های اصلی نشان روی تم تیره خوانا بماند */
.pagehead__logo {
    display: block;
    width: auto;
    height: 104px;
    margin: 0 auto var(--s-4);
    padding: 12px 18px;
    object-fit: contain;
    background: #f4f7fa;
    border-radius: var(--r-lg);
    box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

/* نشان برند */
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #fff;
    box-shadow: 0 6px 18px rgba(52,152,219,.3);
    flex-shrink: 0;
}
.brand__mark svg { width: 23px; height: 23px; }
.brand__logo { width: auto; height: 36px; object-fit: contain; flex-shrink: 0; }
.brand__name { font-size: 1.35rem; font-weight: 900; line-height: 1.1; }
.brand__sub { display: block; font-size: .72rem; font-weight: 500; color: var(--text-muted); }

/* ---------- نوار بالا ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    margin: calc(var(--s-5) * -1) 0 var(--s-5);
    padding-block: var(--s-3);
    background: rgba(26, 26, 46, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar__inner {
    width: 100%; max-width: var(--container);
    margin-inline: auto; padding-inline: var(--s-5);
    display: flex; align-items: center; gap: var(--s-3);
}
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }
.topbar__nav .btn.is-active { background: rgba(52,152,219,.16); color: var(--blue-light); }
@media (max-width: 780px) {
    .nav-label { display: none; }
    .topbar__nav .btn, .topbar__actions .btn { padding-inline: 10px; }
}

/* ---------- کارت ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--s-6);
    box-shadow: var(--shadow-1);
}
.card--pad-sm { padding: var(--s-4); }
.card__title { display: flex; align-items: center; gap: var(--s-3); font-size: 1.05rem; font-weight: 700; }
.card__title svg { width: 20px; height: 20px; color: var(--blue); }

/* ---------- دکمه ---------- */
.btn {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--text);
    --btn-bd: var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-md);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1.4;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background var(--dur-state) var(--ease),
                border-color var(--dur-state) var(--ease),
                color var(--dur-state) var(--ease),
                transform var(--dur-press) var(--ease),
                box-shadow var(--dur-state) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }

.btn--primary {
    --btn-bg: var(--purple);
    --btn-fg: #fff;
    --btn-bd: transparent;
    box-shadow: 0 4px 14px rgba(108,92,231,.3);
}
.btn--primary:hover { --btn-bg: var(--purple-deep); box-shadow: 0 6px 20px rgba(108,92,231,.4); }

.btn--blue { --btn-bg: var(--blue); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 4px 14px rgba(52,152,219,.28); }
.btn--blue:hover { --btn-bg: var(--blue-deep); }

.btn--teal { --btn-bg: var(--teal); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 4px 14px rgba(26,188,156,.28); }
.btn--teal:hover { --btn-bg: #16a085; }

.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; color: var(--text-soft); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--outline { --btn-bg: transparent; }
.btn--danger { --btn-bg: rgba(231,76,60,.14); --btn-fg: #ff8574; --btn-bd: rgba(231,76,60,.35); }
.btn--danger:hover { --btn-bg: rgba(231,76,60,.24); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: var(--r-sm); }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg { min-height: 52px; padding: 14px 26px; font-size: 1rem; }
.btn--icon { padding: 0; width: 44px; }
.btn--icon.btn--sm { width: 36px; }
.btn--block { width: 100%; }

.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- فرم ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field__label { display: flex; align-items: center; gap: var(--s-2); font-size: .88rem; font-weight: 700; color: var(--text-soft); }
.field__label svg { width: 16px; height: 16px; color: var(--blue); }
.field__hint { font-size: .8rem; color: var(--text-muted); }
.field__error { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #ff8574; }
.field__error svg { width: 14px; height: 14px; }
.req { color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-family: inherit; font-size: .97rem; font-weight: 500;
    color: var(--text);
    background: #252540;
    border: 2px solid var(--line-strong);
    border-radius: var(--r-md);
    transition: border-color var(--dur-state) var(--ease), box-shadow var(--dur-state) var(--ease);
    appearance: none; -webkit-appearance: none;
}
.textarea { min-height: 110px; line-height: 1.8; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); font-weight: 400; }
.input:hover, .select:hover, .textarea:hover { border-color: #4a4a70; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(52,152,219,.16);
}
.select {
    padding-inline-start: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 16px;
}
.select option { background: var(--surface-2); color: var(--text); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .45; cursor: not-allowed; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg {
    position: absolute; inset-inline-start: 15px;
    width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
}
.input-wrap .input { padding-inline-start: 44px; }

.check { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; min-height: 44px; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }

.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-3); }
.option {
    position: relative;
    display: flex; align-items: center; gap: var(--s-3);
    padding: 14px 16px;
    border: 2px solid var(--line-strong);
    border-radius: var(--r-md);
    background: #252540;
    cursor: pointer;
    transition: all var(--dur-state) var(--ease);
}
.option:hover { border-color: #4a4a70; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__label { font-weight: 700; font-size: .93rem; }
.option__meta { font-size: .8rem; color: var(--text-muted); }
.option:has(input:checked) { border-color: var(--blue); background: rgba(52,152,219,.12); }
.option:has(input:checked) .option__label { color: var(--blue-light); }

/* ---------- بج ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px;
    border-radius: var(--r-pill);
    font-size: .78rem; font-weight: 700; line-height: 1.6;
    color: #fff;
    background: var(--blue);
    white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--muted   { background: var(--surface-3); color: var(--text-soft); }
.badge--blue    { background: var(--blue); }
.badge--teal    { background: var(--teal); }
.badge--purple  { background: var(--purple); }
.badge--success { background: var(--success); color: #08301c; }
.badge--warning { background: var(--warning); color: #3a2f05; }
.badge--danger  { background: var(--danger); }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; min-height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--text-soft);
    font-family: inherit; font-size: .87rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--dur-state) var(--ease);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: #4a4a70; color: var(--text); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- کارت فایل ---------- */
.file-card {
    --accent-c: var(--blue);
    --tint: rgba(52,152,219,.1);
    position: relative;
    display: flex; align-items: center; gap: var(--s-4);
    padding: var(--s-4) var(--s-5);
    background: linear-gradient(135deg, var(--surface) 40%, var(--tint) 100%);
    border: 1px solid var(--line);
    border-inline-start: 5px solid var(--accent-c);
    border-radius: var(--r-md);
    transition: transform var(--dur-state) var(--ease), box-shadow var(--dur-state) var(--ease);
}
.file-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.file-card__icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,.06);
    color: var(--accent-c);
    flex-shrink: 0;
}
.file-card__icon svg { width: 24px; height: 24px; }
.file-card__body { flex: 1 1 auto; min-width: 0; }
.file-card__title { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.file-card__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
    font-size: .82rem; color: var(--text-muted);
}
.file-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.file-card__meta svg { width: 14px; height: 14px; opacity: .85; }
.file-card__actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.file-card__badge { background: var(--accent-c); color: #fff; }

.file-card.type-1 { --accent-c: var(--t1); --tint: rgba(46,204,113,.12); }
.file-card.type-2 { --accent-c: var(--t2); --tint: rgba(230,126,34,.12); }
.file-card.type-3 { --accent-c: var(--t3); --tint: rgba(231,76,60,.12); }
.file-card.type-4 { --accent-c: var(--t4); --tint: rgba(52,152,219,.12); }
.file-card.type-5 { --accent-c: var(--t5); --tint: rgba(155,89,182,.12); }
.file-card.type-6 { --accent-c: var(--t6); --tint: rgba(241,196,15,.12); }
.file-card.type-7 { --accent-c: var(--t7); --tint: rgba(0,188,212,.12); }
.file-card.type-6 .file-card__badge { color: #3a2f05; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 13px 16px; text-align: right; }
.table thead th {
    background: var(--surface-2); color: var(--text-muted);
    font-size: .8rem; font-weight: 700; white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table tbody tr { border-bottom: 1px solid var(--line); transition: background var(--dur-state) var(--ease); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }

/* ---------- حالت خالی / بارگذاری ---------- */
.empty {
    display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
    padding: var(--s-16) var(--s-5);
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    color: var(--text-muted);
}
.empty__icon { color: var(--text-faint); opacity: .5; }
.empty__icon svg { width: 52px; height: 52px; }
.empty p { font-size: .95rem; }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); }
.skeleton::after {
    content: '';
    position: absolute; inset: 0;
    transform: translateX(100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(-100%); } }
.skeleton-card { height: 82px; border-radius: var(--r-md); }

/* ---------- توست ---------- */
.toast-host {
    position: fixed; bottom: var(--s-6); inset-inline-start: var(--s-6);
    z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: var(--s-2);
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: var(--s-3);
    min-width: 250px; max-width: min(420px, calc(100vw - 48px));
    padding: 13px 17px;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-3);
    font-size: .9rem; font-weight: 600;
    pointer-events: auto;
    animation: toast-in var(--dur-enter) var(--ease-spring);
}
.toast svg { width: 19px; height: 19px; }
.toast--success { border-inline-start: 4px solid var(--success); }
.toast--success svg { color: var(--success); }
.toast--error { border-inline-start: 4px solid var(--danger); }
.toast--error svg { color: var(--danger); }
.toast--info { border-inline-start: 4px solid var(--blue); }
.toast--info svg { color: var(--blue); }
.toast.is-out { animation: toast-out var(--dur-state) ease-in forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- مودال ---------- */
.modal-backdrop {
    position: fixed; inset: 0; z-index: var(--z-modal);
    display: grid; place-items: center; padding: var(--s-5);
    background: rgba(10, 10, 22, .75);
    backdrop-filter: blur(5px);
    animation: fade-in var(--dur-state) var(--ease);
}
.modal {
    width: min(560px, 100%); max-height: 86dvh; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-3);
    padding: var(--s-6);
    animation: modal-in var(--dur-enter) var(--ease-spring);
}
@keyframes fade-in  { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- دکمه شناور ---------- */
/* بالا سمت چپ می‌ماند تا با توست‌ها (پایین سمت راست) قاطی نشود */
.fab {
    position: fixed; top: var(--s-6); inset-inline-end: var(--s-6);
    z-index: var(--z-float);
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
    cursor: pointer;
    transition: transform var(--dur-state) var(--ease-spring), background var(--dur-state) var(--ease);
}
.fab:hover { background: #16a085; transform: translateY(-3px) scale(1.04); }
.fab:active { transform: scale(.96); }
.fab svg { width: 24px; height: 24px; }
.fab__badge {
    position: absolute; top: -3px; inset-inline-end: -3px;
    min-width: 23px; height: 23px; padding: 0 6px;
    display: none; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    background: var(--danger); color: #fff;
    font-size: .72rem; font-weight: 800;
    border: 2px solid var(--bg-1);
}
.fab__badge.is-on { display: flex; animation: pop var(--dur-enter) var(--ease-spring); }
@keyframes pop { from { transform: scale(0); } }

/* ---------- گام‌ها ---------- */
.steps { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: var(--s-2); font-size: .85rem; color: var(--text-faint); font-weight: 600; }
.step__num {
    width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 50%; background: var(--surface-2);
    border: 1px solid var(--line-strong); font-size: .78rem;
}
.step.is-active { color: var(--blue-light); }
.step.is-active .step__num { background: rgba(52,152,219,.18); border-color: var(--blue); color: var(--blue-light); }
.step.is-done .step__num { background: var(--teal); border-color: var(--teal); color: #fff; }
.step__sep { width: 22px; height: 1px; background: var(--line-strong); }

/* ---------- بخش‌بندی ---------- */
.section-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.section-head__line { flex: 1; height: 1px; background: var(--line); }
.divider { height: 1px; background: var(--line); border: none; margin-block: var(--s-5); }

/* ---------- صفحه‌های ورود (دانشجو / دفتر فنی) ---------- */
.auth { max-width: 460px; margin: var(--s-8) auto 0; }
.auth__head { text-align: center; margin-bottom: var(--s-6); }
.auth__logo { height: 68px; width: auto; padding: 10px 14px; background: #f4f7fa; border-radius: var(--r-md); margin-bottom: var(--s-4); }
.auth__back { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--s-5); }
.tabs { display: flex; gap: var(--s-1); padding: 5px; background: var(--surface-2); border-radius: var(--r-md); margin-bottom: var(--s-6); }
.tab {
    flex: 1; min-height: 42px; padding: 8px;
    background: none; border: none; border-radius: var(--r-sm);
    color: var(--text-muted); font-family: inherit; font-size: .92rem; font-weight: 700;
    cursor: pointer; transition: all var(--dur-state) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--blue); color: #fff; }
.panel { display: none; }
.panel.is-active { display: block; animation: reveal var(--dur-enter) var(--ease) both; }
.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute; inset-inline-start: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; display: grid; place-items: center;
    background: none; border: none; color: var(--text-muted); cursor: pointer; border-radius: var(--r-sm);
}
.pw-toggle:hover { color: var(--text); }
.pw-wrap .input { padding-inline-start: 46px; }
.otp-note {
    display: flex; align-items: center; gap: var(--s-3);
    background: rgba(241,196,15,.1); border: 1px solid rgba(241,196,15,.3); color: #f6d365;
    padding: 12px 14px; border-radius: var(--r-md); font-size: .87rem;
}
.otp-note svg { width: 18px; height: 18px; }
.code-input { text-align: center; letter-spacing: .5em; font-size: 1.3rem; font-weight: 800; direction: ltr; }

/* ---------- صفحه‌ی نتیجه ---------- */
.result-icon { width: 64px; height: 64px; margin: 0 auto var(--s-4); display: grid; place-items: center; border-radius: 50%; background: rgba(26,188,156,.14); color: var(--teal); }
.result-icon svg { width: 32px; height: 32px; }
.result-icon--error { background: rgba(231,76,60,.14); color: #ff8574; }

/* ---------- کلید روشن/خاموش ---------- */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--line-strong); cursor: pointer; transition: background var(--dur-state) var(--ease); }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--dur-state) var(--ease-spring); }
.switch input:checked + span { background: var(--teal); border-color: var(--teal); }
.switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue-light); outline-offset: 2px; }

/* ---------- پاورقی ---------- */
.footer {
    margin-top: var(--s-10);
    padding-top: var(--s-6);
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: .87rem;
    text-align: center;
}
.footer__row { display: flex; align-items: center; justify-content: center; gap: var(--s-5); flex-wrap: wrap; }
.footer__stat { display: inline-flex; align-items: center; gap: var(--s-2); }
.footer__stat svg { width: 16px; height: 16px; color: var(--teal); }

/* ---------- انیمیشن ورود ---------- */
.reveal { animation: reveal var(--dur-enter) var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }
.stagger > * { animation: reveal var(--dur-enter) var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 40ms; }
.stagger > *:nth-child(3) { animation-delay: 80ms; }
.stagger > *:nth-child(4) { animation-delay: 120ms; }
.stagger > *:nth-child(5) { animation-delay: 160ms; }
.stagger > *:nth-child(6) { animation-delay: 200ms; }
.stagger > *:nth-child(7) { animation-delay: 240ms; }
.stagger > *:nth-child(n+8) { animation-delay: 280ms; }

/* ---------- کمکی ---------- */
.text-muted { color: var(--text-muted); }
.text-soft  { color: var(--text-soft); }
.text-blue  { color: var(--blue-light); }
.text-teal  { color: var(--teal); }
.text-danger{ color: #ff8574; }
.text-sm { font-size: .87rem; }
.text-xs { font-size: .79rem; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 680px) {
    body { font-size: 15.5px; padding-top: var(--s-3); }
    .container { padding-inline: var(--s-4); }
    .card { padding: var(--s-5) var(--s-4); }
    .pagehead { padding: var(--s-6) var(--s-4) var(--s-8); border-radius: var(--r-lg); }
    .pagehead__login { position: static; display: inline-flex; margin-bottom: var(--s-4); }
    /* سمت چپ خالی می‌ماند تا زیر دکمه‌ی شناور سبد چاپ نرود */
    .pagehead__top { position: static; justify-content: flex-start; padding-inline-end: 58px; margin-bottom: var(--s-4); }
    .brand__sub { display: none; }
    .file-card { flex-wrap: wrap; padding: var(--s-4); }
    .file-card__actions { width: 100%; }
    .file-card__actions .btn { flex: 1; }
    .file-card:hover { transform: none; }
    .toast-host { inset-inline: var(--s-4); bottom: var(--s-4); }
    .toast { max-width: none; }
    .fab { top: var(--s-4); inset-inline-end: var(--s-4); width: 50px; height: 50px; }
    .fab svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .file-card:hover, .fab:hover { transform: none; }
}
