
:root{--bg:#f7f4ee;--card:#fffdfa;--ink:#24332e;--muted:#718079;--green:#547c6b;--green2:#dfeae4;--line:#e8e3da;--warn:#a7654f}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}.shell{max-width:760px;margin:auto;min-height:100vh;padding:22px 16px 96px}
.brand{letter-spacing:.18em;font-weight:800;font-size:13px}.demo{font-size:12px;background:#eee8dc;padding:5px 9px;border-radius:999px;float:right}
h1{font-size:28px;margin:28px 0 8px}h2{font-size:20px}p.muted,.meta{color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:18px;margin:12px 0;box-shadow:0 5px 20px rgba(36,51,46,.04)}
label{display:block;font-weight:650;margin:14px 0 7px}input,select,textarea{width:100%;padding:14px;border:1px solid #d9d4ca;border-radius:14px;background:white;color:var(--ink)}
.btn{border:0;border-radius:14px;padding:14px 16px;font-weight:750;cursor:pointer}.primary{background:var(--green);color:white;width:100%;margin-top:18px}.secondary{background:var(--green2);color:var(--ink)}
.top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.progress{height:10px;background:#e7e3db;border-radius:999px;overflow:hidden}.progress>i{display:block;height:100%;background:var(--green);border-radius:999px}
.section-title{margin-top:26px;font-size:13px;letter-spacing:.13em;color:var(--muted);font-weight:800}.block{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.count{white-space:nowrap;color:var(--green);font-weight:800}
.task{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}.task:last-child{border:0}
.check{width:28px;height:28px;border:2px solid #b9c2bd;border-radius:9px;background:white}.check.done{background:var(--green);border-color:var(--green);color:white}
.tasktext.done{text-decoration:line-through;color:var(--muted)}.stamp{font-size:12px;color:var(--muted);margin-top:5px}
.actions{display:flex;gap:8px;margin-top:8px}.tiny{font-size:12px;border:0;background:#f0ede6;border-radius:9px;padding:7px 9px;color:var(--ink)}
.notearea{margin-top:10px}.incident{color:var(--warn);font-weight:750}.back{border:0;background:transparent;padding:0;color:var(--green);font-weight:750}
.bottom{position:fixed;bottom:0;left:0;right:0;background:rgba(255,253,250,.94);border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:10px;backdrop-filter:blur(10px)}
.bottom button{max-width:360px}.danger{color:#8b4e40}.bigstat{font-size:34px;font-weight:850;margin:4px 0}
@media(min-width:700px){.shell{padding-top:36px}}

.helpbox{margin-top:10px;padding:12px 14px;border-radius:12px;background:#f3f0e8;color:#44524d;font-size:14px;line-height:1.5;border:1px solid #e5e0d5}
.helpbox[hidden]{display:none}


/* Resumen del día · v1.9 */
.summary-actions{display:flex;gap:10px;flex-wrap:wrap}
.summary-actions .btn{flex:1 1 220px}
.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.summary-section{margin:0}
.summary-number{font-size:24px;font-weight:800;margin:8px 0}
.summary-list{padding-top:4px;padding-bottom:4px}
.summary-item{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid rgba(0,0,0,.08)}
.summary-item:last-child{border-bottom:0}
.summary-item>div{min-width:0}
.summary-item strong{display:block;margin-bottom:5px}
.summary-text{margin-top:8px;padding:10px 12px;border-radius:10px;background:rgba(0,0,0,.035);white-space:pre-wrap}
.status{font-size:12px;font-weight:700;white-space:nowrap;align-self:flex-start;padding:5px 8px;border-radius:999px;background:rgba(0,0,0,.06)}
.incident-status{font-weight:800}
.empty-state{color:#68736d}
@media (max-width:700px){.summary-grid{grid-template-columns:1fr}.summary-item{flex-direction:column}.status{align-self:flex-start}}


/* Historial · v1.10 */
.history-list{display:grid;gap:12px}
.history-row{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;font:inherit;cursor:pointer}
.history-main{min-width:0}
.history-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.history-badges span{font-size:12px;padding:5px 8px;border-radius:999px;background:rgba(0,0,0,.05)}
.history-block{padding-top:8px}
.history-task{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:13px 0;border-bottom:1px solid rgba(0,0,0,.08)}
.history-task:last-child{border-bottom:0}
.history-check{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.06);font-weight:800}
.history-check.is-done{background:rgba(45,130,85,.12)}
.btn:disabled{opacity:.48;cursor:not-allowed}
