:root {
  --bg: #0B0918;
  --bg-2: #100D20;
  --surface: #15122A;
  --surface-2: #1B1734;
  --border: #2A2448;
  --border-2: #3A3260;
  --text: #ECEAF6;
  --muted: #9A95B0;
  --faint: #6C6688;
  --accent: #6D4AFF;
  --accent-2: #8F74FF;
  --accent-deep: #2A1A80;
  --green: #34D399;
  --amber: #FBBF24;
  --red: #F87171;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 420px at 85% -120px, rgba(109, 74, 255, .22), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, rgba(42, 26, 128, .35), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.3px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, rgba(21, 18, 42, .9), rgba(11, 9, 24, .9));
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 4px 12px rgba(109, 74, 255, .55)); }
.wm { line-height: 1.05; }
.wm-a { font-weight: 800; font-size: 16px; letter-spacing: .6px; text-transform: uppercase; }
.wm-b { display: block; font-weight: 500; font-size: 10.5px; letter-spacing: 4.2px; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500;
  border: 1px solid transparent;
}
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(109, 74, 255, .22), rgba(109, 74, 255, .06)); color: #fff; border-color: rgba(109, 74, 255, .35); }
.nav a.active svg { color: var(--accent-2); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; font-size: 11px; background: rgba(248, 113, 113, .15); color: var(--red); padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.sidebar .spacer { flex: 1; }
.sidebar .new-row { display: flex; gap: 6px; margin: 0 4px 14px; }
.sidebar .new-btn { flex: 1; justify-content: center; }
.sidebar .new-quote { padding: 9px 11px; }
.shell > div { min-width: 0; }
.main { padding: 30px 38px 80px; min-width: 0; max-width: 1280px; width: 100%; }
.topbar { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); }

/* ---------- components */
.card { background: rgba(21, 18, 42, .78); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(6px); }
.card-pad { padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 15px; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px Inter, sans-serif; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #241F44; border-color: #4A4078; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, #7B5BFF, var(--accent)); border-color: #8A6DFF; color: #fff; box-shadow: 0 6px 20px -6px rgba(109, 74, 255, .7), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: linear-gradient(180deg, #8668FF, #7653FF); border-color: #9C84FF; }
.btn-success { background: linear-gradient(180deg, #22C58B, #12A36F); border-color: #34D399; color: #fff; }
.btn-success:hover { background: linear-gradient(180deg, #2AD596, #16B37A); border-color: #5EEAB4; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .4); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 7px; }

label.field { display: block; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .2px; }
.hint, .field .hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
input, select, textarea {
  width: 100%; font: 14px Inter, sans-serif; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 74, 255, .25); }
input[type="color"] { padding: 3px; height: 40px; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
select { appearance: none; 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='%239A95B0' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > *, .grid-3 > *, .field { min-width: 0; }
input, select, textarea { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: grid; gap: 16px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-draft { background: rgba(154, 149, 176, .12); color: #B9B4CF; border-color: rgba(154, 149, 176, .25); }
.pill-sent { background: rgba(251, 191, 36, .1); color: var(--amber); border-color: rgba(251, 191, 36, .3); }
.pill-overdue { background: rgba(248, 113, 113, .1); color: var(--red); border-color: rgba(248, 113, 113, .35); }
.pill-paid { background: rgba(52, 211, 153, .1); color: var(--green); border-color: rgba(52, 211, 153, .3); }
.pill-void { background: rgba(108, 102, 136, .12); color: var(--faint); border-color: rgba(108, 102, 136, .3); text-decoration: line-through; }
.pill-failed { background: rgba(248, 113, 113, .1); color: var(--red); }
.pill-partial { background: rgba(56, 189, 248, .1); color: #7DD3FC; border-color: rgba(56, 189, 248, .3); }
.pill-accepted, .pill-invoiced, .pill-active { background: rgba(52, 211, 153, .1); color: var(--green); border-color: rgba(52, 211, 153, .3); }
.pill-declined, .pill-expired, .pill-paused { background: rgba(108, 102, 136, .12); color: var(--muted); border-color: rgba(108, 102, 136, .3); }

/* tables */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.list td { padding: 13px 16px; border-bottom: 1px solid rgba(42, 36, 72, .6); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr.click { cursor: pointer; transition: background .12s; }
table.list tbody tr.click:hover { background: rgba(109, 74, 255, .07); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.strong { font-weight: 700; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty img { width: 64px; opacity: .8; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .k { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .9px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.stat .s { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.stat::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--c, var(--accent)); opacity: .9; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 20px 20px 8px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart .bar.exp { background: linear-gradient(180deg, #F59E0B, #92400E); opacity: .85; }
.chart .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent-2), var(--accent-deep)); min-height: 3px; position: relative; }
.chart .bar:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #000; color: #fff; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; z-index: 2; }
.chart .lbl { font-size: 11px; color: var(--faint); }
.chart .col.zero .bar { background: var(--border); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.lg-rev { background: var(--accent-2); } .lg-exp { background: #F59E0B; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; width: fit-content; flex-wrap: wrap; }
.tabs button { font: 600 13px Inter, sans-serif; color: var(--muted); background: none; border: 0; padding: 7px 13px; border-radius: 8px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--surface-2); color: #fff; box-shadow: 0 0 0 1px var(--border-2); }
.tabs .n { font-size: 11px; color: var(--faint); margin-left: 4px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; }
.search input { padding-left: 36px; width: 280px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--faint); }

/* invoice editor */
.editor { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; color: var(--faint); padding: 0 6px 8px; }
.items-table td { padding: 5px 6px; vertical-align: top; }
.items-table td.lt { padding-top: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.items-table textarea { min-height: 40px; height: 40px; resize: none; overflow: hidden; }
.items-table .handle { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.items-table .handle button { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0 2px; line-height: 1; font-size: 12px; }
.items-table .handle button:hover { color: var(--text); }
.items-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.summary { position: sticky; top: 20px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary .total { font-size: 24px; font-weight: 800; color: #fff; padding-top: 12px; border-top: 1px solid var(--border); }
.summary .total-l { padding-top: 16px; border-top: 1px solid var(--border); align-self: center; }
.input-prefix { position: relative; }
.input-prefix > b { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 500; pointer-events: none; }
.input-prefix input { padding-left: 26px; }

/* invoice detail */
.detail { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.preview-frame { width: 100%; border: 0; display: block; border-radius: var(--radius); background: var(--bg); min-height: 900px; }
.side .card + .card { margin-top: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.big-amount { font-size: 30px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.action-list { display: grid; gap: 8px; }
.action-list .btn { justify-content: center; width: 100%; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(42, 36, 72, .6); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-top: 6px; flex: none; }
.timeline .dot.bad { background: var(--red); }
.timeline .dot.good { background: var(--green); }
.link-box { display: flex; gap: 6px; }
.link-box input { font-family: var(--mono); font-size: 12px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 4, 12, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .18s; max-height: calc(100vh - 32px); overflow: auto; }
.modal-head { padding: 20px 22px 0; }
.modal-head h2 { font-size: 18px; }
.modal-head p { color: var(--muted); margin: 6px 0 0; }
.modal-body { padding: 18px 22px; display: grid; gap: 14px; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* toasts */
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--surface-2); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 380px; animation: pop .2s; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 34px 30px; text-align: center; }
.login img { width: 96px; filter: drop-shadow(0 10px 30px rgba(109, 74, 255, .6)); }
.login .wm { margin: 14px 0 26px; }
.login .wm-a { font-size: 22px; }
.login form { display: grid; gap: 12px; text-align: left; }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-2); border-top-color: var(--accent-2); border-radius: 50%; animation: spin .7s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; max-height: 320px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 6px; z-index: 20; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.dropdown-menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.dropdown-menu button { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: 13.5px Inter, sans-serif; }
.dropdown-menu button:hover { background: rgba(109, 74, 255, .15); }

.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1.1px; margin: 0 0 12px; }
.divider { height: 1px; background: var(--border); margin: 6px 0; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; }

/* currency estimates */
.approx { font-size: 12px; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.approx.big { font-size: 14px; color: var(--muted); margin-top: 2px; }
.summary .approx { text-align: right; margin-top: -4px; }
.approx-sign { color: var(--muted); font-weight: 600; margin-right: 5px; font-size: .78em; vertical-align: 2px; }
.stat .breakdown { font-size: 11.5px; color: var(--faint); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-note { color: var(--faint); font-size: 12.5px; margin: -4px 0 16px; }
.fx-box { font-size: 13px; }
.fx-rates { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--text); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.fx-rates b { color: var(--muted); font-weight: 600; }

/* payment methods */
.method { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); transition: border-color .15s; }
.method.on { border-color: rgba(109, 74, 255, .5); background: linear-gradient(180deg, rgba(109, 74, 255, .07), transparent 60%), var(--bg-2); }
.method-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.m-title { display: flex; align-items: center; gap: 12px; }
.m-title small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.m-ic { width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: rgba(109, 74, 255, .15); color: var(--accent-2); flex: none; }
.method-body { display: none; padding: 0 16px 16px; }
.method.on .method-body { display: grid; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-2); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(109, 74, 255, .35); }
.wallet-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; }
.input-prefix.wide input { padding-left: 94px; }
#payments, #settings > .card { scroll-margin-top: 80px; }

/* lists + small components */
.viewed { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--accent-2); margin-left: 4px; vertical-align: 1px; }
.viewed svg { width: 13px; height: 13px; }
td .faint svg, .sub svg { width: 13px; height: 13px; vertical-align: -2px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pay-list, .backup-list, .mini-items, .upcoming { list-style: none; margin: 0; padding: 0; }
.pay-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(42, 36, 72, .6); }
.pay-list li:last-child { border-bottom: 0; }
.row-actions { display: flex; gap: 2px; }
.btn-sm.btn-icon { padding: 5px; }
.switch-row { align-items: flex-start; gap: 12px; }
.switch-row > span:last-child { padding-top: 1px; }
.switch-row small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.field > .switch-row { margin-top: 10px; }
.modal.wide { max-width: 620px; }
.timeline .dot.view { background: #7DD3FC; }
.cat-bars { display: grid; gap: 12px; }
.cat-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.cat-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.track div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.upcoming li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid rgba(42, 36, 72, .6); font-size: 13.5px; }
.upcoming li:last-child { border-bottom: 0; }
.upcoming a { color: var(--text); font-weight: 600; }
.upcoming a svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent-2); }
.upcoming .faint { font-size: 12.5px; }
.setup { margin-bottom: 18px; border-color: rgba(251, 191, 36, .35); background: linear-gradient(90deg, rgba(251, 191, 36, .07), transparent 60%), rgba(21, 18, 42, .78); }
.setup ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 18px; position: sticky; top: 0; z-index: 6; padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.settings-nav a { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.settings-nav a:hover { color: var(--text); text-decoration: none; border-color: var(--border-2); }
.run-box { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); flex-wrap: wrap; }
.event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.integrations { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.integrations li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
.integrations li > svg { width: 20px; height: 20px; color: var(--accent-2); flex: none; }
.integrations li > div { flex: 1; } .integrations small { display: block; color: var(--faint); font-size: 12px; }
.backup-list { display: grid; gap: 4px; margin-bottom: 12px; max-height: 260px; overflow: auto; }
.backup-list li { display: flex; align-items: center; gap: 12px; padding: 4px 8px; border-radius: 8px; }
.backup-list li:hover { background: var(--surface-2); }
.backup-list li .faint { flex: 1; font-size: 12.5px; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13.5px; }
.mini-items li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-items li.strong { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }
.method-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.method-pick { position: relative; }
.method-pick input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; }
.method-pick span { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border: 1px solid var(--border-2); border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; transition: all .12s; }
.method-pick .m-ic { width: 28px; height: 28px; padding: 6px; }
.method-pick input:checked + span { border-color: var(--accent); background: rgba(109, 74, 255, .14); color: #fff; }
.method-pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(109, 74, 255, .3); }
.save-bar { position: sticky; bottom: 0; padding: 14px 0 6px; background: linear-gradient(transparent, var(--bg) 45%); z-index: 5; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .editor, .detail { grid-template-columns: 1fr; }
  .summary { position: static; }
  .preview-frame { min-height: 700px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(11, 9, 24, .92); backdrop-filter: blur(8px); z-index: 30; }
  .topbar .brand { padding: 0; }
  .topbar .brand img { width: 32px; height: 32px; }
  .main { padding: 20px 16px 80px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat .v { font-size: 21px; }
  .search input { width: 100%; }
  .search { flex: 1; }
  .items-table thead { display: none; }
  .items-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .items-table td { min-width: 0; }
  .items-table td { padding: 0; }
  .items-table td.desc { grid-column: 1 / -1; }
  .items-table td.handle-cell { display: none; }
  .items-table td.lt { padding-top: 10px; text-align: left; }
  .page-head h1 { font-size: 22px; }
  .hide-sm { display: none; }
  .wallet-row { grid-template-columns: 1fr auto; }
  .wallet-row [data-w=label] { grid-column: 1 / -1; }
  .event-grid { grid-template-columns: 1fr; }
  .settings-nav { display: none; }
  table.list th, table.list td { padding: 11px 10px; }
  .tabs { width: 100%; }
}

/* payment providers */
.provider { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); padding: 14px 16px; display: grid; gap: 12px; }
.provider + .provider { margin-top: 10px; }
.provider.on { border-color: rgba(52, 211, 153, .35); }
.provider-head { display: flex; align-items: center; gap: 12px; }
.provider-head > div { flex: 1; }
.provider-head small { display: block; color: var(--faint); font-size: 12px; }
.provider-kv { margin: 0; }
.provider-kv dd { text-align: left; }
.provider-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
.notice.warn { background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .35); color: #FDE68A; }
details.advanced summary { cursor: pointer; color: var(--muted); font-size: 13px; }
