:root {
  color-scheme: light;
  --ink: #142238;
  --muted: #617087;
  --line: #d9e2ee;
  --surface: #ffffff;
  --canvas: #edf3f9;
  --nav: #07111f;
  --nav-soft: #111f31;
  --cyan: #00b9e8;
  --blue: #0868e8;
  --green: #0a9f65;
  --amber: #db7900;
  --red: #d73145;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
label { display: grid; gap: 6px; color: #34445a; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid #c7d3e2; background: #fff; color: var(--ink); border-radius: 5px;
  padding: 9px 10px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,104,232,.12); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.5; }
button { border: 0; cursor: pointer; }
.primary { min-height: 36px; padding: 0 16px; border-radius: 5px; background: var(--blue); color: #fff; font-weight: 800; }
.primary:hover { background: #0059ce; }
.alert { border: 1px solid; border-radius: 5px; padding: 11px 13px; margin: 0 0 14px; }
.alert.error { background: #fff0f2; color: #9d1c2d; border-color: #f2b8c0; }
.alert.success { background: #e9faf3; color: #08774c; border-color: #9ee2c7; }
.alert.info { background: #edf7ff; color: #075e9d; border-color: #aad7f8; }
.login-page, .setup-page { min-height: 100vh; display: grid; place-items: center; background: #07111f; }
.login-page::before, .setup-page::before { content: ""; position: fixed; inset: 0; background: linear-gradient(120deg, rgba(0,185,232,.08), transparent 45%), radial-gradient(circle at 80% 15%, rgba(8,104,232,.14), transparent 27%); pointer-events: none; }
.login-shell, .setup-shell { position: relative; z-index: 1; width: min(920px, calc(100% - 48px)); display: grid; grid-template-columns: 1.1fr .9fr; background: #fff; border: 1px solid #223247; box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.login-brand, .setup-brand { padding: 48px; min-height: 510px; color: #fff; background: #0b1828; display: flex; flex-direction: column; justify-content: center; }
.login-brand img, .setup-brand img { width: 92px; height: 92px; object-fit: contain; margin-bottom: 25px; }
.login-brand span { color: var(--cyan); text-transform: uppercase; font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.login-brand h1, .setup-brand h1 { margin: 12px 0 10px; font-size: 34px; letter-spacing: 0; }
.login-brand p, .setup-brand p { max-width: 360px; color: #a9b8ca; line-height: 1.7; }
.login-form, .setup-form { align-content: center; display: grid; gap: 17px; padding: 48px; background: #fff; }
.login-form h2, .setup-form h2 { margin: 0; font-size: 19px; }
.setup-shell { grid-template-columns: 320px 1fr; width: min(1050px, calc(100% - 48px)); margin: 40px auto; }
.setup-brand { min-height: 720px; justify-content: flex-start; padding-top: 80px; }
.setup-form { grid-template-columns: 1fr; }
.setup-form h2 { border-top: 1px solid var(--line); padding-top: 18px; }
.setup-form h2:first-of-type { border-top: 0; padding-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-page { min-width: 1120px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 20px 14px; background: var(--nav); color: #d7e4f2; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 8px 17px; border-bottom: 1px solid #223044; }
.sidebar-brand img { width: 42px; height: 42px; object-fit: contain; }
.sidebar-brand div { display: grid; gap: 2px; }
.sidebar-brand strong { color: #fff; font-size: 16px; }
.sidebar-brand span { color: var(--cyan); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 4px; margin-top: 20px; }
.sidebar nav a, .logout { min-height: 39px; padding: 0 10px; display: flex; align-items: center; gap: 10px; color: #aebed0; text-decoration: none; border-radius: 5px; font-size: 13px; font-weight: 700; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: var(--nav-soft); }
.sidebar nav a.active { box-shadow: inset 3px 0 var(--cyan); }
.nav-mark { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #39516e; border-radius: 4px; color: var(--cyan); font-size: 10px; }
.logout { margin-top: auto; border-top: 1px solid #223044; border-radius: 0; }
.workspace { margin-left: 230px; padding: 22px 26px 48px; }
.workspace header { display: flex; justify-content: space-between; align-items: center; min-height: 65px; margin-bottom: 20px; }
.workspace header p { margin: 0 0 4px; color: var(--blue); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.workspace header h1 { margin: 0; font-size: 25px; }
.admin-identity { min-width: 170px; text-align: right; display: grid; gap: 2px; }
.admin-identity span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.metric, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.metric { min-height: 128px; padding: 17px; display: grid; align-content: space-between; }
.metric span { color: #43536a; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.metric strong { font-size: 31px; }
.metric small { color: var(--muted); }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 12px; }
.panel { padding: 16px; margin-bottom: 12px; }
.panel-title { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); margin: -2px -16px 15px; padding: 0 16px 13px; }
.panel-title h2 { margin: 0 0 4px; font-size: 15px; }
.panel-title p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-title a { color: var(--blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th { padding: 9px 10px; text-align: left; color: #5a6a80; background: #f4f7fb; border-bottom: 1px solid var(--line); font-size: 10px; text-transform: uppercase; }
td { padding: 10px; border-bottom: 1px solid #e6ecf3; color: #314056; font-size: 12px; vertical-align: middle; }
td strong, td small { display: block; }
td small { max-width: 300px; margin-top: 3px; color: #718096; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; min-height: 21px; padding: 0 8px; border-radius: 4px; color: #fff; background: #66768a; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.badge.active, .badge.allowed, .badge.completed { background: var(--green); }
.badge.suspended, .badge.denied { background: var(--amber); }
.badge.revoked, .badge.expired, .badge.failed { background: var(--red); }
.inline-form { display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 12px; align-items: end; margin-bottom: 17px; padding: 14px; background: #f5f8fc; border: 1px solid var(--line); }
.stack-form { display: grid; gap: 12px; margin-bottom: 18px; }
.stack-form .primary { width: max-content; }
.release-form { grid-template-columns: 120px 110px 1fr 1fr 130px 120px auto; }
.release-form .wide { min-width: 180px; }
.check { display: flex; align-items: center; gap: 7px; min-height: 36px; }
.check input { width: 16px; }
.action-form { display: inline-block; }
button.small { min-height: 27px; padding: 0 9px; border: 1px solid #b7c6d8; border-radius: 4px; color: #29405e; background: #fff; font-size: 11px; font-weight: 800; }
button.small.danger { color: #a61d30; border-color: #e6a8b1; }
.settings-list { display: grid; gap: 0; margin: 0 0 16px; border: 1px solid var(--line); }
.settings-list div { display: grid; grid-template-columns: 190px 1fr; min-height: 44px; border-bottom: 1px solid var(--line); }
.settings-list div:last-child { border-bottom: 0; }
.settings-list dt, .settings-list dd { margin: 0; padding: 12px; }
.settings-list dt { background: #f4f7fb; color: #516178; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.break { overflow-wrap: anywhere; }
@media (max-width: 1250px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .release-form { grid-template-columns: repeat(3, 1fr); }
}
