@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Sora:wght@400;500;600;700&display=swap');

:root {
  --bg: #f5fbf8;
  --surface: #ffffff;
  --surface-soft: #f6fbf9;
  --ink: #16221d;
  --muted: #6a7a73;
  --line: #e0ece6;
  --accent: #2bbf8a;
  --accent-soft: #e4f7ef;
  --green: #2bbf8a;
  --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Sora", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

body.landing {
  background: linear-gradient(180deg, #f7fdf9 0%, #edf8f3 100%);
}

body.landing::before,
body.landing::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(2px);
}

body.landing::before {
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(43, 191, 138, 0.22), transparent 60%);
}

body.landing::after {
  bottom: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(80, 210, 170, 0.18), transparent 65%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

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

.section {
  padding: 90px 0;
}

.section--tight {
  padding: 70px 0;
}

#book,
#features,
#pricing,
#resources {
  scroll-margin-top: 96px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: #7b8190;
  font-weight: 600;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: transparent;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.35);
  z-index: 80;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-form {
  display: grid;
  gap: 12px;
}

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

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-family: inherit;
  background: #ffffff;
  color: #0f172a;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.icon-btn--text {
  font-size: 1rem;
  font-weight: 600;
}

.empty-state {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.page-loader.is-visible {
  opacity: 1;
  pointer-events: all;
}

.page-loader-card {
  width: min(560px, 88vw);
  padding: 12px 20px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

body.app .page-loader-card {
  color: #f8fafc;
}

.page-loader-logo {
  display: none;
}

.page-loader-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.page-loader-message {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent-green);
  min-height: 2.2rem;
}

body.app .page-loader-message {
  color: var(--accent-green);
}

body.app .page-loader-title {
  color: var(--accent-green);
}

.page-loader-bar {
  margin-top: 12px;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.page-loader-bar span {
  display: block;
  height: 100%;
  width: 28%;
  border-radius: inherit;
  background: var(--accent-green);
  animation: loader-slide 1.8s ease-in-out infinite;
}

@keyframes loader-slide {
  0% { transform: translateX(-60%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(220%); }
}

.btn-primary {
  background: linear-gradient(135deg, #2bbf8a 0%, #53d3a5 100%);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

body.app .btn {
  padding: 9px 14px;
  font-size: 0.9rem;
}

body.app h1,
body.app h2,
body.app h3,
body.app h4 {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

body.app h1 {
  font-size: 2rem;
}

body.app h2 {
  font-size: 1.35rem;
}

body.app h3 {
  font-size: 1.1rem;
}

body.app .pill {
  font-size: 0.78rem;
  padding: 5px 12px;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost {
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d5efe3;
  background: #edf9f3;
  font-weight: 600;
  font-size: 0.85rem;
  color: #4b5563;
}

.reveal {
  animation: fadeUp 0.9s ease both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chart-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes app-fade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .app-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .chart-line {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Marketing */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, backdrop-filter 0.18s ease, box-shadow 0.18s ease;
}

body.page-scrolled .site-header {
  background: rgba(247, 253, 249, 0.9);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(224, 236, 230, 0.2);
}

body:not(.page-scrolled) .site-header {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 2px;
  color: #6b7280;
}

.nav-links a.active,
.nav-links a:hover {
  color: #111827;
}

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

body.landing .btn {
  padding: 8px 16px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 14px;
  font-weight: 600;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 0 20px;
}

.mobile-nav a {
  display: block;
  padding: 8px 0;
  font-weight: 600;
}

body.nav-open .mobile-nav {
  display: block;
}

.hero {
  padding: 80px 0 70px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 4.2vw, 4rem);
  line-height: 1.05;
  max-width: 820px;
  margin: 20px auto 14px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 24px;
}

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

.logo-row {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #9aa1ad;
}

.hero-visual {
  margin-top: 46px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%);
  border: 1px solid #deefe7;
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.booking-section {
  text-align: center;
}

.booking-head h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 8px;
}

.booking-head p {
  color: var(--muted);
  margin-bottom: 30px;
}

.booking-steps {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 28px;
}

.booking-steps .step {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e8f7ef;
  color: var(--accent);
  font-weight: 700;
}

.booking-steps .step.active {
  background: linear-gradient(135deg, #22c55e 0%, #53d3a5 100%);
  color: #ffffff;
}

.booking-steps .step.done {
  background: #16a34a;
  color: #ffffff;
}

.booking-steps .step-line {
  width: 42px;
  height: 2px;
  background: #dfece6;
}

.booking-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  align-items: start;
  text-align: left;
}

.booking-card {
  background: #ffffff;
  border: 1px solid #deefe7;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title h3 {
  margin-bottom: 4px;
}

.card-title small {
  color: var(--muted);
}

.icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e8f7ef;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.calendar-header h4 {
  margin: 0;
  min-width: 190px;
  text-align: center;
}

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

.calendar-day {
  min-height: 80px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 500;
  color: #6b7280;
  background: #f8fafc;
  font-size: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.calendar-day.label {
  min-height: auto;
  padding: 6px 0 2px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.calendar-day.muted,
.calendar-day.outside {
  background: #f3f4f6;
  color: #9ca3af;
}

.calendar-day.available {
  background: #d1fae5;
  border: 3px solid #10b981;
  color: #059669;
  cursor: pointer;
  font-weight: 700;
}

.calendar-day.available:hover {
  background: #a7f3d0;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.calendar-day.selected {
  background: #10b981;
  border: 3px solid #10b981;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.calendar-day:disabled {
  cursor: default;
}

.calendar-day .day-number {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.calendar-day .day-status {
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 600;
}

.calendar-legend .legend {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.calendar-legend .legend.available {
  background: #d1fae5;
  border: 3px solid #10b981;
}

.calendar-legend .legend.selected {
  background: #10b981;
}

.selection-card h3 {
  margin-bottom: 16px;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.selection-item .label {
  font-size: 0.78rem;
  color: #64748b;
}

.selection-note {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.82rem;
}

.booking-section-panel[hidden] {
  display: none !important;
}

.booking-panel-actions {
  margin-bottom: 10px;
}

.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-slot-btn {
  border: 1px solid #a7f3d0;
  background: #ffffff;
  color: #065f46;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.time-slot-btn:hover {
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.08);
}

.time-slot-btn.selected {
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(59, 130, 246, 0.22);
}

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

.selection-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.booking-form .field {
  display: block;
}

.booking-form .field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.booking-form .field-full {
  grid-column: 1 / -1;
}

.booking-form textarea {
  min-height: 90px;
}

.booking-confirmation {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.booking-confirmation h4 {
  margin: 0;
  color: #166534;
}

.booking-confirmation p {
  margin: 0;
  color: #166534;
}

.booking-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.divider {
  height: 1px;
  background: #e5e7eb;
  margin: 16px 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.checklist li::before {
  content: "✓";
  color: #22c55e;
  font-weight: 700;
  margin-right: 8px;
}

.visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}

.visual-tabs {
  display: inline-flex;
  gap: 8px;
  background: var(--surface-soft);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.visual-tabs span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 600;
}

.visual-tabs span.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.visual-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding-top: 16px;
}

.visual-sidebar {
  background: #f2faf6;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid #deefe7;
}

.visual-sidebar .item {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 600;
}

.visual-sidebar .item.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.visual-main {
  display: grid;
  gap: 12px;
}

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

.visual-kpi {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #deefe7;
  background: #f5fcf8;
  font-size: 0.8rem;
}

.visual-kpi strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.visual-chart {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
}

.visual-chart svg {
  width: 100%;
  height: 120px;
}

.visual-chart-caption {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 600;
}

.visual-chart-caption .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.visual-chart-caption .dot-in {
  background: #5aa98a;
}

.visual-chart-caption .dot-out {
  background: #2f8f6b;
}

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

.pricing-grid {
  grid-template-columns: repeat(2, minmax(0, 320px));
  justify-content: center;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid #deefe7;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: #cfe9dc;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.pricing-grid .feature-card:first-child {
  transform: translateY(-4px);
  border-color: #bfe4d4;
}

.pricing-grid .feature-card:first-child:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.pricing-grid .feature-card .btn {
  width: 100%;
}

.pricing-grid .feature-card:first-child .btn {
  background: linear-gradient(135deg, #2bbf8a 0%, #53d3a5 100%);
  color: #ffffff;
  border-color: transparent;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e6f7ef;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 14px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
}

.split-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid #deefe7;
  box-shadow: var(--shadow-sm);
}

.split-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.section-intro h2 {
  margin-bottom: 10px;
}

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

.faq-card {
  border-radius: var(--radius-lg);
  border: 1px solid #deefe7;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-card__head {
  padding: 16px 20px;
  background: linear-gradient(135deg, #22c55e 0%, #2563eb 100%);
  color: #ffffff;
}

.faq-card__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.faq-card__body {
  padding: 14px 20px 18px;
  display: grid;
  gap: 12px;
}

.faq-card details {
  border-top: 1px solid #edf2f7;
  padding-top: 12px;
}

.faq-card details:first-child {
  border-top: none;
  padding-top: 0;
}

.faq-card summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-card summary::marker {
  content: '';
}

.faq-card summary::after {
  content: '+';
  float: right;
  color: #166534;
  font-weight: 700;
}

.faq-card details[open] summary::after {
  content: '–';
}

.faq-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.showcase-grid {
  display: grid;
  gap: 24px;
}

.showcase-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid #deefe7;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.showcase-card.reverse {
  grid-template-columns: 1fr 1.1fr;
}

.showcase-card.reverse .showcase-media {
  order: 2;
}

.showcase-media {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.app-embed {
  width: 120%;
  height: 420px;
  border: 0;
  transform: scale(0.85);
  transform-origin: top left;
  pointer-events: none;
}

.showcase-body h3 {
  margin-bottom: 8px;
}

.split-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.split-card li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.trial-hero {
  padding-top: 56px;
}

.trial-intro {
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
}

.trial-intro h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08;
  margin-top: 14px;
  margin-bottom: 14px;
}

.trial-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #5f6e67;
}

.trial-summary {
  border-color: #d5ebdf;
  background: #fcfffd;
}

.trial-steps {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

.trial-steps li strong {
  display: block;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1rem;
  color: #15231f;
}

.trial-steps li span {
  display: block;
  color: #5f6e67;
  font-size: 0.92rem;
  margin-top: 2px;
}

.cta {
  background: linear-gradient(135deg, #2bbf8a 0%, #53d3a5 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 70px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta p {
  color: rgba(255, 255, 255, 0.75);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer a {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

/* App */
body.app {
  font-family: "Manrope", "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: #0f172a;
  background: linear-gradient(180deg, #f0fdf4 0%, #eff6ff 100%);
  --gradient-primary: linear-gradient(135deg, #22c55e 0%, #2563eb 100%);
  --gradient-emerald: linear-gradient(to right, #10b981, #059669);
  --gradient-cyan: linear-gradient(to right, #3b82f6, #06b6d4);
  --gradient-purple: linear-gradient(to right, #a855f7, #4f46e5);
  --bg-light-green: #f0fdf4;
  --bg-light-blue: #eff6ff;
  --bg-light-indigo: #eef2ff;
  --text-primary: #0f172a;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  --text-green: #166534;
  --text-blue: #2563eb;
  --accent-green: #22c55e;
  --accent-green-dark: #16a34a;
  --accent-blue: #2563eb;
  --accent-yellow: #facc15;
  --accent-emerald: #10b981;
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --accent: var(--accent-green);
  --accent-soft: #dcfce7;
  --blue: var(--accent-blue);
  --green: var(--accent-green);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 34px rgba(15, 23, 42, 0.08);
}

body.app.theme-dark {
  color: #e2e8f0;
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-green: #86efac;
  --text-blue: #93c5fd;
  --accent-green: #34d399;
  --accent-green-dark: #10b981;
  --accent-blue: #60a5fa;
  --line: #243142;
  --surface: #111c2d;
  --surface-soft: #0f172a;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --shadow-sm: 0 10px 24px rgba(2, 6, 23, 0.45);
  --shadow-md: 0 18px 40px rgba(2, 6, 23, 0.5);
}

body.app.theme-dark::before {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.2), transparent 60%);
}

body.app.theme-dark::after {
  background: radial-gradient(circle, rgba(96, 165, 250, 0.14), transparent 65%);
}

body.app.theme-dark .sidebar {
  background: linear-gradient(180deg, #0f1a2a 0%, #0b1626 100%);
}

body.app.theme-dark .profile,
body.app.theme-dark .crumb-pill,
body.app.theme-dark .search,
body.app.theme-dark .meta-pill,
body.app.theme-dark .filter-search,
body.app.theme-dark .meeting-search,
body.app.theme-dark .quick-card,
body.app.theme-dark .kpi-card,
body.app.theme-dark .chart-card,
body.app.theme-dark .team-card,
body.app.theme-dark .list-card,
body.app.theme-dark .meeting-card,
body.app.theme-dark .card-panel,
body.app.theme-dark .table-row,
body.app.theme-dark .client-card,
body.app.theme-dark .chat-card,
body.app.theme-dark .ai-search-panel,
body.app.theme-dark .ai-results-panel,
body.app.theme-dark .collection-row,
body.app.theme-dark .vendor-row,
body.app.theme-dark .bank-account-row,
body.app.theme-dark .bank-provider-card,
body.app.theme-dark .subscription-card,
body.app.theme-dark .input,
body.app.theme-dark .select,
body.app.theme-dark .tab-row button.active,
body.app.theme-dark .action-menu,
body.app.theme-dark .modal-card {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text-primary);
}

body.app.theme-dark .meta-select,
body.app.theme-dark .search input,
body.app.theme-dark .filter-search input,
body.app.theme-dark .meeting-search input,
body.app.theme-dark .input,
body.app.theme-dark .select,
body.app.theme-dark .table-action,
body.app.theme-dark .icon-btn,
body.app.theme-dark .btn-secondary,
body.app.theme-dark .btn-ghost {
  color: var(--text-primary);
}

body.app.theme-dark .table-action,
body.app.theme-dark .icon-btn,
body.app.theme-dark .btn-secondary,
body.app.theme-dark .btn-ghost,
body.app.theme-dark .pill-btn,
body.app.theme-dark .settings-link,
body.app.theme-dark .tab-row {
  background: #0f172a;
  border-color: var(--line);
}

body.app.theme-dark .table-row .meta,
body.app.theme-dark .meta,
body.app.theme-dark .bank-account-meta small,
body.app.theme-dark .bank-details,
body.app.theme-dark .profile-meta small,
body.app.theme-dark .settings-status,
body.app.theme-dark p {
  color: var(--text-secondary);
}

body.app.theme-dark .bank-account-detail {
  background: rgba(15, 23, 42, 0.65);
  border-color: var(--line);
  color: var(--text-secondary);
}

body.app.theme-dark .sidebar-nav a,
body.app.theme-dark .sidebar-favs a,
body.app.theme-dark .settings-link,
body.app.theme-dark .topbar,
body.app.theme-dark .app-footer {
  color: var(--text-secondary);
}

body.app.theme-dark .sidebar-nav a.active,
body.app.theme-dark .sidebar-nav a:hover,
body.app.theme-dark .sidebar-favs a:hover {
  background: #111f33;
  color: var(--text-primary);
}

body.app.theme-dark .nav-badge {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

body.app.theme-dark .status-pill.neutral {
  background: #172235;
  border-color: #314155;
  color: #cbd5e1;
}

body.app.theme-dark .status-pill.info {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

body.app.theme-dark .status-pill.warn {
  background: rgba(248, 113, 113, 0.13);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

body.app.theme-dark .status-pill.success {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
  color: #86efac;
}

body.app.theme-dark .settings-link.active {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
  color: #86efac;
}

body.app.theme-dark .typing-dot {
  background: #cbd5e1;
}

body.app.theme-dark .ai-chat-title p,
body.app.theme-dark .ai-chat-composer-meta,
body.app.theme-dark .ai-msg-label,
body.app.theme-dark .ai-context-body p,
body.app.theme-dark .ai-context-status {
  color: var(--text-secondary);
}

body.app.theme-dark .ai-chat-title h1,
body.app.theme-dark .ai-msg-content,
body.app.theme-dark .ai-context-grid strong {
  color: var(--text-primary);
}

body.app.theme-dark .ai-context-panel > summary,
body.app.theme-dark .ai-context-body,
body.app.theme-dark .ai-context-grid div,
body.app.theme-dark .ai-empty-state,
body.app.theme-dark .ai-empty-prompt,
body.app.theme-dark .ai-msg--assistant .ai-msg-bubble,
body.app.theme-dark .ai-chat-thread-shell,
body.app.theme-dark .ai-chat-composer {
  background: #0f172a;
  border-color: var(--line);
}

body.app.theme-dark .ai-context-grid span,
body.app.theme-dark .ai-chat-composer textarea::placeholder {
  color: var(--text-tertiary);
}

body.app.theme-dark .ai-chat-composer textarea,
body.app.theme-dark .ai-empty-prompt,
body.app.theme-dark .ai-msg-copy,
body.app.theme-dark .ai-context-panel > summary {
  color: var(--text-primary);
}

body.app.theme-dark .ai-msg--user .ai-msg-bubble {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
}

body.app.theme-dark .ai-msg-content code {
  background: #172235;
  border-color: #2a3950;
  color: #e2e8f0;
}

body.app.theme-dark .ai-msg-content pre {
  background: #020617;
  border-color: #1e293b;
}

body.app.theme-dark .ai-msg-copy {
  background: #111c2d;
  border-color: #243142;
  color: #cbd5e1;
}

body.app.theme-dark .ai-msg-copy:hover {
  border-color: #334155;
  color: #e2e8f0;
}

body.app.theme-dark .ai-typing {
  background: #111c2d;
  border-color: #243142;
}

body.app.theme-dark .ai-chat-composer-shell {
  background: linear-gradient(180deg, rgba(11, 18, 32, 0) 0%, rgba(11, 18, 32, 0.95) 35%, rgba(11, 18, 32, 1) 100%);
}

body.app::before,
body.app::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(2px);
}

body.app::before {
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18), transparent 60%);
}

body.app::after {
  bottom: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 65%);
}

body.app .brand {
  font-size: 0.92rem;
}

body.app h1,
body.app h2,
body.app h3,
body.app h4 {
  font-family: "Manrope", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.015em;
}

body.app .brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.85rem;
}

body.app .btn {
  padding: 7px 13px;
  font-size: 0.82rem;
}

body.app .btn-primary {
  background: linear-gradient(135deg, #2bbf8a 0%, #53d3a5 100%);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border-right: 1px solid var(--line);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #cbd5f5;
}

.profile-meta {
  line-height: 1.2;
}

.profile-name {
  font-weight: 600;
}

.profile-meta small {
  color: #9aa1ad;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-badge {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}

.sidebar-section {
  margin-top: 10px;
  font-size: 0.66rem;
  color: #9aa1ad;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.sidebar-favs {
  display: grid;
  gap: 6px;
}

.sidebar-favs a {
  padding: 8px 10px;
  border-radius: 10px;
  color: #6f7782;
  font-size: 0.8rem;
}

.sidebar-favs a:hover {
  background: var(--surface);
  color: var(--ink);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.app-main {
  padding: 18px 24px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.crumb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #111827;
  font-weight: 600;
  font-size: 0.78rem;
}

.search {
  flex: 1;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.search input {
  border: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 0.82rem;
  color: #111827;
  background: transparent;
}

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.meta-pill--select {
  gap: 6px;
}

.meta-label {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.meta-select {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #0f172a;
  padding: 0;
  cursor: pointer;
}

.meta-select:focus {
  outline: none;
}

.meta-pill strong {
  font-weight: 700;
  color: #0f172a;
}

.meta-pill--ghost {
  background: transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.filter-search,
.meeting-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.filter-search {
  min-width: 220px;
}

.meeting-search {
  margin: 8px 0 10px;
}

.filter-search input,
.meeting-search input {
  border: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 0.82rem;
  color: #111827;
  background: transparent;
}

.expense-breakdown {
  grid-column: 1 / -1;
}

.expense-chart {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.donut-wrap {
  position: relative;
  width: 140px;
  height: 140px;
}

.donut {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 16;
}

.donut-segment {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-total {
  font-weight: 700;
  color: #0f172a;
}

.expense-legend {
  display: grid;
  gap: 10px;
  min-width: 220px;
  flex: 1;
}

.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: #475569;
}

.expense-item span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.expense-value {
  font-weight: 600;
  color: #0f172a;
}

.aging-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.aging-item {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
}

.aging-item strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.collections-header {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.collections-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.collection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.8rem;
}

.collection-row small {
  color: #64748b;
}

.collection-actions {
  display: inline-flex;
  gap: 6px;
}

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

.vendor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.8rem;
}

.vendor-row small {
  color: #64748b;
}

.alert-card {
  border-left: 4px solid #f97316;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
}

.alert-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.alert-item.good {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.tax-body {
  display: grid;
  gap: 10px;
}

.tax-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body.app.theme-dark .tax-amount {
  color: var(--text-primary);
}

.tax-amount.is-updated {
  transform: translateY(-1px) scale(1.02);
  opacity: 0.95;
}

.tax-row {
  display: grid;
  gap: 6px;
}

.bank-status {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: #64748b;
}

.bank-warning {
  font-size: 0.78rem;
  color: #b45309;
}


.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn--ghost {
  background: transparent;
}

.icon-btn--tiny {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.app-reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: app-fade 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 16px;
}

.page-head h1 {
  font-size: 1.35rem;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.avatar-group {
  display: flex;
  align-items: center;
  min-height: 26px;
}

.avatar-group .avatar-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--avatar-bg, #c7d2fe);
  border: 2px solid #ffffff;
  margin-left: -8px;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.avatar-group .avatar-chip:first-child {
  margin-left: 0;
}

.avatar-group .avatar-chip.is-invited {
  opacity: 0.75;
}

.avatar-group .avatar-chip.is-self {
  outline: 1px solid #22c55e;
}

.avatar-group .count {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #d9dde4;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #6b7280;
  margin-left: -6px;
}

body.app.theme-dark .avatar-group .avatar-chip {
  border-color: #0f172a;
}

body.app.theme-dark .avatar-group .count {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

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

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-card[data-quick-action] {
  cursor: pointer;
}

.quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: var(--green);
}

.quick-icon.blue,
.quick-icon.green,
.quick-icon.amber,
.quick-icon.pink {
  background: #dbeafe;
  color: var(--blue);
}

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

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

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

.kpi-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-row .kpi-card:nth-child(1)::before,
.kpi-row .kpi-card:nth-child(2)::before,
.kpi-row .kpi-card:nth-child(3)::before,
.kpi-row .kpi-card:nth-child(4)::before,
.kpi-row .kpi-card:nth-child(5)::before,
.kpi-row .kpi-card:nth-child(6)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: var(--green);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  font-size: 0.76rem;
}

.kpi-card h3 {
  margin: 8px 0 4px;
  font-size: 1.1rem;
}

.kpi-card h3.negative {
  color: #ef4444;
}

.kpi-card h3.positive {
  color: #16a34a;
}

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

.content-grid--single {
  grid-template-columns: 1fr;
}

.chart-card,
.team-card,
.list-card,
.meeting-card,
.card-panel {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
}

.forecast-toolbar {
  display: grid;
  gap: 12px;
}

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

.forecast-header small {
  color: #64748b;
}

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

.pill-btn.active {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}

.risk-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #fca5a5;
  background: #fff1f2;
}

.risk-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #7f1d1d;
}

.risk-value {
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ef4444;
}

.risk-copy {
  margin-top: 4px;
  font-size: 0.82rem;
  color: #7f1d1d;
}

.risk-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #ef4444;
  color: #ffffff;
}

.risk-banner.warn {
  border-color: #fdba74;
  background: #fff7ed;
}

.risk-banner.warn .risk-title,
.risk-banner.warn .risk-copy,
.risk-banner.warn .risk-value {
  color: #b45309;
}

.risk-banner.warn .risk-badge {
  background: #f97316;
}

.risk-banner.good {
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.risk-banner.good .risk-title,
.risk-banner.good .risk-copy,
.risk-banner.good .risk-value {
  color: #166534;
}

.risk-banner.good .risk-badge {
  background: #22c55e;
}

.forecast-assumptions .assumption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.forecast-assumptions .assumption-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
}

.forecast-assumptions .assumption-item strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.assumption-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid #38bdf8;
  border-radius: 10px;
  background: #f0f9ff;
  color: #0f172a;
  font-size: 0.78rem;
}

.impact-grid {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.impact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
}

.impact-item strong {
  font-size: 1rem;
  color: #0f172a;
}

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

.decision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.8rem;
}

.decision-impact .decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.decision-card {
  border: 1px solid #fecaca;
  background: #fff1f2;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.decision-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7f1d1d;
}

.decision-card .decision-row {
  padding: 6px 0;
  border: none;
  background: transparent;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 10px 8px 0;
  min-height: 220px;
}

.bar-group {
  display: grid;
  align-items: end;
  gap: 10px;
}

.bar-stack {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 180px;
}

.bar {
  width: 48%;
  border-radius: 10px 10px 4px 4px;
  background: #93c5fd;
  box-shadow: var(--shadow-sm);
}

.bar.actual {
  background: #34d399;
}

.bar-label {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.projection-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  font-size: 0.78rem;
  color: #64748b;
}

.projection-label {
  font-weight: 600;
  color: #475569;
  min-width: 170px;
}

.range-input {
  flex: 1;
  accent-color: var(--green);
}

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

.line-chart {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: start;
}

.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 220px;
  font-size: 0.72rem;
  color: #8b92a0;
}

.chart-canvas {
  display: flex;
  flex-direction: column;
  position: relative;
}

.line-chart svg {
  width: 100%;
  height: 220px;
}

.chart-grid line {
  stroke: #e2e8f0;
  stroke-dasharray: 4 6;
}

.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: chart-draw 1.2s ease forwards;
}

.chart-line.revenue {
  stroke: var(--green);
}

.chart-line.expense {
  stroke: var(--blue);
}

.chart-area {
  opacity: 0.95;
}

.chart-area.revenue {
  fill: url(#revAreaGradient);
}

.chart-area.expense {
  fill: url(#expAreaGradient);
}

.chart-points .chart-point {
  fill: #ffffff;
  stroke-width: 2.2;
  opacity: 0.8;
  transition: transform 0.15s ease, opacity 0.15s ease;
  transform-origin: center;
}

.chart-point.revenue {
  stroke: var(--green);
}

.chart-point.expense {
  stroke: var(--blue);
}

.chart-point.active {
  opacity: 1;
  transform: scale(1.25);
}

.chart-crosshair {
  stroke: #94a3b8;
  stroke-width: 1.4;
  stroke-dasharray: 4 6;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-crosshair.show {
  opacity: 0.9;
}

.chart-tooltip {
  position: absolute;
  min-width: 136px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  padding: 8px 10px;
  font-size: 0.74rem;
  color: #334155;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 3;
}

.chart-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #8b92a0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend-dot.dynamic {
  background: var(--dot);
}

.legend-dot.blue {
  background: var(--blue);
}

.legend-dot.green {
  background: var(--green);
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-controls button {
  border: 1px solid var(--line);
  background: #eff6ff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #6b7280;
}

.chart-controls button.active {
  background: var(--accent);
  color: #ffffff;
}


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

.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.74rem;
}

.meeting-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.meeting-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 10px;
}

.meeting-item.quick-link {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.meeting-item.quick-link:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

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

.scenario-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meeting-item.active {
  border-color: #a7f3d0;
  background: #ecfdf3;
  box-shadow: var(--shadow-sm);
}

.meeting-item small {
  color: #6b7280;
}

.quick-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-stat-value.positive {
  color: #16a34a;
}

.quick-stat-value.negative {
  color: #ef4444;
}

.team-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-item .avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.task-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.task-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 10px;
}

.task-item small {
  color: var(--muted);
}

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

.project-card {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.project-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #dcfce7;
  display: grid;
  place-items: center;
  color: var(--green);
}

.status-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}

.status-badge.warn {
  background: #f6e6e7;
  color: #b84b4f;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.select {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: #374151;
  font-family: inherit;
}

.tab-row {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #eff6ff;
}

.tab-row button {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
}

.tab-row button.active {
  background: #ffffff;
  border-color: var(--line);
  color: #111827;
  box-shadow: var(--shadow-sm);
}

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

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.table-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.table-row.has-actions {
  grid-template-columns: 1.6fr 0.85fr 0.85fr auto auto;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.table-action {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.table-action.danger {
  border-color: #f0d3d5;
  color: #b84b4f;
  background: #fff7f7;
}

.table-row .meta {
  color: #6b7280;
  font-size: 0.78rem;
}

.meta {
  color: #6b7280;
  font-size: 0.82rem;
}

.amount {
  font-weight: 700;
  font-size: 0.95rem;
}

.amount.positive {
  color: #166534;
}

.amount.negative {
  color: #b84b4f;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid #bbf7d0;
  background: #dcfce7;
  color: #166534;
  text-align: center;
}

.status-pill.neutral {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.status-pill.info {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-pill.warn {
  background: #f6e6e7;
  border-color: #f0d3d5;
  color: #b84b4f;
}

.status-pill.success {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

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

.client-card {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.client-card .client-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.client-stats {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: #6b7280;
}

.client-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

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

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-field label {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
}

.form-field .input,
.form-field .select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
}

.chat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.ai-chat-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 980px;
  margin: 14px auto 0;
  min-height: calc(100vh - 160px);
}

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

.ai-chat-title h1 {
  margin: 0;
  font-size: 1.42rem;
  letter-spacing: -0.02em;
}

.ai-chat-title p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.ai-chat-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-context-panel {
  position: relative;
}

.ai-context-panel > summary {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
}

.ai-context-panel > summary::-webkit-details-marker {
  display: none;
}

.ai-context-panel[open] > summary {
  border-color: #a7f3d0;
  color: #059669;
}

.ai-context-body {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  padding: 14px;
  display: grid;
  gap: 10px;
  z-index: 6;
}

.ai-context-body p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.ai-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-context-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.ai-context-grid span {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-context-grid strong {
  color: #0f172a;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.ai-context-status {
  color: #64748b;
  font-size: 0.76rem;
}

.ai-chat-thread-shell {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ai-chat-thread {
  height: 100%;
  max-height: calc(100vh - 315px);
  min-height: 340px;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  gap: 14px;
  scroll-behavior: smooth;
}

.ai-empty-state {
  margin: auto;
  max-width: 620px;
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.ai-empty-state h3 {
  margin: 0;
  font-size: 1rem;
}

.ai-empty-state p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
}

.ai-empty-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-empty-prompt {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.83rem;
  text-align: left;
  padding: 9px 10px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.ai-empty-prompt:hover {
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.ai-msg {
  display: flex;
}

.ai-msg--assistant {
  justify-content: flex-start;
}

.ai-msg--user {
  justify-content: flex-end;
}

.ai-msg-bubble {
  width: fit-content;
  max-width: min(760px, 85%);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  line-height: 1.55;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.02);
}

.ai-msg--assistant .ai-msg-bubble {
  background: #ffffff;
}

.ai-msg--user .ai-msg-bubble {
  background: #ecfdf3;
  border-color: #b7ebd0;
}

.ai-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ai-msg-label {
  color: #64748b;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-msg-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  line-height: 1.1;
}

.ai-msg-copy:hover {
  border-color: #bfdbfe;
  color: #1e40af;
}

.ai-msg-content {
  color: #0f172a;
  font-size: 0.93rem;
  word-break: break-word;
}

.ai-msg-content p {
  margin: 0;
}

.ai-msg-content p + p {
  margin-top: 10px;
}

.ai-msg-content ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.ai-msg-content li + li {
  margin-top: 4px;
}

.ai-msg-content code {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 0.84em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.ai-msg-content pre {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 9px 12px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
  opacity: 0.35;
  animation: ai-typing 0.9s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes ai-typing {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.ai-chat-composer-shell {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 6px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(244, 252, 248, 0) 0%, rgba(244, 252, 248, 0.94) 30%, rgba(244, 252, 248, 1) 100%);
}

.ai-chat-composer {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 9px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.ai-chat-composer textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 180px;
  padding: 9px 10px;
  background: transparent;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.45;
}

.ai-chat-composer textarea::placeholder {
  color: #94a3b8;
}

.ai-chat-send.btn {
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: none;
}

.ai-chat-send.btn:disabled {
  opacity: 0.6;
}

.ai-chat-composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.74rem;
  padding: 0 3px;
}

.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.85rem;
}

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

.pill-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: #6b7280;
  font-weight: 600;
}

@media (max-width: 760px) {
  .ai-chat-page {
    min-height: calc(100vh - 142px);
    margin-top: 8px;
  }

  .ai-chat-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ai-chat-title h1 {
    font-size: 1.14rem;
  }

  .ai-chat-title p {
    font-size: 0.84rem;
  }

  .ai-chat-controls {
    justify-content: space-between;
  }

  .ai-context-body {
    right: auto;
    left: 0;
    width: min(92vw, 360px);
  }

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

  .ai-chat-thread {
    max-height: calc(100vh - 330px);
    min-height: 270px;
    padding: 12px;
  }

  .ai-empty-prompts {
    grid-template-columns: 1fr;
  }

  .ai-msg-bubble {
    max-width: 92%;
    padding: 10px 11px;
  }

  .ai-chat-composer {
    padding: 8px;
    gap: 6px;
  }

  .ai-chat-send.btn {
    min-width: 74px;
  }

  .ai-chat-composer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.quick-card:hover,
.kpi-card:hover,
.chart-card:hover,
.team-card:hover,
.list-card:hover,
.meeting-card:hover,
.project-card:hover,
.table-row:hover,
.client-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.icon-btn:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stacked-cards {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.app-footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Import data */
.import-steps {
  margin-bottom: 16px;
}

.import-drop {
  margin-top: 12px;
}

.dropzone {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px;
  background: var(--surface-soft);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: #f0fdf4;
}

.drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.drop-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-green-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.drop-title {
  font-weight: 600;
}

.drop-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.import-input {
  display: none;
}

.import-files {
  margin-top: 16px;
}

.import-files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 18px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #0f766e;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.file-details {
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
}

.file-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

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

.file-select {
  min-width: 160px;
}

.import-mapping {
  margin-top: 16px;
}

.mapping-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mapping-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mapping-row label {
  min-width: 160px;
  font-weight: 600;
}

.mapping-row select {
  flex: 1;
}

.preview-table {
  margin-top: 16px;
}

.preview-meta {
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.preview-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.preview-table th,
.preview-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

.preview-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

/* Toasts */
.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 10px 14px;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #ef4444;
}

/* Action menu */
.action-menu {
  position: fixed;
  min-width: 220px;
  max-width: 280px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  z-index: 10000;
  padding: 8px;
  display: none;
}

.action-menu.open {
  display: block;
}

.action-menu-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.action-menu-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px 4px;
}

.action-menu-btn,
.action-menu-sub {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.action-menu-btn:hover,
.action-menu-sub:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.22);
}

.action-menu-sub.active {
  color: var(--text-secondary);
}

.action-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

.menu-open {
  border-color: rgba(34, 197, 94, 0.4) !important;
}

.card-collapsed > :not(.list-header):not(.chart-header):not(.kpi-head) {
  display: none !important;
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-link {
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.04);
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.settings-link.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.settings-status {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.84rem;
  color: #64748b;
}

.settings-status.success {
  color: #047857;
}

.settings-status.error {
  color: #b91c1c;
}

.bank-header-actions {
  display: flex;
  gap: 10px;
}

.bank-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.bank-provider-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.04);
}

.bank-provider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bank-provider-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.bank-provider-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
}

.bank-provider-badge.outline {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.bank-accounts {
  display: grid;
  gap: 12px;
}

.bank-account-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.bank-account-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-account-meta small {
  color: var(--text-secondary);
}

.bank-account-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.bank-account-detail {
  font-size: 0.75rem;
  line-height: 1.1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text-secondary);
}

.bank-account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.bank-details {
  display: block;
  color: var(--text-secondary);
  margin-top: 4px;
}

.automation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-card {
  border-color: #fca5a5;
  background: #fff5f5;
}

.danger-title {
  color: #b91c1c;
}

.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.subscription-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subscription-title {
  font-weight: 600;
}

.subscription-price {
  font-weight: 700;
  color: var(--text-primary);
}

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

.sidebar-backdrop {
  display: none;
}

.sidebar-toggle {
  display: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}

.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 1024px) {
  .nav-links,
  .nav-actions .btn-secondary {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .logo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid,
  .split-grid,
  .faq-grid,
  .showcase-card,
  .footer-grid,
  .quick-actions,
  .kpi-row,
  .kpi-row--wide,
  .content-grid,
  .project-grid,
  .client-grid,
  .form-grid,
  .booking-grid {
    grid-template-columns: 1fr;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 30;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 20;
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .showcase-card.reverse .showcase-media {
    order: 0;
  }
  .app-embed {
    width: 140%;
    height: 360px;
    transform: scale(0.75);
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search {
    max-width: none;
  }
  .topbar-meta {
    margin-left: 0;
    justify-content: flex-start;
  }
  .visual-body {
    grid-template-columns: 1fr;
  }
  .visual-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .table-row {
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: left;
  }
  .app-embed {
    width: 160%;
    height: 320px;
    transform: scale(0.7);
  }
  .calendar-header h4 {
    min-width: 160px;
    font-size: 1rem;
  }
  .calendar-day {
    min-height: 66px;
    font-size: 15px;
  }
  .calendar-day .day-number {
    font-size: 20px;
  }
  .calendar-day .day-status {
    font-size: 10px;
  }
  .time-slot-grid {
    grid-template-columns: 1fr;
  }
}

.admin-nav {
  margin-top: 4px;
}

.admin-only {
  display: none;
}

.sidebar-section.admin-only.is-visible {
  display: block;
}

nav.admin-only.is-visible {
  display: grid;
}


.admin-slot-date {
  font-weight: 700;
  margin: 18px 0 8px;
  color: #0f172a;
}

.admin-slot-list {
  display: grid;
  gap: 10px;
}

.admin-slot-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.admin-slot-item small {
  color: #6b7280;
}

.admin-slot-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-slot-actions .btn {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.admin-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: #6b7280;
  text-align: center;
  font-size: 0.85rem;
}

.auth {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef8f3 0%, #f7fbff 45%, #ffffff 100%);
  color: var(--text-primary);
}

.site-header--auth .nav-shell {
  padding: 18px 0;
}

.auth-main {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
}

.auth-main--split {
  align-items: stretch;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 28px;
  align-items: center;
}

.auth-copy {
  padding: 28px 12px 28px 0;
}

.auth-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.02;
  margin: 18px 0 14px;
}

.auth-copy p {
  max-width: 560px;
  font-size: 1.02rem;
}

.auth-context {
  margin-top: 22px;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}

.auth-context__row {
  display: grid;
  gap: 6px;
}

.auth-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.auth-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-primary);
  font-weight: 500;
}

.auth-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.auth-card {
  width: min(420px, 90vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-card--wide {
  width: min(520px, 100%);
  text-align: left;
}

.auth-card h1 {
  margin: 12px 0;
  font-size: 2rem;
}

.auth-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.auth-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 6px;
  border-radius: 999px;
  background: #edf6f2;
  border: 1px solid #dcece4;
  margin-bottom: 18px;
}

.auth-tab {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab.is-active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

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

.auth-form .form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.auth-note {
  margin: -2px 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.auth-submit,
.auth-secondary {
  width: 100%;
}

.auth-secondary {
  margin-top: -4px;
}

.auth-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-status--info {
  background: #edf6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.auth-status--success {
  background: #ebfbf3;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.auth-status--error {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.auth-meta {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.sidebar-logout {
  margin: 12px 12px 0;
  border: 1px solid var(--line);
  color: var(--text-secondary);
}

.auth-required .app-shell {
  opacity: 0;
  pointer-events: none;
}

.auth-required.auth-gate-visible .app-shell {
  opacity: 1;
  pointer-events: auto;
}

.auth-required.auth-ok .app-shell {
  opacity: 1;
  pointer-events: auto;
}

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

  .auth-copy {
    padding: 0;
  }
}
