:root {
  --navy: #0D1B2A;
  --navy-mid: #1A2E42;
  --navy-light: #243B55;
  --amber: #E8A020;
  --amber-light: #F5C15A;
  --amber-pale: #FDF3DC;
  --white: #FAFAF8;
  --gray-100: #F0EDE8;
  --gray-200: #D8D4CC;
  --gray-400: #9A9488;
  --gray-600: #5C5850;
  --teal: #1A7A6E;
  --teal-light: #E6F5F3;
  --red: #C0392B;
  --red-light: #FDECEA;
  --green: #1E7A4A;
  --green-light: #E6F5EC;
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'DM Sans', sans-serif; background: var(--gray-100); color: var(--navy); min-height: 100vh; }

/* ===== NAV (premium portal bar) ===== */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(26, 122, 110, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232, 160, 32, 0.1), transparent 45%),
    linear-gradient(180deg, #0a1628 0%, #0d1b2a 50%, #101f33 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.2);
}

.app-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #1a7a6e 25%, #e8a020 50%, #1a7a6e 75%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.nav-brand {
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.nav-brand--static {
  cursor: default;
}

.nav-brand__mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(232, 160, 32, 0.22) 0%, rgba(26, 122, 110, 0.18) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-brand__mark svg {
  display: block;
}

.nav-brand__lockup {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.nav-brand__name {
  font-family: 'Fraunces', serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}

.nav-brand__em {
  font-style: normal;
  color: #e8a020;
}

.nav-brand__context {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.2;
}

/* Legacy alias */
.nav-brand--white,
.nav-brand--white .nav-brand__name,
.nav-brand--white .nav-brand__em {
  color: inherit;
}

.footer-brand--white,
.footer-brand--white span {
  color: var(--white) !important;
}

.nav-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  height: 2rem;
  min-width: 6.75rem;
  padding: 0 0.7rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
  white-space: nowrap;
}

.nav-pill:hover:not(.nav-alert) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(232, 160, 32, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.nav-pill__icon {
  opacity: 0.9;
}

.nav-pill__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  line-height: 1.05;
}

.nav-pill__line {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0.01em;
}

.nav-pill__sub {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.nav-pill--site .nav-pill__sub {
  color: rgba(232, 160, 32, 0.95);
  opacity: 1;
}

.nav-pill--alert,
.nav-alert {
  cursor: default;
  border-color: rgba(201, 138, 24, 0.65);
  background: linear-gradient(180deg, #fff4c9 0%, #f0c14a 42%, #d4920f 100%);
  color: #0d1b2a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 2px 10px rgba(232, 160, 32, 0.28);
  transform: none;
}

.nav-alert:not(.nav-alert--zero):hover {
  background: linear-gradient(180deg, #fff8d6 0%, #f5ca5c 42%, #db9a12 100%);
  border-color: rgba(180, 118, 18, 0.85);
  color: #0a1520;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 6px 20px rgba(232, 160, 32, 0.48);
  transform: none;
  filter: none;
}

.nav-pill__icon,
.nav-alert__count {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

.nav-alert__count {
  width: auto;
  min-width: 1.125rem;
  padding: 0 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  background: #0d1b2a;
  color: #fde68a;
  box-shadow: 0 1px 2px rgba(13, 27, 42, 0.2);
}

.nav-alert__label {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0.01em;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

.nav-pill--alert--zero,
.nav-alert--zero {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.88);
}

.nav-alert--zero:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: none;
  transform: none;
}

.nav-pill--alert--zero .nav-alert__count,
.nav-alert--zero .nav-alert__count {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.nav-alert--zero .nav-alert__label {
  opacity: 0.72;
}

.nav-staff-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-staff-link:hover {
  color: #fff;
  border-color: rgba(232, 160, 32, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

/* Legacy — prefer .nav-alert */
.nav-badge {
  font-size: 0.74rem;
  font-weight: 700;
  background: transparent;
  color: inherit;
  padding: 0;
}

.nav-tabs { display: flex; gap: 2px; flex: 1; }
.nav-tab {
  padding: 6px 16px; font-size: 13px; font-weight: 500;
  color: var(--gray-400); border-radius: 6px; cursor: pointer;
  transition: all .15s; border: none; background: none;
  display: flex; align-items: center; gap: 7px;
}
.nav-tab:hover { color: var(--white); background: var(--navy-light); }
.nav-tab.active { color: var(--amber); background: rgba(232,160,32,0.12); }
.nav-tab svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-nav-signout {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-nav-signout:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== WEBSITE / HOME ===== */
.site-header {
  background: var(--navy);
  padding: 80px 40px 100px;
  text-align: center;
  position: relative; overflow: hidden;
}
.site-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(232,160,32,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.site-header h1 {
  font-family: 'Fraunces', serif; font-size: 52px; font-weight: 700;
  color: var(--white); line-height: 1.1; margin-bottom: 18px;
  position: relative;
}
.site-header h1 em { font-style: italic; color: var(--amber); }
.site-header p {
  font-size: 17px; color: var(--gray-400); max-width: 520px;
  margin: 0 auto 32px; line-height: 1.6; position: relative;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.hero-btns .btn-primary,
.hero-btns .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 13.75rem;
  min-height: 3rem;
  padding: 0 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.hero-btns .btn-primary {
  background: var(--amber);
  color: var(--navy);
  border-color: var(--amber);
  box-shadow: 0 2px 14px rgba(232, 160, 32, 0.32);
}

.hero-btns .btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(232, 160, 32, 0.42);
}

.hero-btns .btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}

.hero-btns .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    width: 100%;
  }
}

.btn-primary {
  background: var(--amber); color: var(--navy); font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; padding: 12px 28px;
  border-radius: var(--radius); border: none; cursor: pointer; transition: .15s;
}
.btn-primary:hover { background: var(--amber-light); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.2); font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500; padding: 12px 24px;
  border-radius: var(--radius); cursor: pointer; transition: .15s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }

.site-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1px;
  background: var(--gray-200); border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.stat-item {
  background: var(--white); padding: 28px 32px; text-align: center;
}
.stat-num {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700;
  color: var(--navy); line-height: 1;
}
.stat-label { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--amber); text-transform: uppercase; margin-bottom: 10px;
}
.section-title {
  font-family: 'Fraunces', serif; font-size: 32px; font-weight: 700;
  color: var(--navy); margin-bottom: 32px; line-height: 1.2;
}

/* Services — light editorial list (flows from stats strip) */
.site-services {
  padding: clamp(3rem, 5vw, 4.25rem) clamp(1.25rem, 4vw, 2.5rem);
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
}

.site-services__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
}

.site-services__intro {
  padding-top: 0.35rem;
}

.site-services__eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a6b12;
}

.site-services__title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.75rem, 3.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.site-services__lead {
  margin: 0.85rem 0 0;
  max-width: 20rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.site-services__meta {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 2px solid var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.services-lanes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.service-lane {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem 2.5rem 1fr;
  gap: 0.75rem 0.9rem;
  align-items: start;
  padding: 0.95rem 1rem 0.95rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(13, 27, 42, 0.04);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s ease, box-shadow 0.35s ease;
}

/* Amber bar grows up on hover */
.service-lane::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--amber-light) 0%, var(--amber) 100%);
  transform: scaleY(0);
  transform-origin: center bottom;
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 2;
  border-radius: 12px 0 0 12px;
}

.service-lane:hover::before {
  transform: scaleY(1);
}

/* Light sweep across the card */
.service-lane::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(
    100deg,
    transparent 42%,
    rgba(232, 160, 32, 0.14) 50%,
    transparent 58%
  );
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.service-lane:hover {
  border-color: rgba(232, 160, 32, 0.45);
  box-shadow: 0 8px 24px rgba(13, 27, 42, 0.09);
}

.service-lane:hover::after {
  transform: translateX(100%) skewX(-12deg);
}

.service-lane > * {
  position: relative;
  z-index: 1;
}

.service-lane__num {
  padding-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.service-lane:hover .service-lane__num {
  color: var(--amber);
  letter-spacing: 0.1em;
}

.service-lane__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9px;
  background: var(--navy);
  flex-shrink: 0;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.service-lane:hover .service-lane__icon {
  animation: service-lane-icon-pop 0.5s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(232, 160, 32, 0.2);
}

.service-lane__icon svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--amber-light);
  transition: color 0.25s ease;
}

.service-lane:hover .service-lane__icon svg {
  color: var(--navy);
}

@keyframes service-lane-icon-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  70% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1.06);
  }
}

.service-lane__body {
  min-width: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-lane:hover .service-lane__body {
  transform: translateX(5px);
}

.service-lane:hover .service-lane__chip {
  background: rgba(232, 160, 32, 0.16);
  color: #7a5510;
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .service-lane::before,
  .service-lane::after {
    transition: none;
  }

  .service-lane:hover::before {
    transform: scaleY(1);
  }

  .service-lane:hover::after {
    transform: none;
  }

  .service-lane:hover .service-lane__icon {
    animation: none;
  }

  .service-lane:hover .service-lane__body,
  .service-lane:hover .service-lane__chip {
    transform: none;
  }
}

.service-lane__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.3rem;
}

.service-lane__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.service-lane__chip {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--gray-100);
  transition: background 0.3s ease, color 0.3s ease, transform 0.35s ease;
}

.service-lane__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--gray-600);
}

@media (min-width: 900px) {
  .services-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 720px) {
  .site-services__shell {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .site-services__lead {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .service-lane {
    grid-template-columns: 2rem 1fr;
    grid-template-rows: auto auto;
  }

  .service-lane__num {
    grid-column: 1;
    grid-row: 1;
  }

  .service-lane__icon {
    grid-column: 1;
    grid-row: 2;
  }

  .service-lane__body {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* ===== CHAT WIDGET ===== */
.chat-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--amber); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(232,160,32,0.4); transition: .2s;
}
.chat-fab:hover { transform: scale(1.05); background: var(--amber-light); }
.chat-fab svg { width: 24px; height: 24px; color: var(--navy); }
.chat-badge {
  position: absolute; top: -2px; right: -2px; width: 16px; height: 16px;
  background: var(--red); border-radius: 50%; border: 2px solid var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: white; font-weight: 700;
}

.chat-window {
  position: fixed; bottom: 96px; right: 28px; z-index: 200;
  width: 360px; background: var(--white);
  border-radius: 18px; border: 1px solid var(--gray-200);
  box-shadow: 0 20px 60px rgba(13,27,42,0.15);
  display: none; flex-direction: column; overflow: hidden;
  max-height: 520px;
}
.chat-window.open { display: flex; }
.chat-header {
  background: var(--navy); padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.chat-avatar svg { width: 18px; height: 18px; color: var(--navy); }
.chat-header-info h4 { font-size: 13px; font-weight: 600; color: var(--white); }
.chat-header-info p { font-size: 11px; color: var(--amber-light); }
.chat-status-dot {
  width: 8px; height: 8px; background: #4ade80; border-radius: 50;
  margin-right: 4px; display: inline-block; border-radius: 50%;
}
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px; display: flex;
  flex-direction: column; gap: 10px; min-height: 200px; max-height: 320px;
}
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble {
  background: var(--gray-100); border-radius: 14px 14px 14px 4px;
  padding: 9px 13px; font-size: 13px; line-height: 1.45; color: var(--navy);
}
.msg.user .msg-bubble {
  background: var(--navy); color: var(--white);
  border-radius: 14px 14px 4px 14px;
}
.msg-bubble strong { font-weight: 600; }
.msg-bubble ul, .msg-bubble ol { margin: 6px 0 6px 18px; padding: 0; }
.msg-bubble li { margin: 2px 0; }
.msg-bubble p { margin: 0 0 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble a { color: var(--amber-dark, #b45309); text-decoration: underline; }
.msg.user .msg-bubble a { color: var(--amber-light); }
.msg-bubble a[href*="bookings.cloud.microsoft"],
.msg-bubble a[href*="outlook.office.com/book"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: var(--amber);
  color: var(--navy) !important;
  text-decoration: none !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s, transform 0.1s;
}
.msg-bubble a[href*="bookings.cloud.microsoft"]:hover,
.msg-bubble a[href*="outlook.office.com/book"]:hover {
  background: var(--amber-dark, #b45309);
  color: var(--white) !important;
  transform: translateY(-1px);
}
.msg-time { font-size: 10px; color: var(--gray-400); margin-bottom: 2px; }
.chat-quick-btns {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px;
}
.quick-btn {
  font-size: 11px; padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--gray-200); background: var(--white);
  color: var(--navy); cursor: pointer; transition: .15s; white-space: nowrap;
}
.quick-btn:hover { border-color: var(--amber); background: var(--amber-pale); }
.chat-input-row {
  display: flex; gap: 8px; padding: 10px 14px 14px;
  border-top: 1px solid var(--gray-200);
}
.chat-input-row input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: 20px;
  padding: 8px 14px; font-size: 13px; font-family: 'DM Sans', sans-serif;
  outline: none; color: var(--navy); background: var(--gray-100);
}
.chat-input-row input:focus { border-color: var(--amber); background: var(--white); }
.chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send svg { width: 16px; height: 16px; color: var(--navy); }

/* ===== CALLBACK SECTION ===== */
.callback-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(26, 122, 110, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 160, 32, 0.08), transparent 50%),
    var(--navy);
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.callback-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.callback-head {
  margin-bottom: 1.75rem;
}
.callback-label {
  color: var(--amber-light);
  margin-bottom: 0.65rem;
}
.callback-section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.65rem, 4vw, 1.95rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.callback-lead {
  font-size: 0.9rem;
  color: var(--gray-400);
  line-height: 1.55;
  max-width: 36ch;
  margin: 0 auto;
}
.callback-form {
  text-align: left;
}
.callback-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(26, 46, 66, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.callback-form .form-field {
  gap: 0.35rem;
}
.callback-form .form-field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(154, 148, 136, 0.95);
}
.callback-form .form-field input {
  background: rgba(13, 27, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  color: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.callback-form .form-field input::placeholder {
  color: rgba(154, 148, 136, 0.55);
}
.callback-form .form-field input:hover {
  border-color: rgba(255, 255, 255, 0.16);
}
.callback-form .form-field input:focus {
  border-color: var(--amber);
  background: rgba(13, 27, 42, 0.85);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.15);
}
.callback-status {
  font-size: 12px;
  min-height: 1.35rem;
  margin: 0;
}
.callback-status--success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0.15rem 0 0;
  padding: 0.35rem 0;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--amber-light);
  letter-spacing: 0.01em;
}
.callback-status--success::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.25);
  flex-shrink: 0;
}
.callback-status--pending {
  text-align: center;
  width: 100%;
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 500;
}
.callback-status--error {
  text-align: center;
  width: 100%;
  color: #fca5a5;
  font-size: 0.8rem;
  line-height: 1.45;
}
.callback-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(232, 160, 32, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.callback-submit:hover {
  box-shadow: 0 6px 22px rgba(232, 160, 32, 0.45);
  transform: translateY(-1px);
}
.callback-submit:active {
  transform: translateY(0);
}
.callback-submit__icon {
  flex-shrink: 0;
  opacity: 0.9;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.form-field input, .form-field select {
  background: var(--navy-light); border: 1px solid var(--navy-light);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  color: var(--white); outline: none; transition: .15s;
}
.form-field input:focus, .form-field select:focus { border-color: var(--amber); }
.form-field select option { background: var(--navy-mid); }

/* ===== SHARED DASHBOARD LAYOUT ===== */
.dash-layout { display: flex; min-height: calc(100vh - 52px); }
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--white);
  border-right: 1px solid var(--gray-200); padding: 20px 0;
  display: flex; flex-direction: column;
}
.sidebar-section { padding: 0 12px; margin-bottom: 6px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  color: var(--gray-400); text-transform: uppercase;
  padding: 8px 12px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--gray-600);
  cursor: pointer; transition: .15s;
  text-decoration: none;
}
.sidebar-item:hover { background: var(--gray-100); color: var(--navy); }
.sidebar-item.active { background: var(--amber-pale); color: var(--amber); }
.sidebar-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-count {
  margin-left: auto; font-size: 10px; font-weight: 600;
  background: var(--navy); color: var(--white);
  padding: 1px 7px; border-radius: 20px;
}
.sidebar-count.warn { background: var(--red); }
.dash-content { flex: 1; padding: 28px 32px; background: var(--gray-100); overflow-x: hidden; }
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.dash-title { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; color: var(--navy); }
.dash-subtitle { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

/* ===== KPI CARDS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
.kpi-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px 22px;
}
.kpi-label { font-size: 12px; color: var(--gray-400); font-weight: 500; margin-bottom: 6px; }
.kpi-val { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1; }
.kpi-delta {
  font-size: 12px; margin-top: 6px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta.warn { color: var(--amber); }

/* ===== TABLES ===== */
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--navy); }
.card-action {
  font-size: 12px; color: var(--amber); font-weight: 600;
  cursor: pointer; border: none; background: none;
}
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th {
  background: var(--gray-100); padding: 10px 16px;
  font-size: 11px; font-weight: 600; color: var(--gray-400);
  text-align: left; letter-spacing: 0.5px; text-transform: uppercase;
  border-bottom: 1px solid var(--gray-200);
}
td {
  padding: 12px 16px; font-size: 13px; color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-100); }
.td-main { font-weight: 500; color: var(--navy); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-amber { background: var(--amber-pale); color: #966A10; }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-blue { background: #E8F1FB; color: #1A4A8A; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== TWO COL GRID ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; }

/* ===== MINI CHART BARS ===== */
.mini-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mini-bar-label { font-size: 12px; color: var(--gray-600); width: 90px; flex-shrink: 0; text-align: right; }
.mini-bar-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 4px; background: var(--amber); }
.mini-bar-pct { font-size: 12px; font-weight: 500; color: var(--navy); width: 34px; text-align: right; }

/* ===== ALERT ITEMS ===== */
.alert-list { padding: 4px 0; }
.alert-item {
  display: flex; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100); align-items: flex-start;
}
.alert-item:last-child { border-bottom: none; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.alert-dot-red { background: var(--red); }
.alert-dot-amber { background: var(--amber); }
.alert-text { font-size: 13px; color: var(--navy); font-weight: 500; }
.alert-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ===== BACK OFFICE DASHBOARD (command center) ===== */
.bo-dash {
  max-width: 1320px;
}

.bo-dash-hero {
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(232, 160, 32, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(26, 122, 110, 0.18), transparent 50%),
    linear-gradient(135deg, #0a1628 0%, #0d1b2a 42%, #152a45 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(13, 27, 42, 0.18);
}

.bo-dash-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.35rem;
}

.bo-dash-hero__copy {
  min-width: 0;
}

.bo-dash-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.bo-dash-hero__title {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.bo-dash-hero__sub {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
}

.bo-dash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bo-dash-btn {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bo-dash-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.bo-dash-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.bo-dash-btn--primary {
  background: linear-gradient(180deg, #f0b429 0%, #e8a020 100%);
  color: #0d1b2a;
  border-color: rgba(232, 160, 32, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.bo-dash-btn--primary:hover {
  filter: brightness(1.06);
}

.bo-dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.bo-metric {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.bo-metric__label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.bo-metric__val {
  margin: 0.35rem 0 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.bo-metric__delta {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
}

.bo-metric__delta.up { color: #6ee7b7; }
.bo-metric__delta.down { color: #fca5a5; }
.bo-metric__delta.warn { color: #fcd34d; }

.bo-metric--revenue {
  background: rgba(232, 160, 32, 0.18);
  border-color: rgba(232, 160, 32, 0.35);
}

.bo-dash-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.bo-dash-card {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(13, 27, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bo-dash-card--alerts {
  grid-column: span 7;
}

.bo-dash-card--ai {
  grid-column: span 5;
}

.bo-dash-card--lanes,
.bo-dash-card--health {
  grid-column: span 6;
}

.bo-dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid rgba(13, 27, 42, 0.06);
}

.bo-dash-card__title {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.bo-dash-card__pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fdecea;
  color: var(--red);
}

.bo-dash-alerts {
  flex: 1;
  min-height: 0;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bo-dash-alert {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f8f9fb;
  border: 1px solid rgba(13, 27, 42, 0.06);
}

.bo-dash-alert--red {
  background: #fff5f5;
  border-color: rgba(192, 57, 43, 0.15);
}

.bo-dash-alert--amber {
  background: #fffbeb;
  border-color: rgba(232, 160, 32, 0.2);
}

.bo-dash-alert__badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  margin-top: 0.1rem;
}

.bo-dash-alert--red .bo-dash-alert__badge {
  background: var(--red);
  color: #fff;
}

.bo-dash-alert--amber .bo-dash-alert__badge {
  background: var(--amber);
  color: #0d1b2a;
}

.bo-dash-alert__title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.bo-dash-alert__sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.bo-dash-alert-empty {
  margin: auto;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.bo-dash-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.85rem 1rem 1rem;
}

.bo-dash-ai-tile {
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fafc 0%, #f0f4f8 100%);
  border: 1px solid rgba(13, 27, 42, 0.06);
  text-align: center;
}

.bo-dash-ai-tile__val {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.bo-dash-ai-tile__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.3;
}

/* Top lanes by volume */
.bo-lanes-panel {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bo-lane-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: #f8f9fb;
  border: 1px solid rgba(13, 27, 42, 0.05);
  transition: background 0.12s, border-color 0.12s;
}

.bo-lane-row:hover {
  background: #f3f5f8;
  border-color: rgba(13, 27, 42, 0.08);
}

.bo-lane-row--leader {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 55%);
  border-color: rgba(232, 160, 32, 0.28);
  box-shadow: 0 2px 10px rgba(232, 160, 32, 0.1);
}

.bo-lane-row__rank {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gray-600);
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.08);
  font-variant-numeric: tabular-nums;
}

.bo-lane-row--leader .bo-lane-row__rank {
  background: linear-gradient(145deg, #e8a020, #d4920f);
  color: #0d1b2a;
  border-color: transparent;
}

.bo-lane-row__body {
  flex: 1;
  min-width: 0;
}

.bo-lane-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.bo-lane-route {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.bo-lane-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
}

.bo-lane-chip--dest {
  background: rgba(232, 160, 32, 0.12);
  border-color: rgba(232, 160, 32, 0.35);
}

.bo-lane-arrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-400);
}

.bo-lane-route--plain {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.bo-lane-row__pct {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
}

.bo-lane-row__pct strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.bo-lane-row--leader .bo-lane-row__pct strong {
  color: #92400e;
}

.bo-lane-row__pct-suffix {
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 0.05rem;
}

.bo-lane-row__track {
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(13, 27, 42, 0.06);
}

.bo-lane-row__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c98710 0%, #e8a020 55%, #f5c15a 100%);
  box-shadow: 0 0 12px rgba(232, 160, 32, 0.35);
  min-width: 6px;
  transition: width 0.4s ease;
}

/* Shipment health */
.bo-health-panel {
  padding: 1rem 1.15rem 1.1rem;
}

.bo-health-stack {
  display: flex;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8ecf1;
  margin-bottom: 1.1rem;
  box-shadow: inset 0 1px 3px rgba(13, 27, 42, 0.08);
}

.bo-health-stack__part {
  min-width: 4px;
  transition: width 0.35s ease;
}

.bo-health-stack__part--ontime {
  background: linear-gradient(180deg, #2dd4bf, #1a7a6e);
}

.bo-health-stack__part--risk {
  background: linear-gradient(180deg, #fcd34d, #e8a020);
}

.bo-health-stack__part--delayed {
  background: linear-gradient(180deg, #f87171, #c0392b);
}

.bo-health-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bo-health-item {
  display: grid;
  grid-template-columns: auto 5.5rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.55rem 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8f9fb;
  border: 1px solid rgba(13, 27, 42, 0.05);
}

.bo-health-item__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.bo-health-item--ontime .bo-health-item__dot {
  background: #1a7a6e;
  box-shadow: 0 0 0 3px rgba(26, 122, 110, 0.2);
}

.bo-health-item--risk .bo-health-item__dot {
  background: #e8a020;
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.2);
}

.bo-health-item--delayed .bo-health-item__dot {
  background: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.bo-health-item__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
}

.bo-health-item__track {
  height: 10px;
  background: #e8ecf1;
  border-radius: 999px;
  overflow: hidden;
}

.bo-health-item__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}

.bo-health-item--ontime .bo-health-item__fill {
  background: linear-gradient(90deg, #1a7a6e, #2dd4bf);
}

.bo-health-item--risk .bo-health-item__fill {
  background: linear-gradient(90deg, #c98710, #f5c15a);
}

.bo-health-item--delayed .bo-health-item__fill {
  background: linear-gradient(90deg, #c0392b, #f87171);
}

.bo-health-item__val {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bo-chart-empty {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
}

/* Legacy bar row (marketing pages) */
.bo-dash-bars {
  padding: 1rem 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bo-dash-bar {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0.65rem;
}

.bo-dash-bar__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: right;
}

.bo-dash-bar__track {
  height: 12px;
  background: #e8ecf1;
  border-radius: 999px;
  overflow: hidden;
}

.bo-dash-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8a020, #f5c15a);
  min-width: 4px;
}

.bo-dash-bar--teal .bo-dash-bar__fill {
  background: linear-gradient(90deg, #1a7a6e, #2dd4bf);
}

.bo-dash-bar--red .bo-dash-bar__fill {
  background: linear-gradient(90deg, #c0392b, #f87171);
}

.bo-dash-bar__pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 1100px) {
  .bo-dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bo-dash-card--alerts,
  .bo-dash-card--ai,
  .bo-dash-card--lanes,
  .bo-dash-card--health {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .bo-dash-hero__top {
    flex-direction: column;
  }

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

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

  .bo-health-item {
    grid-template-columns: auto 1fr 2.5rem;
    grid-template-rows: auto auto;
  }

  .bo-health-item__track {
    grid-column: 1 / -1;
  }

  .bo-health-item__val {
    grid-row: 1;
    grid-column: 3;
  }

  .bo-lane-row__head {
    flex-wrap: wrap;
  }
}

/* ===== LEAD CARDS ===== */
.lead-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 16px 18px;
  margin-bottom: 12px; transition: .15s;
}
.lead-card:hover { border-color: var(--amber); }
.lead-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.lead-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.lead-company { font-size: 12px; color: var(--gray-400); }
.lead-meta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; font-size: 12px; color: var(--gray-600); margin-top: 8px; }
.lead-meta span { display: flex; align-items: center; gap: 4px; }
.lead-meta svg { width: 13px; height: 13px; color: var(--gray-400); }
.lead-contact { font-size: 12px; color: var(--gray-600); margin-top: 4px; }
.lead-card--callback { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25); }
.lead-transcript-btn { font-size: 11px; padding: 5px 10px; margin-left: auto; }

.acme-modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, 0.45); align-items: center; justify-content: center; padding: 24px;
}
.acme-modal.open { display: flex; }
.acme-modal-panel {
  background: var(--white); border-radius: var(--radius-lg); max-width: 640px; width: 100%;
  max-height: min(80vh, 720px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.15);
}
.acme-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
}
.acme-modal-header h3 { font-size: 16px; font-weight: 600; color: var(--navy); margin: 0; }
.acme-modal-close {
  border: none; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: var(--gray-400);
}
.acme-modal-body {
  margin: 0; padding: 16px 20px 20px; overflow: auto; font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; color: var(--navy); font-family: ui-monospace, monospace;
}

/* ===== AI AGENT CHAT (C-LEVEL) ===== */
.agent-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

/* Fit C-level agent in one screen — scroll inside chat/sidebar only */
#bo-agent {
  --bo-agent-pane-h: calc(100vh - 52px - 56px - 76px);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 52px - 56px);
  max-height: calc(100vh - 52px - 56px);
  overflow: hidden;
  box-sizing: border-box;
}

#bo-agent .dash-topbar {
  flex-shrink: 0;
  margin-bottom: 16px;
}

#bo-agent .agent-layout {
  flex: 1;
  min-height: 0;
  align-items: start;
}

#bo-agent .agent-chat-area {
  height: var(--bo-agent-pane-h);
  max-height: var(--bo-agent-pane-h);
}

#bo-agent .agent-layout > div:last-child {
  max-height: var(--bo-agent-pane-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.agent-chat-area {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
  min-height: 0;
}
.agent-chat-header {
  background: var(--navy); padding: 16px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; align-items: center; gap: 12px;
}
.agent-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--amber); display: flex; align-items: center;
  justify-content: center;
}
.agent-avatar svg { width: 20px; height: 20px; color: var(--navy); }
.agent-header-info h4 { font-size: 14px; font-weight: 600; color: var(--white); }
.agent-header-info p { font-size: 12px; color: var(--amber-light); }
.agent-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.agent-reset-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.agent-reset-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.42);
}
.agent-reset-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.agent-msgs {
  flex: 1; min-height: 0; padding: 20px; overflow-y: auto; display: flex;
  flex-direction: column; gap: 14px;
}

.agent-chat-header,
.agent-input-row {
  flex-shrink: 0;
}
.agent-msg {
  display: flex; align-items: flex-end; gap: 8px;
  max-width: min(85%, 720px);
}
.agent-msg.user { align-self: flex-end; }
.agent-msg:not(.user) { align-self: flex-start; }
.agent-msg-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; line-height: 1; letter-spacing: 0.02em;
  text-transform: uppercase; background: var(--gray-200); color: var(--navy);
}
.agent-msg.user .agent-msg-avatar {
  background: var(--navy); color: var(--white);
}
.agent-msg-bubble {
  min-width: 0; flex: 1;
  background: var(--gray-100); border-radius: 16px 16px 16px 4px;
  padding: 11px 15px; font-size: 13px; line-height: 1.5; color: var(--navy);
}
.agent-msg.user .agent-msg-bubble {
  flex: 0 1 auto;
  background: var(--navy); color: var(--white);
  border-radius: 16px 16px 4px 16px;
}
.agent-input-row {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--gray-200);
}
.agent-input-row input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: 24px;
  padding: 10px 16px; font-size: 13px; font-family: 'DM Sans', sans-serif;
  color: var(--navy); outline: none; background: var(--gray-100);
}
.agent-input-row input:focus { border-color: var(--amber); background: var(--white); }
.agent-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--amber); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: .15s;
}
.agent-send:hover { background: var(--amber-light); }
.agent-send svg { width: 17px; height: 17px; color: var(--navy); }

.agent-sidebar-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px;
}

.bo-marketing-host {
  min-height: calc(100vh - 56px);
}

.bo-marketing-embed .dash-layout {
  min-height: calc(100vh - 56px);
}

.bo-marketing-embed > .dash-layout > .sidebar {
  width: 220px;
  flex-shrink: 0;
}

.bo-marketing-embed > .dash-layout > .dash-content {
  min-width: 0;
}

.bo-console-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bo-sub--console {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Leads + Communication: fill the content column like other full-height screens */
.dash-content.dash-content--console {
  display: flex;
  flex-direction: column;
  padding: 18px 28px 22px;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

#bo-leads-console.bo-sub,
#bo-communication-console.bo-sub {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#bo-leads-console .bo-console-host,
.bo-console-host--communication {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bo-console-host .bo-console-embed,
.bo-console-embed.bo-console-embed--comm {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bo-console-embed .shell,
.bo-console-embed.bo-console-embed--comm .shell,
.bo-console-embed.bo-console-embed--comm .shell.shell--with-sidebar {
  flex: 1;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100%;
}

.bo-console-embed .shell-main,
.bo-console-embed.bo-console-embed--comm .shell-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bo-console-embed {
  --navy: #0d1b2a;
  --accent-light: #e8a020;
  --paper: #fafaf8;
  --bg-card: #ffffff;
  --border: rgba(13, 27, 42, 0.1);
  --text: #1c2434;
  --text-muted: #5c5850;
  --shadow: 0 4px 20px rgba(13, 27, 42, 0.06);
  font-family: 'DM Sans', system-ui, sans-serif;
}

.bo-console-embed .site-header,
.bo-console-embed .workspace-sidebar {
  display: none !important;
}

.bo-console-embed .shell-main {
  width: 100%;
}

/* Console layout.css hides all panels unless body[data-site-view] matches; in /admin embed
   sync data-site-view on #bo-lead-console-root and force the active panel visible here. */
.bo-console-embed .shell-main > .view-panel {
  display: none !important;
}

.bo-console-embed[data-site-view="social"] #view-social,
.bo-console-embed[data-site-view="social"] #view-social:not([hidden]) {
  display: block !important;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.bo-console-embed[data-site-view="communication"] #view-communication,
.bo-console-embed[data-site-view="communication"] #view-communication:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.bo-console-embed body,
.bo-console-embed {
  background: transparent;
}

.bo-console-embed .view-panel {
  padding: 0;
}

/* Never show inactive console views (Leads must not show Communication below the table) */
.bo-console-embed .shell-main > .view-panel[hidden] {
  display: none !important;
}

.bo-console-embed:not(.bo-console-embed--comm) #view-communication {
  display: none !important;
}

.bo-console-embed .hero,
.bo-console-embed .comm-view {
  padding-top: 0;
}

.bo-console-embed .hero--leads {
  margin-top: -0.15rem;
}

/* Fallback when lead-console stylesheets are still loading (layout.css hides this when loaded). */
.bo-console-embed .leads-page-header__copy {
  display: none !important;
}

.bo-console-embed .leads-controls-card,
.bo-console-embed .table-card {
  border-color: var(--gray-200);
  box-shadow: 0 2px 12px rgba(13, 27, 42, 0.05);
}

.bo-console-embed .leads-filters-strip__sync:hover {
  border-color: var(--amber);
}

.bo-console-embed .table-card__toolbar {
  background: linear-gradient(180deg, var(--gray-100) 0%, var(--white) 100%);
}

.bo-console-embed .lead-detail {
  border-color: var(--gray-200);
}

.bo-console-embed .lead-detail__chip--score {
  background: rgba(232, 160, 32, 0.12);
  border-color: rgba(232, 160, 32, 0.28);
  color: var(--navy);
}

.bo-console-embed .lead-filter-chip[type="button"].is-selected {
  background: rgba(232, 160, 32, 0.18);
  border-color: rgba(232, 160, 32, 0.5);
  box-shadow: 0 0 0 2px rgba(232, 160, 32, 0.12);
  color: var(--navy);
}

#bo-communication-console.bo-sub {
  flex: 1;
  flex-direction: column;
  min-height: 0;
  display: flex;
}

#bo-communication-console .dash-topbar--communication {
  flex-shrink: 0;
  margin-bottom: 14px;
}

.bo-console-embed--comm #view-communication.view-panel:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.bo-console-embed--comm .comm-view {
  flex: 1;
  min-height: 0;
  max-width: none;
  overflow: hidden;
}

.bo-console-embed--comm .comm-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  border-color: var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(13, 27, 42, 0.08);
}

.bo-console-embed .comm-send-btn {
  background: linear-gradient(180deg, var(--amber) 0%, #c98710 100%) !important;
  color: var(--navy) !important;
}

.bo-console-embed .comm-thread-row.is-active {
  background: rgba(232, 160, 32, 0.1);
  box-shadow: inset 3px 0 0 var(--amber);
}

.bo-console-embed .comm-bubble--out {
  background: linear-gradient(180deg, #fffdf7 0%, var(--amber-pale) 100%);
}

.agent-sidebar-title {
  font-size: 12px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
}
.suggested-q {
  font-size: 12px; color: var(--navy); padding: 8px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  cursor: pointer; margin-bottom: 7px; transition: .15s; line-height: 1.4;
}
.suggested-q:hover { border-color: var(--amber); background: var(--amber-pale); color: var(--navy); }

.bo-tools-connected { display: flex; flex-direction: column; gap: 10px; }
.bo-tools-hint { font-size: 12px; color: var(--gray-400); line-height: 1.45; margin: 0; }
.bo-tools-hint--error { color: #b45309; }

/* Integration cards (C-Level) */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.integrations-grid--sidebar {
  grid-template-columns: 1fr;
  gap: 10px;
}

.integrations-grid--sidebar .int-card {
  padding: 14px;
}

.integrations-grid--sidebar .int-card-icon {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.integrations-grid--sidebar .int-card-title {
  font-size: 13px;
}

.integrations-grid--sidebar .int-card-desc,
.integrations-grid--sidebar .int-card-foot {
  font-size: 11px;
}

.int-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.int-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.int-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.int-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.int-card-desc {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
  line-height: 1.4;
}

.int-card-foot {
  font-size: 12px;
  color: var(--gray-400);
  word-break: break-all;
}

.int-btn {
  margin-top: auto;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--navy);
  transition: 0.15s;
}

.int-btn--connect:hover {
  border-color: var(--amber);
  background: var(--amber-pale);
}

.int-btn--disconnect {
  color: #b45309;
  border-color: #fcd34d;
}

@media (max-width: 1024px) {
  .integrations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .integrations-grid {
    grid-template-columns: 1fr;
  }
}
.agent-msg-bubble strong { font-weight: 600; }
.agent-msg-bubble ul { margin: 8px 0 8px 18px; }
.agent-msg-bubble p { margin: 0 0 8px; }
.agent-msg-bubble p:last-child { margin-bottom: 0; }

/* ===== INVOICE PROCESSING ===== */
.inv-upload-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px dashed var(--gray-200);
}
.inv-upload-label { cursor: pointer; margin: 0; }
.inv-upload-field {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.inv-upload-bar--busy .inv-upload-label,
.inv-upload-bar--busy .inv-upload-field {
  opacity: 0.55;
  pointer-events: none;
}
.inv-upload-progress {
  flex: 1 1 100%;
  width: 100%;
  min-width: 200px;
  padding-top: 4px;
}
.inv-upload-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--gray-600);
}
.inv-upload-progress-pct {
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.inv-upload-progress-track {
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.inv-upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), #3d9a8b);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}
.inv-upload-progress.is-indeterminate .inv-upload-progress-fill {
  width: 40% !important;
  animation: inv-upload-indeterminate 1.2s ease-in-out infinite;
}
@keyframes inv-upload-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.inv-master-sync-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin: -8px 0 16px;
}
.inv-master-sync-meta:empty { display: none; }
.inv-action-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.inv-source-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.inv-source--email {
  background: #E8F1FB;
  color: #1A4A8A;
}
.inv-source--crm {
  background: #F3E8FF;
  color: #5B21B6;
}
.inv-source--upload {
  background: var(--gray-100);
  color: var(--gray-700);
}
.inv-source--other {
  background: var(--amber-pale);
  color: #966A10;
}
.inv-topbar { flex-wrap: nowrap; gap: 16px; }
.inv-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.inv-topbar-titles { min-width: 0; }
.inv-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.inv-topbar-detail-actions,
.inv-detail-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.inv-topbar-detail-actions[hidden],
.inv-detail-action-group[hidden],
.inv-topbar-list-actions[hidden],
.inv-tab-bar[hidden],
.inv-upload-bar[hidden],
#inv-connect-banner[hidden] {
  display: none !important;
}
#bo-invoice-processing.inv--detail .inv-tab-bar,
#bo-invoice-processing.inv--detail .inv-upload-bar,
#bo-invoice-processing.inv--detail #inv-connect-banner {
  display: none !important;
}
.inv-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.inv-tab {
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
}
.inv-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.inv-list-view { width: 100%; }
.inv-detail-view {
  margin-top: 0;
  animation: inv-fade-in 0.2s ease-out;
}
@keyframes inv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.inv-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.inv-detail-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.inv-back-btn { font-size: 13px; }
.inv-detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: min(72vh, 720px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.inv-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.inv-pane--invoice {
  border-right: 1px solid var(--gray-200);
}
.inv-pane--audit {
  background: var(--gray-50);
  animation: inv-audit-slide 0.28s ease-out;
}
@keyframes inv-audit-slide {
  from { transform: translateX(16px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.inv-pane-title {
  margin: 0;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  flex-shrink: 0;
}
.inv-pane--audit .inv-pane-title { background: var(--gray-50); }
.inv-pane-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.5;
}
.inv-lines-heading {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inv-line-desc { display: block; }
.inv-line-num-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inv-line-flag-badge {
  display: inline-flex;
  flex-shrink: 0;
}
.inv-line-flag-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.inv-line-num { font-weight: 600; }
.inv-line-amount { white-space: nowrap; }
.inv-amount-old {
  text-decoration: line-through;
  color: var(--gray-400);
  margin-right: 8px;
}
.inv-amount-old--solo { margin-right: 0; }
.inv-amount-new {
  font-weight: 700;
  color: var(--red);
}
.inv-total-corrected {
  font-weight: 700;
  color: var(--red);
}
.inv-audit-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
}
.inv-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
}
.inv-lines-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inv-lines-table td {
  padding: 10px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}
.inv-line-flagged {
  background: #fff5f5;
}
.inv-line-flagged td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}
.inv-audit-empty {
  color: var(--gray-500);
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}
@media (max-width: 960px) {
  .inv-detail-split { grid-template-columns: 1fr; min-height: auto; }
  .inv-pane--invoice { border-right: none; border-bottom: 1px solid var(--gray-200); }
}
.inv-table-wrap { overflow-x: auto; }
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.inv-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inv-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.inv-row { cursor: pointer; transition: background 0.12s; }
.inv-row:hover { background: var(--gray-50); }
.inv-row-selected { background: var(--amber-pale) !important; }
.inv-email { font-size: 12px; color: var(--gray-600); max-width: 180px; word-break: break-all; }
.inv-empty { text-align: center; color: var(--gray-400); padding: 24px 16px !important; font-size: 13px; }
.inv-error { color: var(--red); }
.inv-detail-panel { position: sticky; top: 16px; }
.inv-detail-body { padding: 16px 20px; font-size: 13px; line-height: 1.5; }
.inv-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.inv-detail-meta span {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inv-detail-meta strong { font-size: 13px; color: var(--navy); }
.inv-summary { margin: 0 0 12px; color: var(--gray-600); }
.inv-flag-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inv-flag-item {
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--red);
}
.inv-flag-item-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.inv-flag-line-num {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
  background: #fff5f5;
  padding: 2px 8px;
  border-radius: 999px;
}
.inv-flag-item strong {
  font-size: 13px;
  color: var(--navy);
}
.inv-flag-desc {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--gray-500);
  font-style: italic;
}
.inv-flag-item p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.45;
}
.inv-flag-suggested {
  margin-top: 8px !important;
  color: var(--navy) !important;
  font-weight: 500;
}
.inv-flag-suggested strong { color: var(--red); }
.inv-clean-msg { color: var(--green); font-size: 13px; }
.inv-pdf-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
}
.inv-pdf-tag--yes { background: #e8f5e9; color: #2e7d32; }
.inv-pdf-tag--no { background: #fff3e0; color: #e65100; }
.inv-draft-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}
.inv-dispute-draft {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  resize: vertical;
}
.inv-detail-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 16px;
}
.inv-actions-cell { white-space: nowrap; }
.inv-action-btn { font-size: 12px; padding: 6px 10px; margin-right: 6px; }
.inv-connect-banner {
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.inv-connect-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-600);
}
.inv-connect-link {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}
.inv-connect-link:hover { text-decoration: underline; }
.inv-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.inv-overlay--open { display: flex; }
.inv-overlay-panel {
  background: var(--white);
  border-radius: 12px;
  width: min(900px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0,0,0,0.18);
}
.inv-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.inv-overlay-header h3 { margin: 0; font-family: 'Fraunces', serif; font-size: 20px; }
.inv-overlay-body {
  padding: 24px 28px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
}
.inv-invoice-pre {
  white-space: pre-wrap;
  font-size: 12px;
  margin: 0;
}
.inv-validation-card { margin-top: 20px; }
.btn-secondary {
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gray-300); background: var(--gray-50); }

@media (max-width: 1100px) {
  .inv-layout { grid-template-columns: 1fr; }
  .inv-detail-panel { position: static; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-mid); padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-brand {
  font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700;
  color: var(--white);
}
.footer-brand span { color: var(--amber); }
.footer-copy { font-size: 12px; color: var(--gray-400); }

/* ===== TAG INPUT FOR SEARCH ===== */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 8px 14px;
  margin-bottom: 18px;
}
.search-bar svg { width: 15px; height: 15px; color: var(--gray-400); flex-shrink: 0; }
.search-bar input {
  border: none; outline: none; font-size: 13px;
  font-family: 'DM Sans', sans-serif; color: var(--navy);
  background: none; flex: 1;
}

.mb16 { margin-bottom: 16px; }
.mb24 { margin-bottom: 24px; }
.flex-center { display: flex; align-items: center; gap: 8px; }

/* ===== PORTAL NAV (admin / clevel / leads) ===== */
.portal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.app-nav .nav-right {
  margin-left: auto;
}

.portal-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: 0.15s;
}

.portal-nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.portal-nav-link--active {
  color: var(--navy);
  background: var(--amber);
  border-color: var(--amber);
}

.page-admin .portal-nav-link,
.page-admin .portal-nav-link:hover {
  color: var(--gray-600);
}

.page-admin .portal-nav {
  margin-left: 24px;
}

.page-admin .portal-nav-link--active {
  color: var(--navy);
  background: var(--amber);
}

.btn-nav-signout {
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-400);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 6px 12px;
  cursor: pointer;
  margin-left: 8px;
}

.btn-nav-signout:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ===== ADMIN HOME (/admin) ===== */
.page-admin .app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-hero {
  margin-top: 0;
}

.admin-portal-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.admin-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.admin-portal-card {
  display: block;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.admin-portal-card:hover {
  border-color: var(--amber);
  box-shadow: 0 12px 32px rgba(26, 35, 50, 0.08);
  transform: translateY(-2px);
}

.admin-portal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.admin-portal-icon svg {
  width: 24px;
  height: 24px;
}

.admin-portal-icon--clevel {
  background: #fff8e6;
  color: var(--amber-dark, #b45309);
}

.admin-portal-icon--leads {
  background: #e8f5e9;
  color: #2e7d32;
}

.admin-portal-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 8px;
}

.admin-portal-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 16px;
}

.admin-portal-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber-dark, #c17f0a);
}

@media (max-width: 720px) {
  .portal-nav {
    margin-left: 8px;
    margin-right: 8px;
  }

  .portal-nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }

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

  #bo-agent {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #bo-agent .agent-layout {
    grid-template-columns: 1fr;
  }

  #bo-agent .agent-chat-area,
  #bo-agent .agent-layout > div:last-child {
    height: min(420px, 70vh);
    max-height: min(420px, 70vh);
  }
}

/* ===== RETELL OUTBOUND CALL (LEADS DASHBOARD) ===== */
.btn-call-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-right: 12px;
  border: none;
  border-radius: 100px;
  background: var(--amber);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-call-lead svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-call-lead:hover { background: var(--amber-light); transform: scale(1.02); }

body.retell-modal-open { overflow: hidden; }

.retell-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13, 27, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.retell-modal-overlay[hidden] { display: none !important; }

.retell-modal {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(13, 27, 42, 0.18);
  padding: 24px;
}
.retell-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.retell-modal-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.retell-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 8px;
}
.retell-modal-close:hover { color: var(--navy); }
.retell-modal-desc {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 18px;
  line-height: 1.45;
}
.retell-call-form { display: flex; flex-direction: column; gap: 14px; }
.retell-field { display: flex; flex-direction: column; gap: 5px; }
.retell-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
}
.retell-field input {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  outline: none;
}
.retell-field input:focus { border-color: var(--amber); }
.retell-call-status {
  font-size: 13px;
  min-height: 1.2em;
  margin: 0;
}
.retell-call-status--pending { color: var(--gray-600); }
.retell-call-status--success { color: var(--green); font-weight: 500; }
.retell-call-status--error { color: var(--red); font-weight: 500; }
.retell-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.retell-btn-cancel { font-size: 13px; padding: 9px 16px; }
.retell-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 9px 18px;
}
.retell-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== INVOICE PROCESSING MODULE ===== */

/* Sidebar sub-label (smaller indent marker) */
.sidebar-item-sub {
  font-size: 11px; color: var(--gray-400); padding-left: 38px;
  margin-top: -4px; margin-bottom: 4px;
}

/* Tab bar */
.inv-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border-bottom: 2px solid var(--gray-200);
}
.inv-tab {
  background: none; border: none; padding: 10px 22px;
  font-size: 13px; font-weight: 600; color: var(--gray-400);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: .15s;
}
.inv-tab:hover { color: var(--navy); }
.inv-tab.active { color: var(--amber); border-bottom-color: var(--amber); }

/* KPI card color accents */
.kpi-card--red  { border-top: 3px solid var(--red); }
.kpi-card--green { border-top: 3px solid var(--green); }
.kpi-card--blue  { border-top: 3px solid #1A4A8A; }
.kpi-val--red  { color: var(--red); }
.kpi-val--green { color: var(--green); }
.kpi-val--blue  { color: #1A4A8A; }

/* Row actions */
.inv-row-actions { display: flex; gap: 6px; }
.inv-btn {
  border: 1px solid var(--gray-200); background: var(--white);
  border-radius: var(--radius); padding: 5px 12px; font-size: 12px;
  font-weight: 500; cursor: pointer; transition: .15s; color: var(--navy);
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
}
.inv-btn:hover { border-color: var(--amber); background: var(--amber-pale); }
.inv-btn--primary {
  background: var(--amber); border-color: var(--amber); color: var(--navy);
}
.inv-btn--primary:hover { background: var(--amber-light); }
.inv-btn--danger {
  color: var(--red); border-color: var(--red-light);
}
.inv-btn--danger:hover { background: var(--red-light); border-color: var(--red); }
.inv-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Flagged table row */
tr.inv-row--flagged td { background: var(--red-light) !important; }
tr.inv-row--flagged:hover td { background: #fcd9d6 !important; }
.inv-flag-icon { color: var(--red); margin-right: 4px; font-size: 13px; }

/* Approved row dimming */
tr.inv-row--approved td { opacity: 0.55; }

/* Source pill tags */
.inv-source-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: 20px; padding: 2px 10px; font-size: 11px;
  color: var(--gray-600); white-space: nowrap; font-weight: 500;
}
.inv-source-pill--contract { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.inv-source-pill--email    { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.inv-source-pill--shipment { background: var(--amber-pale); border-color: #FDE68A; color: #92400E; }
.inv-source-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* Slide-in detail panel */
.inv-slide-panel {
  position: fixed; top: 52px; right: 0; bottom: 0;
  width: 520px; max-width: 96vw;
  background: var(--white); border-left: 1px solid var(--gray-200);
  box-shadow: -8px 0 32px rgba(13,27,42,0.12);
  z-index: 500; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.inv-slide-panel.open { transform: translateX(0); }
.inv-panel-backdrop {
  display: none; position: fixed; inset: 0; z-index: 499;
  background: rgba(13,27,42,0.2);
}
.inv-panel-backdrop.open { display: block; }

.inv-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0; background: var(--navy);
}
.inv-panel-header h3 { font-size: 15px; font-weight: 600; color: var(--white); margin: 0; flex: 1; }
.inv-panel-close {
  border: none; background: rgba(255,255,255,.15); color: var(--white);
  border-radius: var(--radius); padding: 4px 10px; cursor: pointer;
  font-size: 18px; line-height: 1; transition: .15s;
}
.inv-panel-close:hover { background: rgba(255,255,255,.25); }
.inv-panel-body { flex: 1; overflow-y: auto; padding: 20px; }
.inv-panel-footer {
  flex-shrink: 0; padding: 14px 20px; border-top: 1px solid var(--gray-200);
  display: flex; gap: 10px; background: var(--white);
}

/* Discrepancy issue cards */
.inv-disc-card {
  border: 1px solid var(--red-light); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; background: #fff8f7;
}
.inv-disc-title {
  font-size: 13px; font-weight: 600; color: var(--red); margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.inv-disc-amount { font-size: 14px; font-weight: 700; }
.inv-disc-body { font-size: 12px; color: var(--gray-600); line-height: 1.55; }
.inv-disc-ref { font-size: 11px; color: var(--gray-400); margin-top: 6px; font-style: italic; }

.inv-disc-card--unsupported { border-color: #FED7AA; background: #FFFBEB; }
.inv-disc-card--unsupported .inv-disc-title { color: #92400E; }

/* Clean invoice confirmation */
.inv-clean-banner {
  background: var(--green-light); border: 1px solid #BBF7D0;
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.inv-clean-banner-icon { font-size: 22px; }
.inv-clean-banner-text { font-size: 13px; color: var(--green); font-weight: 600; }

/* Section label inside panel */
.inv-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  color: var(--gray-400); text-transform: uppercase;
  margin: 16px 0 10px;
}
.inv-section-label:first-child { margin-top: 0; }

/* Meta row (label: value pairs) */
.inv-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.inv-meta-item {}
.inv-meta-label { font-size: 11px; color: var(--gray-400); margin-bottom: 2px; }
.inv-meta-value { font-size: 13px; font-weight: 500; color: var(--navy); }

/* Generate sources info box */
.inv-sources-box {
  background: var(--green-light); border: 1px solid #BBF7D0;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px;
  font-size: 12px; color: var(--green);
}
.inv-sources-box strong { font-weight: 600; }

/* Gap diff rows (validate panel) */
.inv-gap-row {
  border: 1px solid #FED7AA; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; background: #FFFBEB;
}
.inv-gap-item { font-size: 13px; font-weight: 600; color: #92400E;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.inv-gap-explanation { font-size: 12px; color: var(--gray-600); line-height: 1.5; }

/* Draft email preview */
.inv-draft-area {
  width: 100%; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 12px; font-family: ui-monospace, monospace;
  color: var(--navy); background: var(--gray-100);
  resize: vertical; min-height: 200px; line-height: 1.55;
  box-sizing: border-box;
}

/* Dispute pending badge */
.badge-dispute { background: #FFF3E0; color: #E65100; }

/* Full-screen invoice overlay */
.inv-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: var(--gray-100); flex-direction: column; overflow: hidden;
}
.inv-overlay.open { display: flex; }
.inv-overlay-nav {
  background: var(--navy); padding: 12px 28px;
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.inv-overlay-nav-title { font-size: 14px; color: var(--white); font-weight: 600; flex: 1; }
.inv-overlay-body { flex: 1; overflow-y: auto; padding: 32px; }

/* Invoice document styles */
.inv-doc {
  max-width: 820px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 48px 56px;
  font-family: 'DM Sans', sans-serif;
}
@media print {
  .inv-overlay-nav { display: none !important; }
  .inv-overlay-body { overflow: visible; padding: 0; }
  .inv-doc { border: none; border-radius: 0; max-width: 100%; }
}
.inv-doc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid var(--navy); padding-bottom: 20px; margin-bottom: 24px;
}
.inv-doc-logo-name {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--navy);
}
.inv-doc-logo-name span { color: var(--amber); }
.inv-doc-logo-meta { font-size: 11px; color: var(--gray-400); margin-top: 6px; line-height: 1.6; }
.inv-doc-title { text-align: right; }
.inv-doc-title h2 {
  font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.5px;
}
.inv-doc-title p { font-size: 12px; color: var(--gray-400); margin-top: 4px; line-height: 1.6; }
.inv-doc-bill-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px;
}
.inv-doc-bill-block {}
.inv-doc-bill-label {
  font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px;
}
.inv-doc-bill-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.inv-doc-bill-addr { font-size: 12px; color: var(--gray-600); line-height: 1.6; margin-top: 4px; }
.inv-doc-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.inv-doc-table th {
  background: var(--navy); color: var(--white); padding: 9px 12px;
  font-size: 10px; font-weight: 600; text-align: left; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.inv-doc-table td { padding: 10px 12px; font-size: 12px; color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.inv-doc-table tr:last-child td { border-bottom: none; }
.inv-doc-table .td-desc { color: var(--navy); font-weight: 500; }
.inv-doc-table .td-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.inv-doc-table .td-source { margin-top: 4px; }
.inv-doc-table .td-right { text-align: right; font-weight: 600; color: var(--navy); }
.inv-totals { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.inv-totals-box { width: 260px; }
.inv-totals-row {
  display: flex; justify-content: space-between; font-size: 13px;
  padding: 6px 0; border-bottom: 1px solid var(--gray-100); color: var(--gray-600);
}
.inv-totals-row:last-child { border-bottom: none; }
.inv-totals-row.total {
  font-size: 15px; font-weight: 700; color: var(--navy);
  border-top: 2px solid var(--navy); margin-top: 4px; padding-top: 10px;
}
.inv-due-box {
  background: var(--navy); border-radius: var(--radius); padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.inv-due-label { font-size: 13px; color: var(--gray-400); }
.inv-due-amount { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; color: var(--amber); }
.inv-due-date { font-size: 12px; color: var(--gray-400); text-align: right; }
.inv-trail-section { margin-bottom: 24px; }
.inv-trail-label { font-size: 11px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.inv-pay-section {
  background: var(--gray-100); border-radius: var(--radius); padding: 16px 18px;
  font-size: 12px; color: var(--gray-600); line-height: 1.65; margin-bottom: 24px;
}
.inv-pay-section strong { color: var(--navy); }
.inv-doc-footer {
  border-top: 1px solid var(--gray-200); padding-top: 16px;
  font-size: 11px; color: var(--gray-400); text-align: center; line-height: 1.6;
}

