:root {
  --primary: #5b5ce2;
  --primary-dark: #3e3faf;
  --accent: #6ee7c8;
  --surface: #111827;
  --surface-soft: #182235;
  --background: #f5f7fb;
  --text: #142033;
  --muted: #708096;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(20, 32, 51, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { padding: 28px 20px; color: #fff; background: linear-gradient(155deg, var(--surface), var(--surface-soft)); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 54px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: var(--surface); background: linear-gradient(135deg, var(--accent), #fff); font-weight: 800; }
.brand-mark img { width: 28px; height: 28px; object-fit: contain; border-radius: 7px; }
.brand-name { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.nav-label { color: #8896ad; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nav { display: grid; gap: 8px; margin-top: 14px; }
.nav a { padding: 12px 14px; color: #c9d1e0; border-radius: 11px; text-decoration: none; font-size: 14px; }
.nav a.active, .nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.sidebar-note { position: absolute; bottom: 26px; width: 215px; color: #aab5c6; font-size: 12px; line-height: 1.6; }
.main { padding: 34px clamp(24px, 5vw, 70px); }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 42px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 8px 0 10px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.05em; line-height: 1.05; }
.subtitle { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.65; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 750; }
.grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.card { padding: 30px; border: 1px solid rgba(20,32,51,.06); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.card.dark { color: #fff; background: linear-gradient(145deg, var(--surface), var(--surface-soft)); }
.card h2 { margin: 0 0 9px; font-size: 20px; letter-spacing: -.03em; }
.card p { margin: 0; color: var(--muted); line-height: 1.6; }
.dark p { color: #aab5c6; }
.code-box { display: flex; justify-content: space-between; align-items: center; margin: 28px 0; padding: 17px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); }
.code { font-size: 30px; font-weight: 800; letter-spacing: .16em; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 12px; font-weight: 700; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.button { border: 0; border-radius: 12px; padding: 13px 18px; color: #fff; background: var(--primary); font-weight: 750; }
.button:hover { background: var(--primary-dark); }
.button.secondary { color: var(--text); background: #edf0f7; }
.button.ghost { color: var(--primary); background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
[hidden] { display: none !important; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.metric { padding: 18px; border-radius: 16px; background: #f6f8fc; }
.metric strong { display: block; margin-top: 7px; font-size: 24px; }
.metric span { color: var(--muted); font-size: 12px; }
.field { display: grid; gap: 8px; margin-top: 22px; }
.field label { font-size: 12px; font-weight: 750; }
.field input { width: 100%; padding: 14px; border: 1px solid #dce2ec; border-radius: 12px; outline: none; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(91,92,226,.12); }
.permission { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f5; color: var(--muted); font-size: 13px; }
.permission:last-child { border-bottom: 0; }
.permission b { margin-left: auto; color: var(--success); font-size: 11px; }
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; } .sidebar-note { display: none; } .grid { grid-template-columns: 1fr; } }
