:root {
  --bg-ink: #050b16;
  --bg-slate: #0b1120;
  --surface: rgb(15 23 42 / 56%);
  --surface-solid: #111c31;
  --surface-strong: rgb(17 27 46 / 78%);
  --line: rgb(56 189 248 / 28%);
  --line-soft: rgb(148 163 184 / 30%);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --brand-a: #6366f1;
  --brand-b: #0ea5e9;
  --brand-c: #14b8a6;
  --focus-cyan: #22d3ee;
  --focus-pink: #f472b6;
  --danger: #fb7185;
  --ok: #34d399;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow-deep: 0 28px 80px rgb(2 6 23 / 56%);
  --shadow-soft: 0 16px 36px rgb(2 6 23 / 42%);
  --brand-gradient: linear-gradient(96deg, var(--brand-a) 0%, var(--brand-b) 52%, var(--brand-c) 100%);
  --footer-height: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  background:
    radial-gradient(580px circle at 4% 8%, rgb(34 211 238 / 11%), transparent 52%),
    radial-gradient(700px circle at 92% 14%, rgb(99 102 241 / 20%), transparent 48%),
    radial-gradient(540px circle at 62% 88%, rgb(20 184 166 / 11%), transparent 58%),
    linear-gradient(164deg, var(--bg-ink) 0%, var(--bg-slate) 100%);
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.3;
  z-index: 0;
}

.bg-shape-a {
  inset: auto auto -160px -80px;
  width: 410px;
  height: 410px;
  background: #0ea5e9;
}

.bg-shape-b {
  inset: 2% -120px auto auto;
  width: 390px;
  height: 390px;
  background: #6366f1;
}

.bg-shape-c {
  inset: auto 24% 3% auto;
  width: 320px;
  height: 320px;
  background: #14b8a6;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  letter-spacing: -0.018em;
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
  line-height: 1.12;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.06rem, 1.38vw, 1.28rem);
  line-height: 1.18;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgb(186 230 253 / 86%);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #031022;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:where(button, input, select, textarea, a, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-cyan);
  box-shadow: 0 0 0 2px var(--focus-pink);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.page-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.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;
}

.login-screen {
  min-height: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgb(18 29 49 / 78%) 0%, rgb(15 23 42 / 55%) 100%);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.brand-glyph {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  border: 1px solid rgb(125 211 252 / 55%);
  background:
    radial-gradient(circle at 30% 28%, rgb(165 180 252 / 76%), transparent 56%),
    linear-gradient(145deg, rgb(99 102 241 / 62%) 0%, rgb(14 165 233 / 64%) 52%, rgb(20 184 166 / 58%) 100%);
  box-shadow: 0 10px 26px rgb(14 165 233 / 35%);
}

.login-kicker {
  margin: 3px 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: #dbeafe;
}

.login-help {
  margin: 8px 0 18px;
  color: var(--text-muted);
}

.login-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-meta span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgb(186 230 253 / 90%);
  background: rgb(15 23 42 / 62%);
}

#app-shell {
  position: relative;
  z-index: 1;
}

.sidebar {
  position: fixed;
  top: 18px;
  left: 18px;
  bottom: calc(var(--footer-height) + 18px);
  width: 292px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgb(15 23 42 / 76%) 0%, rgb(15 23 42 / 56%) 100%);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

.sidebar-head {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(148 163 184 / 22%);
}

.sidebar-copy {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.sidebar-section-label {
  margin-top: -3px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(186 230 253 / 72%);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px;
  color: #dbeafe;
  background: rgb(15 23 42 / 72%);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.nav-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-right: 2px solid rgb(186 230 253 / 86%);
  border-bottom: 2px solid rgb(186 230 253 / 86%);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.nav-toggle[aria-expanded="false"]::after {
  transform: rotate(-45deg);
}

.tabs {
  display: grid;
  gap: 9px;
  align-content: start;
  margin-top: -2px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgb(56 189 248 / 45%) rgb(15 23 42 / 45%);
}

.tabs::-webkit-scrollbar {
  width: 10px;
}

.tabs::-webkit-scrollbar-track {
  background: rgb(15 23 42 / 45%);
  border-radius: 999px;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgb(56 189 248 / 45%);
  border-radius: 999px;
  border: 2px solid rgb(15 23 42 / 45%);
}

.tabs::-webkit-scrollbar-thumb:hover {
  background: rgb(56 189 248 / 62%);
}

.tab {
  position: relative;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 14px 11px 38px;
  color: #dbeafe;
  background: rgb(15 23 42 / 42%);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.tab:hover {
  border-color: var(--line-soft);
  background: rgb(30 41 59 / 68%);
}

.tab::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 999px;
  border: 1px solid rgb(125 211 252 / 40%);
  background: rgb(30 41 59 / 95%);
}

.tab.active {
  color: #031022;
  background: var(--brand-gradient);
  border-color: rgb(14 165 233 / 42%);
  box-shadow: 0 8px 24px rgb(14 165 233 / 25%);
}

.tab.active::before {
  border-color: rgb(255 255 255 / 72%);
  background: rgb(255 255 255 / 88%);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgb(148 163 184 / 22%);
}

.sidebar-foot p {
  margin: 0;
  font-size: 0.77rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.workspace {
  margin-left: 338px;
  min-height: calc(100vh - var(--footer-height));
  max-height: calc(100vh - var(--footer-height));
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 14px;
}

.status-cluster,
.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: #dbeafe;
  background: rgb(15 23 42 / 68%);
}

.status-pill.warn {
  color: #ffe4e6;
  border-color: rgb(251 113 133 / 46%);
  background: rgb(136 19 55 / 36%);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 28px 34px;
}

.layout {
  display: grid;
  gap: 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.card-grid.metrics {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.card-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgb(17 27 46 / 72%) 0%, rgb(15 23 42 / 56%) 100%);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.metric {
  min-height: 112px;
  border-left: 3px solid rgb(14 165 233 / 80%);
}

.metric p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.025em;
  color: var(--text-muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: rgb(15 23 42 / 84%);
}

input::placeholder,
textarea::placeholder {
  color: rgb(148 163 184 / 72%);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox input {
  width: auto;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #031022;
  background: var(--brand-gradient);
  box-shadow: 0 10px 22px rgb(14 165 233 / 28%);
}

.btn-primary:hover {
  box-shadow: 0 14px 26px rgb(14 165 233 / 32%);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--line-soft);
  background: rgb(15 23 42 / 72%);
}

.btn-secondary:hover {
  background: rgb(30 41 59 / 84%);
}

.btn.disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgb(15 23 42 / 52%);
  scrollbar-width: thin;
  scrollbar-color: rgb(56 189 248 / 45%) rgb(15 23 42 / 35%);
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgb(15 23 42 / 35%);
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgb(56 189 248 / 45%);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgb(148 163 184 / 15%);
  text-align: left;
  vertical-align: top;
  font-size: 0.81rem;
  line-height: 1.35;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(186 230 253 / 88%);
  background: rgb(11 17 32 / 92%);
  backdrop-filter: blur(6px);
}

tbody tr:nth-child(even) td {
  background: rgb(15 23 42 / 22%);
}

tbody tr:hover td {
  background: rgb(14 165 233 / 10%);
}

tbody tr td:first-child {
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.console {
  margin: 0;
  min-height: 92px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  color: #dbeafe;
  background: rgb(2 6 23 / 70%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.77rem;
}

.list-placeholder {
  min-height: 72px;
  display: grid;
  align-content: center;
  color: var(--text-muted);
}

.endpoint-list {
  margin: 0;
  padding-left: 18px;
}

.endpoint-list li {
  margin: 7px 0;
}

code {
  color: #bae6fd;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #f8fafc;
  background: rgb(2 6 23 / 84%);
  padding: 11px 13px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(10px);
  transition: all 160ms ease;
  z-index: 12;
}

.site-footer {
  border-top: 1px solid rgb(30 41 59 / 90%);
  color: rgb(148 163 184 / 92%);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  padding: 16px 24px;
  min-height: var(--footer-height);
  background: rgb(2 6 23 / 58%);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge.high,
.badge.critical,
.badge.open,
.badge.escalated {
  color: #ffe4e6;
  background: rgb(190 24 93 / 35%);
}

.badge.medium,
.badge.in_review {
  color: #fef3c7;
  background: rgb(161 98 7 / 38%);
}

.badge.low,
.badge.resolved,
.badge.closed {
  color: #dcfce7;
  background: rgb(21 128 61 / 36%);
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(2 6 23 / 78%);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.modal-panel {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(165deg, rgb(17 27 46 / 84%) 0%, rgb(15 23 42 / 62%) 100%);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (width <= 1080px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    margin: 14px;
  }

  .tabs {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .workspace {
    margin-left: 0;
    max-height: none;
    min-height: auto;
    overflow: visible;
  }

  .topbar {
    padding: 4px 14px 12px;
  }

  .page-shell {
    padding: 8px 14px 26px;
  }
}

@media (width <= 760px) {
  .login-card,
  .card,
  .sidebar {
    border-radius: 24px;
  }

  .topbar {
    align-items: flex-start;
  }

  .status-cluster,
  .action-cluster {
    width: 100%;
  }

  .btn,
  .tab {
    width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .tabs,
  .sidebar-foot {
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    max-height: 960px;
    transition: max-height 240ms ease, opacity 180ms ease, transform 180ms ease;
  }

  .tab {
    padding-left: 36px;
  }

  .mobile-nav-collapsed .tabs,
  .mobile-nav-collapsed .sidebar-foot {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }
}
