:root {
  --ink: #0d1b2a;
  --gold: #d9a441;
  --green: #4e9f8b;
  --sage: #a7b7a3;
  --parchment: #f8f6f0;
  --surface: #ffffff;
  --line: #e5e0d6;
  --muted: #66717e;
  --slate: #405263;
  --danger: #9b1c1c;
  --shadow: 0 18px 45px rgba(13, 27, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--parchment);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.auth-panel {
  width: min(960px, 100%);
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  margin: 0 auto;
  padding: 28px;
}

.brand-mark {
  width: 76px;
  height: 76px;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
  line-height: 1.1;
}

h3 {
  font-size: 28px;
}

h4 {
  font-size: 18px;
}

.lede {
  max-width: 620px;
  color: var(--slate);
  font-size: 18px;
  line-height: 1.55;
}

.login-card,
.panel-card,
.list-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfaf6;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
}

.mode-button {
  background: #fbfaf6;
  border-color: var(--line);
  color: var(--slate);
}

.mode-button.active,
.primary-button {
  background: var(--ink);
  color: white;
}

.secondary-button,
.ghost-button {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.danger-button {
  background: #fff5f5;
  border-color: #f1c4c4;
  color: var(--danger);
}

.compact {
  width: fit-content;
}

.hidden {
  display: none !important;
}

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

.sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background: var(--ink);
  color: white;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand span {
  display: block;
  color: #cbd3dc;
  font-size: 13px;
}

.mini-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #d9e0e7;
  text-align: left;
  font-weight: 700;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.sidebar .secondary-button {
  margin-top: auto;
}

.content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
}

.topbar,
.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  min-height: 70px;
}

.status-pill {
  width: fit-content;
  border-radius: 6px;
  padding: 7px 11px;
  background: #eef1f3;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.online {
  background: #eaf6f0;
  color: #145c3d;
}

.status-pill.warning {
  background: #fff4d9;
}

.tab-panel {
  display: grid;
  gap: 18px;
}

.hero-band {
  min-height: 150px;
  border-radius: 8px;
  padding: 22px;
  background: var(--ink);
  color: white;
}

.hero-band p {
  color: #d8e0e7;
  line-height: 1.5;
}

.metric-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.metric-card,
.panel-card {
  padding: 18px;
}

.metric-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.metric-card span,
.detail-list dt,
.list-row span,
.panel-card p {
  color: var(--slate);
}

.metric-card strong {
  font-size: 24px;
}

.panel-card {
  display: grid;
  gap: 12px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div,
.list-row,
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.detail-list dt {
  font-size: 13px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  font-weight: 800;
}

.list-card {
  overflow: hidden;
}

.list-row,
.toggle-row {
  min-height: 74px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.list-row:first-child,
.toggle-row:first-child {
  border-top: 0;
}

.list-row div {
  display: grid;
  gap: 4px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .auth-panel,
  .content,
  .sidebar {
    padding: 16px;
  }

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

  .topbar,
  .hero-band {
    align-items: flex-start;
    flex-direction: column;
  }
}
