/* app/css/32-home.css — estratto da app.css (2026-07, split senza build). */
/* ========== HOME (Lavaggi) ========== */
.balance-strip { margin: 12px 18px 0; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background 120ms ease; }
.balance-strip:active { background: var(--bg); }
.balance-strip .b-info { flex: 1; }
.balance-strip .b-info .lbl { font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.balance-strip .b-info .val { font-size: 30px; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; }
.balance-strip .b-info .place { font-size: 12px; color: var(--ink-2); margin-top: 2px; font-weight: 600; }
.balance-strip .b-cta { padding: 10px 16px; background: var(--brand); color: #fff; border-radius: 12px; font-size: 13px; font-weight: 800; cursor: pointer; flex-shrink: 0; border: 0; }
.balance-strip .b-cta:active { background: var(--brand-hover); transform: scale(0.97); }
.balance-strip .chev { color: var(--ink-3); flex-shrink: 0; }

.wash-card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); margin: 12px 18px 0; padding: 18px; overflow: hidden; border: 1.5px solid transparent; }
.wash-card.live, .wash-card.dryer { color: var(--ink); border-color: var(--brand); }
.wash-card .strip { margin: -18px -18px 14px; padding: 10px 18px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wash-card.live .strip, .wash-card.dryer .strip { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; }
.wash-card .strip .dot { width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: pulse 1.5s infinite; }
.wash-card .strip .strip-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wash-card .strip .kg-badge { background: rgba(255,255,255,0.22); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.02em; flex-shrink: 0; }
.wash-card .header-row { display: flex; gap: 14px; align-items: center; }
.wash-card .header-text { flex: 1; min-width: 0; }
.wash-card .id-circle { width: 52px; height: 52px; border-radius: 16px; background: #FEE2E2; color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.wash-card .id-circle .id-letter { position: absolute; bottom: -4px; right: -4px; background: var(--ink); color: #fff; font-weight: 800; font-size: 12px; min-width: 22px; padding: 0 5px; height: 22px; border-radius: 11px; border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.wash-card .machine-name { font-size: 16px; font-weight: 700; margin-top: 4px; }
.wash-card .program-name { font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.wash-card .phase-detail { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.wash-card .phase-detail .i-arrow { width: 11px; height: 11px; stroke: var(--ink-3); stroke-width: 2; vertical-align: middle; margin: 0 2px; }
.wash-card .phase-detail .pd-sep { color: var(--line); }
.wash-card .phase-detail .pd-rpm { font-weight: 600; color: var(--ink); }
.wash-card .countdown { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; margin-top: 12px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brand); }
.wash-card .countdown small { font-size: 64px; font-weight: 800; opacity: 1; margin-left: 0; letter-spacing: -0.04em; }
.wash-card .progress-track { height: 6px; background: #FEE2E2; border-radius: 3px; margin-top: 14px; overflow: hidden; }
.wash-card .progress-fill { height: 100%; background: var(--brand); border-radius: 3px; transition: width .5s; }
.wash-card .end-time { font-size: 12px; color: var(--ink-3); margin-top: 8px; display: flex; justify-content: space-between; }
.wash-card .alarm-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wash-card .alarm-label { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--ink); }
/* .toggle-ios allineato esattamente a .toggle-row .toggle in notifiche.html:
   stesso layout 50x30, stesso radius, stesso pallino bianco, stesso brand quando ON.
   Override .wash-card non più necessario: stile base coerente in entrambi i contesti. */
.toggle-ios { width: 50px; height: 30px; background: var(--line); border-radius: 15px; position: relative; transition: background .2s; flex-shrink: 0; cursor: pointer; }
.toggle-ios::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.toggle-ios.on { background: var(--brand); }
.toggle-ios.on::after { transform: translateX(20px); }

/* F6 · Bottone "Notificami fine ciclo" sotto alarm-row nelle wash-card. */
.wash-card .notify-cycle-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.wash-card .notify-cycle-btn:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.wash-card .notify-cycle-btn.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); cursor: default; }
.wash-card .notify-cycle-btn:disabled { opacity: 0.85; }

.empty-state-card { margin: 12px 18px 0; padding: 30px 20px; text-align: center; color: var(--ink-3); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); }
.empty-state-card .ill { width: 72px; height: 72px; margin: 0 auto 12px; background: var(--brand-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--brand); }
.empty-state-card h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.empty-state-card p { font-size: 13px; line-height: 1.5; }
.empty-state-card .empty-state-cta, .referral-block .empty-state-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 12px 18px; background: var(--brand); color: #fff; border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none; transition: background 120ms ease; }
.empty-state-card .empty-state-cta:hover, .empty-state-card .empty-state-cta:active,
.referral-block .empty-state-cta:hover, .referral-block .empty-state-cta:active { background: var(--brand-hover); }

.notif-preview { margin: 10px 18px 0; padding: 12px 14px; background: #ECFDF5; border: 1px solid #BBF7D0; border-radius: 12px; font-size: 12px; color: #065F46; display: flex; gap: 10px; align-items: flex-start; text-decoration: none; }
.notif-preview svg { color: #16A34A; flex-shrink: 0; }
.notif-preview strong { display: block; color: #064E3B; font-size: 13px; margin-bottom: 1px; }
/* Design system §7 chevron rule: align-self center quando row e flex-start. */
.notif-preview .chev { align-self: center; }

/* M1 · Inbox notifiche (storico ricevute). Pattern card-list neutra, icona
   tone-aware (ok=verde, info=blu, gold=oro promo, brand=rosso promo). */
.notif-list { margin: 4px 18px 0; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.notif-item { padding: 14px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: none; }
/* Icona in cerchietto tinto per tone (PWA iOS >= 16.4 -> color-mix ok) */
.notif-item-ico { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.notif-item-ico .i { width: 18px; height: 18px; }
.notif-item-ico--ok { background: color-mix(in srgb, var(--ok) 12%, #fff); color: var(--ok); }
.notif-item-ico--info { background: color-mix(in srgb, var(--info) 12%, #fff); color: var(--info); }
.notif-item-ico--gold { background: color-mix(in srgb, var(--gold) 14%, #fff); color: var(--gold); }
.notif-item-ico--brand { background: var(--brand-soft); color: var(--brand); }
.notif-item-main { flex: 1; min-width: 0; }
.notif-item-text { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.notif-item-time { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
/* Item espandibile (<details> nativo): anteprima clampata + chevron rotante */
/* display:block esplicito: <details> eredita il flex-row di .notif-item e
   summary + corpo diventavano DUE COLONNE affiancate (chevron disallineati,
   testo espanso in colonnina destra). Block = summary full-width, corpo sotto. */
details.notif-item { display: block; padding: 0; }
.notif-item-row { padding: 14px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.notif-item-row::-webkit-details-marker { display: none; }
.notif-item-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
/* Toggle espandi/chiudi: + che diventa × da aperto — stesso pattern di
   .borsellino-month-toggle, il progetto non usa chevron per gli accordion. */
.notif-item-toggle { width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: 20px; font-weight: 400; color: var(--ink-3); flex-shrink: 0; align-self: center; }
.notif-item-toggle::before { content: "+"; }
details[open] > .notif-item-row .notif-item-toggle::before { content: "\00d7"; }
details[open] .notif-item-preview { display: none; }
.notif-item-full { padding: 0 14px 14px 64px; animation: notif-expand .18s ease; }
.notif-item-full p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.notif-item-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }
@keyframes notif-expand { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.notif-empty { margin: 14px 18px 0; padding: 24px 18px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); text-align: center; }
.notif-empty svg { color: var(--ink-3); margin-bottom: 10px; }
.notif-empty strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.notif-empty p { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; line-height: 1.45; }
/* .btn-ghost dell'empty-state usa la regola globale (riga ~660): full-width,
   testo centrato, outline. L'override scoped inline-flex rompeva il centrato. */

/* M3 · Borsellino accordion mese (details/summary nativi).
   Mese corrente expanded di default (attr `open` server-side), gli altri
   collapsed. Chevron ruota 180deg quando expanded. Lo style nasconde il
   triangolino nativo di summary per controllo visivo coerente. */
.borsellino-month { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); margin: 8px 18px 0; overflow: hidden; }
.borsellino-month-summary { padding: 14px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; user-select: none; }
.borsellino-month-summary::-webkit-details-marker { display: none; }
.borsellino-month-summary::marker { content: ''; }
.borsellino-month-label { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink); }
.borsellino-month-count { font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 2px 8px; background: var(--bg); border-radius: 999px; }
.borsellino-month-toggle { width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: 20px; font-weight: 400; color: var(--ink-3); flex-shrink: 0; }
.borsellino-month-toggle::before { content: "+"; }
details[open] > .borsellino-month-summary .borsellino-month-toggle::before { content: "\00d7"; }
.borsellino-month-list { border-top: 1px solid var(--line); }

.history-row { background: var(--surface); padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: none; }
.history-row .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.history-row .body { flex: 1; min-width: 0; }
.history-row .ttl { font-size: 14px; font-weight: 600; }
.history-row .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.history-row .meta-r { text-align: right; font-size: 12px; color: var(--ink-3); }
.history-row .meta-r strong { display: block; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.history-row-chev { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.history-group { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); margin: 10px 18px 0; overflow: hidden; }

