:root {
  --navy-950: #081827; --navy-900: #0d2235; --navy-800: #15334a; --navy-700: #244861;
  --ink: #172b3a; --muted: #668091; --line: #dbe6ea; --panel: #ffffff; --wash: #f3f8f9;
  --turquoise: #18b8b0; --turquoise-dark: #087d82; --turquoise-pale: #e0f6f3;
  --amber: #9a6500; --amber-pale: #fff4d5; --red: #b54747; --red-pale: #fdeceb;
  --green: #08785b; --green-pale: #e4f7ef; --shadow: 0 12px 30px rgba(14, 42, 58, .08); --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--wash); color: var(--ink); }
body { margin: 0; min-width: 320px; font-size: 14px; line-height: 1.5; }
a { color: var(--turquoise-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: var(--navy-950); color: #d9eaf0; display: flex; flex-direction: column; flex: 0 0 238px; min-height: 100vh; padding: 24px 16px 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 750; letter-spacing: -.02em; font-size: 16px; padding: 0 10px; }
.brand-mark { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(76, 224, 215, .7); color: #4ce0d7; border-radius: 7px; font-size: 18px; }
.sidebar-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; color: #7290a0; margin: 31px 10px 9px; }
.sidebar-nav { display: grid; gap: 3px; }
.nav-link { color: #9eb7c2; padding: 10px 11px; border-radius: 8px; display: block; transition: color .15s, background .15s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav-link.is-active { color: #fff; background: #164054; box-shadow: inset 3px 0 var(--turquoise); }
.nav-divider { border-top: 1px solid rgba(203, 235, 239, .12); margin: 13px 10px 10px; }
.sidebar-footer { margin-top: auto; color: #83a1ad; border-top: 1px solid rgba(203, 235, 239, .12); padding: 17px 10px 0; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; background: #45d6a3; border-radius: 50%; box-shadow: 0 0 0 3px rgba(69,214,163,.14); }
.main-column { flex: 1; min-width: 0; }
.topbar { min-height: 72px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 20px; padding: 13px 30px; position: sticky; top: 0; z-index: 5; }
.global-search { flex: 1; max-width: 560px; position: relative; }
.global-search input { width: 100%; border: 1px solid var(--line); background: #f8fbfc; border-radius: 8px; padding: 10px 13px 10px 36px; color: var(--ink); outline: none; }
.global-search input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(24,184,176,.13); background: #fff; }
.search-glyph { position: absolute; left: 13px; top: 7px; color: #79929e; font-size: 20px; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-name { color: var(--navy-800); font-weight: 650; }
.role-chip { color: var(--turquoise-dark); background: var(--turquoise-pale); border-radius: 99px; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.logout-form { margin: 0; }
.text-button, .icon-button { border: 0; background: transparent; color: var(--turquoise-dark); padding: 5px 0; }
.menu-toggle { display: none; color: var(--navy-800); }
.page-content { max-width: 1480px; margin: 0 auto; padding: 31px 30px 56px; }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 26px; }
.page-heading h1 { color: var(--navy-900); font-size: clamp(25px, 3vw, 34px); line-height: 1.1; margin: 4px 0 7px; letter-spacing: -.03em; }
.eyebrow { color: var(--turquoise-dark); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.subtitle { color: var(--muted); margin: 0; max-width: 700px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: end; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; padding: 17px 20px; }
.panel-header h2, .panel-header h3 { margin: 0; color: var(--navy-900); font-size: 15px; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 18px; }
.stat-card { padding: 18px 19px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); min-height: 118px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { color: var(--navy-900); font-size: 28px; line-height: 1.1; margin: 13px 0 7px; font-variant-numeric: tabular-nums; }
.stat-detail { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 650px; }
th { color: #688391; font-size: 11px; letter-spacing: .07em; text-align: left; text-transform: uppercase; background: #f8fbfc; white-space: nowrap; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 18px; vertical-align: top; }
td { color: var(--ink); font-size: 13px; }
tbody tr:hover { background: #fbfefe; }
tbody tr:last-child td { border-bottom: 0; }
.table-code, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .04em; }
.table-code { color: var(--navy-800); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid transparent; border-radius: 7px; padding: 7px 13px; font-weight: 700; font-size: 13px; transition: background .15s, border .15s, transform .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--turquoise-dark); }
.btn-primary:hover { background: #06656b; }
.btn-secondary { color: var(--navy-800); border-color: var(--line); background: #fff; }
.btn-secondary:hover { background: var(--wash); }
.btn-danger { color: var(--red); border-color: #efc2c0; background: #fff; }
.btn-danger:hover { background: var(--red-pale); }
.btn-quiet { color: var(--turquoise-dark); background: transparent; padding-inline: 4px; }
.status { border-radius: 99px; display: inline-block; font-size: 11px; font-weight: 750; padding: 4px 8px; white-space: nowrap; }
.status-active, .status-success, .status-enabled { color: var(--green); background: var(--green-pale); }
.status-pending, .status-unknown, .status-warning { color: var(--amber); background: var(--amber-pale); }
.status-expired, .status-banned, .status-failed, .status-disabled { color: var(--red); background: var(--red-pale); }
.status-neutral { color: var(--navy-700); background: #edf3f5; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.field { display: grid; gap: 5px; min-width: 160px; }
.field label, form p label { color: var(--navy-800); font-size: 12px; font-weight: 700; }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=datetime-local], select, textarea { width: 100%; border: 1px solid #c9d9df; background: #fff; border-radius: 7px; color: var(--ink); padding: 9px 10px; outline: none; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(24,184,176,.13); }
form p { display: grid; gap: 5px; margin: 0 0 15px; }
form p.helptext, .helptext { color: var(--muted); font-size: 12px; }
form ul.errorlist { color: var(--red); list-style: none; margin: 0; padding: 0; font-size: 12px; }
.checkbox-row, form p:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.checkbox-row label, form p:has(input[type=checkbox]) label { order: 2; }
.checkbox-row input, form p:has(input[type=checkbox]) input { order: 1; width: auto; }
.empty-state { color: var(--muted); padding: 35px 22px; text-align: center; }
.empty-state strong { color: var(--navy-800); display: block; margin-bottom: 5px; }
.flash-stack { display: grid; gap: 9px; margin: 0 0 18px; }
.flash { border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; background: #fff; }
.flash-success { color: var(--green); border-color: #bce5d4; background: var(--green-pale); }
.flash-error, .flash-warning { color: var(--red); border-color: #efc2c0; background: var(--red-pale); }
.flash-info { color: var(--navy-800); background: #edf6fb; }
.callout { border-left: 3px solid var(--turquoise); padding: 12px 14px; background: var(--turquoise-pale); color: var(--navy-800); border-radius: 0 8px 8px 0; }
.callout.warning { border-color: #d49a2d; background: var(--amber-pale); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .75fr); gap: 18px; }
.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 15px 25px; }
.definition-list div { min-width: 0; }
.definition-list dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.definition-list dd { margin: 4px 0 0; color: var(--navy-900); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 2px solid #c9e9e6; padding: 2px 0 18px 18px; position: relative; }
.timeline li:before { background: var(--turquoise); border: 3px solid #e5f8f6; border-radius: 50%; content: ""; height: 8px; left: -6px; position: absolute; top: 4px; width: 8px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pagination { align-items: center; display: flex; gap: 12px; justify-content: space-between; padding: 15px 18px; border-top: 1px solid var(--line); color: var(--muted); }
.pagination-links { display: flex; gap: 7px; }
.pagination-links a, .pagination-links span { border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; }
.pagination-links span { color: #a7b9c0; }
.notice { color: var(--muted); font-size: 12px; }
.sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.login-page { background: linear-gradient(145deg, var(--navy-950), #12394c 52%, #eff9f8); min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { max-width: 430px; width: 100%; background: #fff; padding: 33px; border-radius: 14px; box-shadow: 0 25px 60px rgba(3, 22, 33, .27); }
.login-card h1 { color: var(--navy-900); margin: 25px 0 7px; font-size: 26px; }
.login-card .btn { width: 100%; margin-top: 5px; }
.login-note { color: var(--muted); margin: 0 0 22px; }
.code-copy { border: 0; background: transparent; color: var(--turquoise-dark); padding: 0; }
.code-copy.is-copied:after { content: "Copied"; font-family: inherit; font-size: 11px; margin-left: 7px; }
@media (max-width: 1120px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .sidebar { position: fixed; z-index: 20; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 15px 0 35px rgba(0,0,0,.2); } .sidebar.is-open { transform: translateX(0); } .menu-toggle { display: block; } .topbar { padding-inline: 16px; gap: 10px; } .topbar-user .user-name, .role-chip { display: none; } .page-content { padding: 23px 16px 42px; } .page-heading { align-items: start; flex-direction: column; } .page-actions { justify-content: start; } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .definition-list { grid-template-columns: 1fr; } .global-search input { font-size: 12px; } .topbar { min-height: 62px; } .panel-body { padding: 15px; } .login-card { padding: 25px 21px; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; } }
