/* ============================================================
   DUOBUDGET - DESIGN SYSTEM & STYLESHEET
   Sleek Dark Glassmorphism, Micro-interactions & Visual Polish
   ============================================================ */

:root {
  /* Color Palette - Sober, Elegant Slate Foundation */
  --bg-dark: #0a0d14;
  --bg-surface: #111624;
  --bg-card: rgba(17, 24, 38, 0.85);
  --bg-card-hover: rgba(23, 32, 51, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(255, 255, 255, 0.16);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Theme Accents - Refined & Restrained */
  --accent-primary: #4f46e5;
  --accent-primary-glow: transparent;
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: transparent;
  --accent-violet: #818cf8;
  --accent-violet-glow: transparent;
  --accent-amber: #f59e0b;
  --accent-amber-glow: transparent;
  --accent-emerald: #10b981;
  --accent-emerald-glow: transparent;
  --accent-rose: #f43f5e;

  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows - Minimalist & Crisp */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.25), 0 8px 24px -6px rgba(0, 0, 0, 0.35);
  --shadow-glow: none;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.35) 0%, transparent 65%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-profiles-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.header-couple-names {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.header-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.header-profile-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.nav-tab small {
  font-size: 0.72rem;
  opacity: 0.65;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pulse-dot {
  width: 5px;
  height: 5px;
  background: #94a3b8;
  border-radius: 50%;
  opacity: 0.7;
  display: inline-block;
  box-shadow: none;
  animation: none;
}

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

/* ============================================================
   BUTTONS & BADGES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.78rem;
}

.btn-primary {
  background: #4f46e5;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: #4338ca;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Bank Tags */
.bank-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.lcl-tag {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.rev-tag {
  background: rgba(129, 140, 248, 0.08);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.amber-tag {
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.emerald-tag {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-icon-wrapper.emerald {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.text-emerald {
  color: #34d399;
}

.badge-emerald {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.clickable {
  cursor: pointer;
}

/* ============================================================
   HERO SUMMARY STRIP (TOP METRICS)
   ============================================================ */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}

.summary-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon-wrapper.blue {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.card-icon-wrapper.cyan {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.card-icon-wrapper.violet {
  background: rgba(129, 140, 248, 0.08);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.15);
}
.card-icon-wrapper.amber {
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.stat-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}

.stat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.text-amber { color: var(--accent-amber) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-violet { color: var(--accent-violet) !important; }
.text-emerald { color: var(--accent-emerald) !important; }

/* ============================================================
   GLASS CARDS & LAYOUT GRIDS
   ============================================================ */
.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

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

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

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   COUPLE BALANCE & SPLIT VISUALIZATION
   ============================================================ */
.split-mode-pill {
  font-size: 0.72rem;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-weight: 500;
}

.couple-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.partner-card {
  background: rgba(15, 22, 36, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.partner-card.you-card {
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: none;
}

.partner-card.ariane-card {
  border-color: rgba(129, 140, 248, 0.2);
  box-shadow: none;
}

.partner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.72rem;
  color: white;
  margin-bottom: 10px;
}

.partner-avatar.ariane-avatar {
  background: #6366f1;
}

.partner-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.partner-amount {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 600;
  color: #ffffff;
  margin: 3px 0 2px;
}

.partner-detail {
  font-size: 0.72rem;
}

.partner-bar-wrapper {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  margin: 12px 0 14px;
  overflow: hidden;
}

.partner-bar {
  height: 100%;
  background: #38bdf8;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.partner-bar.ariane {
  background: #818cf8;
}

.partner-sublist {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.sublist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sublist-item strong {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-weight: 500;
}

.sublist-item.highlight-amber strong {
  color: var(--accent-amber);
}

.sublist-item.highlight-green strong {
  color: var(--accent-emerald);
}

/* Smart Notice */
.smart-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #94a3b8;
}

.smart-notice strong {
  color: #f1f5f9;
}

.notice-icon {
  font-size: 1rem;
}

/* In-dashboard Quick Slider */
.quick-sim-dashboard {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.quick-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.quick-sim-title {
  font-weight: 500;
  color: #cbd5e1;
}

/* ============================================================
   CHARTS & FORECAST
   ============================================================ */
.chart-container {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
}

.donut-chart-wrapper {
  position: relative;
  width: 154px;
  height: 154px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.donut-center-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.legend-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

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

.legend-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

/* Annual Forecast */
.annual-forecast-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

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

.forecast-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forecast-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  color: #94a3b8;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.forecast-item {
  display: flex;
  flex-direction: column;
}

.forecast-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.forecast-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.forecast-item.highlight .forecast-val {
  color: var(--accent-cyan);
}

/* ============================================================
   SIMULATOR: REAL-TIME DYNAMIC SLIDERS & PRESETS
   ============================================================ */
.simulator-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 24px;
}

.badge-amber {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 950px;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: #f1f5f9;
}

.loan-roles-box {
  background: rgba(15, 22, 36, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}

/* Controls */
.controls-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
}

.slider-input-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 22, 36, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
}

.num-input {
  background: transparent;
  border: none;
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  width: 74px;
  text-align: right;
  outline: none;
}

.slider-input-badge span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.duration-display {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.duration-months {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Custom Range Input */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
  margin: 6px 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #4f46e5;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #4f46e5;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Quick Presets Row */
.quick-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 3px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.preset-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.slider-ticks .active-tick {
  color: var(--accent-amber);
  font-weight: 500;
}

/* Method Selector */
.payment-method-selector {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 4px;
}

.method-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.method-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-option-card {
  cursor: pointer;
}

.method-option-card input[type="radio"] {
  display: none;
}

.method-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 22, 36, 0.5);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.method-radio-custom {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.method-option-card input:checked + .method-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.16);
}

.method-option-card input:checked + .method-box .method-radio-custom {
  border-color: #4f46e5;
  background: #4f46e5;
  box-shadow: none;
}

.method-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}

.method-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.method-desc strong {
  color: #f1f5f9;
}

/* Dynamic Results in Simulator */
.result-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.result-top-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.big-monthly-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.big-number {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1;
  text-shadow: none;
  transition: color 0.1s ease;
}

.big-period {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.result-clarification {
  font-size: 0.86rem;
  color: #cbd5e1;
  margin-top: 8px;
}

.result-clarification strong {
  color: #ffffff;
}

.result-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  margin: 20px 0;
}

.res-item {
  display: flex;
  flex-direction: column;
}

.res-item-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.res-item-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.res-item small {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Offset Math Explainer */
.offset-math-explainer {
  background: rgba(15, 23, 42, 0.85);
  border-left: 3px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.explainer-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.explainer-content {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.explainer-content strong {
  color: #ffffff;
}

/* Progress & Amortization */
.month-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.progress-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 16px 0 10px;
}

.progress-fill.amber-gradient {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.progress-meta strong {
  font-family: var(--font-mono);
  color: #ffffff;
}

.quick-amort-table-wrapper {
  max-height: 220px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   LCL & REVOLUT SECTION BANNERS & ITEMS
   ============================================================ */
.section-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.lcl-banner {
  border-left: 3px solid #38bdf8;
}

.revolut-banner {
  border-left: 3px solid #818cf8;
}

.banner-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.banner-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.banner-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.banner-total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.banner-total-val {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
}

.banner-total-annual {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* LCL Items List */
.expense-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lcl-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.lcl-item-row:hover {
  background: rgba(26, 38, 64, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.lcl-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lcl-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  font-size: 1.1rem;
}

.lcl-item-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.lcl-item-info p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.lcl-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lcl-item-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

.lcl-item-annual {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
}

.lcl-actions-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.lcl-actions-btn:hover {
  color: #ffffff;
}

/* LCL Split Box */
.lcl-split-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.split-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.avatar-sm.ariane {
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
}

.split-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.split-user-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.split-amount-badge {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

.taxe-fonciere-focus {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.taxe-fonciere-focus strong {
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}

.tf-icon {
  font-size: 1.2rem;
}

/* Stacked Progress Bar */
.chart-box-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.progress-bar-stack {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
  margin-bottom: 12px;
}

.stack-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

/* Revolut Envelopes */
.envelope-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.envelope-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.2s ease;
}

.envelope-item:hover {
  background: rgba(26, 38, 64, 0.6);
}

.envelope-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.envelope-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.envelope-icon {
  font-size: 1.1rem;
}

.envelope-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.envelope-numbers {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.envelope-numbers strong {
  color: #ffffff;
}

.envelope-progress-bg {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.envelope-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.envelope-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ============================================================
   PROFILES MANAGEMENT (GENERIC)
   ============================================================ */
.profiles-edit-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-edit-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-avatar-large {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}

.profile-role-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

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

.rule-choice-card {
  cursor: pointer;
}

.rule-choice-card input[type="radio"] {
  display: none;
}

.rule-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.rule-choice-card input:checked + .rule-box {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
}

.rule-choice-card input:checked + .rule-box .method-radio-custom {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary-glow);
}

.rule-box strong {
  display: block;
  font-size: 0.88rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.rule-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.quick-summary-box {
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

/* ============================================================
   TABLES & FILTERS
   ============================================================ */
.filter-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.custom-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.86rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.custom-input:focus, .custom-select:focus {
  border-color: var(--accent-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.custom-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.tight-table th, .tight-table td {
  padding: 7px 10px;
  font-size: 0.75rem;
}

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.badge-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.delete-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.15);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  padding: 24px;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Settings helpers */
.max-w-700 { max-width: 700px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.cursor-pointer { cursor: pointer; }

.data-management-zone {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  margin-top: 24px;
}

.data-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.data-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-group-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   RESPONSIVENESS
   ============================================================ */
@media (max-width: 1080px) {
  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2-col {
    grid-template-columns: 1fr;
  }
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-tabs {
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

@media (max-width: 680px) {
  .app-container {
    padding: 14px;
  }
  .summary-strip {
    grid-template-columns: 1fr;
  }
  .couple-balance-grid {
    grid-template-columns: 1fr;
  }
  .chart-container {
    flex-direction: column;
  }
  .forecast-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   START DATE, LOAN HISTORY & LCL PACKAGES
   ============================================================ */
.loan-start-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 8px;
}

.btn-step {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-step:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.loan-history-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.history-pill {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.history-pill-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.history-pill-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-top: 2px;
}

.time-remaining-meta {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-align: right;
  margin-top: 4px;
}

/* LCL Packages System */
.package-section-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.2s ease;
}

.package-section-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.package-section-card.taxe-fonciere-card {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04), rgba(15, 23, 42, 0.6));
}

.mb-4 {
  margin-bottom: 16px;
}

.package-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.package-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.package-icon {
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.package-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.package-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.package-subtotal-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.subtotal-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.subtotal-label {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.package-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.taxe-interactive-editor {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.taxe-hint-text {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.package-summary-highlight {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #ffffff;
}

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ps-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ps-item strong {
  font-family: var(--font-mono);
  color: #ffffff;
}

.ps-item.highlight-cyan strong {
  color: var(--accent-cyan);
  font-size: 0.86rem;
}

.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.status-current {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.status-future {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ============================================================
   ENVELOPPE TRAVAUX & AVANCES (50 000 €)
   ============================================================ */
.travaux-hero-banner {
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.travaux-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.travaux-hero-left {
  max-width: 680px;
}

.travaux-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 4 KPI Grid */
.travaux-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Multi-Segment Large Visual Progress Bar */
.travaux-visual-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.visual-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.84rem;
}

.visual-box-title {
  font-weight: 600;
  color: var(--text-main);
}

.visual-box-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.travaux-progress-bar-large {
  height: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
  box-shadow: none;
  position: relative;
}

.travaux-bar-segment {
  height: 100%;
  transition: width 0.4s ease;
}

.segment-axel {
  background: #38bdf8;
}

.segment-ariane {
  background: #818cf8;
}

.segment-remaining {
  background: rgba(16, 185, 129, 0.15);
  border-left: 1px solid rgba(16, 185, 129, 0.25);
}

.travaux-visual-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legend-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-dot-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.legend-val {
  font-size: 1.18rem;
  font-weight: 700;
}

.legend-pct {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Dashboard Widget Grid */
.travaux-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.travaux-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-advances-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.partner-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  width: fit-content;
}

.p1-pill {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.p2-pill {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.travaux-progress-bar-container {
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
}

.travaux-progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
}

.travaux-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-cyan { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.5); }
.dot-violet { background: #c084fc; box-shadow: 0 0 6px rgba(192, 132, 252, 0.5); }
.dot-slate { background: #64748b; }
.dot-emerald { background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); }

/* Settlement Dual Cards */
.settlement-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.settlement-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settlement-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.settlement-icon-wrap.emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.settlement-icon-wrap.violet {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.settlement-explainer {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.settlement-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settlement-pill {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pill-axel {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.pill-ariane {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.pill-title {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

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

.pill-subtext {
  font-size: 0.72rem;
  color: var(--accent-amber);
}

.settlement-summary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.84rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settlement-equalizer-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.eq-row strong, .eq-row span.font-mono {
  font-size: 0.95rem;
  color: var(--text-main);
}

.eq-verdict-box {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eq-verdict-icon {
  font-size: 1.3rem;
}

.eq-verdict-text {
  font-size: 0.86rem;
  color: #ffffff;
  line-height: 1.4;
}

/* Table Toolbar & Search */
.table-actions-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-search-wrap {
  min-width: 220px;
}

.table-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
}

.table-search-input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
}

.status-filter-pills {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: #ffffff;
}

.filter-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
}

/* Travaux Table & Footer */
.travaux-table tfoot {
  border-top: 2px solid rgba(255, 255, 255, 0.12);
}

.tfoot-total-row td {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.8);
  font-size: 0.95rem;
}

.tfoot-solde-row td {
  padding: 12px 16px;
  background: rgba(8, 12, 21, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
}

.reste-label {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.reste-amount {
  font-size: 1.15rem;
}

/* Reimbursed Interactive Toggle Button */
.reimbursed-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.reimbursed-toggle-btn.status-no {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

.reimbursed-toggle-btn.status-no:hover {
  background: rgba(244, 63, 94, 0.28);
  transform: scale(1.03);
}

.reimbursed-toggle-btn.status-yes {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.reimbursed-toggle-btn.status-yes:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: scale(1.03);
}

.quick-split-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.quick-split-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-split-btns {
  display: flex;
  gap: 6px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .travaux-kpi-grid,
  .travaux-dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .travaux-visual-legend {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .travaux-kpi-grid,
  .travaux-dash-grid {
    grid-template-columns: 1fr;
  }

  .settlement-pills-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   TABLEAU DE SUIVI DES LOTS DE TRAVAUX (BUDGET DE BASE VS RÉALISÉ)
   ============================================================ */
.lots-kpi-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
}

.lots-kpi-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
}

.lots-kpi-label {
  color: var(--text-muted);
}

.lots-kpi-val {
  font-size: 0.95rem;
}

.lots-kpi-pct {
  color: var(--text-dim);
  font-size: 0.76rem;
}

.travaux-lots-table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lot-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lot-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.lot-meta {
  display: flex;
  flex-direction: column;
}

.lot-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.88rem;
}

.lot-notes {
  font-size: 0.73rem;
  color: var(--text-dim);
}

/* Status pills */
.lot-status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lot-status-pill.status-ongoing {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.lot-status-pill.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.lot-status-pill.status-future {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lot-status-pill.status-reserve {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Progress bar inside lot cell */
.lot-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lot-progress-bar-sm {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.lot-progress-fill-sm {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.lot-progress-pct-sm {
  font-size: 0.75rem;
  min-width: 38px;
  text-align: right;
  color: var(--text-muted);
}

/* Tfoot in Lots Table */
.travaux-lots-tfoot tr td {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 2px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.tfoot-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tfoot-progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.tfoot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  border-radius: var(--radius-full);
}

.tfoot-progress-label {
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 700;
}

/* Print styling */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .summary-strip,
  .nav-tabs,
  .btn,
  .modal-backdrop {
    display: none !important;
  }

  .app-container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .tab-pane {
    display: block !important;
  }

  .glass-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }

  .custom-table th,
  .custom-table td {
    color: #000000 !important;
    border-color: #dddddd !important;
  }
}

/* Quick Month Calendar Selector */
.month-calendar-selector {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-year-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-months-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

@media (min-width: 640px) {
  .cal-months-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.cal-month-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.cal-month-btn:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.3);
}

.cal-month-btn.active {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border-color: #0ea5e9;
  font-weight: 700;
}

/* Open Banking DSP2 Card & Status */
.metric-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.metric-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.banking-notice-box a:hover {
  color: #38bdf8;
}

/* Saisie des virements réels programmés & Écarts */
.transfers-comparison-table th,
.transfers-comparison-table td {
  vertical-align: middle;
}

.transfer-input {
  width: 95px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 10px;
  color: var(--text-main, #f8fafc);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  transition: all 0.15s ease;
}

.transfer-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  background: rgba(15, 23, 42, 0.98);
}

.transfers-comparison-table input[type=number]::-webkit-inner-spin-button,
.transfers-comparison-table input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.transfers-comparison-table input[type=number] {
  -moz-appearance: textfield;
}

/* Subtask tree styling in Travaux table */
.row-subtask {
  background: rgba(15, 23, 42, 0.45);
}

.row-subtask:hover td {
  background: rgba(255, 255, 255, 0.03) !important;
}

.row-subtask td:first-child {
  border-left: 2px solid rgba(148, 163, 184, 0.25);
}

.subtask-indent {
  padding-left: 18px;
}

.subtask-branch {
  color: var(--text-dim, #64748b);
  font-weight: 700;
  margin-right: 4px;
}

/* Revolut Envelope Budget Inline Input */
.input-env-budget {
  width: 90px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 6px);
  padding: 5px 8px;
  color: var(--text-main, #f8fafc);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  transition: all 0.15s ease;
}

.input-env-budget:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
  background: rgba(15, 23, 42, 0.98);
}

.revolut-envelopes-table input[type=number]::-webkit-inner-spin-button,
.revolut-envelopes-table input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.revolut-envelopes-table input[type=number] {
  -moz-appearance: textfield;
}


