/* QA32 — "V3 vivace ma sobria" (approved prototype, 18/11/2026).
   Rules: white surfaces; colour only in round icon badges; one strong colour (coral) for the
   main action; a tactile bottom edge ONLY on things that can be tapped; petrol header and
   petrol bottom bar on every screen. Loaded last: it refines QA30.1 without touching logic. */
/* The app uses cascade layers; !important rules in the first layer (dbVisibility) win, so the
   V3 refinements live there to outrank the QA20/QA30 design layers. */
@layer dbVisibility{
:root{--v3-petrol:#01474F;--v3-petrol-2:#0E5C64;--v3-mint:#7FD9BE;--v3-mint-soft:#E4EDEA;--v3-green:#12A37F;
 --v3-coral:#FF6B4A;--v3-coral-edge:#C9472A;--v3-edge:#D3DFDA;--v3-line:#E1E8E5;--v3-canvas:#EEF3F1;
 --v3-yellow:#F2B544;--v3-sky:#4A9BD8;--v3-violet:#7A68D8;--v3-salmon:#F0785A}

html.qa17-theme body.qa17-ui.qa17-ui{background:var(--v3-canvas)!important}

/* ---------- Bottom bar: petrol, light icons, mint pill on the active tab ---------- */
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav{background:var(--v3-petrol)!important;color:#BFE3DA!important;border-top:0!important;border-radius:22px 22px 0 0!important;box-shadow:0 -6px 20px rgba(11,74,82,.18)!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav button{color:#BFE3DA!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav button[aria-current=page]{color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav button[aria-current=page]>.qa17-icon{background:var(--v3-mint)!important;color:var(--v3-petrol)!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav [data-qa17-tab=scan]{color:#FFD2C6!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav [data-qa17-tab=scan]>.qa17-icon{background:var(--v3-coral)!important;color:#fff!important;border:4px solid var(--v3-canvas)!important;box-shadow:0 5px 0 var(--v3-coral-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa17BottomNav [data-qa17-tab=scan]:active>.qa17-icon{transform:translateY(3px)!important;box-shadow:0 2px 0 var(--v3-coral-edge)!important}

/* ---------- Header: same petrol everywhere ---------- */
html.qa17-theme body.qa17-ui.qa17-ui:not([data-qa30-view=secondary]) header.top{background:var(--v3-petrol)!important}

/* ---------- Round icon badges: the only place with colour ---------- */
html.qa17-theme body.qa17-ui.qa17-ui :is(.qa30-badge,:is(#homeDashboard,#dailyCheckHub) .home-symbol){border-radius:50%!important;background:var(--v3-green)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui :is([data-area=training].qa30-badge,[data-qa21-area=training] .home-symbol){background:var(--v3-salmon)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui :is([data-area=check].qa30-badge,[data-qa21-area=check] .home-symbol){background:var(--v3-yellow)!important;color:#3D2A00!important}
html.qa17-theme body.qa17-ui.qa17-ui :is([data-area=archive].qa30-badge,[data-qa21-area=archive] .home-symbol){background:var(--v3-sky)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui :is([data-area=report].qa30-badge,[data-qa21-area=report] .home-symbol){background:var(--v3-violet)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard :is(.home-choice:not(.qa30-contact-strip)) .home-symbol{width:48px!important;height:48px!important;min-width:48px!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub [data-qa30-check=hydration] .home-symbol{background:var(--v3-sky)!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub [data-qa30-check=steps] .home-symbol{background:var(--v3-yellow)!important;color:#3D2A00!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub [data-qa30-check=energy] .home-symbol{background:var(--v3-salmon)!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub [data-qa30-check=sleep] .home-symbol{background:var(--v3-violet)!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub [data-qa30-check=bowel] .home-symbol{background:var(--v3-sky)!important}

/* ---------- Tactile edge only on tappable cards ---------- */
html.qa17-theme body.qa17-ui.qa17-ui :is(#homeDashboard,#dailyCheckHub) .home-choice:not(.qa30-contact-strip),
html.qa17-theme body.qa17-ui.qa17-ui .qa30-list,
html.qa17-theme body.qa17-ui.qa17-ui #meals>.card,
html.qa17-theme body.qa17-ui.qa17-ui #meals .qa30-meal-empty .db-meal-row{background:#fff!important;border:1px solid var(--v3-line)!important;box-shadow:0 4px 0 var(--v3-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui :is(#homeDashboard,#dailyCheckHub) .home-choice:not(.qa30-contact-strip){border-radius:22px!important;transition:transform .08s ease,box-shadow .08s ease!important}
html.qa17-theme body.qa17-ui.qa17-ui :is(#homeDashboard,#dailyCheckHub) .home-choice:not(.qa30-contact-strip):active{transform:translateY(3px)!important;box-shadow:0 1px 0 var(--v3-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard .qa30-contact-strip{background:var(--v3-petrol)!important;box-shadow:0 4px 0 #003238!important;border-radius:22px!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard .qa30-contact-strip:active{transform:translateY(3px)!important;box-shadow:0 1px 0 #003238!important}

/* Main actions: coral with a darker edge; they visibly "press". */
html.qa17-theme body.qa17-ui.qa17-ui :is(#meals .db-meal-add,#meals .qa30-meal-empty .db-meal-add,#qa28Add,.qa30-primary){background:var(--v3-coral)!important;color:#2A1209!important;box-shadow:0 4px 0 var(--v3-coral-edge)!important;transition:transform .08s ease,box-shadow .08s ease!important}
html.qa17-theme body.qa17-ui.qa17-ui :is(#meals .db-meal-add,#meals .qa30-meal-empty .db-meal-add,#qa28Add,.qa30-primary):active{transform:translateY(3px)!important;box-shadow:0 1px 0 var(--v3-coral-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui #meals .db-meal-add{border-radius:0 0 22px 22px!important}
html.qa17-theme body.qa17-ui.qa17-ui #meals .qa30-meal-empty .db-meal-add{border-radius:14px!important}

/* ---------- Check: one rule for "done" (mint + green border), no rainbow ---------- */
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub .home-choice.qa30-recorded{background:var(--v3-mint-soft)!important;border:2px solid var(--v3-green)!important;box-shadow:0 4px 0 #9FD9C4!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub .qa30-recorded .home-go{background:var(--v3-green)!important;color:#fff!important;border-radius:50%!important;width:28px!important;height:28px!important;display:flex!important;align-items:center!important;justify-content:center!important}
html.qa17-theme body.qa17-ui.qa17-ui #dailyCheckHub .qa30-recorded .home-desc{color:#0B7A60!important;font-weight:800!important}

/* ---------- Type: strong weight only for titles and key numbers ---------- */
html.qa17-theme body.qa17-ui.qa17-ui :is(.home-desc,.qa30-list-button small,#meals .entry small){font-weight:500!important}
html.qa17-theme body.qa17-ui.qa17-ui :is(#homeDashboard,#dailyCheckHub) .home-choice strong{font-size:1rem!important}

/* ---------- Info cards (not tappable) stay flat ---------- */
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard :is(.qa21-today,.qa24-today-upper){box-shadow:0 10px 26px rgba(11,74,82,.10)!important}

/* Area colours on Home tiles (the #homeDashboard rule above has higher specificity, so repeat it here). */
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard [data-qa21-area=training] .home-symbol{background:var(--v3-salmon)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard [data-qa21-area=check] .home-symbol{background:var(--v3-yellow)!important;color:#3D2A00!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard [data-qa21-area=report] .home-symbol{background:var(--v3-violet)!important;color:#fff!important}
html.qa17-theme body.qa17-ui.qa17-ui #homeDashboard .qa30-contact-strip .home-symbol{background:transparent!important;color:#fff!important;width:22px!important;height:22px!important;min-width:22px!important}

/* QA33 weekday goals */
html.qa17-theme body.qa17-ui.qa17-ui .qa33-section{margin:20px 0 8px!important;padding-top:16px!important;border-top:1px solid var(--v3-line)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-section h3{font-size:1.05rem!important;margin:0 0 4px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-list{list-style:none!important;margin:10px 0!important;padding:0!important;display:flex!important;flex-direction:column!important;gap:8px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-goal>button{width:100%!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;text-align:left!important;border:1px solid var(--v3-line)!important;border-radius:18px!important;background:#fff!important;color:#10292B!important;box-shadow:0 3px 0 var(--v3-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-goal small{display:block!important;font-size:.8rem!important;font-weight:500!important;color:#4E6668!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-kcal{text-align:right!important;font-weight:800!important;color:var(--v3-petrol)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-add{width:100%!important;border:2px dashed var(--v3-green)!important;background:var(--v3-mint-soft)!important;color:#0B5E4C!important;border-radius:16px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:6px!important;margin:6px 0 14px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-days button{min-width:0!important;min-height:48px!important;padding:0!important;border-radius:14px!important;font-weight:800!important;background:#fff!important;color:#10292B!important;border:1px solid var(--v3-edge)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-days button.qa33-on{background:var(--v3-petrol)!important;color:#fff!important;border-color:var(--v3-petrol)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-label{font-weight:700!important;margin:14px 0 0!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-total{font-size:1rem!important;margin:12px 0!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-note{color:#8A5A00!important;font-size:.85rem!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-delete{color:#B4321F!important}

/* QA33: goal of the day chips in the Diario summary */
html.qa17-theme body.qa17-ui.qa17-ui .qa33-day-goal{display:flex!important;flex-direction:column!important;gap:8px!important;margin-top:12px!important;padding-top:12px!important;border-top:1px solid #EEF2F0!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-day-label{font-size:.8rem!important;font-weight:800!important;letter-spacing:.04em!important;text-transform:uppercase!important;color:#4E6668!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips button{min-height:44px!important;padding:0 18px!important;border-radius:22px!important;border:1px solid var(--v3-edge)!important;background:#fff!important;color:#10292B!important;font-weight:700!important;box-shadow:0 3px 0 var(--v3-edge)!important;width:auto!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips button.qa33-active{background:var(--v3-petrol)!important;color:#fff!important;border-color:var(--v3-petrol)!important;box-shadow:0 3px 0 #003238!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips button.qa33-new{border:2px dashed var(--v3-coral)!important;color:#C2412A!important;box-shadow:none!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips button:active{transform:translateY(2px)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-chips button[disabled]{opacity:.55!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa33-hint{font-size:.85rem!important;color:#4E6668!important;margin:2px 0 6px!important}

/* QA34: plans with dates, optional goals, water/steps progress */
html.qa17-theme body.qa17-ui.qa17-ui .qa34-banner{background:var(--v3-mint-soft)!important;border:1px solid #BFE6D8!important;border-radius:16px!important;padding:10px 12px!important;margin:0 0 12px!important;color:#01474F!important;font-size:.92rem!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-dates{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-state{display:block!important;font-style:normal!important;font-size:.72rem!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.04em!important;margin-bottom:2px!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-now{color:#0B7A60!important}html.qa17-theme body.qa17-ui.qa17-ui .qa34-next{color:#1F5679!important}html.qa17-theme body.qa17-ui.qa17-ui .qa34-past{color:#8A9A97!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-optional{margin:12px 0!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-goal{display:block!important;width:100%!important;margin-top:6px!important;text-align:left!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-goal-text{display:block!important;font-size:.78rem!important;font-weight:600!important;color:#4E6668!important;line-height:1.3!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-bar{display:block!important;height:6px!important;border-radius:3px!important;background:#E6EEEB!important;margin-top:4px!important;overflow:hidden!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-bar>span{display:block!important;height:100%!important;border-radius:3px!important;background:var(--v3-sky)!important}
html.qa17-theme body.qa17-ui.qa17-ui #qa22TodaySteps .qa34-bar>span,html.qa17-theme body.qa17-ui.qa17-ui [data-qa30-check=steps] .qa34-bar>span{background:var(--v3-yellow)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-done .qa34-bar>span{background:var(--v3-green)!important}
html.qa17-theme body.qa17-ui.qa17-ui .qa34-done .qa34-goal-text{color:#0B7A60!important}
}
