:root {
  --color-black: #000000;
  --color-ink: #071B3A;
  --color-bg: #F7FAFF;
  --color-white: #FFFFFF;
  --color-blue: #0068FF;
  --color-blue-link: #0068FF;
  --color-blue-bright: #37DEE7;
  --color-surface: #FFFFFF;
  --color-surface-dark: #1A30A0;
  --color-surface-dark-2: #021F4E;
  --color-surface-dark-3: #0F1F4F;
  --color-text-muted: #5E6B85;
  --color-text-subtle: #8A96B3;
  --color-text-muted-dark: rgba(255, 255, 255, 0.76);
  --color-text-subtle-dark: rgba(255, 255, 255, 0.58);
  --color-line: rgba(26, 48, 160, 0.08);
  --color-line-dark: rgba(255, 255, 255, 0.12);
  --shadow-card: rgba(26, 48, 160, 0.12) 0 18px 40px -18px;
  --radius-card: 18px;
  --radius-field: 14px;
  --radius-pill: 999px;
  --font-display: "Gilroy", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Roboto", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-text);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 48, 160, 0.94);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section {
  width: 100%;
  padding: 88px 0;
}

.section-inner {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand,
.nav-meta,
.nav-link {
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
}

.nav-brand {
  color: var(--color-white);
  font-weight: 600;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.8);
}

.nav-link {
  color: var(--color-white);
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  text-decoration: underline;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.nav-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-dark {
  background: var(--color-black);
  color: var(--color-white);
}

.theme-light {
  background: var(--color-bg);
  color: var(--color-ink);
}

.hero-section {
  position: relative;
  padding: 76px 0 72px;
  overflow: hidden;
  background: linear-gradient(135deg, #0068FF 0%, #1A30A0 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 24%, rgba(55, 222, 231, 0.16), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(0, 104, 255, 0.14), rgba(26, 48, 160, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 26%, rgba(55, 222, 231, 0.16), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.14), transparent 18%),
    linear-gradient(135deg, rgba(0, 104, 255, 0.08), rgba(26, 48, 160, 0.10));
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.hero-meta .meta-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-text {
  max-width: 700px;
  margin: 18px auto 0;
  color: var(--color-text-muted-dark);
}

.section-eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
  font-weight: 600;
}

.theme-dark .section-eyebrow,
.theme-dark .panel-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.theme-light .section-eyebrow,
.theme-light .panel-kicker {
  color: rgba(0, 0, 0, 0.72);
}

.hero-inner h1,
.section-heading h2,
.panel-header h3,
.subsection-header h3 {
  margin: 0;
  font-family: var(--font-display);
}

.hero-inner h1 {
  max-width: 14ch;
  margin-inline: auto;
  font-size: clamp(1.9rem, 4.8vw, 3.05rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text,
.section-copy,
.summary-text,
.insight-message,
.action-message,
.sync-status,
.kpi-subtext,
.meta-label {
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.374px;
}

.hero-text {
  max-width: 700px;
  margin: 10px auto 0;
  color: var(--color-text-muted-dark);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.primary-button,
.pill-link,
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 18px 30px rgba(0, 104, 255, 0.14);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #005fe5;
}

.pill-link {
  border: 1px solid currentColor;
  background: transparent;
}

.pill-link:hover,
.pill-link:focus-visible {
  text-decoration: underline;
}

.dark-link {
  color: var(--color-blue-bright);
}

.theme-light .pill-link {
  color: var(--color-blue-link);
}

.primary-button:hover,
.pill-link:hover,
.pill-button:hover {
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.pill-link:focus-visible,
.pill-button:focus-visible,
input[type="date"]:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.meta-card,
.surface-card,
.kpi-card,
.table-shell {
  border-radius: var(--radius-card);
}

.meta-card {
  padding: 14px 16px;
  background: var(--color-surface-dark-2);
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.meta-card:nth-child(2) {
  animation-delay: 90ms;
}

.meta-card:nth-child(3) {
  animation-delay: 180ms;
}

.meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted-dark);
}

.meta-card strong {
  font-size: 15px;
  line-height: 1.19;
  letter-spacing: 0.231px;
  font-weight: 600;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-family: var(--font-display);
}

.section-copy {
  margin: 14px 0 0;
}

.theme-dark .section-copy,
.theme-dark .summary-text,
.theme-dark .insight-message,
.theme-dark .action-message,
.theme-dark .kpi-subtext,
.theme-dark .sync-status {
  color: var(--color-text-muted-dark);
}

.theme-light .section-copy,
.theme-light .summary-text,
.theme-light .insight-message,
.theme-light .action-message,
.theme-light .kpi-subtext,
.theme-light .sync-status {
  color: var(--color-text-muted);
}

.surface-card {
  padding: 28px;
  animation: fade-up 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  min-width: 0;
}

.theme-light .surface-card,
.theme-light .kpi-card,
.theme-light .table-shell {
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 104, 255, 0.08);
}

.surface-card-dark,
.theme-dark .table-shell {
  background: linear-gradient(180deg, #1A30A0 0%, #021F4E 100%);
}

.control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.range-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.range-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.224px;
  color: var(--color-text-muted);
}

input[type="date"] {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-field);
  border: 3px solid rgba(0, 0, 0, 0.04);
  background: #fafafc;
  color: rgba(0, 0, 0, 0.8);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pill-button {
  min-height: 36px;
  padding: 0 14px;
  border: 3px solid rgba(0, 0, 0, 0.04);
  background: #fafafc;
  color: rgba(0, 0, 0, 0.8);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}

.pill-button.active {
  background: var(--color-ink);
  color: var(--color-white);
  border-color: var(--color-ink);
}

.sync-card {
  display: flex;
  align-items: center;
}

.sync-status strong {
  color: inherit;
}

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

.kpi-card {
  padding: 28px 24px;
  animation: fade-up 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.kpi-card:first-child {
  grid-column: span 2;
}

.kpi-card:nth-child(2) {
  animation-delay: 70ms;
}

.kpi-card:nth-child(3) {
  animation-delay: 140ms;
}

.kpi-card:nth-child(4) {
  animation-delay: 210ms;
}

.kpi-card:nth-child(5) {
  animation-delay: 280ms;
}

.kpi-label,
.mini-stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
  color: var(--color-text-subtle);
}

.kpi-value,
.mini-stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.07;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.dashboard-blocks {
  display: grid;
  gap: 24px;
}

.dashboard-stack {
  grid-template-columns: 1fr;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.dashboard-grid > * {
  min-width: 0;
}

.dashboard-watchlist-layout {
  margin-bottom: 18px;
}

.dashboard-sidebar {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.summary-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.summary-shell,
.insights-shell {
  display: grid;
  gap: 20px;
}

.summary-shell.full-width-summary {
  min-height: 380px;
  padding: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.summary-shell-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding-bottom: 18px;
}

.summary-shell-head h3 {
  font-size: 24px;
  line-height: 1.16;
  font-weight: 700;
  margin: 0;
}

.summary-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insights-shell {
  min-height: 260px;
}

.mini-stat {
  padding: 20px 18px;
  border-radius: var(--radius-card);
  background: var(--color-surface-dark-2);
}

.subsection-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 16px;
}

.panel-header h3,
.subsection-header h3 {
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: 0.196px;
  font-weight: 700;
}

.insight-list,
.action-list {
  display: grid;
  gap: 12px;
}

.insight-card,
.action-card {
  padding: 20px 22px;
  border-radius: var(--radius-card);
  background: var(--color-surface-dark-2);
}

.summary-block {
  min-height: 420px;
  height: 100%;
}

.dashboard-right > .surface-card {
  min-height: 280px;
}

.message-stage {
  display: grid;
  gap: 20px;
  margin-top: 0;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(55, 222, 231, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    var(--color-surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.trend-shell {
  padding-top: 20px;
}

.dashboard-grid {
  margin-top: 24px;
}

.watchlist-panel {
  min-height: 100%;
}

.dashboard-blocks.dashboard-stack > .surface-card {
  width: 100%;
}

.message-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.message-stage-copy {
  max-width: 680px;
}

.message-stage-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.message-stage-text {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted-dark);
}

.message-stage-frame {
  padding: 24px;
  border-radius: calc(var(--radius-card) + 4px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    var(--color-surface-dark-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.insight-title,
.action-title {
  margin: 8px 0 6px;
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.231px;
  font-weight: 700;
}

.insight-meta {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
  font-weight: 600;
}

.severity-critical .insight-meta {
  background: var(--color-white);
  color: var(--color-ink);
}

.severity-watch .insight-meta {
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

.severity-info .insight-meta {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted-dark);
}

.message-preview {
  margin: 0;
  white-space: pre-wrap;
  font: 14px/1.55 "SFMono-Regular", "Menlo", monospace;
  color: var(--color-white);
}

.send-status {
  min-height: 22px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--color-text-muted-dark);
}

.send-status.is-success {
  color: rgba(255, 255, 255, 0.86);
}

.send-status.is-error {
  color: rgba(255, 255, 255, 0.72);
}

.primary-button:disabled,
.pill-link:disabled,
.pill-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.trend-shell {
  margin-top: 16px;
}

.trend-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted-dark);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-shell {
  min-height: 340px;
  padding: 8px 0 0;
}

.chart-shell svg {
  width: 100%;
  height: 100%;
}

.axis-label {
  fill: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.axis-line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}

.theme-light th,
.theme-light td {
  border-bottom-color: var(--color-line);
}

.theme-dark th,
.theme-dark td {
  border-bottom-color: var(--color-line-dark);
}

th {
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
  color: inherit;
  opacity: 0.56;
  font-weight: 600;
}

.theme-light tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.theme-dark tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.stacked-panels {
  display: grid;
  gap: 16px;
}

.feature-panel {
  margin-top: 0;
}

.operator-panel {
  padding-bottom: 20px;
  min-height: 280px;
}

.operator-panel .panel-header,
.queue-panel .panel-header,
.watchlist-panel .panel-header {
  margin-bottom: 24px;
}

.operator-panel .table-shell,
.queue-panel .table-shell,
.watchlist-panel .table-shell {
  width: 100%;
}

.watchlist-panel {
  min-height: 340px;
}

.operator-panel,
.queue-panel {
  min-height: 320px;
}

.dashboard-sidebar .surface-card {
  min-height: unset;
}

.dashboard-grid-bottom {
  display: none;
}

.dashboard-grid-watchlist {
  margin-bottom: 18px;
}

.tickets-panel {
  margin-top: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
  font-weight: 600;
}

.status-open {
  background: var(--color-ink);
  color: var(--color-white);
}

.status-pending {
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

.theme-light .status-pending {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-ink);
}

.status-resolved {
  background: rgba(255, 255, 255, 0.28);
  color: var(--color-white);
}

.theme-light .status-resolved {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-ink);
}

.status-other {
  background: rgba(255, 255, 255, 0.1);
  color: currentColor;
}

.theme-light .status-other {
  background: rgba(0, 0, 0, 0.06);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  padding: 16px;
  color: inherit;
  opacity: 0.64;
}

.error-state {
  padding: 16px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.theme-light .error-state {
  background: rgba(0, 0, 0, 0.04);
}

.compact-empty-state {
  min-height: 0;
  padding: 18px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.06);
}

.theme-light .compact-empty-state {
  background: rgba(0, 0, 0, 0.04);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1024px) {
  .section {
    padding: 72px 0;
  }

  .control-layout,
  .summary-grid,
  .dashboard-blocks,
  .dashboard-grid,
  .summary-stats,
  .range-form,
  .message-stage-head {
    grid-template-columns: 1fr;
  }

  .message-stage-head {
    display: grid;
  }

  .hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .section-inner {
    width: min(100% - 24px, 980px);
  }

  .global-nav {
    height: auto;
  }

  .nav-inner,
  .nav-meta {
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero-section {
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .hero-inner h1 {
    max-width: 12ch;
    font-size: clamp(1.8rem, 11vw, 2.5rem);
  }

  .hero-actions,
  .quick-actions {
    align-items: stretch;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-meta .meta-card:last-child {
    grid-column: span 2;
  }

  .primary-button,
  .pill-link,
  .pill-button {
    width: 100%;
  }

  .overview-cards {
    grid-template-columns: 1fr;
  }

  .surface-card,
  .kpi-card {
    padding: 24px 20px;
  }

  th,
  td {
    padding: 14px 12px;
  }
}
