/* CONFIRMAME.CL · Fotos Live Pro · estilo app compartido (panel maestro, panel del proveedor y portal del cliente) */
:root { --ac: #FF3D7F; --ac2: #8B5CF6; --sol: #FFC83D; --ink: #16121A; --mut: #6E6878; --line: #E8E5EE; --bg: #F5F4F8; --card: #fff; --ok: #12A37A; --warn: #E8920C; --bad: #E0464E; --info: #3B6FE0; --r: 18px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--ac); }
h1, h2, h3, .num { font-family: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif; letter-spacing: -.02em; }
h1 { font-size: 28px; line-height: 1.1; margin: 0; font-weight: 800; }
h2 { font-size: 20px; margin: 0 0 .2rem; font-weight: 800; }
h3 { font-size: 16px; margin: 0 0 .2rem; font-weight: 700; }
p { margin: .3rem 0; }
.mut { color: var(--mut); } .small { font-size: 13px; } .tiny { font-size: 12px; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Estructura: barra lateral en computador, barra inferior en celular */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand .lg { width: 38px; height: 38px; border-radius: 12px; background: var(--ac); display: grid; place-items: center; overflow: hidden; }
.brand .lg img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand b { font: 800 17px/1.1 'Bricolage Grotesque', sans-serif; display: block; } .brand small { color: #B9B2C3; font-size: 12px; }
.side a.nv { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #D8D3E0; text-decoration: none; font-weight: 500; }
.side a.nv:hover { background: rgba(255,255,255,.07); color: #fff; }
.side a.nv.on { background: #fff; color: var(--ink); }
.side a.nv.on svg.i { color: var(--ac); }
.side a.nv em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--ac); color: #fff; border-radius: 99px; padding: 1px 7px; }
.side .sp { flex: 1; }
.main { padding: 26px clamp(16px, 3vw, 40px) 90px; min-width: 0; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.top .sub { color: var(--mut); margin-top: 4px; }
.bnav { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 96px; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(22,18,26,.97); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; gap: 2px; }
  .bnav a { flex: 1 0 64px; display: grid; justify-items: center; gap: 2px; padding: 6px 4px; color: #B9B2C3; text-decoration: none; font-size: 11px; border-radius: 12px; }
  .bnav a.on { color: #fff; background: rgba(255,255,255,.1); }
  .bnav a.on svg.i { color: var(--ac); }
  h1 { font-size: 24px; }
}

/* Tarjetas y números */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 14px; }
.card .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .lb { color: var(--mut); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .ic ~ .lb { padding-right: 40px; }
.kpi .num { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.kpi .sb { color: var(--mut); font-size: 12.5px; margin-top: 2px; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .kpi.dark .lb, .kpi.dark .sb { color: #CFC9D8; }
.kpi.acc { background: var(--ac); color: #fff; border-color: var(--ac); } .kpi.acc .lb, .kpi.acc .sb { color: rgba(255,255,255,.85); }
.kpi .ic { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--ac); }
.kpi.dark .ic, .kpi.acc .ic { background: rgba(255,255,255,.12); color: #fff; }
.meter { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-top: 10px; display: flex; }
.meter i { display: block; height: 100%; background: var(--ac); }
.meter i.b { background: var(--ac2); } .meter i.c { background: var(--sol); }
.kpi.dark .meter { background: rgba(255,255,255,.14); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--mut); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; background: var(--ac); }
.legend span.b::before { background: var(--ac2); } .legend span.c::before { background: var(--sol); } .legend span.d::before { background: var(--line); }
.bars { display: grid; gap: 10px; }
.bars .row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bars .tr { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; } .bars .tr i { display: block; height: 100%; background: var(--ac); border-radius: 99px; }

/* Chips de estado */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--mut); white-space: nowrap; }
.chip.ok { background: #E3F6EF; color: #0B7A5B; } .chip.warn { background: #FFF1DD; color: #A35F00; } .chip.bad { background: #FDE7E8; color: #B42D35; }
.chip.info { background: #E6EEFD; color: #2952B3; } .chip.acc { background: var(--ac); color: #fff; } .chip.dark { background: var(--ink); color: #fff; } .chip.sol { background: var(--sol); color: var(--ink); }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 16px; font: 700 14px/1.1 'DM Sans', system-ui, sans-serif; cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; min-height: 42px; }
.btn.pri { background: var(--ac); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--bg); color: var(--ink); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #F3C4C7; }
.btn.sm { padding: 7px 11px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.in { display: inline; margin: 0; }
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); }
label.f small { font-weight: 400; color: var(--mut); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; min-height: 42px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ac); outline-offset: 1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.fg { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg); cursor: pointer; }
.sw b { display: block; font-weight: 600; } .sw small { color: var(--mut); display: block; font-size: 12.5px; }
.tg { position: relative; display: inline-block; vertical-align: middle; width: 48px; height: 28px; flex: none; } .tg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.tg i { position: absolute; inset: 0; border-radius: 99px; background: #CFCAD8; transition: background .2s; pointer-events: none; }
.tg i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.34,1.5,.64,1); }
.tg input:checked + i { background: var(--ac); } .tg input:checked + i::after { transform: translateX(20px); }
.tg input:disabled + i { opacity: .45; }

/* Tablas que pasan a tarjetas en celular */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--mut); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
@media (max-width: 700px) {
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .tbl.cards td { border: 0; padding: 3px 0; }
  .tbl.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--mut); font-size: 12px; }
  .tbl.cards .n { text-align: left; }
}

/* Piezas */
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font: 800 16px 'Bricolage Grotesque', sans-serif; color: #fff; background: var(--ac2); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .who small { color: var(--mut); display: block; font-size: 12.5px; }
.note { border-radius: 14px; padding: 12px 14px; background: #FFF6E5; color: #6B4A00; font-size: 14px; }
.note.info { background: #EEF3FE; color: #23458F; } .note.ok { background: #E7F7F0; color: #0B6B50; } .note.bad { background: #FDECED; color: #9B2A31; }
.empty { text-align: center; padding: 34px 16px; color: var(--mut); }
.empty svg.i { width: 36px; height: 36px; color: var(--line); }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; display: block; padding: 3px 0 0 40px; min-height: 28px; }   /* texto con negritas o links fluye normal (antes la grilla lo partía en pedazos) */
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 13px 'Bricolage Grotesque', sans-serif; }
.steps li.done::before { content: "✓"; background: var(--ok); }
.toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -160%); background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .35s cubic-bezier(.34,1.4,.64,1); max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); } .toast.bad { background: var(--bad); }
.plan { border: 1.5px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 10px; position: relative; }
.plan.cur { border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 18%, transparent); }
.plan .pr { font: 800 34px/1 'Bricolage Grotesque', sans-serif; } .plan .pr small { font: 500 14px 'DM Sans', sans-serif; color: var(--mut); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; } .plan li.no { color: #A8A2B3; text-decoration: line-through; }
.plan .tag { position: absolute; top: -11px; right: 16px; }
.mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.mx th, .mx td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.mx th:first-child, .mx td:first-child { text-align: left; }
.mx thead th { font: 800 15px 'Bricolage Grotesque', sans-serif; }
.mx input[type=number], .mx input[type=text] { max-width: 120px; text-align: center; margin: 0 auto; }
.yes { color: var(--ok); font-weight: 800; } .noo { color: #C9C3D3; }
.tv { aspect-ratio: 16 / 9; border-radius: 16px; background: #16121A; border: 8px solid #2A2531; position: relative; overflow: hidden; color: #fff; }
.qrimg { width: 150px; height: 150px; image-rendering: pixelated; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.hide-m { } @media (max-width: 700px) { .hide-m { display: none; } }
