/* status.css — standalone visual identity for status.volatility.farm.
 *
 * Deliberately NOT imported by app.css and does NOT @import anything
 * from app.css. The status page must load fast on its own domain
 * without dragging in the app shell, and survives even if the main
 * app's CSS is broken.
 *
 * Mobile-first: base styles target narrow viewports; @media queries
 * widen the tile grid at larger breakpoints.
 */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-green: #16a34a;
  --color-yellow: #eab308;
  --color-yellow-text: #78350f;
  --color-red: #dc2626;
  --color-link: #2563eb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

.status-page-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.brand {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-link);
}

.page-label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.status-banner {
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  color: white;
  box-shadow: var(--shadow);
}

.status-banner.operational {
  background: var(--color-green);
}

.status-banner.degraded {
  background: var(--color-yellow);
  color: var(--color-yellow-text);
}

.status-banner.down {
  background: var(--color-red);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.banner-dot {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.status-banner.degraded .banner-dot {
  background: rgba(120, 53, 15, 0.85);
}

.status-banner h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .status-banner h1 {
    font-size: 1.6rem;
  }
}

section {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

.notice-section .notice {
  background: var(--color-surface);
  border-left: 4px solid var(--color-yellow);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.notice-message {
  margin: 0;
  font-size: 1rem;
}

.notice-window {
  margin: 0.5rem 0 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .system-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.tile .tile-label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
}

.tile .tile-state {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.tile .tile-sub {
  margin-top: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  word-break: break-word;
}

.tile.metric .tile-value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

.tile.metric .tile-label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 400;
}

.tile.state-active {
  border-left: 4px solid var(--color-green);
}
.tile.state-active .tile-state {
  color: var(--color-green);
}

.tile.state-inactive,
.tile.state-failed {
  border-left: 4px solid var(--color-red);
}
.tile.state-inactive .tile-state,
.tile.state-failed .tile-state {
  color: var(--color-red);
}

.tile.state-unknown {
  border-left: 4px solid var(--color-text-muted);
}
.tile.state-unknown .tile-state {
  color: var(--color-text-muted);
}

.status-footer {
  max-width: 960px;
  margin: 2rem auto 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.status-footer a {
  color: var(--color-link);
  text-decoration: none;
}

.status-footer a:hover {
  text-decoration: underline;
}
