:root {
  color-scheme: light;
  --bg: #eef3f6;
  --surface: #ffffff;
  --ink: #13201d;
  --muted: #64736f;
  --line: #d7e2de;
  --accent: #0f766e;
  --accent-2: #b45309;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 42px);
  background: #10231f;
  color: white;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9fd6cd;
  font-size: 12px;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(26px, 5vw, 44px); }
h2 { font-size: 18px; margin-bottom: 14px; }

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 32px) 42px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e6f3ef;
  color: #0d5f58;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.secure { background: #134e4a; color: #c6f3ea; }

.login-panel, article, .status-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 35, 31, 0.07);
}

.login-panel {
  padding: 18px;
  margin-bottom: 16px;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

label { color: var(--muted); font-size: 13px; font-weight: 700; }
input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: white;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
button.secondary { background: #2f3c46; }

#login-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
}

.status-strip div {
  padding: 14px;
  background: #fbfdfc;
}

.status-strip strong, .status-strip span {
  display: block;
}
.status-strip span { color: var(--muted); margin-top: 4px; }

.overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

article { padding: 18px; min-width: 0; }
.wide-card { grid-column: span 3; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.site-selector { margin: 0 0 14px; }

.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.site-grid div, .flow div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #f8fbfa;
}
.site-grid span, .flow span { display: block; color: var(--muted); font-size: 13px; }
.site-grid strong, .flow strong { display: block; margin-top: 6px; font-size: 20px; }

.flow { display: grid; gap: 10px; }

.soc-ring {
  width: 156px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 4px auto 0;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0deg, var(--line) 0deg);
}
.soc-ring span {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  font-size: 26px;
  font-weight: 900;
}

.guard-level { color: var(--accent-2); font-weight: 900; }
.events { padding-left: 18px; color: var(--muted); }
.history-placeholder {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 8px;
  height: 120px;
}
.history-placeholder span {
  display: block;
  background: linear-gradient(180deg, #0f766e, #9fd6cd);
  border-radius: 4px 4px 0 0;
}
.history-placeholder span:nth-child(1) { height: 35%; }
.history-placeholder span:nth-child(2) { height: 52%; }
.history-placeholder span:nth-child(3) { height: 44%; }
.history-placeholder span:nth-child(4) { height: 76%; }
.history-placeholder span:nth-child(5) { height: 61%; }

@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  form, .status-strip, .overview, .site-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: span 1; }
  .card-head { flex-direction: column; }
  .pill { white-space: normal; }
  .login-actions { align-items: stretch; flex-direction: column; }
}
