/* ==========================================================================
   دارایی هوشمند — Design System
   1. Tokens   2. Base   3. Buttons   4. Navbar   5. Hero   6. Sections
   7. Cards    8. Panels & tables     9. Forms   10. Auth   11. Footer
   12. Utilities / motion / responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink: #0a1730;
  --ink-2: #25324a;
  --muted: #6b7a90;
  --line: #e6ecf6;
  --line-2: #d7e2f2;
  --bg: #f4f7fc;
  --surface: #ffffff;

  --brand: #1f5eff;
  --brand-600: #0f3ecf;
  --brand-soft: #eaf1ff;
  --brand-tint: #f5f8ff;

  --teal: #00b3a4;
  --gold: #f0b429;
  --pos: #0f9d63;
  --pos-soft: #e6f7ef;
  --neg: #e5484d;
  --neg-soft: #fdecec;

  --navy-900: #050e22;
  --navy-800: #071129;
  --navy-700: #0a1f45;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(10, 23, 48, .05), 0 10px 26px -20px rgba(10, 23, 48, .45);
  --shadow-md: 0 18px 42px -26px rgba(10, 23, 48, .5);
  --shadow-lg: 0 44px 90px -46px rgba(5, 14, 34, .65);

  --font: 'Vazirmatn', Tahoma, system-ui, -apple-system, sans-serif;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 38rem at 88% -12%, rgba(31, 94, 255, .10), transparent 62%),
    radial-gradient(42rem 32rem at 2% 2%, rgba(0, 179, 164, .08), transparent 60%);
}

.site-main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 { font-weight: 800; letter-spacing: -.2px; color: var(--ink); }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

::selection { background: rgba(31, 94, 255, .18); }

.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  top: -100px;
  background: #fff;
  padding: .6rem 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 2000;
  font-weight: 700;
  font-size: .85rem;
  transition: top .2s ease;
}
.skip-link:focus { top: .75rem; }

/* 3. Buttons --------------------------------------------------------------- */
.btn {
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  padding: .64rem 1.25rem;
  font-size: .9rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(31, 94, 255, .22); }
.btn-sm { padding: .45rem .9rem; font-size: .8rem; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1rem; }

.btn-brand {
  background: linear-gradient(112deg, var(--brand), var(--brand-600));
  color: #fff;
  border: 0;
  box-shadow: 0 16px 30px -18px rgba(31, 94, 255, .95);
}
.btn-brand:hover, .btn-brand:focus { color: #fff; transform: translateY(-1px); box-shadow: 0 20px 36px -18px rgba(31, 94, 255, 1); }

.btn-soft { background: var(--brand-soft); color: var(--brand); border: 1px solid #d9e5ff; }
.btn-soft:hover { background: #dde8ff; color: var(--brand-600); border-color: #c5d7fb; }

.btn-line { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
.btn-line:hover { background: var(--brand-tint); border-color: #b9cbe6; color: var(--ink); }

.btn-danger-soft { background: var(--neg-soft); border: 1px solid #f7d4d5; color: #c0363b; }
.btn-danger-soft:hover { background: #fbdcdd; color: #a52328; border-color: #f0bfc1; }

.btn-white { background: #fff; color: var(--navy-900); box-shadow: 0 18px 34px -22px rgba(0, 0, 0, .8); }
.btn-white:hover { color: var(--navy-900); background: #f2f6ff; transform: translateY(-1px); }

.btn-glass { background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .20); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .32); }

/* 4. Navbar ---------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-nav.is-scrolled { box-shadow: 0 14px 34px -26px rgba(10, 23, 48, .75); background: rgba(255, 255, 255, .94); }

.site-nav .nav-inner { display: flex; align-items: center; gap: .75rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #7b3bff 58%, var(--teal) 100%);
  box-shadow: 0 12px 26px -14px rgba(31, 94, 255, .95);
  flex: 0 0 auto;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { line-height: 1.15; font-weight: 800; font-size: 1.02rem; }
.brand-text small { display: block; font-size: .62rem; font-weight: 600; color: var(--muted); letter-spacing: .14em; margin-top: .18rem; }

.nav-pills-list { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-pills-list a {
  display: inline-flex; align-items: center;
  padding: .48rem .82rem; border-radius: 999px;
  font-size: .87rem; font-weight: 600; color: #48566d;
  transition: background .18s ease, color .18s ease;
}
.nav-pills-list a:hover { background: #eef3fb; color: var(--ink); }
.nav-pills-list a.active { background: var(--brand-soft); color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.nav-guest-note { font-size: .78rem; color: var(--muted); }

.nav-toggle {
  margin-inline-start: auto;
  width: 42px; height: 42px;
  display: none; place-items: center; gap: 4px;
  flex-direction: column;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
}
.nav-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: var(--ink-2); }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 991.98px) {
  .nav-toggle { display: flex; }
  .site-nav .navbar-collapse { border-top: 1px solid var(--line); margin-top: .75rem; padding-block: .85rem; }
  .nav-pills-list { flex-direction: column; align-items: stretch; gap: .15rem; width: 100%; }
  .nav-pills-list a { padding: .68rem .85rem; border-radius: 12px; }
  .nav-actions { margin-top: .85rem; }
  .nav-actions .btn, .nav-actions form { width: 100%; }
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 32px;
  padding: clamp(2rem, 4.6vw, 4rem);
  color: #fff;
  background:
    radial-gradient(70rem 46rem at 100% 0%, #123b8f 0%, transparent 58%),
    radial-gradient(46rem 40rem at 0% 100%, rgba(0, 179, 164, .45) 0%, transparent 62%),
    linear-gradient(152deg, #061533 0%, #0a1f45 46%, #061026 100%);
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(76% 76% at 50% 26%, #000 20%, transparent 100%);
  mask-image: radial-gradient(76% 76% at 50% 26%, #000 20%, transparent 100%);
}
.hero::after {
  content: '';
  position: absolute; z-index: -1;
  width: 560px; height: 560px; inset-inline-end: -180px; top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 94, 255, .55), transparent 66%);
  filter: blur(6px);
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .42rem .9rem; border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: .76rem; font-weight: 600; color: #cfe0ff;
  backdrop-filter: blur(6px);
}
.hero-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #4ce0c3; box-shadow: 0 0 0 4px rgba(76, 224, 195, .18); }

.hero-title { font-size: clamp(1.85rem, 4.2vw, 3.15rem); line-height: 1.28; font-weight: 800; margin: 1.15rem 0 .9rem; color: #fff; }
.grad-text {
  background: linear-gradient(96deg, #8db6ff 0%, #66f0d6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { color: #b9c9e6; font-size: clamp(.93rem, 1.5vw, 1.05rem); line-height: 2.05; max-width: 47ch; margin: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }

.hero-points { list-style: none; margin: 2.1rem 0 0; padding: 1.55rem 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: 1rem 1.9rem; }
.hero-points li { display: inline-flex; align-items: center; gap: .5rem; font-size: .83rem; color: #c3d3ec; }
.hero-points svg { color: #4ce0c3; flex: 0 0 auto; }

/* hero visual */
.hero-visual {
  position: relative;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  padding: 1.05rem;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 30px 60px -34px rgba(0, 0, 0, .9);
}
.hv-head { display: flex; align-items: center; gap: .5rem; font-size: .76rem; color: #c8d7ef; font-weight: 600; margin-bottom: .9rem; }
.hv-head i { width: 8px; height: 8px; border-radius: 50%; background: #4ce0c3; box-shadow: 0 0 0 4px rgba(76, 224, 195, .16); }
.hv-head span:last-child { margin-inline-start: auto; font-size: .7rem; color: #8ba3c6; }

.hv-chart { border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0)); }
.hv-chart svg { display: block; width: 100%; height: auto; }

.hv-rows { display: grid; gap: .45rem; margin-top: .95rem; }
.hv-row {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .55rem .7rem; border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem; color: #dbe6f8;
}
.hv-row em { font-style: normal; color: #97abc9; font-size: .7rem; }
.hv-foot { margin-top: .85rem; font-size: .66rem; color: #8ba3c6; text-align: center; }

/* 6. Sections -------------------------------------------------------------- */
.section { padding-block: clamp(2.4rem, 5.5vw, 4.2rem); }
.section-head { max-width: 660px; margin: 0 auto clamp(1.6rem, 3vw, 2.6rem); text-align: center; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
  padding: .35rem .85rem; border-radius: 999px; margin-bottom: .95rem;
}
.section-title { font-size: clamp(1.35rem, 2.5vw, 1.95rem); font-weight: 800; margin: 0 0 .65rem; }
.section-sub { color: var(--muted); font-size: .93rem; line-height: 1.95; margin: 0; }

/* 7. Cards ----------------------------------------------------------------- */
.feature-card {
  position: relative; overflow: hidden;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.feature-card::after {
  content: ''; position: absolute; z-index: 0;
  width: 190px; height: 190px; inset-inline-end: -70px; bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 94, 255, .12), transparent 68%);
}
.feature-card > * { position: relative; z-index: 1; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfdcf1; }
.feature-card h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .5rem; }
.feature-card p { font-size: .86rem; color: var(--muted); line-height: 1.95; margin: 0; }

.icon-chip {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 1.05rem;
  background: linear-gradient(140deg, #eef4ff, #dbe8ff);
  color: var(--brand);
}
.icon-chip svg { width: 23px; height: 23px; }
.icon-chip.teal { background: linear-gradient(140deg, #e4fbf7, #c9f4ec); color: #0a8f7f; }
.icon-chip.gold { background: linear-gradient(140deg, #fff5e0, #ffe8b8); color: #b57d05; }
.icon-chip.violet { background: linear-gradient(140deg, #f2ecff, #e3d8ff); color: #6b3ddb; }

.step {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.step-num {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; color: #fff;
  background: linear-gradient(140deg, var(--navy-700), #14336b);
  margin-bottom: 1rem;
}
.step h3 { font-size: .96rem; font-weight: 800; margin: 0 0 .45rem; }
.step p { font-size: .85rem; color: var(--muted); line-height: 1.95; margin: 0; }

.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .85rem; }
.preset {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.preset b { display: block; font-size: .9rem; margin-bottom: .4rem; }
.preset code {
  display: block; direction: ltr; text-align: left;
  font-size: .71rem; line-height: 1.8; color: #4a5c78;
  background: var(--brand-tint); border: 1px solid #e9effa;
  border-radius: 9px; padding: .45rem .6rem;
  overflow-wrap: anywhere;
}

.cta-band {
  position: relative; overflow: hidden;
  border-radius: 32px;
  padding: clamp(2rem, 4.2vw, 3.4rem);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(40rem 30rem at 15% 0%, rgba(0, 179, 164, .45), transparent 60%),
    linear-gradient(120deg, #0a1c40, #123fb0 62%, #0a7d78);
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000 10%, transparent 90%);
  mask-image: radial-gradient(70% 90% at 50% 0%, #000 10%, transparent 90%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.95rem); margin: 0 0 .7rem; }
.cta-band p { color: #c5d5ee; font-size: .92rem; line-height: 2; max-width: 52ch; margin: 0 auto 1.6rem; }

/* 8. Panels & tables ------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.panel-title { font-size: .95rem; font-weight: 800; margin: 0; }
.panel-body { padding: 1.3rem; }
.panel-foot { padding: .9rem 1.3rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }

.table-wrap { overflow: auto; max-height: 70vh; }
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: #d6e0ee; border-radius: 8px; }

.table-clean { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.table-clean thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fe;
  color: #5d6d86;
  font-size: .75rem; font-weight: 700;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-clean tbody td { padding: .78rem 1rem; border-bottom: 1px solid #eff3fa; font-size: .89rem; vertical-align: middle; }
.table-clean tbody tr { transition: background .15s ease; }
.table-clean tbody tr:hover { background: #f8fbff; }
.table-clean tbody tr:last-child td { border-bottom: 0; }
.table-clean .sym { font-weight: 800; color: var(--ink); }
.table-clean .sym small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.table-clean .empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; font-size: .87rem; }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 66px;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .79rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.chip-pos { background: var(--pos-soft); color: #0a7d4f; }
.chip-neg { background: var(--neg-soft); color: #bd2b30; }
.chip-flat { background: #eef2f8; color: #5b6b83; }

.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .55rem; border-radius: 8px;
  font-size: .7rem; font-weight: 700;
  background: var(--brand-tint); color: #44597a; border: 1px solid #e6edf9;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); border-color: #d6e3ff; }
.tag-off { background: #f1f4f9; color: #8595ab; border-color: #e6ecf5; }

/* 8b. Market page ---------------------------------------------------------- */
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.1rem; align-items: start; }
.market-main { min-width: 0; }
.market-side { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; transition: opacity .18s ease; }
.market-side.is-loading { opacity: .55; }
@media (max-width: 991.98px) { .market-layout { grid-template-columns: 1fr; } .market-side { position: static; max-height: none; overflow: visible; } }

.market-filters { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: .75rem; }
.market-filters .filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 767.98px) { .market-filters { grid-template-columns: 1fr; } }

.th-sort { display: inline-flex; align-items: center; gap: .3rem; color: inherit; font-weight: inherit; }
.th-sort:hover { color: var(--brand); }
.th-sort .arrow { font-style: normal; font-size: .6rem; color: var(--brand); }
.th-sort .arrow:empty { display: none; }

.table-clean tbody tr[data-symbol-url] { cursor: pointer; }
.table-clean tbody tr.is-selected { background: var(--brand-tint); box-shadow: inset 0 0 0 1px #d3e2ff; }
.table-clean tbody tr.is-selected:hover { background: #eef4ff; }
.sym-link { color: var(--ink); font-weight: 800; }
.sym-link:hover { color: var(--brand); }

.detail-quote { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1.05rem 1.3rem .5rem; }
.detail-meta { min-width: 0; }
.detail-name { font-size: .92rem; font-weight: 800; color: var(--ink); }
.detail-sub { font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.detail-price { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.detail-change { display: flex; align-items: center; gap: .5rem; padding: 0 1.3rem 1rem; }
.detail-change-label { font-size: .7rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; margin: 0; padding: 1rem 1.3rem 1.2rem; border-top: 1px solid var(--line); }
.kv > div { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.kv dt { font-size: .69rem; font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; font-size: .84rem; font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; }
.side-empty { color: var(--muted); font-size: .82rem; line-height: 2; text-align: center; }

/* 9. Forms ---------------------------------------------------------------- */
.form-label { font-size: .8rem; font-weight: 700; color: #3c4a62; margin-bottom: .4rem; }
.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid var(--line-2);
  padding: .6rem .85rem;
  font-size: .89rem;
  font-family: inherit;
  color: var(--ink);
  background-color: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form-control::placeholder { color: #9aa8bd; }
.form-control:focus, .form-select:focus {
  border-color: #9fbcff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, .13);
  outline: none;
}
textarea.form-control { line-height: 1.95; min-height: 92px; }
.form-control.num, textarea.num { direction: ltr; text-align: left; }
.form-text { font-size: .76rem; color: var(--muted); }

.search-bar { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: .6rem; }
@media (max-width: 767.98px) { .search-bar { grid-template-columns: 1fr; } }

.day-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-picker label {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff;
  font-size: .78rem; font-weight: 600; color: #4a5c78; cursor: pointer;
  transition: .16s ease;
}
.day-picker label:hover { border-color: #b9cbe6; }
.day-picker input { accent-color: var(--brand); margin: 0; }
.day-picker label:has(input:checked) { background: var(--brand-soft); border-color: #c9daff; color: var(--brand); }

/* 10. Auth ---------------------------------------------------------------- */
.auth-wrap { max-width: 1000px; margin: clamp(.5rem, 3vw, 2.5rem) auto; }
.auth-card {
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: #fff; border: 1px solid var(--line);
  border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.auth-aside {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(1.8rem, 3.6vw, 2.8rem);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background:
    radial-gradient(30rem 24rem at 100% 0%, #123b8f, transparent 60%),
    radial-gradient(26rem 22rem at 0% 100%, rgba(0, 179, 164, .5), transparent 62%),
    linear-gradient(150deg, #061533, #0a1f45 60%, #061026);
}
.auth-aside::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 80% at 40% 20%, #000 20%, transparent 100%);
  mask-image: radial-gradient(80% 80% at 40% 20%, #000 20%, transparent 100%);
}
.auth-aside h2 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.55; font-weight: 800; color: #fff; margin: 0 0 .8rem; }
.auth-aside p { font-size: .88rem; line-height: 1.95; color: #b9c9e6; margin: 0; }
.auth-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .75rem; }
.auth-points li { display: flex; gap: .55rem; align-items: flex-start; font-size: .83rem; color: #dbe6f8; line-height: 1.8; }
.auth-points svg { flex: 0 0 auto; margin-top: .18rem; color: #4ce0c3; }

.auth-body { padding: clamp(1.6rem, 3.6vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; }
.auth-body h1 { font-size: 1.28rem; font-weight: 800; margin: 0 0 .45rem; }
.auth-body .sub { color: var(--muted); font-size: .85rem; line-height: 1.9; margin-bottom: 1.6rem; }
.auth-body .form-label { margin-top: .1rem; }
.auth-note { font-size: .74rem; color: var(--muted); line-height: 1.9; margin: 1.3rem 0 0; }

.otp-input {
  letter-spacing: .7rem;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
  direction: ltr;
  padding-block: .8rem;
  padding-inline-start: .7rem;
}

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-aside { order: 2; }
  .auth-points { display: none; }
}

/* 11. Footer -------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #a9bad4;
  padding-top: clamp(2rem, 4vw, 3rem);
}
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand small { color: #8096b8; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 2rem; }
.footer-title { font-size: .85rem; font-weight: 800; color: #fff; margin: 0 0 .95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-links a { color: #a9bad4; font-size: .85rem; transition: color .18s ease, transform .18s ease; display: inline-block; }
.footer-links a:hover { color: #fff; transform: translateX(-2px); }
.footer-note { font-size: .78rem; line-height: 2.05; color: #8497b5; margin: 0; }
.footer-bottom {
  margin-top: 2.2rem; border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 1.05rem 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between;
  font-size: .75rem; color: #7c90ae;
}
.footer-bottom .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4ce0c3; margin-inline-end: .4rem; }

@media (max-width: 767.98px) { .footer-grid { grid-template-columns: 1fr; gap: 1.7rem; } }

/* 12. Utilities / motion / misc ------------------------------------------- */
.num { direction: ltr; unicode-bidi: plaintext; font-variant-numeric: tabular-nums; text-align: right; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.flash {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .85rem 1.05rem; border-radius: 14px;
  font-size: .87rem; margin-bottom: 1.3rem;
  border: 1px solid;
}
.flash-success { background: var(--pos-soft); border-color: #bfe9d5; color: #0a6b45; }
.flash-danger, .flash-error { background: var(--neg-soft); border-color: #f6cfd0; color: #a92a2f; }
.flash-warning { background: #fff7e6; border-color: #ffe2ab; color: #8a5b00; }
.flash-info { background: var(--brand-soft); border-color: #d5e3ff; color: #1740a8; }

.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; margin: 0; }
.page-sub { color: var(--muted); font-size: .85rem; line-height: 1.9; margin: .4rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.empty { text-align: center; padding: 2.6rem 1.2rem; color: var(--muted); }
.empty svg { color: #c3cfdf; margin-bottom: .8rem; }
.empty p { margin: 0 0 1rem; font-size: .87rem; }

.item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.item-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cfdcf1; }
.item-row .item-main { min-width: 0; }
.item-row b { font-size: .93rem; }
.item-row .item-meta { font-size: .76rem; color: var(--muted); margin-top: .3rem; }

.list-block { display: grid; gap: .6rem; }
.list-edit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: .75rem; align-items: end;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; box-shadow: var(--shadow-sm);
}
.list-edit .btn { white-space: nowrap; }
.list-edit-name { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 767.98px) {
  .list-edit { grid-template-columns: 1fr; }
  .list-edit .btn { width: 100%; }
}

.stat-card {
  position: relative; overflow: hidden;
  display: block; height: 100%;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.3rem;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.stat-card::before {
  content: ''; position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 4px; background: linear-gradient(var(--brand), #7ba6ff);
}
.stat-card.teal::before { background: linear-gradient(var(--teal), #6fe6d8); }
.stat-card.gold::before { background: linear-gradient(var(--gold), #ffd97a); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfdcf1; color: inherit; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: .9rem;
}
.stat-card.teal .stat-icon { background: #e2fbf6; color: #0a8f7f; }
.stat-card.gold .stat-icon { background: #fff5df; color: #b57d05; }
.stat-label { font-size: .77rem; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -.6px; line-height: 1.25; margin: .1rem 0 .1rem; }
.stat-foot { font-size: .74rem; color: var(--muted); }

.quick-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .95rem 1.05rem; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.quick-card:hover { color: var(--ink); transform: translateY(-2px); border-color: #cfdcf1; box-shadow: var(--shadow-md); }
.quick-card .qc-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex: 0 0 auto; }
.quick-card b { display: block; font-size: .87rem; }
.quick-card span { display: block; font-size: .73rem; color: var(--muted); margin-top: .15rem; }
.quick-card .qc-arrow { margin-inline-start: auto; color: #b7c5d8; }

.pagination { --bs-pagination-border-radius: 11px; gap: .25rem; }
.page-link {
  border: 1px solid var(--line-2); border-radius: 11px !important;
  color: var(--ink); font-weight: 700; font-size: .84rem;
  min-width: 38px; text-align: center; padding: .38rem .6rem;
}
.page-link:hover { background: var(--brand-tint); border-color: #c5d7fb; color: var(--brand); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

.badge-soft { background: var(--brand-soft); color: var(--brand); border-radius: 8px; padding: .2rem .5rem; font-size: .7rem; font-weight: 700; }

/* error pages */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.2rem, 4vw, 3rem);
}
.error-card {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 3.2rem);
  box-shadow: var(--shadow-lg);
}
.error-card::before {
  content: '';
  position: absolute; inset-inline: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
}
.error-code {
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  background: linear-gradient(140deg, var(--brand), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .6rem;
}
.error-title { font-size: clamp(1.2rem, 3vw, 1.55rem); margin: 0 0 .7rem; }
.error-text { color: var(--muted); font-size: .9rem; line-height: 2; margin: 0 auto 1.6rem; max-width: 40ch; }
.error-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* motion */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: riseIn .72s cubic-bezier(.22, .7, .3, 1) both; }
.hero-copy > *:nth-child(2) { animation-delay: .07s; }
.hero-copy > *:nth-child(3) { animation-delay: .14s; }
.hero-copy > *:nth-child(4) { animation-delay: .21s; }
.hero-copy > *:nth-child(5) { animation-delay: .28s; }
.hero-visual { animation: riseIn .85s cubic-bezier(.22, .7, .3, 1) both .18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* 13. Admin ---------------------------------------------------------------- */
.admin-auth .auth-card { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1rem; }
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: .3rem; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem;
  margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.admin-tab { display: inline-flex; align-items: center; padding: .5rem .95rem; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #48566d; }
.admin-tab:hover { background: #eef3fb; color: var(--ink); }
.admin-tab.active { background: var(--brand-soft); color: var(--brand); }
.admin-tabs .admin-tab.ms-auto { margin-inline-start: auto; }
.access-table th, .access-table td { vertical-align: middle; }
.access-table .role-head { text-align: center; font-size: .78rem; color: var(--muted); }
.access-table .perm-name { font-weight: 600; }
.access-table .form-check { display: flex; justify-content: center; margin: 0; }
.access-table .form-check-input { width: 1.1rem; height: 1.1rem; margin: 0; }
.import-example {
  background: #f8faff; border: 1px dashed var(--line-2); border-radius: 12px;
  padding: .75rem 1rem; font-size: .78rem; direction: ltr; text-align: left; overflow: auto;
}
.import-example table { width: 100%; border-collapse: collapse; }
.import-example th, .import-example td { padding: .3rem .5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.import-errors { margin: .75rem 0 0; padding-inline-start: 1.1rem; color: #b02a2f; font-size: .8rem; }
.user-role-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.chart-box { position: relative; height: 320px; }
@media (max-width: 575.98px) {
  .admin-tabs { border-radius: 16px; }
  .admin-tab { flex: 1 1 45%; justify-content: center; }
  .admin-tabs .admin-tab.ms-auto { margin-inline-start: 0; }
  .chart-box { height: 240px; }
}
.footer-admin { color: #8096b8; text-decoration: underline; text-underline-offset: 3px; transition: color .18s ease; }
.footer-admin:hover { color: #fff; }
