:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e5e7eb;

  /* SurgeTK brand teal, matching public/css/design-system/_tokens.css */
  --primary: #00a1d3;
  --primary-hover: #0281a9;
  --primary-light: #e6f3f7;
  --focus-ring: rgba(0, 161, 211, 0.25);

  --green: #16a34a;
  --green-bg: #ecfdf3;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --gray: #6b7280;
  --gray-bg: #f3f4f6;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

/* Always light: this page needs to read consistently the same way for every
   visitor (customers, prospects, security reviewers), regardless of their
   system theme, rather than shifting appearance under them. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.site-header .wrap {
  padding: 22px 20px;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.brand-page-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
}

h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 36px 0 14px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 12px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.status-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
}

.banner-text {
  min-width: 0;
}

.banner-label {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.banner-detail {
  margin-top: 2px;
  font-size: 14px;
  opacity: 0.85;
}

.banner-operational { background: var(--green-bg); color: var(--green); }
.banner-degraded    { background: var(--amber-bg); color: var(--amber); }
.banner-down        { background: var(--red-bg); color: var(--red); }
.banner-unknown     { background: var(--gray-bg); color: var(--gray); }

.bar {
  display: flex;
  gap: 3px;
}

.cell {
  flex: 1;
  height: 34px;
  border-radius: 3px;
  min-width: 3px;
  transition: transform 120ms ease-out;
}

.cell:hover {
  transform: scaleY(1.08);
}

.cell-operational { background: var(--green); }
.cell-degraded     { background: var(--amber); }
.cell-down         { background: var(--red); }
.cell-none         { background: var(--border); }

.bar-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.incident {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.incident-title {
  font-weight: 600;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-minor        { background: var(--amber-bg); color: var(--amber); }
.badge-major        { background: var(--red-bg); color: var(--red); }
.badge-critical     { background: var(--red-bg); color: var(--red); }
.badge-maintenance  { background: var(--gray-bg); color: var(--gray); }

.update {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.update:first-child {
  border-top: none;
}

.update-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}

.update-body {
  font-size: 14px;
}

footer {
  margin-top: 48px;
}

/* Admin form styling */
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}

.stack label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.stack input,
.stack select,
.stack textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.stack input:focus,
.stack select:focus,
.stack textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.stack textarea {
  min-height: 80px;
  resize: vertical;
}

.stack button {
  align-self: flex-start;
  font: inherit;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}

.stack button:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.stack-inline {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  margin-top: 8px;
}

.stack button.danger {
  background: var(--red);
}

.stack button.danger:hover {
  background: #b91c1c;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.brand {
  text-decoration: none;
}
