:root {
    --bg: #0b0e11;
    --surface: #0f1216;
    --panel: #15181e;
    --panel-2: #181c22;
    --border: #272c34;
    --border-soft: #1f242b;
    --text: #eaecef;
    --muted: #848e9c;
    --muted-2: #5e6673;
    --accent: #f0b90b;
    --accent-hover: #f8d33a;
    --positive: #0ecb81;
    --negative: #f6465d;
    --radius: 3px;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; color: #111; background: var(--accent); font-weight: 700; }
.skip-link:focus { top: 12px; }
.topbar { height: 56px; display: flex; align-items: center; border-bottom: 1px solid var(--border); background: rgba(11, 14, 17, .96); position: sticky; top: 0; z-index: 50; }
.brand { height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 20px; font-weight: 800; letter-spacing: .04em; font-size: 16px; border-right: 1px solid var(--border); }
.brand small { margin-left: -4px; padding: 2px 5px; border: 1px solid #6d590b; color: var(--accent); font-size: 8px; letter-spacing: .12em; }
.brand-mark { width: 23px; height: 23px; position: relative; transform: rotate(45deg); }
.brand-mark i { position: absolute; width: 7px; height: 7px; background: var(--accent); }
.brand-mark i:nth-child(1) { left: 8px; top: 0; }
.brand-mark i:nth-child(2) { left: 0; top: 8px; }
.brand-mark i:nth-child(3) { right: 0; top: 8px; }
.brand-mark i:nth-child(4) { left: 8px; bottom: 0; }
.primary-nav { display: flex; height: 100%; align-items: stretch; }
.primary-nav a { display: grid; place-items: center; padding: 0 18px; color: #b7bdc6; font-weight: 600; position: relative; }
.primary-nav a:hover, .primary-nav a.active { color: var(--text); }
.primary-nav a.active::after { content: ""; position: absolute; height: 2px; left: 18px; right: 18px; bottom: 0; background: var(--accent); }
.topbar-actions { margin-left: auto; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.system-state { display: flex; align-items: center; gap: 7px; color: var(--muted); padding-right: 12px; }
.system-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 8px rgba(14, 203, 129, .75); }
.icon-button { border: 0; background: transparent; min-width: 36px; height: 36px; cursor: pointer; color: var(--muted); }
.icon-button:hover { color: var(--text); background: var(--panel); }
.account-menu { display: flex; align-items: center; gap: 10px; }
.account-button { display: flex; align-items: center; gap: 9px; border: 0; border-left: 1px solid var(--border); padding: 0 0 0 14px; background: transparent; cursor: pointer; }
.account-button span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #181202; font-weight: 800; }
.account-button b { font-size: 12px; }
.ghost-button { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: #b7bdc6; font-size: 11px; font-weight: 600; cursor: pointer; }
.ghost-button:hover { border-color: var(--muted); color: var(--text); }
.accent-button { display: inline-flex; align-items: center; height: 32px; padding: 0 15px; border: 0; border-radius: 3px; background: var(--accent); color: #181202; font-size: 11px; font-weight: 700; cursor: pointer; }
.accent-button:hover { background: var(--accent-hover); }
.panel { background: var(--surface); border: 1px solid var(--border); }
.panel-heading { height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-soft); }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-heading.compact { height: 40px; }
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }
.hidden { display: none !important; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.text-button:hover { color: var(--accent-hover); }
.mobile-nav { display: none; }
.toast { position: fixed; right: 18px; bottom: 20px; z-index: 100; min-width: 260px; max-width: 390px; padding: 14px 16px; border: 1px solid var(--border); background: #1e2329; box-shadow: 0 12px 35px rgba(0,0,0,.4); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 3px solid var(--positive); }
.toast.error { border-left: 3px solid var(--negative); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; } }
