:root {
  --bg: #f6f8fb;
  --ink: #1b2733;
  --muted: #5b6c7d;
  --line: #d9e1ea;
  --card: #ffffff;
  --brand: #1098d6;
  --brand-dark: #0a75aa;
  --nav-h: 72px;
  --ok-bg: #ddf8e9;
  --ok-text: #0f5e35;
  --err-bg: #ffe3e5;
  --err-text: #8b1f2f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.no-bg .bg-light {
  display: none;
}

body.no-top-bg .bg-a {
  display: none;
}

.bg-light {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.14;
  z-index: -2;
}

.bg-a {
  width: 420px;
  height: 420px;
  background: #7fe9ff;
  top: -120px;
  left: -80px;
}

.bg-b {
  width: 390px;
  height: 390px;
  background: #9ad7ff;
  right: -120px;
  bottom: -120px;
}

.content {
  width: min(1150px, 92vw);
  margin: 0 auto;
}

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e4eaf1;
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.nav-wrap.scrolled {
  background: #ffffffeb;
  box-shadow: 0 4px 14px rgba(16, 30, 45, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  gap: 20px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.brand img {
  width: auto;
  height: 56px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(11, 58, 88, 0.18);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(12, 66, 98, 0.12);
}

.nav-toggle-lines {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-wrap.nav-open .nav-toggle-lines {
  background: transparent;
  box-shadow: none;
}

.nav-wrap.nav-open .nav-toggle-lines::before,
.nav-wrap.nav-open .nav-toggle-lines::after {
  opacity: 1;
}

.nav-wrap.nav-open .nav-toggle-lines::before {
  transform: rotate(45deg);
}

.nav-wrap.nav-open .nav-toggle-lines::after {
  transform: rotate(-45deg);
}

.nav-btn {
  background: var(--brand);
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
}

.hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity 0.2s linear, transform 0.2s linear;
  pointer-events: none;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(243, 249, 255, 0.35) 0%, rgba(243, 249, 255, 0.78) 80%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 38%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
}

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

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-graphics {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-graphic-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(183, 223, 242, 0.95);
  border-radius: 12px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    linear-gradient(145deg, rgba(235, 248, 255, 0.92), rgba(255, 255, 255, 0.72));
  padding: 10px 8px;
  box-shadow: 0 8px 20px rgba(10, 56, 86, 0.08);
  transform: translateY(0) scale(1);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
  animation: heroGraphicFloat 5.8s ease-in-out infinite;
}

.hero-graphic-card::before,
.hero-graphic-card::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.hero-graphic-card::before {
  inset: -55% auto auto -30%;
  width: 88%;
  height: 180%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.72) 48%, transparent 100%);
  transform: rotate(14deg) translateX(-150%);
  opacity: 0.8;
  animation: heroGraphicShimmer 6.4s ease-in-out infinite;
}

.hero-graphic-card::after {
  right: -16px;
  bottom: -22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 172, 225, 0.24), rgba(54, 172, 225, 0));
  opacity: 0.9;
  transition: transform 220ms ease, opacity 220ms ease;
}

.hero-graphic-card:hover,
.hero-graphic-card:focus-visible {
  border-color: rgba(64, 168, 216, 0.95);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(243, 251, 255, 0.84)),
    linear-gradient(145deg, rgba(224, 245, 255, 0.98), rgba(255, 255, 255, 0.8));
  box-shadow: 0 16px 34px rgba(10, 78, 120, 0.18);
  transform: translateY(-6px) scale(1.03);
}

.hero-graphic-card:hover::after,
.hero-graphic-card:focus-visible::after {
  transform: scale(1.2);
  opacity: 1;
}

.hero-graphic-card:nth-child(2) {
  animation-delay: 0.8s;
}

.hero-graphic-card:nth-child(2)::before {
  animation-delay: 0.45s;
}

.hero-graphic-card:nth-child(3) {
  animation-delay: 1.6s;
}

.hero-graphic-card:nth-child(3)::before {
  animation-delay: 0.9s;
}

.hero-graphic-card svg {
  width: 24px;
  height: 24px;
  fill: #0b5d88;
  position: relative;
  z-index: 1;
  transition: transform 220ms ease, fill 220ms ease, filter 220ms ease;
}

.hero-graphic-card span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #27506a;
  position: relative;
  z-index: 1;
  transition: color 220ms ease, letter-spacing 220ms ease;
}

.hero-graphic-card:hover svg,
.hero-graphic-card:focus-visible svg {
  fill: #0981bc;
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 8px 16px rgba(9, 129, 188, 0.18));
}

.hero-graphic-card:hover span,
.hero-graphic-card:focus-visible span {
  color: #0d4564;
  letter-spacing: 0.01em;
}

@keyframes heroGraphicFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes heroGraphicShimmer {
  0%,
  100% {
    transform: rotate(14deg) translateX(-150%);
    opacity: 0;
  }
  16% {
    opacity: 0;
  }
  32% {
    transform: rotate(14deg) translateX(210%);
    opacity: 0.85;
  }
  45% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-graphic-card,
  .hero-graphic-card::before {
    animation: none;
  }

  .hero-graphic-card,
  .hero-graphic-card::after,
  .hero-graphic-card svg,
  .hero-graphic-card span {
    transition: none;
  }
}

.hero-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-card,
.section-card,
.tech-card,
.card,
.login-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(20, 32, 44, 0.06);
}

.hero-card {
  padding: 22px;
}

.hero-card h2,
.section h2,
.dash-grid h2,
.login-shell h1 {
  margin: 0 0 10px;
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.section {
  padding: 20px 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-card {
  padding: 24px;
}

.section-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.duo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.compact-card {
  padding: 20px;
}

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

.quick-grid.is-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
  display: grid;
  gap: 6px;
}

.quick-item strong {
  font-size: 0.95rem;
}

.quick-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  box-shadow: none;
}

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

.process-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(240, 250, 255, 0.92));
  padding: 14px;
  box-shadow: 0 8px 18px rgba(12, 66, 98, 0.08);
}

.process-step h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.process-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 125, 183, 0.2);
  background: linear-gradient(145deg, rgba(0, 192, 243, 0.2), rgba(0, 125, 183, 0.12));
  color: #0b587f;
}

.process-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.signal-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.signal-title {
  margin: 0;
  font-weight: 800;
  color: #184b69;
}

.signal-meter {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e5eef6;
  overflow: hidden;
}

.signal-meter span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11a2df, #0b79af);
}

.signal-note {
  margin: 8px 0 0;
  color: #486477;
  font-size: 0.85rem;
}

.dashboard-preview-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(21, 165, 226, 0.14), transparent 36%),
    radial-gradient(circle at 86% 2%, rgba(69, 132, 191, 0.11), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f2f9ff 100%);
}

.dashboard-preview-band::after {
  content: "";
  position: absolute;
  inset: -45% -20% auto;
  height: 190px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-68%) rotate(6deg);
  animation: previewSweep 7.5s ease-in-out infinite;
  pointer-events: none;
}

.demo-shot-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.demo-shot {
  position: relative;
  border: 1px solid #cde2ef;
  border-radius: 14px;
  background: linear-gradient(160deg, #fbfeff, #edf6fd);
  box-shadow: 0 14px 28px rgba(18, 72, 109, 0.1);
  overflow: hidden;
}

.demo-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(20, 128, 186, 0.05));
  pointer-events: none;
}

.demo-shot-main {
  grid-column: 1 / -1;
  animation: shotFloat 5.5s ease-in-out infinite;
}

.demo-shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e8f3;
  background: rgba(247, 252, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
  color: #2f5972;
}

.demo-shot-lights {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.demo-shot-lights i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #a9c6db;
}

.demo-shot-lights i:nth-child(1) {
  background: #79cae8;
}

.demo-shot-lights i:nth-child(2) {
  background: #9dd88f;
}

.demo-shot-lights i:nth-child(3) {
  background: #ffbd73;
}

.demo-shot-body {
  padding: 12px;
}

.demo-kpi-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-kpi-row div {
  border: 1px solid #d8e8f3;
  border-radius: 10px;
  background: #fff;
  padding: 8px 9px;
}

.demo-kpi-row p {
  margin: 0;
  color: #5a768a;
  font-size: 0.75rem;
}

.demo-kpi-row strong {
  margin-top: 3px;
  display: block;
  color: #0d5f89;
  font-size: 1.05rem;
}

.demo-bars {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.demo-bar {
  display: grid;
  gap: 6px;
}

.demo-bar span {
  font-size: 0.79rem;
  color: #3f6179;
  font-weight: 700;
}

.demo-bar i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #17a4e5, #0e7eb7);
  width: var(--w, 0);
  animation: growBar 1.3s ease forwards;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c7dceb;
  background: #f6fbff;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: #3d6681;
}

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

.demo-heatmap span {
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: heatPulse 2.4s ease-in-out infinite;
}

.demo-heatmap .low {
  background: linear-gradient(145deg, #dff7e8, #c4f0d4);
}

.demo-heatmap .med {
  background: linear-gradient(145deg, #fff6d8, #ffe9aa);
}

.demo-heatmap .high {
  background: linear-gradient(145deg, #ffe0bc, #ffc07d);
}

.demo-heatmap .sev {
  background: linear-gradient(145deg, #ffc9c9, #ff9696);
}

.demo-heatmap span:nth-child(3n) {
  animation-delay: 0.35s;
}

.demo-heatmap span:nth-child(4n) {
  animation-delay: 0.7s;
}

.demo-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.demo-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d9e9f4;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.demo-file-list b {
  font-size: 0.83rem;
  color: #184660;
}

.demo-file-list small {
  color: #567488;
  font-size: 0.74rem;
  white-space: nowrap;
}

@keyframes previewSweep {
  0% {
    transform: translateX(-68%) rotate(6deg);
  }
  50% {
    transform: translateX(76%) rotate(6deg);
  }
  100% {
    transform: translateX(76%) rotate(6deg);
  }
}

@keyframes shotFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes growBar {
  from {
    width: 0;
  }
  to {
    width: var(--w, 0);
  }
}

@keyframes heatPulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(0.96);
    filter: saturate(1.15);
  }
}

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

.logo-chip {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbff 100%);
  padding: 12px;
  text-align: center;
}

.logo-chip img {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.logo-chip h3 {
  margin: 0;
  font-size: 0.92rem;
}

.logo-chip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.question-cloud {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.question-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c5dff0;
  border-radius: 999px;
  background: #f7fcff;
  padding: 8px 12px;
  color: #0d3854;
  font-size: 0.9rem;
  line-height: 1.4;
}

.mini-grid,
.tech-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

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

.mini-grid article {
  background: #f8fcff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.why-section {
  padding-top: 8px;
}

.why-band {
  position: relative;
  overflow: hidden;
  border: 1px solid #b7dff2;
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 192, 243, 0.18), transparent 46%),
    radial-gradient(circle at 86% 22%, rgba(0, 125, 183, 0.14), transparent 44%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(233, 247, 255, 0.92));
  box-shadow: 0 16px 38px rgba(10, 56, 86, 0.12);
  padding: 26px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: start;
}

.why-band::after {
  content: "";
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.18), transparent 55%),
    repeating-linear-gradient(
      135deg,
      rgba(0, 125, 183, 0.08) 0px,
      rgba(0, 125, 183, 0.08) 1px,
      transparent 1px,
      transparent 16px
    );
  opacity: 0.22;
  pointer-events: none;
  transform: rotate(-6deg);
}

.why-copy {
  position: relative;
  z-index: 1;
}

.why-copy h2 {
  margin: 10px 0 12px;
  max-width: 30ch;
}

.why-copy p {
  line-height: 1.5;
  max-width: 62ch;
}

.why-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 125, 183, 0.24);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(10, 56, 86, 0.08);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0b3a58;
}

.why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.why-card {
  background: rgba(248, 252, 255, 0.92);
  border: 1px solid rgba(207, 225, 239, 0.95);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 28px rgba(12, 66, 98, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 125, 183, 0.36);
  box-shadow: 0 18px 36px rgba(12, 66, 98, 0.16);
}

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 192, 243, 0.22), rgba(0, 125, 183, 0.14));
  border: 1px solid rgba(0, 125, 183, 0.2);
  color: #0a4f74;
  margin-bottom: 10px;
}

.why-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.why-card h3 {
  margin: 0 0 8px;
}

.why-card p {
  margin: 0;
  color: var(--muted);
}

.mini-grid h3,
.tech-card h3 {
  margin: 0 0 8px;
}

.mini-grid p,
.tech-card p,
.section p,
.card p,
.login-lead {
  margin: 0;
  color: var(--muted);
}

.tech-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tech-card {
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(12, 66, 98, 0.16);
}

.tech-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tech-head img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dbe8f2;
  border-radius: 10px;
  padding: 6px;
}

.tech-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
}

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

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(0, 125, 183, 0.15);
}

.btn {
  border: 0;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: var(--brand);
}

.btn-ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #c7d6e2;
}

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

.footer a {
  margin-left: 14px;
  text-decoration: none;
  color: var(--ink);
}

.cta-section {
  padding-top: 8px;
}

.cta-band {
  border: 1px solid #9ed9f3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 192, 243, 0.16), transparent 38%),
    linear-gradient(120deg, #f8fdff 0%, #e9f7ff 100%);
  padding: 30px 28px;
  box-shadow: 0 14px 30px rgba(13, 80, 117, 0.12);
}

.cta-band h2 {
  margin: 10px 0 18px;
  max-width: 24ch;
}

.cta-btn {
  margin-top: 14px;
  min-width: 210px;
  border-radius: 999px;
  font-size: 1.03rem;
  padding: 14px 22px;
  box-shadow: 0 10px 20px rgba(0, 133, 194, 0.24);
}

.flash-stack {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.flash {
  margin: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}

.flash-success {
  background: var(--ok-bg);
  border-color: #9ed9b8;
  color: var(--ok-text);
}

.flash-error {
  background: var(--err-bg);
  border-color: #ffc2ca;
  color: var(--err-text);
}

.flash-warning {
  background: #fff6db;
  border-color: #f7d98a;
  color: #6b4b00;
}

.dash-wrap {
  width: min(1240px, 94vw);
  margin: 34px auto;
}

.dash-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dash-sidebar {
  padding: 12px;
  position: sticky;
  top: 18px;
}

.dash-sidebar-title {
  margin: 2px 4px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a7286;
  font-weight: 800;
}

.dash-content {
  min-width: 0;
}

.login-wrap {
  width: min(560px, 92vw);
  margin: 52px auto;
  min-height: auto;
}

.legal-wrap {
  width: min(900px, 92vw);
  margin: 46px auto;
}

.legal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(16, 56, 83, 0.08);
  padding: 24px;
}

.legal-card ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink);
  display: grid;
  gap: 8px;
}

.legal-actions {
  margin: 10px 0 18px;
}

.back-btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
}

.login-shell {
  padding: 28px;
  width: 100%;
  display: grid;
  gap: 10px;
}

.login-shell-clean h1 {
  margin: 0;
  font-size: 1.45rem;
}

.login-brand {
  margin-bottom: 2px;
}

.login-brand img {
  height: 64px;
}

.login-lead {
  margin-bottom: 8px;
}

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

.login-links {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.login-links a {
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 700;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dash-top-compact {
  min-height: 54px;
}

.dash-brand img {
  height: 44px;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
}

.dash-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.card {
  padding: 20px;
}

.dash-menu {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  flex-wrap: wrap;
}

.dash-sidebar .dash-menu {
  margin-top: 0;
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dash-sidebar .dash-menu-link {
  width: 100%;
  justify-content: flex-start;
  position: relative;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
}

.dash-link-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #c8d9e6;
  background: #f4f9fd;
  color: #2e5977;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.dash-link-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.dash-sidebar .dash-menu-link.is-active .dash-link-icon {
  border-color: #97c7e3;
  background: #dff2fc;
  color: #0b5f8a;
}

.dash-sidebar .dash-menu-link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0f9adb, #0b77ae);
}

.dash-sidebar .dash-menu-link:hover .dash-link-icon {
  border-color: #a9cfe5;
  background: #eaf6fd;
}

.dash-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  color: #35556f;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.dash-menu-link:hover {
  background: #f2f7fb;
  border-color: #d5e3ee;
}

.dash-menu-link.is-active {
  color: var(--brand-dark);
  background: #eaf5fb;
  border-color: #bfd9ea;
  box-shadow: none;
}

.dash-cockpit-hero {
  margin-top: 14px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  border: 1px solid #cfe2ef;
  background:
    radial-gradient(circle at 14% 18%, rgba(16, 152, 214, 0.16), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(13, 97, 143, 0.12), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #eef7fd 100%);
  overflow: hidden;
}

.dash-cockpit-intro,
.dash-cockpit-focus {
  display: grid;
  gap: 14px;
  align-content: start;
}

.dash-cockpit-hero h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  line-height: 1.08;
}

.dash-cockpit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-donut-card {
  display: grid;
  gap: 18px;
  grid-template-columns: 156px minmax(0, 1fr);
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(188, 215, 231, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dash-donut {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 14px;
  box-shadow: 0 22px 36px rgba(11, 76, 111, 0.14);
}

.dash-donut-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f2f8fc);
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(193, 216, 229, 0.85);
}

.dash-donut-inner strong {
  display: block;
  font-size: 1.8rem;
  color: #0a628f;
  line-height: 1;
}

.dash-donut-inner span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #567084;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.dash-donut-copy h3 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
}

.dash-panel-label {
  margin: 0;
  color: #4d6a7f;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.dash-health-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(8, 48, 73, 0.9);
  color: #f2f8fc;
}

.dash-health-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dash-health-pill.is-green {
  background: #daf6e6;
  color: #13633b;
}

.dash-health-pill.is-amber {
  background: #fff1cc;
  color: #855b00;
}

.dash-health-pill.is-red {
  background: #ffdede;
  color: #9a2838;
}

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

.dash-gauge-panel {
  border: 1px solid #d8e7f1;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f7fbfe);
  padding: 16px 18px;
  box-shadow: 0 16px 28px rgba(16, 56, 83, 0.07);
}

.dash-gauge {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 2 / 1.2;
  margin: 10px auto 0;
}

.dash-gauge-arc {
  position: absolute;
  inset: 0;
  border-radius: 220px 220px 0 0;
  background:
    conic-gradient(from 180deg, #d94b57 0 60deg, #e8c44b 60deg 120deg, #49ae6f 120deg 180deg);
  overflow: hidden;
}

.dash-gauge-arc::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: 72%;
  transform: translateX(-50%);
  border-radius: 180px 180px 0 0;
  background: linear-gradient(180deg, #ffffff, #f4f9fc);
  box-shadow: inset 0 0 0 1px rgba(205, 222, 233, 0.95);
}

.dash-gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 86px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--needle-rotate, -90deg));
  z-index: 2;
}

.dash-gauge-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 4px;
  height: 74px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #163c55, #0a2638);
  box-shadow: 0 4px 10px rgba(11, 37, 54, 0.18);
}

.dash-gauge-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #163c55;
}

.dash-gauge-center {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 25%, #163c55 26% 100%);
  z-index: 3;
  box-shadow: 0 0 0 4px #edf5fa;
}

.dash-gauge-readout {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: grid;
  gap: 2px;
  text-align: center;
  z-index: 2;
}

.dash-gauge-readout strong {
  font-size: 1.5rem;
  line-height: 1;
  color: #0a628f;
}

.dash-gauge-readout span {
  font-size: 0.8rem;
  color: #597486;
  font-weight: 700;
}

.dash-gauge-meta {
  margin: 10px 0 0;
  color: #557184;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-cockpit-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-cockpit-card {
  border: 1px solid #d4e5f1;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.dash-cockpit-card-wide {
  grid-column: 1 / -1;
}

.dash-entry-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-entry-grid-cockpit {
  margin-top: 12px;
}

.dash-entry-card {
  display: grid;
  gap: 6px;
  border: 1px solid #d6e7f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  text-decoration: none;
  color: #22465d;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dash-entry-card strong {
  font-size: 0.94rem;
}

.dash-entry-card span {
  color: #4f697a;
  font-size: 0.85rem;
  line-height: 1.35;
}

.dash-entry-card:hover {
  transform: translateY(-2px);
  border-color: #b9d8ea;
  box-shadow: 0 10px 22px rgba(12, 66, 98, 0.12);
}

.dash-analytics-head h3 {
  margin: 0;
}

.dash-analytics-head p {
  margin-top: 6px;
}

.dash-risk-heatmap {
  margin-top: 10px;
}

.dash-bars {
  display: grid;
  gap: 10px;
}

.dash-bar-row {
  display: grid;
  gap: 8px;
}

.dash-bar-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dash-bar-copy strong {
  font-size: 0.92rem;
  color: #173f59;
}

.dash-bar-label {
  font-size: 0.84rem;
  color: #35566d;
  font-weight: 700;
}

.dash-bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e6eef5;
  overflow: hidden;
}

.dash-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}

.dash-bar-track span.is-blue {
  background: linear-gradient(90deg, #1cb0ee, #0d7db5);
}

.dash-bar-track span.is-green {
  background: linear-gradient(90deg, #6bc08d, #3aa86a);
}

.dash-bar-track span.is-yellow {
  background: linear-gradient(90deg, #f0cf73, #d3a73a);
}

.dash-bar-track span.is-orange {
  background: linear-gradient(90deg, #f2b37a, #e0872d);
}

.dash-bar-track span.is-red {
  background: linear-gradient(90deg, #ef9a9a, #cf5a5a);
}

.dash-bar-track span.is-gray {
  background: linear-gradient(90deg, #c7d0db, #98a5b3);
}

.dash-focus-list {
  display: grid;
  gap: 12px;
}

.dash-focus-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #dce9f2;
  border-radius: 16px;
  background: #f8fbfe;
}

.dash-focus-item strong {
  display: block;
  margin-bottom: 4px;
  color: #153d56;
}

.dash-focus-item p {
  margin: 0;
  color: #577183;
  font-size: 0.9rem;
  line-height: 1.45;
}

.dash-focus-index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0d7db5, #18a4e0);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(17, 102, 145, 0.18);
}

.soa-card,
.cert-card {
  margin-top: 16px;
}

.soa-split {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.soa-split .soa-card,
.soa-split .soa-chat-card {
  margin-top: 0;
}

.soa-form {
  display: grid;
  gap: 14px;
}

.soa-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.soa-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.soa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.soa-table td textarea.soa-justification {
  width: min(64ch, 100%);
  min-height: 72px;
  border: 1px solid #bdd4e6;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.soa-table td textarea.soa-justification:focus {
  outline: none;
  border-color: #7fbfe3;
  box-shadow: 0 0 0 4px rgba(0, 192, 243, 0.14);
}

.soa-table th,
.soa-table td {
  border-bottom: 1px solid #e3edf5;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.soa-table th {
  background: #f3f9ff;
  font-size: 0.9rem;
}

.message-pre {
  white-space: pre-wrap;
}

select {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.soa-chat-card {
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  padding: 16px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.08) 0%, transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
}

.soa-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.soa-chat-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.soa-chat-toggle {
  padding: 8px 12px;
  border-radius: 999px;
}

.soa-chat-title {
  margin: 0;
  font-size: 1.05rem;
}

.soa-chat-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.soa-chat-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.soa-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(12, 66, 98, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #12344d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.soa-chat-badge.is-soft {
  border-color: rgba(0, 125, 183, 0.22);
  background: rgba(232, 245, 255, 0.85);
  color: var(--brand-dark);
}

.soa-chat-log {
  height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid rgba(189, 212, 230, 0.8);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 10px;
  min-height: 0;
}

.soa-chat-msg {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(12, 66, 98, 0.12);
  line-height: 1.4;
  font-size: 0.92rem;
  box-shadow: 0 10px 20px rgba(12, 66, 98, 0.08);
}

.soa-chat-msg :where(.md-p) {
  margin: 0.4em 0;
}

.soa-chat-msg :where(.md-p:first-child) {
  margin-top: 0;
}

.soa-chat-msg :where(.md-p:last-child) {
  margin-bottom: 0;
}

.soa-chat-msg :where(.md-h) {
  margin: 0.55em 0 0.35em;
  line-height: 1.2;
}

.soa-chat-msg :where(.md-h:first-child) {
  margin-top: 0;
}

.soa-chat-msg :where(.md-h1) {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.soa-chat-msg :where(.md-h2) {
  font-size: 0.98rem;
}

.soa-chat-msg :where(.md-h3) {
  font-size: 0.94rem;
}

.soa-chat-msg :where(.md-h4) {
  font-size: 0.92rem;
  opacity: 0.92;
}

.soa-chat-msg :where(.md-ul, .md-ol) {
  margin: 0.35em 0 0.35em 1.15em;
  padding: 0;
}

.soa-chat-msg :where(.md-ul li, .md-ol li) {
  margin: 0.15em 0;
}

.soa-chat-msg :where(.md-pre) {
  margin: 0.45em 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(12, 66, 98, 0.14);
  background: rgba(7, 52, 82, 0.04);
  overflow: auto;
  white-space: pre;
  font-size: 0.86em;
}

.soa-chat-msg :where(.md-pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.soa-chat-msg.is-typing {
  font-style: italic;
  opacity: 0.86;
}

.soa-chat-msg.is-typing .typing-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.soa-chat-msg.is-typing .typing-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.22;
  animation: typingDot 1s infinite ease-in-out;
}

.soa-chat-msg.is-typing .typing-dots .dot:nth-child(2) {
  animation-delay: 0.15s;
}

.soa-chat-msg.is-typing .typing-dots .dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingDot {
  0%,
  70%,
  100% {
    opacity: 0.22;
    transform: translate3d(0, 0, 0);
  }
  35% {
    opacity: 0.85;
    transform: translate3d(0, -2px, 0);
  }
}

.soa-chat-msg.is-user {
  justify-self: end;
  background: linear-gradient(140deg, rgba(0, 192, 243, 0.12), rgba(0, 125, 183, 0.06));
  border-color: rgba(0, 125, 183, 0.22);
}

.soa-chat-msg.is-assistant {
  justify-self: start;
  background: #ffffff;
}

.soa-chat-msg.is-error {
  justify-self: start;
  background: rgba(255, 227, 229, 0.7);
  border-color: rgba(139, 31, 47, 0.22);
  color: var(--err-text);
}

.soa-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.soa-chat-input {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  /* Autogrow handles sizing; keep the panel layout stable on small screens. */
  resize: none;
  min-height: 54px;
  max-height: 160px;
  overflow: auto;
}

.soa-chat-input:focus {
  outline: none;
  border-color: #7fbfe3;
  box-shadow: 0 0 0 4px rgba(0, 192, 243, 0.14);
}

.soa-chat-send {
  padding: 10px 12px;
  min-height: 46px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.soa-chat-foot {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.fly-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 16px 32px rgba(7, 52, 82, 0.22);
}

.public-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 41;
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 16px 32px rgba(7, 52, 82, 0.22);
}

.public-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - 140px);
  z-index: 40;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.1) 0%, transparent 46%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
  box-shadow: 0 24px 46px rgba(7, 52, 82, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.public-chat-panel.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.public-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.public-chat-title {
  margin: 0;
  font-size: 1rem;
}

.public-chat-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
}

.public-chat-log {
  height: auto;
  min-height: 0;
}

.fly-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 140px);
  z-index: 44;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.1) 0%, transparent 46%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
  box-shadow: 0 24px 46px rgba(7, 52, 82, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.fly-chat-panel.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.fly-chat-panel.is-fullscreen {
  right: 12px;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: auto;
  max-height: none;
  border-radius: 16px;
}

.fly-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fly-chat-title {
  margin: 0;
  font-size: 1.05rem;
}

.fly-chat-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.fly-chat-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fly-chat-log {
  height: auto;
  min-height: 0;
}

.fly-chat-form .fly-chat-send {
  min-height: 46px;
}

@media (max-width: 640px) {
  .fly-chat-panel.is-fullscreen {
    right: 8px;
    left: 8px;
    top: 8px;
    bottom: 8px;
    border-radius: 12px;
  }
}

.soa-chat-card.is-collapsed .soa-chat-log,
.soa-chat-card.is-collapsed .soa-chat-form,
.soa-chat-card.is-collapsed .soa-chat-foot,
.soa-chat-card.is-collapsed .soa-chat-sub,
.soa-chat-card.is-collapsed .soa-chat-badges {
  display: none;
}

.soa-chat-card.is-collapsed {
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.08) 0%, transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.92));
}

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

.status-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d4e1ec;
  background: #e9f0f6;
  flex: 0 0 auto;
}

.status-light-red {
  background: #d74646;
  border-color: #b92f2f;
  box-shadow: 0 0 0 3px rgba(215, 70, 70, 0.18);
}

.status-light-yellow {
  background: #e3ad22;
  border-color: #c59214;
  box-shadow: 0 0 0 3px rgba(227, 173, 34, 0.2);
}

.status-light-green {
  background: #1f9e52;
  border-color: #198444;
  box-shadow: 0 0 0 3px rgba(31, 158, 82, 0.2);
}

.status-light-gray {
  background: #6b7280;
  border-color: #4b5563;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.18);
}

.status-select-red {
  border-color: #d87373;
  background: #fff7f7;
}

.status-select-yellow {
  border-color: #e2bf67;
  background: #fffbf0;
}

.status-select-green {
  border-color: #6bbc8b;
  background: #f4fff8;
}

.status-select-gray {
  border-color: #aab0bb;
  background: #f7f8fa;
}

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

.cert-list {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e3edf5;
}

.cert-row:last-child {
  border-bottom: 0;
}

.cert-date {
  white-space: nowrap;
}

.cert-status {
  white-space: nowrap;
}

.cert-row form {
  margin-left: auto;
}

.cert-list a {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 760px) {
  .cert-row {
    flex-wrap: wrap;
  }

  .cert-row form {
    margin-left: 0;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-info-grid {
    grid-template-columns: 1fr;
  }
}

.cert-hint {
  margin-top: 8px;
}

.risk-card {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  background: #fff;
}

.risk-subhead {
  margin-top: 6px;
}

.risk-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-import-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-import-input {
  max-width: 230px;
  padding: 10px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.95);
}

.risk-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.risk-form {
  display: grid;
  gap: 14px;
}

.risk-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-kpi-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.risk-kpi-label {
  margin: 0;
  font-size: 0.86rem;
  color: #3a5e78;
}

.risk-kpi-value {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 800;
  color: #0a5f89;
}

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

.risk-heatmap-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.risk-heat-head {
  margin-bottom: 10px;
}

.risk-heat-head h3 {
  margin: 0;
}

.risk-heat-head p {
  margin-top: 6px;
}

.risk-heatmap-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.risk-heat-cell {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  display: grid;
  place-items: center;
  color: #18364c;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.risk-heat-cell.is-low {
  background: linear-gradient(140deg, #dff8e8, #bbf0cc);
}

.risk-heat-cell.is-medium {
  background: linear-gradient(140deg, #fff7d9, #ffe8a6);
}

.risk-heat-cell.is-high {
  background: linear-gradient(140deg, #ffd8b2, #ffb870);
}

.risk-heat-cell.is-severe {
  background: linear-gradient(140deg, #ffc1bf, #ff8f8f);
}

.risk-heat-cell span {
  opacity: 0.38;
}

.risk-heat-cell.is-populated {
  border-color: rgba(12, 66, 98, 0.38);
}

.risk-heat-cell.is-populated span {
  opacity: 1;
}

.risk-axis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.risk-axis span {
  text-align: center;
  font-size: 0.78rem;
  color: #40657e;
  font-weight: 700;
}

.risk-axis-label {
  margin-top: 8px;
  font-size: 0.82rem;
}

.risk-scale-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-scale-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.risk-scale-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.risk-scale-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.risk-scale-card li {
  color: #2f5067;
  font-size: 0.86rem;
}

.risk-table {
  min-width: 1320px;
}

.risk-filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr) auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.risk-filter-field label {
  margin-bottom: 4px;
}

.risk-filter-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.risk-filter-count {
  margin: 0;
  font-size: 0.85rem;
}

.risk-row td {
  vertical-align: top;
}

.risk-row.is-filtered-out {
  display: none;
}

.risk-row input[type="text"] {
  margin-bottom: 8px;
}

.risk-owner-input {
  margin-bottom: 0;
}

.risk-row textarea {
  min-height: 70px;
  resize: vertical;
}

.risk-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.risk-score-badge {
  margin: 0;
  min-width: 50px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1;
}

.risk-score-badge.is-low {
  background: #dff8e8;
  border-color: #93d9ad;
  color: #0d5d37;
}

.risk-score-badge.is-medium {
  background: #fff6d5;
  border-color: #e4c468;
  color: #7a5300;
}

.risk-score-badge.is-high {
  background: #ffe1c4;
  border-color: #f2a45d;
  color: #844405;
}

.risk-score-badge.is-severe {
  background: #ffd0d0;
  border-color: #f08f8f;
  color: #8f1f2f;
}

.risk-trend {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 800;
}

.risk-trend.is-improved {
  background: #dff8e8;
  border-color: #93d9ad;
  color: #0d5d37;
}

.risk-trend.is-worse {
  background: #ffd0d0;
  border-color: #f08f8f;
  color: #8f1f2f;
}

.risk-trend.is-stable {
  background: #ebf3f9;
  border-color: #c1d7e8;
  color: #33566f;
}

.risk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-choice {
  margin-top: 16px;
}

.admin-card {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.admin-stat h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.admin-stat-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-dark);
}

.admin-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-info-card {
  padding: 14px;
}

.admin-info-card h3 {
  margin: 0 0 6px;
}

.admin-info-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.qdrant-admin-grid {
  margin: 14px 0 8px;
}

.qdrant-admin-card {
  min-height: 100%;
}

.qdrant-sample-list {
  display: grid;
  gap: 10px;
}

.qdrant-sample-item {
  border: 1px solid #e3edf5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.qdrant-sample-item p {
  margin: 0;
}

.qdrant-sample-item p + p {
  margin-top: 4px;
}

.admin-table-wrap {
  max-height: 420px;
}

.admin-table {
  min-width: 1100px;
}

.admin-log-card {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-log-card h4 {
  margin: 8px 0 2px;
}

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

.admin-history-item {
  border: 1px solid #e3edf5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

@media (max-width: 760px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: static;
  }

  .dash-sidebar .dash-menu {
    display: flex;
    flex-wrap: wrap;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .dash-cockpit-hero {
    grid-template-columns: 1fr;
  }

  .dash-donut-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .dash-cockpit-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .dash-entry-grid {
    grid-template-columns: 1fr;
  }

  .dash-cockpit-grid {
    grid-template-columns: 1fr;
  }

  .risk-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .risk-heatmaps {
    grid-template-columns: 1fr;
  }

  .risk-scale-guide {
    grid-template-columns: 1fr;
  }

  .risk-meta {
    justify-items: start;
  }

  .risk-filter-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .risk-filter-actions {
    justify-items: start;
  }
}

.dashboard-welcome {
  margin: 16px 4px 0;
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.55s ease var(--reveal-delay, 0s),
    transform 0.55s ease var(--reveal-delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 920px) {
  .dash-cockpit-kpis,
  .dash-cockpit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .tech-grid,
  .dash-grid,
  .soa-meta,
  .mini-grid,
  .form-grid,
  .duo-grid,
  .feature-grid,
  .quick-grid,
  .quick-grid.is-tight {
    grid-template-columns: 1fr;
  }

  .process-visual {
    grid-template-columns: 1fr 1fr;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .hero-graphics {
    grid-template-columns: 1fr;
  }

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

  .demo-shot-grid {
    grid-template-columns: 1fr;
  }

  .demo-kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .soa-split {
    grid-template-columns: 1fr;
  }

  .login-wrap {
    width: min(560px, 92vw);
    margin: 28px auto;
  }

  .soa-chat-card {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(207, 225, 239, 0.95);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 38px rgba(12, 66, 98, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-wrap.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.9);
    border: 1px solid rgba(207, 225, 239, 0.9);
    font-weight: 800;
  }

  .site-nav a:active {
    transform: scale(0.99);
  }

  .site-nav .nav-btn {
    text-align: center;
    border: 0;
  }

  .why-band {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 72px 0 44px;
  }

  /* On mobile, shift the crop a bit upward so the most interesting video area remains visible. */
  .hero-video {
    object-position: 50% 30%;
  }

  /* Increase contrast for text on small screens. */
  .hero-video-wrap {
    opacity: 0.82;
  }

  .hero-video-overlay {
    background:
      linear-gradient(180deg, rgba(243, 249, 255, 0.55) 0%, rgba(243, 249, 255, 0.9) 80%),
      radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16) 0%, transparent 42%);
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-video-wrap {
    opacity: 0.35;
    transform: none;
  }

  .dashboard-preview-band::after,
  .demo-shot-main,
  .demo-bar i,
  .demo-heatmap span {
    animation: none;
  }
}


.control-title {
  display: inline-block;
  margin-top: 4px;
}

.control-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-xs {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.error-body {
  min-height: 100vh;
}

.error-shell {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 36px 0 52px;
}

.error-stage {
  width: 100%;
}

.error-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.error-panel,
.error-visual,
.error-tip-card,
.error-signal-card {
  border: 1px solid rgba(205, 223, 236, 0.95);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 255, 0.9));
  box-shadow: 0 18px 44px rgba(11, 66, 98, 0.1);
}

.error-panel,
.error-visual {
  border-radius: 28px;
}

.error-panel {
  padding: 34px;
}

.error-code-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 18px;
  margin: 8px 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 152, 214, 0.18), rgba(10, 117, 170, 0.12));
  color: #0b587f;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.error-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.error-tip-grid {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.error-tip-card {
  border-radius: 18px;
  padding: 16px;
}

.error-tip-card p {
  margin: 10px 0 0;
  color: #36566d;
}

.error-tip-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0a78ae;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(155, 205, 231, 0.95);
}

.error-visual {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 192, 243, 0.14) 0%, transparent 30%),
    radial-gradient(circle at 78% 24%, rgba(66, 191, 255, 0.12) 0%, transparent 28%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(230, 246, 255, 0.96));
}

.error-core {
  position: relative;
  z-index: 2;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 36%, rgba(16, 152, 214, 0.18) 100%),
    linear-gradient(135deg, #dff6ff, #a8e3fb);
  box-shadow:
    0 22px 56px rgba(7, 73, 108, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.error-core span {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0a5f8c;
}

.error-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(81, 170, 214, 0.24);
}

.error-orbit-a {
  width: 320px;
  height: 320px;
}

.error-orbit-b {
  width: 420px;
  height: 420px;
  border-style: dashed;
}

.error-signal-card {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  max-width: 220px;
  border-radius: 18px;
  padding: 14px 16px;
}

.error-signal-card strong,
.error-signal-card small {
  display: block;
}

.error-signal-card strong {
  margin-bottom: 4px;
  color: #184b69;
}

.error-signal-card small {
  color: #527089;
  word-break: break-word;
}

.control-desc {
  margin: 8px 0 0;
  color: #31516a;
  font-size: 0.86rem;
  line-height: 1.35;
  max-width: 62ch;
}

.control-chat-row td {
  background: rgba(248, 252, 255, 0.8);
}

.control-chat-card {
  margin: 10px 0;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 192, 243, 0.08) 0%, transparent 44%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.86));
  border: 1px solid rgba(207, 225, 239, 0.95);
}

.control-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.control-chat-title {
  margin: 0;
  font-size: 0.98rem;
}

.control-chat-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.control-chat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-chat-log {
  height: min(34vh, 320px);
}


.soa-version-bar {
  margin: 10px 0 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.version-switch {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

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

.soa-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.soa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.soa-row-na td:first-child strong,
.soa-row-na td:first-child .control-title,
.soa-row-na td:first-child .control-desc {
  text-decoration: line-through;
  opacity: 0.65;
}

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(460px, calc(100vw - 28px));
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #b9d6ea;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 255, 0.96));
  box-shadow: 0 20px 38px rgba(7, 52, 82, 0.2);
  backdrop-filter: blur(12px);
  z-index: 40;
}

.cookie-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.cookie-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e9f6ff;
  color: #0f5d87;
  flex: 0 0 auto;
}

.cookie-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.cookie-copy {
  margin: 0;
  color: #35556f;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cookie-copy a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.cookie-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 10px 14px;
}

.cookie-manage {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #9cc4df;
  border-radius: 999px;
  padding: 8px;
  background: #ffffffde;
  color: #12344d;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12, 66, 98, 0.16);
  backdrop-filter: blur(8px);
  z-index: 35;
}

.cookie-manage .cookie-icon {
  width: 18px;
  height: 18px;
}

.cookie-manage .cookie-icon svg {
  width: 12px;
  height: 12px;
}

.cookie-manage:hover {
  background: #ffffff;
}

@media (max-width: 920px) {
  .error-grid {
    grid-template-columns: 1fr;
  }

  .error-visual {
    min-height: 320px;
  }

  .cookie-banner,
  .cookie-manage {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 760px) {
  .error-panel {
    padding: 24px;
  }

  .error-tip-grid {
    grid-template-columns: 1fr;
  }

  .error-core {
    width: 180px;
    height: 180px;
  }
}

/* Bootstrap-aligned theme layer for RoboBot */
.robobot-app {
  --bs-primary: #1098d6;
  --bs-primary-rgb: 16, 152, 214;
  --bs-secondary-color: #5b6c7d;
  background:
    radial-gradient(circle at 6% 2%, rgba(16, 152, 214, 0.08), transparent 26%),
    radial-gradient(circle at 95% 0%, rgba(122, 198, 242, 0.15), transparent 30%),
    linear-gradient(180deg, #f3f8fc 0%, #f8fbff 100%);
}

.robobot-app .card {
  border-radius: 14px;
}

.robobot-app .btn {
  transition: transform 0.14s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.robobot-app .btn-primary {
  background: linear-gradient(135deg, #18a8e8 0%, #0e86c0 100%);
  border-color: #0e86c0;
  box-shadow: 0 8px 18px rgba(14, 134, 192, 0.22);
}

.robobot-app .btn-outline-secondary {
  border-color: #c6d5e2;
  color: #28465f;
}

.robobot-app .form-control,
.robobot-app .form-select {
  border-color: #bdd4e6;
  border-radius: 12px;
}

.robobot-app .form-control:focus,
.robobot-app .form-select:focus {
  border-color: #0d89c4;
  box-shadow: 0 0 0 0.22rem rgba(13, 137, 196, 0.2);
}

.robobot-app .nav-link {
  border-radius: 10px;
}

/* ─── Login polish ─────────────────────────────────────────────────────────── */
.login-field {
  display: grid;
  gap: 5px;
}

.login-submit {
  margin-top: 4px;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(14, 134, 192, 0.22);
  transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(14, 134, 192, 0.3);
}

/* ─── Skip-to-content (accessibility) ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
}

/* ─── Focus-visible: keyboard only ────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Suppress focus ring for mouse users inside form controls */
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Button active-press effect ───────────────────────────────────────────── */
.btn:active {
  transform: translateY(1px) scale(0.985);
  transition-duration: 0.08s;
}

/* ─── Smooth scrolling ─────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

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

/* ─── Dark mode ────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1620;
    --ink: #e2eaf3;
    --muted: #8ca5bc;
    --line: #253347;
    --card: #17222f;
    --brand: #1fa8e0;
    --brand-dark: #3fbef0;
    --ok-bg: #0b2e1c;
    --ok-text: #6ee09b;
    --err-bg: #2b0f14;
    --err-text: #f08b9a;
    --nav-h: 72px;
  }

  body {
    background: var(--bg);
    color: var(--ink);
  }

  .robobot-app {
    background:
      radial-gradient(circle at 6% 2%, rgba(16, 152, 214, 0.06), transparent 26%),
      radial-gradient(circle at 95% 0%, rgba(32, 100, 145, 0.1), transparent 30%),
      linear-gradient(180deg, #0f1620 0%, #111b28 100%);
  }

  /* Nav */
  .nav-wrap {
    background: rgba(15, 22, 32, 0.92);
    border-bottom-color: #1d2d3f;
  }

  .nav-wrap.scrolled {
    background: rgba(15, 22, 32, 0.97);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }

  .site-nav {
    background: rgba(18, 28, 40, 0.98) !important;
    border-color: rgba(37, 51, 71, 0.95) !important;
  }

  .site-nav a {
    background: rgba(22, 34, 50, 0.9) !important;
    border-color: rgba(40, 58, 80, 0.9) !important;
    color: var(--ink) !important;
  }

  /* Cards */
  .hero-card,
  .section-card,
  .tech-card,
  .card,
  .login-shell,
  .why-card,
  .dash-gauge-panel,
  .dash-cockpit-card,
  .risk-kpi-card,
  .risk-heatmap-card,
  .risk-scale-card,
  .admin-stat,
  .admin-info-card,
  .qdrant-sample-item,
  .admin-history-item,
  .dash-donut-card,
  .signal-card,
  .process-step,
  .feature-card,
  .quick-item,
  .cert-form {
    background: var(--card);
    border-color: var(--line);
  }

  .why-band {
    background:
      radial-gradient(circle at 10% 10%, rgba(0, 140, 200, 0.12), transparent 46%),
      radial-gradient(circle at 86% 22%, rgba(0, 80, 140, 0.1), transparent 44%),
      linear-gradient(120deg, #17222f, #1a2a3c);
    border-color: #1e3045;
  }

  .why-card {
    background: rgba(20, 32, 46, 0.92);
    border-color: rgba(37, 58, 80, 0.95);
  }

  .soa-chat-card,
  .fly-chat-panel,
  .public-chat-panel,
  .control-chat-card {
    background:
      radial-gradient(circle at 20% 20%, rgba(0, 140, 200, 0.06) 0%, transparent 46%),
      linear-gradient(140deg, rgba(20, 30, 44, 0.98), rgba(16, 28, 42, 0.9));
    border-color: rgba(37, 58, 80, 0.95);
  }

  .soa-chat-log {
    background: rgba(15, 22, 32, 0.92);
    border-color: rgba(37, 58, 80, 0.8);
  }

  .soa-chat-msg.is-assistant {
    background: var(--card);
    border-color: var(--line);
    color: var(--ink);
  }

  .soa-chat-msg.is-user {
    background: linear-gradient(140deg, rgba(0, 140, 200, 0.18), rgba(0, 80, 140, 0.12));
    border-color: rgba(0, 100, 170, 0.3);
  }

  /* Forms */
  input,
  textarea,
  select {
    background: #1a2738;
    border-color: #2c3f55;
    color: var(--ink);
  }

  input::placeholder,
  textarea::placeholder {
    color: #5a7590;
  }

  input:focus,
  textarea:focus,
  select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31, 168, 224, 0.15);
  }

  .soa-chat-input {
    background: rgba(18, 28, 42, 0.96);
    border-color: #2c3f55;
  }

  .soa-table td textarea.soa-justification {
    background: #1a2738;
    border-color: #2c3f55;
    color: var(--ink);
  }

  /* Status selects */
  .status-select-red { background: #2b1515; border-color: #7a3333; }
  .status-select-yellow { background: #25200e; border-color: #6b5520; }
  .status-select-green { background: #0e2018; border-color: #2a6640; }
  .status-select-gray { background: #1a2230; border-color: #3a4d62; }

  /* Buttons */
  .btn-ghost {
    background: #1a2738;
    color: var(--ink);
    border-color: #2c3f55;
  }

  .btn-ghost:hover {
    background: #1e2f42;
  }

  .robobot-app .btn-outline-secondary {
    border-color: #2c3f55;
    color: var(--muted);
  }

  /* Flashes */
  .flash-warning {
    background: #25200e;
    border-color: #6b5520;
    color: #d4b56e;
  }

  /* Table */
  .soa-table-wrap {
    background: var(--card);
    border-color: var(--line);
  }

  .soa-table th {
    background: #1a2738;
    color: var(--muted);
  }

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

  /* Dashboard sidebar */
  .dash-sidebar {
    background: var(--card);
    border-color: var(--line);
  }

  .dash-link-icon {
    background: #1e2d3e;
    border-color: #2c3f55;
    color: #7ba8c4;
  }

  .dash-menu-link:hover {
    background: #1a2738;
    border-color: #2c3f55;
  }

  .dash-menu-link.is-active {
    background: #0e2335;
    border-color: #1e4060;
    color: var(--brand-dark);
  }

  .dash-sidebar .dash-menu-link.is-active .dash-link-icon {
    background: #0d2a42;
    border-color: #1e5070;
    color: var(--brand-dark);
  }

  /* Dashboard hero */
  .dash-cockpit-hero {
    background:
      radial-gradient(circle at 14% 18%, rgba(16, 100, 160, 0.14), transparent 34%),
      radial-gradient(circle at 88% 12%, rgba(10, 60, 100, 0.1), transparent 28%),
      linear-gradient(145deg, #17222f 0%, #121e2c 100%);
    border-color: var(--line);
  }

  .dash-health-strip {
    background: rgba(8, 18, 30, 0.95);
  }

  .dash-donut-inner {
    background: linear-gradient(145deg, #17222f, #1a2738);
    box-shadow: inset 0 0 0 1px rgba(40, 65, 90, 0.85);
  }

  /* Dashboard gauge */
  .dash-gauge-panel {
    background: linear-gradient(180deg, #17222f, #14202c);
  }

  .dash-gauge-arc::after {
    background: linear-gradient(180deg, #17222f, #14202c);
    box-shadow: inset 0 0 0 1px rgba(40, 65, 90, 0.95);
  }

  .dash-gauge-needle::before {
    background: linear-gradient(180deg, #a0bccc, #c8dce8);
  }

  .dash-gauge-needle::after {
    border-bottom-color: #a0bccc;
  }

  .dash-gauge-center {
    background: radial-gradient(circle, #17222f 0 25%, #a0bccc 26% 100%);
    box-shadow: 0 0 0 4px #1a2738;
  }

  /* Entry cards */
  .dash-entry-card {
    background: var(--card);
    border-color: var(--line);
    color: #a8c2d8;
  }

  .dash-entry-card:hover {
    border-color: #2d5070;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  }

  /* Donut */
  .dash-donut {
    box-shadow: 0 22px 36px rgba(0, 0, 0, 0.3);
  }

  /* Role pill */
  .role {
    background: #1a2738;
    border-color: var(--line);
  }

  /* Cert rows */
  .cert-row {
    border-bottom-color: var(--line);
  }

  /* Risk heatmap */
  .risk-heat-cell.is-low { background: linear-gradient(140deg, #0d2a18, #0a2015); }
  .risk-heat-cell.is-medium { background: linear-gradient(140deg, #2a2008, #1f1805); }
  .risk-heat-cell.is-high { background: linear-gradient(140deg, #2a1a08, #201405); }
  .risk-heat-cell.is-severe { background: linear-gradient(140deg, #2a0808, #1e0505); }

  /* Score badges */
  .risk-score-badge.is-low { background: #0d2a18; border-color: #1a5030; color: #6ee09b; }
  .risk-score-badge.is-medium { background: #2a2008; border-color: #5a4410; color: #d4b56e; }
  .risk-score-badge.is-high { background: #2a1a08; border-color: #7a4010; color: #e09060; }
  .risk-score-badge.is-severe { background: #2a0808; border-color: #8a2020; color: #f08b9a; }

  .risk-trend.is-improved { background: #0d2a18; border-color: #1a5030; color: #6ee09b; }
  .risk-trend.is-worse { background: #2a0808; border-color: #8a2020; color: #f08b9a; }
  .risk-trend.is-stable { background: #14202c; border-color: #2c3f55; color: var(--muted); }

  /* Filter bar */
  .risk-filter-bar { background: var(--card); border-color: var(--line); }

  /* Error page */
  .error-panel,
  .error-tip-card,
  .error-signal-card {
    background: linear-gradient(160deg, #17222f, #14202c);
    border-color: var(--line);
  }

  .error-visual {
    background:
      radial-gradient(circle at 20% 18%, rgba(0, 120, 180, 0.12) 0%, transparent 30%),
      radial-gradient(circle at 78% 24%, rgba(40, 120, 180, 0.1) 0%, transparent 28%),
      linear-gradient(180deg, #17222f, #111c2c);
  }

  .error-core {
    background:
      radial-gradient(circle at 35% 30%, rgba(22, 38, 55, 0.95), rgba(22, 38, 55, 0.18) 36%, rgba(16, 100, 160, 0.18) 100%),
      linear-gradient(135deg, #1a2e42, #0e2234);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.4),
      inset 0 0 0 1px rgba(40, 80, 110, 0.55);
  }

  .error-core span { color: #5ab8e0; }

  /* Cookie banner */
  .cookie-banner {
    background: linear-gradient(140deg, rgba(18, 28, 42, 0.96), rgba(14, 24, 36, 0.96));
    border-color: #1e3045;
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.45);
  }

  .cookie-copy { color: #7ba8c4; }
  .cookie-copy a { color: var(--brand-dark); }

  .cookie-manage {
    background: rgba(18, 28, 42, 0.9);
    border-color: #2c3f55;
    color: var(--ink);
  }

  .cookie-manage:hover { background: #1a2738; }

  .cookie-icon {
    background: #152235;
    color: var(--brand-dark);
  }

  /* Hero bg blobs */
  .bg-a { background: #003a5c; opacity: 0.08; }
  .bg-b { background: #00284a; opacity: 0.08; }

  /* Demo shot */
  .demo-shot {
    background: linear-gradient(160deg, #17222f, #121e2c);
    border-color: #1e3045;
  }

  .demo-shot-head {
    background: rgba(14, 22, 34, 0.9);
    border-bottom-color: #1e3045;
    color: #7ba8c4;
  }

  .demo-kpi-row div {
    background: #17222f;
    border-color: #1e3045;
  }

  .demo-kpi-row p { color: #5a7590; }
  .demo-kpi-row strong { color: #4ab4e0; }

  /* Misc */
  .logo-chip {
    background: linear-gradient(135deg, #17222f 0%, #14202c 100%);
    border-color: var(--line);
  }

  .soa-table-wrap .soa-table th { color: var(--muted); }

  .flash-success { background: var(--ok-bg); border-color: #1a5030; color: var(--ok-text); }
  .flash-error { background: var(--err-bg); border-color: #7a2030; color: var(--err-text); }

  /* Bootstrap overrides for dark mode */
  .robobot-app .btn-primary {
    background: linear-gradient(135deg, #1594cc 0%, #0d70a8 100%);
    border-color: #0d70a8;
    box-shadow: 0 8px 18px rgba(14, 100, 160, 0.3);
  }

  .robobot-app .form-control,
  .robobot-app .form-select {
    background-color: #1a2738;
    border-color: #2c3f55;
    color: var(--ink);
  }

  .robobot-app .form-control:focus,
  .robobot-app .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.22rem rgba(31, 168, 224, 0.2);
    background-color: #1a2738;
    color: var(--ink);
  }

  .robobot-app .card {
    background: var(--card);
    border-color: var(--line);
  }

  .robobot-app .btn-outline-secondary {
    border-color: #2c3f55;
    color: var(--muted);
  }

  .robobot-app .btn-outline-secondary:hover {
    background: #1a2738;
    color: var(--ink);
  }
}
