/* Stage 446 · Production Runtime Resilience + Broker Operations Automation */
:root {
  --stage446-bg: rgba(5, 13, 24, 0.84);
  --stage446-border: rgba(115, 245, 190, 0.22);
  --stage446-text: #ecfff7;
  --stage446-muted: rgba(224, 255, 244, 0.70);
  --stage446-green: #75f5bd;
  --stage446-gold: #f7c65f;
  --stage446-red: #ff6b85;
  --stage446-blue: #76b7ff;
}

.stage446-resilience-ops {
  position: relative;
  margin: 24px auto;
  max-width: 1180px;
  border: 1px solid var(--stage446-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(117, 245, 189, 0.14), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(247, 198, 95, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(7, 20, 35, 0.96), rgba(3, 8, 16, 0.94));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255,255,255,0.06);
  color: var(--stage446-text);
  overflow: hidden;
}

.stage446-resilience-ops::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 82%);
}

.stage446-shell {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.stage446-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(117,245,189,.24);
  border-radius: 999px;
  background: rgba(117,245,189,.08);
  color: var(--stage446-green);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
}

.stage446-head {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
  align-items: end;
  margin-top: 14px;
}

.stage446-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.stage446-head p,
.stage446-muted {
  color: var(--stage446-muted);
  line-height: 1.65;
}

.stage446-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stage446-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: rgba(255,255,255,.055);
  padding: 16px;
  min-height: 118px;
}

.stage446-card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.stage446-card span {
  display: block;
  margin-top: 6px;
  color: var(--stage446-muted);
  font-size: 13px;
}

.stage446-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stage446-btn {
  border: 1px solid rgba(117,245,189,.30);
  border-radius: 14px;
  background: rgba(117,245,189,.10);
  color: var(--stage446-text);
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.stage446-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(117,245,189,.56);
  background: rgba(117,245,189,.16);
}

.stage446-btn[data-variant="danger"] {
  border-color: rgba(255, 107, 133, .36);
  background: rgba(255, 107, 133, .11);
}

.stage446-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.stage446-panel {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  padding: 14px;
}

.stage446-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.stage446-list {
  display: grid;
  gap: 8px;
}

.stage446-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--stage446-muted);
  font-size: 13px;
}

.stage446-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(117,245,189,.26);
  color: var(--stage446-green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stage446-pill[data-state="open"], .stage446-pill[data-state="blocked"] {
  border-color: rgba(255, 107, 133, .32);
  color: var(--stage446-red);
}

.stage446-pill[data-state="half_open"], .stage446-pill[data-state="degraded"] {
  border-color: rgba(247, 198, 95, .36);
  color: var(--stage446-gold);
}

.stage446-log {
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: rgba(234,255,248,.78);
  white-space: pre-wrap;
}

body.stage446-terminal-runtime .stage446-resilience-ops,
.terminal-shell .stage446-resilience-ops,
#terminalRoot .stage446-resilience-ops {
  max-width: none;
  margin: 16px 0;
  border-radius: 22px;
}

body.stage446-operator-runtime .stage446-resilience-ops {
  max-width: none;
  border-color: rgba(118,183,255,.22);
}

@media (max-width: 920px) {
  .stage446-head,
  .stage446-panel-grid {
    grid-template-columns: 1fr;
  }
  .stage446-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .stage446-shell { padding: 18px; }
  .stage446-grid { grid-template-columns: 1fr; }
  .stage446-actions { display: grid; }
  .stage446-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .stage446-btn { transition: none; }
  .stage446-btn:hover { transform: none; }
}
