/* 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: 18px; 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: 10px; }
.nav { flex: none; }
.nav a { position: relative; padding: 7px 12px; 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: 8px; 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: 36px; width: auto; display: block; filter: drop-shadow(0 4px 12px rgba(212,178,106,0.45)); }
.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-rhombus { position: absolute; width: 460px; height: 460px; right: -150px; top: -190px; stroke: rgba(236,212,154,0.34); fill: none; stroke-width: 0.5; animation: spin 90s linear infinite; }
@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; }
body.role-viewer .w { display: none !important; }

/* ---------- 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); }
.item.inv { grid-template-columns: 38px minmax(0, 1.5fr) 150px 130px 132px; }
.item.rec { grid-template-columns: 38px minmax(0, 1.5fr) 30px 150px 120px auto; }
.item.bill { grid-template-columns: 46px 156px minmax(0, 1.5fr) 150px 120px 150px; }
.item.cus { grid-template-columns: 38px minmax(0, 1.6fr) 90px 120px 110px; }
.item.usr { grid-template-columns: 38px minmax(0, 1fr) 150px auto; }
.item.sync { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1.2fr) auto auto; }
@media (max-width: 700px) { .item.sync { grid-template-columns: 38px minmax(0, 1fr) auto auto; } .item.sync > .t2 { grid-column: 2 / -1; text-align: left !important; } }
.item.hr { grid-template-columns: 38px minmax(0, 1.6fr) 120px 150px 150px; }
.item.hr .ttl.person { font-size: 16px; letter-spacing: -0.02em; }
.item.hr .ttl.person .company { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--text-3); margin-left: 8px; }
.hr-side { display: flex; gap: 22px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 9; }
.ring-arc { fill: none; stroke: var(--gold-hi); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(236,212,154,0.4)); animation: ring 1.2s var(--ease) 0.2s both; }
@keyframes ring { from { stroke-dasharray: 0 100; } }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; }
.ring-label b { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff 25%, var(--gold) 135%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ring-label small { font-size: 11px; color: var(--text-3); }
.item.mem { grid-template-columns: 46px 156px minmax(0, 1.5fr) 120px 34px; padding-top: 11px; padding-bottom: 11px; }
/* the plan is the first thing to read: a strong badge, and its colour as a soft wash from the left */
.item.mem, .item.bill { --pc: var(--grey); background-image: linear-gradient(90deg, color-mix(in srgb, var(--pc) 10%, transparent), transparent 46%); }
.plan-badge { --c: var(--grey); display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 13px; border-radius: 999px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 86%, #fff);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 10%, transparent)); border: 1px solid color-mix(in srgb, var(--c) 46%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 10px -8px var(--c); }
.plan-badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 5px 0 var(--c); }
.item .amt small.only-s { display: none; }
/* the Black plan: graphite - clearly dark, but not a black hole */
.plan-badge.black { color: #f5f5f7; background: linear-gradient(180deg, #47474c 0%, #2a2a2e 55%, #1c1c1f 100%); border-color: rgba(245,245,247,0.34); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 6px 14px -8px #000; }
.plan-badge.black::before { background: #1c1c1f; box-shadow: 0 0 0 1.5px rgba(245,245,247,0.8); }
.item.mem.black, .item.bill.black { background-image: linear-gradient(90deg, rgba(0,0,0,0.30), rgba(0,0,0,0.10) 30%, transparent 48%); }
.sq.black { color: #f5f5f7; background: linear-gradient(180deg, #47474c, #1c1c1f); border-color: rgba(245,245,247,0.30); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14); }
.hbar.black .fill { background: linear-gradient(90deg, #2a2a2e 0%, #5c5c63 100%); box-shadow: inset 0 0 0 1px rgba(245,245,247,0.30); }
.pdot.black { background: #3a3a3f; box-shadow: 0 0 0 1.5px rgba(245,245,247,0.75); }
.list.cancelled .item.mem { grid-template-columns: 46px 156px minmax(0, 1.5fr) 120px 150px; }
.list.cancelled .item.mem .sq { width: 46px; height: 46px; border-radius: 12px; }
/* calendar leaf for the billing day */
.daytile { --c: var(--gold-hi); width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 2px; line-height: 1;
  border: 1px solid var(--line); background: linear-gradient(180deg, #2c2819 0%, var(--raised) 45%, #1c1a12 100%); box-shadow: var(--shadow-tile); }
.daytile small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.daytile b { font-size: 19px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #ffffff 25%, var(--c) 135%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.daytile.soon { --c: var(--gold); border-color: rgba(212,178,106,0.6); box-shadow: var(--shadow-tile), 0 0 20px -6px rgba(236,212,154,0.45); }
.daytile.soon small { color: var(--gold-hi); }
.daytile.due { --c: var(--red); border-color: rgba(239,106,106,0.5); box-shadow: var(--shadow-tile), 0 0 20px -6px rgba(239,106,106,0.42); }
.daytile.due small { color: var(--red); }
.item.bill { padding-top: 11px; padding-bottom: 11px; }
.item .amt small .pdot { width: 6px; height: 6px; margin-right: 5px; }
.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); }
table.months th.plan, table.months td.plan { padding-left: 10px; padding-right: 10px; width: 64px; }
table.months th.plan { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text-2); }
table.months .plan-first { border-left: 1px solid rgba(222,196,132,0.14); }
table.months .plan-last { border-right: 1px solid rgba(222,196,132,0.14); }
.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; }
.steps { display: flex; align-items: center; }
.steps .dot { width: 11px; height: 11px; border-radius: 50%; padding: 0; border: 1.5px solid rgba(222,196,132,0.32); background: var(--sunken); flex: none; }
.steps button.dot { cursor: pointer; }
.steps button.dot:hover { border-color: var(--gold-hi); box-shadow: 0 0 10px rgba(236,212,154,0.42); }
.steps .dot.on { --c: var(--gold); border-color: var(--c); background: var(--c); box-shadow: 0 0 5px -1px var(--c); }
.steps .dot.green { --c: var(--green); } .steps .dot.yellow { --c: var(--yellow); } .steps .dot.red { --c: var(--red); } .steps .dot.blue { --c: var(--blue); }
.steps .dot.off { border-color: rgba(134,134,139,0.5); background: rgba(134,134,139,0.25); }
.steps .bar { flex: 1; height: 2px; background: rgba(222,196,132,0.16); }
.steps .bar.on { background: linear-gradient(90deg, var(--gold), rgba(212,178,106,0.5)); }
.steps-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.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; }

/* ---------- charts */
.chart { position: relative; width: 100%; padding: 18px 16px 10px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: rgba(222,196,132,0.09); stroke-width: 1; }
.chart .axis-line { stroke: rgba(222,196,132,0.24); stroke-width: 1; }
.chart .bar { opacity: 0.62; transform-box: fill-box; transform-origin: bottom; animation: growy 0.8s var(--ease) calc(var(--i, 0) * 30ms) both; transition: opacity .25s var(--ease); }
.chart .bar.selected { opacity: 1; filter: drop-shadow(0 0 6px rgba(236,212,154,0.36)); }
.chart .bar.tone-blue.selected { filter: drop-shadow(0 0 6px rgba(143,160,255,0.42)); }
.chart .bar.tone-green.selected { filter: drop-shadow(0 0 6px rgba(76,207,138,0.39)); }
.chart .sub-band { fill: rgba(236,212,154,0.045); }
.chart .sub-line { stroke: rgba(222,196,132,0.30); stroke-width: 1; }
.chart text.sub-label { font-size: 11px; fill: var(--text-3); letter-spacing: 0.04em; }
.chart .group-line { stroke: rgba(222,196,132,0.28); stroke-width: 1; stroke-dasharray: 2 5; }
.chart text.group-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; fill: var(--gold-hi); }
.chart text.group-label.tone-blue { fill: var(--blue); }
.chart text.group-label.tone-green { fill: var(--green); }
.chart .line-avg { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 7; opacity: 0; animation: fade 0.9s var(--ease) 1.1s forwards; }
.chart .dot-avg { fill: var(--sunken); stroke: var(--green); stroke-width: 2; opacity: 0; animation: fade 0.4s var(--ease) 1.6s forwards; }
.legend i.dashed { background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px); box-shadow: none; }
.chart g:hover > .bar { opacity: 0.9; }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .line-cur, .chart .line-ref { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s var(--ease) 0.2s forwards; }
.chart .line-cur { stroke: var(--gold-hi); filter: drop-shadow(0 0 4px rgba(236,212,154,0.39)); }
.chart .line-ref { stroke: var(--blue); opacity: 0.85; }
.chart .area-cur { opacity: 0; animation: fade 1s var(--ease) 0.9s forwards; }
@keyframes fade { to { opacity: 1; } }
.chart .dot-cur { fill: #fff; stroke: var(--gold-hi); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(236,212,154,0.62)); animation: fade 0.4s var(--ease) 1.5s both; }
.chart .dot-ref { fill: var(--sunken); stroke: var(--blue); stroke-width: 2; animation: fade 0.4s var(--ease) 1.5s both; }
.chart .cross { stroke: rgba(236,212,154,0.5); stroke-width: 1; stroke-dasharray: 3 3; }
.chart text.end-label { font-size: 12px; font-weight: 600; fill: var(--text); }
.chart text.x-sel { fill: var(--gold-top); font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 7px; box-shadow: 0 0 4px currentColor; }
/* one grid for the whole list, so amounts and counts line up in columns */
.hbars { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) max-content max-content; column-gap: 14px; row-gap: 12px; align-items: center; padding: 18px; font-size: 13px; }
.hbars > .empty { grid-column: 1 / -1; }
.hbar { --c: var(--gold); display: contents; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .track { height: 8px; border-radius: 8px; background: rgba(255,255,255,0.05); overflow: hidden; }
.hbar .fill { display: block; height: 100%; min-width: 3px; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, transparent), var(--c)); box-shadow: 0 0 7px -2px var(--c); transform-origin: left; animation: growx 0.9s var(--ease) calc(var(--i, 0) * 45ms) both; }
.hbar .fill.soft { opacity: 0.5; box-shadow: none; }
.hbar .val { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.hbar .extra { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; color: var(--text-3); display: flex; justify-content: flex-end; }
.hbar.sel .name { color: var(--text); font-weight: 600; }
.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; }
.matrix td, .matrix th { padding: 8px 12px; font-size: 12px; white-space: nowrap; }

/* ---------- page specific hero content */
.phase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.phase .step { position: relative; padding-top: 22px; color: var(--text-3); font-size: 13px; }
.phase .step::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: rgba(222,196,132,0.16); }
.phase .step::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--sunken); border: 1.5px solid rgba(222,196,132,0.4); }
.phase .step b { display: block; color: var(--text-2); font-weight: 600; font-size: 14px; }
.phase .step.done::before { background: linear-gradient(90deg, var(--gold), rgba(212,178,106,0.35)); }
.phase .step.done::after { background: var(--gold); border-color: var(--gold-top); box-shadow: 0 0 12px rgba(236,212,154,0.54); }
.phase .step.done b { color: var(--gold-top); }
.phase .step.now::after { border-color: var(--gold-top); box-shadow: 0 0 0 4px rgba(212,178,106,0.18); }
.phase .step.now b { color: var(--text); }
.duo { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 34px; align-items: center; }
.funnel { display: grid; gap: 7px; }
.funnel .lvl { --c: var(--gold); display: grid; grid-template-columns: 110px minmax(0, 1fr) 120px; gap: 14px; align-items: center; font-size: 13px; color: var(--text-2); }
.funnel .shape { height: 30px; display: flex; justify-content: center; }
.funnel .shape i { display: block; height: 100%; min-width: 26px; clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 9px 100%); background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 40%, transparent)); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 32%, transparent)); transform-origin: center; animation: growx 0.9s var(--ease) calc(var(--i, 0) * 90ms) both; }
.funnel .val { text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel .val small { color: var(--text-3); font-weight: 400; margin-left: 6px; font-size: 11px; }
.facts { display: flex; gap: 38px; flex-wrap: wrap; margin-top: 20px; }
.fact .v { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.fact .k { font-size: 12px; color: var(--text-3); }
.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); }

/* ---------- new invoice */
.new-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 20px; align-items: start; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 320px; overflow: auto; padding: 6px; border-radius: 14px; background: rgba(25,23,16,0.97); border: 1px solid var(--line-strong); box-shadow: 0 24px 50px -18px #000, 0 0 30px -14px rgba(212,178,106,0.3); }
.combo-item { padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.combo-item:hover { background: rgba(236,212,154,0.08); }
.combo-item .sub { font-size: 12px; color: var(--text-3); }
.picked { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.paper-wrap { position: sticky; top: 92px; }
.paper-wrap::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -26px; height: 40px; border-radius: 50%; background: rgba(212,178,106,0.17); filter: blur(26px); z-index: -1; }
.preview { background: #fdfcf9; color: #111; border-radius: 8px; padding: 28px 28px 22px; font-size: 11.5px; line-height: 1.5; box-shadow: 0 0 0 1px rgba(212,178,106,0.4), 0 40px 70px -30px #000; animation: float 9s var(--ease) infinite alternate; }
@keyframes float { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
.preview .p-head { display: flex; justify-content: space-between; }
.preview .p-company { font-size: 16px; font-weight: 700; }
.preview .p-muted { color: #6b6b72; }
.preview .p-facts { margin: 14px 0 6px auto; width: max-content; display: grid; grid-template-columns: auto auto; gap: 1px 14px; text-align: right; }
.preview .p-table { margin-top: 18px; border-top: 1.5px solid #111; border-bottom: 1px solid #d2d2d6; padding: 10px 0; }
.preview .p-th { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.preview .p-item { display: flex; justify-content: space-between; gap: 20px; font-weight: 700; }
.preview .p-details { white-space: pre-wrap; color: #6b6b72; font-size: 11px; margin-top: 3px; max-width: 80%; }
.preview .p-totals { margin: 10px 0 0 auto; width: max-content; display: grid; grid-template-columns: auto auto auto; gap: 2px 14px; text-align: right; }
.preview .p-totals .strong { font-weight: 700; font-size: 13px; padding-top: 3px; }
.preview .p-bank { margin-top: 16px; }
.preview .p-bank div { padding-left: 10px; font-size: 11px; }
.preview .p-foot { margin-top: 16px; border-top: 1px solid #d2d2d6; padding-top: 8px; font-size: 11px; color: #6b6b72; }
.total-box { padding: 10px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; height: 42px; }
.total-box b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gold-top); }

/* ---------- settings */
.bank { padding: 16px; display: grid; gap: 12px; }
.catalog input, .catalog select, .catalog textarea { height: 36px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.catalog textarea { min-height: 36px; padding-top: 8px; }
.catalog td { padding: 4px; border: 0; vertical-align: top; }
.catalog th { padding: 6px 8px; border: 0; }
.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); }

/* ---------- responsive */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .new-layout, .duo { grid-template-columns: minmax(0, 1fr); }
  .paper-wrap { position: relative; top: 0; }
}
@media (max-width: 1320px) {            /* keep six tabs on one line: drop the wordmark and the role badge first */
  .brand span:last-child, .badge { display: none; }
  .topbar { gap: 12px; }
  .nav { margin-left: 4px; gap: 2px; }
  .nav a { padding: 7px 10px; }
}
@media (max-width: 1068px) {
  .topbar .nav { display: none; }
  .tabbar {
    position: fixed; z-index: 30; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 6px; border-radius: 22px;
    background: rgba(16,14,9,0.72); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(255,240,200,0.08), 0 24px 48px -16px #000, 0 0 40px -18px rgba(212,178,106,0.3);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 16px; font-size: 11px; font-weight: 500; color: var(--text-2); }
  .tabbar a .ic { width: 18px; height: 18px; }
  .tabbar a.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 20px -4px rgba(212,178,106,0.48); }
  main { padding-bottom: 130px; }
}
@media (max-width: 760px) {
  .hero { padding: 24px 20px 26px; }
  .card { padding: 20px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .g3, .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span3, .span4 { grid-column: 1 / -1; }
  .item.inv, .item.rec, .item.cus, .item.hr { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .item.hr .hide-s { display: none; }
  .hr-side { flex-direction: column; align-items: stretch; }
  .hr-side .ring { align-self: center; }
  .item.mem, .item.bill, .list.cancelled .item.mem { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .item.rec .q, .item.bill .hide-s { display: none; }
  .item .amt small.only-s { display: block; }
  .item.mem .hide-s { display: none; }
  .item.inv .steps-wrap, .item.rec .steps-wrap, .item.cus .hide-s, .item.inv .pill-wrap { display: none; }
  .item.usr { grid-template-columns: 38px minmax(0, 1fr); }
  .item.usr .end, .item.usr select { grid-column: 1 / -1; }
  .hbars { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) max-content max-content; column-gap: 10px; }
  .funnel .lvl { grid-template-columns: 84px minmax(0, 1fr) 96px; }
  .badge { display: none; }
  .topbar .lang { max-width: 74px; }
  .brand span:last-child { display: none; }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .phase .step { font-size: 0; } .phase .step b { font-size: 12px; }
}
@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 { opacity: 1; }
}
