:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172b3a;
  background: #f7f9fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #142d42;
  --teal: #087f82;
  --muted: #718096;
  --border: #e4eaf0;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f9fb;
}

.shell {
  width: min(1120px, 92%);
  margin: auto;
  padding: 26px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 1.5px;
  color: var(--navy);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
  letter-spacing: 1.8px;
}

.environment, .eyebrow, .section-heading span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.2px;
}

h1 {
  color: var(--navy);
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -.8px;
  margin: 9px 0;
}

h2 { color: var(--navy); font-size: 17px; }
p { margin-top: 8px; }
.muted { color: var(--muted); line-height: 1.65; }

.login-card {
  width: min(420px, 100%);
  margin: 65px auto;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(20, 45, 66, .045);
}

label {
  display: block;
  margin: 20px 0 8px;
  color: #34495a;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 13px 14px;
  background: white;
  color: var(--navy);
  border: 1px solid #d8e1e9;
  border-radius: 6px;
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 130, .09);
}

button {
  cursor: pointer;
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--teal);
  color: white;
  font-weight: 600;
  transition: background .15s ease;
}

button:hover { background: #066b6e; }

#login-form button {
  width: 100%;
  margin-top: 25px;
  justify-content: center;
}

button.secondary {
  color: var(--navy);
  background: white;
  border-color: var(--border);
}

button.secondary:hover { background: #f1f5f8; }

.error { color: #b42318; font-size: 13px; min-height: 18px; }

.welcome-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 7px;
}

.status-banner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #15966b;
  border-radius: 50%;
}

.live-label {
  margin-left: auto;
  color: #16805e;
  font-size: 11px;
  letter-spacing: 1px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 34px 0 15px;
}

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

.metric-card {
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.metric-card span, .metric-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-card strong {
  display: block;
  color: var(--navy);
  font-size: 25px;
  margin: 16px 0 8px;
}

.notice {
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.notice p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

[hidden] { display: none !important; }

@media(max-width: 650px) {
  .cards { grid-template-columns: 1fr; }
  .welcome-row { align-items: flex-start; gap: 12px; }
  h1 { font-size: 27px; }
  .login-card { padding: 25px; margin: 35px auto; }
  .environment { font-size: 9px; }
  .topbar { margin-bottom: 32px; }
}
