/* ============ Affichage simple : l'essentiel d'abord ============ */
:root[data-ui="simple"] .page:not(.show-adv) .adv { display: none !important; }
.advtoggle { align-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 8px; padding: 11px 18px; border-radius: 999px; border: 0; background: var(--hover); color: var(--ink); font: inherit; font-weight: 620; font-size: 14px; cursor: pointer; }
.advtoggle:hover { background: var(--hover-2); }
.page { display: flex; flex-direction: column; }

/* outils des cartes : discrets (au survol sur ordinateur, absents sur mobile) */
:root[data-ui="simple"] .cardtools { opacity: 0; transition: opacity .15s; }
:root[data-ui="simple"] .card:hover .cardtools, :root[data-ui="simple"] .card.maxed .cardtools, :root[data-ui="simple"] .cardtools:focus-within { opacity: 1; }
@media (hover: none) { :root[data-ui="simple"] .card:not(.maxed) .cardtools { display: none; } :root[data-ui="simple"] .card > header:has(.cardtools) { padding-inline-end: 0; } }

/* menu latéral : sections principales + « Plus » */
.navmore { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 14px; border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 560; font-size: 15px; cursor: pointer; text-align: start; }
.navmore:hover { background: var(--hover); }
.navmore > svg:last-child { margin-inline-start: auto; color: var(--ink-3); }
.navmore .count { margin-inline-start: auto; }
.navmore .count + svg { margin-inline-start: 6px; }
.navsub { display: flex; flex-direction: column; gap: 2px; padding-inline-start: 8px; border-inline-start: 2px solid var(--line-2); margin-inline-start: 22px; }
.navsub a { font-size: 14px !important; padding: 9px 12px !important; }
.filebox .syncline { padding: 0 6px 8px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.acctbtn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; text-align: start; }
.acctbtn:hover { background: var(--hover); }
.acctbtn .av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.acctbtn .em { flex: 1; min-width: 0; font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctbtn > svg { color: var(--ink-3); }
.acctmenu { display: flex; flex-direction: column; min-width: 250px; padding: 6px; }
.acctmenu .menuhead { font-size: 12px; color: var(--ink-3); padding: 6px 10px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.menuitem { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 520; cursor: pointer; text-align: start; }
.menuitem:hover { background: var(--hover); }
.menuitem svg { color: var(--ink-2); }
.menurow { display: flex; gap: 6px; padding: 6px 4px; }
.menurow select { flex: 1; min-width: 0; }

/* accueil : cashflow disponible sous le patrimoine */
.hero-cash { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.hero-cash b { font-weight: 720; }
.hero-cash .hc-ok, .hero-cash .hc-bad { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; }
.hero-cash .hc-ok { background: var(--good-bg); color: var(--good-ink); }
.hero-cash .hc-bad { background: var(--warn-bg); color: var(--warn-ink); }
.hero.tinted .hero-cash { background: rgba(255, 255, 255, .18); }
.flatcard > .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; background: transparent !important; }
.flatcard > .card > header { display: none; }
.card.todo .alerts { display: flex; flex-direction: column; gap: 8px; }

/* opérations : liste simple regroupée par jour */
.opscard { padding-top: 16px; }
.opsbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.opsbar .grow { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: var(--hover); border-radius: 14px; padding: 0 12px; }
.opsbar .grow input { border: 0; background: transparent; padding: 10px 0; width: 100%; box-shadow: none; }
.opsbar .btn.on { background: var(--ink); color: var(--surface); }
.opsadv { margin-bottom: 10px; }
.opsadv[hidden] { display: none !important; }
.txlist.simple { border-collapse: collapse; }
.txlist.simple .dayrow td { padding: 16px 2px 6px !important; font-size: 13px; font-weight: 700; color: var(--ink-3); border: 0 !important; background: transparent; }
.txlist.simple tbody tr.dayrow:first-child td { padding-top: 4px !important; }
.txlist.simple tr:not(.dayrow) td { border-bottom: 1px solid var(--line-2); padding: 10px 4px; }
.txlist.simple .c-lib .lib { display: flex; align-items: center; gap: 14px; font-weight: 620; }
.txlist.simple .c-lib .txt { display: flex; flex-direction: column; min-width: 0; }
.txlist.simple .c-lib small { font-size: 13px; font-weight: 450; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txlist.simple td.c-amt { white-space: nowrap; text-align: end; }
@media (max-width: 760px) { .txlist.simple tr.dayrow { display: block; padding: 0; border: 0; } .txlist.simple tr.dayrow td { display: block; } }
.opsum { font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 12px 0 2px; }

/* réglages : choix de l'affichage */
.ui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ui-tile { text-align: start; padding: 14px 16px; border-radius: 18px; border: 2px solid transparent; background: var(--hover); color: var(--ink); font: inherit; cursor: pointer; }
.ui-tile:hover { background: var(--hover-2); }
.ui-tile.on { border-color: var(--ink); background: var(--surface); }
.ui-tile b { display: block; font-size: 15px; }
.ui-tile small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 18px 8px !important; }
.stats3 .st { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 0 16px; border-inline-start: 1px solid var(--line-2); min-width: 0; }
.stats3 .st:first-child { border-inline-start: 0; }
.stats3 small { font-size: 13px; color: var(--ink-3); font-weight: 560; }
.stats3 b { font-size: 24px; font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }
.hero-cash { white-space: nowrap; max-width: 100%; }
@media (max-width: 560px) {
  .stats3 { padding: 14px 2px !important; }
  .stats3 .st { padding: 0 10px; }
  .stats3 b { font-size: 17px; }
  .stats3 .delta { font-size: 11px; }
  .hero-cash { font-size: 13px; gap: 5px; }
  .hero-cash .hc-l { font-size: 0; } .hero-cash .hc-l::before { content: 'Cashflow'; font-size: 13px; }
}

/* Finance Pro : tuiles des projets */
.protiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.protile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); transition: transform .12s; }
.protile:hover { transform: translateY(-1px); }
.protile .t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.protile .t > svg:last-child { margin-inline-start: auto; color: var(--ink-3); }
.protile .v { font-size: 24px; font-weight: 760; letter-spacing: -.02em; }
.protile .d { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 860px) { .protiles { grid-template-columns: 1fr; } .protile .v { font-size: 21px; } }
