/* Shared appearance for the app and account screens. Print keeps the light palette. */
.theme-picker{margin:0 0 22px;padding:0 0 22px;border-bottom:1px solid var(--line)}
.theme-picker label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}
.theme-picker select{display:block;width:100%;min-height:48px;border:1px solid #a5afc1;border-radius:11px;background:#fff;color:var(--ink);padding:10px 14px;font:inherit;cursor:pointer}
.theme-picker p{font-size:12px;line-height:1.6;color:var(--muted);margin-top:8px}
.access-theme{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:28px 0 0;padding-top:18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.access-theme select{font:inherit;min-height:44px;padding:8px 30px 8px 12px;border:1px solid #a5afc1;border-radius:9px;background:transparent;color:var(--ink);max-width:100%;cursor:pointer}
:is(.theme-picker,.access-theme) select:focus-visible{outline:3px solid #C9821A;outline-offset:3px}
#mfa-qr{padding:12px;background:#fff;border-radius:12px;box-sizing:content-box;max-width:calc(100% - 24px)}

@media screen{
  html[data-theme=dark]{
    color-scheme:dark;
    --paper:#10151F;--ink:#EEF2FA;--muted:#B7C2D5;--blue:#A6B9FF;
    --surface:#1A2231;--raised:#253148;--input:#131C2B;--line:#35435C;--control-line:#607494;
    --pale:#243354;--light:#243354;--action:#4863D9;--action-hover:#3E56C2;
    --mint:#80DFC0;--mint-light:#173D33;--amber:#F2C67D;--amber-light:#3B301D;--red:#FFA79F;
    --danger-bg:#43272D;--danger-line:#925561;--shadow:0 20px 80px #0006;
    --azul:var(--blue);--azul-2:#BCCAFF;--azul-escuro:var(--blue);--azul-claro:var(--pale);--azul-linha:var(--control-line);
    --nanquim:var(--ink);--papel:var(--paper);--branco:var(--surface);--neblina:var(--raised);--grafite:var(--muted);--linha:var(--line);
    --menta:var(--mint);--menta-claro:var(--mint-light);--menta-texto:var(--mint);
    --ambar:var(--amber);--ambar-claro:var(--amber-light);--ambar-texto:var(--amber);
    --sinal:var(--red);--sinal-claro:var(--danger-bg);--sinal-texto:var(--red);
    --agua:#95CEFF;--agua-claro:#1C354D;--agua-texto:#95CEFF;--sombra:var(--shadow);
    background:var(--paper);color:var(--ink);
  }
  html[data-theme=dark] body,html.prod[data-theme=dark] body{background:var(--paper);color:var(--ink)}
  html[data-theme=dark] :is(.sidebar,.panel,.wellbeing.logged,dialog,.dialog-head,.dialog-footer,.legacy-close,.onboarding-wrap,.skip){background:var(--surface);color:var(--ink)}
  html[data-theme=dark] .bottom-nav{background:#1A2231F2}
  html[data-theme=dark] :is(.field input,.field select,.field textarea,.theme-picker select,.access-theme select,.access-form input:not([type=checkbox]),.legacy-ui .field input,.legacy-ui .field select,.legacy-ui .field textarea){background:var(--input);color:var(--ink);border-color:var(--control-line)}
  html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:var(--muted);opacity:1}
  html[data-theme=dark] :is(input,select,textarea){accent-color:var(--blue)}
  html[data-theme=dark] :is(.btn-primary,.primary-button,.legacy-ui .btn.primary,.legacy-ui .stepper .row button.big,.legacy-ui .site-btn.sel,.legacy-ui .aa[aria-pressed=true]){background:var(--action);color:#fff;box-shadow:none}
  html[data-theme=dark] :is(.btn-primary:hover,.primary-button:hover,.legacy-ui .btn.primary:hover){background:var(--action-hover)}
  html[data-theme=dark] .btn-outline{background:var(--surface);border-color:var(--control-line);color:var(--ink)}
  html[data-theme=dark] .btn-soft:hover{background:#30436B}
  html[data-theme=dark] :is(.step-chip.active::before,.legacy-ui .howto li::before){background:var(--action);color:#fff}
  html[data-theme=dark] :is(.period-control button[aria-pressed=true],.bmi-legend li.is-current){background:var(--raised);border-color:var(--control-line)}
  html[data-theme=dark] :is(.weekly-glimpse,.tabs,.account-row,.care-orbit,.care-orbit::before,#mfa-panel,#password-panel,#admin-panel){border-color:var(--line)}
  html[data-theme=dark] .week-dot:not(.recorded){background:var(--raised)}
  html[data-theme=dark] :is(.home-note,.timeline-row>.icon,.account-card>p,.account-row small,.import-description,.import-source){color:var(--muted)}
  html[data-theme=dark] :is(.site-options button,.import-file input){border-color:var(--control-line)}
  html[data-theme=dark] .dose-card{background:#263E96;color:#F6F8FF}
  html[data-theme=dark] .dose-card .btn-white{background:#F4F6FF;color:#203CA0}
  html[data-theme=dark] :is(.toast,.modal-toast,.cloud-status){background:var(--raised);color:var(--ink);box-shadow:0 8px 30px #0005}
  html[data-theme=dark] :is(.toast button,.modal-toast button){color:var(--blue)}
  html[data-theme=dark] :is(.modal-feedback:not(:empty),.cloud-status.cloud-error){background:var(--danger-bg);border-color:var(--danger-line);color:var(--red)}
  html[data-theme=dark] :is(.form-error,#security-message){color:var(--red)}
  html[data-theme=dark] .account-badge{background:var(--pale);color:var(--blue)}
  html[data-theme=dark] .account-danger{border-color:var(--danger-line)}
  html[data-theme=dark] .btn-danger{background:var(--danger-bg);color:var(--red);border-color:var(--danger-line)}
  html[data-theme=dark] .btn-danger:hover{background:#55323A}
  html[data-theme=dark] .import-notice{background:var(--amber-light);color:var(--amber)}
  html[data-theme=dark] .import-check input{accent-color:var(--blue)}
  html[data-theme=dark] .chart path{stroke:var(--blue)}
  html[data-theme=dark] .chart circle{fill:var(--blue);stroke:var(--surface)}
  html[data-theme=dark] .chart line{stroke:var(--line)}
  html[data-theme=dark] .bmi-category{background:#253654;color:#B6CCF5}
  html[data-theme=dark] .bmi-category-1{background:#173D33;color:#80DFC0}
  html[data-theme=dark] .bmi-category-2{background:#3B301D;color:#F2C67D}
  html[data-theme=dark] .bmi-category-3{background:#443020;color:#FFC197}
  html[data-theme=dark] .bmi-category-4{background:#432A36;color:#F6B4CB}
  html[data-theme=dark] .bmi-category-5{background:#352D49;color:#D7C0F3}
  /* Keep original illustrations and authenticator QR codes readable. */
  html[data-theme=dark] .body-map{background:#F5F6F2;border-radius:18px}
  html[data-theme=dark] .body-point::after{background:#fff;border-color:#203CA0}
  html[data-theme=dark] .body-point[aria-pressed=true]::after{background:#203CA0}
  html[data-theme=dark] .body-point[data-last=true]::after{border-color:#8A5410}
  html[data-theme=dark] :is(.legacy-ui .rep,.legacy-ui .current-dose-choice,.legacy-ui .choice .radio,.legacy-ui .choice.sel .ico,.legacy-ui .consent .box){background:var(--surface)}
  html[data-theme=dark] :is(.legacy-ui .choice.sel .radio,.legacy-ui .consent.sel .box){background:var(--action)}
  html[data-theme=dark] :is(.legacy-ui .info,.legacy-ui .tool.wide,.legacy-ui .doc-card){background:var(--raised);color:var(--ink)}
  html[data-theme=dark] :is(.legacy-ui .btn.green,.legacy-ui .tag,.legacy-ui .doc-card .btn){background:#24634D;color:#fff}
  html[data-theme=dark] :is(.legacy-ui .step-label,.legacy-ui .current-dose-choice small,.legacy-ui .injection-hint){color:var(--muted)}
  html[data-theme=dark] .legacy-ui .screen>.bottom{background:linear-gradient(180deg,#1A223100,var(--surface) 17px)}
  html[data-theme=dark] .legacy-ui .screen{scrollbar-color:var(--control-line) transparent}
  html[data-theme=dark] .legacy-ui .alert{box-shadow:inset 0 0 0 1px var(--danger-line)}
  html[data-theme=dark] .legacy-ui .current-dose-choice button{border-color:var(--control-line)}
  html[data-theme=dark] dialog::backdrop{background:#0009}
}
@media print{.theme-picker,.access-theme{display:none!important}}
