/* =========================================================================
   HORARIOS NUTRIGO — estilos
   Colores funcionales: gris = franco · azul = vacaciones · violeta = licencia/enfermedad
                        amarillo = advertencia · rojo = error · verde = correcto
   ========================================================================= */
:root {
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --ink: #1E2330;
  --ink2: #3A4150;
  --muted: #6B7280;
  --faint: #9AA1AD;
  --line: #E4E7EC;
  --line2: #EEF0F3;
  --navy: #2F3342;
  --brand: #18B65D;
  --brand-d: #129A4E;
  --brand-bg: #E7F7EE;
  --err: #D23C3C;   --err-bg: #FDECEC;
  --warn: #A86B00;  --warn-bg: #FFF5D6;  --warn-line: #F2C94C;
  --ok: #1E9E5A;    --ok-bg: #E6F6EC;
  --vac: #2F6FD6;   --vac-bg: #E4EEFF;
  --lic: #6B4FBB;   --lic-bg: #EFEAFB;
  --fra: #7A8190;   --fra-bg: #EDEFF2;
  --sel: #2F6FD6;
  --weekend: #F7F8FA;
  --fer: #FFF1E6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --font: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
a { color: var(--vac); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden { display: none !important; }

/* ---------------- layout ---------------- */
#app { display: grid; grid-template-columns: 212px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
#app.collapsed { grid-template-columns: 60px 1fr; }
.sidebar { grid-row: 1 / 3; background: var(--navy); color: #C9CDD6; display: flex; flex-direction: column; overflow: hidden; }
.brand { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #fff; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; display: grid; place-items: center; flex: none; }
.brand .logo img { width: 26px; height: 30px; object-fit: contain; }
.brand .logo svg { width: 18px; height: 18px; stroke: #fff; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: #9AA0AD; letter-spacing: 0; }
.nav { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 8px 6px; }
.nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7F8594; padding: 6px 10px 4px; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #C9CDD6; text-decoration: none; white-space: nowrap; cursor: pointer; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(24,182,93,.16); color: #fff; }
.nav a.active svg { stroke: #4ADE80; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a .badge { margin-left: auto; }
#app.collapsed .nav a span, #app.collapsed .brand .txt, #app.collapsed .nav .grp { display: none; }
#app.collapsed .nav a .badge { position: absolute; margin-left: 14px; margin-top: -14px; font-size: 9px; padding: 0 4px; }
.side-foot { padding: 10px 16px; font-size: 11px; color: #7F8594; white-space: nowrap; }
#app.collapsed .side-foot { display: none; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 0 18px 0 10px; background: var(--card); border-bottom: 1px solid var(--line); min-width: 0; }
.topbar .spacer { flex: 1; }
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-nav select { font-weight: 600; font-size: 15px; border: 1px solid transparent; background: transparent; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.month-nav select:hover { background: var(--line2); }
.save-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save-status.pendiente .dot, .save-status.guardando .dot { background: var(--warn-line); }
.save-status.error .dot { background: var(--err); }
.save-status .save-time { margin-left: 2px; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
main { overflow: auto; padding: 18px 20px 40px; min-width: 0; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.view-head h1 { margin-right: 6px; }
.view-head .spacer { flex: 1; }

/* ---------------- botones / inputs ---------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; white-space: nowrap; font-weight: 500; color: var(--ink2); }
.btn:hover { background: #F7F8FA; border-color: #D5DAE1; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.danger { color: var(--err); }
.btn.danger.solid { background: var(--err); color: #fff; border-color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line2); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; outline: none; }
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #9DB8E8; box-shadow: 0 0 0 3px rgba(47,111,214,.12); }
select { padding-right: 6px; }
label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.fld > input, label.fld > select, label.fld > textarea { color: var(--ink); font-weight: 400; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; user-select: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 10px; cursor: pointer; color: var(--ink2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--navy); color: #fff; }

/* ---------------- tarjetas ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 16px 18px; }
.card h2 { margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; }
.kpi .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .val { font-size: 26px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.err .val { color: var(--err); } .kpi.warn .val { color: var(--warn); } .kpi.ok .val { color: var(--ok); }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 1200px) { .cols { grid-template-columns: 1fr; } }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 600; background: var(--line2); color: var(--ink2); }
.badge.err { background: var(--err); color: #fff; } .badge.warn { background: var(--warn-line); color: #5A3E00; } .badge.ok { background: var(--ok-bg); color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.pill.err { background: var(--err-bg); color: var(--err); } .pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 0 5px; border-radius: 4px; line-height: 16px; color: #fff; }
.edot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); vertical-align: -1px; }

/* ---------------- tablas genéricas ---------------- */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #FAFBFC; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #F8FAFC; }
.tbl td.r, .tbl th.r { text-align: right; } .tbl td.c, .tbl th.c { text-align: center; }
.tbl tr.sun td { background: var(--weekend); }
.tbl tr.fer td { background: var(--fer); }
.tbl tr.wk td { background: #F3F5F8; font-weight: 600; font-size: 12px; color: var(--ink2); }
.dif-pos { color: var(--warn); font-weight: 600; } .dif-neg { color: var(--vac); font-weight: 600; } .dif-ok { color: var(--ok); font-weight: 600; }

/* ---------------- estados de un día ---------------- */
.st-f { background: var(--fra-bg); color: var(--fra); }
.st-v { background: var(--vac-bg); color: var(--vac); }
.st-l { background: var(--lic-bg); color: var(--lic); }
.st-p { background: var(--fra-bg); color: var(--ink2); }
.st-a { background: var(--err-bg); color: var(--err); }
.stchip { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }

/* ---------------- GRILLA DE PLANIFICACIÓN ---------------- */
.plan-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.palette { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 10px; margin-bottom: 10px; }
.palette .pg { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.palette .pg-l { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; margin-right: 2px; }
.chip { height: 26px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: #B9C2CF; background: #FAFBFC; }
.chip .k { font-size: 10px; color: var(--faint); font-weight: 500; }
.chip.armed { outline: 2px solid var(--sel); outline-offset: 1px; background: #EEF4FF; }
.chip.st-f, .chip.st-v, .chip.st-l, .chip.st-p, .chip.st-a { border-color: transparent; }
.palette .hint { font-size: 11.5px; color: var(--muted); margin-left: auto; }

.grid-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); position: relative; }
table.grid { border-collapse: separate; border-spacing: 0; user-select: none; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 0; }
.grid thead th { position: sticky; top: 0; background: #FAFBFC; z-index: 3; font-weight: 600; font-size: 11px; color: var(--muted); height: 38px; text-align: center; min-width: 40px; }
.grid thead th .dn { font-size: 13px; color: var(--ink); display: block; line-height: 1.1; }
.grid thead th.we { background: #F1F3F6; }
.grid thead th.fer { background: var(--fer); }
.grid thead th.fer .dn { color: #C2410C; }
.grid thead th.today .dn { color: #fff; background: var(--brand); border-radius: 10px; display: inline-block; padding: 0 5px; }
.grid .namecol { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 138px; max-width: 160px; text-align: left; padding: 4px 8px 4px 10px; border-right: 1px solid var(--line); }
.grid thead .namecol { z-index: 4; background: #FAFBFC; }
.grid .namecol .nm { font-weight: 600; font-size: 12.5px; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.grid .namecol .nm:hover { text-decoration: underline; }
.grid .namecol .sub { font-size: 10.5px; color: var(--faint); white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.grid tr.inact .namecol .nm { color: var(--faint); }
.grid td.cell { height: 40px; min-width: 40px; max-width: 60px; vertical-align: middle; text-align: center; cursor: cell; position: relative; font-size: 11px; line-height: 1.15; color: var(--ink); }
.grid td.cell.we { background: var(--weekend); }
.grid td.cell.fer { background: #FFF8F2; }
.grid td.cell .ln sup { font-size: 7.5px; vertical-align: 3px; margin-left: .5px; }
.grid td.cell .ln { display: block; white-space: nowrap; padding: 0 2px 0 3px; border-left: 3px solid transparent; text-align: left; margin: 1px 2px; font-weight: 600; font-size: 10.5px; }
.grid td.cell .ln.alien { background: rgba(0,0,0,.035); }
.grid td.cell .st { display: block; margin: 3px; border-radius: 5px; font-weight: 700; font-size: 10.5px; line-height: 30px; }
.grid td.cell .st.per { font-style: italic; opacity: .85; }
.grid td.cell .obs { position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: #8B95A5; }
.grid td.cell .conf { position: absolute; top: 1px; right: 2px; font-size: 9px; font-weight: 800; color: #fff; background: #B7791F; border-radius: 6px; padding: 0 3px; line-height: 12px; }
.grid td.cell.a-error { box-shadow: inset 0 0 0 2px var(--err); }
.grid td.cell.a-warn { box-shadow: inset 0 0 0 2px var(--warn-line); }
.grid td.cell.sel { background: #DCE8FD !important; }
.grid td.cell.sel.act { box-shadow: inset 0 0 0 2px var(--sel); }
.grid td.cell.paint { background: #E7F7EE !important; }
.grid td.tot { position: sticky; background: #fff; z-index: 2; text-align: right; padding: 0 8px; font-size: 12px; min-width: 52px; white-space: nowrap; }
.grid thead th.tot { z-index: 4; background: #FAFBFC; text-align: right; padding: 0 8px; }
.grid .tot.t1 { right: 104px; border-left: 1px solid var(--line); } .grid .tot.t2 { right: 52px; } .grid .tot.t3 { right: 0; }
.grid tfoot td { background: #FBFCFD; height: 24px; font-size: 10.5px; text-align: center; position: sticky; bottom: 0; }
.grid tfoot tr:first-child td { border-top: 1px solid var(--line); }
.grid tfoot .namecol { background: #FBFCFD; font-size: 11px; font-weight: 600; color: var(--ink2); padding: 0 8px 0 10px; }
.grid tfoot td.tot { background: #FBFCFD; }
.cov { display: inline-block; min-width: 16px; line-height: 16px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.cov.ok { color: var(--ok); } .cov.err { background: var(--err); color: #fff; padding: 0 3px; } .cov.low { background: var(--warn-bg); color: var(--warn); padding: 0 3px; } .cov.closed { color: var(--faint); }
.grid.week td.cell { min-width: 130px; max-width: none; height: 52px; font-size: 12px; }
.grid.week td.cell .ln { font-size: 12px; padding: 1px 6px; }
.grid.week thead th[data-c] { min-width: 130px; }
.grid-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; background: #fff; color: var(--ink2); font-family: var(--font); }
.addrow td { padding: 6px 10px; }

/* ---------------- editor de día ---------------- */
.ed-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.ed-estado { margin-bottom: 12px; }
.tramo { display: grid; grid-template-columns: 96px 18px 96px 1fr 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.tramo .a { text-align: center; color: var(--muted); }
.ed-total { font-weight: 600; margin: 4px 0 10px; }
.ed-err { color: var(--err); font-size: 12px; margin: 4px 0; }

/* ---------------- vista general ---------------- */
table.gen { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.gen th { position: sticky; top: 0; z-index: 2; background: #FAFBFC; font-size: 12px; font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.gen th .tag { margin-right: 6px; }
.gen td { border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); padding: 5px 8px; vertical-align: top; font-size: 12px; }
.gen td.day { width: 74px; white-space: nowrap; font-weight: 600; color: var(--ink2); }
.gen td.day small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.gen tr.we td { background: var(--weekend); }
.gen tr.fer td { background: var(--fer); }
.gen .ent { display: flex; gap: 6px; align-items: baseline; padding: 2px 6px; border-radius: 5px; margin: 1px 0; cursor: pointer; }
.gen .ent:hover { outline: 1px solid #C9D2DF; }
.gen .ent b { font-weight: 600; min-width: 64px; }
.gen .ent span { color: var(--ink2); font-variant-numeric: tabular-nums; }
.gen .closed { color: var(--faint); font-style: italic; }
.gen .gap { color: var(--err); font-weight: 600; font-size: 11px; }
.gen .nov { font-size: 11px; }
.gen .nov .stchip { margin: 1px 2px 1px 0; }
.fer-name { font-size: 10.5px; color: #C2410C; font-weight: 600; }

/* ---------------- cobertura ---------------- */
.covtbl { border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
.covtbl th { font-size: 10.5px; color: var(--muted); font-weight: 600; padding: 2px; text-align: left; white-space: nowrap; }
.covtbl td.d { font-size: 12px; font-weight: 600; white-space: nowrap; padding-right: 8px; cursor: pointer; }
.covtbl td.s { width: 22px; height: 22px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 4px; cursor: pointer; }
.covtbl td.s.c0 { background: var(--err); color: #fff; }
.covtbl td.s.clow { background: #F6C8C8; color: #8A1F1F; }
.covtbl td.s.cmid { background: #FCE9A8; color: #6B4A00; }
.covtbl td.s.cok { background: #BFE8CF; color: #145C35; }
.covtbl td.s.cmulti { background: #9CC3F5; color: #1E3A8A; }
.covtbl td.s.cclosed { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 3px, #fff 3px, #fff 6px); color: transparent; }
.covtbl td.s.cout { background: #E5E7EB; color: var(--ink2); }
.covtbl tr.dsel td.d { color: var(--vac); }
.covtbl td.sum { font-size: 11px; padding-left: 8px; white-space: nowrap; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -3px; margin-right: 4px; }
.hourlist { font-variant-numeric: tabular-nums; }
.hourlist div { display: grid; grid-template-columns: 56px 110px 1fr; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line2); font-size: 12.5px; }
.hourlist .n0 { color: var(--err); font-weight: 700; }

/* ---------------- alertas ---------------- */
.alist { display: flex; flex-direction: column; }
.aitem { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.aitem:last-child { border-bottom: 0; }
.aitem .ic { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.aitem.error .ic { background: var(--err-bg); color: var(--err); }
.aitem.warn .ic { background: var(--warn-bg); color: var(--warn); }
.aitem.info .ic { background: var(--line2); color: var(--muted); }
.aitem .msg { flex: 1; }
.aitem .t { font-size: 11px; color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.empty.ok { color: var(--ok); font-weight: 600; }

/* ---------------- modal / toast / menú ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(20,24,33,.38); display: grid; place-items: center; z-index: 100; animation: fade .12s ease; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .14s ease; }
.modal.wide { width: min(860px, calc(100vw - 32px)); }
.modal .mh { padding: 16px 20px 6px; display: flex; align-items: center; gap: 10px; }
.modal .mh h2 { flex: 1; }
.modal .mb { padding: 8px 20px 12px; overflow: auto; }
.modal .mf { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line2); }
.modal .mf .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.97); opacity: 0; } }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; }
.toast { background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: pop .15s ease; }
.toast.err { background: var(--err); } .toast.ok { background: #14532D; }
.toast button { background: rgba(255,255,255,.16); border: 0; color: #fff; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.menu { position: fixed; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 150; min-width: 240px; }
.menu button { display: flex; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; cursor: pointer; gap: 8px; align-items: center; }
.menu button:hover { background: var(--line2); }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
.menu .sep { height: 1px; background: var(--line2); margin: 4px 0; }
.menu button.danger { color: var(--err); }

.create-month { max-width: 720px; margin: 30px auto; text-align: center; }
.create-month .opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; text-align: left; }
.create-month .opt { padding: 16px; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .1s, box-shadow .1s; }
.create-month .opt:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.create-month .opt b { display: block; margin-bottom: 4px; font-size: 14px; }
.create-month .opt span { font-size: 12px; color: var(--muted); }
.banner { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-radius: 10px; background: var(--warn-bg); color: #5A3E00; margin-bottom: 12px; font-size: 12.5px; }
.banner.info { background: #EEF4FF; color: #1E3A8A; }
.sumcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.sumcards .kpi { padding: 10px 12px; }
.sumcards .kpi .val { font-size: 20px; }
.week-editor td { padding: 4px 6px; }
.colorsw { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.colorsw button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.colorsw button.on { border-color: var(--navy); }
.help p { margin: 6px 0; }

/* ---------------- HORARIOS (vista principal tipo Excel INDIVIDUALES) ---------------- */
.hz-months { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.hz-year { font-size: 16px; margin: 0 6px 0 2px; }
.mpill { height: 32px; min-width: 58px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; color: var(--ink2); }
.mpill:hover { border-color: var(--brand); }
.mpill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.mpill.new { color: var(--faint); border-style: dashed; background: transparent; }
.mpill.new.on { background: var(--navy); color: #fff; border-style: solid; }
.hz-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.hz-bar h1 { margin-right: 6px; }
.hz-bar .spacer { flex: 1; }
.hz-help { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.blocks { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.blk { flex: none; width: 272px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.blk .bh { display: flex; align-items: center; height: 26px; padding: 0 6px 0 10px; color: #fff; }
.blk .bl { font-size: 11px; font-weight: 800; letter-spacing: .06em; flex: 1; }
.blk .bmenu { border: 0; background: rgba(255,255,255,.2); color: #fff; border-radius: 6px; width: 26px; height: 20px; cursor: pointer; font-weight: 800; line-height: 1; }
.blk .bmenu:hover { background: rgba(255,255,255,.35); }
.blk .bn { font-weight: 700; font-size: 14px; padding: 8px 10px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk .bn:hover { color: var(--vac); }
.blk .bm { font-size: 11.5px; color: var(--muted); padding: 0 10px 6px; }
table.bt { width: 100%; border-collapse: collapse; font-size: 12px; }
.bt th { font-size: 10.5px; color: var(--muted); font-weight: 600; text-align: left; padding: 3px 4px; background: #FAFBFC; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bt th.r { text-align: right; padding-right: 8px; }
.bt td { border-bottom: 1px solid var(--line2); padding: 0; height: 25px; }
.bt td.d { width: 54px; padding-left: 8px; font-size: 11.5px; color: var(--ink2); white-space: nowrap; cursor: pointer; user-select: none; }
.bt tr.sun td.d, .bt tr.sat td.d { color: var(--muted); }
.bt tr.sun td { background: #F3F4F6; }
.bt tr.fer td { background: var(--fer); }
.bt td.d .fdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #EA580C; margin-left: 4px; vertical-align: 1px; }
.bt td.i { position: relative; }
.bt td.i input { width: 100%; height: 24px; border: 0; border-radius: 0; padding: 0 5px; background: transparent; font: 600 12px var(--font); font-variant-numeric: tabular-nums; color: var(--ink); }
.bt td.i input:focus { box-shadow: inset 0 0 0 2px var(--vac); background: #fff; }
.bt td.i input.bad { box-shadow: inset 0 0 0 2px var(--err); background: var(--err-bg); }
.bt td.i input.st-f { color: var(--fra); background: var(--fra-bg); font-weight: 500; }
.bt td.i input.st-v { color: var(--vac); background: var(--vac-bg); }
.bt td.i input.st-l { color: var(--lic); background: var(--lic-bg); }
.bt td.i input.st-p { background: var(--fra-bg); }
.bt td.i input.st-a { color: var(--err); background: var(--err-bg); }
.bt td.i input.per { font-style: italic; }
.bt td.i.a-error input:not(:focus) { box-shadow: inset 0 0 0 2px var(--err); }
.bt td.i.a-warn input:not(:focus) { box-shadow: inset 0 0 0 2px var(--warn-line); }
.bt td.i .odot { position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: #8B95A5; }
.bt td.l { width: 62px; }
.bt td.l select { width: 60px; height: 20px; font-size: 10.5px; font-weight: 700; padding: 0 2px; border: 0; border-left: 3px solid; border-radius: 3px; background: transparent; color: var(--ink2); }
.bt td.l .varios { font-size: 10.5px; font-weight: 700; color: var(--ink2); padding-left: 4px; }
.bt td.h { width: 32px; text-align: right; padding-right: 8px; font-weight: 600; color: var(--ink2); }
table.bsum { width: 100%; border-collapse: collapse; font-size: 12px; border-top: 2px solid var(--line); }
.bsum td { padding: 4px 10px; border-bottom: 1px solid var(--line2); }
.bsum td:last-child { text-align: right; }
.bsum tr:first-child td { font-size: 13px; }
.blk.add { border-style: dashed; box-shadow: none; background: transparent; }
.addcard { width: 100%; height: 120px; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-weight: 600; }
.addcard svg { width: 28px; height: 28px; }
.addcard:hover { color: var(--brand); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
@media print { .blocks { flex-wrap: wrap; overflow: visible; } .blk { box-shadow: none; break-inside: avoid; } .bt td.i input { box-shadow: none !important; } .bt td.l select { appearance: none; } }

.blk .bh { cursor: grab; }
.blk .bh:active { cursor: grabbing; }
.blk .bh .grip { opacity: .7; margin-right: 6px; font-size: 12px; letter-spacing: -2px; }
.blk.dragging { opacity: .35; }
.blk.drop-before { box-shadow: -4px 0 0 0 var(--brand), var(--shadow); }
.blk.drop-after { box-shadow: 4px 0 0 0 var(--brand), var(--shadow); }

/* ---------------- ingreso ---------------- */
.login-page { min-height: 100vh; display: grid; place-items: center; background: #1F2230 url("../assets/login-fondo.svg") center / cover no-repeat; }
.login-card { width: 360px; background: var(--navy); border-radius: 18px; padding: 34px 32px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 12px; color: #C9CDD6; }
.login-logo { width: 196px; margin: 0 auto 2px; display: block; }
.login-title { text-align: center; letter-spacing: .35em; font-size: 12px; font-weight: 700; color: #9AA0AD; margin-bottom: 10px; }
.lfld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #9AA0AD; }
.lfld input { height: 38px; border-radius: 9px; border: 1px solid #454A5C; background: #262A37; color: #fff; padding: 0 12px; font-size: 14px; }
.lfld input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(24,182,93,.2); }
.login-err { min-height: 16px; color: #F87171; font-size: 12px; text-align: center; }
.login-btn { height: 40px; justify-content: center; font-size: 14px; }
.login-foot { text-align: center; font-size: 11px; color: #6B7080; margin-top: 4px; }
.side-foot .who { display: flex; align-items: center; gap: 6px; color: #E5E7EB; font-size: 12px; }
.side-foot .who svg { width: 14px; height: 14px; }
.side-btn { color: #C9CDD6 !important; border-color: #454A5C !important; }
.side-btn:hover { background: rgba(255,255,255,.08) !important; }
.ro-badge { font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 3px 10px; }
main.ro [data-addemp], main.ro .bmenu, main.ro [data-addex], main.ro .palette, main.ro [data-tools], main.ro [data-edit], main.ro .opt, main.ro [data-new], main.ro .btn.primary:not([data-keep]) { display: none !important; }
main.ro .blk .bh { cursor: default; }
.perm-tbl td, .perm-tbl th { text-align: center; }
.perm-tbl td:first-child, .perm-tbl th:first-child { text-align: left; }
.al-n { font-weight: 700; text-decoration: none; padding: 0 6px; border-radius: 8px; }
.al-n.err { background: var(--err-bg); color: var(--err); }
.al-n.warn { background: var(--warn-bg); color: var(--warn); }

/* Grilla del mes: más grande y legible */
.grid thead th { height: 44px; min-width: 62px; font-size: 11.5px; }
.grid thead th .dn { font-size: 15px; }
.grid td.cell { height: 50px; min-width: 62px; max-width: 80px; font-size: 12.5px; }
.grid td.cell .ln { font-size: 12.5px; border-left-width: 0; padding: 0 4px; text-align: center; font-weight: 600; margin: 2px 2px; }
.grid td.cell .ln sup { font-size: 9px; }
.grid td.cell .ln.alien::after { content: attr(data-l); display: block; font-size: 9.5px; font-weight: 700; opacity: .65; }
.grid td.cell .st { line-height: 38px; font-size: 11.5px; }
.grid .namecol { min-width: 160px; }
.grid .namecol .nm { font-size: 13.5px; }
.grid td.cell.sel { box-shadow: inset 0 0 0 3px var(--sel); }

.rep-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.rep-menu { display: flex; flex-direction: column; padding: 6px; }
.rep-menu button { text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.rep-menu button b { font-size: 13px; color: var(--ink); font-weight: 600; }
.rep-menu button span { font-size: 11.5px; color: var(--muted); }
.rep-menu button:hover { background: var(--line2); }
.rep-menu button.on { background: var(--brand-bg); }
@media print { .rep-layout { display: block; } }

/* ---------------- Comisiones ---------------- */
h1 svg, h2 svg, h3 svg { width: 1em; height: 1em; vertical-align: -2px; }
.cm-stars { color: #E0A800; letter-spacing: 1px; font-size: 12px; }
.cm-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.cm-bars { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cm-bar { display: grid; grid-template-columns: 26px 150px 1fr 70px 90px; gap: 10px; align-items: center; font-size: 13px; }
.cm-bar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-bar .track { position: relative; height: 16px; background: var(--line2); border-radius: 8px; overflow: visible; }
.cm-bar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: #A9C4E4; }
.cm-bar.win .track i { background: var(--brand); }
.cm-bar .track .piso { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #E25A5A; }
.cm-bar .pt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-bar .pr { text-align: right; color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.pos { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; background: var(--line2); color: var(--ink2); }
.pos.p1 { background: #F6D365; color: #6B4E00; } .pos.p2 { background: #D9DEE5; color: #3A4150; } .pos.p3 { background: #EBC3A0; color: #6A3B12; }
.cm-budget { display: flex; gap: 10px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.cm-budget > div { flex: 1; background: var(--bg); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.cm-budget span { font-size: 11.5px; color: var(--muted); } .cm-budget b { font-size: 16px; font-variant-numeric: tabular-nums; }
.cm-budget .pos { all: unset; flex: 1; background: var(--ok-bg); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.cm-budget .neg { background: var(--err-bg); } .cm-budget .neg b { color: var(--err); }
.cm-side textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.cm-side select { width: 100%; }
.cm-esp-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cm-esp-list span { background: #FFF4D6; border: 1px solid #F2DFA0; border-radius: 12px; padding: 2px 9px; font-size: 12px; }
.cm-esp-list span.fijo { background: #E8E1F3; border-color: #D5C9EA; }
.cm-sheet-wrap { overflow: auto; max-height: calc(100vh - 170px); }
.cm-sheet { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.cm-sheet th, .cm-sheet td { border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); padding: 3px 6px; height: 28px; }
.cm-sheet thead th { position: sticky; top: 0; z-index: 3; background: #fff; font-size: 13px; padding: 8px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.cm-sheet th.lbl { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; font-weight: 500; color: var(--ink2); min-width: 260px; white-space: nowrap; }
.cm-sheet thead th.lbl { z-index: 4; }
.cm-sheet td { text-align: center; font-variant-numeric: tabular-nums; min-width: 62px; }
.cm-sheet td.b { background: #FAFBFD; }
.cm-sheet td.pu, .cm-sheet th.pu { color: var(--muted); font-size: 11.5px; min-width: 64px; }
.cm-sheet tr.cm-sec th { background: #DCE9F5; color: #1F4E79; text-align: left; font-weight: 700; position: sticky; left: 0; padding: 6px 8px; }
.cm-sheet tr.cm-auto td { color: var(--ink2); background: #F7F8FA; }
.cm-sheet tr.cm-tot td { background: #F2F6FA; }
.cm-sheet tr.cm-strong td { background: #E3EFDD; }
.cm-sheet tr.cm-final td, .cm-sheet tr.cm-final th { background: #F4E6D6; font-size: 13.5px; }
.cm-sheet tr.cm-abh td { color: var(--muted); font-size: 11px; height: 20px; }
.cm-sheet tr:hover th.lbl { color: var(--ink); }
.cm-in { width: 100%; min-width: 54px; border: 1px solid transparent; background: transparent; text-align: center; padding: 3px 2px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.cm-in:hover { border-color: var(--line); background: #fff; }
.cm-in:focus { outline: none; border-color: var(--sel); background: #fff; box-shadow: 0 0 0 2px rgba(47,111,214,.15); }
.cm-in::placeholder { color: #C3C8D0; }
.cm-money .cm-in { min-width: 110px; }
.cm-x { border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 15px; margin-left: 4px; }
.cm-x:hover { color: var(--err); }
.cm-g { display: inline-block; padding: 0 8px; border-radius: 10px; font-weight: 700; font-size: 11.5px; }
.cm-g.gA { background: #DCE9F5; color: #1F4E79; } .cm-g.gB { background: #F4E6D6; color: #8A4B12; }
.cm-tag { font-size: 10px; background: #FFF4D6; color: #8A6400; border-radius: 8px; padding: 0 6px; margin-left: 4px; font-weight: 600; }
.cm-ok { color: var(--ok); font-weight: 700; } .cm-neg { color: var(--err); }
.cm-edit input, .cm-edit select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.cm-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0; }
.cm-map label { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); gap: 3px; }
.cm-prev { overflow: auto; max-height: 150px; font-size: 11.5px; }
.cm-prev td, .cm-prev th { white-space: nowrap; }
.cm-msg-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.cm-msg { width: 100%; min-height: 560px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 13.5px/1.55 var(--font); resize: vertical; }
.cm-cfg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cm-cfg h3 { margin: 4px 0 8px; } .cm-cfg h3:not(:first-child) { margin-top: 16px; }
.cm-cfg input[data-n] { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; text-align: right; }
select.cm-man { border-color: var(--lic); background: var(--lic-bg); }
.cm-stack .row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; margin: 5px 0; }
.cm-stack .track { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--line2); }
.cm-stack .track i { display: block; height: 100%; }
.cm-stack .pt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1300px) { .cm-top, .cm-msg-layout { grid-template-columns: 1fr; } .cm-cfg { grid-template-columns: 1fr 1fr; } }
@media print { .cm-sheet-wrap { max-height: none; overflow: visible; } .cm-top { display: block; } .cm-in { border: 0; } }

/* ---------------- Informes (acordeón + filtro) ---------------- */
.rep-acc .rep-grp { flex-direction: row; align-items: center; gap: 10px; padding: 11px 10px; }
.rep-acc .rep-grp svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.rep-acc .rep-grp b { flex: 1; font-size: 14px; }
.rep-acc .rep-grp .chev svg { width: 14px; height: 14px; transition: transform .15s; }
.rep-acc .rep-grp.open .chev svg { transform: rotate(90deg); }
.rep-acc .rep-grp + .rep-items { margin: 0 0 6px 18px; border-left: 2px solid var(--line2); padding-left: 6px; }
.rep-acc .rep-items.hidden { display: none; }
.rep-sel { margin: 2px 0 8px; font-size: 13px; }
.rep-filtro { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.rep-filtro label.fld { min-width: 150px; }
.rep-filtro select, .rep-filtro input { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; }
.rep-rapidos { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.rep-filtro [data-generar] { margin-left: auto; }
.rep-vacio { text-align: center; padding: 34px 20px; }
.rep-vacio h2 { margin-bottom: 6px; }

/* ---------------- Inicio ---------------- */
.home { max-width: 980px; margin: 6vh auto 0; }
.home-hi { display: flex; align-items: center; gap: 18px; margin-bottom: 34px; }
.home-hi img { width: 54px; height: 54px; object-fit: contain; filter: grayscale(1) opacity(.55); }
.home-hi h1 { font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.home-hi p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.home-tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, box-shadow .12s; }
.home-tile:hover { border-color: #BFD8C9; box-shadow: var(--shadow); }
.home-tile svg { width: 20px; height: 20px; color: var(--muted); margin-bottom: 6px; }
.home-tile b { font-size: 14px; font-weight: 600; }
.home-tile span { font-size: 12px; color: var(--muted); }

/* ---------------- Tarjeta de usuario (menú lateral) ---------------- */
.user-card { margin: 4px 12px 10px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.03); white-space: nowrap; overflow: hidden; }
.uc-foto { width: 44px; height: 44px; flex: none; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; color: #4B5160; }
.uc-foto svg { width: 26px; height: 26px; stroke-width: 1.3; }
.uc-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uc-foto.sm { width: 28px; height: 28px; border-radius: 6px; background: var(--line2); } .uc-foto.sm svg { width: 14px; height: 14px; }
.uc-foto.lg { width: 72px; height: 72px; border-radius: 12px; background: var(--line2); } .uc-foto.lg svg { width: 28px; height: 28px; }
.uc-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.uc-txt b { color: #fff; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.uc-txt span { color: #C9CDD6; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
#app.collapsed .user-card { margin: 4px 8px 10px; padding: 4px; border-color: transparent; background: transparent; justify-content: center; }
#app.collapsed .uc-txt { display: none; }
#app.collapsed .user-card .uc-foto { width: 34px; height: 34px; }
.uf-foto { display: flex; align-items: center; gap: 14px; margin-top: 14px; }

/* ---------------- Arrastre animado de columnas ---------------- */
.blk-ph { flex: none; border: 2px dashed #C9D3DF; border-radius: 10px; background: rgba(47,111,214,.04); }
.blk.lifted { box-shadow: 0 26px 56px rgba(16,24,40,.30), 0 8px 18px rgba(16,24,40,.14); transition: box-shadow .25s; transform-origin: 50% 24px; }
.blk.dropped { animation: blkDrop .4s ease-out; }
@keyframes blkDrop { 0% { box-shadow: 0 0 0 3px rgba(24,182,93,.45), var(--shadow); } 100% { box-shadow: 0 0 0 0 rgba(24,182,93,0), var(--shadow); } }
.blk-ph { animation: phIn .2s ease-out; }
@keyframes phIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
body.dragging-col, body.dragging-col * { cursor: grabbing !important; user-select: none !important; }

/* ---------------- Menú lateral desplegable ---------------- */
.nav a.grp-h { position: relative; }
.nav a.grp-h .chev { margin-left: auto; display: grid; place-items: center; font-style: normal; opacity: .6; }
.nav a.grp-h .chev svg { width: 14px; height: 14px; transition: transform .2s ease; }
.nav a.grp-h.open .chev svg { transform: rotate(90deg); }
.nav a.grp-h.has-active { color: #fff; }
.nav a.grp-h.has-active > svg { stroke: #4ADE80; }
.nav .grp-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav .grp-items.open { grid-template-rows: 1fr; }
.nav .grp-items > div { overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.nav .grp-items.open > div { padding: 2px 0 4px; }
.nav a.sub { padding: 7px 10px 7px 20px; font-size: 12.5px; color: #AEB3BF; }
.nav a.sub svg { width: 16px; height: 16px; opacity: .85; }
.nav a.sub.active { color: #fff; }
#app.collapsed .nav a.grp-h .chev { display: none; }
#app.collapsed .nav .grp-items { display: none; }

/* ---------------- Encargado ---------------- */
.en-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.en-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.en-kpis span { font-size: 11.5px; color: var(--muted); }
.en-kpis b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.en-kpis small { font-size: 11px; color: var(--faint); }
.en-kpis .bad b { color: var(--err); }
.en-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 12px; color: var(--muted); }
.en-prog { flex: 1; height: 8px; background: var(--line2); border-radius: 6px; overflow: hidden; }
.en-prog i { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .4s; }
.en-tabs em { font-style: normal; font-size: 11px; background: var(--line2); color: var(--muted); border-radius: 8px; padding: 0 6px; margin-left: 4px; }
.en-tabs button.on em { background: var(--brand-bg); color: var(--brand-d); }
.en-group { margin-bottom: 16px; }
.en-group h3 { margin: 0 0 6px; font-size: 13px; }
.en-list { overflow: hidden; }
.en-task { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line2); cursor: pointer; transition: background .15s; }
.en-task:last-child { border-bottom: 0; }
.en-task:hover { background: #FAFBFC; }
.en-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #C3CAD4; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; transition: all .15s; }
.en-check:hover { border-color: var(--brand); }
.en-check.on { background: var(--brand); border-color: var(--brand); }
.en-check svg { width: 13px; height: 13px; stroke-width: 3; }
.en-task.pop .en-check { transform: scale(1.25); background: var(--brand); border-color: var(--brand); }
.en-prio { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.en-main { flex: 1; min-width: 0; }
.en-tit { font-weight: 600; font-size: 13.5px; transition: color .2s; }
.en-task.done .en-tit { text-decoration: line-through; color: var(--faint); }
.en-task.nodone .en-tit { color: var(--muted); }
.en-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11.5px; margin-top: 3px; }
.en-meta svg { width: 12px; height: 12px; vertical-align: -2px; }
.en-chip { background: var(--line2); color: var(--ink2); border-radius: 6px; padding: 0 7px; }
.en-chip.loc { background: #E8EEF6; }
.en-st { border-radius: 6px; padding: 0 7px; font-weight: 600; }
.en-pend { background: #FFF5D6; color: #8A6400; } .en-curso { background: #E4EEFF; color: #2F5FB0; }
.en-hecha { background: var(--ok-bg); color: var(--ok); } .en-no { background: var(--err-bg); color: var(--err); }
.en-venc { color: var(--err); font-weight: 600; }
.en-money { text-align: right; display: flex; flex-direction: column; font-size: 12px; font-variant-numeric: tabular-nums; }
.en-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.en-form .full { grid-column: 1 / -1; }
.en-form input, .en-form select, .en-form textarea, .en-seg textarea, .en-pasos input[data-pnew], .en-bit input { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; width: 100%; }
.en-form textarea, .en-seg textarea { resize: vertical; }
.en-sec { margin: 16px 0 6px; font-size: 13px; display: flex; gap: 8px; align-items: baseline; border-top: 1px solid var(--line2); padding-top: 12px; }
.en-sec .muted { font-size: 12px; }
.en-pasos { display: flex; flex-direction: column; gap: 4px; }
.en-paso { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.en-paso.ok span { text-decoration: line-through; color: var(--faint); }
.en-paso .btn { margin-left: auto; }
.en-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.en-bit { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.en-bi { background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.en-bi .muted { font-size: 11px; }
.en-bi.st { background: transparent; border-left: 2px solid var(--line); border-radius: 0; padding: 2px 10px; color: var(--muted); }
@media (max-width: 1300px) { .en-kpis { grid-template-columns: repeat(3, 1fr); } .en-form { grid-template-columns: 1fr 1fr; } }

/* ---------------- Ayudante Nutri ---------------- */
.nutri-ov { position: fixed; inset: 0; z-index: 3000; background: rgba(20,23,33,.28); display: grid; place-items: center; animation: nutriFade .2s ease-out; }
.nutri-ov.out { animation: nutriFade .18s ease-in reverse forwards; }
@keyframes nutriFade { from { opacity: 0; } to { opacity: 1; } }
.nutri { position: relative; display: flex; align-items: flex-end; gap: 0; max-width: 760px; width: calc(100% - 40px); animation: nutriIn .4s cubic-bezier(.22,.61,.36,1); }
@keyframes nutriIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.nutri-img { width: 215px; flex: none; margin-right: -18px; position: relative; z-index: 2; filter: drop-shadow(0 12px 18px rgba(0,0,0,.18)); animation: nutriEntra .8s cubic-bezier(.22,.61,.36,1) both; }
@keyframes nutriEntra { 0% { transform: translateX(-40px) rotate(-6deg); opacity: 0; } 55% { transform: translateX(5px) rotate(1.2deg); opacity: 1; } 80% { transform: translateX(-1px) rotate(-.3deg); } 100% { transform: none; } }
/* respiración: leve estiramiento desde los pies + balanceo */
.nutri-body { position: relative; transform-origin: 50% 97%; animation: nutriRespira 3.6s ease-in-out .8s infinite; }
@keyframes nutriRespira { 0%, 100% { transform: scale(1, 1) rotate(0); } 25% { transform: scale(.996, 1.012) rotate(.6deg); } 50% { transform: scale(1, 1.004) rotate(0); } 75% { transform: scale(.997, 1.01) rotate(-.6deg); } }
.nutri-pose { position: relative; }
.nutri-pose img { position: absolute; inset: 0; display: block; width: 100%; user-select: none; -webkit-user-drag: none; }
.nutri-pose img:first-child { position: relative; }
.nutri-pose .nl { opacity: 0; z-index: 1; will-change: transform, opacity; }
.nutri-pose .nl.izq { transform-origin: 26.7% 48.1%; }
.nutri-pose .nl.der { transform-origin: 77.4% 48.1%; }
.nutri-pose .nl.on { opacity: 1; }
.nutri-pose .nc, .nutri-pose .nm { opacity: 0; transition: opacity .32s ease-in-out; }
.nutri-pose .nc { z-index: 2; } .nutri-pose .nc.top { z-index: 3; }
.nutri-pose .nm { z-index: 4; } .nutri-pose .nm.top { z-index: 5; }
.nutri-pose .nc.on, .nutri-pose .nm.on { opacity: 1; }
.nutri-pose .ne { z-index: 6; visibility: hidden; }
.nutri-pose .ne.on { visibility: visible; }
.nutri-bubble { position: relative; flex: 1; background: #fff; border-radius: 16px; padding: 22px 24px 18px 34px; box-shadow: 0 24px 60px rgba(16,24,40,.28); margin-bottom: 70px; min-height: 180px; }
.nutri-bubble::before { content: ''; position: absolute; left: -10px; bottom: 34px; width: 22px; height: 22px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.nutri-bubble h3 { margin: 0 0 6px; font-size: 17px; }
.nutri-bubble p { margin: 0 0 10px; color: var(--ink2); font-size: 13.5px; }
.nutri-bubble ul { margin: 4px 0 10px; padding-left: 18px; font-size: 13.5px; color: var(--ink2); display: flex; flex-direction: column; gap: 6px; }
.nutri-x { position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; border: 0; background: transparent; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.nutri-x:hover { background: var(--line2); color: var(--ink); }
.nutri-temas { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.nutri-temas button { border: 1px solid var(--line); background: #F7FAF8; border-radius: 16px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; color: var(--ink); transition: all .12s; }
.nutri-temas button:hover { border-color: #9BD8B4; background: var(--brand-bg); color: var(--brand-d); }
.nutri-tip { font-size: 11.5px !important; color: var(--faint) !important; margin: 0 !important; }
.nutri-acts { display: flex; justify-content: space-between; gap: 8px; }
.nutri-back, .nutri-go { border: 0; background: transparent; cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.nutri-go { color: var(--brand-d); font-weight: 600; }
.nutri-back:hover, .nutri-go:hover { text-decoration: underline; }
.nutri-no { border: 0; background: transparent; color: var(--faint); font-size: 11.5px; cursor: pointer; padding: 0; margin-top: 10px; text-decoration: underline; }
.nutri-no:hover { color: var(--muted); }
.nutri-fab { position: fixed; right: 18px; bottom: 16px; z-index: 900; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: 0 6px 18px rgba(16,24,40,.18); cursor: pointer; padding: 4px; display: grid; place-items: center; transition: transform .15s; }
.nutri-fab:hover { transform: translateY(-2px) scale(1.05); }
.nutri-fab img { width: 40px; height: 40px; object-fit: contain; }
@media print { .nutri-fab, .nutri-ov { display: none !important; } }

/* ---------------- Marketing ---------------- */
.mk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.mk-dh { padding: 8px 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); background: #FAFBFC; }
.mk-day { min-height: 118px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; }
.mk-day:nth-child(7n) { border-right: 0; }
.mk-day.out { background: #FAFBFC; }
.mk-day.today { background: #F3FBF6; }
.mk-dn { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink2); padding: 0 2px; }
.mk-day.today .mk-dn { color: var(--brand-d); }
.mk-plus { border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .12s; }
.mk-day:hover .mk-plus { opacity: 1; }
.mk-it { display: flex; align-items: center; gap: 4px; font-size: 11px; border-radius: 5px; padding: 2px 5px; cursor: pointer; line-height: 1.3; }
.mk-it:hover { filter: brightness(.96); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.mk-it .mk-tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-it em { font-style: normal; font-size: 9px; font-weight: 700; color: #fff; background: #222; border-radius: 3px; padding: 0 3px; }
.mk-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mk-ley { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.mk-ley i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.mk-est { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.mk-pil { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; white-space: nowrap; }
.mk-guia td { vertical-align: top; font-size: 12.5px; }
.mk-guia tr.first td { border-top: 2px solid var(--line); }
.mk-wrap { max-width: 340px; white-space: normal; }
.nowrap { white-space: nowrap; }

/* ---------------- Encargado › Gastos ---------------- */
.gs-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 4px; }
.gs-grid h3 { margin: 0 0 10px; font-size: 13px; }
.gs-bars { display: flex; flex-direction: column; gap: 7px; }
.gs-bar { display: grid; grid-template-columns: 130px 1fr 90px; gap: 8px; align-items: center; font-size: 12px; }
.gs-bar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.gs-bar .track { height: 10px; background: var(--line2); border-radius: 5px; overflow: hidden; }
.gs-bar .track i { display: block; height: 100%; border-radius: 5px; opacity: .8; }
.gs-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.gs-evo { display: flex; gap: 8px; align-items: flex-end; height: 130px; }
.gs-evo .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.gs-evo .bar { position: relative; flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; }
.gs-evo .bar i { display: block; width: 100%; background: #9DD4B4; border-radius: 4px 4px 0 0; }
.gs-evo .col.cur .bar i { background: var(--brand); }
.gs-evo .bar b { position: absolute; left: -3px; right: -3px; height: 2px; background: #2F3342; }
.gs-evo span { font-size: 11px; color: var(--muted); }
@media (max-width: 1300px) { .gs-grid { grid-template-columns: 1fr; } }

/* ===================== NUTRIAPP online · etapa 1 ===================== */
.boot { color: #9AA1AE; font-size: 13px; letter-spacing: .04em; }
.login-sub { margin: 0 0 12px; color: #6B7280; font-size: 13px; text-align: center; }
.login-modo { margin-top: 12px; font-size: 11px; color: #9AA1AE; text-align: center; }
/* menú: subgrupo (RRHH › Horarios) y Puntos destacado */
.nav a.grp-sub { padding-left: 28px; font-size: 13px; }
.nav a.sub2 { padding-left: 46px; font-size: 12.5px; }
.nav a.star span::after { content: ' ★'; color: #F5C542; }
.nav a.star svg { stroke: #F5C542; }
/* barra superior: casita y local */
.loc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--brand-bg); color: var(--brand-d); }
.loc-chip svg { width: 15px; height: 15px; }
.loc-chip svg:last-child { width: 12px; height: 12px; opacity: .7; }
/* elegir local */
.loc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.loc-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font-size: 14px; transition: border-color .12s, box-shadow .12s, transform .12s; opacity: .55; }
.loc-btn.mio { opacity: 1; border-color: #BFD8C9; }
.loc-btn:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); transform: translateY(-1px); opacity: 1; }
/* usuarios y permisos */
.perm-tbl td.c, .perm-tbl th.c { text-align: center; width: 70px; }
.perm-tbl tr.perm-sec td { background: #F6F8F7; border-top: 1px solid var(--line); }
.perm-tbl tr.perm-sub td:first-child { padding-left: 22px; color: var(--ink2); }
.chk-fld { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; }
.loc-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.loc-checks .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.stchip.tipo-administrador { background: #1F2230; color: #fff; }
.stchip.tipo-encargado { background: #E8F0FB; color: #2F5D9E; }
.stchip.tipo-marketing { background: #FBEAF2; color: #A23C6F; }
.stchip.tipo-rrhh { background: #F3EDFB; color: #6B48A8; }
.stchip.tipo-vendedor { background: var(--brand-bg); color: var(--brand-d); }
.stchip.tipo-contador { background: #FDF3E1; color: #A2701C; }
.pin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pin-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pin-row b { flex: 1; font-size: 13px; }
.pin-in { width: 120px; font-size: 24px; letter-spacing: .4em; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #D5D9E0; border-radius: 20px; transition: background .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }
/* inicio por secciones */
.home-sec { margin-bottom: 22px; }
.home-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.home-sec h2 svg { width: 16px; height: 16px; }
.home-tile.pronto { opacity: .6; }
.home-tile.star { border-color: #F3DE9B; background: #FFFCF2; }
.home-tile.star svg { color: #D9A520; }
/* Nutri: avisos y mensajes */
.nutri-msg .nutri-bubble { min-height: 0; }
.nutri-txt p { margin: 0 0 8px; }
.nutri-big { font-size: 16px !important; line-height: 1.45; color: var(--ink) !important; }
.nutri-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.nutri-msg.bloquea { background: rgba(20,23,33,.55); }
.flex-btn { min-width: 64px; }
.emoji-btn { font-size: 22px; line-height: 1; }

/* ===================== Etapa 2 · Vendedores ===================== */
.badge.cnt { background: var(--err); color: #fff; }
.loc-sel { min-width: 160px; }
.loc-fijo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 16px; background: var(--brand-bg); color: var(--brand-d); font-weight: 600; font-size: 12px; }
.sec-t { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.inp.num, input.num { width: 76px; text-align: right; }
.inp.big { height: 44px; font-size: 20px; font-weight: 700; width: 120px; text-align: center; }
.neg { color: var(--err); font-weight: 700; } .pos { color: var(--ok); font-weight: 700; }
.anulado td { color: var(--faint); text-decoration: line-through; }
.tbl.compact td, .tbl.compact th { padding: 5px 8px; }
.empty { color: var(--muted); text-align: center; padding: 22px !important; }

.stock-wrap { overflow: auto; max-height: calc(100vh - 290px); }
.stock-tbl input { height: 28px; }
.stock-tbl input[type=date] { width: 136px; }
.vchip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.v-rojo { background: var(--err); color: #fff; }
.v-naranja { background: #FBE3CF; color: #A24A00; }
.v-amarillo { background: var(--warn-bg); color: var(--warn); }
tr.v-rojo-row td { background: #FDF1F1; }
tr.v-naranja-row td { background: #FFF6EE; }
tr.v-amarillo-row td { background: #FFFBEB; }
.rot-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 28px; cursor: pointer; filter: grayscale(1); opacity: .45; }
.rot-btn.on { filter: none; opacity: 1; background: var(--warn-bg); border-color: var(--warn-line); }
.rot-btn:disabled { cursor: default; }

.ped-add { padding: 12px; margin-bottom: 12px; }
.ped-add input { width: 100%; height: 38px; font-size: 14px; }
.ped-res { display: flex; flex-direction: column; margin-top: 6px; max-height: 260px; overflow: auto; }
.ped-res button { display: flex; align-items: center; gap: 6px; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: var(--ink2); }
.ped-res button:hover { background: var(--brand-bg); }
.ped-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ped-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ped-h { display: flex; align-items: center; gap: 8px; }
.ped-obs { background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--ink2); }

.nov-list { display: flex; flex-direction: column; gap: 10px; }
.nov-list .nov { padding: 14px; border-left: 4px solid var(--brand); }
.nov-list .nov.leida { border-left-color: var(--line); opacity: .75; }
.nov-ic { font-size: 26px; line-height: 1; }
.nov-txt { flex: 1; min-width: 0; }
.nov-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.ok-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); background: var(--ok-bg); border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 600; }

.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.promo { padding: 16px; border-top: 4px solid var(--brand); display: flex; flex-direction: column; gap: 6px; }
.promo h3 { margin: 0; font-size: 15px; }
.promo-como { background: var(--brand-bg); color: #145C34; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.esp-row td { background: #FFFBEB; }

.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.act { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; cursor: pointer; border: 1px solid var(--line); font: inherit; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.act:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.act:disabled { cursor: default; opacity: .55; }
.act span { font-size: 11.5px; color: var(--muted); }
.act i { font-style: normal; font-size: 11px; color: var(--muted); }
.act.tope { background: var(--bg); }
.act-pts { position: absolute; top: 10px; right: 12px; font-weight: 800; color: var(--brand-d); font-size: 15px; }
.auto-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; font-size: 12.5px; color: var(--ink2); }
.star-kpi .val { color: #C88A00; }
.pts-big { font-size: 34px; font-weight: 800; color: var(--brand-d); line-height: 1.1; }

.cli-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cli { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cli-h { display: flex; align-items: center; gap: 8px; }
.wa-tipos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wa-plant { padding: 10px 12px; }
.rep-personas td .inp, .rep-personas td input { width: 80px; }

.av-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.av-prev { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 0; }
.av-prev svg { width: 240px; height: 240px; }
.av-nombre { display: flex; flex-direction: column; align-items: center; font-size: 18px; }
.av-nombre span { font-size: 12px; color: var(--muted); }
.av-ed { padding: 16px; }
.av-ed h4 { margin: 14px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.av-ed h4:first-child { margin-top: 0; }
.av-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.av-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.av-c.on { box-shadow: 0 0 0 2px var(--navy); }
.av-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sab-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.uc-foto svg { width: 100%; height: 100%; }
@media (max-width: 900px) { .av-layout { grid-template-columns: 1fr; } .av-prev { position: static; } }
.act b { padding-right: 40px; }
.nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-grid > .empty, .promo-grid > .empty, .ped-grid > .empty, .act-grid > .empty { grid-column: 1 / -1; }
.login-page { grid-auto-flow: row; align-content: center; gap: 16px; }
.login-volver { justify-self: center; color: #9AA1AD; font-size: 12px; text-decoration: none; }
.login-volver:hover { color: #fff; }

/* ===================== Etapa 3 ===================== */
.seg button em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 2px; }
.seg button.on em { color: inherit; opacity: .75; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar-row input[type=search] { width: 260px; }
.stchip.prio-nor { background: var(--line2); color: var(--ink2); }
.stchip.prio-imp { background: #FBE3CF; color: #A24A00; }
.stchip.prio-urg { background: var(--err); color: #fff; }
.sol-form { margin-bottom: 6px; }
.sol-list { display: flex; flex-direction: column; gap: 10px; }
.sol { padding: 12px 14px; border-left: 4px solid var(--line); }
.sol.prio-b-importante { border-left-color: #F0A35E; }
.sol.prio-b-urgente { border-left-color: var(--err); }
.sol.nueva { box-shadow: 0 0 0 2px rgba(24,182,93,.25), var(--shadow); }
.sol-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sol-m { font-size: 11.5px; margin: 2px 0 6px; }
.sol-t { font-size: 13px; color: var(--ink2); }
.sol-resp { margin-top: 8px; background: var(--brand-bg); color: #145C34; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.sol-obs { width: 100%; margin-top: 8px; font: inherit; }
.sol-acc { margin-top: 6px; gap: 6px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; font-size: 22px; line-height: 1; color: #D8DCE3; cursor: pointer; padding: 0 1px; transition: transform .1s; }
.stars button.on { color: #E8A317; }
.stars button:hover:not(:disabled) { transform: scale(1.15); }
.stars button:disabled { cursor: default; }
.stars-txt { color: #E8A317; letter-spacing: 1px; white-space: nowrap; }
.rr-crit { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line2); }
.rr-crit:last-child { border-bottom: 0; }
.bu-prox { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; padding: 10px 14px; }
.bu-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.bu-chip:hover { border-color: var(--brand); }
.adj { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; max-width: 100%; }
.adj i { font-style: normal; }
.adj button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 0 2px; }
.av-dias { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cn-nota { margin-bottom: 10px; padding: 10px 14px; background: var(--warn-bg); }
.cn-tbl td, .cn-tbl th { white-space: nowrap; }
.rec-mes { margin-bottom: 12px; overflow: hidden; }
.rec-h { padding: 10px 14px; font-weight: 700; background: var(--bg); border-bottom: 1px solid var(--line); }
.rec, .arch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); }
.rec:last-child, .arch:last-child { border-bottom: 0; }
.rec-ic { font-size: 22px; }
.rec-t { flex: 1; min-width: 0; }
.rec-t .muted { font-size: 11.5px; }
.arch-list { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }

/* chat */
.ch-box { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 380px; overflow: hidden; }
.ch-list { flex: 1; overflow: auto; padding: 16px 18px; background: #F7F8FA; display: flex; flex-direction: column; gap: 6px; }
.ch-dia { text-align: center; margin: 8px 0 4px; }
.ch-dia span { background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 2px 10px; border-radius: 10px; }
.ch-msg { display: flex; }
.ch-msg.mio { justify-content: flex-end; }
.ch-b { max-width: min(560px, 75%); background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 7px 11px 5px; box-shadow: 0 1px 1px rgba(16,24,40,.04); }
.ch-msg.mio .ch-b { background: #E3F6EA; border-color: #CBEBD7; border-radius: 12px 12px 4px 12px; }
.ch-de { font-size: 11.5px; font-weight: 700; color: var(--brand-d); margin-bottom: 2px; }
.ch-de span { font-weight: 400; color: var(--muted); }
.ch-t { font-size: 13px; white-space: normal; word-wrap: break-word; }
.ch-t a { color: var(--sel); }
.ch-adj { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 5px; text-align: left; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink); }
.ch-adj span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-adj i { font-style: normal; color: var(--muted); font-size: 11px; }
.ch-adj:hover { border-color: var(--brand); }
.ch-h { text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ch-comp { border-top: 1px solid var(--line); padding: 10px 12px; background: #fff; }
.ch-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-files:not(:empty) { margin-bottom: 8px; }
.ch-row { display: flex; gap: 8px; align-items: flex-end; }
.ch-row textarea { flex: 1; resize: none; min-height: 36px; max-height: 160px; line-height: 1.4; font: inherit; }
.ch-row .btn { height: 36px; }
div.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ===================== Simulación y página en construcción ===================== */
.sim-chip, .obra-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 14px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sim-chip { background: #FFF1D6; color: #8A5300; border: 1px solid #F2C94C; }
.obra-chip { background: var(--err-bg); color: var(--err); border: 1px solid #F3B4B4; }
body.modo-sim #app { box-shadow: inset 0 3px 0 #F2C94C; }
.obra-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.obra-sw { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.obra-sw input { display: none; }
.obra-sw .sw { width: 42px; height: 24px; border-radius: 12px; background: #D3D7DE; position: relative; transition: background .15s; flex: none; }
.obra-sw .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.obra-sw input:checked + .sw { background: var(--err); }
.obra-sw input:checked + .sw::after { left: 21px; }
.obra-sug { display: flex; flex-direction: column; gap: 6px; }
.obra-sug .bu-chip { text-align: left; border-radius: 8px; padding: 6px 10px; }
.obra-prev { background: var(--navy) url("../assets/login-fondo.svg") center / cover; border-radius: 16px; padding: 26px; display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; gap: 8px; }
.obra-prev img { width: 130px; animation: obraFlota 4.5s ease-in-out infinite; }
.obra-prev b { font-size: 20px; }
.obra-prev p { color: #C9CDD6; margin: 4px 0 0; max-width: 340px; }
.obra-prox { display: flex; align-items: center; gap: 24px; padding: 28px 32px; max-width: 760px; }
.obra-prox img { width: 120px; flex: none; animation: obraFlota 4.5s ease-in-out infinite; }
.obra-prox h2 { margin: 0 0 6px; }
@keyframes obraFlota { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
@media (max-width: 900px) { .obra-grid { grid-template-columns: 1fr; } .obra-prox { flex-direction: column; text-align: center; } }
