:root {
  --black: #0b0f14;
  --white: #ffffff;
  --arg-blue: #74acdf;
  --muted: #b9c3cf;
  --card: #0f1622;
  --card-2: #111a28;
  --ring: rgba(116, 172, 223, 0.55);
  --shine: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  --modal-backdrop: rgba(9, 14, 22, 0.8);
  --section-y: clamp(84px, 12vh, 140px);
  --band-1: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  --band-2: linear-gradient(
    180deg,
    rgba(116, 172, 223, 0.07),
    rgba(116, 172, 223, 0.03)
  );
  --band-3: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.02)
  );
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--white);
  background: radial-gradient(
      1200px 600px at 80% -20%,
      rgba(116, 172, 223, 0.1),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at -10% 20%,
      rgba(116, 172, 223, 0.08),
      transparent 50%
    ),
    var(--black);
}

/* === Navbar CTA (only logo left, CTA right) ======================= */
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.section-band {
  padding: var(--section-y) 0;
}
.section--alt {
  background: var(--band-2);
} /* use for video */
.section--alt-2 {
  background: var(--band-3);
} /* use for actions */
/* hero/about can use the default (band-1 via body) */

/* Bigger vertical gaps inside sections */
.hero__grid {
  gap: 2.6rem;
}
.hero__cards {
  gap: 1.2rem;
}
.stat-card {
  padding: 1.3rem;
  min-height: 180px;
}

.actions {
  padding: var(--section-y) 0;
} /* override earlier */
.action-card--xl {
  margin-bottom: 22px;
} /* more space between cards */
.actions__title {
  margin-bottom: 26px;
}

.about {
  padding: var(--section-y) 0;
} /* override earlier */

/* A touch more space from number row to titles */
.stat-card__row {
  margin-bottom: 0.55rem;
}

/* Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(
    to bottom,
    rgba(15, 22, 34, 0.85),
    rgba(15, 22, 34, 0.65)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 800;
}
.brand__img {
  width: 80px;
  height: auto;
  object-fit: contain;
  display: block;
}
.brand__text {
  font-size: 1.05rem;
  opacity: 0.9;
}
.nav__links {
  display: none;
  gap: 1rem;
}
.nav__links .link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav__links .link:hover {
  color: var(--white);
}
.nav__auth {
  display: flex;
  gap: 0.5rem;
}
@media (min-width: 880px) {
  .nav__links {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease,
    opacity 0.2s ease;
  will-change: transform;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: linear-gradient(135deg, var(--arg-blue), #a2cff0);
  color: #081018;
  box-shadow: 0 8px 30px -10px var(--ring);
}
.btn--primary:hover {
  filter: saturate(1.1) brightness(1.05);
}
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero */
.hero {
  padding: clamp(56px, 8vh, 96px) 0 56px;
}
.hero__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.hero__copy {
  padding-top: 16px;
}
.h1 {
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  line-height: 1.06;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 10px;
}
.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--muted);
  max-width: 52ch;
}
.hero__cta {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.accent {
  color: var(--arg-blue);
}

/* Stat cards grid */
.hero__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1.1fr;
  }
  .hero__cards {
    grid-template-columns: 1fr;
  }
}

/* Cards (nicer, number-focused) */
.stat-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(
      180px 160px at 20% 0%,
      rgba(116, 172, 223, 0.18),
      transparent 45%
    ),
    linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 1.1rem;
  min-height: 170px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-card--glow:before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: radial-gradient(
    800px 140px at var(--mx, 50%) -20px,
    rgba(116, 172, 223, 0.35),
    transparent 40%
  );
  filter: blur(8px);
  opacity: 0.35;
  z-index: -1;
}
.stat-card:hover {
  border-color: rgba(116, 172, 223, 0.45);
  box-shadow: 0 26px 80px -28px var(--ring);
}

.stat-card__row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
}
.stat-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(116, 172, 223, 0.15);
  color: var(--arg-blue);
}
.stat-card__icon.combo {
  background: transparent;
  padding: 0;
}

.stat-card__number {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  position: relative;
}
.stat-card .num {
  font-weight: 900;
  font-size: clamp(2.6rem, 5.6vw, 3.5rem);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, #d7e7f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 24px rgba(116, 172, 223, 0.18);
}
.num-unit {
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: #e9f3fb;
  opacity: 0.9;
}
@keyframes shine {
  0% {
    left: -150px;
  }
  60% {
    left: 140%;
  }
  100% {
    left: 140%;
  }
}

.stat-card__footer {
  text-align: center;
  margin-top: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}
.stat-card .glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    240px 200px at var(--mx, 50%) var(--my, 50%),
    rgba(116, 172, 223, 0.32),
    transparent 60%
  );
  transition: opacity 0.25s ease;
  z-index: -1;
}
.stat-card:hover .glow {
  opacity: 1;
}

/* Clock visuals (precise rotation via group) */
.clock {
  display: block;
}
.clk-face {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 3;
}
.clk-hand {
  stroke: var(--arg-blue);
  stroke-width: 3.2;
  stroke-linecap: round;
}
.clk-pin {
  fill: var(--arg-blue);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Video focus frame */
.video-focus {
  margin-top: 1.2rem;
  border-radius: 22px;
  padding: 2px;
  background: conic-gradient(
    from var(--ang, 0deg),
    rgba(116, 172, 223, 0.95),
    rgba(255, 255, 255, 0.65),
    rgba(116, 172, 223, 0.95)
  );
  animation: spinBorder 8s linear infinite;
  box-shadow: 0 10px 40px -20px var(--ring),
    0 0 0 6px rgba(116, 172, 223, 0.08) inset;
}
@keyframes spinBorder {
  to {
    --ang: 360deg;
  }
}
.video-shell {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(
      400px 220px at 20% 0%,
      rgba(116, 172, 223, 0.08),
      transparent 50%
    ),
    #0b0f14;
}

/* Actions (full-width cards per row) */
.actions {
  padding: 40px 0 80px;
}
.actions__title {
  margin-bottom: 16px;
}

.action-card {
  background: linear-gradient(
    180deg,
    rgba(116, 172, 223, 0.08),
    rgba(116, 172, 223, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.action-card--xl {
  min-height: 170px;
  margin-bottom: 14px;
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 172, 223, 0.45);
  box-shadow: 0 22px 60px -24px var(--ring);
}
.action-card__left {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.action-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(116, 172, 223, 0.15);
  color: var(--arg-blue);
}
.action-card__icon.ghost {
  background: rgba(255, 255, 255, 0.06);
}
.action-card__title {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.25rem;
}
.action-card__text {
  color: var(--muted);
  margin: 0;
}
.action-pills {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.pill {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(116, 172, 223, 0.16);
  border: 1px solid rgba(116, 172, 223, 0.38);
  font-size: 0.78rem;
  font-weight: 700;
  color: #dfeaf6;
}
.action-card__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* About */
/* === About section refresh ======================================== */
.about__grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

.about__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    rgba(116, 172, 223, 0.18),
    rgba(116, 172, 223, 0.08)
  );
  border: 1px solid rgba(116, 172, 223, 0.35);
  color: #e8f2fb;
}

.about__headline {
  margin: 0.8rem 0 0.6rem 0;
  font-weight: 900;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}

.about__lead {
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.55;
  font-size: clamp(0.98rem, 1.3vw, 1.02rem);
}

/* Right-hand panel holding the feature list */
.about__panel {
  position: relative;
  padding: clamp(16px, 2.4vw, 22px);
  border-radius: 16px;
  background: radial-gradient(
      120% 120% at 80% -10%,
      rgba(116, 172, 223, 0.16),
      transparent 55%
    ),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

/* Feature list */
.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}
.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.feature-item strong {
  color: #fff;
  font-weight: 800;
}
.feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

/* Icon circle */
.fi {
  flex: 0 0 28px;
  height: 28px;
  width: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0b1623;
  background: linear-gradient(180deg, #eaf3fb, #b6d5ee);
  box-shadow: 0 2px 8px rgba(116, 172, 223, 0.35);
}
.fi svg {
  width: 16px;
  height: 16px;
}

/* CTA */
.about__cta {
  margin-top: clamp(18px, 3vw, 26px);
  justify-content: center;
}

/* Footer */
.footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 22, 34, 0.5);
  backdrop-filter: blur(6px);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
.footer .link {
  color: var(--muted);
  text-decoration: none;
}
.footer .link:hover {
  color: var(--white);
}

/* Modal (custom minimal) */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  transition: background 220ms ease;
}
.modal.show {
  display: flex;
  backdrop-filter: saturate(150%) blur(2px);
}
.modal .modal-dialog {
  width: min(1100px, 95vw);
}

.modal .modal-content {
  background: #0f1622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 24px 80px -24px rgba(0, 0, 0, 0.6);
  margin-bottom: 18px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-title {
  margin: 0;
}
.modal-body {
  padding: 1rem;
  padding-bottom: 1.25rem;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-close {
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.btn-close::before,
.btn-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: #fff;
  transform-origin: center;
}
.btn-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.btn-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Explorer & AI stages */
.doc-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.doc-item {
  padding: 1rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}
.doc-item:hover {
  border-color: rgba(116, 172, 223, 0.6);
  background: rgba(116, 172, 223, 0.08);
}
.doc-item:active {
  transform: translateY(1px);
}
.doc-item.selected {
  background: rgba(116, 172, 223, 0.16);
  border-color: rgba(116, 172, 223, 0.85);
}

.pdf-icon {
  font-size: 56px;
  line-height: 1;
  color: #dc3545;
  display: block;
  margin: 0 auto 0.4rem;
}
.doc-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.muted {
  color: #fff !important;
  opacity: 0.9;
}
.ai-stage {
  display: grid;
  place-items: center;
  height: 240px;
}
.ai-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}
.ai-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--arg-blue);
  box-shadow: 0 0 0 0 rgba(116, 172, 223, 0.45);
  animation: aPulse 1.8s infinite;
}
@keyframes aPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(116, 172, 223, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(116, 172, 223, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(116, 172, 223, 0);
  }
}

/* Tabs in final view */
.inv-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.inv-tab {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: #dfeaf6;
}
.inv-tab.active {
  background: rgba(116, 172, 223, 0.16);
  border-color: rgba(116, 172, 223, 0.6);
  color: #fff;
}

/* Header form grid */
.inv-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
@media (max-width: 900px) {
  .inv-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.inv-form .f {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.inv-form label {
  font-size: 0.85rem;
  color: #cbd8e6;
}
.inv-form input,
.inv-form select,
.inv-form textarea {
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}
.inv-form textarea {
  grid-column: 1 / -1;
  min-height: 70px;
}
.ag-theme-balham {
  height: 250px;
  width: 100%;
}
/* === NUMBER FOCUS UPGRADE =========================================== */
.stat-card__number {
  position: relative;
  isolation: isolate;
}

/* Soft halo behind the number */
.stat-card__number::before {
  content: "";
  position: absolute;
  inset: -8px -14px;
  z-index: -1;
  background: radial-gradient(
    220px 120px at var(--mx, 70%) 40%,
    rgba(116, 172, 223, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  filter: blur(10px);
}
.stat-card:hover .stat-card__number::before {
  opacity: 1;
}

/* Pop finish when a number completes animating */
.num-pop {
  animation: numPop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, text-shadow;
}
@keyframes numPop {
  0% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 0 rgba(116, 172, 223, 0);
  }
  55% {
    transform: translateY(-2px) scale(1.06);
    text-shadow: 0 14px 28px rgba(116, 172, 223, 0.28);
  }
  100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 10px 24px rgba(116, 172, 223, 0.18);
  }
}

/* Tiny celebratory sparkles (auto-removed in JS) */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff 0%,
    #cfe6fb 45%,
    rgba(255, 255, 255, 0) 70%
  );
  pointer-events: none;
  animation: sparkleOut 0.7s ease forwards;
  filter: drop-shadow(0 0 6px rgba(116, 172, 223, 0.6));
  z-index: 5;
}
@keyframes sparkleOut {
  0% {
    transform: translate(var(--sx, 0), var(--sy, 0)) scale(0.7);
    opacity: 1;
  }
  90% {
    opacity: 0.95;
  }
  100% {
    transform: translate(calc(var(--sx, 0) * 1.6), calc(var(--sy, 0) * 1.6))
      scale(0.2);
    opacity: 0;
  }
}

/* Minutes card: slim progress ticker under the number */
.minutes-card .stat-card__number {
  padding-bottom: 8px;
}
.min-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(116, 172, 223, 0),
    rgba(116, 172, 223, 0.6),
    rgba(255, 255, 255, 0.85),
    rgba(116, 172, 223, 0.6),
    rgba(116, 172, 223, 0)
  );
  opacity: 0.85;
  overflow: hidden;
}
.min-ticker::before {
  /* sweeping dot */
  content: "";
  position: absolute;
  top: 50%;
  left: -6%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eaf3fb;
  transform: translateY(-50%);
  box-shadow: 0 0 12px 2px rgba(116, 172, 223, 0.65);
  animation: minSweep 6s linear infinite;
}
@keyframes minSweep {
  to {
    left: 106%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .stat-card:hover,
  .video-play,
  .num-pop,
  .sparkle,
  .min-ticker::before {
    animation: none !important;
  }
  .stat-card,
  .video-play {
    transition: none !important;
  }
  .modal {
    transition: none;
  }
}

/* Stat card headings & descriptions */
.stat-card__title {
  text-align: center;
  margin-top: 0.4rem;
  font-weight: 900;
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  letter-spacing: 0.1px;
}
.stat-card__title strong {
  font-weight: 900;
  color: #fff;
}
.stat-card__desc {
  text-align: center;
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

/* Tighten spacing between the row and texts */
.stat-card__row {
  margin-bottom: 0.35rem;
}

/* === Bank Connect helpers ============================================== */
.choose-title {
  margin: 0 0 0.6rem;
}
.choose-subtle {
  margin: 0 0 0.8rem;
  opacity: 0.85;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: rgba(116, 172, 223, 0.15);
  color: #eaf3fb;
  margin: 0 auto 0.4rem;
}
.flag {
  font-size: 36px;
  display: block;
  margin: 0 auto 0.35rem;
  line-height: 1;
}

.bank-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 820px) {
  .bank-form .row {
    grid-template-columns: 1fr;
  }
}
.bank-form label {
  font-size: 0.9rem;
  color: #cbd8e6;
}
.bank-form input[readonly] {
  opacity: 0.8;
}
.bank-form input,
.bank-form .fake-input {
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  width: 100%;
}
.bank-form .fake-input {
  display: flex;
  align-items: center;
  min-height: 40px;
}
.bank-form input.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.bank-form.locked .rest {
  opacity: 0.5;
  pointer-events: none;
}

.status {
  margin-top: 0.8rem;
  font-weight: 800;
}
.status .ok {
  color: #22c55e;
}
.status .muted {
  color: #b9c3cf;
}

/* Flashing call-to-action for AI Reconcile */
.btn-flash {
  animation: btnFlash 1.6s ease-in-out infinite;
}
@keyframes btnFlash {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 30px -10px var(--ring);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px -14px var(--ring);
  }
}

.ag-theme-balham .loading-cell {
  position: relative;
  color: transparent !important; /* hide text while loading */
}
.ag-theme-balham .loading-cell::after {
  content: "";
  position: absolute;
  inset: 4px 6px; /* inner padding of shimmer block */
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: agShimmer 1.2s ease-in-out infinite;
}
@keyframes agShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Global: grey out ANY disabled button */
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  filter: grayscale(40%);
  cursor: not-allowed;
  pointer-events: none; /* belt + braces */
  box-shadow: none;
  transition: opacity 0.15s ease;
}

/* Optional: if you only want the AI button greyed */
#aiBtn:disabled {
  background: #475569; /* muted slate */
  border-color: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
  opacity: 1; /* override global if you prefer solid color */
  filter: none;
}

/* Stop attention animation while disabled */
.btn:disabled.btn-flash {
  animation: none;
}

/* === Advertisement modal ========================================= */
#adModal .modal-dialog {
  width: min(1200px, 96vw);
}
#adModal .modal-content {
  border-radius: 18px;
}
#adModal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#adModal .modal-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.ad-headline {
  margin: 0 0 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  opacity: 0.95;
}
.ad-cols {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .ad-cols {
    grid-template-columns: 5fr 7fr;
  }
}

.ad-photos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}
@media (max-width: 520px) {
  .ad-photos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ad-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: zoom-in;
  transition: transform 0.12s ease;
}
.ad-photo:hover {
  transform: scale(1.02);
}

.ad-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
}
.ad-card .card-body {
  padding: 0.8rem 0.9rem;
}

.ad-meta p {
  margin: 0.35rem 0;
}
.ad-meta i {
  opacity: 0.9;
  margin-right: 0.4rem;
}

.ad-editor {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
#adText {
  width: 100%;
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  min-height: 280px;
  resize: none;
  line-height: 1.45;
}
#copyAd {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
}

.ad-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.ad-subtle {
  color: var(--muted);
  margin: 0;
}

.modal {
  overflow: auto;
} /* allow page to scroll the dialog if needed */
.modal.show {
  background: var(--modal-backdrop); /* nice dark overlay */
  backdrop-filter: saturate(150%) blur(2px);
}
.modal .modal-dialog {
  max-height: 92vh;
  display: grid;
  align-items: stretch;
  width: min(1100px, 95vw); /* keep it from spanning full width */
}
.modal .modal-content {
  display: grid;
  grid-template-rows: auto 1fr auto; /* fixed header/footer, scroll body */
  max-height: 92vh;
}
.modal .modal-body {
  overflow: auto;
}

/* --- Ad description area --- */
#adTextWrap {
  position: relative;
}
#adText {
  padding-top: 42px; /* room for Copy button */
  padding-right: 64px; /* room on the right edge */
}

/* Copy button sits inside the box */
#copyAd {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

/* AI "thinking" overlay inside the description box */
.ad-ai-overlay {
  position: absolute;
  inset: 8px; /* sits within the textarea padding */
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.55); /* subtle in-box veil */
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none; /* don't block typing/clicks */
  z-index: 2;
}
.ad-ai-overlay .ai-stage {
  margin: 0;
}

/* === Toasts ======================================================= */
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  z-index: 9999;
}

.toast {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 22, 35, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: #eaf3fb;
  animation: toastIn 0.22s ease-out, toastOut 0.25s ease-in forwards;
  animation-delay: 0s, var(--life, 2600ms);
}

.toast .icon {
  font-size: 18px;
  line-height: 1;
}
.toast .msg {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.toast.success {
  border-left: 4px solid #22c55e;
}
.toast.error {
  border-left: 4px solid #ef4444;
}

@keyframes toastIn {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

/* ===== Letters: polished composer UI ===== */
.email-wrap {
  display: grid;
  gap: 0.75rem;
}
.email-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.email-row label {
  width: 100px;
  color: #cbd8e6;
  font-weight: 600;
}
.email-row input,
.email-body {
  flex: 1;
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.email-body {
  min-height: 240px;
  white-space: pre-wrap;
}

/* Attachments (chips) */
.attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
}
.attach-chip i {
  font-size: 1rem;
}

/* Outlook-style sent card */
.outlook-card {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #eaf2ff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 22px 54px -22px rgba(37, 99, 235, 0.55);
}
.outlook-card .subj {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}
.outlook-card .meta {
  opacity: 0.95;
  margin: 0.15rem 0;
}
.outlook-card .meta strong {
  color: #fff;
}
.outlook-card .attach {
  margin-top: 0.5rem;
}
.outlook-card .attach .attach-chip {
  background: rgba(255, 255, 255, 0.2);
  color: #0b1220;
  border-color: rgba(255, 255, 255, 0.35);
}
.outlook-card .actions {
  margin-top: 0.8rem;
}
.outlook-card .btn-outlook {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e0f2fe;
  color: #0b1220;
  font-weight: 800;
  border: 0;
  border-radius: 10px;
  padding: 0.46rem 0.8rem;
  text-decoration: none;
}

/* Toasts */
.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: #0b1220;
  color: #e9f1ff;
  border-radius: 10px;
  border-left: 5px solid #22c55e;
  padding: 0.6rem 0.8rem;
  min-width: 240px;
  box-shadow: 0 14px 45px -18px rgba(0, 0, 0, 0.6);
  font-weight: 700;
}
.toast .small {
  font-weight: 400;
  opacity: 0.85;
  display: block;
  margin-top: 0.15rem;
}

.ag-theme-balham .btn-inline {
  --bg1: rgba(116, 172, 223, 0.18);
  --bg2: rgba(116, 172, 223, 0.08);
  --bd: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.1;
  border-radius: 9px;
  border: 1px solid var(--bd);
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color: #eaf2ff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, filter 0.18s ease;
  text-decoration: none;
  user-select: none;
}
.ag-theme-balham .btn-inline:hover {
  transform: translateY(-1px);
  filter: saturate(1.05) brightness(1.06);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 16px 34px -18px rgba(116, 172, 223, 0.45);
}
.ag-theme-balham .btn-inline:active {
  transform: translateY(0);
}
.ag-theme-balham .btn-inline:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25),
    0 12px 28px -14px rgba(116, 172, 223, 0.45);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Colorways */
.ag-theme-balham .btn-inline.blue {
  --bg1: #60a5fa;
  --bg2: #93c5fd;
  color: #0b1220;
  border-color: rgba(255, 255, 255, 0.35);
}
.ag-theme-balham .btn-inline.red {
  --bg1: #ef4444;
  --bg2: #fca5a5;
  color: #0b1220;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Optional small icon shim */
.btn-inline i {
  font-size: 0.95em;
  line-height: 1;
}

/* Greyed termination button + badge */
.ag-theme-balham .btn-inline.gray {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.1;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, #9ca3af, #d1d5db);
  color: #0b1220;
  font-weight: 800;
  cursor: not-allowed;
  opacity: 0.75;
  position: relative;
}
.ag-theme-balham .btn-inline.has-badge {
  position: relative;
}
.ag-theme-balham .btn-inline .corner-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #60a5fa, #93c5fd);
  color: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0 0.45rem;
  height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1px;
}

/* Terminated rows: red background + dashed strike-through text */
.ag-theme-balham .terminated-row .ag-cell {
  background: rgba(239, 68, 68, 0.14) !important;
  text-decoration: line-through;
  text-decoration-style: dashed;
  text-decoration-thickness: 2px;
}
.row-tag.terminated {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border: 1px dashed rgba(239, 68, 68, 0.55);
  border-radius: 8px;
  padding: 0.22rem 0.5rem;
  font-weight: 800;
}
