/* TransTodo Admin — same ink, glow and pink→violet spark as transtodo.com. */
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/BeVietnamPro-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/BeVietnamPro-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/BeVietnamPro-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/BeVietnamPro-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/fonts/BeVietnamPro-ExtraBold.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink-0: #0b0912;
  --ink-1: #110e19;
  --ink-2: #15121e;
  --ink-3: #1c1828;
  --ink-4: #2a2140;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --fg: #f4f1fa;
  --muted: #b3abc6;
  --dim: #857d9b;
  --pink: #ff5c7a;
  --violet: #9b5cff;
  --grad: linear-gradient(100deg, var(--pink), var(--violet));
  --s-violet: #a77bff;   /* chart series, validated on --ink-2 */
  --s-pink: #f2577a;
  --good: #5ee0a0;
  --warn: #ffc566;
  --bad: #ff8a9e;
  --r: 18px;
  --r-sm: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ink-0); color: var(--fg);
  font: 400 14px/1.5 "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: -20% -10% auto auto; width: 70vw; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(155, 92, 255, .16), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: auto auto -25% -10%; width: 60vw; height: 60vh; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(255, 92, 122, .1), transparent 70%);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap;
  box-shadow: 0 10px 26px -12px rgba(255, 92, 122, .7), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s, filter .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); font-weight: 600; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.danger { background: rgba(255, 138, 158, .12); box-shadow: inset 0 0 0 1px rgba(255, 138, 158, .35); color: var(--bad); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted);
}
.icon-btn:hover { color: var(--fg); background: rgba(255,255,255,.08); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- login */
.login {
  position: relative; z-index: 1; min-height: 100%; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: min(400px, 100%); padding: 34px 32px 28px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(42, 33, 64, .55), rgba(17, 14, 25, .9));
  border: 1px solid var(--line-2); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  backdrop-filter: blur(10px);
}
.login-card .logo { width: 52px; height: 52px; margin-bottom: 18px; filter: drop-shadow(0 10px 24px rgba(155,92,255,.35)); }
.login-card h1 { font-size: 24px; font-weight: 800; }
.login-card p { color: var(--muted); margin: 6px 0 22px; }
.login-card .btn { width: 100%; height: 44px; margin-top: 14px; font-size: 14.5px; }
.login-err { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 20px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--dim); text-align: center; }

/* ---------------------------------------------------------------- fields */
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line-2); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 80px; padding: 10px 14px; resize: vertical; }
.input:focus { border-color: rgba(255, 92, 122, .6); background: rgba(255,255,255,.05); box-shadow: 0 0 0 4px rgba(255, 92, 122, .12); }
.input::placeholder { color: var(--dim); }
select.input { 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='%23b3abc6' 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; }
select.input option { background: var(--ink-2); }

/* ---------------------------------------------------------------- shell */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 18, 30, .92), rgba(11, 9, 18, .92)); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img { width: 34px; height: 34px; }
.brand b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand b i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small {
  margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; color: #ffd2e6; background: rgba(255, 92, 122, .14); border: 1px solid rgba(255, 92, 122, .3);
}
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 10px 10px 4px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.045); color: var(--fg); }
.nav a.on { background: linear-gradient(90deg, rgba(255, 92, 122, .16), rgba(155, 92, 255, .1)); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav a .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.env {
  padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.env b { display: flex; align-items: center; gap: 7px; color: var(--fg); font-size: 12.5px; margin-bottom: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(94, 224, 160, .15); flex: none; }
.dot.live { animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(94, 224, 160, 0); } }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 197, 102, .15); }
.dot.off { background: var(--dim); box-shadow: none; }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(255, 138, 158, .15); }

.main { min-width: 0; padding: 0 32px 48px; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 0 18px; margin-bottom: 6px;
  background: linear-gradient(180deg, var(--ink-0) 70%, rgba(11, 9, 18, 0));
}
.top h1 { font-size: 24px; font-weight: 800; }
.top .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.top .spacer { flex: 1; }
.updated { font-size: 12px; color: var(--dim); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--muted);
}
.seg button:hover { color: var(--fg); }
.seg button.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.cols-2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; margin-top: 16px; }
.card {
  position: relative; border-radius: var(--r); padding: 20px;
  background: linear-gradient(180deg, rgba(28, 24, 40, .78), rgba(21, 18, 30, .78));
  border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 50px -36px rgba(0,0,0,.9);
}
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 15.5px; font-weight: 700; }
.card-head p { color: var(--dim); font-size: 12.5px; margin-top: 3px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.link-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; }
.link-btn:hover { color: #fff; background: rgba(255,255,255,.06); }

.kpi { padding: 18px 18px 16px; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .label svg { width: 16px; height: 16px; color: var(--dim); }
.kpi .value { font-size: 29px; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 8px; line-height: 1; }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.kpi.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(255, 92, 122, .2), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(155, 92, 255, .22), transparent 55%), linear-gradient(180deg, rgba(42, 33, 64, .8), rgba(21, 18, 30, .85)); border-color: rgba(255, 140, 192, .25); }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-weight: 700; font-size: 11.5px; }
.delta.up { color: var(--good); background: rgba(94, 224, 160, .1); }
.delta.down { color: var(--bad); background: rgba(255, 138, 158, .1); }
.delta.flat { color: var(--muted); background: rgba(255,255,255,.06); }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; }
.chart svg { width: 100%; height: 240px; overflow: visible; }
.chart.small svg { height: 150px; }
.chart .grid-line { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.chart .base { stroke: rgba(255,255,255,.16); stroke-width: 1; }
.chart .tick { fill: var(--dim); font-size: 11px; }
.chart .bar { transition: opacity .12s; }
.chart.hovering .bar { opacity: .45; }
.chart.hovering .bar.hot { opacity: 1; }
.chart .hit { fill: transparent; cursor: default; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 140px; padding: 9px 11px; border-radius: 11px;
  background: rgba(17, 14, 25, .96); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -10px rgba(0,0,0,.8);
  font-size: 12px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.tip b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.tip .row { display: flex; align-items: center; gap: 7px; }
.tip .row i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.tip .row span { margin-left: auto; padding-left: 14px; font-weight: 700; color: var(--fg); }
.chart-table { width: 100%; }
.empty-chart { height: 200px; display: grid; place-items: center; color: var(--dim); font-size: 13px; text-align: center; }

/* funnel */
.funnel { display: grid; gap: 14px; }
.step .top-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.step .top-row b { font-size: 13px; font-weight: 600; color: var(--muted); }
.step .top-row .num { margin-left: auto; font-weight: 800; font-size: 16px; }
.step .rate { font-size: 11.5px; color: var(--dim); width: 62px; text-align: right; }
.step .track { height: 10px; border-radius: 999px; background: rgba(255,255,255,.05); overflow: hidden; }
.step .fill { height: 100%; border-radius: 999px; background: var(--grad); min-width: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }

/* plan mix */
.mix { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.04); margin: 4px 0 14px; }
.mix span { height: 100%; }
.legend { display: grid; gap: 9px; }
.legend .item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend .item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .item .num { margin-left: auto; font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin: 0 -20px -20px; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255,255,255,.015);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th.r, td.r { text-align: right; }
tbody tr.click { cursor: pointer; transition: background .12s; }
tbody tr.click:hover { background: rgba(255,255,255,.03); }
.code {
  display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: 700; font-size: 13px; letter-spacing: .04em;
}
.avatar {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  font: 800 11px/1 "Be Vietnam Pro", sans-serif; color: #fff; letter-spacing: 0;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid transparent;
}
.pill.plan { color: #ffd2e6; background: rgba(255, 92, 122, .12); border-color: rgba(255, 92, 122, .25); }
.pill.free { color: var(--muted); }
.pill.good { color: var(--good); background: rgba(94, 224, 160, .1); }
.pill.bad { color: var(--bad); background: rgba(255, 138, 158, .1); }
.pill.warn { color: var(--warn); background: rgba(255, 197, 102, .1); }
.bar-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar-cell .mini { width: 64px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-cell .mini i { display: block; height: 100%; background: var(--s-violet); border-radius: 999px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13px;
}
.chip:hover { color: var(--fg); border-color: var(--line-2); }
.chip.on { color: #fff; border-color: rgba(255, 92, 122, .45); background: rgba(255, 92, 122, .1); }
.chip .n { font-size: 11.5px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.08); }
.search { position: relative; margin-left: auto; width: 240px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); }
.search .input { height: 36px; padding-left: 36px; border-radius: 999px; }
.toolbar select.input { width: auto; height: 36px; border-radius: 999px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px 0; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .art {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(255, 92, 122, .2), rgba(155, 92, 255, .2)); border: 1px solid var(--line-2);
}
.empty .art svg { width: 24px; height: 24px; color: #fff; }
.empty h3 { font-size: 15px; color: var(--fg); margin-bottom: 6px; }
.empty p { font-size: 13px; max-width: 420px; margin: 0 auto; }

/* ---------------------------------------------------------------- drawer & modal */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(5, 4, 9, .6); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0 } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(520px, 100vw); overflow-y: auto;
  background: linear-gradient(180deg, #1a1626, #110e19); border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px -20px rgba(0,0,0,.8); animation: slide .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0 } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 20px 22px; background: rgba(26, 22, 38, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.drawer-head .avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 13px; }
.drawer-head h2 { font-size: 18px; }
.drawer-body { padding: 20px 22px 32px; display: grid; gap: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.facts div { padding: 11px 13px; background: var(--ink-2); }
.facts dt { font-size: 11.5px; color: var(--dim); font-weight: 600; }
.facts dd { margin: 3px 0 0; font-weight: 600; font-size: 13px; }
.plan-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px;
  background: radial-gradient(140% 160% at 0% 0%, rgba(255, 92, 122, .18), transparent 60%), rgba(255,255,255,.03); border: 1px solid rgba(255, 140, 192, .22);
}
.plan-card.free { background: rgba(255,255,255,.03); border-color: var(--line); }
.plan-card .big { font-size: 17px; font-weight: 800; }
.plan-card .btn { margin-left: auto; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }

.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.modal {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 22px;
  background: linear-gradient(180deg, #1d1829, #13101c); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  animation: pop .22s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0 } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 6px; }
.modal-head h2 { font-size: 19px; font-weight: 800; }
.modal-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 14px 24px; display: grid; gap: 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.plan-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-opt {
  position: relative; display: grid; gap: 2px; padding: 13px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); transition: border-color .15s, background .15s, transform .15s;
}
.plan-opt:hover { border-color: rgba(255,255,255,.25); }
.plan-opt.on { border-color: rgba(255, 140, 192, .7); background: linear-gradient(150deg, rgba(255, 92, 122, .16), rgba(155, 92, 255, .16)); }
.plan-opt b { font-size: 13.5px; }
.plan-opt strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.plan-opt span { font-size: 12px; color: var(--dim); }
.plan-opt .check { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.plan-opt.on .check { border: 0; background: var(--grad); box-shadow: inset 0 0 0 4px #1d1829; }
.lookup { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); min-height: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check-row input { accent-color: var(--pink); width: 16px; height: 16px; }

/* toasts */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 14px;
  background: rgba(23, 19, 33, .97); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -16px rgba(0,0,0,.9);
  font-size: 13.5px; animation: pop .25s cubic-bezier(.2,.9,.3,1.2);
}
.toast.good { border-color: rgba(94, 224, 160, .35); }
.toast.bad { border-color: rgba(255, 138, 158, .45); }

/* notes */
.note-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: rgba(155, 92, 255, .07); border: 1px solid rgba(155, 92, 255, .22); font-size: 13px; color: var(--muted); }
.note-card svg { width: 20px; height: 20px; color: var(--s-violet); flex: none; margin-top: 1px; }
.note-card b { color: var(--fg); }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.list { display: grid; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list .li:last-child { border-bottom: 0; }
.list .li .meta { display: grid; gap: 1px; min-width: 0; }
.list .li .meta small { color: var(--dim); font-size: 12px; }
.list .li .end { margin-left: auto; text-align: right; display: grid; gap: 2px; }

.price-table td { padding-top: 8px; padding-bottom: 8px; }
.price-table .input { height: 36px; width: 120px; }
.price-table td:first-child .input { width: 160px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .side .nav-label, .side-foot .env { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav a.on::before { display: none; }
  .side-foot { margin: 0 0 0 auto; }
  .main { padding: 0 16px 40px; }
  .cols-2e, .two, .plan-pick { grid-template-columns: 1fr; }
  .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- details */
.mt { margin-top: 16px; }
.mt-s { margin-top: 12px; }
.small { font-size: 12px; }
.hint { margin-top: 14px; font-size: 12px; color: var(--dim); }
.bad-text { color: var(--bad); }
.danger-text { color: var(--bad) !important; }
.sub-line { display: block; font-size: 11.5px; color: var(--dim); font-weight: 500; letter-spacing: 0; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.mono, .mono-input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; word-break: break-all; }
.mono-input { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .table-wrap { margin: 0; }
.card.flush .empty { padding: 40px 20px; }
.card-head.pad, .row-end.pad { padding: 18px 20px 0; margin-bottom: 14px; }
.row-end.pad { padding: 14px 20px 18px; margin: 0; border-top: 1px solid var(--line); }
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.row-end .login-err { margin: 0 auto 0 0; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.inline-field .input { width: 110px; height: 34px; }
.inline-dot { display: inline-block; vertical-align: 1px; margin-right: 3px; width: 7px; height: 7px; }
svg.inline { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.push { margin-left: auto; }
.code.plain { font-family: inherit; letter-spacing: 0; font-weight: 500; }
.code.plain b { font-weight: 700; }
button.code { font-size: 12.5px; color: var(--fg); }
td.c, th.c { text-align: center; }
.wrap-cell { white-space: normal; min-width: 220px; }
.input.slim { height: 32px; width: auto; padding-left: 10px; font-size: 13px; border-radius: 9px; }

.av0 { background: linear-gradient(135deg, #ff5c7a, #9b5cff); }
.av1 { background: linear-gradient(135deg, #9b5cff, #4f7bff); }
.av2 { background: linear-gradient(135deg, #ff8a5c, #ff5c7a); }
.av3 { background: linear-gradient(135deg, #2bb8a4, #4f7bff); }
.av4 { background: linear-gradient(135deg, #c05cff, #ff5cbe); }
.av5 { background: linear-gradient(135deg, #5c6cff, #2bb8a4); }
.sw-violet { background: var(--s-violet); }
.sw-pink { background: var(--s-pink); }

.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.me-text { display: grid; min-width: 0; }
.me-text b { font-size: 13px; }
.me-text small { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .icon-btn { margin-left: auto; width: 32px; height: 32px; flex: none; }

.legend .item > span:first-child { min-width: 92px; }
.bar-cell.grow { flex: 1; }
.bar-cell .mini.wide { flex: 1; width: auto; }
.list .li .avatar { width: 32px; height: 32px; }

.drawer-head > div { display: grid; gap: 5px; }
.drawer .facts .span2 { grid-column: span 2; }
.plan-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rights { display: grid; gap: 10px; }
.right-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 13px; background: rgba(255,255,255,.025); border: 1px solid var(--line); cursor: pointer; }
.right-row input { accent-color: var(--pink); width: 17px; height: 17px; margin-top: 2px; flex: none; }
.right-row span { display: grid; gap: 2px; }
.right-row b { font-size: 13.5px; }
.right-row small { color: var(--dim); font-size: 12px; }
.right-row.danger:has(input:checked) { border-color: rgba(255, 138, 158, .5); background: rgba(255, 138, 158, .07); }
.right-row:not(.danger):has(input:checked) { border-color: rgba(255, 140, 192, .35); background: rgba(255, 92, 122, .06); }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.mini-stats div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); display: grid; }
.mini-stats b { font-size: 17px; font-weight: 800; }
.mini-stats small { color: var(--dim); font-size: 11.5px; }
.card.inner { background: rgba(255,255,255,.02); box-shadow: none; }
.drawer textarea.input { margin-bottom: 8px; }

.seg.wide { display: flex; }
.seg.wide button { flex: 1; }
.secret { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255, 140, 192, .5); }
.secret code { flex: 1; font: 700 19px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; user-select: all; }

.matrix td:first-child { white-space: normal; }
.yes svg { width: 18px; height: 18px; color: var(--good); display: inline-block; }
.no { color: var(--dim); }
.row-actions { display: inline-flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; color: var(--muted); }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { width: 17px; height: 17px; color: var(--good); flex: none; margin-top: 1px; }
.checks.no svg { color: var(--bad); }

.sk-a { height: 14px; width: 55%; }
.sk-b { height: 30px; width: 70%; margin-top: 14px; }
.sk-chart { height: 220px; }
.note-card a { color: #fff; }
/* Inside a modal the scrim sits under the dialog, not over it. */
.modal-wrap .scrim { position: absolute; z-index: 0; }
.modal-wrap .modal { z-index: 1; }
.toast svg { width: 18px; height: 18px; flex: none; color: var(--good); }
.toast.bad svg { color: var(--bad); }

/* ---- profit and loss (overview) */
.good-text { color: var(--good); }
.pl { position: relative; overflow: hidden; }
.pl::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 120% at 0% 0%, rgba(155, 92, 255, .13), transparent 60%); }
.pl.loss::before { background: radial-gradient(70% 120% at 0% 0%, rgba(242, 87, 122, .13), transparent 60%); }
.pl > * { position: relative; }
.pl-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-right: 6px; }
.pl-key i { width: 10px; height: 10px; border-radius: 3px; }
.pl-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.9fr); gap: 28px; align-items: start; }
.pl-verdict { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--muted); }
.pl-verdict svg { width: 18px; height: 18px; }
.pl-value { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 8px 0 10px; }
.pl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.pl-lines { margin: 18px 0 0; display: grid; }
.pl-line { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pl-line dt { color: var(--muted); display: flex; flex-direction: column; gap: 1px; }
.pl-line dt small { color: var(--dim); font-size: 11.5px; }
.pl-line dd { margin: 0 0 0 auto; font-weight: 700; }
.pl-line.total { border-top: 1px solid var(--line-2); font-size: 14.5px; }
.pl-line.total dt { color: var(--fg); font-weight: 700; }
.pl-notes { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pl-notes li { display: flex; gap: 9px; align-items: flex-start; }
.pl-notes svg { width: 16px; height: 16px; color: var(--s-violet); flex: none; margin-top: 1px; }
.pl-notes a { color: var(--fg); }
@media (max-width: 1100px) { .pl-grid { grid-template-columns: 1fr; } }

/* ---- expense book (settings) */
.expense-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px auto; gap: 8px; padding: 0 20px 14px; }
.expense-form .input { height: 36px; }
tfoot td { font-weight: 700; border-bottom: 0; }
.pad-s { margin: 18px 20px; }
@media (max-width: 720px) { .expense-form { grid-template-columns: 1fr 1fr; } }
.pl .chart svg { height: 320px; }
.fixed-table td:first-child { width: 100%; }
.fixed-table td:first-child .input { width: 100%; min-width: 200px; }
#expense-list td.wrap { white-space: normal; }
.block { display: block; font-size: 11.5px; margin-top: 2px; }
