/* ═══════════════════════════════════════════════════════════════
   سالن زیبایی اپرا — Base CSS (مشترک بین همه صفحات)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ═══════════════════════════════════════════════════════════════
       پالت برند Opera Barbershop (مشترک در هر دو تم)
       آبی سلطنتی + قرمز + زرد + حلقه طلایی برنجی
       ═══════════════════════════════════════════════════════════════ */
    --blue: #1f4aa0;          /* آبی سلطنتی لوگو، رنگ اصلی برند */
    --blue-deep: #12327a;     /* آبی عمیق‌تر برای hover/active و متن روی زمینه روشن */
    --blue-light: #4f7fe0;    /* آبی روشن‌تر برای خوانایی روی زمینه تیره */
    --blue-dim: rgba(31, 74, 160, 0.15);

    --red: #d4202f;           /* قرمز لوگو، رنگ تأکیدی ثانویه */
    --red-deep: #a8161f;
    --red-dim: rgba(212, 32, 47, 0.12);

    /* توکن‌های طلایی برنجی Antique Brass Gold (مشترک در هر دو تم) */
    --gold: #bb8f4a;          /* طلایی برنجی عتیقه، رنگ تأکید و CTA اصلی */
    --gold-light: #d9b06e;    /* طلایی روشن برای گرادیان دکمه‌ها و هاور */
    --gold-deep: #9c7128;     /* طلایی تیره برای کنتراست متن در تم روشن */
    --gold-dim: rgba(187, 143, 74, 0.16);

    /* رنگ‌های وضعیت */
    --success: #2e9e6b;
    --warning: var(--gold);
    --error: #c81e2e;
    --info: var(--blue-light);

    /* گرادیان جداکننده تزئینی سه رنگ لوگو: آبی ← طلایی ← قرمز */
    --divider-gradient: linear-gradient(90deg, var(--blue), var(--gold), var(--red));

    /* ─── توکن‌های کنتراست متن روی رنگ (WCAG Contrast Tokens) ─── */
    --on-gold: #1a1208;             /* متن و آیکون تیره روی زمینه طلایی (کنتراست بالای 6:1) */
    --on-gold-hover: #080502;
    --on-blue: #ffffff;             /* متن و آیکون سفید روی زمینه آبی */
    --on-red: #ffffff;              /* متن و آیکون سفید روی زمینه قرمز */
    --text-gold-on-light: #7a5618;  /* متن طلایی تیره روی زمینه روشن (کنتراست بالای 6.2:1) */
    --text-gold-on-dark: #d9b06e;   /* متن طلایی روشن فقط روی زمینه تیره (کنتراست بالای 9:1) */

    /* ─── حالت تاریک (Dark Mode) — سرمه‌ای شبانه شبانه به جای مشکی تخت ─── */
    --bg: #0b1330;
    --bg-dark: #0b1330;
    --bg-darker: #060a1c;
    --bg-alt: #060a1c;
    --bg-section-alt: rgba(6, 10, 28, 0.72);
    --bg-card: rgba(18, 30, 70, 0.72);
    --bg-card-2: rgba(24, 38, 85, 0.85);

    --text-title: #fdf8ea;
    --text: #e6e9f5;
    --text-muted: #9aa3c4;
    --border: rgba(187, 143, 74, 0.25);
    --border-strong: rgba(187, 143, 74, 0.5);
    --primary: var(--blue-light);
    --accent: var(--gold);
    --link-hover: var(--gold-light);

    --radius: 18px;
    --font: 'Vazirmatn', Tahoma, sans-serif;
    --font-display: 'Vazirmatn', Tahoma, sans-serif;

    /* Glass & Shadows */
    --glass: rgba(18, 30, 70, 0.72);
    --glass-2: rgba(24, 38, 85, 0.8);
    --glass-navbar: rgba(11, 19, 48, 0.88);
    --navbar-initial-bg: rgba(6, 10, 28, 0.80);
    --glass-blur: 12px;
    --shadow-card: 0 16px 34px -12px rgba(0, 0, 0, 0.65);

    /* Hero Overlays & Background Images */
    --hero-bg-color: #060a1c;
    --hero-image: url('/images/hero-poster3.webp');
    --hero-image-fallback: url('/images/hero-poster3.jpg');
    --hero-image-mobile: url('/images/hero-poster3-mobile.webp');
    --hero-overlay: radial-gradient(ellipse at center, transparent 40%, rgba(6, 10, 28, 0.55) 100%),
        linear-gradient(to bottom, rgba(6, 10, 28, 0.72) 0%, rgba(6, 10, 28, 0.50) 35%, rgba(6, 10, 28, 0.55) 65%, rgba(6, 10, 28, 0.92) 100%);
    --hero-video-filter: brightness(0.95) contrast(1.04);
    --title-gradient: linear-gradient(135deg, #ffffff 30%, var(--gold) 100%);
}

[data-theme="light"] {
    /* ─── حالت روشن (Light Mode) — کرم/عاجی زمینه لوگوی Opera Barbershop ─── */
    --bg: #fbf7ec;
    --bg-dark: #fbf7ec;
    --bg-darker: #f3ecda;
    --bg-alt: #f3ecda;
    --bg-section-alt: #f3ecda;
    --bg-card: #fffdf7;
    --bg-card-2: #fffdf7;

    --text-title: #0f1f4d;    /* آبی سرمه‌ای تیره برای تیترها */
    --text: #26304d;
    --text-muted: #4e5672;    /* کنتراست بهینه برای متن فرعی بالای 5.8:1 */
    --border: rgba(187, 143, 74, 0.35);   /* حاشیه طلایی برنجی ظریف */
    --border-strong: rgba(187, 143, 74, 0.6);
    --primary: var(--blue-deep);
    --accent: #7a5618;
    --warning: #7a5618;
    --link-hover: #12327a;

    --gold: #bb8f4a;
    --gold-light: #d9b06e;
    --gold-deep: #7a5618;     /* طلایی تیره جهت کنتراست بالای 6.2:1 */
    --gold-dim: rgba(187, 143, 74, 0.16);

    --on-gold: #1a1208;
    --on-gold-hover: #080502;
    --on-blue: #ffffff;
    --on-red: #ffffff;
    --text-gold-on-light: #7a5618;
    --text-gold-on-dark: #d9b06e;

    --glass: #fffdf7;
    --glass-2: #fffdf7;
    --glass-navbar: rgba(251, 247, 236, 0.94);
    --navbar-initial-bg: rgba(251, 247, 236, 0.85);
    --glass-blur: 12px;
    --shadow-card: 0 10px 26px -6px rgba(15, 31, 77, 0.08), 0 4px 12px rgba(15, 31, 77, 0.04);

    --hero-bg-color: #fbf7ec;
    --hero-image: url('/images/hero-poster2.webp');
    --hero-image-fallback: url('/images/hero-poster2.jpg');
    --hero-image-mobile: url('/images/hero-poster2-mobile.webp');
    --hero-overlay: linear-gradient(to bottom, rgba(251, 247, 236, 0.85) 0%, rgba(251, 247, 236, 0.50) 30%, rgba(251, 247, 236, 0.55) 65%, rgba(251, 247, 236, 0.92) 100%);
    --hero-video-filter: brightness(0.96) contrast(1.02);
    --title-gradient: linear-gradient(135deg, #12327a 20%, #1f4aa0 55%, #d4202f 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Native momentum scroll for 60-120fps smoothness without artificial wheel fighting */
html {
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* GPU Hardware Acceleration Hints — strictly on transforming layers */
.tilt-card,
.hero-image-fallback,
#global-bg-canvas {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════════════════
   پس‌زمینه زنده سراسری (Three.js) — پشت تمام محتوای هر صفحه
   ═══════════════════════════════════════════════════════════════ */
#global-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: block;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: var(--link-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: var(--font);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 74, 160, .25);
    outline: none;
}

::selection {
    background: var(--gold);
    color: #241a0d;
}

/* ─── اسکرول‌بار ───────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--blue-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ─── دکمه‌های مشترک ───────────────────────────────────────────── */
.btn-primary,
.btn-gold,
.btn-ghost,
.btn-secondary,
.btn-outline,
.btn-danger,
.btn-ai,
.btn-add-new,
.btn-auth,
.btn-xl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    transition: all .25s ease;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
}

/* ─── ۱) دکمه‌های با زمینه طلایی (همیشه متن و آیکون تیره --on-gold) ─── */
.btn-primary,
.btn-gold,
.btn-add-new,
.btn-auth,
.btn-ai,
.btn-next,
.btn-confirm,
.drawer-btn-vip {
    background: linear-gradient(135deg, var(--gold-light), var(--gold)) !important;
    color: var(--on-gold) !important;
    border: none !important;
    text-shadow: none !important;
    box-shadow: 0 4px 18px rgba(187, 143, 74, 0.35);
}

.btn-primary *,
.btn-gold *,
.btn-add-new *,
.btn-auth *,
.btn-ai *,
.btn-next *,
.btn-confirm *,
.drawer-btn-vip *,
.btn-primary span,
.btn-gold span,
.btn-add-new span,
.btn-auth span,
.btn-ai span,
.btn-primary i,
.btn-gold i,
.btn-add-new i,
.btn-auth i {
    color: var(--on-gold) !important;
}

.btn-primary svg,
.btn-gold svg,
.btn-add-new svg,
.btn-auth svg,
.btn-ai svg,
.drawer-btn-vip svg {
    color: var(--on-gold) !important;
    stroke: currentColor !important;
}

.btn-primary:hover,
.btn-gold:hover,
.btn-add-new:hover,
.btn-auth:hover,
.btn-ai:hover,
.btn-next:hover,
.btn-confirm:hover,
.drawer-btn-vip:hover,
.btn-primary:focus,
.btn-gold:focus,
.btn-add-new:focus,
.btn-auth:focus,
.btn-primary:active,
.btn-gold:active,
.btn-add-new:active,
.btn-primary:visited,
.btn-gold:visited,
.btn-add-new:visited,
.btn-primary:focus-visible,
.btn-gold:focus-visible,
.btn-add-new:focus-visible {
    background: linear-gradient(135deg, #e4be7e, #c49954) !important;
    color: var(--on-gold-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -8px rgba(187, 143, 74, .55);
}

.btn-primary:hover *,
.btn-gold:hover *,
.btn-add-new:hover *,
.btn-auth:hover *,
.btn-ai:hover *,
.btn-next:hover *,
.btn-confirm:hover *,
.drawer-btn-vip:hover *,
.btn-primary:focus *,
.btn-gold:focus *,
.btn-add-new:focus *,
.btn-primary:active *,
.btn-gold:active *,
.btn-primary:visited *,
.btn-gold:visited *,
.btn-primary:focus-visible *,
.btn-gold:focus-visible * {
    color: var(--on-gold-hover) !important;
    stroke: currentColor !important;
}

.btn-primary:disabled,
.btn-gold:disabled,
.btn-add-new:disabled,
.btn-ai:disabled,
.btn-next:disabled,
.btn-confirm:disabled,
.btn-primary[disabled],
.btn-gold[disabled],
.btn-add-new[disabled] {
    opacity: .55 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    color: var(--on-gold) !important;
}

.btn-primary:disabled *,
.btn-gold:disabled *,
.btn-add-new:disabled * {
    color: var(--on-gold) !important;
}

/* ─── ۲) دکمه‌های با زمینه آبی (همیشه متن و آیکون سفید --on-blue) ─── */
.btn-secondary {
    background: var(--blue) !important;
    border: 1px solid var(--blue) !important;
    color: var(--on-blue) !important;
    box-shadow: 0 4px 15px var(--blue-dim);
}

.btn-secondary *,
.btn-secondary span,
.btn-secondary i {
    color: var(--on-blue) !important;
}

.btn-secondary svg {
    color: var(--on-blue) !important;
    stroke: currentColor !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary:visited,
.btn-secondary:focus-visible {
    background: var(--blue-deep) !important;
    border-color: var(--blue-deep) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -6px rgba(18, 50, 122, 0.45);
}

.btn-secondary:hover *,
.btn-secondary:focus *,
.btn-secondary:active *,
.btn-secondary:visited *,
.btn-secondary:focus-visible * {
    color: #ffffff !important;
    stroke: currentColor !important;
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
    opacity: .55 !important;
    cursor: not-allowed !important;
    transform: none !important;
    color: var(--on-blue) !important;
}

/* ─── ۳) دکمه‌های با زمینه قرمز (همیشه متن و آیکون سفید --on-red) ─── */
.btn-danger {
    background: var(--red) !important;
    color: var(--on-red) !important;
    border: 1px solid var(--red) !important;
    box-shadow: 0 4px 15px var(--red-dim);
}

.btn-danger *,
.btn-danger span,
.btn-danger i {
    color: var(--on-red) !important;
}

.btn-danger svg {
    color: var(--on-red) !important;
    stroke: currentColor !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger:visited,
.btn-danger:focus-visible {
    background: var(--red-deep) !important;
    border-color: var(--red-deep) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-danger:hover *,
.btn-danger:focus *,
.btn-danger:active *,
.btn-danger:visited *,
.btn-danger:focus-visible * {
    color: #ffffff !important;
    stroke: currentColor !important;
}

/* ─── ۴) دکمه‌های شفاف و اوت‌لاین (Ghost & Outline) ─── */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--blue);
    color: var(--primary);
}

[data-theme="light"] .btn-ghost {
    background: rgba(15, 31, 77, 0.04);
    border-color: var(--border-strong);
    color: var(--text-title);
}

[data-theme="light"] .btn-ghost:hover {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue-deep);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--text-gold-on-dark);
    width: 100%;
}

.btn-outline:hover {
    background: var(--gold-dim);
    color: #ffffff;
    border-color: var(--gold-light);
}

[data-theme="light"] .btn-outline {
    border: 1.5px solid var(--gold-deep);
    color: var(--text-gold-on-light);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(122, 86, 24, 0.1);
    color: #523a0f;
    border-color: #523a0f;
}

.btn-xl {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* ─── باکس‌های وضعیت (خطا/موفقیت) ─────────────────────────────── */
.auth-error {
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .2);
    color: var(--error);
    padding: .9rem 1.1rem;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 1.2rem;
}

/* ─── Reveal Animations (مشترک با GSAP) ───────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all .8s cubic-bezier(.16, 1, .3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger {
    opacity: 0;
    transform: translateY(30px) scale(.96);
    transition: all .6s cubic-bezier(.16, 1, .3, 1);
}

.reveal-stagger.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ─── Empty state عمومی ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: .5;
}

/* ─── ریسپانسیو پایه ───────────────────────────────────────────── */
@media (max-width: 768px) {

    .btn-primary,
    .btn-gold,
    .btn-ghost,
    .btn-secondary {
        padding: .75rem 1.4rem;
        font-size: .88rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM SELECT (cs-*)
   ═══════════════════════════════════════════════════════════════ */
.cs-wrap {
    position: relative;
    width: 100%;
}

.cs-native {
    position: absolute !important;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.cs-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 1rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .9rem;
    font-family: var(--font);
    transition: all .2s ease;
}

.cs-trigger:hover {
    border-color: var(--blue);
}

.cs-wrap.open .cs-trigger {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 74, 160, .25);
}

.cs-trigger-arrow {
    color: var(--gold);
    font-size: .75rem;
    transition: transform .25s ease;
    margin-right: .5rem;
}

.cs-wrap.open .cs-trigger-arrow {
    transform: rotate(180deg);
}

.cs-trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-panel {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    left: 0;
    z-index: 60;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 45px -12px rgba(15, 31, 77, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transition: all .2s cubic-bezier(.16, 1, .3, 1);
    max-height: 260px;
    overflow-y: auto;
    padding: .4rem;
}

.cs-wrap.open .cs-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cs-list {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.cs-option {
    list-style: none;
    padding: .7rem .9rem;
    border-radius: 8px;
    font-size: .87rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s ease;
}

.cs-option:hover {
    background: var(--blue-dim);
    color: var(--primary);
}

.cs-option.selected {
    background: var(--gold-dim);
    color: var(--text-title);
    font-weight: 700;
}

.cs-option.disabled {
    opacity: .35;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM FILE UPLOAD (cf-*)
   ═══════════════════════════════════════════════════════════════ */
.cf-wrap {
    width: 100%;
}

.cf-native {
    position: absolute !important;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.cf-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-align: center;
    cursor: pointer;
    border: 1.5px dashed var(--border);
    border-radius: 14px;
    padding: 2rem 1.2rem;
    background: var(--bg-card);
    transition: all .25s ease;
    min-height: 160px;
}

.cf-zone:hover,
.cf-zone.dragover {
    border-color: var(--blue);
    background: var(--blue-dim);
}

.cf-icon {
    font-size: 2.2rem;
    opacity: .8;
    color: var(--gold);
}

.cf-title {
    font-size: .88rem;
    font-weight: 700;
}

.cf-sub {
    font-size: .76rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

.cf-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: 14px;
    overflow: hidden;
}

.cf-preview img,
.cf-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-filename {
    padding: 1rem;
    font-size: .85rem;
    color: var(--text);
}

.cf-zone.has-file {
    padding: 0;
    min-height: 180px;
}

.cf-remove {
    position: absolute;
    top: .6rem;
    left: .6rem;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(6, 10, 28, .75);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    backdrop-filter: blur(4px);
}

.cf-remove:hover {
    background: var(--error);
}

/* ═══════════════════════════════════════════════════════════════
   تقویم شمسی (jdp-*) — هماهنگ با طراحی Opera Barbershop
   ═══════════════════════════════════════════════════════════════ */
[data-jalali-picker] {
    position: relative;
}

.jdp-display-input {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .9rem;
    font-family: var(--font);
}

.jdp-display-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 74, 160, .25);
    outline: none;
}

.jdp-popup {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    z-index: 80;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 24px 50px -14px rgba(15, 31, 77, .35);
    padding: 1.1rem;
    opacity: 0;
    transform: translateY(-10px) scale(.97);
    transition: all .18s cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
}

.jdp-popup.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.jdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
}

.jdp-title {
    font-size: .95rem;
    font-weight: 800;
    color: #fbf7ec;
}

.jdp-nav {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--gold-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.jdp-nav:hover {
    background: var(--gold);
    color: var(--on-gold) !important;
    border-color: var(--gold);
}

.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: .4rem;
}

.jdp-weekdays div {
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
    padding: .3rem 0;
    font-weight: 600;
}

.jdp-weekdays div:last-child {
    color: var(--red);
    font-weight: 700;
}

.jdp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.jdp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: .8rem;
    color: var(--text);
    background: transparent;
    transition: all .15s ease;
}

.jdp-day:not(.empty):not(.disabled):hover {
    background: var(--blue-dim);
    color: var(--primary);
}

.jdp-day.today {
    border: 1.5px solid var(--gold);
    color: var(--text-gold-on-dark);
    font-weight: 700;
}

[data-theme="light"] .jdp-day.today {
    color: var(--text-gold-on-light);
}

.jdp-day.selected {
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(31, 74, 160, 0.4);
}

.jdp-day.disabled {
    opacity: .35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.jdp-day.empty {
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   نوار پیشرفت اسکرول
   ═══════════════════════════════════════════════════════════════ */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    z-index: 9997;
    background: var(--divider-gradient);
    box-shadow: 0 0 12px rgba(187, 143, 74, .6);
    transition: width .1s linear;
}

/* ═══════════════════════════════════════════════════════════════
   شیمر روی متن (کلاس عمومی .text-shimmer)
   ═══════════════════════════════════════════════════════════════ */
.text-shimmer {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 25%, #fff 50%, var(--gold-light) 75%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerMove 3.5s linear infinite;
}

@keyframes shimmerMove {
    to {
        background-position: -200% center;
    }
}

/* ─── جداکنندهٔ موج مو بین سکشن‌ها ──────────────────────────────── */
.hair-divider {
    display: block;
    width: 100%;
    height: 40px;
    margin: -1px 0;
}

.hair-divider path {
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    opacity: .45;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.6s cubic-bezier(.16, 1, .3, 1);
}

.hair-divider.visible path {
    stroke-dashoffset: 0;
}

/* ─── جداکنندهٔ امضادار: بخیهٔ پارچه ── */
.seam-divider {
    position: relative;
    height: 56px;
    margin: -1px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.seam-divider::before {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    top: 50%;
    height: 1px;
    background: var(--border-strong);
}

.seam-divider::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    top: calc(50% - 5px);
    height: 10px;
    background-image: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 6px, transparent 6px, transparent 16px);
    opacity: .6;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.seam-divider .seam-mark {
    position: relative;
    z-index: 1;
    background: var(--bg);
    color: var(--gold);
    font-size: .8rem;
    letter-spacing: 3px;
    padding: 0 1.2rem;
    font-weight: 600;
}

/* خط جداکننده تزئینی سه رنگ لوگوی اپرا (سبیل اپرا) */
.brand-divider {
    display: block;
    width: 100%;
    max-width: 140px;
    height: 3px;
    border-radius: 999px;
    margin: 1.2rem auto;
    background: var(--divider-gradient);
    box-shadow: 0 2px 10px rgba(31, 74, 160, 0.25);
}

@media (max-width: 640px) {
    .jdp-popup {
        width: 260px;
    }
}

/* ── دکمه تغییر تم (Dark/Light) ── */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    color: var(--text-gold-on-dark);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--glass-2);
    border-color: var(--gold);
    color: #ffffff;
}

[data-theme="light"] .theme-toggle-btn {
    color: var(--text-gold-on-light) !important;
    border-color: var(--border-strong) !important;
}

[data-theme="light"] .theme-toggle-btn:hover {
    color: #523a0f !important;
    border-color: var(--gold-deep) !important;
}

@media (max-width: 968px) {
    .theme-toggle-btn {
        top: auto;
        bottom: 22px;
        left: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        background: var(--bg-card);
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
        border: 1.5px solid var(--border-strong);
    }
}

/* ═══════════════════════════════════════════════════════════════
   7. LUXURY CUSTOM MODAL & CONFIRM DIALOG (Opera Barbershop)
   ═══════════════════════════════════════════════════════════════ */
.im-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(6, 10, 28, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.im-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.im-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 2.2rem 2rem 1.8rem;
    box-shadow: 0 30px 70px rgba(6, 10, 28, 0.7), 0 0 30px rgba(31, 74, 160, 0.15);
    transform: scale(0.9) translateY(16px);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    color: var(--text);
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.im-modal-overlay.active .im-modal-card {
    transform: scale(1) translateY(0);
}

.im-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.im-modal-card.type-danger::before {
    background: linear-gradient(90deg, transparent, var(--error), transparent);
}

.im-modal-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--blue-dim);
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    box-shadow: 0 8px 24px rgba(31, 74, 160, 0.2);
}

.im-modal-card.type-danger .im-modal-badge {
    background: var(--red-dim);
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 8px 24px rgba(212, 32, 47, 0.25);
}

.im-modal-card.type-success .im-modal-badge {
    background: rgba(46, 158, 107, 0.15);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 8px 24px rgba(46, 158, 107, 0.25);
}

.im-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.im-modal-msg {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.8rem;
    word-break: break-word;
}

.im-modal-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
}

.im-modal-btn {
    flex: 1;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    border: none;
    outline: none;
}

.im-modal-btn-cancel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.im-modal-btn-cancel:hover {
    background: var(--bg-alt);
    border-color: var(--text-muted);
}

.im-modal-btn-confirm {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%) !important;
    color: var(--on-gold) !important;
    box-shadow: 0 6px 20px rgba(187, 143, 74, 0.35);
}

.im-modal-btn-confirm *,
.im-modal-btn-confirm:hover *,
.im-modal-btn-confirm:focus * {
    color: var(--on-gold) !important;
    stroke: currentColor !important;
}

.im-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(187, 143, 74, 0.5);
    color: var(--on-gold-hover) !important;
}

.im-modal-card.type-danger .im-modal-btn-confirm {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(212, 32, 47, 0.35);
}

.im-modal-card.type-danger .im-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 32, 47, 0.5);
}

/* ─── PERSIAN FORM VALIDATION BADGES ───────────────────────────── */
.persian-input-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(200, 30, 46, 0.25) !important;
    animation: shakeField 0.35s ease-in-out;
}

@keyframes shakeField {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

.persian-field-error {
    color: var(--error);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    direction: rtl;
    text-align: right;
    animation: fadeInError 0.25s ease-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}