/* home: header identity + total, sales button, dues strip, tools, accounts, calculator */
/* Home (R-HDR-2, R-FIN-2) */
.hh-id { display: flex; align-items: center; gap: .625rem; min-width: 0; line-height: 1.35; }
.header-body > .hh-id { margin-inline-end: auto; }
.hh-text { display: grid; min-width: 0; }
.hh-logo { flex: none; width: 3rem; height: 3rem; border-radius: .75rem; object-fit: cover; background: var(--on-bar); box-shadow: 0 1px 4px var(--shade); }
.hh-total { display: grid; min-width: 0; line-height: 1.35; justify-items: start; }
.hh-total .hh-sum { font-size: var(--fs-xl); white-space: normal; overflow-wrap: anywhere; }
.hh-panel { padding: .25rem .25rem .125rem; }
/* Dues strip under the home total (R-FIN-5, R-HDR-5) */
.hh-dues { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .625rem; padding: .625rem .75rem; border: 1px solid var(--glass-line); border-radius: 1rem; background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-line); }
.hh-due { display: grid; gap: .125rem; min-width: 0; justify-items: center; text-align: center; line-height: 1.35; }
.hh-due-sum { white-space: normal; overflow-wrap: anywhere; }
.hp-nogrip .hh-panel { padding-bottom: .75rem; }
.hh-shop, .hh-sum { font-size: var(--fs-l); font-weight: var(--fw-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-date, .hh-total small { font-size: var(--fs-s); }
.sale-btn { width: 100%; display: grid; justify-items: center; gap: .25rem; padding: 1.75rem 1rem; border-radius: var(--radius); background: var(--brand-strong); color: var(--on-brand); }
.sale-name { font-size: var(--fs-l); font-weight: var(--fw-bold); }
.sale-big { font-size: var(--fs-xl); }
.sale-big:empty { display: none; }
.sale-split { font-size: var(--fs-s); }
.sale-form .panel-title { margin: 0; }
.sale-total { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-height: 1.5rem; }
.sale-total small { color: var(--muted); font-size: var(--fs-s); }
.sale-last { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .75rem; color: var(--muted); font-size: var(--fs-s); }

/* Home tools + accounts + calculator (R-ACC-3..4) */
.tool-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr)); gap: 1.375rem .5rem; margin-top: 1.125rem; }
.tool-btn { position: relative; min-height: var(--hit); display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--text); font-size: var(--fs-s); line-height: 1.4; text-align: center; }
.tool-ic { width: 3.875rem; height: 3.875rem; border-radius: 1.25rem; display: grid; place-items: center; background: var(--tile); color: var(--on-bar); transition: transform var(--t-press) var(--ease); }
.tool-btn:active .tool-ic { transform: scale(.9); }
.tool-btn[data-tool=accounts] { --tile: var(--tile-1); } .tool-btn[data-tool=calc] { --tile: var(--tile-2); } .tool-btn[data-tool=stats] { --tile: var(--tile-3); } .tool-btn[data-tool=settings] { --tile: var(--tile-4); }
.tool-btn[aria-expanded=true] .tool-ic { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--tile); }
.tool-btn[aria-expanded=true] .tool-t { font-weight: var(--fw-bold); }
.tool-slot { margin-top: .75rem; }
.tool-slot:empty { display: none; }/* Settings mode (R-HOME-9): the tile's icon and name move into the header, the rest of the home tab steps aside */
.hh-tool-ic { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .75rem; color: var(--on-bar); box-shadow: 0 1px 4px var(--shade); }
.hh-tool-ic[hidden] { display: none; }
.hh-tool-ic svg { width: 1.75rem; height: 1.75rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hh-id[data-tool] .hh-dot { display: none; }
.tool-hide { display: none !important; }
