/* SEMA 2026 admin */
@font-face { font-family: "Gabriel Sans"; src: url("../fonts/gabriel-sans-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gabriel Sans"; src: url("../fonts/gabriel-sans-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Host Grotesk"; src: url("../fonts/host-grotesk-var.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #060819; --panel: #0c1033; --panel-2: #111745; --line: rgba(255,255,255,.08); --line-gold: rgba(214,180,109,.28);
  --text: #e8e9f3; --muted: #9ea3c4; --faint: #6c7197; --gold: #d6b46d; --gold-light: #f5d77f; --gold-dark: #ad8558;
  --ok: #7fd4a4; --warn: #f2c46b; --err: #ff8f80;
  --bar: #d6b46d; --bar-track: rgba(255,255,255,.06);
  --display: "Gabriel Sans", "Host Grotesk", system-ui, sans-serif; --body: "Host Grotesk", system-ui, sans-serif;
  --gold-grad: linear-gradient(100deg, #a77f52, #d9b56e 35%, #f5d77f 55%, #a77f52);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; }
code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; background: #080b24; border-right: 1px solid var(--line); }
.side .logo { padding: 2px 10px 22px; }
.side .logo img { height: 34px; width: auto; }
.side a.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side a.nav-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.side a.nav-item.active { color: var(--gold-light); background: rgba(214,180,109,.1); }
.side .me { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .me strong { display: block; color: #fff; }
.role { display: inline-block; margin: 4px 0 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-gold); color: var(--gold); }
.main { padding: 28px clamp(18px, 3vw, 40px) 60px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: .01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.btn.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 250px; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .btn.menu-toggle { display: inline-flex; margin-bottom: 14px; }
}

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.panel h2 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.panel .sub { color: var(--faint); font-size: 13px; margin: 0 0 16px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
.mt { margin-top: 16px; }

/* stat tiles */
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-family: var(--display); font-weight: 500; font-size: 32px; line-height: 1.15; margin-top: 6px; color: #fff; font-variant-numeric: tabular-nums; }
.stat .meta { color: var(--faint); font-size: 12px; margin-top: 4px; }

/* bar rows (single-series; text in ink, bars in gold) */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 92px; align-items: center; gap: 12px; font-size: 14px; position: relative; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bar-row .name small { color: var(--faint); }
.bar-row .track { display: block; height: 14px; background: var(--bar-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; transition: filter .15s; }
.bar-row:hover .fill { filter: brightness(1.2); }
.bar-row .val { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.bar-row .val small { color: var(--faint); margin-left: 6px; }
.bar-row.lead .name { color: #fff; font-weight: 600; }
.bar-row.suspended .name { color: var(--faint); text-decoration: line-through; }
.empty-state { color: var(--faint); font-size: 14px; padding: 18px 0; }

/* line chart */
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: 240px; display: block; overflow: visible; }
.chart-wrap .grid-line { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.chart-wrap .axis-label { fill: var(--faint); font-size: 11px; font-family: var(--body); }
.chart-wrap .series { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-wrap .area { fill: url(#areaGrad); }
.chart-wrap .cross { stroke: rgba(255,255,255,.25); stroke-width: 1; }
.chart-wrap .dot { fill: var(--gold-light); stroke: var(--panel); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; padding: 8px 10px; background: #1a2058; border: 1px solid var(--line-gold); border-radius: 8px; font-size: 12px; color: #fff; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; }
.tip.show { opacity: 1; }
.tip b { color: var(--gold-light); font-variant-numeric: tabular-nums; }

/* tabs / filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; background: transparent; cursor: pointer; font-family: inherit; }
.chip:hover { color: #fff; }
.chip.active { color: var(--gold-light); border-color: var(--line-gold); background: rgba(214,180,109,.1); }
.result-cat { display: none; }
.result-cat.active { display: block; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--faint); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
tr:hover td { background: rgba(255,255,255,.015); }
.thumb { width: 44px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-dark); background: var(--panel-2); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid; }
.badge.ok { color: var(--ok); border-color: rgba(127,212,164,.35); }
.badge.off { color: var(--err); border-color: rgba(255,143,128,.35); }
.badge.warn { color: var(--warn); border-color: rgba(242,196,107,.35); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.actions form { margin: 0; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; border: 0; cursor: pointer; font: 600 14px var(--body); color: #1a1306; background: var(--gold-grad); white-space: nowrap; }
.btn:hover { color: #1a1306; filter: brightness(1.08); }
.btn.sec { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.sec:hover { border-color: var(--line-gold); color: #fff; }
.btn.danger { background: transparent; color: var(--err); border: 1px solid rgba(255,143,128,.35); }
.btn.danger:hover { background: rgba(255,143,128,.08); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.form-grid { display: grid; gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; margin: 0; display: grid; gap: 14px; }
legend { padding: 0 8px; color: var(--gold); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=search], input:not([type]), select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: #070a22; color: #fff; font: inherit; font-size: 15px; }
textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
input[type=file] { color: var(--muted); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,180,109,.15); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.hint { color: var(--faint); font-size: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert.ok { color: var(--ok); border-color: rgba(127,212,164,.35); background: rgba(127,212,164,.06); }
.alert.error { color: var(--err); border-color: rgba(255,143,128,.35); background: rgba(255,143,128,.06); }
.alert.info { color: var(--gold-light); border-color: var(--line-gold); background: rgba(214,180,109,.06); }
.preview-oval { width: 120px; aspect-ratio: 3/4; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }

/* auth */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 60% at 50% 110%, #0f1d6b, transparent 60%), var(--bg); }
.auth-card { width: min(100%, 400px); padding: 34px 30px; border-radius: 20px; background: linear-gradient(180deg, #111745, #0a0d27); border: 1px solid var(--line-gold); }
.auth-card.wide { width: min(100%, 640px); }
.auth-card h1 { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; margin: 18px 0 18px; }
.auth-logo { height: 46px; width: auto; }
.auth-card .btn { width: 100%; height: 46px; margin-top: 6px; }
.preview-oval.is-cover { aspect-ratio: 1; border-radius: 10px; }
.preview-oval.is-wide { width: 180px; aspect-ratio: 16/9; border-radius: 10px; }
.priv-table { display: grid; gap: 0; border: 1px solid var(--line-soft, rgba(255,255,255,.08)); border-radius: 12px; overflow: hidden; }
.priv-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft, rgba(255,255,255,.08)); }
.priv-row:first-child { border-top: 0; }
.priv-row:nth-child(odd) { background: rgba(255,255,255,.02); }
.priv-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.priv-opt { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 14px; margin: 0; cursor: pointer; }
.priv-opt input { width: auto; height: auto; margin: 0; }
@media (max-width: 640px) { .priv-row { grid-template-columns: 1fr; } }
.demo-bar { background: repeating-linear-gradient(135deg, #f5d77f 0 14px, #e9c766 14px 28px); color: #0a0d27; text-align: center; font-size: 13px; padding: 6px 16px; position: relative; z-index: 50; }
.demo-bar a { color: #0a0d27; font-weight: 700; }
