/* ============================================================================
   پنل مشاوره — تم «سرمه‌ای و طلایی»
   الهام‌گرفته از پوستر فهرست: پس‌زمینه‌ی سرمه‌ای عمیق، حاشیه‌ها و تیترهای
   طلایی، و مهم‌تر از همه: خطِ‌چین طلایی که برچسب رو به مقدارش وصل می‌کنه
   (دقیقاً همون الگوی «عنوان⋯⋯⋯شماره‌صفحه» تو پوستر) - این‌جا هم محتوای
   واقعی سایت (اسم درس⋯ساعت، اسم دانش‌آموز⋯پایه) از همین جنسه، برای همین
   این الگو رو به‌عنوان عنصر تصویری اصلی و تکرارشونده‌ی کل طراحی انتخاب
   کردیم؛ نه صرفاً یه تزیین اضافه.
   ============================================================================ */

:root {
    /* --- سرمه‌ای (پس‌زمینه و سطح‌ها) --- */
    --navy-950: #070b1a;
    --navy-900: #0c1330;
    --navy-800: #142048;
    --navy-700: #1d2c5c;
    --navy-600: #2a3d74;

    /* --- طلایی (لهجه‌ی اصلی) --- */
    --gold-300: #f1d998;
    --gold-500: #d6ad52;
    --gold-600: #b8902f;
    --gold-700: #8a6a22;

    /* --- متن --- */
    --cream-100: #f3ecda;
    --cream-200: #e7dfc7;
    --slate-400: #99a0c2;
    --slate-500: #7781a8;

    /* --- وضعیت --- */
    --color-success: #34d399;
    --color-success-bg: rgba(52, 211, 153, 0.12);
    --color-error: #f87171;
    --color-error-bg: rgba(248, 113, 113, 0.12);

    --radius: 16px;
    --radius-sm: 10px;

    --shadow: 0 2px 10px rgba(2, 4, 16, 0.4), 0 14px 36px rgba(2, 4, 16, 0.38);
    --shadow-hover: 0 6px 18px rgba(2, 4, 16, 0.45), 0 20px 48px rgba(2, 4, 16, 0.4);
    --glow-gold: 0 0 0 1px rgba(214, 173, 82, 0.35), 0 0 18px rgba(214, 173, 82, 0.18);

    --gold-gradient: linear-gradient(135deg, var(--gold-300), var(--gold-500) 55%, var(--gold-700));
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--navy-950);
    color: var(--cream-100);
    direction: rtl;
    line-height: 1.7;
    position: relative;
}

/* پس‌زمینه‌ی محیطیِ زنده: همون درخشش‌های نرمِ طلایی/سرمه‌ای قبلی، ولی این‌بار
/* پس‌زمینه‌ی محیطی: دو تا درخشش نرمِ طلایی/سرمه‌ای در گوشه‌ها + یه بافت
   نقطه‌چین خیلی کم‌رنگ - برداشتی آرام از موج‌های تزیینیِ پوستر، بدون این‌که
   خوانایی فرم‌ها و جدول‌ها رو مختل کنه. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(214, 173, 82, 0.10), transparent 60%),
        radial-gradient(ellipse 700px 600px at 100% 30%, rgba(42, 61, 116, 0.35), transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(214, 173, 82, 0.05) 1px, transparent 1.5px);
    background-size: auto, auto, 22px 22px;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* -------------------- Topbar -------------------- */
.topbar {
    background: linear-gradient(180deg, rgba(12, 19, 48, 0.88), rgba(7, 11, 26, 0.88));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gold-700);
    box-shadow: 0 1px 0 rgba(214, 173, 82, 0.25), 0 8px 24px rgba(2, 4, 16, 0.3);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.2px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.user-name {
    color: var(--slate-400);
    font-size: 14px;
}

/* --- نشان طلایی دایره‌ای (کرست): همون الگوی حلقه‌های طلایی دور آیکون‌های
   پوستر، این‌جا برای برند و صفحات ورود استفاده می‌شه --- */
.crest {
    --crest-size: 34px;
    width: var(--crest-size);
    height: var(--crest-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    background: radial-gradient(circle at 35% 30%, var(--navy-600), var(--navy-900) 75%);
    border: 2px solid var(--gold-500);
    box-shadow: var(--glow-gold), inset 0 0 10px rgba(214, 173, 82, 0.25), inset 0 0 0 3px rgba(7, 11, 26, 0.5);
    font-size: calc(var(--crest-size) * 0.56);
    line-height: 1;
}
/* یه حلقه‌ی نازک طلاییِ داخلی که نشان رو بیشتر شبیه یه «مدال طراحی‌شده»
   می‌کنه، نه فقط یه دایره‌ی خالی دور یه ایموجی کوچیک */
.crest::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(241, 217, 152, 0.35);
    pointer-events: none;
}
/* آماده برای جایگزینی با لوگوی واقعی بعداً: کافیه داخل .crest یه <img> بذارید */
.crest img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.crest .crest-z {
    width: 62%;
    height: 62%;
    display: block;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.55));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.crest-lg .crest-z {
    width: 62%;
    height: 62%;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.75));
}
.crest:hover .crest-z {
    transform: scale(1.06);
    filter: drop-shadow(0 0 8px rgba(245, 197, 56, 0.9));
}
.crest-lg {
    --crest-size: 64px;
}

/* -------------------- Content shell -------------------- */
.content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 28px 60px;
}
.footer {
    text-align: center;
    color: var(--slate-500);
    font-size: 13px;
    padding: 20px;
    border-top: 1px solid rgba(214, 173, 82, 0.12);
}

/* -------------------- Flash messages -------------------- */
.flash-wrap { margin-bottom: 20px; }
.flash {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
    border: 1px solid transparent;
}
.flash-error { background: var(--color-error-bg); color: var(--color-error); border-color: rgba(248, 113, 113, 0.3); }
.flash-success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(52, 211, 153, 0.3); }
.flash-info { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }
.info-banner {
    background: rgba(214, 173, 82, 0.10);
    color: var(--gold-300);
    border: 1px solid rgba(214, 173, 82, 0.3);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

/* -------------------- Ornamental divider (poster-style ❖) -------------------- */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 22px;
}
.ornament-line {
    height: 1px;
    width: 46px;
    background: linear-gradient(90deg, transparent, var(--gold-500));
}
.ornament-line.reverse { background: linear-gradient(90deg, var(--gold-500), transparent); }
.ornament-dot {
    width: 7px;
    height: 7px;
    background: var(--gold-500);
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(214, 173, 82, 0.5);
    flex-shrink: 0;
}

/* -------------------- Page header -------------------- */
.page-header { margin-bottom: 28px; }
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.page-title {
    font-size: 25px;
    font-weight: 800;
    margin: 6px 0 10px;
    display: inline-block;
    padding-bottom: 10px;
    background-image: linear-gradient(90deg, var(--gold-500), transparent);
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 100% 2px;
}
.page-subtitle { color: var(--slate-400); font-size: 14.5px; margin: 0; }
.back-link {
    color: var(--gold-500);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.back-link:hover { color: var(--gold-300); text-decoration: underline; }

/* -------------------- Buttons -------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 20px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary {
    background: var(--gold-gradient);
    color: var(--navy-950);
}
.btn-primary:hover { box-shadow: var(--glow-gold); transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: var(--slate-400);
    border: 1px solid var(--navy-600);
}
.btn-ghost:hover { background: var(--navy-800); color: var(--gold-300); border-color: var(--gold-700); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 15px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:focus-visible {
    outline: 2px solid var(--gold-300);
    outline-offset: 2px;
}

/* -------------------- Auth pages -------------------- */
/* پس‌زمینه نوار‌های طلایی زنده (Animated Living Golden Stripes) */
.gold-stripes-container {
    display: none; /* مخفی کردن نوارهای طلایی بزرگ پس‌زمینه */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.gold-stripe {
    position: absolute;
    background: linear-gradient(90deg, 
        rgba(214, 173, 82, 0) 0%, 
        rgba(214, 173, 82, 0.12) 30%, 
        rgba(241, 217, 152, 0.25) 50%, 
        rgba(214, 173, 82, 0.12) 70%, 
        rgba(214, 173, 82, 0) 100%
    );
    filter: blur(10px); /* محوسازی نرم برای شیک‌تر شدن */
    transform: rotate(-35deg);
    transform-origin: center;
    opacity: 0.6;
    animation: drift 20s infinite linear alternate;
}

/* مکان و ابعاد نوارهای طلایی متحرک */
.stripe-1 {
    top: -10%;
    left: 10%;
    width: 250%;
    height: 50px;
    animation-duration: 25s;
    animation-delay: 0s;
}

.stripe-2 {
    top: 30%;
    left: -20%;
    width: 250%;
    height: 90px;
    animation-duration: 35s;
    animation-delay: -5s;
    background: linear-gradient(90deg, 
        rgba(214, 173, 82, 0) 0%, 
        rgba(214, 173, 82, 0.08) 35%, 
        rgba(241, 217, 152, 0.18) 50%, 
        rgba(214, 173, 82, 0.08) 65%, 
        rgba(214, 173, 82, 0) 100%
    );
}

.stripe-3 {
    top: 55%;
    left: 5%;
    width: 250%;
    height: 35px;
    animation-duration: 22s;
    animation-delay: -2s;
}

.stripe-4 {
    top: 85%;
    left: -10%;
    width: 250%;
    height: 110px;
    animation-duration: 40s;
    animation-delay: -10s;
    background: linear-gradient(90deg, 
        rgba(214, 173, 82, 0) 0%, 
        rgba(214, 173, 82, 0.06) 30%, 
        rgba(241, 217, 152, 0.15) 50%, 
        rgba(214, 173, 82, 0.06) 70%, 
        rgba(214, 173, 82, 0) 100%
    );
}

@keyframes drift {
    0% {
        transform: rotate(-35deg) translateY(-30px) scale(0.95);
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: rotate(-32deg) translateY(30px) scale(1.05);
        opacity: 0.5;
    }
}

.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px); /* وسط‌چین کردن عمودی کارت ورود */
    padding: 20px 0;
    position: relative;
    z-index: 5;
}

.auth-card {
    position: relative;
    background: rgba(12, 19, 48, 0.65); /* شیشه‌ای نیمه‌شفاف */
    backdrop-filter: blur(25px); /* افکت شیشه‌ای مدرن */
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius);
    border: 1px solid rgba(214, 173, 82, 0.35);
    box-shadow: 0 30px 60px rgba(2, 4, 16, 0.6), var(--glow-gold);
    padding: 40px 30px 35px; /* کاهش پدینگ به تناسب اندازه */
    width: 100%;
    max-width: 336px; /* کاهش ۲۰ درصدی عرض (از ۴۲۰ به ۳۳۶) */
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s ease;
}

.auth-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 80px rgba(2, 4, 16, 0.7), 0 0 30px rgba(214, 173, 82, 0.3);
    border-color: rgba(214, 173, 82, 0.6);
}

/* گوشه‌های تزیینیِ طلایی - برداشتی از قابِ دوخط دور پوستر */
.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--gold-500);
    opacity: 0.85;
    transition: all 0.4s ease;
}
.auth-card::before { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.auth-card::after { bottom: 12px; left: 12px; border-right: none; border-top: none; }

.auth-card:hover::before {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-color: var(--gold-300);
}
.auth-card:hover::after {
    bottom: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-color: var(--gold-300);
}

.auth-logo { 
    margin: 0 auto 20px; 
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
.auth-card:hover .auth-logo {
    transform: scale(1.15) rotate(5deg);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.5px;
}
.auth-subtitle { 
    color: var(--slate-400); 
    font-size: 14px; 
    margin: 0 0 8px; 
    line-height: 1.6;
}
.auth-form { text-align: right; display: flex; flex-direction: column; gap: 8px; }
.field-label { 
    font-size: 13.5px; 
    color: var(--cream-200); 
    margin-top: 12px; 
    letter-spacing: .2px; 
    font-weight: 600;
}
.field-input {
    font-family: inherit;
    background: rgba(7, 11, 26, 0.7);
    color: var(--cream-100);
    padding: 14px 16px;
    border: 1.5px solid rgba(42, 61, 116, 0.7);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.field-input::placeholder { color: var(--slate-500); }
.field-input:focus { 
    border-color: var(--gold-500); 
    background: rgba(7, 11, 26, 0.95);
    box-shadow: 0 0 15px rgba(214, 173, 82, 0.25), inset 0 0 5px rgba(214, 173, 82, 0.1); 
}
.auth-form .btn { 
    margin-top: 24px; 
    padding: 13px 20px;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(214, 173, 82, 0.2);
}
.auth-form .btn:hover {
    box-shadow: 0 6px 20px rgba(214, 173, 82, 0.4);
}

/* -------------------- Student grid (advisor dashboard) -------------------- */
/* لبه‌ی نازک طلاییِ بالای کارت‌های اصلی - یه لمسِ «پنل پریمیوم»، بدون
   شلوغ‌کردن با قاب کامل دور هر کارت (که رو صفحه‌ای با کلی کارت خسته‌کننده
   می‌شد؛ فقط رو کارت‌های hero مثل ورود، قاب کامل داریم). */
.day-section, .report-item, .student-card, .empty-state {
    position: relative;
    overflow: hidden;
}
.day-section::before, .report-item::before, .student-card::before, .empty-state::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
    opacity: 0.7;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.student-card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.student-card:hover { box-shadow: var(--shadow-hover), var(--glow-gold); transform: translateY(-2px); border-color: var(--gold-700); }
.student-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--navy-700), var(--navy-900));
    border: 1.5px solid var(--gold-500);
    color: var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.student-info { flex: 1; min-width: 0; }
.student-name { font-weight: 700; font-size: 16px; color: var(--cream-100); overflow-wrap: anywhere; word-break: break-word; }
.student-meta { color: var(--slate-400); font-size: 13px; margin-top: 2px; }
.student-arrow { color: var(--gold-500); font-size: 20px; }

.empty-state {
    background: var(--navy-800);
    border: 1px dashed var(--navy-600);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    color: var(--slate-400);
}

/* -------------------- خطِ‌چین طلایی (عنصر امضادار طراحی) --------------------
   برچسب ⋯⋯⋯ مقدار - همون الگوی «عنوان به شماره‌صفحه» تو پوستر مرجع، این‌جا
   برای وصل‌کردن اسم درس به ساعتش (یا هر برچسب دیگه به مقدارش) استفاده میشه.
   نکته‌ی مهم: چون اسم درس/توضیحات از ورودی کاربره و ممکنه یه رشته‌ی پیوسته‌ی
   بلند (بدون فاصله) باشه، هم white-space رو normal گذاشتیم (نه nowrap) هم
   min-width:0 رو صریح ست کردیم - وگرنه فرزندهای flex به‌طور پیش‌فرض
   min-width:auto دارن و علی‌رغم overflow-wrap، از کادر بیرون می‌زنن. */
.leader-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.leader-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--cream-100);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.leader-fill {
    flex: 1 1 20px;
    min-width: 16px;
    border-bottom: 2px dotted var(--gold-700);
    margin-bottom: 5px;
}
.leader-value {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gold-300);
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(214, 173, 82, 0.10);
    border: 1px solid rgba(214, 173, 82, 0.3);
    padding: 2px 9px;
    border-radius: 20px;
}

/* -------------------- برنامه‌ی هفتگی (مشاور) --------------------
   روزها زیر هم قرار می‌گیرن (نه ستون‌به‌ستون کنار هم) - هم از عرض صفحه
   بهتر استفاده میشه، هم فرم افزودن پارت یه ردیف افقی جمع‌وجوره که سریع
   پر میشه، هم دکمه‌ی حذف همیشه (کم‌رنگ) دیده میشه - نه فقط با hover، که
   رو موبایل/تاچ اصلاً کار نمی‌کرد. */
.week-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.day-section {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    scroll-margin-top: 90px;
}
.day-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--navy-600);
}
.day-section-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--gold-300);
    margin: 0;
    letter-spacing: .2px;
}
.day-total-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-300);
    background: rgba(214, 173, 82, 0.10);
    border: 1px solid rgba(214, 173, 82, 0.3);
    padding: 3px 11px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.day-empty { color: var(--slate-500); font-size: 13px; padding: 10px 0 16px; }

.part-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.part-row {
    background: var(--navy-900);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    transition: border-color .15s ease;
}
.part-row:hover { border-color: var(--gold-700); }
.part-row-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.part-desc {
    font-size: 12.5px;
    color: var(--slate-400);
    margin: 6px 0 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.btn-icon-delete {
    background: none;
    border: none;
    color: var(--slate-500);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 7px;
    border-radius: 6px;
    opacity: 0.55;
    flex-shrink: 0;
    transition: opacity .15s ease, color .15s ease, background .15s ease;
}
.btn-icon-delete:hover, .btn-icon-delete:focus-visible { opacity: 1; color: var(--color-error); background: var(--color-error-bg); }
.part-delete-form { display: inline-flex; margin-inline-start: auto; }

/* --- فرم افزودن پارت: یه ردیف افقی جمع‌وجور، نه فرم عمودی طولانی --- */
.add-part-row-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px dashed var(--navy-600);
    padding-top: 12px;
}
.add-row-subject { flex: 2 1 140px; }
.add-row-hours { flex: 1 1 80px; }
.add-row-desc { flex: 3 1 180px; }
.add-row-btn { flex: 0 0 auto; white-space: nowrap; }

.mini-input, .mini-textarea {
    font-family: inherit;
    background: var(--navy-950);
    color: var(--cream-100);
    padding: 8px 10px;
    border: 1.5px solid var(--navy-600);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    width: 100%;
    resize: vertical;
}
.mini-input::placeholder, .mini-textarea::placeholder { color: var(--slate-500); }
.mini-input:focus, .mini-textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(214, 173, 82, 0.15); }
.mini-input-num { text-align: center; }

/* -------------------- Student report page -------------------- */
.report-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.report-item {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    transition: border-color .15s ease;
}
.report-item:hover { border-color: var(--gold-700); }
.report-item-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}
.report-item-head input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--gold-500); cursor: pointer; }
.report-desc { color: var(--slate-400); font-size: 13.5px; margin: 8px 0 0 29px; }
.report-inputs {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-right: 29px;
    flex-wrap: wrap;
}
.report-input-group { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.report-input-group-wide { flex: 1; min-width: 220px; }
.report-input-group label { font-size: 12px; color: var(--slate-500); }

/* --- فیلدهای اختیاری: ساعت بیداری / استفاده از گوشی --- */
.extra-fields {
    display: flex;
    align-items: stretch;
    gap: 22px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(214, 173, 82, 0.25);
    border-radius: var(--radius);
    padding: 16px 22px;
    margin-bottom: 20px;
}
.extra-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 140px;
}
.extra-field label {
    font-size: 12.5px;
    color: var(--gold-300);
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.optional-tag { color: var(--slate-500); font-weight: 400; font-size: 11px; }
.extra-field-input { text-align: center; letter-spacing: 0.5px; }
.extra-field-divider {
    width: 1px;
    align-self: center;
    height: 44px;
    background: linear-gradient(180deg, transparent, rgba(214, 173, 82, 0.4), transparent);
    flex-shrink: 0;
}

/* -------------------- Reduced motion -------------------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
    .topbar-inner, .content { padding-left: 16px; padding-right: 16px; }
    .extra-fields { flex-direction: column; gap: 14px; }
    .extra-field-divider { display: none; }
}

/* -------------------- Charts & Stats -------------------- */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0 28px;
}
.stat-card {
    background: rgba(20, 32, 72, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--navy-700);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-500);
}
.stat-card-title {
    font-size: 13.5px;
    color: var(--slate-400);
    margin-bottom: 8px;
    font-weight: 500;
}
.stat-card-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold-300);
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.stat-unit {
    font-size: 13px;
    color: var(--slate-500);
    font-weight: 500;
}
.charts-container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}
.chart-card-wrapper {
    background: rgba(12, 19, 48, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--navy-700);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.chart-card-title {
    font-size: 16px;
    color: var(--gold-300);
    margin: 0 0 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(214, 173, 82, 0.15);
    padding-bottom: 10px;
}
.chart-canvas-holder {
    position: relative;
    height: 320px;
    width: 100%;
}

@media (max-width: 768px) {
    .charts-container-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------- Navigation Dropdown Menu -------------------- */
.menu-dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-trigger-btn {
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.menu-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 230px;
    background: rgba(15, 25, 60, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(214, 175, 55, 0.35);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 8px 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 0;
}

.menu-dropdown-content.show-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-user-info {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dropdown-role {
    font-size: 11px;
    color: var(--gold-400);
    font-weight: 700;
    text-transform: uppercase;
}

.dropdown-name {
    font-size: 14.5px;
    color: white;
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--slate-300);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: right;
}

.dropdown-item:hover {
    background: rgba(214, 175, 55, 0.15);
    color: var(--gold-300);
}

.logout-item {
    color: #ff5b5b;
}

.logout-item:hover {
    background: rgba(255, 91, 91, 0.12);
    color: #ff7d7d;
}

/* ============================================================================
   حروف Z معلق در پس‌زمینه (Zora Floating Effects)
   ============================================================================ */
.z-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.z-background span {
    position: absolute;
    color: var(--gold-300);
    font-family: "Vazirmatn", sans-serif;
    font-weight: bold;
    user-select: none;
    animation: float-z linear infinite alternate;
}

@keyframes float-z {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(25px, -35px) rotate(90deg);
    }
    100% {
        transform: translate(-15px, -65px) rotate(180deg);
    }
}

/* ============================================================================
   استایل فیلدهای ورودی فرم‌های ویرایش ادمین (form-input)
   ============================================================================ */
.form-input {
    font-family: inherit;
    background: rgba(7, 11, 26, 0.75) !important;
    color: var(--cream-100) !important;
    padding: 12px 14px;
    border: 1.5px solid rgba(42, 61, 116, 0.75) !important;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--gold-500) !important;
    background: rgba(7, 11, 26, 0.95) !important;
    box-shadow: 0 0 15px rgba(214, 173, 82, 0.25);
}

select.form-input option {
    background-color: var(--navy-900) !important;
    color: var(--cream-100) !important;
}
