:root {
  --bg-body: #0b0f19;
  --bg-sidebar: #0f172a;
  --bg-card: #151e32;
  --bg-card-hover: #1c2742;
  --bg-input: #0b1120;
  --border-subtle: #1e293b;
  --border-focus: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --status-green: #10b981;
  --status-green-bg: rgba(16, 185, 129, 0.15);
  --status-yellow: #f59e0b;
  --status-yellow-bg: rgba(245, 158, 11, 0.15);
  --status-red: #ef4444;
  --status-red-bg: rgba(239, 68, 68, 0.15);
  --status-blue: #38bdf8;
  --status-blue-bg: rgba(56, 189, 248, 0.15);
  --status-purple: #818cf8;
  --status-purple-bg: rgba(129, 140, 248, 0.15);
  --status-gray: #6b7280;
  --status-gray-bg: rgba(107, 114, 128, 0.15);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.font-mono {
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

/* Full-Screen Authentication Gate */
.login-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, #16223b 0%, #0b0f19 70%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-modal);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-brand .brand-icon {
  width: 48px;
  height: 48px;
  fill: var(--status-blue);
  margin-bottom: 0.75rem;
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.login-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.login-error-box {
  display: none;
  background-color: var(--status-red-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Layout */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 28px;
  height: 28px;
  fill: var(--status-blue);
}

.header-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-green);
  box-shadow: 0 0 8px var(--status-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.refresh-controls {
  display: flex;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-user {
  background-color: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--status-blue);
}

.nav-bar {
  display: flex;
  background-color: #0d1527;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
  gap: 0.5rem;
  overflow-x: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
  color: var(--status-blue);
  border-bottom-color: var(--status-blue);
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

/* View Containers */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Page Headers */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.view-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.view-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Grid & KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.5rem 0;
}

.kpi-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Card Containers */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tables (.data-table and .sec-table) */
.table-responsive {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.data-table,
.sec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th,
.sec-table th {
  background-color: var(--bg-sidebar);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td,
.sec-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  background-color: var(--bg-card);
  vertical-align: middle;
}

.data-table tr:last-child td,
.sec-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td,
.sec-table tr:hover td {
  background-color: var(--bg-card-hover);
}

/* Hosts & Metrics 9-Column Table Sizing */
#view-hosts .table-responsive {
  overflow-x: auto;
}

#view-hosts .data-table {
  width: 100%;
  table-layout: fixed;
  min-width: 1120px;
}

#view-hosts .data-table th {
  padding: 0.65rem 0.6rem;
  font-size: 0.78rem;
  white-space: normal;
  line-height: 1.25;
  vertical-align: middle;
}

#view-hosts .data-table td {
  padding: 0.65rem 0.6rem;
  font-size: 0.81rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

#view-hosts .data-table th:nth-child(1),
#view-hosts .data-table td:nth-child(1) { width: 14%; }
#view-hosts .data-table th:nth-child(2),
#view-hosts .data-table td:nth-child(2) { width: 16%; }
#view-hosts .data-table th:nth-child(3),
#view-hosts .data-table td:nth-child(3) { width: 9%; }
#view-hosts .data-table th:nth-child(4),
#view-hosts .data-table td:nth-child(4) { width: 10%; }
#view-hosts .data-table th:nth-child(5),
#view-hosts .data-table td:nth-child(5) { width: 12%; }
#view-hosts .data-table th:nth-child(6),
#view-hosts .data-table td:nth-child(6) { width: 14%; }
#view-hosts .data-table th:nth-child(7),
#view-hosts .data-table td:nth-child(7) { width: 9%; }
#view-hosts .data-table th:nth-child(8),
#view-hosts .data-table td:nth-child(8) { width: 7%; }
#view-hosts .data-table th:nth-child(9),
#view-hosts .data-table td:nth-child(9) { width: 9%; }

/* Status Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-green { background-color: var(--status-green-bg); color: var(--status-green); }
.pill-yellow { background-color: var(--status-yellow-bg); color: var(--status-yellow); }
.pill-orange { background-color: rgba(249, 115, 22, 0.16); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); }
.pill-red { background-color: var(--status-red-bg); color: var(--status-red); }
.pill-blue { background-color: var(--status-blue-bg); color: var(--status-blue); }
.pill-purple { background-color: var(--status-purple-bg); color: var(--status-purple); }
.pill-gray { background-color: var(--status-gray-bg); color: var(--status-gray); }

.tag-badge {
  display: inline-block;
  background-color: rgba(129, 140, 248, 0.15);
  color: var(--status-purple);
  border: 1px solid rgba(129, 140, 248, 0.3);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin: 0.1rem 0.15rem;
  font-family: var(--font-mono);
}

.container-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(107, 114, 128, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(107, 114, 128, 0.3);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin: 0.1rem 0.15rem;
}

.container-pill.running {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--status-green);
  border-color: rgba(16, 185, 129, 0.38);
}

.container-pill.running::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-green);
}

.container-pill.stopped {
  background-color: rgba(239, 68, 68, 0.16);
  color: var(--status-red);
  border-color: rgba(239, 68, 68, 0.4);
}

.container-pill.stopped::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-red);
}

.container-pill.paused {
  background-color: rgba(245, 158, 11, 0.16);
  color: var(--status-yellow);
  border-color: rgba(245, 158, 11, 0.4);
}

.container-pill.paused::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-yellow);
}

/* Metric Bars */
.metric-bar-bg {
  flex: 1;
  height: 7px;
  background-color: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background-color: var(--status-blue);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.metric-bar-fill.warning { background-color: var(--status-yellow); }
.metric-bar-fill.danger { background-color: var(--status-red); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--text-primary);
}

.btn-primary {
  background-color: #0284c7;
  color: #fff;
  border-color: #0369a1;
}

.btn-primary:hover {
  background-color: #0369a1;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  color: var(--text-primary);
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-warning {
  background-color: rgba(245, 158, 11, 0.18);
  color: var(--status-yellow);
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
  background-color: rgba(245, 158, 11, 0.28);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.18);
  color: var(--status-red);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

textarea.form-input.font-mono,
.form-textarea {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Modals (.modal and .modal-overlay) */
.modal,
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
}

.modal.active,
.modal-overlay.active {
  display: flex;
}

.modal-card,
.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}

.modal-card.modal-large,
.modal-dialog.lg {
  max-width: 920px;
  width: min(920px, 95vw);
}

.modal-card > form,
.modal-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-sidebar);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-sidebar);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Drawer (Slide-out from right) */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 150;
}

.drawer-overlay.active {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: -580px;
  width: 560px;
  max-width: 100vw;
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-modal);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}

.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-section:last-child {
  border-bottom: none;
}

.drawer-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

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

.drawer-meta-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.containers-list,
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Activity stream / logs */
.activity-stream {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideIn 0.2s ease;
}

.toast.success { border-left: 4px solid var(--status-green); }
.toast.error { border-left: 4px solid var(--status-red); }
.toast.info { border-left: 4px solid var(--status-blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Red/Green Status Grid */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.matrix-cell {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid var(--status-gray);
}

.matrix-cell.OK { border-left-color: var(--status-green); }
.matrix-cell.WARN { border-left-color: var(--status-yellow); }
.matrix-cell.CRITICAL,
.matrix-cell.TIMEOUT,
.matrix-cell.ERROR { border-left-color: var(--status-red); }

/* Code preview (.code-preview and pre.code-block) */
.code-preview,
pre.code-block {
  background-color: #0b1120;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Dashboard Active Errors Banner */
.dashboard-errors-banner {
  background-color: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-left: 5px solid var(--status-red);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.dashboard-errors-banner.nominal {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  border-left-color: var(--status-green);
}

/* Dropbox / Atlassian Statuspage UI */
.statuspage-banner,
.statuspage-overall-banner {
  padding: 1.2rem 1.5rem;
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #022c22;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.22);
}

.statuspage-banner.degraded,
.statuspage-overall-banner.degraded {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #451a03;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.22);
}

.statuspage-banner.partial,
.statuspage-overall-banner.partial {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.26);
}

.statuspage-banner.outage,
.statuspage-overall-banner.outage {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.28);
}

#monitors-statuspage-components {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.statuspage-group-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.statuspage-group-header {
  background-color: var(--bg-sidebar);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--status-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.statuspage-row,
.statuspage-component-row {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  transition: background-color 0.15s ease;
}

.statuspage-row:hover,
.statuspage-component-row:hover {
  background-color: rgba(51, 65, 85, 0.28);
}

.statuspage-row:last-child,
.statuspage-component-row:last-child {
  border-bottom: none;
}

/* 30-Segment Dropbox Statuspage Uptime Bars */
.uptime-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.uptime-bar-seg {
  width: 5px;
  height: 18px;
  border-radius: 2px;
  background-color: var(--status-green);
  opacity: 0.88;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.uptime-bar-seg:hover {
  transform: scaleY(1.25);
  opacity: 1;
}

.uptime-bar-seg.warn {
  background-color: var(--status-yellow);
}

.uptime-bar-seg.partial {
  background-color: #f97316;
}

.uptime-bar-seg.crit {
  background-color: var(--status-red);
}

.statuspage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 0.85rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.incident-day,
.incident-day-block {
  margin-bottom: 1.35rem;
}

.incident-day-header {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.incident-entry {
  background-color: var(--bg-sidebar);
  border-left: 3px solid var(--status-yellow);
  padding: 0.65rem 1rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 0.45rem;
}

.incident-entry.crit { border-left-color: var(--status-red); }
.incident-entry.ok { border-left-color: var(--status-green); }

/* Template & Tag Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.feature-card,
.template-card,
.tag-group-card {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover,
.template-card:hover,
.tag-group-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.card-body {
  width: 100%;
}

.login-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 0.5rem;
}

.login-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .grid-2col {
    grid-template-columns: 1fr !important;
  }
}

