:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface2: #faf8f5;
  --surface3: #f0ece4;
  --text: #1c1917;
  --text2: #57534e;
  --text3: #a8a29e;
  --brand: #92400e;
  --brand2: #b45309;
  --brand-light: #d97706;
  --accent: #d97706;
  --accent2: #f59e0b;
  --accent-soft: #fef3c7;
  --accent-glow: rgba(217,119,6,0.12);
  --gold: linear-gradient(135deg, #92400e, #d97706, #f59e0b);
  --border: #e7e5e4;
  --border2: #d6d3d1;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --blue: #0b7bd4;
  --blue2: #0b5cb0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --r: 12px;
  --r2: 16px;
  --r3: 24px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --fh: 52px;
  --bh: 48px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; }
input, select, button, label, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* SCREENS with transitions */
.screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 32px; overflow-y: auto;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 25% 5%, var(--accent-glow) 0%, transparent 50%),
                    radial-gradient(ellipse at 75% 95%, rgba(146,64,14,0.05) 0%, transparent 50%);
  animation: screenIn .35s var(--ease);
}
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

/* Panel */
.panel {
  background: var(--surface); border-radius: var(--r3); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 660px; padding: 56px 52px; text-align: center;
  position: relative; animation: panelIn .4s var(--ease);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* Barre dorée retirée pour épurage */
.panel-icon { width: 96px; height: 96px; border-radius: 28px; background: var(--gold); display: flex; align-items: center; justify-content: center; margin: 0 auto 32px; box-shadow: 0 12px 36px rgba(146,64,14,0.25), 0 0 0 6px var(--accent-soft); }
.panel-icon svg { width: 44px; height: 44px; stroke: #fff; stroke-width: 1.8; }
.panel h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 40px; font-weight: 900; margin-bottom: 6px; }
.panel h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.panel-sub { font-size: 13px; color: var(--text3); text-transform: uppercase; letter-spacing: 3px; font-weight: 700; margin-bottom: 28px; }
.panel-desc { font-size: 16px; color: var(--text2); line-height: 1.9; text-align: left; margin-bottom: 32px; }
.panel-desc p + p { margin-top: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.pill { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--accent-soft); border: 1.5px solid var(--accent); font-size: 14px; font-weight: 600; color: var(--brand); transition: all .2s; }
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pill svg { width: 16px; height: 16px; stroke: var(--accent); stroke-width: 2; }
.panel-copy {
  position: relative;
  width: min(82%, 430px);
  margin: 34px auto 0;
  padding: 1.35rem 1.5rem 1.4rem;
  box-sizing: border-box;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: .01em;
  color: #49301f;
  background: linear-gradient(145deg, #fffdf6 0%, #fff6d9 100%);
  border: 1px solid rgba(198, 133, 35, .55);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(88, 51, 20, .12), inset 0 1px 0 rgba(255,255,255,.9);
}
.panel-copy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 54px;
  height: 3px;
  transform: translateX(-50%);
  background: #92400e;
  border-radius: 0 0 4px 4px;
}
.panel-copy a {
  color: #9a520d;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 600;
}
.panel-copy a:hover { color: #6f3508; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--bh); padding: 0 32px; border-radius: var(--r); font-size: 15px; font-weight: 700; cursor: pointer; border: 2px solid var(--border2); background: var(--surface); color: var(--text); transition: all .15s var(--ease); user-select: none; box-shadow: var(--shadow); }
.btn:hover { border-color: var(--brand-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .3; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.btn-accent { background: var(--gold); color: #fff; border-color: transparent; box-shadow: 0 4px 20px rgba(146,64,14,0.3); }
.btn-accent:hover { box-shadow: 0 8px 32px rgba(146,64,14,0.4); transform: translateY(-2px); }
.btn-accent svg { stroke: #fff; }
.panel-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }

/* TOS */
.tos-box { text-align: left; max-height: 300px; overflow-y: auto; background: var(--surface2); border: 2px solid var(--border); border-radius: var(--r); padding: 24px; margin: 16px 0 20px; font-size: 14px; line-height: 1.9; color: var(--text2); }
.tos-box h3 { font-size: 13px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 1px; margin: 20px 0 8px; }
.tos-box h3:first-child { margin-top: 0; }
.tos-box p { margin-bottom: 10px; }
.tos-box a { color: var(--brand); font-weight: 600; }
.tos-check { display: flex; align-items: center; gap: 12px; justify-content: center; cursor: pointer; font-size: 15px; font-weight: 600; user-select: none; }
.tos-check input { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }

/* ===== MAIN DASHBOARD LAYOUT ===== */
.dashboard-layout {
  min-height: 100vh;
  background: #f3eee6;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(214,150,63,.16), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(122,55,16,.08), transparent 34%);
}

/* Header */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
}
.app-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.app-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(146,64,14,.25), 0 0 0 5px #fff8e9;
}
.app-brand-logo svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 2;
}
.app-brand-text h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -.25px;
}
.app-brand-status {
  font-size: 13px;
  color: var(--text2);
  font-weight: 600;
}
.app-brand-status.connected {
  color: var(--green);
}
.app-brand-status.disconnected {
  color: var(--red);
}
.app-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Main Content */
.app-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* Section */
.nav-section {
  background: var(--surface);
  border-radius: var(--r3);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.nav-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
}
.nav-section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-soft);
}
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
}

/* Icon Card Pro */
.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease);
  background: var(--surface2);
  border-radius: var(--r2);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.icon-card:active {
  transform: translateY(-2px) scale(.995);
}
.icon-card::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 18px;
  border-radius: 0 0 var(--r2) var(--r2);
  background: linear-gradient(180deg, transparent 0%, rgba(217,119,6,.22) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}
.icon-card-img {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 180px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--r);
  margin-bottom: 12px;
  box-shadow: var(--shadow-md);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), filter .28s var(--ease);
}
.icon-card-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  transition: color .24s var(--ease), transform .24s var(--ease);
}
.icon-card.primary {
  background: linear-gradient(145deg, #fffaf0 0%, var(--accent-soft) 100%);
  border-color: rgba(217,119,6,.58);
}
.icon-card.primary .icon-card-label {
  color: var(--brand);
  font-weight: 800;
}
.icon-card.danger {
  background: linear-gradient(145deg, #fffaf5 0%, #fff0ea 100%);
  border-color: rgba(220,38,38,.28);
}
.icon-card.danger .icon-card-label {
  color: var(--red);
}
.icon-card.danger::after {
  background: linear-gradient(180deg, transparent 0%, rgba(220,38,38,.20) 100%);
}

/* Le mouvement de survol reste réservé aux appareils qui ont un vrai pointeur. */
@media (hover: hover) and (pointer: fine) {
  .icon-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 18px 40px rgba(83,47,18,.20), 0 4px 12px rgba(217,119,6,.15), inset 0 1px 0 rgba(255,255,255,.8);
    border-color: rgba(180,83,9,.72);
  }
  .icon-card:hover::after {
    opacity: 1;
  }
  .icon-card:hover .icon-card-img {
    transform: scale(1.025);
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
    filter: saturate(1.04) contrast(1.01);
  }
  .icon-card:hover .icon-card-label {
    color: var(--brand2);
    transform: translateY(-1px);
  }
  .icon-card.danger:hover {
    border-color: rgba(220,38,38,.62);
    background: linear-gradient(145deg, #fff7f1 0%, #ffe8df 100%);
    box-shadow: 0 18px 40px rgba(127,29,29,.18), 0 4px 12px rgba(220,38,38,.12), inset 0 1px 0 rgba(255,255,255,.8);
  }
  .icon-card.danger:hover .icon-card-label {
    color: #b91c1c;
  }
}

/* View Container */
.view-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}
.view-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--surface);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.view-back-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.view-back-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.view-back-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
  stroke-width: 2;
}
.view-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--brand);
  flex: 1;
}

/* Sheet */
.editor { max-width: 960px; margin: 0 auto; padding: 0; }
.sheet { background: var(--surface); border-radius: var(--r3); box-shadow: var(--shadow-xl); position: relative; overflow: hidden; }
.sheet::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--gold); }
.sheet-inner { padding: 56px; }
@media(max-width:700px) { .sheet-inner { padding: 28px 18px; } }
.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.sheet-title { font-family: Georgia, 'Times New Roman', serif; font-size: 40px; font-weight: 900; color: var(--brand); letter-spacing: -1px; line-height: 1; }
.report-output-panel {
  margin: 0 0 28px;
  padding: 18px 20px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow-sm);
}
.report-output-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.report-output-title {
  flex: 0 0 auto;
  margin: 0;
  color: var(--brand);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}
.report-output-legend {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 18px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}
.report-output-legend span { display: inline-block; }
.report-output-legend strong { color: var(--text); font-weight: 800; }
.report-output-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.report-output-btn {
  width: 100%;
  min-width: 0;
  min-height: 70px;
  height: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.25;
  font-size: 14px;
  text-align: center;
  white-space: normal;
}
.report-output-action { display: block; font-weight: 800; }
.report-output-format {
  display: block;
  margin-top: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15px;
}
.report-output-btn.btn-accent .report-output-format { color: rgba(255,255,255,.92); }
.report-overview {
  background: linear-gradient(145deg, #fffaf0 0%, #fdf3df 100%);
  border: 1.5px solid #e5b35d;
  border-radius: var(--r2);
  padding: 20px;
  margin: 0 0 24px;
  box-shadow: var(--shadow);
}
.report-overview h3 { margin: 0 0 4px; }
.report-period { margin: 0 0 16px; color: var(--text2); font-style: italic; }
.report-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.report-metric {
  min-width: 0;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(180,83,9,.18);
  border-radius: var(--r);
  padding: 14px 10px;
  text-align: center;
  overflow-wrap: anywhere;
}
.report-metric span { display: block; color: var(--text2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; line-height: 1.3; }
.report-metric strong { display: block; margin-top: 6px; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.2; }
.report-evolution { margin: 0 0 28px; }
.report-evolution h3 { margin-bottom: 12px; }
.report-evolution table { width: 100%; table-layout: fixed; }
.report-income-expense-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}
.report-income-expense-grid > div { min-width: 0; }
.report-income-expense-grid table { width: 100%; table-layout: fixed; }
.report-income-expense-grid td:first-child { overflow-wrap: anywhere; }
.report-income-expense-grid td:last-child { width: 34%; }
.report-total { font-weight: 800; margin-top: 6px; text-align: right; white-space: nowrap; }

/* Sorties du rapport Depuis le Début : même DOM que l'écran, avec pagination propre */
.report-section,
.report-overview,
.report-diagnosis,
.report-evolution,
.report-income-column,
.report-expense-column {
  break-inside: avoid;
  page-break-inside: avoid;
}
.report-section h3,
.report-income-column h3,
.report-expense-column h3 {
  break-after: avoid;
  page-break-after: avoid;
}
.report-section table,
.report-income-column table,
.report-expense-column table {
  width: 100%;
  border-collapse: collapse;
}
.report-section thead,
.report-income-column thead,
.report-expense-column thead { display: table-header-group; }
.report-section tr,
.report-income-column tr,
.report-expense-column tr {
  break-inside: avoid;
  page-break-inside: avoid;
}
.report-export-render-root,
.report-export-print-root {
  background: #fff;
  color: #1c1917;
}
.report-export-render-root .report-print-title,
.report-export-render-root .report-print-period,
.report-export-print-root .report-print-title,
.report-export-print-root .report-print-period { display: block !important; }
.report-export-render-root .alltime-report-content,
.report-export-print-root .alltime-report-content {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}
.report-export-render-root .report-overview-grid,
.report-export-print-root .report-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.report-export-render-root .report-income-expense-grid,
.report-export-print-root .report-income-expense-grid {
  display: block;
}
.report-export-render-root .report-income-column,
.report-export-render-root .report-expense-column,
.report-export-print-root .report-income-column,
.report-export-print-root .report-expense-column {
  margin-top: 24px;
}
@media (max-width: 720px) {
  .report-output-header { display: block; }
  .report-output-title { margin-bottom: 8px; }
  .report-output-legend { justify-content: flex-start; text-align: left; }
  .report-output-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .report-income-expense-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .report-output-panel { padding: 16px; }
  .report-output-actions { grid-template-columns: 1fr; gap: 10px; }
  .report-output-btn { min-height: 64px; }
  .report-overview-grid { grid-template-columns: 1fr; }
  .report-metric strong { font-size: 16px; }
}
.sheet-hint { font-size: 14px; color: var(--text2); padding: 16px 18px; margin-bottom: 28px; background: var(--surface2); border-radius: var(--r); border-left: 4px solid var(--accent); line-height: 1.7; }
.bsk-label { font-size: 12px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 1.5px; text-align: left; display: block; margin-bottom: 6px; }
.bsk-input { width: 100%; height: var(--fh); padding: 0 16px; border: 2px solid var(--border); border-radius: var(--r); font-size: 16px; font-weight: 500; color: var(--text); background: var(--surface2); transition: all .15s; margin-bottom: 16px; }
.bsk-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-glow); }
.bsk-alert { color: var(--red); margin-top: 14px; font-weight: 600; display: none; }
.bsk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media(max-width:800px){ .bsk-grid { grid-template-columns: 1fr; } }
.bsk-col { background: var(--surface); border-radius: var(--r2); border: 1.5px solid var(--border); padding: 20px; box-shadow: var(--shadow); }
.bsk-col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-weight: 800; font-size: 15px; gap: 12px; }
.bsk-count { background: var(--accent-soft); padding: 2px 12px; border-radius: 999px; font-weight: 800; color: var(--brand); border: 1px solid var(--accent); font-size: 13px; flex-shrink: 0; }
.bsk-user-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--r); margin-bottom: 10px; gap: 12px; }
.bsk-avatar { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface3); flex-shrink: 0; object-fit: cover; }
.bsk-user-name { font-weight: 700; color: var(--text); }
.bsk-user-handle { font-size: 13px; color: var(--text3); }
.bsk-action { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; color: #fff; transition: all .15s; }
.bsk-action:hover { transform: translateY(-1px); }
.bsk-unfollow { background: var(--red); }
.bsk-follow { background: var(--green); }
.bsk-empty { padding: 24px; text-align: center; color: var(--text3); font-size: 14px; }
.bsk-status { margin-top: 16px; text-align: center; font-weight: 600; font-size: 14px; }
.bsk-dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.bsk-user-display { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 800; color: var(--brand); }
.bsk-pds-badge { font-size: 13px; color: var(--text3); }

/* Nous soutenir — présentation claire et professionnelle */
#support-view .support-hero { display:flex; align-items:center; gap:36px; padding:40px 44px 36px; background:linear-gradient(135deg, #5c2a0a 0%, #92400e 45%, #d97706 100%); color:#fff; flex-wrap:wrap; }
#support-view .support-hero-img { width:170px; height:220px; object-fit:cover; object-position:center 50%; border-radius:18px; box-shadow:0 16px 40px rgba(0,0,0,.35), 0 0 0 5px rgba(255,213,132,.25); flex-shrink:0; }
#support-view .support-hero-text { flex:1; min-width:260px; }
#support-view .support-hero-title { font-family:Georgia, 'Times New Roman', serif; font-size:42px; font-weight:900; letter-spacing:-1px; line-height:1.05; color:#fff; margin-bottom:12px; }
#support-view .support-hero-sub { font-size:11.5px; letter-spacing:2.6px; text-transform:uppercase; font-weight:700; color:#f3c984; margin-bottom:22px; }
#support-view .support-hero-quote { font-style:italic; font-size:16px; line-height:1.7; color:#f6e7cf; border-left:3px solid #e5b35d; padding-left:18px; max-width:520px; }
#support-view .support-inner { padding-top:36px; }
#support-view .support-box { text-align:left; max-width:none; margin:0; padding:36px 42px 32px; }
#support-view .support-intro { text-align:center; max-width:700px; margin:0 auto; }
#support-view .support-box .support-lead { font-family:Georgia, 'Times New Roman', serif; font-size:19px; line-height:1.6; color:var(--text); font-weight:600; margin:0 0 14px; }
#support-view .support-box .support-heart { font-size:38px; line-height:1; margin:0 0 20px; }
#support-view .support-highlights { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; margin:0 0 28px; }
#support-view .support-highlight { display:flex; align-items:flex-start; gap:14px; padding:20px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--r2); }
#support-view .support-highlight-icon { width:46px; height:46px; flex:0 0 46px; display:flex; align-items:center; justify-content:center; border-radius:14px; background:radial-gradient(circle at 30% 30%, #fde68a, #d97706 55%, #92400e); box-shadow:0 6px 16px rgba(146,64,14,.25); font-size:24px; }
#support-view .support-highlight h3 { font-size:18px; font-weight:800; color:var(--brand); margin:0 0 7px; line-height:1.3; }
#support-view .support-highlight-text { font-size:18px; font-weight:800; color:var(--brand); line-height:1.3; margin:0; }
#support-view .support-highlight p { font-size:14.5px; line-height:1.65; color:var(--text2); margin:0; }
#support-view .support-copy { max-width:760px; margin:0 auto; }
#support-view .support-copy p { font-size:15.5px; line-height:1.9; color:var(--text2); margin:0 0 16px; }
#support-view .support-cta { margin-top:26px; padding:24px 24px 22px; text-align:center; background:linear-gradient(180deg, #fff7e6 0%, #fdf0d5 100%); border:1px solid #f0c674; border-radius:var(--r2); }
#support-view .support-cta .support-em { max-width:680px; margin:0 auto; font-style:italic; font-size:16px; line-height:1.7; color:var(--text); font-weight:600; }
#support-view .support-actions { display:flex; justify-content:center; margin-top:22px; }
#support-view .support-donate { min-width:280px; min-height:54px; height:auto; padding:14px 24px; font-size:16px; }
@media (max-width:800px) {
  #support-view .support-hero { padding:28px 22px; gap:22px; justify-content:center; text-align:center; }
  #support-view .support-hero-img { width:150px; height:200px; }
  #support-view .support-hero-text { min-width:0; }
  #support-view .support-hero-title { font-size:32px; }
  #support-view .support-hero-quote { border-left:0; padding-left:0; margin:0 auto; }
  #support-view .support-box { padding:26px 18px 22px; }
  #support-view .support-highlights { grid-template-columns:1fr; gap:12px; }
  #support-view .support-highlight { padding:16px; }
  #support-view .support-donate { width:100%; min-width:0; }
}
/* Toast */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px); z-index: 300; background: var(--brand); color: #fff; padding: 14px 28px; border-radius: var(--r); font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .3s var(--ease); display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.5; }

/* Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--r3); width: min(600px, 96vw); max-height: 85vh; overflow: auto; box-shadow: var(--shadow-xl); animation: panelIn .3s var(--ease); }
.modal-hd { padding: 20px 28px; border-bottom: 1.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--accent-soft); }
.modal-hd h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 700; color: var(--brand); }
.modal-bd { padding: 28px; font-size: 15px; line-height: 1.9; color: var(--text2); }
.modal-bd h4 { font-size: 13px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 1px; margin: 20px 0 8px; }
.modal-bd p { margin-bottom: 12px; }
.modal-bd a { color: var(--brand); font-weight: 600; }
.modal-close { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--surface); color: var(--text3); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: all .12s; box-shadow: var(--shadow); }
.modal-close:hover { background: var(--red-soft); color: var(--red); }

/* Welcome */
#screen-welcome {
  background: #f3eee6;
  background-image: radial-gradient(circle at 12% 18%, rgba(214,150,63,.18), transparent 30%), radial-gradient(circle at 88% 82%, rgba(122,55,16,.10), transparent 34%);
}
#screen-welcome::before { content: ''; position: absolute; width: 560px; height: 560px; border: 1px solid rgba(157,91,25,.13); border-radius: 50%; transform: translate(-34%, -25%); pointer-events: none; }
#screen-welcome .panel {
  display: grid;
  grid-template-columns: 38% 62%;
  grid-template-areas:
    "icon desc"
    "title desc"
    "sub desc"
    "brand desc"
    "brand pills"
    "brand action"
    "brand copy";
  align-items: center;
  max-width: 860px;
  min-height: 560px;
  padding: 64px 64px 58px;
  text-align: left;
  background: linear-gradient(90deg, #552b12 0%, #713b17 38%, #fff 38%, #fff 100%);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(62,35,15,.22), 0 5px 14px rgba(62,35,15,.10);
}
#screen-welcome .panel::before { height: 5px; z-index: 2; }
#screen-welcome .panel-icon { grid-area: icon; width: 82px; height: 82px; margin: 0 0 28px; border-radius: 23px; box-shadow: 0 12px 28px rgba(0,0,0,.25), 0 0 0 6px rgba(255,213,132,.18); }
#screen-welcome .panel h1 { grid-area: title; align-self: start; color: #fff; font-size: 42px; line-height: 1.05; letter-spacing: -1px; margin: 0 0 12px; }
#screen-welcome .panel-sub { grid-area: sub; align-self: start; color: #f3c984; font-size: 11px; letter-spacing: 2.4px; line-height: 1.6; margin: 0; }
#screen-welcome .panel::after { display: none; }
#screen-welcome .panel-desc { grid-area: desc; align-self: end; max-width: 440px; margin: 0 0 24px 54px; padding-left: 30px; border-left: 2px solid #e5b35d; text-align: left; font-size: 17px; line-height: 1.75; color: #554b43; }
#screen-welcome .pills { grid-area: pills; justify-content: flex-start; margin: 0 0 22px 54px; gap: 9px; }
#screen-welcome .pill { padding: 9px 13px; font-size: 13px; background: #fffaf0; border-color: #e2bd7a; }
#screen-welcome #welcome-start { grid-area: action; justify-self: start; min-width: 175px; height: 52px; margin-left: 54px; border-radius: 12px; }
#screen-welcome .panel-copy { grid-area: copy; justify-self: start; width: calc(100% - 54px); margin: 10px 0 0 54px; padding: 14px 18px; font-size: 14px; line-height: 1.7; border-radius: 12px; }
#screen-welcome .panel-copy::before { display: none; }
@media (max-width: 700px) {
  #screen-welcome .panel { display: flex; flex-direction: column; max-width: 520px; min-height: 0; padding: 54px 28px 34px; text-align: center; background: #fff; }
  #screen-welcome .panel-icon { margin: 0 auto 26px; }
  #screen-welcome .panel h1 { color: var(--text); font-size: 38px; }
  #screen-welcome .panel-sub { color: #a08d7d; margin-bottom: 25px; }
  #screen-welcome .panel::after { display: none; }
  #screen-welcome .panel-desc { margin: 0 0 28px; padding: 0; border: 0; text-align: center; font-size: 15px; }
  #screen-welcome .pills { justify-content: center; margin: 0 0 28px; }
  #screen-welcome #welcome-start { margin: 0 auto; }
  #screen-welcome .panel-copy { width: 100%; margin: 30px 0 0; }
}

#screen-welcome .pwa-side {
  grid-area: brand;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 26px;
}
#welcome-install {
  background: rgba(255, 248, 233, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(243, 201, 132, 0.30);
  border-radius: 18px;
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
#welcome-install::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #92400e, #d97706, #f59e0b);
}
.pwa-install-title {
  font-family: var(--display); font-size: 21px; font-weight: 700; color: #fff;
  letter-spacing: -.3px; line-height: 1.15;
}
.pwa-install-sub {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.4px;
  color: #f3c984; margin: 3px 0 12px;
}
.pwa-install-desc { color: #e9d9b8; font-size: 13.5px; line-height: 1.65; margin-bottom: 14px; }
.pwa-install-feats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pwa-install-feat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: #f3c984;
  background: rgba(243, 201, 132, 0.10); border: 1px solid rgba(243, 201, 132, 0.26);
  border-radius: 999px; padding: 4px 11px;
}
.pwa-install-feat::before { content: '✓'; color: #f3c984; font-size: 11px; }
.pwa-install-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#screen-welcome .pwa-install-actions .btn { height: 42px; padding: 0 18px; font-size: 13.5px; }
#screen-welcome .pwa-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: none;
}
#screen-welcome .pwa-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}
.pwa-check-btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 201, 132, 0.30);
  color: #f3c984;
  border-radius: 999px; padding: 7px 16px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .15s var(--ease);
}
.pwa-check-btn:hover { background: rgba(243, 201, 132, 0.14); border-color: rgba(243, 201, 132, 0.55); color: #fff; }
.pwa-check-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.pwa-update-banner {
  border: 1px solid rgba(243, 201, 132, 0.35);
  background: rgba(255, 248, 233, 0.08);
  border-radius: 14px; padding: 16px 18px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pwa-update-banner-title { font-family: var(--display); font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.pwa-update-banner-text { font-size: 12.5px; color: #e9d9b8; line-height: 1.6; margin-bottom: 12px; }
.pwa-update-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#screen-welcome .pwa-update-banner-actions .btn { height: 40px; padding: 0 16px; font-size: 13px; }

.pwa-status {
  border: 1px solid rgba(243, 201, 132, 0.40);
  background: rgba(255, 248, 233, 0.08);
  border-radius: 14px; padding: 13px 16px;
  display: flex; align-items: flex-start; gap: 11px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pwa-status-icon { font-size: 18px; line-height: 1.25; flex-shrink: 0; }
.pwa-status-title { font-family: var(--display); font-size: 16px; font-weight: 700; color: #fff; }
.pwa-status-text { font-size: 12.5px; color: #e9d9b8; line-height: 1.55; margin-top: 2px; }
.pwa-status.ok { border-color: rgba(140, 220, 140, 0.45); background: rgba(46, 125, 50, 0.18); }
.pwa-status.ok .pwa-status-icon { color: #9fe79f; }
.pwa-status.off { border-color: rgba(243, 201, 132, 0.45); background: rgba(146, 64, 14, 0.22); }

@media (max-width: 700px) {
  #screen-welcome .pwa-side { width: 100%; padding-top: 6px; }
  #welcome-install {
    background: linear-gradient(180deg, #fffdf8 0%, #fff6e4 100%);
    border: 1.5px solid #e8c479;
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.12), inset 0 1px 0 #fff;
  }
  .pwa-install-title { color: var(--brand); }
  .pwa-install-sub { color: var(--accent); }
  .pwa-install-desc { color: var(--text2); }
  .pwa-install-feat { color: var(--brand); background: var(--accent-soft); border-color: #eed293; }
  .pwa-install-feat::before { color: #b45309; }
  #screen-welcome .pwa-ghost { background: #fff; border: 1.5px solid var(--border2); color: var(--text); }
  .pwa-check-btn { color: var(--brand); border-color: var(--border2); background: #fff; }
  .pwa-update-banner { background: linear-gradient(180deg, #fffdf8 0%, #fff6e4 100%); border-color: #e8c479; }
  .pwa-update-banner-title { color: var(--brand); }
  .pwa-update-banner-text { color: var(--text2); }
  .pwa-status { background: linear-gradient(180deg, #fffdf8 0%, #fff6e4 100%); border-color: #e8c479; }
  .pwa-status .pwa-status-title { color: var(--brand); }
  .pwa-status .pwa-status-text { color: var(--text2); }
  .pwa-status.ok { border-color: #2e7d32; background: #f0fdf4; }
  .pwa-status.ok .pwa-status-icon { color: #2e7d32; }
  .pwa-status.off { background: #fbf4e5; border-color: #ddbd83; }
}

/* Sauvegarder et rapports — bandeaux, cartes habillées, état, avertissement (préfixé) */
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero { display: flex; align-items: center; gap: 36px; padding: 40px 44px 36px; margin-top: 6px; background: linear-gradient(135deg, #5c2a0a 0%, #92400e 45%, #d97706 100%); color: #fff; flex-wrap: wrap; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-img { width: 170px; height: 220px; object-fit: cover; border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 0 5px rgba(255,213,132,.25); flex-shrink: 0; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-text { flex: 1; min-width: 260px; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-title { font-family: Georgia, 'Times New Roman', serif; font-size: 42px; font-weight: 900; letter-spacing: -1px; line-height: 1.05; color: #fff; margin-bottom: 12px; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-sub { font-size: 11.5px; letter-spacing: 2.6px; text-transform: uppercase; font-weight: 700; color: #f3c984; margin-bottom: 22px; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-quote { font-style: italic; font-size: 16px; line-height: 1.7; color: #f6e7cf; border-left: 3px solid #e5b35d; padding-left: 18px; max-width: 520px; }
:is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .sheet-inner { padding-top: 36px; }
#save-export-view .save-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
#save-export-view .save-grid .save-card { background: var(--surface); }
#save-export-view .save-card { position: relative; overflow: hidden; display: flex; flex-direction: column; margin-bottom: 0; padding: 32px 28px 26px; text-align: center; cursor: pointer; user-select: none; transition: all .2s var(--ease); outline: none; }
#save-export-view .save-card:active { transform: translateY(-2px) scale(.99); }
#save-export-view .save-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,119,6,.25); }
#save-export-view .save-card:hover .btn-accent { box-shadow: 0 12px 32px rgba(146,64,14,.45), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
#save-export-view .save-card .btn { pointer-events: auto; }
#save-export-view .save-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#save-export-view .save-card-footer { margin-top: auto; display: grid; grid-template-rows: 56px minmax(52px, auto); gap: 12px; align-items: stretch; }
#save-export-view .save-card-action { cursor: pointer; touch-action: manipulation; }
#save-export-view .save-card .save-status,
#save-export-view .save-card .save-warning { min-height: 52px; box-sizing: border-box; }
#save-export-view .save-card .save-status { display: flex; align-items: center; justify-content: center; margin-top: 0; }
#save-export-view .save-card .save-warning { margin-top: 0; display: flex; align-items: center; }
#save-export-view .save-card .save-card-action:focus-visible { outline: 3px solid #f3c984; outline-offset: 3px; }
#save-export-view .save-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#save-export-view .save-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--accent); background: var(--accent-soft); }
:is(#save-export-view, #sync-balance-view, #license-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-card-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: radial-gradient(circle at 30% 30%, #fde68a, #d97706 55%, #92400e); box-shadow: 0 8px 22px rgba(146,64,14,.35), inset 0 2px 4px rgba(255,255,255,.5), 0 0 0 4px rgba(243,201,132,.35); }
#save-export-view .save-card h3 { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border2); }
#save-export-view .save-card-body { flex: 1; margin-bottom: 22px; }
#save-export-view .save-card p { color: var(--text2); line-height: 1.7; margin: 0 0 14px; }
#save-export-view .save-card p:last-child { margin-bottom: 0; }
#save-export-view .save-card .btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; white-space: normal; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; gap: 10px; }
#save-export-view .save-card .btn-accent { background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #f59e0b 100%); box-shadow: 0 8px 24px rgba(146,64,14,.35), inset 0 1px 0 rgba(255,255,255,.35); }
#save-export-view .save-card .btn-accent:hover { box-shadow: 0 12px 32px rgba(146,64,14,.45), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
#save-export-view .save-status { min-height: 22px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--brand); }
#save-export-view .save-status:empty { visibility: hidden; }
#save-export-view .save-warning { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f0c674; color: #92400e; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: left; }
@media (max-width: 800px) { #save-export-view .save-grid { grid-template-columns: 1fr; gap: 18px; } #save-export-view .save-card { padding: 26px 18px 22px; } #save-export-view .save-card .btn { font-size: 14.5px; padding: 12px 14px; } #save-export-view .sheet-inner { padding: 24px 16px; } :is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero { padding: 28px 22px; gap: 22px; justify-content: center; text-align: center; } :is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-quote { border-left: 0; padding-left: 0; margin: 0 auto; } :is(#save-export-view, #sync-balance-view, #license-view, #report-alltime-view, #report-monthly-view, #report-yearly-view, #report-custom-view, #cfg-expense-names-view, #cfg-assets-view, #add-expense-view, #add-income-view, #cfg-income-names-view, #add-transfer-view, #history-view) .save-hero-title { font-size: 32px; } }

/* Ajuster le solde — même famille visuelle que Sauvegarder (préfixé) */
#sync-balance-view .sync-card { position: relative; overflow: hidden; margin-bottom: 0; padding: 32px 28px 28px; }
#sync-balance-view .sync-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#sync-balance-view .sync-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#sync-balance-view .sync-fields { margin-bottom: 22px; }
#sync-balance-view .sync-preview { border-radius: 14px; border: 1px solid var(--border2); background: linear-gradient(180deg, #fffdf8 0%, #fdf3df 100%); padding: 18px 22px; margin-bottom: 22px; transition: all .2s var(--ease); }
#sync-balance-view .sync-preview-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--border2); font-size: 15px; color: var(--text2); }
#sync-balance-view .sync-preview-row strong { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; color: var(--text); }
#sync-balance-view .sync-preview-diff { border-bottom: 0; }
#sync-balance-view .sync-preview-diff strong { font-size: 24px; }
#sync-balance-view .sync-preview-note { margin-top: 10px; font-size: 14px; line-height: 1.6; font-weight: 600; color: var(--text2); }
#sync-balance-view .sync-preview.pos { border-color: #86c98a; background: linear-gradient(180deg, #f6fdf6 0%, #e6f6e7 100%); }
#sync-balance-view .sync-preview.pos .sync-preview-diff strong, #sync-balance-view .sync-preview.pos .sync-preview-note { color: #1f7a2e; }
#sync-balance-view .sync-preview.neg { border-color: #f0c674; background: linear-gradient(180deg, #fff7e6 0%, #fdeccc 100%); }
#sync-balance-view .sync-preview.neg .sync-preview-diff strong, #sync-balance-view .sync-preview.neg .sync-preview-note { color: #92400e; }
#sync-balance-view .sync-preview.zero { border-color: var(--border2); background: #f7f5f1; }
#sync-balance-view .sync-preview.zero .sync-preview-diff strong, #sync-balance-view .sync-preview.zero .sync-preview-note { color: var(--text3); }
#sync-balance-view .sync-card .btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; white-space: normal; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; }
#sync-balance-view .sync-card .btn-accent { background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #f59e0b 100%); box-shadow: 0 8px 24px rgba(146,64,14,.35), inset 0 1px 0 rgba(255,255,255,.35); }
#sync-balance-view .sync-card .btn-accent:hover:not(:disabled) { box-shadow: 0 12px 32px rgba(146,64,14,.45), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
#sync-balance-view .sync-card .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
#sync-balance-view .save-card-icon { margin: 0 auto 16px; }
@media (max-width: 800px) { #sync-balance-view .sync-card { padding: 26px 18px 22px; } #sync-balance-view .sheet-inner { padding: 24px 16px; } #sync-balance-view .sync-preview-row { font-size: 14px; } }

/* Ajouter un commerce — même finition visuelle que les vues système */
#cfg-expense-names-view .commerce-hero-img { object-position: center 44%; }
#cfg-expense-names-view .commerce-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#cfg-expense-names-view .commerce-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#cfg-expense-names-view .commerce-entry-card .save-card-icon { margin-bottom: 18px; }
#cfg-expense-names-view .commerce-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#cfg-expense-names-view .commerce-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
#cfg-expense-names-view .commerce-entry-field { margin-bottom: 0; }
#cfg-expense-names-view .commerce-add-btn { min-width: 150px; min-height: var(--fh); height: auto; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#cfg-expense-names-view .commerce-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#cfg-expense-names-view .commerce-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#cfg-expense-names-view .commerce-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#cfg-expense-names-view .commerce-list-card .rich-search-bar { margin-bottom: 18px; }
@media (max-width: 800px) {
  #cfg-expense-names-view .commerce-card { padding: 26px 18px 22px; }
  #cfg-expense-names-view .commerce-entry-row { grid-template-columns: 1fr; gap: 4px; }
  #cfg-expense-names-view .commerce-add-btn { width: 100%; }
  #cfg-expense-names-view .commerce-list-heading { align-items: flex-start; gap: 14px; }
  #cfg-expense-names-view .commerce-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #cfg-expense-names-view .commerce-list-heading h3 { font-size: 19px; }
}

/* Ajouter un compte & avoir — même standard visuel que Ajouter un commerce */
#cfg-assets-view .asset-hero-img { object-position: center 44%; }
#cfg-assets-view .asset-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#cfg-assets-view .asset-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#cfg-assets-view .asset-entry-card .save-card-icon { margin-bottom: 18px; }
#cfg-assets-view .asset-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#cfg-assets-view .asset-preview-card { margin-bottom: 26px; }
#cfg-assets-view .asset-add-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; white-space: normal; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #f59e0b 100%); box-shadow: 0 8px 24px rgba(146,64,14,.35), inset 0 1px 0 rgba(255,255,255,.35); }
#cfg-assets-view .asset-add-btn:hover { box-shadow: 0 12px 32px rgba(146,64,14,.45), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
#cfg-assets-view .asset-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#cfg-assets-view .asset-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#cfg-assets-view .asset-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
@media (max-width: 800px) {
  #cfg-assets-view .asset-card { padding: 26px 18px 22px; }
  #cfg-assets-view .asset-list-heading { align-items: flex-start; gap: 14px; }
  #cfg-assets-view .asset-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #cfg-assets-view .asset-list-heading h3 { font-size: 19px; }
}

/* Ajouter une dépense — même standard visuel que les vues standardisées */
#add-expense-view .expense-hero-img { object-position: center 48%; }
#add-expense-view .expense-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#add-expense-view .expense-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#add-expense-view .expense-entry-card .save-card-icon { margin-bottom: 18px; }
#add-expense-view .expense-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#add-expense-view .expense-amount-input { font-size: 22px; font-weight: 800; height: 58px; }
#add-expense-view .expense-submit-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; white-space: normal; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; }
#add-expense-view .expense-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#add-expense-view .expense-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#add-expense-view .expense-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#add-expense-view .expense-table-wrap { overflow-x: auto; }
@media (max-width: 800px) {
  #add-expense-view .expense-card { padding: 26px 18px 22px; }
  #add-expense-view .expense-list-heading { align-items: flex-start; gap: 14px; }
  #add-expense-view .expense-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #add-expense-view .expense-list-heading h3 { font-size: 19px; }
}

/* Ajouter un revenu — même standard visuel que les vues standardisées */
#add-income-view .income-hero-img { object-position: center 46%; }
#add-income-view .income-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#add-income-view .income-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#add-income-view .income-entry-card .save-card-icon { margin-bottom: 18px; }
#add-income-view .income-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#add-income-view .income-amount-input { font-size: 22px; font-weight: 800; height: 58px; }
#add-income-view .income-submit-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; white-space: normal; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #f59e0b 100%); box-shadow: 0 8px 24px rgba(146,64,14,.35), inset 0 1px 0 rgba(255,255,255,.35); }
#add-income-view .income-submit-btn:hover { box-shadow: 0 12px 32px rgba(146,64,14,.45), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
#add-income-view .income-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#add-income-view .income-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#add-income-view .income-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#add-income-view .income-table-wrap { overflow-x: auto; }
@media (max-width: 800px) {
  #add-income-view .income-card { padding: 26px 18px 22px; }
  #add-income-view .income-list-heading { align-items: flex-start; gap: 14px; }
  #add-income-view .income-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #add-income-view .income-list-heading h3 { font-size: 19px; }
}

/* Ajouter une source de revenu — même standard visuel que les vues standardisées */
#cfg-income-names-view .source-hero-img { object-position: center 48%; }
#cfg-income-names-view .source-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#cfg-income-names-view .source-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#cfg-income-names-view .source-entry-card .save-card-icon { margin-bottom: 18px; }
#cfg-income-names-view .source-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
#cfg-income-names-view .source-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
#cfg-income-names-view .source-entry-field { margin-bottom: 0; }
#cfg-income-names-view .source-add-btn { min-width: 150px; min-height: var(--fh); height: auto; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#cfg-income-names-view .source-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#cfg-income-names-view .source-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#cfg-income-names-view .source-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#cfg-income-names-view .source-list-card .rich-search-bar { margin-bottom: 18px; }
@media (max-width: 800px) {
  #cfg-income-names-view .source-card { padding: 26px 18px 22px; }
  #cfg-income-names-view .source-entry-row { grid-template-columns: 1fr; gap: 4px; }
  #cfg-income-names-view .source-add-btn { width: 100%; }
  #cfg-income-names-view .source-list-heading { align-items: flex-start; gap: 14px; }
  #cfg-income-names-view .source-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #cfg-income-names-view .source-list-heading h3 { font-size: 19px; }
}

/* Transfert entre comptes — même standard visuel que les vues standardisées */
#add-transfer-view .transfer-hero-img { object-position: center 54%; }
#add-transfer-view .transfer-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#add-transfer-view .transfer-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#add-transfer-view .transfer-entry-card .save-card-icon { margin-bottom: 18px; }
#add-transfer-view .transfer-intro { color: var(--text2); line-height: 1.7; text-align: center; max-width: 680px; margin: 0 auto 26px; font-size: 16px; }
#add-transfer-view .transfer-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
#add-transfer-view .transfer-amount-input { font-size: 22px; font-weight: 800; height: 58px; }
#add-transfer-view .transfer-accounts-grid { margin-top: 4px; }
#add-transfer-view .transfer-live-calc-box { margin-top: 8px; }
#add-transfer-view .transfer-submit-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .2px; }
#add-transfer-view .transfer-list-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#add-transfer-view .transfer-list-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#add-transfer-view .transfer-list-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#add-transfer-view .transfer-table-wrap { overflow-x: auto; }
@media (max-width: 800px) {
  #add-transfer-view .transfer-card { padding: 26px 18px 22px; }
  #add-transfer-view .transfer-form-grid { grid-template-columns: 1fr; gap: 0; }
  #add-transfer-view .transfer-list-heading { align-items: flex-start; gap: 14px; }
  #add-transfer-view .transfer-list-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #add-transfer-view .transfer-list-heading h3 { font-size: 19px; }
}

/* Historique complet — même standard visuel que les vues standardisées */
#history-view .history-hero-img { object-position: center 52%; }
#history-view .history-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#history-view .history-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#history-view .history-card-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#history-view .history-card-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#history-view .history-card-heading-text { flex: 1; min-width: 0; }
#history-view .history-card-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#history-view .history-card-heading p { margin: 6px 0 0; color: var(--text2); line-height: 1.55; font-size: 14px; }
#history-view .history-reset-btn { flex: 0 0 auto; }
#history-view .history-filter-grid { margin-top: 4px; }
#history-view .history-summary-count { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .95rem; font-weight: 600; color: var(--text2); }
#history-view .history-table-wrap { overflow-x: auto; }
@media (max-width: 800px) {
  #history-view .history-card { padding: 26px 18px 22px; }
  #history-view .history-card-heading { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  #history-view .history-card-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #history-view .history-card-heading h3 { font-size: 19px; }
  #history-view .history-card-heading p { font-size: 13.5px; }
  #history-view .history-reset-btn { width: 100%; margin-left: 72px; }
}

/* Rapport mensuel — même standard visuel que les vues standardisées */
#report-monthly-view .monthly-hero-img { object-position: center 52%; }
#report-monthly-view .monthly-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#report-monthly-view .monthly-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#report-monthly-view .monthly-selector-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#report-monthly-view .monthly-selector-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#report-monthly-view .monthly-selector-heading-text { flex: 1; min-width: 0; }
#report-monthly-view .monthly-selector-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#report-monthly-view .monthly-selector-heading p { margin: 6px 0 0; color: var(--text2); line-height: 1.55; font-size: 14px; }
#report-monthly-view .monthly-selector-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); align-items: end; gap: 18px; }
#report-monthly-view .monthly-month-field { max-width: 360px; margin-bottom: 0; }
#report-monthly-view .monthly-generate-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#report-monthly-view .monthly-output-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
#report-monthly-view .monthly-print-btn { min-height: 46px; height: auto; padding: 12px 18px; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#report-monthly-view .monthly-report-output { margin-top: 24px; }
#report-monthly-view .monthly-report-output:empty { display: none; }
#report-monthly-view .monthly-report-output > .card { margin-bottom: 0; }
@media (max-width: 800px) {
  #report-monthly-view .monthly-card { padding: 26px 18px 22px; }
  #report-monthly-view .monthly-selector-heading { align-items: flex-start; gap: 14px; }
  #report-monthly-view .monthly-selector-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #report-monthly-view .monthly-selector-heading h3 { font-size: 19px; }
  #report-monthly-view .monthly-selector-heading p { font-size: 13.5px; }
  #report-monthly-view .monthly-selector-row { grid-template-columns: 1fr; gap: 4px; }
  #report-monthly-view .monthly-month-field { max-width: none; }
  #report-monthly-view .monthly-output-actions { justify-content: stretch; }
  #report-monthly-view .monthly-print-btn { width: 100%; }
}

/* Rapport de l'Année Fiscale — même standard visuel que les vues standardisées */
#report-yearly-view .yearly-hero-img { object-position: center 50%; }
#report-yearly-view .yearly-card { position: relative; overflow: hidden; margin-bottom: 24px; padding: 32px 28px 28px; }
#report-yearly-view .yearly-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold); }
#report-yearly-view .yearly-selector-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
#report-yearly-view .yearly-selector-heading .save-card-icon { width: 64px; height: 64px; margin: 0; font-size: 28px; flex: 0 0 auto; }
#report-yearly-view .yearly-selector-heading-text { flex: 1; min-width: 0; }
#report-yearly-view .yearly-selector-heading h3 { margin: 0; color: var(--brand); font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 900; line-height: 1.25; }
#report-yearly-view .yearly-selector-heading p { margin: 6px 0 0; color: var(--text2); line-height: 1.55; font-size: 14px; }
#report-yearly-view .yearly-selector-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); align-items: end; gap: 18px; }
#report-yearly-view .yearly-year-field { max-width: 360px; margin-bottom: 0; }
#report-yearly-view .yearly-generate-btn { width: 100%; min-height: 56px; height: auto; padding: 14px 18px; line-height: 1.25; font-size: 15px; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#report-yearly-view .yearly-output-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
#report-yearly-view .yearly-print-btn { min-height: 46px; height: auto; padding: 12px 18px; border-radius: 14px; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; }
#report-yearly-view .yearly-report-output { margin-top: 24px; }
#report-yearly-view .yearly-report-output:empty { display: none; }
#report-yearly-view .yearly-report-output > .card { margin-bottom: 0; }
@media (max-width: 800px) {
  #report-yearly-view .yearly-card { padding: 26px 18px 22px; }
  #report-yearly-view .yearly-selector-heading { align-items: flex-start; gap: 14px; }
  #report-yearly-view .yearly-selector-heading .save-card-icon { width: 58px; height: 58px; font-size: 25px; }
  #report-yearly-view .yearly-selector-heading h3 { font-size: 19px; }
  #report-yearly-view .yearly-selector-heading p { font-size: 13.5px; }
  #report-yearly-view .yearly-selector-row { grid-template-columns: 1fr; gap: 4px; }
  #report-yearly-view .yearly-year-field { max-width: none; }
  #report-yearly-view .yearly-output-actions { justify-content: stretch; }
  #report-yearly-view .yearly-print-btn { width: 100%; }
}

/* DaoBudget Specific Components */
.card {
  background: var(--surface);
  border-radius: var(--r2);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 16px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all .2s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.stat-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  margin-top: 6px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--brand);
}
input, select, textarea {
  height: var(--fh);
  padding: 0 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  transition: all .15s var(--ease);
  width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--border2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14.5px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
th {
  background-color: var(--surface2);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-bottom: 2px solid var(--border);
}
tr:hover td { background-color: var(--surface2); }
.amount-pos { color: var(--green); font-weight: 700; }
.amount-neg { color: var(--red); font-weight: 700; }
.tao-quote {
  font-style: italic;
  color: var(--text2);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 18px 0 24px;
  font-size: 15px;
  line-height: 1.6;
}
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable { cursor: pointer; user-select: none; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable:hover { background-color: var(--accent-soft); }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sort-icon { display: inline-flex; gap: 3px; font-size: 11px; margin-left: 6px; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sort-icon .arrow { transition: color 0.2s ease; color: var(--text3); font-weight: normal; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable:hover .sort-icon .arrow { color: var(--brand); font-weight: bold; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable[data-order="asc"] .arrow.up { color: var(--green); font-weight: bold; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable[data-order="asc"] .arrow.down { color: var(--text3); font-weight: normal; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable[data-order="desc"] .arrow.up { color: var(--text3); font-weight: normal; }
:is(#full-history-table, #income-ops-table, #expense-ops-table, #transfer-ops-table) .sortable[data-order="desc"] .arrow.down { color: var(--red); font-weight: bold; }

@media print {
  .app-header, .view-header, .no-print, #dashboard-nav { display: none !important; }
  .view-container, .sheet, .printable-area { max-width: 100% !important; padding: 0 !important; box-shadow: none !important; border: none !important; }
  .report-export-print-root { width: 100% !important; max-width: none !important; }
  .report-export-print-root .report-income-expense-grid { display: block !important; }
  .report-export-print-root .report-income-column,
  .report-export-print-root .report-expense-column { margin-top: 24px; }
  .report-export-print-root table { width: 100% !important; }
  .report-export-print-root thead { display: table-header-group; }
  .report-export-print-root tr { break-inside: avoid; page-break-inside: avoid; }
  .report-export-print-root h1,
  .report-export-print-root h2,
  .report-export-print-root h3 { break-after: avoid; page-break-after: avoid; }
}



/* RICH PROFESSIONAL COMPONENTS */
.virtual-card-preview {
  background: linear-gradient(135deg, #78350f 0%, #92400e 40%, #b45309 70%, #d97706 100%);
  color: #fff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 10px 24px rgba(120,53,15,.22);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.virtual-card-preview::after {
  content: '';
  position: absolute; right: -20px; bottom: -20px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.vc-chip {
  width: 38px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  margin-bottom: 14px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
}
.vc-name { font-family: Georgia, serif; font-size: 20px; font-weight: 900; letter-spacing: -.2px; color: #fff; }
.vc-sub { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; color: #fde68a; }
.vc-balance { font-family: Georgia, serif; font-size: 26px; font-weight: 900; color: #fef3c7; margin-top: 12px; }

.live-calc-box {
  background: var(--surface2);
  border: 1.5px dashed var(--accent);
  border-radius: var(--r);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 20px;
  font-size: 14px;
  font-weight: 600;
  flex-wrap: wrap;
}
.live-calc-box .lc-label { color: var(--text2); }
.live-calc-box .lc-val { font-family: Georgia, serif; font-size: 16.5px; font-weight: 800; }
.quick-date-pills {
  display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.quick-date-pill {
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface); border: 1.5px solid var(--border); cursor: pointer;
  color: var(--brand); transition: all .15s; user-select: none;
}
.quick-date-pill:hover, .quick-date-pill.active {
  background: var(--accent-soft); border-color: var(--accent);
}
.quick-store-pills {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.quick-store-pill {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--border2); cursor: pointer;
  color: var(--text); transition: all .15s; user-select: none;
}
.quick-store-pill:hover {
  background: var(--accent-soft); border-color: var(--accent); color: var(--brand);
}
.rich-item-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
  transition: all .15s;
}
.rich-item-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.rich-item-info .ri-title {
  font-weight: 800; font-size: 15px; color: var(--text);
}
.rich-item-info .ri-meta {
  font-size: 12px; color: var(--text3); margin-top: 2px;
}
.rich-item-stats {
  text-align: right; font-weight: 700;
}
.rich-item-stats .ri-total {
  font-family: Georgia, serif; font-size: 16px; font-weight: 900;
}
.rich-search-bar {
  margin-bottom: 16px;
  position: relative;
}
.rich-search-bar input {
  padding-left: 38px;
}
.rich-search-bar::before {
  content: '🔍';
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 14px; opacity: .6;
  pointer-events: none;
}
.badge-count {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--brand);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 800;
  margin-left: 8px;
}



/* ENHANCED HISTORY STYLING */
.history-summary-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}
.history-summary-metric {
  display: flex;
  flex-direction: column;
}
.history-summary-metric .hsm-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text3);
  font-weight: 700;
}
.history-summary-metric .hsm-val {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 800;
}
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.type-badge-expense {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.type-badge-income {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.type-badge-transfer {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.amount-tr { color: #1e40af; }
#full-history-table tbody tr {
  transition: background-color 0.15s;
}
#full-history-table tbody tr:nth-child(even) {
  background-color: var(--surface2);
}
#full-history-table tbody tr:hover {
  background-color: var(--accent-soft) !important;
}



/* NON-BREAKING AMOUNTS & NO-WRAP FIXES */
.amount-pos, .amount-neg, .stat-val, .lc-val, .ri-total, .vc-balance,
#full-history-table td:nth-child(5), #full-history-table th:nth-child(5),
table td:last-child, table th:last-child {
  white-space: nowrap !important;
}
table td[style*="text-align:right"], table th[style*="text-align:right"],
table td[style*="text-align: right"], table th[style*="text-align: right"] {
  white-space: nowrap !important;
}


/* Licence — panneau légal traité comme une vraie carte de section */
#license-view .license-card-content {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 32px 28px 28px;
  background: linear-gradient(180deg, #fffdf8 0%, #fdf3df 100%);
  border: 1.5px solid var(--border2);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
}
#license-view .license-card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gold);
}
#license-view .license-card-content h3 {
  margin-top: 24px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border2);
}
#license-view .license-card-content h3:first-child { margin-top: 0; }
#license-view .license-card-content p { line-height: 1.8; }
@media (max-width: 800px) {
  #license-view .license-card-content { padding: 26px 18px 22px; }
}


/* Rapport personnalisé — même standard visuel que les autres rapports */
#report-custom-view .custom-hero-img { object-position: center 50%; }
#report-custom-view .custom-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 32px 28px 28px;
}
#report-custom-view .custom-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gold);
}
#report-custom-view .custom-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
#report-custom-view .custom-actions .btn {
  flex: 1 1 220px;
}
@media (max-width: 800px) {
  #report-custom-view .custom-card { padding: 26px 18px 22px; }
  #report-custom-view .custom-actions { flex-direction: column; }
  #report-custom-view .custom-actions .btn { width: 100%; }
}

/* === Sélecteur de langue Dao Budget === */
.app-language-control { display: inline-flex; align-items: center; gap: 7px; margin-right: 8px; }
.app-language-control label { color: var(--text2, #6d5b44); font-size: .74rem; font-weight: 700; }
.app-language-control select { width: auto; min-width: 92px; height: 34px; padding: 0 25px 0 9px; border-radius: 9px; font-size: .78rem; }
@media (max-width: 620px) {
  .app-language-control label { display: none; }
  .app-language-control { margin-right: 2px; }
  .app-language-control select { min-width: 76px; }
}

/* ============================================================
   ECRAN DE LANGUE - entree de l'application
   ============================================================ */

.screen-language {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(217,119,6,.16) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 22%, rgba(146,64,14,.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 105%, rgba(245,158,11,.18) 0%, transparent 60%),
    linear-gradient(160deg, #fdfaf4 0%, var(--bg) 48%, #f2ead9 100%);
}

/* halos qui respirent */
.screen-language::before,
.screen-language::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
}
.screen-language::before {
  width: 46vmax; height: 46vmax; left: -14vmax; top: -12vmax;
  background: radial-gradient(circle, rgba(217,119,6,.38), transparent 66%);
  animation: langDrift1 18s var(--ease) infinite alternate;
}
.screen-language::after {
  width: 40vmax; height: 40vmax; right: -12vmax; bottom: -14vmax;
  background: radial-gradient(circle, rgba(146,64,14,.32), transparent 66%);
  animation: langDrift2 22s var(--ease) infinite alternate;
}
@keyframes langDrift1 {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(6vmax,4vmax,0) scale(1.14); }
}
@keyframes langDrift2 {
  from { transform: translate3d(0,0,0) scale(1.1); }
  to   { transform: translate3d(-5vmax,-4vmax,0) scale(1); }
}

.lang-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin: auto;
  padding: 20px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* marque */
.lang-brand { display: flex; align-items: center; gap: 11px; }
.lang-brand-mark {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(146,64,14,.28);
}
.lang-brand-name {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--brand);
}

/* titre qui defile dans les 4 langues */
.lang-rotator { position: relative; width: 100%; height: 1.7em; }
.lang-rotator-item {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: clamp(1.08rem, 3.2vw, 1.5rem);
  color: var(--text2);
  opacity: 0;
  animation: langRotate 16s linear infinite;
}
.lang-rotator-item:nth-child(1)::before { content: "Choisissez votre langue"; }
.lang-rotator-item:nth-child(2)::before { content: "Choose your language"; }
.lang-rotator-item:nth-child(3)::before { content: "W\00e4hlen Sie Ihre Sprache"; }
.lang-rotator-item:nth-child(4)::before { content: "Elija su idioma"; }
.lang-rotator-item:nth-child(1) { animation-delay: 0s; }
.lang-rotator-item:nth-child(2) { animation-delay: 4s; }
.lang-rotator-item:nth-child(3) { animation-delay: 8s; }
.lang-rotator-item:nth-child(4) { animation-delay: 12s; }
@keyframes langRotate {
  0%   { opacity: 0; transform: translateY(10px); }
  5%   { opacity: 1; transform: translateY(0); }
  20%  { opacity: 1; transform: translateY(0); }
  25%  { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* grille 2 x 2 */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 560px;
}

.lang-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 124px;
  padding: 22px 26px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--r3);
  background: linear-gradient(150deg, rgba(255,255,255,.88), rgba(255,255,255,.62));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.9);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  animation: langCardIn .55s var(--ease) both;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.lang-card:nth-child(1) { animation-delay: .08s; }
.lang-card:nth-child(2) { animation-delay: .16s; }
.lang-card:nth-child(3) { animation-delay: .24s; }
.lang-card:nth-child(4) { animation-delay: .32s; }
@keyframes langCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* une teinte par langue : la couleur remplace le drapeau */
.lang-card--fr { --lang: #d97706; --lang-soft: rgba(217,119,6,.16); }
.lang-card--en { --lang: #0b7bd4; --lang-soft: rgba(11,123,212,.16); }
.lang-card--de { --lang: #15803d; --lang-soft: rgba(21,128,61,.16); }
.lang-card--es { --lang: #c2410c; --lang-soft: rgba(194,65,12,.16); }

.lang-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--lang);
  opacity: .5;
  transition: opacity .3s var(--ease), width .3s var(--ease);
}
.lang-card:hover::before { opacity: 1; width: 7px; }

.lang-card-sheen {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 16% 14%, var(--lang-soft), transparent 62%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lang-card:hover .lang-card-sheen { opacity: 1; }

.lang-card:hover {
  transform: translateY(-6px);
  border-color: var(--lang);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,.9);
}
.lang-card:active { transform: translateY(-2px) scale(.995); }
.lang-card:focus-visible { outline: 3px solid var(--lang); outline-offset: 3px; }

.lang-card-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; position: relative; }
.lang-card-text strong {
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}

.lang-card-arrow {
  position: relative;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--lang);
  opacity: .45;
  transform: translateX(-5px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.lang-card:hover .lang-card-arrow { opacity: 1; transform: translateX(5px); }

.lang-card-check {
  position: absolute; top: 14px; right: 16px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.lang-card.active .lang-card-check,
.lang-card[aria-pressed="true"] .lang-card-check { opacity: 1; transform: scale(1); }

.lang-card.active,
.lang-card[aria-pressed="true"] {
  border-color: var(--lang);
  box-shadow: 0 0 0 2px var(--lang-soft), var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.9);
}

/* au clic : la carte choisie s'envole, les autres s'effacent */
.lang-grid.is-committing .lang-card { pointer-events: none; }
.lang-grid.is-committing .lang-card:not(.active) {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.lang-card.is-picked { animation: langPick .42s var(--ease) forwards; }
@keyframes langPick {
  0%   { transform: translateY(-6px) scale(1); }
  45%  { transform: translateY(-9px) scale(1.045); }
  100% { transform: translateY(-14px) scale(1.02); opacity: 0; }
}

@media (max-width: 480px) {
  .lang-grid { gap: 13px; }
  .lang-card { min-height: 106px; padding: 18px 20px; }
}
@media (max-width: 340px) {
  .lang-grid { grid-template-columns: 1fr; }
}
@media (max-height: 560px) {
  .lang-card { min-height: 88px; }
  .lang-stage { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-language::before,
  .screen-language::after,
  .lang-rotator-item,
  .lang-card { animation: none !important; }
  .lang-rotator-item { opacity: 0; }
  .lang-rotator-item:first-child { opacity: 1; }
}
