/* NATUREBA 1.0.2 — compactação, contraste e temas. */
:root { --muted:#50665A; --bg:#EEF1ED; --borderSoft:#E1E8E1; --table:#FFFFFF; --tableHead:#F4F7F3; --sectorBg:#E9F1EB; --cardGreen:#EFF8F0; --cardRed:#FFF0EE; --fieldBg:#FFFFFF; --btnBg:#FFFFFF; --side:#0E3425; --selectedBg:#E9F8EE; }
html[data-effective-theme="dark"]{color-scheme:dark;--ink:#ECF4EE;--muted:#AFC4B7;--forest:#318B62;--forest2:#E5F4E9;--leaf:#294236;--bg:#090D0B;--white:#151D18;--line:#2A3A2F;--red:#FF827C;--redbg:#291412;--amber:#F9C078;--amberbg:#2D2418;--green:#5CDA94;--greenbg:#173424;--shadow:0 5px 18px rgba(0,0,0,.18);--borderSoft:#2C3A30;--table:#131B16;--tableHead:#1B281F;--sectorBg:#23372A;--cardGreen:#092319;--cardRed:#250D0B;--fieldBg:#1D2922;--btnBg:#1D2A21;--side:#080F0B;--selectedBg:#123623; }
html[data-effective-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-effective-theme="dark"] .sidebar{background:#080F0B;color:#E3F1E7}
html[data-effective-theme="dark"] .topbar{background:#111B15;border-color:var(--line)}
html[data-effective-theme="dark"] .nav button.active,html[data-effective-theme="dark"] .nav button:hover{background:#204A32}
html[data-effective-theme="dark"] .brand-link:hover{background:#204A32}
html[data-effective-theme="dark"] .modal,html[data-effective-theme="dark"] .auth{background:var(--white);color:var(--ink)}
html[data-effective-theme="dark"] .modal-overlay{background:#000B}
html[data-effective-theme="dark"] .panel,html[data-effective-theme="dark"] .stat{background:var(--white)}
html[data-effective-theme="dark"] .roster-head,html[data-effective-theme="dark"] .roster-head>div:first-child,html[data-effective-theme="dark"] th{background:var(--tableHead);color:var(--muted)}
html[data-effective-theme="dark"] .sector-toggle{background:var(--sectorBg);color:var(--ink)}
html[data-effective-theme="dark"] .sector-toggle small{color:var(--muted)}
html[data-effective-theme="dark"] .roster-row{border-color:var(--borderSoft)}
html[data-effective-theme="dark"] .roster-row>.person-ident{background:var(--table)}
html[data-effective-theme="dark"] .table-scroll table{background:var(--table)}
html[data-effective-theme="dark"] td,html[data-effective-theme="dark"] th{border-color:var(--line)}
html[data-effective-theme="dark"] .audit-item.good,html[data-effective-theme="dark"] .daycard.good{background:#0B2718;border-color:#144B2C}
html[data-effective-theme="dark"] .audit-item.bad,html[data-effective-theme="dark"] .daycard.bad{background:#230C0C;border-color:#4B201C}
html[data-effective-theme="dark"] .audit-item.closed{background:#1B231E}
html[data-effective-theme="dark"] .audit-item>button{color:var(--ink)}
html[data-effective-theme="dark"] .daycard .status.bad,html[data-effective-theme="dark"] .audit-item .status.bad{background:#3D1515;color:#FFA69D}
html[data-effective-theme="dark"] .daycard .status.on,html[data-effective-theme="dark"] .audit-item .status.on{background:#0D3821;color:#5EEDA0}
html[data-effective-theme="dark"] .status.warn{background:#493018;color:#FFD593}
html[data-effective-theme="dark"] .status.on{background:#153D26;color:#66ECA1}
html[data-effective-theme="dark"] .status.off{background:#303A33;color:#BBCDC2}
html[data-effective-theme="dark"] .status.bad{background:#4A1F1C;color:#FFA49B}
html[data-effective-theme="dark"] .badge{background:#243D2C;color:#D8F2DE}
html[data-effective-theme="dark"] .btn,html[data-effective-theme="dark"] .week-nav button,html[data-effective-theme="dark"] .save-controls select{background:var(--btnBg);color:var(--ink);border-color:var(--line)}
html[data-effective-theme="dark"] .btn.primary{background:#22754B;border-color:#22754B;color:#FFFFFF}
html[data-effective-theme="dark"] .field input,html[data-effective-theme="dark"] .field select,html[data-effective-theme="dark"] .field textarea,html[data-effective-theme="dark"] .mini-period input,html[data-effective-theme="dark"] .theme-chooser select{background:var(--fieldBg);color:var(--ink);border-color:var(--line)}
html[data-effective-theme="dark"] .checklist label{background:var(--fieldBg);border-color:var(--line);color:var(--ink)}
html[data-effective-theme="dark"] .field label{color:var(--muted)}
html[data-effective-theme="dark"] .alert.info{background:#142A1B;border-color:#234B33;color:#CFEDD7}
html[data-effective-theme="dark"] .alert.error{background:#341616;border-color:#6F3129;color:#FFB1A9}
html[data-effective-theme="dark"] .name-link{color:#B1E7C0}
html[data-effective-theme="dark"] .ft.status-t,html[data-effective-theme="dark"] .dot.t,html[data-effective-theme="dark"] .status-tag.status-t{background:#14663F;border-color:#207D4C;color:#FFFFFF}
html[data-effective-theme="dark"] .ft.status-f,html[data-effective-theme="dark"] .dot.f,html[data-effective-theme="dark"] .status-tag.status-f{background:#9A5A15;border-color:#AC7025;color:#FFFFFF}
html[data-effective-theme="dark"] .ft.status-fe,html[data-effective-theme="dark"] .dot.fe,html[data-effective-theme="dark"] .status-tag.status-fe{background:#245EB5;border-color:#3A79D1;color:#FFFFFF}
html[data-effective-theme="dark"] .ft.status-at,html[data-effective-theme="dark"] .dot.at,html[data-effective-theme="dark"] .status-tag.status-at{background:#7C3BA4;border-color:#9154B7;color:#FFFFFF}
html[data-effective-theme="dark"] .ft.status-c,html[data-effective-theme="dark"] .dot.c{background:#4A544B;color:#F2F7F2}
html[data-effective-theme="dark"] .ft.conflict{box-shadow:0 0 0 2px #FF5D5D;background:#A42C30;border-color:#FF7474;color:#FFF}
html[data-effective-theme="dark"] .choice-selected{outline-color:#E7F5EA}
html[data-effective-theme="dark"] .mini-status .ft{color:white}
html[data-effective-theme="dark"] .mini-close{color:var(--muted)}
html[data-effective-theme="dark"] .person-absence,html[data-effective-theme="dark"] .stat-detail{border-color:var(--line)}
html[data-effective-theme="dark"] .roster-scroll:before{background:var(--tableHead)}
html[data-effective-theme="dark"] .roster-head button:hover{background:#32533C;color:#fff}
html[data-effective-theme="dark"] .rest-count.status.on{color:#8EF4B7}
html[data-effective-theme="dark"] .week-nav button:hover,html[data-effective-theme="dark"] .btn:hover{filter:brightness(1.13)}
html[data-effective-theme="dark"] .auth-wrap{background:radial-gradient(circle at top,#163822,transparent 52%),#080B09}
/* Nova densidade */
.stats-v102 .stat{min-height:131px;padding:13px 16px;overflow:hidden}
.stats-v102 .stat label{margin-bottom:5px;font-size:12px;color:var(--muted);font-weight:650}
.stats-v102 .stat b{font-size:25px}
.stats-v102 .stat b small{font-size:13px;font-weight:550;color:var(--muted)}
.stats-v102 .stat span{line-height:1.4}
.stats-v102 .stat-note{font-size:11px;margin-top:7px;color:var(--muted);line-height:1.4}
.stat-date-pick{display:inline-block;margin-left:12px;vertical-align:middle}
.stat-date-pick select{max-width:130px;font-size:11px;padding:3px 6px;border:1px solid var(--line);border-radius:7px;background:var(--fieldBg);color:var(--ink)}
.stat-lines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px;margin-top:8px}
.stat-detail{display:flex;gap:5px;justify-content:space-between;border-bottom:1px solid var(--borderSoft);font-size:10px;color:var(--muted);padding-bottom:2px;min-width:0}
.stat-detail strong{font-weight:750;color:var(--green);white-space:nowrap}.stat-detail.attention strong{color:var(--red)}
.roster-row .person-meta strong{font-size:13px;font-weight:740}
.roster-row .person-meta small{font-size:10px;color:var(--muted)}
.roster-row{min-height:43px}
.roster-head,.roster-row{grid-template-columns:minmax(190px,2.0fr) repeat(7,minmax(42px,.53fr)) 52px}
.ft.day-highlight,.roster-head button.day-highlight{outline:2px solid var(--forest);outline-offset:1px}
.clear-trigger{border-color:var(--line)!important;background:var(--btnBg)!important;color:var(--red)!important}
/* Pop-up de status sem título; botões 23x21 pixels */
.modal.mini-status{width:max-content;min-width:0;max-width:calc(100vw - 22px);padding:7px 8px;border-radius:9px;overflow:visible}
.mini-overlay{align-items:center;justify-content:center}
.mini-top{display:flex;justify-content:space-between;align-items:center;gap:6px;color:var(--muted);font-size:10px;margin-bottom:5px;max-width:230px}
.mini-top>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mini-close{border:0;background:transparent;font-size:15px;padding:0 2px;line-height:1;color:var(--muted)}
.choice-row.miniature{display:flex;gap:3px;margin:0;align-items:center}
.choice-row.miniature .ft{display:flex;align-items:center;justify-content:center;min-width:23px;width:23px;height:21px;padding:0;font-size:10px;border-radius:3px;line-height:1}
.choice-row.miniature .choice-selected{outline-width:1px;outline-offset:1px}
.mini-period{width:225px;max-width:100%;margin-top:9px;display:flex;flex-direction:column;gap:7px;font-size:11px}
.mini-period label{display:flex;align-items:center;justify-content:space-between;gap:5px}
.mini-period input{max-width:160px;font-size:11px;padding:5px;background:var(--fieldBg);border:1px solid var(--line);border-radius:6px;color:var(--ink)}
.mini-period .btn{font-size:11px;padding:6px 8px}
.person-absence-list{display:flex;flex-direction:column;gap:5px;margin-top:12px}
.person-absence{border:1px solid var(--line);border-radius:7px;padding:8px 10px;display:flex;justify-content:space-between;gap:14px;align-items:center;font-size:12px}
.person-absence strong{font-size:13px}
.status-tag{padding:4px 6px;border-radius:5px;background:var(--tableHead);font-size:10px;font-weight:700;white-space:nowrap}
.status-tag.status-f{color:#985200;background:#FFF0D5}.status-tag.status-fe{color:#225DAA;background:#E4F0FF}.status-tag.status-at{color:#773AA4;background:#F1E5FA}
/* Painel de cobertura com diagnóstico na própria linha */
button.daycard.daily-link{width:100%;display:grid;grid-template-columns:minmax(120px,.9fr) minmax(180px,2fr) auto;text-align:left;color:var(--ink);background:var(--cardGreen);cursor:pointer}
button.daycard.daily-link.bad{background:var(--cardRed)}
button.daycard.daily-link:hover{filter:brightness(.98);border-color:var(--forest)}
.daycard-date{display:grid;gap:4px}.daycard-date small{font-size:11px;color:var(--muted)}
.daycard-cause{font-weight:550;font-size:12px;color:var(--ink)}
button.daycard.daily-link.bad .daycard-cause{color:var(--red)}
.theme-chooser{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px}
.theme-chooser select{background:var(--btnBg);color:var(--ink);border:1px solid var(--line);border-radius:7px;padding:6px;max-width:115px;font-size:11px}
.undo-toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:110;background:#16261C;color:white;padding:7px 10px;display:flex;align-items:center;gap:11px;border-radius:9px;font-size:12px;box-shadow:0 8px 25px #0004}
.undo-toast .btn{font-size:11px}
/* Maior legibilidade para o modo claro */
.hint,.sub,.person-meta small,.roster-head,.roster-head button{color:var(--muted)}
@media (max-width:1100px){.stats-v102{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:650px){.stats-v102 .stat{min-height:120px;padding:9px}.stats-v102 .stat b{font-size:21px}.stat-lines{grid-template-columns:1fr}.roster-head,.roster-row,.sector-block{min-width:765px}.person-absence{flex-wrap:wrap}.theme-chooser span{display:none}.theme-chooser select{max-width:87px}.daycard.daily-link{grid-template-columns:minmax(95px,.9fr) minmax(110px,1.4fr) auto;gap:6px;padding:9px}.daycard-cause{font-size:10px}}
@media (max-width:360px){.stats-v102{grid-template-columns:1fr}}
