:root {
  --bg: #f5f7fa; --ink: #141a22; --muted: #667085; --line: #d9e0ea; --panel: #fff; --panel-soft: #eef3f8;
  --accent: #0b6bcb; --accent-dark: #074f9a; --good: #107c41; --danger: #b42318; --shadow: 0 18px 50px rgba(20, 26, 34, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); letter-spacing: 0; }
a { color: inherit; } button, input, select, textarea { font: inherit; }
.brand-lockup { display: flex; align-items: center; gap: 10px; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 820; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 14px; font-weight: 720; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(20,26,34,.08); }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.ghost { background: #fff; }
.button.subtle { background: transparent; width: 100%; }
.button.full { width: 100%; }
.public-page, .login-page { display: grid; place-items: center; padding: 32px; }
.public-shell, .login-shell { width: min(720px, 100%); }
.public-hero, .login-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: clamp(28px, 6vw, 56px); }
.public-hero h1, .login-panel h1 { max-width: 620px; margin: 34px 0 12px; font-size: clamp(34px, 6vw, 62px); line-height: 1.02; letter-spacing: 0; }
.public-hero p { max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.public-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.login-panel { max-width: 460px; margin: auto; }
.login-panel h1 { font-size: 34px; }
.stack { display: grid; gap: 16px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px; background: #111827; color: #fff; display: flex; flex-direction: column; gap: 28px; }
.sidebar .brand-mark { background: #fff; color: #111827; }
nav { display: grid; gap: 6px; }
.nav-link { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 680; }
.nav-link.active, .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar #logout { margin-top: auto; color: #fff; border-color: rgba(255,255,255,.2); }
.workspace { padding: 28px; display: grid; gap: 22px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
h1, h2, p { margin: 0; }
.topbar h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
.topbar p, .section-heading p { color: var(--muted); margin-top: 6px; line-height: 1.45; }
.status-pill { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 760; white-space: nowrap; }
.status-pill.good { color: var(--good); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 26px rgba(20,26,34,.045); }
.metric { padding: 18px; }
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong { display: block; margin-top: 8px; font-size: 30px; }
.layout-grid { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { padding: 20px; }
.section-heading { margin-bottom: 18px; }
.section-heading.with-action { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.form-panel { display: grid; gap: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 720; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 107, 203, .14); }
.form-error { min-height: 20px; color: var(--danger); font-size: 14px; }
.form-message { min-height: 20px; color: var(--muted); font-size: 14px; }
.form-message.good { color: var(--good); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: 10px 8px; }
td { border-bottom: 1px solid var(--line); padding: 13px 8px; vertical-align: middle; font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; color: #344054; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.badge { display: inline-flex; min-height: 26px; align-items: center; border-radius: 999px; padding: 0 9px; background: var(--panel-soft); font-size: 12px; font-weight: 760; color: #344054; }
.badge.danger { color: var(--danger); background: #fff0ee; }
.empty { color: var(--muted); text-align: center; padding: 28px; }
@media (max-width: 920px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; } .sidebar nav { display: flex; } .sidebar #logout { width: auto; margin-left: auto; margin-top: 0; } .layout-grid, .metrics-grid { grid-template-columns: 1fr; } .topbar { flex-direction: column; } }
@media (max-width: 560px) { .workspace, .sidebar { padding: 18px; } .two-col { grid-template-columns: 1fr; } .section-heading.with-action { flex-direction: column; } .public-page, .login-page { padding: 18px; } }
