:root {
  color-scheme: light;
  --ink: #15243b;
  --muted: #65758b;
  --line: #dce4ec;
  --paper: #ffffff;
  --wash: #f3f7fa;
  --brand: #0c6c66;
  --brand-dark: #07534f;
  --danger: #ad2d36;
  --warning: #9a6512;
  --ok: #16754f;
  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: linear-gradient(135deg,#eef6f5 0,#f8fafc 42%,#eef3f8 100%); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 8px; background: var(--brand); color: white; padding: .58rem .9rem; cursor: pointer; }
button:hover { background: var(--brand-dark); }
button.secondary { background: #e6edf2; color: var(--ink); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { width: 100%; border: 1px solid #bdc9d4; border-radius: 8px; padding: .62rem .7rem; background: white; color: var(--ink); }
textarea { min-height: 7rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
label { display: grid; gap: .32rem; color: #33445b; font-size: .9rem; }
.auth-wrap { width: min(520px,calc(100% - 2rem)); margin: 8vh auto; }
.card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(29,54,79,.08); padding: 1.2rem; }
.auth-wrap h1 { margin: 0 0 .4rem; font-size: 1.65rem; }
.muted { color: var(--muted); }
.stack { display: grid; gap: .9rem; }
.inline { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.shell { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: 100vh; }
aside { background: #112a36; color: white; padding: 1.4rem 1rem; }
aside h1 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 1.2rem; }
nav { display: grid; gap: .3rem; }
nav button { text-align: left; background: transparent; padding: .7rem .75rem; color: #dce9ed; }
nav button.active, nav button:hover { background: rgba(255,255,255,.12); }
main { padding: 1.5rem; overflow: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.topbar h2 { margin: 0; font-size: 1.35rem; }
.view { display: none; }
.view.active { display: grid; gap: 1rem; }
.metrics { display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)); gap: .8rem; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.metric strong { display: block; font-size: 1.55rem; margin-top: .25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: .7rem; border-bottom: 1px solid #e7edf2; vertical-align: top; font-size: .88rem; }
th { color: #526278; background: #f6f9fb; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 999px; padding: .18rem .48rem; background: #e9eef3; color: #3d4f65; font-size: .75rem; }
.badge.ok { background: #dff3e9; color: var(--ok); }
.badge.warn { background: #fff0d3; color: var(--warning); }
.badge.bad { background: #fbe2e4; color: var(--danger); }
.status-line { border-left: 4px solid var(--line); padding: .6rem .8rem; background: #f8fafb; border-radius: 4px 8px 8px 4px; }
.status-line.ok { border-color: var(--ok); }
.status-line.bad { border-color: var(--danger); }
.command { white-space: pre-wrap; overflow-wrap: anywhere; background: #101d2a; color: #d9f1ec; padding: .8rem; border-radius: 8px; font: .82rem ui-monospace,SFMono-Regular,Menlo,monospace; }
.message { position: fixed; right: 1rem; bottom: 1rem; max-width: 420px; padding: .8rem 1rem; border-radius: 10px; background: #15243b; color: white; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 10; }
.message.error { background: var(--danger); }
dialog { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(620px,calc(100% - 2rem)); }
dialog::backdrop { background: rgba(10,25,35,.45); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: static; }
  nav { grid-template-columns: repeat(3,1fr); }
  .metrics, .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  main { padding: .8rem; }
  .metrics, .grid-2 { grid-template-columns: 1fr; }
  nav { grid-template-columns: repeat(2,1fr); }
}

