/* Northbound - panou server. Asfalt inchis, crem, galben de marcaj. Fara umbre, fara albastru / mov. */
@font-face { font-family: 'Barlow Condensed'; src: url('/static/fonts/BarlowCondensed-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/static/fonts/BarlowCondensed-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Overpass'; src: url('/static/fonts/Overpass-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Overpass Mono'; src: url('/static/fonts/OverpassMono-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #12110f;
  --bg2: #171614;
  --surface: #1c1b18;
  --surface2: #23221f;
  --line: #2e2c28;
  --line2: #3a3833;
  --text: #f1ece2;
  --muted: #9b958a;
  --dim: #6f6a61;
  --y: #e8b93a;
  --y-dim: rgba(232, 185, 58, .14);
  --ok: #8fbf6a;
  --ok-dim: rgba(143, 191, 106, .14);
  --bad: #d9674f;
  --bad-dim: rgba(217, 103, 79, .14);
  --r: 10px;
  --r-sm: 7px;
  --side: 232px;
  --f-h: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-b: 'Overpass', system-ui, sans-serif;
  --f-m: 'Overpass Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--f-b); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--y); }
code { font: 12px var(--f-m); color: var(--y); background: var(--y-dim); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
h1, h2, h3 { font-family: var(--f-h); font-weight: 700; letter-spacing: .01em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-family: var(--f-m); font-size: 13px; font-variant-numeric: tabular-nums; }
.y { color: var(--y); }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.r { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.eyebrow { font: 600 11px var(--f-m); letter-spacing: .22em; text-transform: uppercase; color: var(--y); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--bg2) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px) var(--side), transparent var(--side)); }
.side { position: sticky; top: 0; height: 100vh; align-self: start; display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand .mark { width: 34px; height: 37px; flex: none; }
.brand-t { display: flex; flex-direction: column; line-height: 1; }
.brand-t b { font: 700 22px var(--f-h); letter-spacing: .04em; }
.brand-t small { font: 600 10px var(--f-m); letter-spacing: .24em; text-transform: uppercase; color: var(--y); margin-top: 5px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; border-left: 2px solid transparent; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.on { color: var(--text); background: var(--surface); border-left-color: var(--y); }
.nav a.on .ic { color: var(--y); }
.ic { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mockflag { font: 600 10px var(--f-m); letter-spacing: .14em; color: var(--y); border: 1px dashed var(--y); border-radius: var(--r-sm); padding: 6px 8px; text-align: center; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.me img, .me .av { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.me .av { display: grid; place-items: center; background: var(--y); color: #12110f; font: 700 16px var(--f-h); }
.me-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.me-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-t small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me form { margin: 0; }
.iconbtn { background: none; border: 1px solid var(--line2); color: var(--muted); border-radius: var(--r-sm); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { color: var(--y); border-color: var(--y); }

.main { padding: 26px 32px 48px; min-width: 0; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 34px; line-height: 1.05; text-transform: uppercase; margin-top: 4px; }

/* ---------- blocks ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi.accent { border-color: rgba(232, 185, 58, .45); }
.kpi-l { font: 600 11px var(--f-m); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kpi-v { font: 700 30px/1.1 var(--f-h); margin-top: 6px; letter-spacing: .01em; }
.kpi-v small { font-size: 18px; color: var(--muted); }
.kpi.accent .kpi-v { color: var(--y); }
.kpi-s { color: var(--muted); font-size: 12px; margin-top: 4px; }

.grid { display: grid; gap: 14px; margin-bottom: 14px; align-items: start; }
.grid.eq { align-items: stretch; }
.g-1-1 { grid-template-columns: 1fr 1fr; }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-1-1 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; margin-bottom: 14px; }
.grid > .card { margin-bottom: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 28px; }
.card-h h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .05em; }
.scroll-card .tbl-wrap { max-height: 320px; overflow-y: auto; }
.empty { color: var(--dim); padding: 18px 4px; font-size: 13px; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--y); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 14px; color: var(--muted); }
.note b { color: var(--text); }
.alert { background: var(--bad-dim); border: 1px solid rgba(217, 103, 79, .5); color: #f2c2b7; border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 14px; }
.sub { font-size: 14px; text-transform: uppercase; margin: 14px 0 6px; color: var(--muted); }

.badge { display: inline-block; font: 600 10px/1 var(--f-m); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); vertical-align: middle; white-space: nowrap; margin-right: 3px; }
.badge.ok { color: var(--ok); border-color: rgba(143, 191, 106, .45); background: var(--ok-dim); }
.badge.bad { color: var(--bad); border-color: rgba(217, 103, 79, .5); background: var(--bad-dim); }
.badge.y { color: var(--y); border-color: rgba(232, 185, 58, .5); background: var(--y-dim); }
.badge.vip { color: #12110f; background: var(--y); border-color: var(--y); }
.lvl b { font-family: var(--f-m); color: var(--muted); font-weight: 500; margin-right: 4px; }
.lvl { color: var(--y); white-space: nowrap; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font: 600 10px var(--f-m); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.tbl th.r { text-align: right; }
.tbl td { padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface2); }
.tbl td.det { color: var(--muted); font-size: 12px; max-width: 520px; overflow-wrap: anywhere; }
.tbl.logs td { font-size: 13px; }

/* ---------- charts ---------- */
.chartwrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; max-height: 300px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--dim); font: 10px var(--f-m); }
.chart .s-in { fill: var(--y); }
.chart .s-out { fill: #8a6c3f; }
.legend { display: flex; gap: 16px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw.s-in { background: var(--y); }
.sw.s-out { background: #8a6c3f; }

/* ---------- forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px var(--f-h); letter-spacing: .08em; text-transform: uppercase; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--surface2); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--y); color: var(--y); }
.btn.primary { background: var(--y); border-color: var(--y); color: #12110f; }
.btn.primary:hover { background: #f1c552; color: #12110f; }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #12110f; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.off { opacity: .45; cursor: not-allowed; }
.btn[disabled] { opacity: .5; cursor: wait; }
input, select { font: 14px var(--f-b); color: var(--text); background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 8px 10px; min-width: 0; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--y); }
input[type=date] { color-scheme: dark; }
input[type=checkbox] { width: auto; accent-color: var(--y); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld span { font: 600 10px var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld span em { font-style: normal; color: var(--dim); letter-spacing: .04em; text-transform: none; }
.chk { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; align-self: end; padding-bottom: 8px; }

.search { display: flex; gap: 10px; margin-bottom: 14px; max-width: 720px; }
.search input { font-size: 15px; padding: 10px 14px; }
.filters { display: grid; grid-template-columns: 120px 150px 150px 190px 1fr auto; gap: 10px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.fbtn { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; font: 700 14px var(--f-h); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--y); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 12px; }
.pg { color: var(--muted); font-size: 12px; font-family: var(--f-m); }

/* ---------- profile ---------- */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.pname { font: 700 28px/1.1 var(--f-h); text-transform: uppercase; }
.pmeta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); margin-top: 6px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; margin: 0; }
.kv dt { color: var(--dim); font: 600 10px/2 var(--f-m); letter-spacing: .14em; text-transform: uppercase; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.inv li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.inv li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed li.off { opacity: .5; }
.feed .when { color: var(--dim); font: 12px var(--f-m); }

.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.act { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg2); }
.act-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.act-h b { font: 700 16px var(--f-h); text-transform: uppercase; letter-spacing: .05em; }
.act-b { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.act-b .wide { grid-column: 1 / -1; }
.act-b .span2 { grid-column: span 2; }
.act-f { display: flex; justify-content: flex-end; }
.ranks { list-style: none; margin: 0 0 8px; padding: 0; }
.ranks li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ranks li b { min-width: 110px; color: var(--y); }

/* ---------- shop ---------- */
.prod { display: flex; flex-direction: column; gap: 12px; }
.prod-h { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.prod-p { font: 700 34px/1.1 var(--f-h); margin-top: 6px; }
.prod-p small { font-size: 15px; color: var(--muted); }
.prod.diamond { border-color: rgba(232, 185, 58, .5); }
.perks { list-style: none; margin: 0; padding: 0; flex: 1; }
.perks li { padding: 5px 0 5px 18px; position: relative; color: var(--muted); }
.perks li::before { content: ''; position: absolute; left: 0; top: 12px; width: 8px; height: 2px; background: var(--y); }
.prod-b { display: flex; flex-direction: column; gap: 8px; }
.vipname { color: var(--y); }

/* ---------- login ---------- */
body.bare { min-height: 100vh; background:
  linear-gradient(180deg, rgba(18,17,15,.0) 0%, var(--bg) 70%),
  repeating-linear-gradient(90deg, transparent 0 calc(50% - 3px), rgba(232,185,58,.08) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px) 100%),
  var(--bg); }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 18px; }
.login-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 14px; }
.login-logo { width: 100%; height: auto; margin: -6px 0 2px; }
.login-card h1 { font-size: 30px; text-transform: uppercase; }
.login-card p { margin: 0; }
.btn.discord { background: var(--y); border-color: var(--y); color: #12110f; padding: 13px 18px; font-size: 17px; }
.btn.discord:hover { background: #f1c552; color: #12110f; }
.login-notes { margin: 4px 0 0; padding: 12px 0 0 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.login-notes li { margin-bottom: 4px; }
.login-foot { color: var(--dim); font: 11px var(--f-m); letter-spacing: .14em; text-transform: uppercase; }
.mockbox { border: 1px dashed var(--line2); border-radius: var(--r); padding: 12px; }
.mockgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.mockgrid .btn { justify-content: flex-start; font: 600 12px var(--f-b); text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dialog + toast ---------- */
.dlg { border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0; width: min(480px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(10, 9, 8, .72); }
.dlg-in { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.dlg h2 { font-size: 24px; text-transform: uppercase; }
.dlg p { margin: 0; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--surface2); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-color: var(--ok); }
.toast.bad { border-color: var(--bad); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .g-1-1-1 { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .filters .grow { grid-column: span 2; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { border: 0; margin: 0; padding: 0; }
  .brand-t { display: none; }
  .brand .mark { width: 28px; height: 30px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 2px; flex: 1; scrollbar-width: none; }
  .nav a { padding: 8px 9px; border-left: 0; border-bottom: 2px solid transparent; border-radius: 0; }
  .nav a.on { border-bottom-color: var(--y); background: none; }
  .nav a span { display: none; }
  .nav a.on span { display: inline; white-space: nowrap; }
  .side-foot { margin: 0; flex-direction: row; }
  .mockflag { display: none; }
  .me { padding: 0; border: 0; background: none; }
  .me img, .me .av, .me-t { display: none; }
  .main { padding: 18px 16px 40px; }
  .top h1 { font-size: 26px; }
  .g-1-1, .g-2-1, .g-1-1-1 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .grow, .fbtn { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-v { font-size: 24px; }
  .act-b { grid-template-columns: 1fr 1fr; }
  .acts { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 104px 1fr; }
  .feed li { grid-template-columns: 1fr; gap: 2px; }
  .inv { grid-template-columns: 1fr; }
  .search { flex-direction: column; }
  .tbl td, .tbl th { padding: 7px 6px; }
  .tbl-wrap .tbl.wide { min-width: 640px; }
  .tbl-wrap .tbl.logs { min-width: 760px; }
  .tbl.logs td.det, .tbl.wide td.det { min-width: 220px; }
  .tbl td, .tbl th { font-size: 13px; }
  .shell { background: none; }
  .top { margin-bottom: 14px; }
}
