/* A single switch follows the visitor across every department. */
.theme-switch{
  position:fixed;z-index:85;left:20px;bottom:22px;
  display:inline-flex;align-items:center;gap:9px;min-height:44px;
  padding:8px 14px;border:1px solid #d4b875;border-radius:999px;
  background:#173c2d;color:#fff6e5;box-shadow:0 12px 30px #0c241d38;
  font:700 .74rem/1 Arial,sans-serif;letter-spacing:.02em;cursor:pointer;
  transition:transform .25s,background .25s,box-shadow .25s;
}
.theme-switch:hover{transform:translateY(-3px);box-shadow:0 16px 34px #0c241d50}
.theme-switch:focus-visible{outline:3px solid #e7c783;outline-offset:3px}
.theme-switch-icon{font:normal 1.25rem/1 Georgia,serif;color:#f3d49c}
html[data-theme="dark"] .theme-switch{background:#f1d197;color:#172a22;border-color:#f1d197}
html[data-theme="dark"] .theme-switch-icon{color:#7a2734}

/* Teams retains the shared evergreen, wine and gold palette in both modes. */
body[data-page="equipes"]{--team-ink:#203b2e;--team-deep:#10291e;--team-gold:#e8c588}
body[data-page="equipes"] .team-topbar{background:#10291ef5}
body[data-page="equipes"] .team-hero{background:radial-gradient(circle at 76% 38%,#315c43 0,#1a4431 43%,#10291e 95%)}
body[data-page="equipes"] .team-art-person{background:#28543e;color:#ffe5b4}
body[data-page="equipes"] .team-art-center{color:#173b2a}
body[data-page="equipes"] .team-hero h1 i{color:#f0cd92}
body[data-page="equipes"] .team-heading h2 i{color:#a64849}
body[data-page="equipes"] .team-section-kicker{color:#a7524a}
body[data-page="equipes"] .team-access-section{background:#183b2c}
body[data-page="equipes"] .team-day-picker button.active{background:#1b4b35;border-color:#1b4b35}
body[data-page="equipes"] .team-footer{background:#10291e}
body[data-page="equipes"] .people-disclosure summary>span:first-child{color:#1b4330}
body[data-page="equipes"] .load-fill{background:linear-gradient(90deg,#417b56,#d2ad75)}
body[data-page="equipes"] .load-row.is-heavy .load-fill{background:#a64849}
body[data-page="equipes"] .team-slot-head strong{color:#254d35}

html[data-theme="dark"]{
  color-scheme:dark;
  --cream:#102019;--paper:#1b3025;--ink:#f3efdf;--muted:#b6c7b6;
  --line:#385445;--green:#244d37;--green-deep:#10271c;
  --green-soft:#233c2d;--forest:#173b29;--deep:#0b1b15;
  --wine:#8d3544;--wine-deep:#30151e;--red:#e2a08d;--gold:#e8c78d;
}
html[data-theme="dark"] body{background:#102019;color:#f3efdf}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{
  color:#f3efdf;background:#203b2b;border-color:#5c725d;
}
html[data-theme="dark"] input::placeholder{color:#aec0ad}
html[data-theme="dark"] :focus-visible{outline-color:#e8c78d}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .site-header{background:#0b1b15f5}
html[data-theme="dark"] body[data-page="dinamicas"] .topbar{background:#27161cf5}

/* Central and departments still awaiting their content. */
html[data-theme="dark"] .departments-section,
html[data-theme="dark"] .upcoming-section{background:#102019}
html[data-theme="dark"] .upcoming-card{background:#20372a;border-color:#466149}
html[data-theme="dark"] .upcoming-card h3,
html[data-theme="dark"] .upcoming-card p,
html[data-theme="dark"] .upcoming-card small{color:#f0ead7}
html[data-theme="dark"] .closing{background:#203629}
html[data-theme="dark"] .closing p:not(.eyebrow),
html[data-theme="dark"] .closing a{color:#d1ddcc}
html[data-theme="dark"] .placeholder-main{background:radial-gradient(circle at 86% 21%,#264632,transparent 39%),#102019}
html[data-theme="dark"] .placeholder-status{background:#55422c;color:#f1d19b}
html[data-theme="dark"] .placeholder-lead,
html[data-theme="dark"] .placeholder-panel p,
html[data-theme="dark"] .placeholder-note{color:#c7d3c4}
html[data-theme="dark"] .placeholder-art{border-color:#537055}
html[data-theme="dark"] .placeholder-art:before{border-color:#3c5b44}
html[data-theme="dark"] .placeholder-circle{background:#1d3728}
html[data-theme="dark"] .placeholder-circle strong{color:#f4e8d0}

/* Alimentação: editable menu and shopping dashboard. */
html[data-theme="dark"] body[data-page="alimentacao"] .intro-band{background:#20382a;border-color:#425945}
html[data-theme="dark"] .intro-grid p{border-color:#425945}
html[data-theme="dark"] .intro-grid strong,
html[data-theme="dark"] .intro-grid p>span:last-child{color:#e7e9d7}
html[data-theme="dark"] .section-menu{background:#14261c;border-color:#344b39}
html[data-theme="dark"] .section-notes{background:#1c3325}
html[data-theme="dark"] .journey-card,
html[data-theme="dark"] .meal-card,
html[data-theme="dark"] .meal-card.special,
html[data-theme="dark"] .meal-card.pending{background:#20382a;border-color:#456047}
html[data-theme="dark"] .meal-card.special{background:#284431}
html[data-theme="dark"] .meal-card h4,
html[data-theme="dark"] .meal-card.pending h4,
html[data-theme="dark"] .note-list h3{color:#f3e8ce}
html[data-theme="dark"] .meal-meta,
html[data-theme="dark"] .ingredient-list li,
html[data-theme="dark"] .ingredient-values .quantity,
html[data-theme="dark"] .ingredient-values .unit-price,
html[data-theme="dark"] .note-list p,
html[data-theme="dark"] .day-panel-heading p{color:#c5d2c2}
html[data-theme="dark"] .meal-cost,
html[data-theme="dark"] .ingredient-values .line-price{color:#f1d49c}
.meal-card.linked-meal{border-color:#9e5348;box-shadow:0 0 0 2px #9e534838;scroll-margin-top:100px}
html[data-theme="dark"] .meal-disclosure summary,
html[data-theme="dark"] .day-tab[aria-selected="true"]{color:#e8c78d}
html[data-theme="dark"] .day-tab,
html[data-theme="dark"] .meal-edit-button{color:#d6e4d2}
html[data-theme="dark"] .meal-edit-button{background:#2b5136;border-color:#658069}
html[data-theme="dark"] .shopping-content{background:#20382a;color:#f3efdf}
html[data-theme="dark"] .shopping-row{border-color:#456047}
html[data-theme="dark"] .shopping-row:hover{background:#2c4b36}
html[data-theme="dark"] .shopping-row small,
html[data-theme="dark"] .shopping-footnote{color:#c1cfbf}
html[data-theme="dark"] .shopping-row>span{color:#e8c78d}
html[data-theme="dark"] .shopping-row>span.pending-price{color:#f0b39c}
html[data-theme="dark"] .filter:not(.active){color:#d5dfd0;border-color:#6c8068}
html[data-theme="dark"] .audit-section{background:#172c20;color:#f3efdf;border-color:#39523e}
html[data-theme="dark"] .audit-live,
html[data-theme="dark"] .audit-gate,
html[data-theme="dark"] .audit-editor,
html[data-theme="dark"] .meal-inline-editor,
html[data-theme="dark"] .meal-inline-login{background:#20382a;color:#f3efdf;border-color:#4a624b}
html[data-theme="dark"] .audit-heading p:not(.eyebrow),
html[data-theme="dark"] .audit-gate p,
html[data-theme="dark"] .audit-live small,
html[data-theme="dark"] .audit-hint,
html[data-theme="dark"] .audit-title-field,
html[data-theme="dark"] .meal-inline-login label{color:#c8d4c4}
html[data-theme="dark"] .audit-tabs button:not(.active),
html[data-theme="dark"] .audit-actions button,
html[data-theme="dark"] .audit-item input:not([type=checkbox]),
html[data-theme="dark"] .audit-item select,
html[data-theme="dark"] .audit-meal-move,
html[data-theme="dark"] .audit-add input{background:#25422f;color:#f3efdf;border-color:#5b745c}
html[data-theme="dark"] .audit-item-header,
html[data-theme="dark"] .audit-line-total{color:#e8c78d}
html[data-theme="dark"] .audit-meal,
html[data-theme="dark"] .audit-item,
html[data-theme="dark"] .audit-toolbar{border-color:#405b45}
html[data-theme="dark"] .meal-inline-editor .audit-items-wrap{background:#20382a}

/* Dinâmicas: proposals remain legible in the planning board. */
html[data-theme="dark"] body[data-page="dinamicas"]{background:#161e18}
html[data-theme="dark"] body[data-page="dinamicas"] .info-strip{background:#3a3023}
html[data-theme="dark"] .info-inner span{color:#e8ddcb}
html[data-theme="dark"] .proof-card,
html[data-theme="dark"] .board-group,
html[data-theme="dark"] .day-group,
html[data-theme="dark"] .excluded-group{background:#243127;border-color:#50634d}
html[data-theme="dark"] .proof-card h3,
html[data-theme="dark"] .board-group h3,
html[data-theme="dark"] .assignment-card h4,
html[data-theme="dark"] .material-row h3,
html[data-theme="dark"] .decision-list h3{color:#f3e9d6}
html[data-theme="dark"] .proof-card p,
html[data-theme="dark"] .proof-detail-content p,
html[data-theme="dark"] .assignment-card>p,
html[data-theme="dark"] .assignment-card details p,
html[data-theme="dark"] .material-row p,
html[data-theme="dark"] .decision-list p,
html[data-theme="dark"] .planning-toolbar p,
html[data-theme="dark"] .planning-note{color:#c9d3c4}
html[data-theme="dark"] .proof-details summary,
html[data-theme="dark"] .assignment-card summary{color:#e8c78d}
html[data-theme="dark"] .day-group header,
html[data-theme="dark"] .excluded-group header{background:#334332}
html[data-theme="dark"] .materials-list{background:#243127;color:#f3efdf}
html[data-theme="dark"] .decisions{background:#1d2b20}
html[data-theme="dark"] body[data-page="dinamicas"] .planning-toolbar{background:#17251ceF;border-color:#53654f}
html[data-theme="dark"] body[data-page="dinamicas"] .assignment-card:hover{background:#304234}
html[data-theme="dark"] .backup-actions button,
html[data-theme="dark"] .import-label,
html[data-theme="dark"] .assignment-actions button:not(.choice-day){background:#354334;color:#f3e9d6;border-color:#697565}
html[data-theme="dark"] .filter.active{background:#9a3544;color:#fff}

/* Equipes e Apoio: data cards, compact editor, roster and schedule. */
html[data-theme="dark"] body[data-page="equipes"]{--team-ink:#f3efdf;--team-paper:#20382a;--team-line:#48634b;background:#102019}
html[data-theme="dark"] .team-overview{background:#102019}
html[data-theme="dark"] .team-people-section{background:#182e22}
html[data-theme="dark"] .team-schedule-section{background:#102019}
html[data-theme="dark"] .team-stat,
html[data-theme="dark"] .team-insight-card,
html[data-theme="dark"] .people-disclosure,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .shift-card,
html[data-theme="dark"] .team-slot,
html[data-theme="dark"] .add-person{background:#20382a;color:#f3efdf;border-color:#4a624c}
html[data-theme="dark"] .team-slot{background:#274330}
html[data-theme="dark"] .team-heading>p,
html[data-theme="dark"] .team-stat small,
html[data-theme="dark"] .insight-head p,
html[data-theme="dark"] .attention-item small,
html[data-theme="dark"] .person-main small,
html[data-theme="dark"] .shift-head small,
html[data-theme="dark"] .team-task,
html[data-theme="dark"] .team-day-summary{color:#c5d3c3}
html[data-theme="dark"] .team-stat span,
html[data-theme="dark"] .insight-head>span,
html[data-theme="dark"] .shift-head span,
html[data-theme="dark"] .team-section-kicker{color:#e8c78d}
html[data-theme="dark"] body[data-page="equipes"] .team-heading h2 i{color:#eda993}
html[data-theme="dark"] .team-slot-head strong,
html[data-theme="dark"] .people-disclosure summary>span:first-child{color:#f3ead7}
html[data-theme="dark"] .team-meal-sync{color:#b7d9b9}
html[data-theme="dark"] .team-meal-sync.is-offline{color:#eab8a3}
html[data-theme="dark"] .shift-meal{background:#304b36;border-left-color:#e3a28f}
html[data-theme="dark"] .shift-meal.is-pending{border-left-color:#e8c78d}
html[data-theme="dark"] .shift-meal-kicker,
html[data-theme="dark"] .shift-meal-link{color:#e8c78d}
html[data-theme="dark"] .shift-meal-name{color:#f6ecd5}
html[data-theme="dark"] .shift-meal-detail{color:#c7d5c3}
html[data-theme="dark"] .meal-card.linked-meal{border-color:#e8c78d;box-shadow:0 0 0 2px #e8c78d75}
html[data-theme="dark"] .team-empty-note,
html[data-theme="dark"] .team-edit-state{background:#2b4834;color:#f3ead7;border-color:#607559}
html[data-theme="dark"] .team-edit-state span{color:#d5dfd0}
html[data-theme="dark"] .team-edit-state button,
html[data-theme="dark"] .team-day-picker button:not(.active),
html[data-theme="dark"] .person-edit button{background:#2c4935;color:#f3ead7;border-color:#69826b}
html[data-theme="dark"] .people-disclosure summary strong,
html[data-theme="dark"] .person-count,
html[data-theme="dark"] .member-chip{background:#37533b;color:#f2e1b9}
html[data-theme="dark"] .load-track{background:#385640}
html[data-theme="dark"] .load-count{color:#e8c78d}
html[data-theme="dark"] .people-disclosure[open] summary,
html[data-theme="dark"] .attention-item{border-color:#4a624c}

@media(max-width:760px){
  .theme-switch{left:auto;right:12px;top:13px;bottom:auto;width:44px;height:44px;padding:0;justify-content:center;box-shadow:none}
  .theme-switch-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .theme-switch-icon{font-size:1.35rem}
  .team-section{padding-block:48px}
  .team-login button,.team-day-picker button,.team-assign button,
  .add-person button,.people-disclosure summary,.assignment-actions button,
  .filter,.day-tab{min-height:44px}
}
@media(max-width:390px){
  .team-heading h2{font-size:clamp(2.3rem,11vw,2.8rem)}
  .team-stat{padding:12px}
  .team-assign{flex-wrap:wrap}
  .team-assign select{flex-basis:100%;min-height:44px}
  .team-assign button{width:100%}
  .meal-card{padding:20px}
  .ingredient-list li{grid-template-columns:minmax(0,1fr) auto}
  .ingredient-values{min-width:0}
  .planning-toolbar{flex-wrap:wrap}
  .backup-actions{flex-wrap:wrap}
}
@media(max-width:360px){
  body[data-page="alimentacao"] .header-inner{gap:9px}
  body[data-page="alimentacao"] .brand{font-size:1rem}
  body[data-page="dinamicas"] .topbar-inner{gap:12px}
  body[data-page="dinamicas"] .logo{font-size:1rem}
}
@media(prefers-reduced-motion:reduce){.theme-switch{transition:none}}
@media print{.theme-switch{display:none!important}}
