/*
 * ============================================================
 * SHARED COMPONENTS
 * Reusable UI elements: buttons.
 * Add future shared components (modals, badges, etc.) here.
 * ============================================================
 */

/* ---- Primary CTA Button (Burgundy Gradient) ---- */
.btn-cta {
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 20px rgba(93, 13, 24, 0.3);
}
.btn-cta:hover {
    box-shadow: 0 12px 25px rgba(93, 13, 24, 0.45);
    transform: translateY(-2px);
}

/* ---- Outline Variant (used in header & hero) ----
   No backdrop-filter (removed) — --btn-outline-bg is a plain translucent
   solid color now, opacity raised in tokens.css to stay legible without
   the blur that used to soften whatever's behind it (often the busy hero
   photo). */
.btn-outline {
    background: var(--btn-outline-bg);
    color: var(--primary-navy);
    border: 1px solid var(--neutral-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition-theme);
}
.btn-outline:hover {
    background: var(--btn-outline-bg-hover);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* ---- Dark Navy Reserve Button (used in info cards) ---- */
.btn-dark-reserve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-dark));
    color: #FFFFFF;
    font-family: var(--font-display-fa);
    font-size: 20px;
    font-weight: 800;
    padding: 16px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(26, 54, 93, 0.3);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s ease;
    position: relative;
    overflow: hidden;
}
.btn-dark-reserve::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.btn-dark-reserve:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(93, 13, 24, 0.4);
    border-color: var(--accent-gold);
}
.btn-dark-reserve:hover::after { left: 200%; }

/* ---- Ghost / Text Button (secondary actions: "forgot password", "back to home") ---- */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.3s ease;
}
.btn-ghost:hover { color: var(--accent-gold); }

/* ---- Small stat chip (used in the login brand panel and the
   reservation trust panel — "680+ students", "6+ years", ...) ---- */
.auth-stat { display: flex; flex-direction: column; gap: 4px; }
.auth-stat-num {
    font-family: var(--font-display-fa);
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-navy);
}
.auth-stat-label {
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-soft);
}

/* ---- Segmented tab switcher (used by the Login / Register toggle) ---- */
.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-pill);
}
.auth-tab-btn {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.3s ease;
}
.auth-tab-btn.is-active {
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(93, 13, 24, 0.25);
}

/* ---- Small pill badge (used for level tags, status labels) ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
    border: 1px solid rgba(93, 13, 24, 0.15);
    letter-spacing: 0.2px;
}
[data-theme="dark"] .badge {
    background-color: var(--accent-soft-bg);
    border-color: rgba(217, 82, 110, 0.25);
}

/* ---- Dashboard topbar action pill (student + admin headers) — replaces a
   bare .btn-ghost text link for the two actions that need a clear button
   affordance: "مشاهده سایت" (a plain, secondary escape hatch) and
   "تنظیمات حساب" (`.is-account`, styled like a profile/account chip so it
   reads as "this is about your account", not just another nav link). ---- */
.topbar-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--neutral-border);
    background-color: var(--neutral-soft-bg);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    transition: all 0.3s ease;
    white-space: nowrap;
}
.topbar-action-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar-action-pill:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.topbar-action-pill.is-account {
    background-color: var(--accent-soft-bg);
    border-color: rgba(93, 13, 24, 0.15);
    color: var(--accent-gold);
}
[data-theme="dark"] .topbar-action-pill.is-account {
    border-color: rgba(217, 82, 110, 0.25);
}
.topbar-action-pill.is-account:hover {
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    color: #FFFFFF;
    border-color: transparent;
}
/* Icon-only below ~380px — keeps both pills readable as tap targets
   without crowding the brand/title out on the narrowest phones. */
@media (max-width: 380px) {
    .topbar-action-pill-label { display: none; }
    .topbar-action-pill { padding: 8px; }
}

/* ---- Section heading (eyebrow + title, used on new interior pages) ---- */
.section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
}
.section-heading .badge { order: -1; }
.section-heading h1,
.section-heading h2 {
    font-family: var(--font-display-fa);
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
    line-height: 1.4;
}
.section-heading p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 2;
    color: var(--ink-soft);
    margin: 0;
    max-width: 620px;
}

/* ---- Glass panel (generic elevated card, foundation for auth/booking cards) ----
   No backdrop-filter (removed) — --glass-bg is a plain translucent solid
   color now, opacity raised in tokens.css to compensate. */
.glass-panel {
    background-color: var(--glass-bg);
    border: 1px solid var(--neutral-border);
    border-top: 1px solid var(--glass-border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-theme);
}

/* ============================================================
   FORM FIELDS
   Shared across login.html and reservation.html.
   ============================================================ */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.form-label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}
.form-label .optional {
    font-weight: 500;
    color: var(--ink-soft);
    font-size: 12px;
}

.form-input-wrap { position: relative; }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    background-color: var(--color-input-bg);
    border: 1.5px solid var(--color-input-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    transition: var(--transition-theme), border-color 0.25s ease, box-shadow 0.25s ease;
    direction: rtl;
}
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.8; }

.form-input::placeholder,
.form-textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px var(--accent-soft-bg);
}
/* Dark-mode focus override (border-color + box-shadow both switch to the
   electric-blue primary accent) lives in theme.css, loaded after this
   file — focus is a "primary interactive" role there, not the secondary
   burgundy this shared light-mode rule uses. */

.form-input.has-icon { padding-left: 46px; }

.form-input-icon-btn {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.25s ease;
}
.form-input-icon-btn:hover { color: var(--accent-gold); }
.form-input-icon-btn svg { width: 19px; height: 19px; }
.form-input-icon-btn .icon-eye-off { display: none; }
.form-input-icon-btn[aria-pressed="true"] .icon-eye     { display: none; }
.form-input-icon-btn[aria-pressed="true"] .icon-eye-off { display: block; }

/* ---- Phone OTP send/code widgets — the "ارسال کد تأیید" row under a
   phone field and its 6-digit code input. Shared by login.html's
   register/OTP-login/forgot-password forms AND account-settings.html's
   password-change verification (item 5) — moved here from
   css/pages/login.css once a second page needed the exact same widget. ---- */
.auth-otp-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
/* A real filled pill button (the same gradient/shadow recipe as .btn-cta,
   just smaller) rather than a bare, near-invisible ghost text link —
   clearly clickable, clearly "sends something." Overrides the .btn-ghost
   base class still on this element in some markup (background/border/
   color/padding), not just tweaking it. */
.auth-otp-send-btn {
    font-family: var(--font-body);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 16px rgba(93, 13, 24, 0.28);
    transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}
.auth-otp-send-btn:hover { box-shadow: 0 9px 20px rgba(93, 13, 24, 0.4); transform: translateY(-1px); }
.auth-otp-send-btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.auth-otp-status {
    font-size: 12.5px;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}
.auth-otp-code-input {
    letter-spacing: 6px;
    text-align: center;
    font-family: var(--font-mono, monospace);
}

/* Six single-digit boxes (js/otp-input.js). The real input stays in the page, invisible. */
.otp-native { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.otp-boxes { display: flex; gap: 8px; justify-content: flex-start; direction: ltr; max-width: 100%; }
.otp-cell {
    flex: 0 1 46px;
    min-width: 0;
    width: 46px;
    height: 52px;
    padding: 0;
    text-align: center;
    font-family: var(--font-mono, monospace);
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    background-color: var(--color-surface);
    border: 1.5px solid var(--neutral-border);
    border-radius: var(--radius-sm, 10px);
    caret-color: var(--accent-gold);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.otp-cell:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px var(--accent-soft-bg); }
.otp-cell.is-filled { border-color: var(--accent-gold); background-color: var(--accent-soft-bg); }
.otp-cell:disabled { opacity: 0.55; cursor: not-allowed; }
.form-field.is-invalid .otp-cell { border-color: var(--color-error); }
@media (max-width: 380px) { .otp-boxes { gap: 5px; } .otp-cell { height: 46px; font-size: 18px; } }

.form-hint {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.7;
}

/* ---- Password strength meter (register + change-password forms) ----
   Four tiers (ضعیف/متوسط/خوب/قوی) driven by js/data/password-policy.js via
   js/password-strength-ui.js. `min-height` on the root — reserved even
   while hidden's `visibility` swap keeps layout, but here we just accept
   the field growing by one compact row once the user starts typing;
   `.form-field` already has its own vertical rhythm, so this doesn't
   introduce a jump larger than any other conditional error message does. */
.password-strength { margin-top: 8px; }
.password-strength-bar {
    height: 5px;
    border-radius: var(--radius-pill);
    background-color: var(--neutral-soft-bg);
    overflow: hidden;
    margin-bottom: 5px;
}
.password-strength-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: var(--radius-pill);
    transition: width 0.25s ease, background-color 0.25s ease;
    background-color: var(--color-error);
}
.password-strength.is-weak   .password-strength-fill { background-color: var(--color-error); }
.password-strength.is-fair   .password-strength-fill { background-color: var(--color-warning); }
.password-strength.is-good   .password-strength-fill { background-color: var(--accent-gold); }
.password-strength.is-strong .password-strength-fill { background-color: var(--color-success); }
.password-strength-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.password-strength-label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.password-strength.is-weak   .password-strength-label { color: var(--color-error); }
.password-strength.is-fair   .password-strength-label { color: var(--color-warning); }
.password-strength.is-good   .password-strength-label { color: var(--accent-gold); }
.password-strength.is-strong .password-strength-label { color: var(--color-success); }
.password-strength-reqs { font-size: 11px; color: var(--ink-muted); }

.form-error-message {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-error);
}

.form-field.is-invalid .form-input,
.form-field.is-invalid .form-select,
.form-field.is-invalid .form-textarea {
    border-color: var(--color-error);
    background-color: var(--color-error-bg);
}
.form-field.is-invalid .form-error-message { display: flex; }

.form-field.is-valid .form-input,
.form-field.is-valid .form-select {
    border-color: var(--color-success);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Checkbox / remember-me row */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

/* ---- Theme Toggle (desktop: header-actions / .student-topbar /
   .admin-topbar — mobile: bottom sheet). Shared here (not header.css)
   because both dashboards use this control too but don't load
   header.css — this was previously in header.css only, which is why the
   dashboards' toggle rendered with no styling at all (bare browser button
   + two unpositioned raw SVGs stacked on top of each other) until this
   moved. ---- */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--neutral-border);
    border-radius: 50%;
    color: var(--primary-navy);
    cursor: pointer;
    transition: var(--transition-theme), transform 0.3s ease;
}
.theme-toggle:hover {
    background-color: rgba(26, 54, 93, 0.06);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-1px);
}
.theme-toggle svg {
    position: absolute;
    width: 18px;
    height: 18px;
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }

[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* Theme toggle row inside the mobile bottom sheet */
.sheet-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--neutral-border);
}
.sheet-theme-row span {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}
.sheet-theme-row .theme-toggle { border-color: var(--neutral-border); }

/* ---- Header profile avatar + dropdown menu (shown instead of
   ورود/ثبت‌نام in the header once a visitor is signed in — see
   js/global-nav.js's initAuthNav()). Reuses .glass-panel's own
   surface/blur/shadow tokens so it reads as the same "elevated panel"
   language the site already uses, not a new visual system. ---- */
.header-profile { position: relative; }

.header-avatar-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    color: #FFFFFF;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    border: 1px solid var(--neutral-border);
    cursor: pointer;
    transition: var(--transition-theme), transform 0.3s ease;
}
.header-avatar-btn:hover { transform: translateY(-1px); }
.header-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* No backdrop-filter (removed) — see .glass-panel above. */
.header-profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background-color: var(--glass-bg);
    border: 1px solid var(--neutral-border);
    border-top: 1px solid var(--glass-border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-hover);
    padding: 8px;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.header-profile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.header-profile-menu-head {
    padding: 8px 10px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--neutral-border);
}
.header-profile-menu-name {
    display: block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--ink);
}
.header-profile-menu-email {
    display: block;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--ink-soft);
    margin-top: 2px;
    direction: ltr;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.header-profile-menu-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.header-profile-menu-item:hover { background-color: var(--neutral-soft-bg); color: var(--accent-gold); }
.header-profile-menu-item.is-danger:hover { color: var(--color-error); }

/* Mobile bottom-sheet variant: same data, plain stacked rows matching
   .sheet-link's existing treatment instead of a floating panel (there's no
   room to float a menu inside an already-full-height sheet). */
.sheet-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--neutral-border);
}
.sheet-profile-name { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--ink); }
.sheet-profile-email { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); direction: ltr; text-align: right; }

/* ---- "Coming soon" placeholder card — a dashed-border tile naming a
   not-yet-built feature. Shared by the admin dashboard's future-modules
   grid and account-settings.html's future-settings grid; each page
   supplies its own grid wrapper class (layout only), this is just the
   card. ---- */
.future-feature-card {
    background-color: var(--neutral-soft-bg);
    border: 1.5px dashed var(--neutral-border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
.future-feature-card svg { width: 26px; height: 26px; color: var(--ink-muted); }
.future-feature-card span {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
}

/* ---- Inline alert / toast banner (success, error, info states) ---- */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.8;
}
.alert-banner svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert-banner.alert-success { background-color: var(--color-success-bg); color: var(--color-success); }
.alert-banner.alert-error   { background-color: var(--color-error-bg);   color: var(--color-error); }
.alert-banner.alert-warning { background-color: var(--color-warning-bg); color: var(--color-warning); }

/* ---- Success state panel (reservation confirmation) ---- */
.success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 20px 10px;
}
.success-panel .success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-success-bg);
    color: var(--color-success);
}
.success-panel .success-icon svg { width: 34px; height: 34px; }
.success-panel h3 {
    font-family: var(--font-display-fa);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}
.success-panel p {
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 2;
    margin: 0;
    max-width: 420px;
}

/* ---- Back to Top ----
   Fixed floating button; hidden near the top of the page, fades/lifts in
   once the user has scrolled down. Kept small and out of the way of
   footer content (bottom-left, well clear of the mobile bottom sheet).
   No backdrop-filter (removed) — see .glass-panel above; this one reuses
   --header-glass-bg instead of --glass-bg since it's a small chrome
   element, same family as the header pill it visually matches. */
.back-to-top-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--header-glass-bg);
    border: 1px solid var(--neutral-border);
    color: var(--primary-navy);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                visibility 0.35s ease, background-color 0.4s ease, border-color 0.4s ease;
}
.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.back-to-top-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-3px) scale(1.05);
}
.back-to-top-btn.is-visible:hover { transform: translateY(-3px) scale(1.05); }
.back-to-top-btn svg { width: 19px; height: 19px; }

@media (max-width: 768px) {
    .back-to-top-btn { left: 14px; bottom: 14px; width: 42px; height: 42px; }
    .back-to-top-btn svg { width: 17px; height: 17px; }
}

/* ---- Contact item (icon badge + label + value) ----
   Originally footer-only; moved here so any footer-free page can reuse the
   exact same row (phone/Telegram/etc.) without pulling in all of footer.css
   just for it. */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.4s ease;
}
.footer-contact-item:hover {
    border-color: var(--accent-gold);
    transform: translateX(-3px);
}
.footer-contact-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
}
[data-theme="dark"] .footer-contact-icon { background-color: var(--accent-soft-bg); }
.footer-contact-icon svg { width: 18px; height: 18px; }
.footer-contact-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.footer-contact-text strong {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ink);
}
/* Values: Persian lines (a note, an address) in the site's own font; the
   Latin ones — number, @handle, e-mail, marked dir="ltr" — in Inter
   (loaded on every page with the Google Fonts link), kept right-aligned
   and bidi-isolated inside the RTL card. */
.footer-contact-text span {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}
.footer-contact-text span[dir="ltr"] {
    font-family: 'Inter', var(--font-body);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.1px;
    text-align: right;
    unicode-bidi: isolate;
}

/* ---- "Back to Home" link (used at the top of footer-free interior pages
   that need a more explicit way home than just the header logo, e.g.
   reservation.html) ---- */
.btn-ghost svg { width: 15px; height: 15px; transition: transform 0.3s ease; }
.btn-ghost:hover svg { transform: translateX(3px); }

/* ---- Urgent contact CTA (reservation page) ----
   Deliberately NOT the same red family as the brand accent, and NOT a
   solid heavy fill at rest like `.btn-dark-reserve` — a calmer, bordered
   "alert" tint by default (professional, not alarming) that intensifies to
   a solid fill only on hover/open, using the design system's semantic
   error tokens so it reads as "urgent" without inventing a new color. */
.urgent-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 14px 28px;
    border-radius: 100px;
    border: 1.5px solid var(--color-error);
    background-color: var(--color-error-bg);
    color: var(--color-error);
    font-family: var(--font-display-fa);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.urgent-cta:hover,
.urgent-cta[aria-expanded="true"] {
    background-color: var(--color-error);
    border-color: var(--color-error);
    color: #FFFFFF;
    box-shadow: 0 12px 25px rgba(192, 54, 44, 0.35);
    transform: translateY(-2px);
}
.urgent-cta-icon { display: flex; flex-shrink: 0; }
.urgent-cta-icon svg { width: 18px; height: 18px; }

/* ---- Urgent contact inline panel ----
   Opens in place (no overlay/backdrop) right below the CTA, inside the
   same reservation-form-panel card. Two internal states — the contact-
   method form, and a success message that replaces it — exactly like the
   main reservation form/success-panel pair above it. */
.urgent-panel {
    margin-top: 16px;
    padding: 22px;
    background-color: var(--color-error-bg);
    border: 1.5px solid var(--color-error);
    border-radius: var(--radius-md);
    animation: urgent-panel-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes urgent-panel-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.urgent-panel h3 {
    font-family: var(--font-display-fa);
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0 0 8px;
}
.urgent-panel-desc {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-soft);
    margin: 0 0 18px;
}
.urgent-panel-form .form-field { margin-bottom: 14px; }
.urgent-panel-error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-error);
    margin: -4px 0 14px;
}
.urgent-panel-submit { width: 100%; font-size: 16px; padding: 14px 30px; }
/* Reuses `.success-panel`'s icon/heading/text styling verbatim; only the
   outer padding is trimmed since it's nesting inside `.urgent-panel`'s own
   22px padding already. */
.urgent-panel .success-panel { padding: 4px 4px 0; }

@media (prefers-reduced-motion: reduce) {
    .urgent-panel { animation: none; }
}

/* ============================================================
   FEEDBACK & SUGGESTIONS — shared pieces between the student dashboard's
   wizard (css/pages/student-dashboard.css) and the public feedback.html
   page (css/pages/feedback.css): the category pill button, the message
   textarea's character counter, and the review-step card + privacy note.
   Moved here once a second surface needed the exact same components,
   same reasoning as this file's own .auth-otp-* rules above.
   ============================================================ */
.feedback-category-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px;
    background-color: var(--neutral-soft-bg);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    text-align: right;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}
.feedback-category-btn:hover {
    border-color: var(--accent-gold);
    background-color: var(--accent-soft-bg);
    transform: translateY(-1px);
}
.feedback-category-btn.is-selected {
    border-color: var(--accent-gold);
    background-color: var(--accent-soft-bg);
}
.feedback-category-icon { font-size: 19px; line-height: 1; flex-shrink: 0; }

.feedback-message-textarea { min-height: 140px; }
.feedback-char-count {
    display: block;
    margin-top: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--ink-muted);
    text-align: left;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.feedback-review-card {
    background-color: var(--neutral-soft-bg);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}
.feedback-review-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-review-label {
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-muted);
    flex-shrink: 0;
}
.feedback-review-value { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--ink); }
.feedback-review-message { display: flex; flex-direction: column; gap: 6px; }
.feedback-review-message p {
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--ink);
    line-height: 1.8;
    white-space: pre-wrap;
    margin: 0;
}

.feedback-privacy-note {
    border: 1.5px dashed var(--neutral-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
}
.feedback-privacy-note h4 {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0 0 8px;
}
.feedback-privacy-note ul { margin: 0; padding-right: 18px; display: flex; flex-direction: column; gap: 5px; }
.feedback-privacy-note li { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); line-height: 1.7; }

/* ============================================================
   PAGE LOADER — shared by index.html and login.html (see the HTML
   comment above #pageLoader in index.html, and js/page-loader.js). `--bg-base` already switches
   with [data-theme="dark"] (set on <html> before paint by
   theme-init.js), so this never flashes the wrong theme's color.
   ============================================================ */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background-color: var(--bg-base);
    transition: opacity 0.4s ease, visibility 0.4s ease;
    /* Pure-CSS fail-safe: hides itself after 8s no matter what, even if
       every script on the page (including js/page-loader.js itself)
       fails to run at all — a loading screen must never be able to trap
       a visitor behind it forever. js/page-loader.js normally removes
       the element from the DOM well before this ever has a chance to
       fire (as soon as the page has actually finished loading). */
    animation: page-loader-failsafe-hide 0.4s ease 8s forwards;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes page-loader-failsafe-hide {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.page-loader-logo {
    font-family: var(--font-display-fa);
    font-weight: 800;
    font-size: 19px;
    color: var(--primary-navy);
}
.page-loader-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--neutral-border);
    border-top-color: var(--accent-gold);
    animation: page-loader-spin 0.8s linear infinite;
}
@keyframes page-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .page-loader-spinner { animation-duration: 2.4s; }
    /* Still fires at the same 8s mark (the fail-safe itself must never be
       skipped) — just an instant cut instead of a fade. */
    .page-loader { animation-duration: 0.01s; }
}
