/* DSM brand DNA — tokens copied verbatim from premium-landing-system's LOCKED §1.1/§1.6.
   This is a functional dashboard, not a landing page: no motion vocabulary / hero SVGs here,
   only the palette, fonts, radii and shadow tokens that keep it visually part of the same brand. */

@font-face {
  font-family: "Fixel Display";
  src: url("/static/fonts/FixelDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Display";
  src: url("/static/fonts/FixelDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Display";
  src: url("/static/fonts/FixelDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Display";
  src: url("/static/fonts/FixelDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/static/fonts/FixelText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/static/fonts/FixelText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/static/fonts/FixelText-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/static/fonts/FixelText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0c0c0e;
  --bg2: #101014;
  --surf: #1a1a1f;
  --surf2: #202027;
  --line: #2a2a31;
  --ink: #f4f1ea;
  --ink2: #a6a29b;
  --gold: #d4af37;
  --gold-hi: #e3c36a;
  --a1: #e7c976;
  --a2: #c9a24b;
  --a3: #b8860b;
  --ok: #57b06a;
  --bad: #d15b5b;
  --glow: rgba(212, 175, 55, 0.22);
  --shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.6), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --card-grad: linear-gradient(158deg, #1c1c22, #141418);
  --edge: rgba(255, 255, 255, 0.05);
  --rest: 0 1px 2px -1px rgba(0, 0, 0, 0.5), 0 12px 26px -18px rgba(0, 0, 0, 0.6);
  --fd: "Fixel Display", "Fixel Text", system-ui, "Segoe UI", sans-serif;
  --fb: "Fixel Text", system-ui, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 18px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #efebe1; --bg2: #e7e2d6; --surf: #ffffff; --surf2: #fbf9f4; --line: #dad3c4;
    --ink: #1b1a16; --ink2: #665f52;
    --gold: #8a5d0e; --gold-hi: #7a520a;
    --a1: #b98a2c; --a2: #96660f; --a3: #7a520a;
    --ok: #2e7d46; --bad: #b3392f;
    --edge: rgba(255, 255, 255, 0.85);
    --rest: 0 1px 2px -1px rgba(60, 48, 20, 0.14), 0 12px 26px -18px rgba(60, 48, 20, 0.2);
  }
}
:root[data-theme="light"] {
  --bg: #efebe1; --bg2: #e7e2d6; --surf: #ffffff; --surf2: #fbf9f4; --line: #dad3c4;
  --ink: #1b1a16; --ink2: #665f52;
  --gold: #8a5d0e; --gold-hi: #7a520a;
  --a1: #b98a2c; --a2: #96660f; --a3: #7a520a;
  --ok: #2e7d46; --bad: #b3392f;
  --edge: rgba(255, 255, 255, 0.85);
  --rest: 0 1px 2px -1px rgba(60, 48, 20, 0.14), 0 12px 26px -18px rgba(60, 48, 20, 0.2);
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--fd); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.5em; }
a { color: var(--gold); }

.shell { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: 0 0 auto; background: var(--bg2); border-right: 1px solid var(--line);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
}
.side .brand { font-family: var(--fd); font-weight: 700; font-size: 18px; margin-bottom: 24px; }
.side .brand .gold { color: var(--gold); }
.side a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink2);
  text-decoration: none; font-weight: 500; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.side a:hover, .side a.active { background: var(--surf); color: var(--ink); }
.main { flex: 1; padding: 32px 40px; max-width: 1100px; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-size: 12px; font-weight: 600; }

.card {
  background: var(--card-grad); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--rest); padding: 20px 22px; margin-bottom: 20px;
}
:root[data-theme="light"] .card, :root:not([data-theme="dark"]) .card { background: var(--surf); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .card { background: var(--surf); } }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat .num { font-family: var(--fd); font-size: 32px; font-weight: 700; }
.stat .label { color: var(--ink2); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 10px 18px;
  font-weight: 600; font-family: var(--fb); border: 1px solid var(--line); background: var(--surf2);
  color: var(--ink); cursor: pointer; text-decoration: none; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  font-size: 14px;
}
.btn:hover { box-shadow: var(--shadow); }
.btn-gold { background: linear-gradient(135deg, var(--a1), var(--a3)); color: #14120a; border: none; }
:root[data-theme="light"] .btn-gold, :root:not([data-theme="dark"]) .btn-gold { background: linear-gradient(135deg, #eac15a, #8a5d0e); color: #fff; }

input, select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; color: var(--ink); font-family: var(--fb); font-size: 14px;
}
label { display: block; font-size: 13px; color: var(--ink2); margin: 12px 0 4px; font-weight: 500; }
form .field { margin-bottom: 4px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: rgba(87, 176, 106, 0.15); color: var(--ok); }
.badge-bad { background: rgba(209, 91, 91, 0.15); color: var(--bad); }
.badge-gold { background: var(--glow); color: var(--gold); }

.flash { padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-ok { background: rgba(87, 176, 106, 0.15); color: var(--ok); }
.flash-err { background: rgba(209, 91, 91, 0.15); color: var(--bad); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { text-align: center; padding: 48px; max-width: 380px; }
