:root {
  --bg: #0B0F1C; --bg-2: #0E1322; --panel: #131A2B; --panel-2: #182037; --raise: #1E2742;
  --line: rgba(255,255,255,0.07); --line-2: rgba(255,255,255,0.13);
  --ink: #EEF0F6; --ink-2: #BAC0D2; --muted: #8189A5;
  --gold: #E2B867; --gold-2: #F0CD8A; --gold-ink: #1A1406;
  --ok: #3DDC97; --warn: #F0B44C; --danger: #FF8B7B;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ui: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-lg: 16px; --r-md: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px -18px rgba(0,0,0,0.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); background-image: radial-gradient(70rem 26rem at 50% -10rem, rgba(226,184,103,0.08), transparent 65%); color: var(--ink); font-family: var(--ui); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
[hidden] { display: none !important; }
a { color: var(--gold-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

/* bar */
.bar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(11,15,28,0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar-l, .bar-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-r { justify-content: flex-end; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 23px; letter-spacing: -0.01em; line-height: 1; }
.brand b i { color: var(--gold); }
.vsep { width: 1px; height: 22px; background: var(--line-2); }
.crumb { color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.crumb:hover { color: var(--ink); }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--raise); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset; }
.save { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 4px 10px; white-space: nowrap; border: 1px solid rgba(226,184,103,0.35); color: var(--gold-2); background: rgba(226,184,103,0.07); text-decoration: none; }
.mode-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.mode-pill.on { border-color: rgba(61,220,151,0.35); color: #9EEBC6; background: rgba(61,220,151,0.07); }
.mode-pill.on i { background: var(--ok); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2B3558, #1C2440); border: 1px solid var(--line-2); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 0; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 40px; min-width: 210px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; display: grid; box-shadow: 0 18px 40px -16px rgba(0,0,0,.8); }
.menu-pop a, .menu-pop button { text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; background: none; border: 0; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--raise); color: var(--ink); }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu-who b { display: block; color: var(--ink); font-size: 13.5px; }
@media (max-width: 1080px) {
  .bar { grid-template-columns: 1fr auto; grid-template-areas: "l r" "n n"; }
  .bar-l { grid-area: l; } .bar-r { grid-area: r; } .nav { grid-area: n; justify-self: stretch; overflow-x: auto; }
  .nav a { flex: 1 0 auto; text-align: center; }
}
@media (max-width: 560px) { .vsep, .crumb, .save { display: none; } }

/* layout */
.wrap { max-width: 1320px; margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 18px; }
.wrap > * { min-width: 0; }
.wrap.narrow { max-width: 760px; }
.view-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-h h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -0.01em; }
.view-h h2 { margin: 0; font-size: 18px; font-weight: 600; }
.view-h p { margin: 4px 0 0; color: var(--muted); }
.card { background: linear-gradient(180deg, var(--panel), #11172A); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-b { padding: 16px; display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.sq { width: 10px; height: 8px; border-radius: 2.5px; display: inline-block; flex: none; }
.spacer { flex: 1; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; padding: 9px 14px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, filter .15s; text-decoration: none; background: none; }
.btn.sm { padding: 6px 11px; font-weight: 500; font-size: 13px; }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
.btn.gold:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn.ghost { border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.24); color: var(--ink); }
.btn.quiet { background: var(--panel-2); border-color: var(--line); color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); border-color: var(--line-2); }
.btn.danger { border-color: rgba(255,139,123,0.3); color: var(--danger); }
.btn.danger:hover { background: rgba(255,139,123,0.08); }
.btn.block { width: 100%; padding: 12px 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .flabel { font-size: 12px; color: var(--muted); font-weight: 500; }
.input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.input:focus { border-color: rgba(226,184,103,0.7); box-shadow: 0 0 0 3px rgba(226,184,103,0.12); }
.input[type="color"] { padding: 3px; height: 38px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.one { grid-template-columns: minmax(0, 1fr); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); text-align: left; }
.seg.left button { justify-content: flex-start; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); background: rgba(226,184,103,0.07); }
.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); background: none; border: 0; padding: 2px 0; text-align: left; }
.toggle i { width: 30px; height: 17px; border-radius: 999px; background: var(--raise); position: relative; transition: background .15s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink-2); transition: transform .15s; }
.toggle[aria-pressed="true"] i { background: rgba(226,184,103,0.45); }
.toggle:disabled { opacity: .5; cursor: not-allowed; }
.toggle[aria-pressed="true"] i::after { transform: translateX(13px); background: var(--gold); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--bg-2); color: var(--ink-2); font-size: 16px; }
.stepper button:hover { color: var(--ink); background: var(--panel-2); }
.stepper span { min-width: 44px; text-align: center; font-weight: 600; }
.money-in { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding-left: 10px; }
.money-in span { color: var(--muted); }
.money-in .input { border: 0; background: none; box-shadow: none; padding-left: 6px; }
.err { font-size: 13px; color: var(--danger); background: rgba(255,139,123,0.08); border: 1px solid rgba(255,139,123,0.25); border-radius: 10px; padding: 9px 11px; }
.ok-box { font-size: 13px; color: #9EEBC6; background: rgba(61,220,151,0.07); border: 1px solid rgba(61,220,151,0.25); border-radius: 10px; padding: 9px 11px; }
.warn-box { font-size: 13px; color: var(--gold-2); background: rgba(226,184,103,0.07); border: 1px solid rgba(226,184,103,0.25); border-radius: 10px; padding: 10px 12px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 420px; }
.auth .brand b { font-size: 34px; }
.auth h1 { margin: 6px 0 2px; font-size: 20px; font-weight: 600; }
.auth .tag { font-family: var(--display); font-style: italic; color: var(--ink-2); font-size: 16px; }

/* events */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ev-card { display: grid; gap: 12px; padding: 18px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.ev-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ev-card h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.2; }
.meter { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.new-card { display: grid; place-items: center; gap: 8px; min-height: 170px; border-style: dashed; color: var(--ink-2); background: transparent; box-shadow: none; }
.new-card:hover { color: var(--ink); border-color: var(--gold); }
.empty { text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }

/* studio */
.studio { display: grid; grid-template-columns: 84px minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 4px; padding: 8px; position: sticky; top: 78px; }
.rail button { display: grid; justify-items: center; gap: 5px; background: none; border: 1px solid transparent; border-radius: 10px; padding: 9px 4px; color: var(--ink-2); font-size: 10.5px; font-weight: 500; line-height: 1.15; text-align: center; }
.rail button:hover { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.rail svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.rail hr { border: 0; height: 1px; background: var(--line); margin: 4px 6px; }
.canvas-card { overflow: hidden; }
.canvas-tools { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.zoom { display: inline-flex; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.zoom button { background: none; border: 0; color: var(--ink-2); width: 30px; height: 28px; display: grid; place-items: center; font-size: 15px; }
.zoom button:hover { color: var(--ink); }
.zoom span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 42px; text-align: center; }
svg.map { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: none; }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .mono { color: var(--muted); font-size: 11.5px; }
.hint { font-size: 12px; color: var(--muted); }
kbd { font-family: var(--mono); font-size: 10.5px; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--ink-2); }
.insp { position: sticky; top: 78px; display: grid; gap: 14px; }
.kv { display: grid; gap: 8px; font-size: 13px; }
.kv .row span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.mix { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; }
.mix i { display: block; height: 100%; }
@media (max-width: 1100px) { .studio { grid-template-columns: 74px minmax(0, 1fr); } .insp { grid-column: 1 / -1; position: static; } }
@media (max-width: 640px) { .studio { grid-template-columns: minmax(0, 1fr); } .rail { position: static; flex-direction: row; overflow-x: auto; } .rail hr { display: none; } .rail button { min-width: 70px; } }

/* tickets */
.cat-row { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1.2fr) 150px 130px 120px 36px; gap: 10px; align-items: end; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.swatch { width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0; position: relative; overflow: hidden; }
.swatch input { position: absolute; inset: -8px; width: 70px; height: 60px; border: 0; padding: 0; cursor: pointer; }
.icon-btn { width: 36px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: none; color: var(--muted); display: grid; place-items: center; font-size: 16px; }
.icon-btn:hover { color: var(--danger); border-color: rgba(255,139,123,.3); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
@media (max-width: 1000px) { .cat-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); } .cat-row .field.wide { grid-column: span 2; } }

/* style */
.style-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.style-grid .controls { display: grid; gap: 14px; position: sticky; top: 78px; }
.presets { display: grid; gap: 8px; }
.preset { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 11px; text-align: left; color: var(--ink-2); }
.preset[aria-pressed="true"] { border-color: var(--gold); background: rgba(226,184,103,0.06); color: var(--ink); }
.preset .sw { display: flex; } .preset .sw i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -6px; } .preset .sw i:first-child { margin-left: 0; }
.preset b { display: block; font-size: 13px; color: var(--ink); } .preset small { color: var(--muted); font-size: 12px; }
.accents { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.accents button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2); padding: 0; }
.accents button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold); }
.preview-card { overflow: hidden; }
.preview-site { background: #fff; padding: 22px; }
.preview-site iframe { display: block; width: 100%; border: 0; height: 760px; }
@media (max-width: 1000px) { .style-grid { grid-template-columns: minmax(0, 1fr); } .style-grid .controls { position: static; } }

/* share */
pre.code { margin: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #D6DAE8; white-space: pre-wrap; word-break: break-all; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { font-family: var(--mono); font-size: 12.5px; }
.steps-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; }

/* orders */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; display: grid; gap: 4px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.orders-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .orders-grid { grid-template-columns: minmax(0, 1fr); } }
.tbl-wrap { overflow: auto; max-height: 640px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:hover td { background: rgba(255,255,255,0.015); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.paid, .pill.free, .pill.comp { color: #9EEBC6; border-color: rgba(61,220,151,.3); }
.pill.test, .pill.demo { color: var(--gold-2); border-color: rgba(226,184,103,.3); }
.pill.pending { color: var(--warn); border-color: rgba(240,180,76,.3); }
.pill.cancelled, .pill.refunded, .pill.conflict { color: var(--danger); border-color: rgba(255,139,123,.3); }
.chk { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); display: inline-grid; place-items: center; padding: 0; color: #0B0F1C; font-weight: 700; font-size: 13px; }
.chk[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(226,184,103,0.05); }

/* go live */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--bg-2); }
.plan.feat { border-color: rgba(226,184,103,.45); background: rgba(226,184,103,0.04); }
.plan .price { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; display: grid; gap: 4px; }
@media (max-width: 700px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* toast, modal, tooltip */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; background: var(--raise); border: 1px solid var(--line-2); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; z-index: 60; pointer-events: none; box-shadow: 0 18px 40px -16px rgba(0,0,0,.8); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255,139,123,.4); }
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(5,7,14,.7); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { margin: 0; font-size: 17px; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: #05070E; border: 1px solid var(--line-2); color: var(--ink); font-size: 12px; padding: 7px 9px; border-radius: 8px; max-width: 240px; }
.tip b { display: block; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
