/* Pizca Admin: un solo look claro, como una app del celular. Tarjetas blancas sobre fondo casi blanco, brasa como color de acción. */
:root {
  --bg: #FAF8F6; --surface: #FFFFFF; --ink: #24201C; --muted: #857C74; --line: #EFEBE7; --chip: #F4F0EC;
  --accent: #B84A23; --accent-2: #E2703F; --accent-ink: #FFFFFF; --accent-soft: #FFF0E8;
  --ok: #1E8656; --ok-soft: #E4F5EC; --warn: #9C6410; --warn-soft: #FDF1DC; --bad: #B4291E; --bad-soft: #FDE8E5;
  --shadow: 0 1px 2px rgba(60, 40, 25, .05), 0 6px 20px rgba(60, 40, 25, .06);
  --font-d: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-b: "Figtree", "Segoe UI", system-ui, sans-serif;
  --r: 20px; color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font-b); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.app { max-width: 640px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 120px; display: grid; gap: 20px; }
header.top { display: flex; align-items: center; gap: 12px; }
header.top img { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow); }
header.top .hola { margin: 0; font-family: var(--font-d); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.15; }
header.top .sub { margin: 0; font-size: .9rem; color: var(--muted); }
section { display: grid; gap: 16px; }
.card { background: var(--surface); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; min-width: 0; box-shadow: var(--shadow); }
h2 { margin: 0; font-family: var(--font-d); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; text-wrap: balance; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
/* estado */
.estado { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 700; justify-self: start; }
.estado .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.estado[data-s="atencion"] { background: var(--warn-soft); color: var(--warn); }
.estado[data-s="urgente"] { background: var(--bad-soft); color: var(--bad); }
/* hero */
.hero { background: linear-gradient(160deg, #FFF3EB 0%, #FFFFFF 70%); gap: 4px; }
.hero .l { font-size: .9rem; color: var(--muted); font-weight: 600; }
.hero .v { font-family: var(--font-d); font-weight: 800; font-size: clamp(2.4rem, 9vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.hero .h { font-size: .88rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.stat .l { font-size: .75rem; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--font-d); font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent-2); border-radius: 3px; }
/* acciones */
.acciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.accion { position: relative; display: grid; gap: 10px; align-content: start; text-align: left; border: 0; border-radius: var(--r); padding: 18px; font: inherit; cursor: pointer; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); min-height: 128px; }
.accion.main { background: var(--accent); color: var(--accent-ink); }
.accion .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.accion:not(.main) .ic { background: var(--accent-soft); color: var(--accent); }
.accion .ic svg { width: 24px; height: 24px; }
.accion b { font-size: 1.05rem; line-height: 1.25; }
.accion .s { font-size: .84rem; opacity: .8; }
.accion .num { position: absolute; top: 16px; right: 16px; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; display: grid; place-items: center; }
.prox { display: flex; gap: 14px; align-items: center; }
.cal { flex: none; width: 54px; border-radius: 14px; overflow: hidden; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.cal span { display: block; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; padding: 2px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal b { display: block; font-family: var(--font-d); font-size: 1.4rem; padding: 4px 0; }
/* listas */
ul.list { list-style: none; margin: 0; padding: 0; display: grid; }
ul.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
ul.list li:first-child { border-top: 0; padding-top: 2px; }
ul.list .grow { flex: 1; min-width: 0; }
ul.list .t { font-weight: 600; }
ul.list .d { font-size: .86rem; color: var(--muted); }
input[type="checkbox"].big { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 9px; border: 2px solid #D9D2CB; flex: none; cursor: pointer; display: grid; place-items: center; margin: 0; background: var(--surface); }
input[type="checkbox"].big:checked { background: var(--ok); border-color: var(--ok); }
input[type="checkbox"].big:checked::after { content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
li.done .t { text-decoration: line-through; color: var(--muted); }
li.done .d { display: none; }
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.pill.Alta { background: var(--bad-soft); color: var(--bad); }
.pill.Media { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.pend { background: var(--warn-soft); color: var(--warn); }
/* segmentos */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); justify-self: start; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
/* revisar */
.progress { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .4s; border-radius: 4px; }
.rev { gap: 14px; padding: 22px 18px; }
.rev .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .86rem; color: var(--muted); }
.rev .amt { font-family: var(--font-d); font-weight: 800; font-size: clamp(2.2rem, 9vw, 2.8rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.rev .amt.in { color: var(--ok); }
.rev .who { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; margin-top: -6px; }
.rev .q { margin: 0; font-size: 1.05rem; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.rev .hint { margin: 0; font-size: .9rem; color: var(--muted); }
.btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btns.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btns .primary { grid-column: 1 / -1; }
.btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 14px 10px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; min-height: 54px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 1.08rem; min-height: 60px; }
.btn:disabled { opacity: .5; cursor: default; }
/* formulario */
label.f { display: grid; gap: 6px; font-size: .86rem; color: var(--muted); font-weight: 600; }
label.f input, label.f select, label.f textarea { font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid transparent; border-radius: 14px; padding: 13px 14px; width: 100%; min-width: 0; }
label.f input:focus, label.f select:focus, label.f textarea:focus { border-color: var(--accent-2); background: var(--surface); outline: none; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drop { border: 2px dashed #E6C9BA; border-radius: var(--r); padding: 26px 16px; text-align: center; display: grid; gap: 8px; justify-items: center; cursor: pointer; background: var(--accent-soft); }
.drop.over { border-color: var(--accent); }
.drop .ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.drop .ic svg { width: 28px; height: 28px; }
.drop b { font-size: 1.08rem; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th { width: 72px; height: 72px; border-radius: 14px; background: var(--chip) center/cover no-repeat; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); position: relative; flex: none; }
.thumbs .th button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: .9rem; line-height: 1; }
.status { font-size: .92rem; padding: 12px 14px; border-radius: 14px; background: var(--chip); }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.err { background: var(--bad-soft); color: var(--bad); }
/* barra de abajo */
nav.tabs { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100% - 24px)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 22px; box-shadow: 0 8px 30px rgba(60, 40, 25, .14); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; }
nav.tabs button { background: none; border: 0; padding: 8px 4px; border-radius: 16px; font: inherit; font-size: .76rem; font-weight: 600; color: var(--muted); display: grid; justify-items: center; gap: 2px; cursor: pointer; position: relative; }
nav.tabs button svg { width: 24px; height: 24px; }
nav.tabs button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
nav.tabs .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .68rem; line-height: 18px; font-weight: 700; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, label.drop:focus-within { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; display: flex; gap: 14px; align-items: center; z-index: 20; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast button { background: none; border: 0; color: #FFC9AE; font: inherit; font-weight: 700; cursor: pointer; }
.empty { text-align: center; padding: 30px 12px; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.empty b { color: var(--ink); font-family: var(--font-d); font-size: 1.15rem; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.money.in { color: var(--ok); }
a { color: var(--accent); }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.foot { text-align: center; font-size: .84rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .progress i { transition: none; } }
@media (max-width: 380px) { .stats { grid-template-columns: 1fr 1fr; } .acciones { grid-template-columns: 1fr; } }
/* extras de la app propia */
.prox .tt { font-weight: 700; }
.thumbs a.th { text-decoration: none; }
.right { display: grid; justify-items: end; gap: 4px; }
.m0 { margin: 0; }
/* login */
.login { min-height: 100dvh; display: grid; place-content: center; gap: 18px; padding: 24px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.login img { width: 96px; height: 96px; border-radius: 28px; justify-self: center; box-shadow: var(--shadow); }
.login h1 { margin: 0; font-family: var(--font-d); font-weight: 800; font-size: 1.8rem; letter-spacing: -0.02em; }
.login .card { width: min(380px, calc(100vw - 32px)); text-align: left; }
.login .btn { width: 100%; }
/* instalar en el celu */
.instalar ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.salir { justify-self: center; }
