/* Supremium Glossy - gold theme */
:root {
  color-scheme: dark;
  --floor: #080705; --base: #0d0c09; --card: #191710; --raised: #232017; --sunken: #100e09;
  --line: rgba(222,196,132,0.17); --line-strong: rgba(222,196,132,0.30);
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b;
  --gold: #d4b26a; --gold-hi: #ecd49a; --gold-top: #f3dfa6; --gold-deep: #9c7c38;
  --green: #4ccf8a; --yellow: #f0b44c; --red: #ef6a6a; --blue: #8fa0ff; --grey: #86868b; --white: #f5f5f7; --purple: #b98aff; --silver: #b9c2d6; --teal: #5fd0c5; --orange: #ff9a62;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --shadow-card: inset 0 1px 0 rgba(255,240,200,0.07), 0 28px 56px -30px #000;
  --shadow-tile: inset 0 1px 0 rgba(255,240,200,0.10), 0 18px 36px -22px #000, 0 2px 6px rgba(0,0,0,0.35);
  --shadow-sunken: inset 0 2px 8px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--floor); }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--floor);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: var(--gold-top); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.t2 { color: var(--text-2); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(212,178,106,0.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(222,196,132,0.25) transparent; }

/* ---------- fixed background */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--floor); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.blob.b1 { width: 620px; height: 620px; left: -180px; top: -220px; background: rgba(212,178,106,0.14); animation: drift-a 42s var(--ease) infinite alternate; }
.blob.b2 { width: 520px; height: 520px; right: -140px; top: -160px; background: rgba(243,223,166,0.09); animation: drift-b 36s var(--ease) infinite alternate; }
.blob.b3 { width: 700px; height: 700px; left: 30%; bottom: -420px; background: rgba(143,160,255,0.09); animation: drift-c 50s var(--ease) infinite alternate; }
.blob.b4 { width: 380px; height: 380px; right: 8%; bottom: 6%; background: rgba(212,178,106,0.05); animation: drift-a 30s var(--ease) infinite alternate-reverse; }
.dots {
  position: absolute; inset: 0; background-image: radial-gradient(rgba(222,196,132,0.16) 1px, transparent 1.2px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.5) 45%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.5) 45%, transparent 85%);
}
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(0,0,0,0.6) 100%); }
@keyframes drift-a { to { transform: translate(90px, 70px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-110px, 60px) scale(0.92); } }
@keyframes drift-c { to { transform: translate(-80px, -90px) scale(1.1); } }

/* ---------- top bar */
.topbar {
  position: fixed; z-index: 30; top: 14px; left: 50%; transform: translateX(-50%); width: min(1320px, calc(100vw - 32px)); height: 58px;
  display: flex; align-items: center; gap: 14px; padding: 0 14px 0 18px; border-radius: 18px;
  background: rgba(16,14,9,0.66); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,240,200,0.08), 0 24px 48px -24px #000, 0 6px 16px rgba(0,0,0,0.4);
}
.topbar::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(236,212,154,0.75), transparent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.02em; font-size: 15px; white-space: nowrap; }
.brand b { font-weight: 600; background: linear-gradient(180deg, var(--gold-top), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #1a1508; background: linear-gradient(160deg, var(--gold-top), var(--gold) 55%, var(--gold-deep)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 18px -6px rgba(212,178,106,0.42); }
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav { flex: none; }
.nav a { position: relative; padding: 7px 9px; white-space: nowrap; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 7px; transition: color .25s var(--ease), background .25s var(--ease); }
.nav a:hover { color: var(--text); background: rgba(236,212,154,0.06); }
.nav a.active { color: var(--gold-top); background: rgba(212,178,106,0.13); box-shadow: inset 0 0 0 1px rgba(212,178,106,0.22); }
.nav a.active::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -11px; height: 2px; border-radius: 2px; background: var(--gold-hi); box-shadow: 0 0 12px 1px rgba(236,212,154,0.54); }
.nav .count { font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 999px; color: var(--yellow); background: rgba(240,180,76,0.12); border: 1px solid rgba(240,180,76,0.32); }
.count:empty { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.top-right > * { flex: none; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; padding: 3px 10px; border-radius: 999px; color: #1a1508; background: linear-gradient(180deg, var(--gold-top), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 16px -4px rgba(212,178,106,0.42); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--gold-top); background: var(--raised); border: 0; cursor: pointer; box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 4px rgba(212,178,106,0.14), 0 6px 14px rgba(0,0,0,0.5); }
.lang { width: auto; min-width: 64px; height: 34px; border-radius: 999px; padding: 0 30px 0 13px; font-size: 12px; font-weight: 600; color: var(--gold-hi); background-position: right 11px center; }
.tile.link { cursor: pointer; }
.brand-logo { height: 29px; width: auto; display: block; flex: none; filter: drop-shadow(0 3px 9px rgba(212,178,106,0.3)); }
.tabbar { display: none; }
body.signed-out .nav, body.signed-out .top-right, body.signed-out .tabbar { display: none !important; }

/* ---------- page */
main { position: relative; z-index: 1; width: min(1320px, calc(100vw - 32px)); margin: 0 auto; padding: 92px 0 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.loading { color: var(--text-3); padding: 120px 0; text-align: center; }
.foot-note { color: var(--text-3); font-size: 12px; text-align: center; padding-top: 8px; }
.reveal { animation: rise 0.7s var(--ease) var(--d, 0ms) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- hero */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 32px 34px 34px; border: 1px solid rgba(212,178,106,0.30);
  background: linear-gradient(135deg, #1e1b10 0%, #131109 48%, #0a0906 100%);
  box-shadow: inset 0 1px 0 rgba(255,240,200,0.10), 0 0 0 1px rgba(0,0,0,0.5), 0 0 70px -18px rgba(212,178,106,0.18), 0 40px 80px -40px rgba(212,178,106,0.17), 0 30px 60px -30px #000;
}
.hero-fx { position: absolute; inset: 0; pointer-events: none; }
.hb { position: absolute; border-radius: 50%; filter: blur(70px); }
.hb.h1 { width: 420px; height: 420px; left: -120px; top: -200px; background: rgba(212,178,106,0.21); animation: drift-a 34s var(--ease) infinite alternate; }
.hb.h2 { width: 360px; height: 360px; right: 6%; top: -220px; background: rgba(243,223,166,0.14); animation: drift-b 40s var(--ease) infinite alternate; }
.hb.h3 { width: 460px; height: 460px; right: 22%; bottom: -360px; background: rgba(143,160,255,0.14); animation: drift-c 46s var(--ease) infinite alternate; }
.hero-lines {
  position: absolute; top: 0; right: 0; width: 62%; height: 100%;
  background: repeating-linear-gradient(118deg, rgba(222,196,132,0.11) 0 1px, transparent 1px 15px);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 100% 0%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse 70% 80% at 100% 0%, #000 0%, transparent 72%);
}
.hero-logo { position: absolute; width: 470px; height: 326px; right: -50px; top: -50px; fill: none; stroke: rgba(236,212,154,0.4); stroke-width: 1; stroke-linejoin: round; transform-origin: 50% 50%; animation: spin 90s linear infinite; }
.hero-logo path { vector-effect: non-scaling-stroke; }
.hero-logo .echo { stroke: rgba(236,212,154,0.2); animation: logo-echo 6s ease-in-out infinite; }
.hero-logo .echo.e2 { stroke: rgba(236,212,154,0.13); animation-delay: 0.9s; }
.hero-logo .echo.e3 { stroke: rgba(236,212,154,0.07); animation-delay: 1.8s; }
@keyframes logo-echo { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (max-width: 700px) { .hero-logo { width: 330px; height: 229px; right: -70px; top: -44px; opacity: 0.7; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); font-weight: 500; margin-bottom: 10px; }
.title {
  font-size: clamp(32px, 4.2vw, 56px); line-height: 1.04; font-weight: 600; letter-spacing: -0.03em; padding-bottom: 4px;
  background: linear-gradient(100deg, #ffffff 0%, #f5efe0 42%, var(--gold-hi) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title em { font-style: normal; background: linear-gradient(180deg, var(--gold-top), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-body { position: relative; margin-top: 28px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: var(--gold-hi); background: rgba(212,178,106,0.12); border: 1px solid rgba(212,178,106,0.32); }
.chip.live { color: var(--green); background: rgba(76,207,138,0.12); border-color: rgba(76,207,138,0.32); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76,207,138,0.6); } 70% { box-shadow: 0 0 0 8px rgba(76,207,138,0); } 100% { box-shadow: 0 0 0 0 rgba(76,207,138,0); } }

/* ---------- surfaces */
.card {
  position: relative; border-radius: 16px; padding: 26px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #1f1c13 0%, var(--card) 28%, #14120c 100%); box-shadow: var(--shadow-card);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { font-size: 20px; }
.card-head .sub { font-size: 13px; color: var(--text-3); }
.sunken { background: var(--sunken); border: 1px solid rgba(222,196,132,0.10); border-radius: 12px; box-shadow: var(--shadow-sunken); }
.sunken.pad { padding: 18px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  --c: var(--gold); position: relative; border-radius: 14px; padding: 20px; min-width: 0; border: 1px solid var(--line);
  background: linear-gradient(180deg, #2c2819 0%, var(--raised) 40%, #1c1a12 100%); box-shadow: var(--shadow-tile);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: var(--shadow-tile), 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent), 0 22px 50px -18px color-mix(in srgb, var(--c) 30%, transparent); }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tile .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.tile .round { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); box-shadow: 0 0 11px -6px var(--c); }
.big { font-size: clamp(30px, 2.9vw, 44px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 25%, var(--c, var(--gold)) 130%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big.xl { font-size: clamp(38px, 4.4vw, 54px); }
.tile .subline { font-size: 12px; color: var(--text-3); margin-top: 4px; min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { margin-top: 14px; height: 40px; padding: 7px 10px; display: flex; align-items: center; position: relative; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; }
.mini-bars i { flex: 1; min-height: 2px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 100%, #fff 0%), color-mix(in srgb, var(--c) 45%, transparent)); transform-origin: bottom; animation: spring 0.8s var(--ease) calc(var(--i, 0) * 28ms) both; }
.mini-line { position: relative; width: 100%; height: 100%; }
.mini-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: wipe 1.3s var(--ease) 0.15s both; }
@keyframes wipe { from { clip-path: inset(-6px 100% -6px 0); } to { clip-path: inset(-6px -6px -6px 0); } }
.mini-line path { fill: none; stroke: var(--c); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2px var(--c)); }
.mini-line .end { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--c), 0 0 8px 1px var(--c); animation: pop 0.5s var(--ease) 1.2s both; }
.mini-pills { display: flex; flex-wrap: wrap; gap: 3px; align-content: center; width: 100%; max-height: 100%; overflow: hidden; }
.mini-pills i { width: 5px; height: 11px; border-radius: 3px; background: var(--p, var(--c)); box-shadow: 0 0 4px -1px var(--p, var(--c)); animation: pop 0.45s var(--ease) calc(var(--i, 0) * 16ms) both; }
.mini-progress { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.mini-progress .track { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.mini-progress .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c)); box-shadow: 0 0 6px var(--c); transform-origin: left; animation: growx 1.1s var(--ease) 0.15s both; }
@keyframes spring { 0% { transform: scaleY(0); } 62% { transform: scaleY(1.12); } 82% { transform: scaleY(0.96); } 100% { transform: scaleY(1); } }
@keyframes growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }

/* ---------- buttons */
.btn {
  position: relative; overflow: hidden; height: 34px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #f6ecd0;
  background: linear-gradient(180deg, rgba(243,223,166,0.20), rgba(212,178,106,0.11)); border: 1px solid rgba(236,212,154,0.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 4px 12px -4px rgba(0,0,0,0.7);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: rgba(236,212,154,0.6); color: #fff; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.primary {
  color: #1a1508; border: 0; background: linear-gradient(180deg, var(--gold-top) 0%, var(--gold) 52%, #b08e45 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), inset 0 -1px 0 rgba(0,0,0,0.18), 0 0 0 1px rgba(156,124,56,0.6), 0 8px 26px -6px rgba(212,178,106,0.39), 0 0 34px -10px rgba(236,212,154,0.36);
}
.btn.primary:hover { color: #1a1508; filter: brightness(1.06); }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46%; left: -60%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent); animation: sheen 6s var(--ease) infinite; }
@keyframes sheen { 0%, 78% { left: -60%; } 100% { left: 130%; } }
.btn.outline { color: var(--gold-hi); background: #0b0a07; border: 1px solid rgba(212,178,106,0.55); box-shadow: 0 0 18px -8px rgba(212,178,106,0.48), inset 0 1px 0 rgba(255,240,200,0.05); }
.btn.outline:hover { color: var(--gold-top); border-color: var(--gold-hi); }
.btn.danger { color: var(--red); background: #0b0a07; border-color: rgba(239,106,106,0.5); box-shadow: 0 0 18px -8px rgba(239,106,106,0.42); }
.btn.icon { width: 34px; padding: 0; }
.btn.small { height: 30px; padding: 0 13px; font-size: 12px; }
.btn.small.icon { width: 30px; padding: 0; }
/* ---------- inputs */
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); width: 100%; min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px;
  background: var(--sunken); border: 1px solid rgba(222,196,132,0.14); box-shadow: var(--shadow-sunken);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
textarea { height: auto; min-height: 76px; padding: 11px 14px; line-height: 1.45; resize: vertical; }
select { -webkit-appearance: none; appearance: none; padding-right: 34px; 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='%23d4b26a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
select option, select optgroup { background: #191710; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--shadow-sunken), 0 0 0 4px rgba(212,178,106,0.16), 0 0 22px -6px rgba(212,178,106,0.36); }
.btn:focus-visible, .rail button:focus-visible, .avatar:focus-visible, a:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
input[type=checkbox] { width: 17px; height: 17px; padding: 0; accent-color: var(--gold); box-shadow: none; cursor: pointer; }
input[type=file] { height: auto; padding: 9px 12px; }
input[type=date], input[type=month] { color-scheme: dark; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 500; min-width: 0; }
label.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
.search { position: relative; flex: 1; min-width: 240px; }
.search .ic { position: absolute; left: 14px; top: 13px; color: var(--gold); }
.search input { padding-left: 40px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.rail { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--sunken); border: 1px solid rgba(222,196,132,0.12); box-shadow: var(--shadow-sunken); max-width: 100%; overflow-x: auto; }
.rail button, .rail a { height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: color .25s var(--ease), background .25s var(--ease); }
.rail button:hover, .rail a:hover { color: var(--text); }
.rail button.active { color: #1a1508; font-weight: 600; background: linear-gradient(180deg, var(--gold-top), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 0 18px -4px rgba(212,178,106,0.45); }
.rail select { height: 30px; border: 0; background-color: transparent; box-shadow: none; font-weight: 600; width: auto; padding-left: 12px; }
.rail select:focus { box-shadow: none; }

/* ---------- status & trends */
.pill { --c: var(--grey); display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: color-mix(in srgb, var(--c) 82%, #fff); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 5px 0 var(--c); }
.pill.open { --c: var(--yellow); } .pill.paid { --c: var(--green); } .pill.credit_note { --c: var(--blue); } .pill.cancelled { --c: var(--grey); } .pill.dispute { --c: var(--red); }
.pill.good { --c: var(--green); } .pill.warn { --c: var(--yellow); } .pill.bad { --c: var(--red); } .pill.gold { --c: var(--gold); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend .ic { width: 13px; height: 13px; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); }
td.pos { color: var(--green); font-weight: 600; } td.neg { color: var(--red); font-weight: 600; }

/* ---------- lists */
.list { overflow: hidden; }
.item { display: grid; align-items: center; gap: 16px; padding: 13px 18px; border-bottom: 1px solid rgba(222,196,132,0.08); transition: background .25s var(--ease); }
.item:last-child { border-bottom: 0; }
.item.click { cursor: pointer; }
.item.click:hover { background-color: rgba(236,212,154,0.055); }
.list .sep { display: flex; align-items: center; gap: 14px; padding: 7px 18px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); background: rgba(212,178,106,0.05); border-bottom: 1px solid rgba(222,196,132,0.08); }
.list .sep::before, .list .sep::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(236,212,154,0.55), transparent); }
.btn.quiet { color: var(--text-3); background: rgba(255,255,255,0.03); border-color: rgba(222,196,132,0.16); box-shadow: none; }
.btn.quiet:hover { color: var(--red); border-color: rgba(239,106,106,0.55); box-shadow: 0 0 16px -6px rgba(239,106,106,0.48); }
.pdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; box-shadow: 0 0 4px currentColor; vertical-align: 1px; }
.sq { --c: var(--gold); width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 10px -8px var(--c); }
.item .ttl { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.item .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .amt small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); }
.item .end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px; border-bottom: 1px solid rgba(222,196,132,0.12); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid rgba(222,196,132,0.07); }
tr:last-child td { border-bottom: 0; }
th.right, td.right { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover td { background: rgba(236,212,154,0.05); }
td .sub { font-size: 11px; color: var(--text-3); margin-left: 6px; }
tr.total td { font-weight: 600; color: var(--gold-hi); border-top: 1px solid var(--line); }
td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tooltip { position: fixed; z-index: 90; pointer-events: none; min-width: 160px; max-width: 280px; padding: 10px 12px; border-radius: 12px; font-size: 12px; background: rgba(25,23,16,0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -14px #000, 0 0 24px -10px rgba(212,178,106,0.3); }
.tooltip b { display: block; margin-bottom: 5px; color: var(--gold-top); font-weight: 600; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 18px; color: var(--text-2); }
.tooltip .tt-row span:last-child { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.login { max-width: 400px; display: grid; gap: 14px; }

/* ---------- drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4,3,2,0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer { position: fixed; z-index: 50; top: 12px; right: 12px; bottom: 12px; width: min(640px, calc(100vw - 24px)); display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #1f1c13, #14120c 30%, #0f0d09); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(255,240,200,0.08), -30px 0 80px -30px #000, 0 0 60px -24px rgba(212,178,106,0.24); animation: slide 0.45s var(--ease) both; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer[hidden], .drawer-backdrop[hidden], .tooltip[hidden] { display: none; }
.drawer-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(212,178,106,0.10), transparent 60%); }
.drawer-head .ttl-row { display: flex; align-items: center; gap: 12px; }
.drawer-head h1 { font-size: 22px; background: linear-gradient(100deg, #fff, var(--gold-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drawer-body { padding: 6px 26px 26px; overflow: auto; flex: 1; }
.drawer-body h3, .sec { font-size: 11px; margin: 24px 0 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.drawer-foot { padding: 16px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; background: rgba(8,7,5,0.5); }
.inline-form { margin-top: 16px; padding: 18px; }
.history { font-size: 12px; color: var(--text-2); display: grid; gap: 6px; }
.history span { color: var(--text-3); margin-right: 10px; font-variant-numeric: tabular-nums; }
.note { --c: var(--blue); border-radius: 12px; padding: 12px 16px; font-size: 13px; color: color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.note.warn { --c: var(--yellow); } .note.good { --c: var(--green); } .note.bad { --c: var(--red); }
.toasts { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 95; justify-items: center; }
.toast { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--gold-top); background: rgba(25,23,16,0.94); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -14px #000, 0 0 26px -10px rgba(212,178,106,0.42); animation: rise 0.4s var(--ease) backwards; }
.toast.error { color: #ffd1d1; border-color: rgba(239,106,106,0.5); box-shadow: 0 18px 40px -14px #000, 0 0 26px -10px rgba(239,106,106,0.42); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chart .line-cur, .chart .line-ref { stroke-dashoffset: 0; }
  .chart .area-cur, .chart .line-avg, .chart .dot-avg, .chart .line-fc, .chart .dot-fc, .chart .area-fc, .chart .halo-fc, .chart .badge-fc { opacity: 1; }
}
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation: none !important; transition: none !important; }
body.no-motion .tile:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow-tile); }
body.no-motion .btn:hover { transform: none; }
.motion-toggle.off { color: var(--text-3); }
