:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #10151d;
  --panel-2: #151c26;
  --line: #273241;
  --text: #eef4ff;
  --muted: #8e9bad;
  --accent: #35f0c2;
  --accent-2: #62a8ff;
  --danger: #ff6b7a;
  --warn: #ffd166;
  --ok: #4ade80;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #12313a 0, transparent 38%), var(--bg); }
.login-panel { width: min(440px, 100%); padding: 32px; border: 1px solid var(--line); background: rgba(16, 21, 29, .92); border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(53,240,194,.55); color: var(--accent); background: rgba(53,240,194,.08); border-radius: 8px; font-weight: 800; }
.brand-mark.small { width: 34px; height: 34px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; letter-spacing: 0; text-transform: uppercase; }
h1 { margin: 0; font-size: 28px; line-height: 1.18; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: 0; }
.muted { color: var(--muted); line-height: 1.7; }
.stack-form { display: grid; gap: 14px; margin-top: 24px; }
label { display: grid; gap: 8px; color: #cbd5e1; font-size: 13px; }
input, select, textarea { width: 100%; min-height: 40px; color: var(--text); background: #0b1017; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; outline: none; }
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,240,194,.12); }
button { min-height: 38px; border: 0; border-radius: 6px; padding: 0 14px; color: #04110e; background: var(--accent); font-weight: 700; }
button:disabled { opacity: .55; cursor: not-allowed; }
.ghost-button, .icon-button, .secondary-button { color: var(--text); background: transparent; border: 1px solid var(--line); }
.ghost-button:hover, .icon-button:hover, .secondary-button:hover { border-color: var(--accent); }
.form-error { min-height: 20px; color: var(--danger); margin-top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px; border-right: 1px solid var(--line); background: #090d13; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sidebar-brand small { display: block; color: var(--muted); margin-top: 2px; }
.nav { display: grid; gap: 16px; overflow: auto; padding-right: 4px; }
.nav-group h2 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 6px; color: #cbd5e1; }
.nav a.active, .nav a:hover { color: var(--text); background: rgba(53,240,194,.1); }
.workspace { min-width: 0; padding: 24px; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.message { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: #dbeafe; }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.card strong { display: block; font-size: 26px; margin-top: 8px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
th { color: var(--muted); font-weight: 700; background: #0d1219; }
tr:hover td { background: rgba(255,255,255,.02); }
code { display: inline-block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; color: #bcf7e7; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: #dbeafe; }
.badge.ACTIVE, .badge.SUCCESS, .badge.UP { color: var(--ok); border-color: rgba(74,222,128,.45); }
.badge.DISABLED, .badge.REVOKED, .badge.FAILED { color: var(--danger); border-color: rgba(255,107,122,.45); }
.toolbar, .inline-form { display: grid; gap: 12px; }
.inline-form { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; margin-bottom: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.secret-box { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; padding: 12px; border: 1px solid rgba(53,240,194,.35); border-radius: 8px; color: #d5fff4; background: rgba(53,240,194,.08); }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.empty { color: var(--muted); text-align: center; padding: 24px; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .workspace { padding: 18px; }
  .workspace-header { flex-direction: column; }
}
