/* GAIA Atelier — web dashboard. Builds on ../css/{tokens,base,components}.css */
:root { --side-w: 276px; --top-h: 68px; --page-pad: 32px; --burg-surface: linear-gradient(185deg, #4f1613 0%, #3a0e0c 55%, #260706 100%); }
[data-theme="dark"] { --burg-surface: linear-gradient(185deg, #3a0f0d 0%, #2a0a09 55%, #160504 100%); }
html { background: var(--bg); }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.55; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(900px 420px at 80% -10%, color-mix(in srgb, var(--gold-500) 14%, transparent), transparent 70%), radial-gradient(700px 500px at 0% 110%, color-mix(in srgb, var(--burgundy-600) 8%, transparent), transparent 70%); }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--gold-500) 40%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* App shell ---------------------------------------------------------------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--t-base) var(--ease); }
.app.collapsed { --side-w: 84px; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--burg-surface); color: var(--on-dark); overflow: hidden; z-index: 20; box-shadow: 8px 0 40px -20px rgba(38, 7, 6, .55); }
[dir="rtl"] .side { box-shadow: -8px 0 40px -20px rgba(38, 7, 6, .55); }
.side::before { content: ""; position: absolute; inset: 0; opacity: .9; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='150' viewBox='0 0 120 150' fill='none' stroke='%23c9a05c' stroke-opacity='.11' stroke-width='1'%3E%3Cpath d='M20 150V70a40 40 0 0 1 80 0v80'/%3E%3Cpath d='M32 150V72a28 28 0 0 1 56 0v78'/%3E%3Cpath d='M44 150V74a16 16 0 0 1 32 0v76'/%3E%3C/svg%3E"); background-size: 120px 150px; }
.side > * { position: relative; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 14px; height: 88px; }
.brand img { height: 62px; width: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.brand .bt { line-height: 1.1; }
.brand .bt b { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: .02em; color: var(--cream-100); display: block; }
.brand .bt small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300); opacity: .85; }
[lang="ar"] .brand .bt small { letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.collapsed .brand { padding-inline: 0; justify-content: center; }
.collapsed .brand .bt, .collapsed .nav-h span, .collapsed .nav-a span.lbl, .collapsed .nav-a .flag, .collapsed .side-foot .who, .collapsed .side-q span, .collapsed .nav-h .chev { display: none; }
.side-q { margin: 6px 18px 8px; height: 42px; border-radius: 14px; background: rgba(250, 243, 233, .08); border: 1px solid rgba(250, 243, 233, .12); display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--on-dark-2); font-size: 13px; transition: background var(--t-base); width: calc(100% - 36px); }
.side-q:hover { background: rgba(250, 243, 233, .14); }
.side-q kbd { margin-inline-start: auto; font-family: inherit; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(250, 243, 233, .12); direction: ltr; }
.collapsed .side-q { justify-content: center; padding: 0; margin-inline: 14px; width: calc(100% - 28px); }
.nav-scroll { flex: 1; overflow-y: auto; padding: 4px 14px 12px; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-sec { margin-top: 12px; }
.nav-h { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); opacity: .8; }
[lang="ar"] .nav-h { letter-spacing: 0; text-transform: none; font-size: 12px; }
.nav-h .chev { transition: transform var(--t-base) var(--ease); }
.nav-sec.shut .nav-h .chev { transform: rotate(-90deg); }
[dir="rtl"] .nav-sec.shut .nav-h .chev { transform: rotate(90deg); }
.nav-items { display: grid; gap: 2px; overflow: hidden; transition: max-height var(--t-slow) var(--ease), opacity var(--t-base); max-height: 600px; }
.nav-sec.shut .nav-items { max-height: 0; opacity: 0; }
.collapsed .nav-sec.shut .nav-items { max-height: 600px; opacity: 1; }
.collapsed .nav-h { height: 1px; padding: 0; margin: 10px 14px; background: rgba(250, 243, 233, .12); }
.nav-a { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 13px; color: var(--on-dark-2); font-weight: 500; font-size: 14px; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.nav-a:hover { background: rgba(250, 243, 233, .09); color: var(--cream-100); }
.nav-a.on { background: linear-gradient(90deg, rgba(201, 160, 92, .26), rgba(201, 160, 92, .08)); color: var(--cream-50); font-weight: 700; }
[dir="rtl"] .nav-a.on { background: linear-gradient(270deg, rgba(201, 160, 92, .26), rgba(201, 160, 92, .08)); }
.nav-a.on::before { content: ""; position: absolute; inset-inline-start: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold-500); }
[dir="rtl"] .nav-a.on::before { border-radius: 4px 0 0 4px; }
.collapsed .nav-a { justify-content: center; padding: 0; }
.nav-a .cnt { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold-500); color: var(--burgundy-900); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.collapsed .nav-a .cnt { position: absolute; top: 4px; inset-inline-end: 10px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 3px; }
.flag { margin-inline-start: auto; font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: rgba(227, 201, 154, .18); color: var(--gold-300); letter-spacing: .02em; white-space: nowrap; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(250, 243, 233, .1); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.25; }
.side-foot .who b { display: block; font-size: 13px; color: var(--cream-100); }
.side-foot .who small { color: var(--on-dark-2); font-size: 11.5px; }
.collapsed .side-foot { justify-content: center; flex-direction: column; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 15; height: var(--top-h); padding: 0 var(--page-pad); display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); min-width: 0; }
.crumbs b { color: var(--text); font-weight: 700; }
.crumbs .ic { color: var(--text-3); }
.tb-sp { flex: 1; }
.tb-btn { height: 42px; min-width: 42px; padding: 0 12px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 13px; position: relative; box-shadow: var(--sh-1); transition: transform var(--t-fast), box-shadow var(--t-base); }
.tb-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.tb-btn .dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); border: 2px solid var(--surface); }
.tb-search { min-width: 260px; justify-content: flex-start; color: var(--text-3); font-weight: 500; }
.tb-search kbd { margin-inline-start: auto; font-family: inherit; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); direction: ltr; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; padding-inline: 4px 12px; height: 46px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.user-chip .avatar { width: 36px; height: 36px; font-size: 13px; }
.user-chip .u { line-height: 1.15; text-align: start; }
.user-chip .u b { font-size: 13px; display: block; }
.user-chip .u small { font-size: 11px; color: var(--text-3); }

.page { padding: 26px var(--page-pad) 80px; max-width: 1600px; width: 100%; margin-inline: auto; animation: rise var(--t-slow) var(--ease) both; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.ph h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.15; font-weight: 600; }
.ph p { color: var(--text-2); margin-top: 4px; max-width: 640px; }
.ph .acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.need { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: #f6dcd9; color: #9b2118; vertical-align: middle; margin-inline-start: 10px; font-family: var(--font); }
[data-theme="dark"] .need { background: rgba(179, 38, 30, .22); color: #f0a8a2; }

/* grid helpers ---------------------------------------------------------------- */
.g { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.p0 { padding: 0; } .p20 { padding: 20px; } .p24 { padding: 24px; }
.mt0 { margin-top: 0; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.card { transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base); }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--gold-500) 45%, var(--line)); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.2; }
.card-h .sub { font-size: 12px; color: var(--text-3); }
.link { color: var(--gold-600); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
[data-theme="dark"] .link { color: var(--gold-300); }
.link:hover { text-decoration: underline; }
.btn { height: 44px; border-radius: 14px; font-size: 14px; padding: 0 18px; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 12px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 10px; }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; }
.icon-btn:hover { background: var(--surface-2); }

/* Hero (overview) --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-radius: 32px; padding: 28px 32px; min-height: 250px; color: var(--on-dark); background: var(--hero); box-shadow: var(--sh-3); display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 28px; align-items: center; }
.hero > * { position: relative; z-index: 1; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .85; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='150' viewBox='0 0 120 150' fill='none' stroke='%23c9a05c' stroke-opacity='.14' stroke-width='1'%3E%3Cpath d='M20 150V70a40 40 0 0 1 80 0v80'/%3E%3Cpath d='M32 150V72a28 28 0 0 1 56 0v78'/%3E%3Cpath d='M44 150V74a16 16 0 0 1 32 0v76'/%3E%3C/svg%3E"); background-size: 120px 150px; }
.hero .eyebrow { color: var(--gold-300); }
.hero h2 { font-family: var(--font-display); font-size: 32px; line-height: 1.2; font-weight: 600; margin: 6px 0 10px; }
.hero .big { font-family: var(--font-display); font-size: 54px; font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.hero .big small { font-size: 20px; color: var(--gold-300); font-weight: 500; margin-inline-start: 6px; }
.hero .m { color: var(--on-dark-2); }
.hero-arch { width: 190px; height: 218px; border-radius: 999px 999px 22px 22px; border: 1.5px solid rgba(227, 201, 154, .5); background: rgba(250, 243, 233, .06); display: grid; place-items: center; overflow: hidden; position: relative; }
.hero-arch::after { content: ""; position: absolute; inset: 8px; border-radius: 999px 999px 16px 16px; border: 1px dashed rgba(227, 201, 154, .28); }
.hero-arch img { width: 176px; margin-top: 20px; animation: floaty 6s ease-in-out infinite; }
.ring-t { position: relative; width: 132px; height: 132px; flex: none; }
.ring-t svg { transform: rotate(-90deg); }
.ring-t .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring-t .c b { font-family: var(--font-display); font-size: 28px; }
.ring-t .c small { font-size: 10.5px; color: var(--on-dark-2); }
.ops-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ops-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(250, 243, 233, .1); border: 1px solid rgba(250, 243, 233, .16); font-size: 12.5px; font-weight: 700; color: var(--cream-100); }
.ops-pill .pd { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gold-500)); box-shadow: 0 0 0 0 var(--c, var(--gold-500)); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* stats ------------------------------------------------------------------------- */
.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px 20px; box-shadow: var(--sh-1); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.stat .top-r { display: flex; align-items: center; justify-content: space-between; }
.stat .lbl { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.stat .v { font-family: var(--font-display); font-size: 31px; font-weight: 600; line-height: 1.15; margin-top: 8px; }
.stat .v small { font-size: 14px; color: var(--text-3); font-weight: 500; font-family: var(--font); margin-inline-start: 4px; }
.stat .d { font-size: 12px; font-weight: 700; color: var(--success); display: inline-flex; align-items: center; gap: 3px; }
.stat .d.neg { color: var(--danger); }
.stat .ic-b { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--burgundy-600); }
[data-theme="dark"] .stat .ic-b { color: var(--gold-300); }
.stat .sp { position: absolute; inset-inline: 0; bottom: 0; height: 40px; opacity: .5; pointer-events: none; }
.stat.arch-s::after { content: ""; position: absolute; inset-inline-end: 14px; top: -34px; width: 70px; height: 70px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--gold-500) 35%, transparent); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat.mini { padding: 14px 16px; border-radius: 20px; }
.stat.mini .v { font-size: 24px; margin-top: 4px; }

/* toolbar / filters / tables ------------------------------------------------------ */
.fbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-in { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); min-width: 260px; flex: 1; max-width: 380px; transition: box-shadow var(--t-base), border-color var(--t-base); }
.search-in:focus-within { border-color: var(--burgundy-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-500) 30%, transparent); }
.search-in input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--text); font-size: 14px; }
.sel { height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 34px 0 14px; padding-inline: 14px 34px; color: var(--text); font-size: 13.5px; font-weight: 500; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a58f84' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 12px) center; }
[dir="rtl"] .sel { background-position: 12px center; }
.sel option { background: var(--surface); color: var(--text); }
.inp { height: 44px; width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; color: var(--text); font-size: 14px; transition: box-shadow var(--t-base), border-color var(--t-base); }
textarea.inp { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.inp:focus { outline: 0; border-color: var(--burgundy-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-500) 30%, transparent); }
.lab { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.frm { display: grid; gap: 16px; }
.frm.two { grid-template-columns: 1fr 1fr; }
.span2 { grid-column: 1 / -1; }
.dt-wrap { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); overflow: hidden; box-shadow: var(--sh-1); }
.dt-scroll { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { position: sticky; top: 0; text-align: start; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 13px 16px; background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); border-bottom: 1px solid var(--line); white-space: nowrap; }
[lang="ar"] .dt th { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.dt td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr { transition: background var(--t-fast); }
.dt tbody tr.click { cursor: pointer; }
.dt tbody tr.click:hover { background: color-mix(in srgb, var(--gold-500) 9%, transparent); }
.dt .who { display: flex; align-items: center; gap: 11px; }
.dt .who .avatar { width: 36px; height: 36px; font-size: 13px; }
.dt .who b { display: block; line-height: 1.2; }
.dt .who small { color: var(--text-3); font-size: 12px; }
.dt .end { text-align: end; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.pager { display: flex; gap: 4px; }
.pager button { width: 32px; height: 32px; border-radius: 10px; font-weight: 700; font-size: 12.5px; color: var(--text-2); }
.pager button.on { background: var(--burgundy-700); color: var(--cream-100); }
[data-theme="dark"] .pager button.on { background: var(--gold-500); color: var(--burgundy-900); }
.sub-t { color: var(--text-3); font-size: 12px; }
.sep-dot::before { content: "·"; margin-inline: 6px; color: var(--text-3); }
.chip { height: 26px; font-size: 12px; }
.st-pending-c { --c: var(--st-pending); } .st-refunded { --c: var(--info); } .st-unused { --c: var(--info); } .st-booked { --c: var(--st-assigned); } .st-redeemed { --c: var(--success); } .st-used { --c: var(--info); } .st-depleted { --c: var(--ink-400); } .st-upcoming { --c: var(--info); } .st-on_the_way { --c: var(--st-on-the-way); } .st-therapist_assigned { --c: var(--st-assigned); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* empty / error / skeleton ---------------------------------------------------------- */
.state { text-align: center; padding: 54px 24px; }
.state .arch-ill { width: 120px; height: 140px; margin: 0 auto 18px; border-radius: 999px 999px 18px 18px; border: 1.5px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--gold-600); position: relative; }
.state .arch-ill::after { content: ""; position: absolute; inset: 8px; border-radius: 999px 999px 12px 12px; border: 1px dashed var(--line); }
.state.err .arch-ill { color: var(--danger); }
.state h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.state p { color: var(--text-2); max-width: 380px; margin: 6px auto 16px; }
.sk { background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shine 1.3s linear infinite; border-radius: 12px; }
.sk-page > * + * { margin-top: 18px; }

/* charts ------------------------------------------------------------------------------ */
.ch svg { display: block; width: 100%; overflow: visible; }
.ch .ln { fill: none; stroke: var(--burgundy-600); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); animation: draw 1.4s var(--ease) .1s forwards; }
[data-theme="dark"] .ch .ln { stroke: var(--gold-300); }
.ch .ln2 { fill: none; stroke: var(--gold-500); stroke-width: 2; stroke-dasharray: 5 5; opacity: .8; }
.ch .ar { opacity: 0; animation: fadein .9s ease .5s forwards; }
.ch .grid line { stroke: var(--line); stroke-dasharray: 3 5; }
.ch text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.ch .pt { fill: var(--surface); stroke: var(--burgundy-600); stroke-width: 2.4; opacity: 0; transition: opacity var(--t-fast), r var(--t-fast); cursor: pointer; }
.ch .pt:hover, .ch .pt.last { opacity: 1; }
[data-theme="dark"] .ch .pt { stroke: var(--gold-300); }
.ch .hit { fill: transparent; cursor: pointer; }
.ch .bar-r { transform-origin: bottom; transform-box: fill-box; animation: grow .9s var(--ease) both; }
.ch .seg { stroke-linecap: butt; transition: stroke-width var(--t-fast); cursor: pointer; }
.ch .seg:hover { stroke-width: 26; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes growx { from { transform: scaleX(0); } }
.hb { display: grid; gap: 14px; }
.hb .r { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.hb .t { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hb .t i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--burgundy-600), var(--gold-500)); transform-origin: var(--origin, left); animation: growx 1s var(--ease) both; }
[dir="rtl"] .hb .t i { --origin: right; }
.tip { position: fixed; z-index: 400; pointer-events: none; padding: 7px 11px; border-radius: 10px; background: var(--burgundy-800); color: var(--cream-100); font-size: 12px; font-weight: 700; box-shadow: var(--sh-3); transform: translate(-50%, -130%); opacity: 0; transition: opacity var(--t-fast); white-space: nowrap; }
.tip.show { opacity: 1; }

/* lists ------------------------------------------------------------------------------- */
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; padding-bottom: 0; }
.li:first-child { padding-top: 0; }
.li .grow b { display: block; line-height: 1.3; }
.li .grow small { color: var(--text-3); font-size: 12px; }
.alert-i { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); margin-bottom: 10px; transition: transform var(--t-fast); cursor: pointer; text-align: start; width: 100%; }
.alert-i:hover { transform: translateX(3px); }
[dir="rtl"] .alert-i:hover { transform: translateX(-3px); }
.alert-i .lead { width: 38px; height: 38px; }
.alert-i b { display: block; line-height: 1.25; }
.alert-i small { color: var(--text-2); font-size: 12px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.tag.g { background: color-mix(in srgb, var(--gold-500) 20%, transparent); color: var(--gold-600); }
[data-theme="dark"] .tag.g { color: var(--gold-300); }

/* drawer / modal / toast / popover / cmdk ------------------------------------------------ */
.scr { position: fixed; inset: 0; z-index: 200; background: rgba(26, 6, 5, .5); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity var(--t-base); }
.scr.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 100vw); z-index: 210; background: var(--bg); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; transform: translateX(105%); transition: transform var(--t-slow) var(--ease); border-radius: 32px 0 0 32px; overflow: hidden; }
[dir="rtl"] .drawer { transform: translateX(-105%); border-radius: 0 32px 32px 0; box-shadow: 30px 0 80px -30px rgba(0, 0, 0, .5); }
.drawer.show { transform: none; }
.dr-h { padding: 22px 26px 16px; display: flex; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dr-h h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.2; }
.dr-b { flex: 1; overflow-y: auto; padding: 22px 26px; display: grid; gap: 22px; align-content: start; }
.dr-f { padding: 16px 26px 20px; border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; flex-wrap: wrap; }
.dr-f .btn { flex: 1; min-width: 120px; }
.modal { position: fixed; z-index: 220; inset-inline: 0; top: 50%; margin-inline: auto; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--sh-3); transform: translateY(-46%) scale(.96); opacity: 0; pointer-events: none; transition: transform var(--t-base) var(--ease), opacity var(--t-base); }
.modal.show { transform: translateY(-50%); opacity: 1; pointer-events: auto; }
.modal.lg { width: min(720px, calc(100vw - 32px)); }
.modal .m-h { display: flex; align-items: center; gap: 12px; padding: 22px 26px 6px; }
.modal .m-h h3 { font-family: var(--font-display); font-size: 23px; font-weight: 600; flex: 1; }
.modal .m-b { padding: 8px 26px 20px; }
.modal .m-f { display: flex; gap: 10px; justify-content: flex-end; padding: 6px 26px 24px; }
.toasts { position: fixed; z-index: 500; bottom: 24px; inset-inline: 0; display: grid; justify-items: center; gap: 10px; pointer-events: none; }
.tst { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 18px; background: var(--burgundy-800); color: var(--cream-100); box-shadow: var(--sh-3); font-weight: 500; animation: rise var(--t-slow) var(--ease) both; border: 1px solid rgba(227, 201, 154, .3); }
.tst.ok .ic { color: #7fd1a8; } .tst.err .ic { color: #f0a8a2; } .tst .ic { color: var(--gold-300); }
.pop { position: fixed; z-index: 300; min-width: 280px; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-3); padding: 8px; animation: rise var(--t-base) var(--ease) both; }
.pop .ph2 { padding: 10px 12px 6px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.pop-i { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; width: 100%; text-align: start; transition: background var(--t-fast); }
.pop-i:hover { background: var(--surface-2); }
.pop-i.on { background: color-mix(in srgb, var(--gold-500) 14%, transparent); }
.pop-i small { display: block; color: var(--text-3); font-size: 12px; }
.pop hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.cmdk { position: fixed; z-index: 450; top: 14vh; inset-inline: 0; margin-inline: auto; width: min(640px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--sh-3); overflow: hidden; animation: rise var(--t-base) var(--ease) both; }
.cmdk .q { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk .q input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); }
.cmdk .res { max-height: 54vh; overflow-y: auto; padding: 8px; }
.cmdk .grp { padding: 10px 14px 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
[lang="ar"] .cmdk .grp { letter-spacing: 0; text-transform: none; font-size: 12px; }
.cmdk .it { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; width: 100%; text-align: start; }
.cmdk .it.on { background: color-mix(in srgb, var(--gold-500) 18%, transparent); }
.cmdk .it .lead { width: 32px; height: 32px; border-radius: 10px; }
.cmdk .it kbd, .kbd { margin-inline-start: auto; font-family: inherit; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); direction: ltr; }
.cmdk .foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); background: var(--surface-2); }
.kb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.kb-grid .r { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kb-grid .kbd { margin: 0; }

/* tabs / segmented ------------------------------------------------------------------------ */
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 18px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs button { height: 38px; padding: 0 16px; border-radius: 13px; font-weight: 700; font-size: 13.5px; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: all var(--t-base) var(--ease); }
.tabs button .n { font-size: 11px; background: var(--surface); padding: 1px 7px; border-radius: 8px; color: var(--text-3); }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.tabs button.on .n { background: var(--gold-500); color: var(--burgundy-900); }
.seg.sm button { height: 32px; font-size: 12.5px; padding: 0 12px; }
.seg { width: fit-content; }

/* timeline / steps --------------------------------------------------------------------------- */
.tl { display: grid; gap: 0; }
.tl .s { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.tl .s:last-child { padding-bottom: 0; }
.tl .s::before { content: ""; position: absolute; top: 30px; bottom: 0; inset-inline-start: 14px; width: 2px; background: var(--line); }
.tl .s:last-child::before { display: none; }
.tl .s.done::before { background: var(--gold-500); }
.tl .nd { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); color: var(--text-3); flex: none; z-index: 1; }
.tl .s.done .nd { background: var(--gold-500); border-color: var(--gold-500); color: var(--burgundy-900); }
.tl .s.now .nd { background: var(--burgundy-700); border-color: var(--gold-300); color: var(--gold-300); animation: pulse 2.4s infinite; }
.tl b { display: block; line-height: 1.3; }
.tl small { color: var(--text-3); font-size: 12px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.kv .k { font-size: 12px; color: var(--text-3); }
.kv .v { font-weight: 700; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; }
.box h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* gantt dispatch ------------------------------------------------------------------------------------ */
.gt { position: relative; }
.gt-head { display: grid; grid-template-columns: 190px 1fr; margin-bottom: 4px; }
.gt-hrs { display: grid; grid-template-columns: repeat(14, 1fr); direction: ltr; }
.gt-hrs span { font-size: 11px; color: var(--text-3); padding-bottom: 6px; border-inline-start: 1px solid var(--line); padding-inline-start: 5px; }
.gt-lane { display: grid; grid-template-columns: 190px 1fr; align-items: center; border-top: 1px dashed var(--line); min-height: 66px; }
.gt-who { display: flex; align-items: center; gap: 10px; padding-inline-end: 12px; }
.gt-who .avatar { width: 38px; height: 38px; font-size: 13px; }
.gt-who b { display: block; font-size: 13.5px; line-height: 1.2; }
.gt-who small { font-size: 11.5px; color: var(--text-3); }
.gt-track { position: relative; height: 54px; direction: ltr; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(7.1428% - 1px), var(--line) calc(7.1428% - 1px), var(--line) 7.1428%); border-radius: 12px; }
.gt-track.leave { background-color: repeating-linear-gradient(45deg, transparent 0 8px, var(--line) 8px 9px); }
.blk { position: absolute; top: 5px; bottom: 5px; border-radius: 12px; padding: 5px 9px; color: #fff; background: var(--c, var(--burgundy-600)); font-size: 11.5px; font-weight: 700; line-height: 1.25; overflow: hidden; cursor: pointer; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--c, #4a1210) 70%, transparent); transition: transform var(--t-fast), filter var(--t-fast); direction: inherit; text-align: start; animation: rise var(--t-slow) var(--ease) both; }
.blk:hover { transform: translateY(-2px); filter: brightness(1.08); z-index: 3; }
.blk small { display: block; font-weight: 500; opacity: .85; font-size: 10.5px; }
.blk.new { animation: pop .7s var(--ease) both; outline: 2px solid var(--gold-300); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
.nowl { position: absolute; top: -8px; bottom: 0; width: 2px; background: var(--gold-500); z-index: 4; pointer-events: none; }
.nowl[data-t]::before { content: attr(data-t); position: absolute; top: -2px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--gold-500); color: var(--burgundy-900); font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 8px; direction: ltr; }
.leave-ban { position: absolute; inset: 5px 0; border-radius: 12px; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink-400) 18%, transparent) 0 8px, transparent 8px 16px); display: grid; place-items: center; font-weight: 700; color: var(--text-3); font-size: 12px; direction: inherit; }
.tray { display: grid; gap: 10px; }
.tray-i { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px dashed color-mix(in srgb, var(--gold-500) 70%, var(--line)); text-align: start; width: 100%; transition: transform var(--t-fast), box-shadow var(--t-base); }
.tray-i:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-style: solid; }
.tray-i .tm { width: 54px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.1; border-radius: 999px 999px 12px 12px; background: var(--surface-2); padding: 10px 0 8px; }
.tray-i .tm small { display: block; font-family: var(--font); font-size: 10px; color: var(--text-3); font-weight: 500; }

/* map ---------------------------------------------------------------------------------------------------- */
.map { position: relative; border-radius: 28px; overflow: hidden; background: radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--gold-300) 24%, var(--surface-2)), var(--surface-2)); border: 1px solid var(--line); aspect-ratio: 16/10; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .road { fill: none; stroke: color-mix(in srgb, var(--cream-300) 85%, var(--surface)); stroke-width: 1.2; stroke-linecap: round; }
[data-theme="dark"] .map .road { stroke: #4a2724; }
.map .road.m { stroke-width: 2.4; }
.map .ring-c { fill: color-mix(in srgb, var(--burgundy-600) 12%, transparent); stroke: var(--burgundy-600); stroke-width: .35; stroke-dasharray: 1.2 1; cursor: pointer; transition: fill var(--t-base); }
.map .ring-c:hover, .map .ring-c.on { fill: color-mix(in srgb, var(--gold-500) 30%, transparent); stroke: var(--gold-600); stroke-dasharray: none; stroke-width: .5; }
.map .ring-c.off { opacity: .45; }
.map .pin-l { font-size: 2.6px; font-weight: 800; fill: var(--text); text-anchor: middle; pointer-events: none; font-family: var(--font); }
.map .water { fill: color-mix(in srgb, var(--info) 14%, transparent); }
.map .tier-r { fill: none; stroke: var(--gold-500); stroke-width: .25; stroke-dasharray: .8 1.2; }

/* matrix / switches ------------------------------------------------------------------------------------------------ */
.mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mx th { font-size: 11.5px; font-weight: 800; color: var(--text-3); padding: 12px 10px; text-align: center; background: var(--surface-2); position: sticky; top: 0; }
.mx th:first-child, .mx td:first-child { text-align: start; padding-inline-start: 18px; }
.mx td { padding: 10px; text-align: center; border-bottom: 1px solid var(--line); }
.mx tr:last-child td { border-bottom: 0; }
.mx .ck { width: 26px; height: 26px; border-radius: 9px; border: 1.5px solid var(--line); display: inline-grid; place-items: center; color: transparent; cursor: pointer; transition: all var(--t-base) var(--ease); }
.mx .ck.on { background: var(--burgundy-700); border-color: var(--burgundy-700); color: var(--cream-100); }
[data-theme="dark"] .mx .ck.on { background: var(--gold-500); border-color: var(--gold-500); color: var(--burgundy-900); }
.mx .ck.na { opacity: .25; pointer-events: none; background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 5px); }
.mx .ck.lock { pointer-events: none; opacity: .75; }
.sw { display: inline-block; vertical-align: middle; }
.switch { cursor: pointer; }

/* phone preview ------------------------------------------------------------------------------------------------------ */
.ph-prev { width: 300px; height: 560px; margin: 0 auto; border-radius: 46px; padding: 9px; background: #1a0605; box-shadow: 0 0 0 2px #3a1512, var(--sh-3); position: relative; flex: none; }
.ph-prev .sc { width: 100%; height: 100%; border-radius: 38px; background: linear-gradient(170deg, #5a1815, #2a0807); position: relative; overflow: hidden; padding: 50px 14px 0; }
.ph-prev .sc::before { content: ""; position: absolute; top: 12px; left: 50%; width: 86px; height: 24px; margin-left: -43px; background: #0b0202; border-radius: 14px; }
.ph-prev .clock { text-align: center; color: var(--cream-100); font-family: var(--font-display); font-size: 54px; font-weight: 500; margin: 12px 0 28px; line-height: 1; direction: ltr; }
.ph-prev .clock small { display: block; font-size: 12px; font-family: var(--font); opacity: .75; margin-bottom: 4px; font-weight: 500; }
.np { background: rgba(250, 243, 233, .94); color: #2b1a17; border-radius: 20px; padding: 11px 13px; display: flex; gap: 10px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); animation: rise var(--t-slow) var(--ease) both; }
.np .ai { width: 34px; height: 34px; border-radius: 10px; background: var(--burgundy-700); display: grid; place-items: center; color: var(--gold-300); flex: none; }
.np b { font-size: 12.5px; display: block; line-height: 1.3; }
.np p { font-size: 11.5px; color: #7a6258; line-height: 1.4; margin-top: 1px; }
.np .tm { font-size: 10px; color: #a58f84; margin-inline-start: auto; flex: none; }

/* misc: banners, tier cards, hearts ----------------------------------------------------------------------------------------- */
.tier { position: relative; overflow: hidden; border-radius: 28px; padding: 22px; color: #fff; background: linear-gradient(160deg, var(--tc), color-mix(in srgb, var(--tc) 55%, #1a0605)); box-shadow: var(--sh-2); min-height: 280px; display: flex; flex-direction: column; transition: transform var(--t-base) var(--ease); }
.tier:hover { transform: translateY(-4px) rotate(-.4deg); }
.tier::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); }
.tier::before { content: ""; position: absolute; inset-inline-end: -10px; top: -10px; width: 100px; height: 100px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .2); }
.tier h4 { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.tier ul { display: grid; gap: 8px; margin: 14px 0; font-size: 13px; }
.tier li { display: flex; gap: 8px; align-items: flex-start; }
.tier .pr { margin-top: auto; font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.tier .pr small { font-size: 13px; font-family: var(--font); opacity: .8; }
.heart-row { display: flex; gap: 6px; flex-wrap: wrap; }
.heart { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--heart, var(--ink-400)); border: 1.5px dashed var(--line); transition: transform var(--t-fast); }
.heart.on { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border-style: solid; border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.heart.rw { background: color-mix(in srgb, var(--gold-500) 22%, transparent); color: var(--gold-600); border-color: var(--gold-500); border-style: solid; }
.heart:hover { transform: scale(1.1); }
.banner { position: relative; overflow: hidden; border-radius: 26px; padding: 22px; min-height: 150px; color: var(--cream-100); display: flex; flex-direction: column; justify-content: flex-end; background: var(--bg-g); }
.banner::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='150' viewBox='0 0 120 150' fill='none' stroke='%23e3c99a' stroke-opacity='.2'%3E%3Cpath d='M20 150V70a40 40 0 0 1 80 0v80'/%3E%3Cpath d='M32 150V72a28 28 0 0 1 56 0v78'/%3E%3C/svg%3E"); background-size: 120px 150px; }
.banner > * { position: relative; }
.banner h4 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.upl { border: 2px dashed var(--line); border-radius: 22px; padding: 22px; text-align: center; color: var(--text-2); background: var(--surface); cursor: pointer; transition: all var(--t-base); }
.upl:hover { border-color: var(--gold-500); background: color-mix(in srgb, var(--gold-500) 7%, var(--surface)); }
.upl .ic { margin: 0 auto 6px; color: var(--gold-600); }
.thumb { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(145deg, var(--burgundy-600), var(--burgundy-800)); display: grid; place-items: center; color: var(--gold-300); flex: none; position: relative; overflow: hidden; }
.thumb.sq { width: 52px; height: 52px; border-radius: 16px; }
.thumb::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='75' viewBox='0 0 120 150' fill='none' stroke='%23e3c99a' stroke-opacity='.25'%3E%3Cpath d='M20 150V70a40 40 0 0 1 80 0v80'/%3E%3C/svg%3E"); background-size: 40px 50px; }
.thumb .ic { position: relative; z-index: 1; }
.th-card { text-align: center; padding: 22px 18px; }
.th-card .avatar { width: 74px; height: 74px; font-size: 24px; margin: 0 auto 10px; border-radius: 999px 999px 18px 18px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--text-3); flex: none; }
.wiz { display: flex; gap: 8px; margin-bottom: 22px; }
.wiz .w { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text-3); font-weight: 700; }
.wiz .w.on { background: var(--burgundy-700); border-color: var(--burgundy-700); color: var(--cream-100); }
.wiz .w.on .step-n { background: var(--gold-500); color: var(--burgundy-900); }
.wiz .w.done .step-n { background: var(--gold-500); color: var(--burgundy-900); }
.slot { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px; transition: all var(--t-fast); direction: ltr; }
.slot:hover { border-color: var(--gold-500); }
.slot.on { background: var(--burgundy-700); color: var(--cream-100); border-color: var(--burgundy-700); }
.slot.x { opacity: .35; text-decoration: line-through; pointer-events: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal b { font-size: 11px; color: var(--text-3); padding: 6px 0; }
.cal button { height: 38px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.cal button:hover { background: var(--surface-2); }
.cal button.on { background: var(--burgundy-700); color: var(--cream-100); }
.cal button.dim { opacity: .3; }

.shrink-hide { display: initial; }
/* Responsive ------------------------------------------------------------------------------------------------------------------ */
@media (max-width: 1280px) {
  .app { --side-w: 84px; }
  .app:not(.force-open) .brand .bt, .app:not(.force-open) .nav-h span, .app:not(.force-open) .nav-a span.lbl, .app:not(.force-open) .nav-a .flag, .app:not(.force-open) .side-foot .who, .app:not(.force-open) .side-q span, .app:not(.force-open) .nav-h .chev { display: none; }
  .app:not(.force-open) .brand { padding-inline: 0; justify-content: center; }
  .app:not(.force-open) .nav-a { justify-content: center; padding: 0; }
  .app:not(.force-open) .nav-h { height: 1px; padding: 0; margin: 10px 14px; background: rgba(250, 243, 233, .12); }
  .app:not(.force-open) .nav-sec.shut .nav-items { max-height: 600px; opacity: 1; }
  .app:not(.force-open) .side-q { justify-content: center; padding: 0; margin-inline: 14px; width: calc(100% - 28px); }
  .app:not(.force-open) .side-q kbd { display: none; }
  .app:not(.force-open) .side-foot { justify-content: center; flex-direction: column; }
  .app:not(.force-open) .nav-a .cnt { position: absolute; top: 4px; inset-inline-end: 10px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 3px; }
  .hero { grid-template-columns: 1fr auto; }
  .hero .ring-t { display: none; }
  .c3 { grid-column: span 6; } .c4, .c5 { grid-column: span 6; } .c7, .c8, .c9 { grid-column: span 12; }
  .c6 { grid-column: span 12; }
  .tb-search { min-width: 0; }
  .tb-search span { display: none; }
}
@media (max-width: 1100px) {
  :root { --page-pad: 22px; }
  .gt-head, .gt-lane { grid-template-columns: 130px 1fr; }
  .gt-who small { display: none; }
  .kb-grid { grid-template-columns: 1fr; }
  .frm.two { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; } .hero-arch { display: none; }
  .c3, .c4, .c5 { grid-column: span 12; }
  .ph h1 { font-size: 28px; }
  .top .user-chip .u, .tb-search { display: none; }
  .gt { overflow-x: auto; } .gt > * { min-width: 780px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ch .ln { stroke-dashoffset: 0; } .ch .ar { opacity: 1; }
}

/* extras ---------------------------------------------------------------------- */
.stat-row.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-row.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dirty { position: fixed; z-index: 120; bottom: 24px; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; padding-inline: 18px 12px; border-radius: 20px; background: var(--burgundy-800); color: var(--cream-100); box-shadow: var(--sh-3); transform: translateY(160%); transition: transform var(--t-slow) var(--ease); border: 1px solid rgba(227, 201, 154, .3); }
.dirty.show { transform: none; }
.sec-h h2 { font-family: var(--font-display); }
.btn-ok:hover { filter: none; background: color-mix(in srgb, var(--success) 22%, transparent); }
.stat .d .ic { transform: rotate(180deg); }
.stat .d.neg .ic { transform: none; }
input[type="range"] { height: 6px; }
@media (max-width: 1280px) { .stat-row.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .stat-row.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3[style*="repeat(6"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 700px) { .stat-row.k4, .stat-row.k6 { grid-template-columns: 1fr 1fr; } }

.seg button { flex: none; white-space: nowrap; padding: 0 14px; }
.dt .end .icon-btn { display: inline-grid; vertical-align: middle; margin-inline-start: 4px; }
.ring-t .c small { font-size: 10px; display: block; max-width: 64px; margin-inline: auto; }
.ring-t .c b { font-size: 26px; }
[role="button"] { cursor: pointer; }

.mono { white-space: nowrap; }

td.mono, th.mono { display: table-cell; }

/* ---- real maps (Leaflet via GaiaMap) ---- */
.dmap-wrap { position: relative; border-radius: 28px; }
.dmap-wrap > .gmap { border-radius: 28px; }
.dmap-bar { position: absolute; z-index: 6; top: 14px; inset-inline-start: 14px; inset-inline-end: 64px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.dmap-bar > * { pointer-events: auto; box-shadow: var(--sh-2); }
.dmap-bar .seg { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
.dmap-bar .chip-pick { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
.dmap-bar .chip-pick.on { background: var(--burgundy-700); color: var(--cream-100); }
[data-theme="dark"] .dmap-bar .chip-pick.on { background: var(--gold-500); color: var(--burgundy-900); }
.dmap-legend { position: absolute; z-index: 6; bottom: 26px; inset-inline-start: 14px; display: flex; gap: 14px; flex-wrap: wrap; padding: 7px 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: var(--sh-1); font-size: 11.5px; color: var(--text-2); pointer-events: none; }
.dmap-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: -1px; }
.dmap-ov { position: absolute; z-index: 6; inset-inline-end: 10px; top: 10px; display: flex; gap: 6px; }
.tier-row.sel td { background: color-mix(in srgb, var(--gold-500) 14%, transparent); }
.mapchips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mapchips .mc { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text); }
.mapchips .mc svg { color: var(--gold-600); }
.asg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.asg-grid .gmap { position: sticky; top: 0; }
@media (max-width: 900px) { .asg-grid { grid-template-columns: 1fr; } }
.addr-i { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 11px 12px; border-radius: 16px; border: 1px solid transparent; transition: background var(--t-fast), border-color var(--t-fast); }
.addr-i:hover { background: var(--surface-2); }
.addr-i.on { background: color-mix(in srgb, var(--gold-500) 14%, transparent); border-color: color-mix(in srgb, var(--gold-500) 50%, var(--line)); }
