:root {
  --bg: #080d18;
  --bg-radial-1: rgba(20, 95, 115, 0.10);
  --bg-radial-2: rgba(67, 86, 160, 0.08);
  --bg-radial-3: rgba(99, 102, 241, 0.04);
  --surface: #101827;
  --surface-strong: #151f31;
  --surface-glass: rgba(17, 26, 42, 0.80);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(96, 165, 250, 0.22);
  --text: #edf4fb;
  --text-muted: #a7b4c7;
  --text-faint: #75849a;
  --primary: #22c7b8;
  --primary-glow: rgba(34, 199, 184, 0.10);
  --primary-dark: #1b8f88;
  --accent-blue: #60a5fa;
  --success: #34d399;
  --warning: #f59e0b;
  --danger: #fb7185;
  --info: #60a5fa;
  --violet: #a78bfa;
  --sidebar: rgba(4, 9, 22, 0.94);
  --sidebar-muted: #8b9bb3;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.20);
  --shadow-glow: 0 0 0 rgba(0, 0, 0, 0);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html { min-width: 320px; scrollbar-color: rgba(148, 163, 184, 0.55) rgba(4, 9, 22, 0.95); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 6% 0%, var(--bg-radial-1), transparent 34%),
    radial-gradient(circle at 88% 4%, var(--bg-radial-2), transparent 30%),
    radial-gradient(circle at 50% 95%, var(--bg-radial-3), transparent 30%),
    linear-gradient(180deg, #070c16 0%, var(--bg) 44%, #090f1b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: rgba(4, 9, 22, 0.92); }
*::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.46); border-radius: 999px; border: 3px solid rgba(4, 9, 22, 0.92); }
*::-webkit-scrollbar-thumb:hover { background: rgba(96, 165, 250, 0.48); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 82%);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #6ff7e6; text-decoration: none; }

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  color: var(--text);
  background:
    radial-gradient(circle at 26% 0%, rgba(20, 95, 115, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(5, 10, 24, 0.98), rgba(7, 13, 30, 0.96));
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 38px rgba(0, 0, 0, 0.22);
}

.brand,
.brand-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 5px 14px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.brand-logo-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 251, 0.94));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 18px rgba(0, 194, 168, 0.10);
}
.brand-logo-full {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.brand-lockup {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-lockup-clean {
  padding: 4px 0 3px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  filter: none;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-logo { width: 172px; max-width: 100%; height: auto; object-fit: contain; display: block; margin-bottom: 4px; }
.brand-name {
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.brand-wordmark {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 194, 168, 0.12);
}
.brand-subtitle { color: var(--sidebar-muted); font-size: 11px; margin: 0 2px; }
.brand-tagline-clean {
  color: #9fb0c7;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-top: 5px;
  white-space: normal;
}
.brand-tagline {
  display: block;
  max-width: 100%;
  color: #bfe2f4;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.10);
  border-radius: 10px;
  padding: 6px 8px;
}

.nav-group,
.nav-section { margin: 11px 0; }
.nav-title {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 10px 8px;
  text-transform: uppercase;
}
.nav-link,
.nav-item {
  color: #cfdbed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 9px;
  margin: 1px 0;
  font-weight: 650;
  min-width: 0;
  max-width: 100%;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}
.nav-link:hover,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translateX(1px);
}
.nav-link.active,
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.14), rgba(148, 163, 184, 0.05));
  border-color: rgba(96, 165, 250, 0.24);
  box-shadow: inset 2px 0 0 var(--accent-blue);
}
.nav-link.disabled { opacity: 0.58; cursor: not-allowed; }
.nav-label { display: inline-flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; }
.nav-icon { width: 17px; height: 17px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.78; flex: 0 0 auto; }
.nav-link.active .nav-icon, .nav-link:hover .nav-icon { opacity: 1; filter: brightness(0) invert(1); }
.nav-sub { margin-left: 9px; padding-left: 11px; border-left: 1px solid rgba(148, 163, 184, 0.16); }

.app-main { min-width: 0; width: 100%; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 22px;
  background: rgba(8, 13, 28, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.topbar > div { min-width: 0; }
.topbar-title { font-weight: 760; letter-spacing: 0.01em; }
.topbar-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--text-muted); min-width: 0; flex-wrap: wrap; }
.user-menu { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }

.main {
  width: 100%;
  max-width: 1360px;
  min-width: 0;
  overflow-x: hidden;
  padding: 22px 24px 32px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
  flex-wrap: wrap;
}
.page-header > div { min-width: 0; }
.page-title {
  margin: 0;
  color: #f8fbff;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}
.page-subtitle { margin: 5px 0 0; color: var(--text-muted); }
.page-actions,
.toolbar,
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.page-actions { justify-content: flex-end; flex: 1 1 280px; }

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(18, 27, 43, 0.96), rgba(12, 18, 30, 0.92));
  box-shadow: var(--shadow);
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-title { margin: 4px 0 6px; font-size: 22px; font-weight: 780; line-height: 1.14; }
.hero-kicker { color: #8fb9e8; font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.hero-copy { max-width: 760px; color: var(--text-muted); margin: 0; }
.hero-panel-compact { padding: 14px 18px; }
.hero-panel-compact .posture-header { align-items: center; }
.hero-panel-compact .hero-title { font-size: 21px; }
.hero-panel-compact .muted { margin-bottom: 0; }

.content-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  align-items: stretch;
}
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card,
.panel,
.form-card,
.glass-card {
  background: linear-gradient(180deg, rgba(17, 26, 42, 0.92), rgba(12, 19, 31, 0.94));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
  min-width: 0;
  overflow-x: auto;
  padding: 14px;
}
.glass-card { background: var(--surface-glass); backdrop-filter: blur(16px); }
.card + .card, .panel + .panel { margin-top: 12px; }
.card h2, .panel h2, .form-card h2 { margin: 0 0 10px; font-size: 16px; font-weight: 760; color: #f7fbff; }

.metric-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 13px;
  background:
    linear-gradient(180deg, rgba(19, 31, 55, 0.92), rgba(12, 20, 36, 0.92));
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.56), rgba(148, 163, 184, 0.20), transparent);
}
.metric-card:hover { border-color: rgba(96, 165, 250, 0.22); box-shadow: var(--shadow); }
.metric-label { color: var(--text-muted); font-size: 10px; font-weight: 760; letter-spacing: 0.08em; text-transform: uppercase; }
.metric-value { color: #ffffff; font-size: 21px; font-weight: 780; letter-spacing: -0.01em; margin-top: 4px; }
.metric-note { color: var(--text-faint); font-size: 12px; margin-top: 4px; }

.metric-card.metric-quiet .metric-value { color: #cdd7e6; }
.metric-card.metric-alert::before { background: linear-gradient(90deg, var(--danger), rgba(245, 158, 11, 0.35), transparent); }
.metric-card.metric-warning::before { background: linear-gradient(90deg, var(--warning), rgba(148, 163, 184, 0.20), transparent); }
.kpi-strip { margin-top: 12px; }
.kpi-strip .metric-card { min-height: 78px; }
.section-eyebrow {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.status-strip-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.compact-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 3px solid rgba(148, 163, 184, 0.30);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.92), rgba(10, 16, 28, 0.92));
}
.compact-metric span {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.04em;
}
.compact-metric strong {
  display: block;
  color: #f7fbff;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.2;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.compact-metric small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}
.compact-metric-success { border-left-color: var(--success); }
.compact-metric-warning { border-left-color: var(--warning); }
.compact-metric-danger { border-left-color: var(--danger); }
.compact-metric-info { border-left-color: var(--info); }
.compact-metric-muted { border-left-color: rgba(148, 163, 184, 0.35); }

.dashboard-main { align-items: start; }
.priority-queue,
.readiness-panel,
.operations-panel,
.account-summary {
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.94), rgba(10, 16, 29, 0.96));
}
.priority-queue h2,
.readiness-panel h2 { font-size: 18px; }
.queue-list { display: grid; gap: 8px; margin-top: 10px; }
.queue-list-secondary { margin-top: 14px; }
.queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.queue-row-critical { border-left-color: var(--danger); }
.queue-row-warning { border-left-color: var(--warning); }
.queue-title { color: #f8fbff; font-weight: 720; }
.queue-meta { color: var(--text-muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.queue-row-table td:first-child { border-left: 3px solid rgba(148, 163, 184, 0.24); }
.problem-row-critical td:first-child { border-left-color: var(--danger); }
.problem-row-warning td:first-child { border-left-color: var(--warning); }

.setup-checklist { display: grid; gap: 7px; margin-top: 12px; }
.check-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.check-item:last-child { border-bottom: 0; }
.check-status {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 720;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.check-status.done { color: #9ff5cf; background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.30); }
.check-status.todo { color: #ffd48a; background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.28); }

.inventory-strip { padding: 12px; }
.inventory-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.inventory-health-grid > div {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.028);
  padding: 9px 10px;
}
.inventory-health-grid span {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 720;
}
.inventory-health-grid strong {
  display: block;
  color: #f8fbff;
  font-size: 15px;
  font-weight: 700;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.density-table { min-width: 700px; }
.density-table th { padding: 7px 7px; }
.density-table td { padding: 7px 7px; }
.btn-small { min-height: 26px; padding: 4px 8px; font-size: 12px; }
.empty-state-premium {
  background: linear-gradient(180deg, rgba(20, 30, 48, 0.70), rgba(13, 20, 33, 0.74));
}

.posture-card {
  border-left: 0;
  border-color: var(--border-strong);
}
.posture-card::before { background: linear-gradient(90deg, var(--info), rgba(148, 163, 184, 0.24)); }
.posture-success::before { background: linear-gradient(90deg, var(--success), rgba(96, 165, 250, 0.34)); }
.posture-warning::before { background: linear-gradient(90deg, var(--warning), rgba(96, 165, 250, 0.24)); }
.posture-danger::before { background: linear-gradient(90deg, var(--danger), var(--violet)); }
.posture-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.posture-header h2 { margin: 4px 0; }

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}
.data-table-compact { font-size: 12px; }
.data-table th {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  padding: 8px 7px;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #dce7f7;
  padding: 8px 7px;
  vertical-align: top;
}
.data-table-compact td { padding: 10px 8px; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.035); }
table:not(.data-table) { width: 100%; border-collapse: collapse; }
table:not(.data-table) th, table:not(.data-table) td { border-bottom: 1px solid rgba(148, 163, 184, 0.12); padding: 10px 8px; text-align: left; }

.status-badge,
.severity-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
  white-space: nowrap;
}
.badge-success, .status-success { color: #9ff5cf; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.32); }
.badge-warning, .status-warning { color: #ffd48a; background: rgba(245, 158, 11, 0.13); border-color: rgba(245, 158, 11, 0.34); }
.badge-danger, .status-danger { color: #ffc0cb; background: rgba(251, 113, 133, 0.13); border-color: rgba(251, 113, 133, 0.36); }
.badge-info, .status-info { color: #b9dcff; background: rgba(96, 165, 250, 0.13); border-color: rgba(96, 165, 250, 0.34); }
.badge-muted { color: var(--text-muted); background: rgba(148, 163, 184, 0.10); border-color: rgba(148, 163, 184, 0.18); }
.severity-critical { color: #ffc0cb; border-color: rgba(251, 113, 133, 0.42); box-shadow: 0 0 18px rgba(251, 113, 133, 0.14); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-faint); }
.status-dot.success { background: var(--success); box-shadow: 0 0 12px rgba(52, 211, 153, 0.5); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 12px rgba(245, 158, 11, 0.45); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 12px rgba(251, 113, 133, 0.5); }

.btn,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 41, 59, 0.92), rgba(17, 24, 39, 0.96));
  color: var(--text);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.btn:hover, .button:hover, button:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.42);
  background: linear-gradient(180deg, rgba(42, 54, 75, 0.94), rgba(21, 31, 49, 0.98));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.btn-primary, .button, button[type="submit"] {
  background: linear-gradient(180deg, #2dd4bf, #14b8a6);
  border-color: rgba(45, 212, 191, 0.38);
  color: #04111f;
  box-shadow: inset 0 -1px 0 rgba(3, 17, 31, 0.18);
}
.btn-primary:hover, .button:hover, button[type="submit"]:hover {
  background: linear-gradient(180deg, #5eead4, #2dd4bf);
  border-color: rgba(94, 234, 212, 0.48);
  color: #03101c;
}
.btn-secondary {
  background: linear-gradient(180deg, rgba(31, 41, 59, 0.88), rgba(17, 24, 39, 0.94));
  color: #e2e8f0;
}
.btn-danger {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.48), rgba(69, 10, 10, 0.46));
  border-color: rgba(251, 113, 133, 0.34);
  color: #ffd8df;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.filters, .quick-filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.quick-filters .btn { min-height: 28px; padding: 5px 9px; font-size: 12px; border-radius: 999px; }

label { display: block; color: var(--text); font-weight: 680; margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 10px;
  padding: 6px 9px;
  background: rgba(3, 8, 20, 0.72);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
select option { color: #0f172a; background: #f8fafc; }
.filter-bar input, .filter-bar select, .filters input, .filters select { max-width: 220px; min-width: 168px; }
.filter-bar label { color: var(--text-muted); font-weight: 700; }
.filter-bar label input { width: auto; margin-right: 6px; }
.form-card form p { max-width: 760px; }
textarea { min-height: 92px; }
.helptext, .muted { color: var(--text-muted); }
.errors, .errorlist { color: var(--danger); }
.errorlist { padding-left: 18px; }

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  padding: 14px;
}
.empty-state h2, .empty-state h3 { color: var(--text); margin: 0 0 6px; font-size: 15px; }
.empty-state p { margin: 0; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.detail-item { border-bottom: 1px solid rgba(148, 163, 184, 0.13); padding-bottom: 10px; }
.detail-label { color: var(--text-faint); font-size: 11px; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.detail-value { color: #eaf2ff; margin-top: 3px; font-weight: 680; min-width: 0; overflow-wrap: anywhere; }

.message { margin-bottom: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.action-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.action-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.action-form {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}
.action-form textarea { min-height: 72px; margin-bottom: 10px; }
.problem-chip { display: inline-flex; align-items: center; gap: 6px; }

.problem-row-critical td { box-shadow: inset 3px 0 0 var(--danger); }
.problem-row-warning td { box-shadow: inset 3px 0 0 var(--warning); }
.problem-title { color: #fff; font-weight: 850; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.timeline { display: grid; gap: 8px; }
.timeline-item {
  border-left: 2px solid rgba(96, 165, 250, 0.24);
  padding: 2px 0 10px 12px;
  color: var(--text-muted);
}
.timeline-item strong { color: var(--text); }

.admin-shell,
.platform-admin-panel {
  border-color: rgba(167, 139, 250, 0.20);
  box-shadow: var(--shadow);
}

.dashboard-layout { margin-top: 12px; }
.attention-card { min-height: 100%; }
.next-actions {
  display: grid;
  gap: 8px;
}
.next-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.next-action-row:last-child { border-bottom: 0; }
.next-action-row strong { font-weight: 720; }
.next-action-row .muted { font-size: 12px; }

.filters-panel { padding: 12px; }
.filters-panel .filter-bar { margin-bottom: 8px; }
.problem-reason { color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.problem-title { color: #fff; font-weight: 720; }

.platform-summary,
.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.admin-control-grid .attention-panel { grid-column: span 1; }
.admin-zone {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 124px;
  padding: 14px;
}
.admin-zone-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 8px;
}
.admin-zone-metrics div {
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.028);
  padding: 8px;
}
.admin-zone-metrics span {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 720;
}
.admin-zone-metrics strong {
  display: block;
  color: #f8fbff;
  font-size: 18px;
  font-weight: 720;
  margin-top: 2px;
}
.admin-zone > .muted {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}
.admin-command-hero {
  border-color: rgba(167, 139, 250, 0.24);
  background:
    linear-gradient(135deg, rgba(31, 28, 50, 0.96), rgba(11, 17, 30, 0.92));
}
.workspace-table-panel { min-height: 260px; }
.platform-metric-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.platform-metric-section + .platform-metric-section { margin-top: 10px; }
.metric-group-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.09em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.attention-panel {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(180deg, rgba(35, 28, 19, 0.62), rgba(14, 21, 35, 0.92));
}

.form-card {
  max-width: 820px;
}
.form-card input,
.form-card select,
.form-card textarea {
  max-width: 620px;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { position: static; padding: 12px 18px; align-items: flex-start; }
  .main { padding: 18px; }
  .page-header { flex-direction: column; }
  .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
  .platform-summary, .admin-control-grid { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .content-grid, .metric-grid { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: 1; }
  .detail-grid { grid-template-columns: 1fr; }
  .topbar-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .page-title, .hero-title { font-size: 24px; }
  .data-table { display: block; overflow-x: auto; }
  .filter-bar input, .filter-bar select, .filters input, .filters select { max-width: 100%; }
  .platform-metric-section { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: 1fr; }
  .admin-zone-metrics { grid-template-columns: 1fr; }
}
