:root {
  --bg-1: #eef4ff;
  --bg-2: #f8fbff;
  --bg-3: #eaf1ff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --border: rgba(131, 164, 222, 0.28);
  --border-strong: rgba(109, 149, 223, 0.45);
  --text: #203256;
  --muted: #6581ad;
  --accent: #5e95ff;
  --accent-2: #74dfff;
  --accent-3: #8c7bff;
  --good: #1dbb8a;
  --warn: #ffb648;
  --danger: #ff6a8d;
  --shadow: 0 26px 70px rgba(112, 143, 196, 0.24);
  --shadow-soft: 0 12px 35px rgba(123, 152, 211, 0.14);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(50vw 50vw at 10% 10%, rgba(118, 200, 255, 0.45), transparent 65%),
    radial-gradient(40vw 40vw at 90% 18%, rgba(126, 153, 255, 0.28), transparent 68%),
    radial-gradient(50vw 50vw at 50% 100%, rgba(255, 255, 255, 0.95), transparent 72%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

body.auth-page {
  display: grid;
  place-items: center;
  padding: 28px;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 18% 24%, #000 0.7px, transparent 1px),
    radial-gradient(circle at 80% 50%, #000 0.6px, transparent 1px),
    radial-gradient(circle at 42% 80%, #000 0.6px, transparent 1px);
  background-size: 150px 150px, 220px 220px, 180px 180px;
  z-index: 1;
}

.aurora {
  position: fixed;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 180ms linear;
}

.aurora.a1 {
  top: -10vw;
  left: -8vw;
  background: radial-gradient(circle, rgba(115, 194, 255, 0.34), rgba(115, 194, 255, 0.08) 60%, transparent 80%);
}

.aurora.a2 {
  right: -12vw;
  top: 12vh;
  background: radial-gradient(circle, rgba(135, 150, 255, 0.25), rgba(135, 150, 255, 0.06) 58%, transparent 80%);
}

.aurora.a3 {
  left: 30vw;
  bottom: -18vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(176, 215, 255, 0.18) 54%, transparent 82%);
}

.glass {
  background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-shell {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 18px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 24px;
  padding: 16px 18px;
  position: sticky;
  top: 14px;
  z-index: 5;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), transparent 40%),
    radial-gradient(circle at 75% 75%, #7ad8ff, #6990ff 58%, #515fff);
  box-shadow: 0 14px 30px rgba(89, 133, 247, 0.28);
}

.brand-title {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
}

.brand-subtitle,
.muted {
  margin: 2px 0 0;
  color: var(--muted);
}

.topbar-actions,
.nav-pills,
.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip,
.nav-link,
.soft-btn,
.primary-btn,
.ghost-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: 180ms ease;
  cursor: pointer;
}

.chip,
.nav-link,
.soft-btn,
.ghost-btn {
  padding: 10px 14px;
  color: #44628f;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(117, 152, 213, 0.24);
  box-shadow: var(--shadow-soft);
}

.primary-btn {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent) 58%, var(--accent-3));
  box-shadow: 0 14px 28px rgba(82, 129, 227, 0.28);
}

.chip:hover,
.nav-link:hover,
.soft-btn:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
}

.nav-link.active {
  color: #21406d;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(228, 240, 255, 0.88));
  border-color: var(--border-strong);
}

.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  margin-top: 20px;
}

.sidebar {
  border-radius: var(--radius-xl);
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.sidebar h2,
.panel h2,
.panel h3,
.hero-card h2 {
  margin: 0;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sidebar-nav a {
  display: block;
  border-radius: 18px;
  padding: 14px 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(121, 156, 218, 0.18);
}

.sidebar-nav a.active {
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(231, 242, 255, 0.86));
  border-color: var(--border-strong);
}

.sidebar-nav strong {
  display: block;
  font-size: 0.95rem;
}

.sidebar-nav span {
  display: block;
  margin-top: 5px;
  font-size: 0.84rem;
  color: var(--muted);
}

.content {
  display: grid;
  gap: 20px;
}

.hero-card,
.panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #466897;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(112, 149, 214, 0.24);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--good), #3bd9b3);
  box-shadow: 0 0 0 6px rgba(29, 187, 138, 0.12);
}

.hero-title {
  margin-top: 14px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.6;
  margin: 14px 0 0;
}

.hero-note {
  border-radius: var(--radius-lg);
  padding: 16px;
  background: rgba(255,255,255,0.48);
  border: 1px solid rgba(112, 150, 214, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.44);
}

.hero-note strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #33507d;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.hero-note p {
  margin: 0;
  color: #53709d;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.kpi-card,
.mini-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(127, 164, 226, 0.22);
  box-shadow: var(--shadow-soft);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.kpi-caption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.placeholder-list,
.status-list {
  display: grid;
  gap: 12px;
}

.placeholder-item,
.status-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(124, 161, 224, 0.2);
}

.status-item strong,
.placeholder-item strong {
  display: block;
}

.status-item p,
.placeholder-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(116, 152, 214, 0.2);
}

.tag.good { color: #196e54; }
.tag.warn { color: #8a5806; }
.tag.danger { color: #99334f; }

.table-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(127, 164, 226, 0.24);
  background: rgba(255,255,255,0.56);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(126, 164, 226, 0.18);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: 0;
}

.help-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 20;
  background: rgba(224, 234, 255, 0.24);
  backdrop-filter: blur(10px);
}

.help-modal.open {
  display: grid;
}

.help-card {
  width: min(580px, 100%);
  border-radius: 28px;
  padding: 22px;
}

.help-card p {
  color: var(--muted);
  line-height: 1.6;
}

.auth-card {
  width: min(560px, 100%);
  padding: 26px;
  border-radius: 30px;
  position: relative;
  z-index: 2;
}

.auth-card input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(117, 152, 213, 0.26);
  padding: 14px 15px;
  margin-top: 8px;
  margin-bottom: 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.84);
}

.page-footer {
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
  padding: 8px 0 4px;
}

.page-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #355684;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(117, 152, 213, 0.24);
  box-shadow: var(--shadow-soft);
}

.hero-side-stack {
  display: grid;
  gap: 14px;
}

.demo-grid {
  display: grid;
  gap: 16px;
}

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

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

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

.metric-card,
.comparison-card,
.spotlight-card,
.stage-card,
.alert-item,
.attention-item,
.timeline-item,
.data-row {
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(123, 160, 221, 0.22);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  min-height: 150px;
}

.metric-card strong,
.comparison-card strong,
.spotlight-card strong,
.stage-card strong,
.alert-item strong,
.attention-item strong,
.timeline-item strong,
.data-row strong {
  display: block;
  font-size: 1rem;
}

.metric-top,
.comparison-top,
.row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-number {
  margin-top: 8px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
}

.metric-trend.up {
  color: #15694d;
}

.metric-trend.down {
  color: #95425b;
}

.metric-trend.warn {
  color: #80510a;
}

.attention-list,
.alert-list,
.timeline,
.data-list {
  display: grid;
  gap: 12px;
}

.attention-item,
.alert-item {
  display: grid;
  gap: 10px;
}

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

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.priority-dot.red {
  background: var(--danger);
  box-shadow: 0 0 0 8px rgba(255, 106, 141, 0.12);
}

.priority-dot.amber {
  background: var(--warn);
  box-shadow: 0 0 0 8px rgba(255, 182, 72, 0.12);
}

.priority-dot.green {
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(29, 187, 138, 0.12);
}

.owner-chip,
.route-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #355684;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(117, 152, 213, 0.24);
}

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

.comparison-card h3,
.spotlight-card h3,
.stage-card h3 {
  margin: 10px 0 0;
  font-size: 1.2rem;
}

.comparison-stats,
.spotlight-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.mini-metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(121, 156, 218, 0.18);
}

.mini-metric .value {
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 800;
}

.progress-block {
  margin-top: 12px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.progress-track {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(126, 164, 226, 0.16);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(140deg, var(--accent-2), var(--accent), var(--accent-3));
}

.stage-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stage-card p,
.comparison-card p,
.spotlight-card p,
.attention-item p,
.alert-item p,
.timeline-item p,
.data-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.money {
  font-variant-numeric: tabular-nums;
}

.table-wrap .table-caption {
  padding: 14px 14px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.split-note {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.split-note .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #355684;
  font-size: 0.9rem;
}

.decision-box {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(140deg, rgba(255,255,255,0.92), rgba(232, 241, 255, 0.78));
  border: 1px solid rgba(110, 148, 221, 0.24);
  box-shadow: var(--shadow-soft);
}

.decision-box h3,
.decision-box h4 {
  margin: 0;
}

.decision-box p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.selector-card {
  border-radius: 28px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(121, 156, 218, 0.22);
  box-shadow: var(--shadow-soft);
}

.selector-card h3 {
  margin: 10px 0 0;
  font-size: 1.45rem;
}

.selector-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.selector-card .inline-actions {
  margin-top: 16px;
}

.company-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(140deg, rgba(255,255,255,0.96), rgba(226, 239, 255, 0.88));
  border: 1px solid rgba(117, 152, 213, 0.24);
  color: #24416d;
}

.company-mark.so {
  color: #1c4674;
}

.company-mark.un {
  color: #3c4c1f;
  background: linear-gradient(140deg, rgba(255,255,255,0.96), rgba(236, 247, 224, 0.92));
}

.mini-note {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 8px;
}

.table-emphasis {
  font-weight: 700;
  color: #203256;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px dashed rgba(117, 152, 213, 0.4);
  color: var(--muted);
}

.topbar .chip.demo {
  color: #21406d;
  background: linear-gradient(140deg, rgba(255,255,255,0.94), rgba(232, 242, 255, 0.86));
}

.appear {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  animation: rise 620ms cubic-bezier(.2,.8,.2,1) forwards;
}

.appear.d2 { animation-delay: 90ms; }
.appear.d3 { animation-delay: 160ms; }
.appear.d4 { animation-delay: 240ms; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .layout,
  .hero-card,
  .grid.two,
  .grid.three,
  .grid.kpi-grid,
  .demo-grid.cols-4,
  .demo-grid.cols-3,
  .demo-grid.cols-2,
  .spotlight-grid.two,
  .stage-board {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 12px 12px 24px;
  }

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

  .hero-title {
    font-size: 2rem;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 0.86rem;
  }
}
