:root {
  color-scheme: light;
  --ink: #22212a;
  --muted: #686474;
  --line: #d9d5e4;
  --paper: #ffffff;
  --wash: #f6f4fb;
  --lavender: #62479a;
  --lavender-strong: #4a337a;
  --blue: #dbeeff;
  --mint: #dff4ec;
  --rose: #ffe4eb;
  --gold: #fff2cb;
  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;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(219, 238, 255, 0.82), rgba(246, 244, 251, 0.74)),
    var(--wash);
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 28px 20px;
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  aspect-ratio: 1;
  background: var(--lavender);
  border-radius: 8px;
  color: white;
  display: grid;
  font-weight: 800;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.muted {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 36px;
}

.nav a {
  border-radius: 8px;
  color: var(--ink);
  padding: 11px 12px;
  text-decoration: none;
}

.nav a.active {
  background: var(--lavender);
  color: white;
}

.main {
  padding: 32px clamp(18px, 5vw, 56px);
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  margin-bottom: 0;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1rem;
}

.content {
  display: grid;
  gap: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.auth-panel,
.alert {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(63, 47, 103, 0.08);
}

.card,
.auth-panel {
  padding: 20px;
}

.metric {
  min-height: 116px;
}

.metric strong {
  display: block;
  font-size: 2.15rem;
  line-height: 1.1;
}

.row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 0;
}

.row:first-child {
  border-top: 0;
  padding-top: 0;
}

.row:last-child {
  padding-bottom: 0;
}

.value {
  color: var(--muted);
  overflow-wrap: anywhere;
  text-align: right;
}

.pill {
  background: var(--mint);
  border-radius: 999px;
  color: #20513f;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
}

.pill.warn {
  background: var(--gold);
  color: #71580a;
}

.pill.stop {
  background: var(--rose);
  color: #793144;
}

.form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
}

.primary {
  background: var(--lavender);
  color: white;
}

.nav-link-button {
  display: inline-flex;
  margin-top: 12px;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

.primary:hover,
.nav a.active:hover {
  background: var(--lavender-strong);
}

.ghost {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.text-button {
  background: transparent;
  color: var(--lavender);
  padding-left: 0;
}

.copy-line {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.empty {
  color: var(--muted);
  padding: 10px 0;
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
}

.hidden {
  display: none !important;
}

@media (max-width: 840px) {
  .shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    padding: 18px;
  }

  .nav {
    display: flex;
    margin-top: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav a {
    white-space: nowrap;
  }

  .main {
    padding: 24px 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .metrics,
  .two {
    grid-template-columns: 1fr;
  }
}
