:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #12151d;
  --line: #2a2d36;
  --ink: #f7f1e7;
  --muted: #a7a7b2;
  --gold: #eac88c;
  font: 16px/1.65 "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 20% 5%, #1e1920 0%, transparent 45%), var(--bg); color: var(--ink); min-height: 100vh; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
.top { border-bottom: 1px solid var(--line); }
.top-inner, .dash-head, .list-head, footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.top-inner { min-height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 44px; height: 44px; padding: 10px; border: 1px solid #584731; background: #252018; border-radius: 13px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.brand strong, .brand small { display: block; line-height: 1.35; }
.brand strong { font-size: 23px; }
.brand em { color: var(--gold); font: 600 .55em Consolas, monospace; letter-spacing: .14em; }
small, .subtle, .muted { color: var(--muted); }
.tag, .visual-label, .steps span { font: 600 11px/1.4 Consolas, monospace; letter-spacing: .13em; }
.tag { border: 1px solid var(--line); border-radius: 100px; padding: 8px 13px; color: var(--gold); white-space: nowrap; }
.hero { display: grid; grid-template-columns: 1fr .98fr; gap: clamp(28px, 7vw, 100px); align-items: center; padding: 74px 0 56px; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: 9px; }
.eyebrow i, .terminal i { display: inline-block; background: var(--gold); width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 14px #dbaf71aa; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(3.2rem, 7.5vw, 6.15rem); line-height: 1.04; margin-block: 18px 24px; letter-spacing: -.055em; }
h1 em { color: var(--gold); font-style: normal; }
p { color: var(--muted); }
.intro p { font-size: 1.12rem; max-width: 34ch; margin-bottom: 26px; }
.button, .secondary { border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; display: inline-flex; gap: 10px; align-items: center; justify-content: center; padding: 12px 20px; min-height: 48px; }
.button:hover, .secondary:hover { filter: brightness(1.13); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.button:disabled { opacity: .65; cursor: wait; }
.discord { background: #5865f2; color: white; }
.discord svg { width: 20px; height: 20px; }
.subtle { display: block; font-size: .82rem; margin-top: 12px; }
.visual { padding: 19px; border: 1px solid #3c332b; border-radius: 22px; background: radial-gradient(ellipse at center, #31281b 0%, #19171a 45%, #101219 80%); box-shadow: 0 24px 70px #0005; }
.visual-label { display: flex; justify-content: space-between; color: #baa783; }
.shield { display: block; width: 100%; max-height: 315px; }
.terminal { background: #0b0d12; border: 1px solid #32323a; border-radius: 9px; padding: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.terminal span { color: var(--muted); font: 10px Consolas, monospace; }
.terminal i { background: #80d8a9; box-shadow: none; margin-inline-end: 6px; }
.terminal b { color: #9ee2bd; font-size: .81rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: 14px; overflow: hidden; }
.steps > div { background: var(--surface); padding: 19px; display: grid; gap: 3px; }
.steps span { color: var(--gold); direction: ltr; text-align: right; }
footer { color: var(--muted); border-top: 1px solid var(--line); margin-top: 42px; min-height: 74px; font-size: .85rem; }
.dash-head { padding-block: 42px 25px; }
.dash-head h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-block: 10px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metrics > div { display: grid; gap: 3px; background: linear-gradient(140deg, #201c18, var(--surface) 70%); border: 1px solid var(--line); border-radius: 14px; padding: 15px 19px; }
.metrics span { color: var(--gold); font-size: .82rem; }
.metrics b { font-size: 1.85rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.search { margin-block: 10px; font-size: .88rem; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: .78rem; }
.row-meta .status { color: #9ee2bd; }
.row-meta .revoked { color: #ffc4be; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: end; }
.row-actions button:first-child { color: var(--gold); }
dialog { width: min(420px, calc(100% - 28px)); border: 1px solid #64523a; border-radius: 16px; background: var(--surface); color: var(--ink); padding: 22px; }
dialog::backdrop { background: #05060bc9; }
dialog form { margin: 0; }
.dialog-error { color: #ffc4be; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 24px; min-width: 0; }
.panel p { font-size: .9rem; margin-bottom: 12px; }
form, label { display: grid; gap: 8px; }
form { gap: 17px; margin-top: 18px; }
.drop { padding: 14px; border: 1px dashed #8c734c; border-radius: 10px; background: #221e19; }
input, textarea, select { min-width: 0; width: 100%; font: inherit; color: var(--ink); }
input:not([type=file]), textarea, select { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
textarea { resize: vertical; }
.workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 30px; min-height: 64vh; }
.sidebar { position: sticky; top: 20px; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.sidebar-user { display: grid; padding: 8px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sidebar button { text-align: start; color: var(--ink); background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.sidebar button:hover, .sidebar button[aria-current=page] { background: #292319; color: var(--gold); }
.sidebar #logout { color: #ffc4be; border-top: 1px solid var(--line); margin-top: 6px; }
.workspace h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 20px; }
.workspace h2 { font-size: 1.2rem; }
.workspace .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace .metrics b { overflow-wrap: anywhere; }
.view-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 16px; }
.view-head h1 { margin: 0; }
.workspace dialog { max-height: 90vh; overflow: auto; }
.workspace dialog form { margin-top: 14px; }
.workspace dialog .subtle { margin-top: 0; }
#loader-dialog { width: min(720px, calc(100% - 28px)); }
.loader-code { font-family: Consolas, monospace; white-space: pre; }
input::file-selector-button, .secondary { color: var(--ink); background: #232630; border: 1px solid var(--line); }
input::file-selector-button { font: inherit; cursor: pointer; border-radius: 6px; padding: 5px 8px; margin-inline-end: 8px; }
.gold { background: var(--gold); color: #171209; }
.notice { margin-top: 20px; border: 1px solid #64523a; border-radius: 10px; padding: 10px 15px; color: var(--gold); background: #241e17; }
.licenses { list-style: none; padding: 0; margin-bottom: 0; }
.licenses li { border-top: 1px solid var(--line); padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.licenses b, .licenses small { display: block; text-align: right; }
.licenses button { min-height: 36px; padding: 5px 10px; color: #ffc4be; flex-shrink: 0; }
@media (max-width: 730px) {
  .hero, .dash-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 44px; }
  .workspace { grid-template-columns: 1fr; gap: 18px; }
  .sidebar { position: static; display: flex; flex-wrap: wrap; align-items: center; }
  .sidebar-user { flex-basis: 100%; margin: 0; }
  .sidebar #logout { border: 0; margin: 0; }
}
@media (max-width: 460px) {
  .wrap { width: calc(100% - 28px); }
  .steps { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
  .dash-head { align-items: flex-start; }
  .metrics > div { padding: 12px; }
  .workspace .metrics { grid-template-columns: 1fr; }
}
