/* === SPLASH === */
.splash {
  background: linear-gradient(160deg, var(--lfm-blue-800) 0%, var(--lfm-blue-700) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
}

.splash .logo {
  margin-bottom: 32px;
  animation: splash-logo 0.8s var(--ease-spring);
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash .logo img {
  height: 90px !important;
  width: auto !important;
}

.splash .tagline {
  font-size: var(--text-lg);
  opacity: 0.85;
  text-align: center;
  margin-bottom: 60px;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.splash .loader-dots {
  color: white;
}

@keyframes splash-logo {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* === AUTH === */
.auth {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: white;
  padding: 60px 28px 24px;
}

.auth-brand {
  text-align: center;
  margin: 12px 0 32px;
}

.auth-brand .logo {
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand .logo img {
  height: 48px !important;
  width: auto !important;
}

.auth-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: var(--text-base);
  color: var(--gray-500);
  margin-bottom: 24px;
}

.auth-form {
  flex: 1;
}

.auth-footer {
  margin-top: auto;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--gray-500);
  padding-top: 16px;
}

.auth-link {
  color: var(--lfm-blue-700);
  font-weight: var(--weight-semibold);
}

.auth-link.muted {
  color: var(--gray-500);
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: var(--text-sm);
  color: var(--lfm-blue-700);
  font-weight: var(--weight-medium);
  margin: -8px 0 16px;
}

/* === Captcha === */
.captcha-box {
  background: white;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.captcha-check {
  width: 28px;
  height: 28px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: white;
  transition: all var(--dur-base) var(--ease-out);
}

.captcha-check.checking::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--lfm-blue-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.captcha-check.checked {
  background: var(--success);
  border-color: var(--success);
}

.captcha-label {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.captcha-brand {
  font-size: var(--text-xs);
  color: var(--gray-500);
  text-align: right;
  line-height: 1.2;
}

/* === Biometric === */
.biometric-illustration {
  width: 160px;
  height: 160px;
  margin: 24px auto;
  position: relative;
}

.biometric-illustration.pulse {
  animation: pulse-soft 1.6s var(--ease-out) infinite;
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.face-id-success {
  color: var(--success);
  animation: pop 0.4s var(--ease-spring);
}

@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* === HOME === */
/* === Brand strip (top-of-page LFM band) === */
.brand-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 0;
  gap: 12px;
  min-height: 36px;
}

.brand-strip-logo {
  height: 24px;
  width: auto;
  opacity: 0.95;
}

.home-header {
  padding: 4px 20px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.home-header-text {
  flex: 1;
}

.home-greeting {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--gray-950);
  line-height: 1.2;
}

.home-sub {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--lfm-blue-800);
}

.bell:hover {
  background: var(--gray-100);
}

.bell .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.hero-card {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--lfm-blue-800) 0%, var(--lfm-blue-700) 100%);
  color: white;
  border-radius: var(--radius-2xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 181, 68, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  bottom: 16px;
  right: -30px;
  height: 80px;
  width: auto;
  opacity: 0.08;
  filter: brightness(0) invert(1);
  pointer-events: none;
  user-select: none;
}

.hero-label {
  font-size: var(--text-xs);
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.hero-amount {
  font-size: var(--text-4xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--accent-mint);
  font-weight: var(--weight-medium);
  margin-bottom: 6px;
}

.hero-subinfo {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-bottom: 16px;
}

.hero-stat-row {
  display: flex;
  gap: 8px;
}

.hero-fab {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: var(--lfm-blue-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(245, 181, 68, 0.4);
  transition: transform var(--dur-fast) var(--ease-spring);
  z-index: 2;
}

.hero-fab:hover {
  transform: scale(1.05);
}

.quick-actions {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 16px;
  scroll-snap-type: x mandatory;
}

.quick-action {
  flex-shrink: 0;
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
  position: relative;
  scroll-snap-align: start;
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lfm-blue-50);
  color: var(--lfm-blue-800);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 5px;
  font-size: 8.5px;
}

.section {
  padding: 8px 16px 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}

.section-link {
  font-size: var(--text-sm);
  color: var(--lfm-blue-700);
  font-weight: var(--weight-medium);
}

/* Contract carousel */
.contracts-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 4px;
  scroll-snap-type: x mandatory;
}

.contract-card-mini {
  flex-shrink: 0;
  width: 240px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform var(--dur-fast) var(--ease-out);
}

.contract-card-mini:active {
  transform: scale(0.98);
}

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

.contract-card-mini h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.contract-card-mini .ref {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.contract-card-mini .amount {
  font-size: var(--text-2xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.contract-card-mini .rend {
  font-size: var(--text-xs);
  color: var(--success);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 4px;
}

.spark {
  margin-top: 8px;
  height: 36px;
}

/* Offer card */
.offer-card {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--accent-amber) 0%, #F59E0B 100%);
  color: var(--lfm-blue-900);
  border-radius: var(--radius-xl);
  padding: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.offer-card .offer-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.offer-card h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.offer-card p {
  font-size: var(--text-sm);
  margin-bottom: 14px;
  opacity: 0.85;
}

.offer-card .offer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lfm-blue-900);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.offer-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  pointer-events: none;
}

/* Last operation */
.op-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border-radius: var(--radius-lg);
  margin: 0 16px 12px;
  cursor: pointer;
  transition: transform var(--dur-fast);
}

.op-row:active {
  transform: scale(0.98);
}

.op-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.op-icon.vc, .op-icon.vp { background: #D1FAE5; color: var(--success); }
.op-icon.arbitrage { background: #DBEAFE; color: var(--info); }
.op-icon.rachat { background: #FEE2E2; color: var(--error); }
.op-icon.avance { background: #FEF3C7; color: var(--warning); }

.op-info {
  flex: 1;
  min-width: 0;
}

.op-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-sub {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: 2px;
}

.op-amount {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.op-amount.positive { color: var(--success); }
.op-amount.negative { color: var(--error); }

/* Conseiller card */
.conseiller-card {
  margin: 0 16px 16px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.conseiller-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.conseiller-info h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.conseiller-info p {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.conseiller-actions {
  display: flex;
  gap: 8px;
}

.conseiller-actions .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: var(--text-sm);
}

/* Simulator teaser */
.sim-teaser {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--lfm-blue-700) 0%, var(--accent-coral) 200%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sim-teaser h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.sim-teaser p {
  font-size: var(--text-xs);
  opacity: 0.85;
}

.sim-teaser .sim-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sim-teaser .ai-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent-amber);
  color: var(--lfm-blue-900);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* === Notifications screen === */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: white;
  cursor: pointer;
  position: relative;
}

.notif-item:not(:last-child) {
  border-bottom: 1px solid var(--gray-100);
}

.notif-item.unread {
  background: var(--lfm-blue-50);
}

.notif-item .notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.security { background: #DBEAFE; color: var(--info); }
.notif-icon.operation { background: #FEE2E2; color: var(--error); }
.notif-icon.commercial { background: #FEF3C7; color: #92400E; }

.notif-body { flex: 1; }
.notif-body h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
}
.notif-body p { font-size: var(--text-xs); color: var(--gray-700); line-height: 1.4; }
.notif-body time { font-size: 11px; color: var(--gray-500); display: block; margin-top: 4px; }

.notif-item .unread-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  background: var(--lfm-blue-700);
  border-radius: 50%;
}

.notif-group-head {
  padding: 14px 18px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

/* === CONTRACTS === */
.filter-row {
  padding: 12px 16px;
  background: white;
}

.filter-row .chip-row {
  padding: 0;
}

.contract-card {
  margin: 0 16px 12px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast);
}

.contract-card:active { transform: scale(0.98); }

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

.contract-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.contract-card .ref {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}

.contract-card .amount {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.contract-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.contract-card-footer .rend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: var(--weight-semibold);
}

/* === Contract detail === */
.contract-detail-hero {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--lfm-blue-800) 0%, var(--lfm-blue-700) 100%);
  color: white;
  border-radius: var(--radius-2xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.contract-detail-hero .hero-watermark {
  right: -20px;
  top: 12px;
  bottom: auto;
  height: 60px;
}

.contract-detail-hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.contract-detail-hero .ref {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.contract-detail-hero .amount {
  font-size: 38px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contract-chart {
  margin: 8px 0;
  height: 80px;
}

/* Poches */
.poche-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.poche-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.poche-card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.poche-card h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  flex: 1;
}

.poche-card .pct {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-700);
}

.poche-card .pamount {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.poche-card .progress {
  margin-bottom: 8px;
}

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

.donut-svg {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.donut-legend {
  flex: 1;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  margin-bottom: 6px;
}

.donut-legend-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.donut-legend-row .ll-label { flex: 1; color: var(--gray-700); }
.donut-legend-row .ll-pct { font-weight: 700; }

.lcbft-warning {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 0 16px 16px;
  font-size: var(--text-sm);
  color: #92400E;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* === Beneficiaire === */
.benef-clause-text {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0 16px 16px;
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: 1.6;
  border-left: 3px solid var(--lfm-blue-500);
}

/* === Operations === */
.op-month-head {
  padding: 16px 18px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  background: var(--gray-50);
  position: sticky;
  top: 0;
}

.op-detail-hero {
  background: white;
  padding: 32px 24px 24px;
  text-align: center;
  margin-bottom: 12px;
}

.op-detail-hero .op-icon-big {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.op-detail-hero h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.detail-table {
  background: white;
  margin: 0 16px 16px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  font-size: var(--text-sm);
}

.detail-row:last-child { border-bottom: none; }
.detail-row .key { color: var(--gray-500); }
.detail-row .val { color: var(--gray-950); font-weight: 500; text-align: right; }

/* === WEBVIEW === */
.webview-page {
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.webview-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.webview-content h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--gray-950);
}

.webview-content h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 20px 0 8px;
}

.webview-step {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lfm-blue-700);
  margin-bottom: 12px;
}

.webview-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.webview-progress span {
  flex: 1;
  height: 3px;
  background: var(--gray-300);
  border-radius: 99px;
}

.webview-progress span.done { background: var(--lfm-blue-700); }

.amount-input {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 24px 16px;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--lfm-blue-700);
  border-radius: 0;
  background: transparent;
  color: var(--gray-950);
}

.amount-suggest {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.warning-banner {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: var(--text-xs);
  color: #92400E;
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.dda-mention {
  font-size: 11px;
  color: var(--gray-500);
  text-align: center;
  padding: 16px;
  line-height: 1.5;
  border-top: 1px solid var(--gray-100);
  margin-top: 24px;
}

.recap-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: var(--text-sm);
}

.recap-row:last-child { border-bottom: none; }
.recap-row .k { color: var(--gray-500); }
.recap-row .v { font-weight: 600; }
.recap-row.total { padding-top: 16px; font-size: var(--text-lg); }
.recap-row.total .v { color: var(--lfm-blue-800); }

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: var(--text-sm);
  color: var(--gray-700);
  cursor: pointer;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--lfm-blue-700);
}

.webview-footer {
  padding: 16px 20px 24px;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.slider-row {
  margin: 16px 0;
}

.slider-row .slider-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  margin-bottom: 8px;
}

.slider-row .slider-head strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--lfm-blue-700);
}

/* Confirmation */
.confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  flex: 1;
  position: relative;
}

.confirmation-check {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: pop 0.6s var(--ease-spring);
}

.confirmation h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.confirmation p {
  font-size: var(--text-sm);
  color: var(--gray-700);
  margin-bottom: 20px;
}

.confirmation-recap {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  flex: 1;
}

.error-page .err-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FEE2E2;
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.error-page h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 8px;
}

.error-page p {
  font-size: var(--text-sm);
  color: var(--gray-700);
  margin-bottom: 8px;
}

.error-page .err-code {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-family: monospace;
  margin-bottom: 24px;
}

/* Confetti */
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti span {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall 2.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-100px) rotate(0); opacity: 1; }
  100% { transform: translateY(800px) rotate(720deg); opacity: 0; }
}

/* === SIMULATOR === */
.sim-hero {
  margin: 0 16px 20px;
  background: linear-gradient(135deg, var(--lfm-blue-800) 0%, var(--accent-coral) 200%);
  color: white;
  border-radius: var(--radius-2xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.sim-hero h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  max-width: 220px;
}

.sim-hero p {
  font-size: var(--text-sm);
  opacity: 0.85;
  max-width: 240px;
}

.sim-hero .sim-illu {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 120px;
  height: 120px;
  opacity: 0.85;
}

.mode-card {
  background: white;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin: 0 16px 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: all var(--dur-fast);
  position: relative;
}

.mode-card:active { transform: scale(0.98); }
.mode-card.selected {
  border-color: var(--lfm-blue-700);
  background: var(--lfm-blue-50);
}

.mode-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--lfm-blue-50);
  color: var(--lfm-blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-card.selected .mode-card-icon {
  background: var(--lfm-blue-700);
  color: white;
}

.mode-card-text { flex: 1; }
.mode-card-text h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
}
.mode-card-text p {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.mode-card .ai-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent-amber);
  color: var(--lfm-blue-900);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

/* Sim steps */
.sim-step-wrap {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sim-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}

.sim-progress span {
  flex: 1;
  height: 4px;
  background: var(--gray-300);
  border-radius: 99px;
  transition: background var(--dur-base);
}

.sim-progress span.done { background: var(--lfm-blue-700); }

.sim-question {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.sim-help {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: 24px;
}

.sim-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-option {
  background: white;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.sim-option:hover { border-color: var(--lfm-blue-200); }
.sim-option:active { transform: scale(0.98); }
.sim-option.selected {
  border-color: var(--lfm-blue-700);
  background: var(--lfm-blue-50);
  color: var(--lfm-blue-800);
}

.sim-option svg { color: var(--gray-300); }
.sim-option.selected svg { color: var(--lfm-blue-700); }

.sim-back {
  position: absolute;
  top: 56px;
  left: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 5;
  color: var(--lfm-blue-800);
}

.sim-quit {
  position: absolute;
  top: 62px;
  right: 20px;
  z-index: 5;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-500);
}

.sim-info-bubble {
  background: var(--lfm-blue-50);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: var(--text-xs);
  color: var(--lfm-blue-800);
  margin: 16px 0;
  display: flex;
  gap: 8px;
}

/* Sim result */
.result-hero {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--lfm-blue-800), var(--lfm-blue-700));
  color: white;
  border-radius: var(--radius-2xl);
  padding: 22px;
  text-align: center;
  position: relative;
}

.result-hero .label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 8px;
}

.result-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.result-hero .match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-amber);
  color: var(--lfm-blue-900);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
}

.reason-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.reason-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lfm-blue-50);
  color: var(--lfm-blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reason-card h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 2px;
}

.reason-card p {
  font-size: var(--text-xs);
  color: var(--gray-700);
  line-height: 1.5;
}

.fiscal-savings {
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--success) 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 18px;
  margin: 0 16px 16px;
  text-align: center;
}

.fiscal-savings .label {
  font-size: var(--text-xs);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fiscal-savings .amount {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 4px 0;
}

.fiscal-savings .sub {
  font-size: var(--text-xs);
  opacity: 0.85;
}

/* Chat */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 56px 16px 8px;
  background: white;
  border-bottom: 1px solid var(--gray-100);
}

.chat-header-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lfm-blue-700) 0%, var(--accent-amber) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.chat-header h2 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

.chat-header .status {
  font-size: var(--text-xs);
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header .status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 22px;
  font-size: var(--text-sm);
  line-height: 1.5;
  word-wrap: break-word;
  animation: bubble-in 0.3s var(--ease-spring);
}

@keyframes bubble-in {
  from { transform: translateY(8px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.bubble.ai {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--gray-950);
  border-bottom-left-radius: 6px;
}

.bubble.user {
  align-self: flex-end;
  background: var(--lfm-blue-700);
  color: white;
  border-bottom-right-radius: 6px;
}

.bubble.typing {
  padding: 14px 16px;
}

.bubble.typing .loader-dots span {
  background: var(--gray-500);
  width: 6px;
  height: 6px;
}

.bubble-card {
  align-self: flex-start;
  background: white;
  border: 1.5px solid var(--lfm-blue-200);
  border-radius: 18px;
  padding: 14px;
  font-size: var(--text-sm);
  max-width: 88%;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.bubble-card:hover { background: var(--lfm-blue-50); }

.bubble-card h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--lfm-blue-800);
}

.bubble-card p {
  font-size: var(--text-xs);
  color: var(--gray-700);
}

.chat-suggestions {
  padding: 10px 14px 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.chat-suggestions .chip {
  background: white;
  border: 1px solid var(--lfm-blue-200);
  color: var(--lfm-blue-700);
}

.chat-input-bar {
  padding: 10px 12px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--gray-100);
  background: white;
}

.chat-input-bar input {
  flex: 1;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: var(--text-sm);
}

.chat-input-bar button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lfm-blue-700);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === PROFILE/SETTINGS === */
.profile-head {
  background: linear-gradient(135deg, var(--lfm-blue-800), var(--lfm-blue-700));
  color: white;
  padding: 24px 20px 32px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  margin-bottom: -20px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.profile-head-logo {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.profile-head .avatar {
  margin-top: 36px !important;
}

.profile-head .avatar {
  margin: 0 auto 12px;
  background: var(--accent-amber);
  color: var(--lfm-blue-900);
}

.profile-head h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile-head .meta {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-top: 4px;
}

.legal-page {
  padding: 20px;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: 1.7;
}

.legal-page h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-950);
  margin-bottom: 8px;
}

.legal-page h2 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-950);
  margin: 20px 0 8px;
}

.legal-page .updated {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-bottom: 20px;
}

.legal-page p {
  margin-bottom: 12px;
}

/* Brand footer */
.brand-footer {
  text-align: center;
  padding: 28px 20px 24px;
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.6;
  border-top: 1px solid var(--gray-100);
  margin-top: 16px;
}

.brand-footer-logo {
  height: 38px;
  width: auto;
  display: block;
  margin: 0 auto 14px;
  opacity: 0.85;
}

.brand-tagline {
  font-style: italic;
  color: var(--lfm-blue-800);
  font-weight: 500;
  margin-bottom: 4px;
}

.brand-footer .anniv {
  display: inline-block;
  background: var(--lfm-blue-50);
  color: var(--lfm-blue-800);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 600;
  margin-top: 8px;
}

/* Section subtitle */
.section-sub {
  font-size: var(--text-xs);
  color: var(--gray-500);
  padding: 0 18px 8px;
  line-height: 1.5;
}
