/* app/css/20-layout.css — estratto da app.css (2026-07, split senza build). */
/* App container */
.app { min-height: 100vh; max-width: 480px; margin: 0 auto; background: var(--surface); position: relative; padding-bottom: 88px; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* Header (default non sticky: scorre via per liberare spazio nei tab privati) */
.app-header { background: var(--surface); padding: calc(14px + env(safe-area-inset-top)) 18px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
/* Vetrina pubblica: header sticky perche' il bottone "Accedi" e' la CTA primaria */
#screen-public .app-header { position: sticky; top: 0; z-index: 10; }
.app-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }

/* Powered by Miele endorsement (Brand Manual 2024 pag 22-23, 26-27). Badge
   Miele = SVG ufficiale Miele_Logo_M_Red_sRGB (#8C0014 Pantone 704). Use case
   "Promotional" autorizzato per landing pubblica. */
.powered-by-miele { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.powered-by-miele .pbm-txt { font-size: 10px; font-weight: 700; color: var(--ink); letter-spacing: 0.01em; white-space: nowrap; }
.powered-by-miele .pbm-svg { height: 11px; width: auto; display: block; }
/* Su iPhone SE 320px nascondiamo il "Powered by" testo lasciando solo il badge SVG, per non rompere il layout. */
@media (max-width: 360px) {
  .powered-by-miele .pbm-txt { display: none; }
}
.app-header h1 .accent { color: var(--brand); }
.app-header .meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* Sottotitolo header come switch lavanderia (Card/Promo): pill rossa "solita"
   (= .lab-chip) col nome lab + chevron-down; tap apre #labSwitchModal. */
.app-header .meta-switch { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); border: 1px solid #F3D6DC; border-radius: 999px; padding: 3px 10px; font-family: inherit; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-header .meta-switch .i-sm { width: 12px; height: 12px; color: var(--brand); }
.app-header .meta-switch:active { opacity: 0.7; }
.app-header .head-actions { display: flex; gap: 8px; align-items: center; }
.app-header .icon-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; position: relative; }
.app-header .icon-btn:active { transform: scale(0.94); }
.app-header .icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--brand); border-radius: 50%; border: 2px solid var(--surface); }

/* Sub-page header (back-button) */
.sub-header { background: var(--surface); padding: calc(14px + env(safe-area-inset-top)) 18px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.sub-header .back-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.sub-header .back-btn:active { transform: scale(0.94); }
.sub-header .ttl { font-size: 17px; font-weight: 800; flex: 1; }
.sub-header .step { font-size: 11px; color: var(--ink-3); font-weight: 700; padding: 4px 10px; background: var(--bg); border-radius: 999px; }

.section-title { padding: 20px 18px 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.section-title .small-link { color: var(--brand); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Bottom nav */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--surface); border-top: 1px solid var(--line); display: flex; height: 80px; padding-bottom: env(safe-area-inset-bottom); padding-top: 6px; z-index: 50; }
.bottom-nav button, .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-weight: 600; padding: 8px 4px; text-decoration: none; transition: background 100ms ease; }
.bottom-nav button.active, .bottom-nav a.active { color: var(--brand); }
.bottom-nav button:active, .bottom-nav a:active { background: var(--bg); }
.bottom-nav button.promo, .bottom-nav a.promo { position: relative; }
.bottom-nav button.promo .promo-badge, .bottom-nav a.promo .promo-badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--brand); color: #fff; font-size: 10px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 800; }
/* Badge "risposta non letta" su icona Account (stesso pattern del badge Promo). */
.bottom-nav a.account { position: relative; }
.bottom-nav a.account .nav-badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--brand); color: #fff; font-size: 10px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 800; }

