:root {
  --bg: #F3F5F8; --panel: #fff; --ink: #0E1B2C; --ink2: #4B5B73; --ink3: #8693A8; --line: #E2E7EE; --line2: #EEF1F5;
  --brand: #0B7A75; --brand-d: #085E5A; --brand-s: #E2F3F1; --navy: #0D2338; --navy2: #15324E;
  --amber: #A9690B; --amber-s: #FCF1DA; --red: #BE3329; --red-s: #FBE8E6; --green: #1B8148; --green-s: #E2F4E9;
  --blue: #2259D6; --blue-s: #E5EDFD; --violet: #6846BF; --violet-s: #EEE9FA;
  --r: 10px; --sh: 0 1px 2px rgba(14, 27, 44, .05), 0 1px 3px rgba(14, 27, 44, .04); --sh2: 0 12px 40px rgba(14, 27, 44, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 12px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--ink3); } .sub { color: var(--ink2); font-size: 13px; } .sm { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .sp { flex: 1; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }

/* Estructura */
#app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side { background: var(--navy); color: #C9D5E3; display: flex; flex-direction: column; padding: 18px 12px 14px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.logo .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(140deg, #19B5AC, #0B7A75); display: grid; place-items: center; color: #fff; }
.logo b { color: #fff; font-size: 15px; letter-spacing: -.01em; display: block; line-height: 1.15; } .logo span { font-size: 11.5px; color: #8FA3BA; }
.side h3 { color: #6C829B; padding: 14px 10px 6px; font-size: 10.5px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #C9D5E3; font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: var(--navy2); color: #fff; box-shadow: inset 3px 0 0 #19B5AC; }
.nav a .cnt { margin-left: auto; background: rgba(255, 255, 255, .12); border-radius: 20px; padding: 0 7px; font-size: 11.5px; font-weight: 600; }
.nav a.on .cnt, .nav a .cnt.hot { background: #19B5AC; color: #05302E; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; color: #7F93AB; }
.side .foot button { background: none; border: 0; color: #9FD9D5; padding: 0; cursor: pointer; text-decoration: underline; font-size: 11.5px; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { height: 58px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 22px; flex: none; position: relative; z-index: 20; }
.search { position: relative; flex: 1 1 320px; max-width: 560px; margin-right: auto; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); padding: 0 44px 0 38px; outline: none; }
.search input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-s); }
.search > svg { position: absolute; left: 12px; top: 11px; color: var(--ink3); }
.search kbd { position: absolute; right: 10px; top: 9px; }
kbd { font: 11px/1 Inter, sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; color: var(--ink3); background: #fff; }
.drop { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh2); overflow: hidden; z-index: 50; }
.drop .it { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line2); }
.drop .it:last-child { border: 0; } .drop .it:hover, .drop .it.sel { background: var(--brand-s); }
.drop .it b { font-weight: 600; } .drop .empty { padding: 14px; color: var(--ink3); }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--ink2); font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh); font-weight: 600; }
.seg.xs button { padding: 2px 8px; font-size: 12px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-s); color: var(--brand-d); display: grid; place-items: center; font-weight: 650; font-size: 12.5px; flex: none; }
.av.lg { width: 48px; height: 48px; font-size: 16px; } .av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.content { flex: 1; overflow: auto; padding: 22px 26px 60px; }
.head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; } .head p { color: var(--ink2); margin-top: 3px; }

/* Piezas */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card > header { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line2); }
.card > .pad { padding: 14px 16px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: #C9D2DE; background: #FAFBFC; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.pri:hover { background: var(--brand-d); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink2); } .btn.ghost:hover { background: var(--bg); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; } .btn.danger { color: var(--red); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--line2); color: var(--ink2); white-space: nowrap; }
.chip.g { background: var(--green-s); color: var(--green); } .chip.a { background: var(--amber-s); color: var(--amber); } .chip.r { background: var(--red-s); color: var(--red); }
.chip.b { background: var(--blue-s); color: var(--blue); } .chip.v { background: var(--violet-s); color: var(--violet); } .chip.t { background: var(--brand-s); color: var(--brand-d); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ink3); } .dot.g { background: #25A45F; } .dot.a { background: #E0A11B; } .dot.r { background: #D8463B; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
th.num { text-align: right; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; } tbody tr:hover td { background: #FAFCFD; } tr.click { cursor: pointer; }
td .t2 { color: var(--ink3); font-size: 12px; }
tr.ter td { background: #FBFAFE; } tr.ter:hover td { background: #F6F3FD; }
.kpi { padding: 14px 16px; } .kpi .l { font-size: 12px; color: var(--ink2); font-weight: 550; } .kpi .v { font-size: 24px; font-weight: 680; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; } .kpi .d { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 13px; border-radius: 9px; font-size: 13px; background: var(--amber-s); color: #6B4406; border: 1px solid #F1DCAE; }
.alert.r { background: var(--red-s); color: #7C1F18; border-color: #F2C9C4; } .alert.b { background: var(--blue-s); color: #173F99; border-color: #C9D9FA; } .alert.g { background: var(--green-s); color: #12592F; border-color: #BFE3CD; }
.alert .btn { margin-left: auto; flex: none; }
.bar { height: 8px; border-radius: 6px; background: var(--line2); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; } .bar i.a { background: #E0A11B; } .bar i.r { background: #D8463B; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.in, select.in, textarea.in { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: #fff; outline: none; width: 100%; font-weight: 400; color: var(--ink); }
textarea.in { height: auto; padding: 9px 11px; resize: vertical; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-s); }
.in.num { text-align: right; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line2); } .list .li:last-child { border: 0; } .list a.li:hover, .list .li.click:hover { background: #FAFCFD; cursor: pointer; }
.empty { padding: 26px; text-align: center; color: var(--ink3); }

/* Paciente */
.banner { position: sticky; top: -22px; z-index: 10; padding: 16px 18px; display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.banner .who { min-width: 0; } .banner .who h1 { font-size: 19px; }
.banner .tot { display: flex; gap: 0; margin-left: auto; }
.banner .tot div { padding: 0 16px; white-space: nowrap; border-left: 1px solid var(--line); text-align: right; } .banner .tot .l { font-size: 11.5px; color: var(--ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; } .banner .tot .v { font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.banner .tot .saldo .v { color: var(--red); } .banner .tot .saldo.ok .v { color: var(--green); }
.pg { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.add { display: grid; grid-template-columns: 1fr 210px 64px auto; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FAFBFC; border-radius: var(--r) var(--r) 0 0; position: relative; }
.add .drop { top: 52px; left: 14px; right: auto; width: 560px; }
.hon { border: 1px dashed transparent; border-radius: 6px; padding: 1px 5px; cursor: pointer; display: inline-block; } .hon:hover { border-color: var(--brand); background: var(--brand-s); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; } .tabs a { padding: 9px 14px; font-weight: 550; color: var(--ink2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; } .tabs a.on { color: var(--brand-d); border-color: var(--brand); }
.totrow td { background: #FAFBFC; font-weight: 650; border-top: 1px solid var(--line); }

/* Camas */
.beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bed { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px 12px; min-height: 104px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; border-left: 4px solid #C8D1DC; transition: box-shadow .12s; }
.bed:hover { box-shadow: 0 4px 14px rgba(14, 27, 44, .09); }
.bed.ocupada { border-left-color: var(--brand); } .bed.limpieza { border-left-color: #E0A11B; background: #FFFDF7; } .bed.reservada { border-left-color: var(--blue); background: #FAFCFF; } .bed.libre { background: #FBFCFD; }
.bed .id { font-weight: 680; font-size: 13px; } .bed .nm { font-weight: 600; line-height: 1.25; } .bed .ft { margin-top: auto; display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); }

/* Agenda */
.ag { display: grid; grid-template-columns: 64px 1fr; } .ag .h { padding: 12px 0 0 14px; color: var(--ink3); font-size: 12.5px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line2); } .ag .s { border-bottom: 1px solid var(--line2); border-left: 1px solid var(--line2); padding: 6px 10px; min-height: 46px; display: flex; gap: 8px; flex-wrap: wrap; }
.cita { border-radius: 8px; padding: 6px 10px; background: var(--brand-s); border-left: 3px solid var(--brand); min-width: 220px; cursor: pointer; } .cita.en_espera { background: var(--amber-s); border-color: #E0A11B; } .cita.atendido { background: var(--line2); border-color: #B5C0CE; color: var(--ink2); } .cita b { display: block; font-weight: 600; }

/* Kanban seguros */
.kan { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.kcol { background: #EBEFF4; border-radius: 12px; padding: 10px; } .kcol > header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 650; font-size: 13px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 6px; } .kcard b { font-weight: 600; } .kcard .chip { align-self: flex-start; } .kcard .m { font-size: 17px; font-weight: 680; font-variant-numeric: tabular-nums; }

/* Modal */
#modal { position: fixed; inset: 0; background: rgba(13, 35, 56, .45); display: none; place-items: center; z-index: 100; padding: 20px; } #modal.on { display: grid; }
.mod { background: #fff; border-radius: 14px; box-shadow: var(--sh2); width: 560px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; } .mod.w { width: 780px; } .mod.xw { width: 940px; }
.mod > header { padding: 16px 20px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 10px; } .mod > header h2 { font-size: 16px; }
.mod > .body { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; } .mod > footer { padding: 14px 20px; border-top: 1px solid var(--line2); display: flex; gap: 10px; justify-content: flex-end; align-items: center; background: #FAFBFC; border-radius: 0 0 14px 14px; }
.steps { display: flex; gap: 6px; } .steps span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink3); padding: 4px 10px 4px 4px; border-radius: 20px; background: var(--bg); } .steps i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; border: 1px solid var(--line); } .steps .on { background: var(--brand-s); color: var(--brand-d); } .steps .on i { background: var(--brand); color: #fff; border-color: var(--brand); } .steps .done i { background: var(--green); color: #fff; border-color: var(--green); }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .pay button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; } .pay button.on { border-color: var(--brand); background: var(--brand-s); color: var(--brand-d); }
.big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: 13.5px; } .kv span:nth-child(odd) { color: var(--ink2); } .kv span:nth-child(even) { font-variant-numeric: tabular-nums; text-align: right; font-weight: 550; } .kv .tt { font-weight: 700; font-size: 15px; border-top: 1px solid var(--line); padding-top: 7px; color: var(--ink) !important; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--sh2); font-weight: 500; opacity: 0; transition: .2s; z-index: 200; display: flex; gap: 9px; align-items: center; pointer-events: none; } #toast.on { opacity: 1; transform: translateX(-50%); }

/* Proforma tipo planilla */
.sheet td, .sheet th { border-right: 1px solid var(--line2); padding: 0; } .sheet td > div, .sheet th > div { padding: 8px 10px; } .sheet input.cell { border: 0; width: 100%; padding: 8px 10px; background: transparent; outline: none; } .sheet input.cell:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--brand); } .sheet td.ck { text-align: center; width: 92px; }
.sw { width: 34px; height: 20px; border-radius: 20px; background: #C8D1DC; position: relative; cursor: pointer; display: inline-block; vertical-align: middle; transition: .15s; } .sw::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); } .sw.on { background: var(--brand); } .sw.on::after { left: 16px; }

/* Consulta dictada */
.rec { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 8px var(--red-s); } .rec.on { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(190, 51, 41, .12); } }
.wave { display: flex; gap: 3px; align-items: center; height: 34px; } .wave i { width: 3px; background: var(--red); border-radius: 3px; animation: wv 1s infinite ease-in-out; } @keyframes wv { 0%, 100% { height: 6px; } 50% { height: 30px; } }
.ia { border: 1px solid #D9D0F3; background: linear-gradient(180deg, #FBFAFF, #fff); } .ia > header { border-color: #EAE4F8; }
.note { white-space: pre-wrap; line-height: 1.6; } .rx { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.bars { display: flex; flex-direction: column; gap: 9px; } .bars .b { display: grid; grid-template-columns: 150px 1fr 96px; gap: 10px; align-items: center; font-size: 13px; } .bars .b .bar { height: 14px; border-radius: 5px; } .bars .b .bar i { border-radius: 5px; }
.protobar { background: #FFF7DF; border-bottom: 1px solid #F0DDA6; color: #6B4E06; font-size: 12px; padding: 4px 22px; text-align: center; flex: none; }
@media print { .side, .top, .protobar, .noprint { display: none !important; } #app { display: block; height: auto; } .main { height: auto; } .content { overflow: visible; padding: 0; } .banner { position: static; } .pg { grid-template-columns: 1fr; } body { background: #fff; } }
@media (max-width: 1180px) { #app { grid-template-columns: 64px 1fr; } .side .lbl, .logo div, .side h3, .side .foot, .nav .cnt { display: none; } .nav a { justify-content: center; } .pg { grid-template-columns: 1fr; } .kan { grid-template-columns: repeat(5, 240px); overflow: auto; } .g4 { grid-template-columns: 1fr 1fr; } }

.cta td, .cta th { padding-left: 9px; padding-right: 9px; } .cta td.sv { min-width: 200px; } .cta td .t2 { white-space: normal; } .cta .seg.xs button { padding: 2px 7px; }
.scroll { overflow-x: auto; }
.top > .sp { display: none; }

/* separación de funciones: cada puesto ve solo sus acciones */
body:not([data-rol=caja]) [data-a=cobrarModal], body:not([data-rol=caja]) [data-a=depModal], body:not([data-rol=caja]) .pg [data-a=alta], body:not([data-rol=caja]) .alert [data-a=alta] { display: none !important; }
body:not([data-rol=caja]) [data-a=devolver] { display: none !important; }
body:not([data-rol=recepcion]):not([data-rol=medico]) .add, body:not([data-rol=recepcion]) [data-a=anularModal] { display: none !important; }
body:not([data-rol=recepcion]):not([data-rol=seguros]) [data-a=pagadorModal] { display: none !important; }
body:not([data-rol=recepcion]):not([data-rol=seguros]) .cta .seg button, body:not([data-rol=recepcion]) .hon { pointer-events: none; }
body[data-rol=medico] .drop .num { display: none; }
body[data-rol=medico] .top .row.sm.muted { visibility: hidden; }

/* mejoras */
.aud > header svg, .ordp > header svg { color: var(--brand-d); } .ordp { border-color: #F1DCAE; } .ordp > header { background: #FFFBF1; border-radius: var(--r) var(--r) 0 0; }
.edsel { padding: 10px 8px 12px; } .edsel .pres { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #9FD9D5; font-weight: 550; font-size: 13.5px; background: rgba(25, 181, 172, .1); } .edsel .pres:hover, .edsel .pres.on { background: rgba(25, 181, 172, .2); color: #fff; }
.edsel .seg { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); width: 100%; } .edsel .seg button { flex: 1; color: #C9D5E3; } .edsel .seg button.on { background: #19B5AC; color: #05302E; box-shadow: none; }
.side .foot { margin-top: 0; } .side .nav { margin-bottom: auto; }
body[data-ed=esencial] .nav a[href="#/agenda"], body[data-ed=esencial] .nav a[href="#/consulta"], body[data-ed=esencial] .nav a[href="#/conciliacion"], body[data-ed=esencial] .ia, body[data-ed=esencial] a.btn[href="#/consulta"], body[data-ed=esencial] [data-a=citaModal], body[data-ed=esencial] a[href="#/agenda"] { display: none !important; }
.mc { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.phone { border: 9px solid #0D2338; border-radius: 30px; background: #F3F5F8; overflow: hidden; box-shadow: var(--sh2); } .ph-top { background: var(--brand); color: #fff; padding: 14px 14px 12px; display: flex; flex-direction: column; } .ph-top span { font-size: 12px; opacity: .85; }
.ph-body { padding: 10px; max-height: 430px; overflow: auto; font-size: 13px; } .ph-card { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--sh); } .ph-day { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; margin: 12px 4px 5px; }
.ph-row { background: #fff; padding: 8px 10px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line2); } .ph-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero { text-align: center; padding: 34px 20px 30px; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: center; } .hero h1 { font-size: 32px; line-height: 1.18; letter-spacing: -.03em; } .hero p { color: var(--ink2); font-size: 16px; max-width: 700px; }
.pil { padding: 20px; display: flex; flex-direction: column; gap: 9px; } .pi { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-s); color: var(--brand-d); display: grid; place-items: center; flex: none; }
.pil ul { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; } .pil li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; } .pil li svg { color: var(--green); flex: none; margin-top: 2px; } .pil .btn { align-self: flex-start; }
@media (max-width: 1180px) { .mc { grid-template-columns: 1fr; } .edsel .seg { display: none; } }

.fac { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; } .fac table td, .fac table th { padding: 7px 8px; font-size: 13px; }

/* caja y seguros no ven honorarios; solo caja cierra su caja */
body[data-rol=caja] .cta th:nth-child(7), body[data-rol=caja] .cta tr:not(.totrow) td:nth-child(7), body[data-rol=seguros] .cta th:nth-child(7), body[data-rol=seguros] .cta tr:not(.totrow) td:nth-child(7) { display: none; }
body:not([data-rol=caja]) [data-a=cierreCaja], body:not([data-rol=caja]) [data-a=abrirCaja] { display: none !important; }
/* WhatsApp */
.wagrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.waph { position: sticky; top: 0; } .wachat { background: #ECE5DD; padding: 12px 10px; height: 560px; overflow: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.wm { display: flex; flex-direction: column; max-width: 88%; flex: none; } .wm.ent { align-self: flex-start; } .wm.out { align-self: flex-end; }
.wb { background: #fff; border-radius: 10px; padding: 8px 10px 6px; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); line-height: 1.4; } .wm.out .wb { background: #DCF8C6; } .wh { display: block; text-align: right; font-size: 10.5px; color: #8696A0; margin-top: 2px; }
.wbt { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; } .wbt button { background: #fff; border: 0; border-radius: 10px; padding: 9px; color: #027EB5; font-weight: 600; cursor: pointer; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); font-size: 13.5px; } .wbt button:hover { background: #F5FAFD; } .wau { font-family: monospace; letter-spacing: -1px; color: #075E54; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  #app { display: block; height: auto; } .main { height: auto; min-height: 100vh; padding-bottom: 74px; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; flex-direction: row; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .1); }
  .side .logo, .side h3, .side .foot, .side .edsel { display: none !important; }
  .side .nav { display: flex; flex: 1; margin: 0; overflow-x: auto; scrollbar-width: none; } .side .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 1 0 68px; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 10.5px; text-align: center; justify-content: center; position: relative; line-height: 1.15; } .nav.muchos a { flex-basis: 74px; }
  .nav a .lbl { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72px; } .nav a.on { box-shadow: inset 0 3px 0 #19B5AC; }
  .nav a .cnt { display: block !important; position: absolute; top: 2px; right: 50%; margin-right: -24px; font-size: 10px; padding: 0 5px; }
  .protobar { font-size: 11px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top { height: auto; padding: 8px 12px; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; } .top .search { flex: 1 1 100%; max-width: none; order: 2; margin: 0; } .search kbd { display: none; } .search input { height: 42px; font-size: 16px; }
  .top > .row.sm.muted { display: none; } .top select.in { flex: 1; order: 1; height: 38px; } .top > .row:last-child { order: 1; } .top > .row:last-child .sm { display: none; }
  .content { overflow: visible; padding: 14px 12px 24px; }
  .head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; } .head .row { flex-wrap: wrap; } .head .btn { flex: 1; justify-content: center; } .head kbd { display: none; } h1 { font-size: 20px; }
  .g2, .g3, .g4, .pg, .wagrid, .mc, .kan { grid-template-columns: 1fr !important; } .grid.g4 { grid-template-columns: 1fr 1fr !important; gap: 8px; } .kpi { padding: 11px 12px; } .kpi .v { font-size: 19px; }
  .btn { height: 42px; } .btn.sm { height: 36px; } .in { height: 44px; font-size: 16px; }
  .card > header { flex-wrap: wrap; padding: 12px 14px; } .card { overflow-x: auto; } .card table { min-width: 560px; } .card table.cta, .card .list table, .mod table.nomin { min-width: 0; }
  .list .li { flex-wrap: wrap; padding: 11px 14px; row-gap: 8px; } .list .li .sp { display: none; } .list .li > .av, .list .li > .chip, .list .li > b:first-child { flex: none; } .list .li > div:not(.av):not(.sp):not(.num):not(.row) { flex: 1 1 55%; min-width: 0; }
  .banner { position: static; flex-wrap: wrap; padding: 14px; gap: 10px; } .banner .av.lg { width: 40px; height: 40px; font-size: 14px; } .banner .who { flex: 1; } .banner .who h1 { font-size: 17px; }
  .banner .tot { margin: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .banner .tot div { border: 0; background: var(--bg); border-radius: 9px; padding: 8px 10px; text-align: left; } .banner .tot .v { font-size: 17px; }
  .banner .sp { display: none; } .banner > .row { width: 100%; } .banner > .row .btn { flex: 1; justify-content: center; }
  .alert { flex-wrap: wrap; } .alert > div { flex: 1 1 70%; } .alert .btn { margin: 4px 0 0 28px; }
  .tabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; } .tabs a { padding: 10px 12px; }
  .add { grid-template-columns: 1fr 70px !important; } .add #svc { grid-column: 1 / -1; } .add .btn { grid-column: 1 / -1; justify-content: center; } .add .drop { left: 8px; right: 8px; width: auto; top: 58px; }
  /* la cuenta se lee como tarjetas */
  .cta thead { display: none; } .cta, .cta tbody { display: block; } .cta tr { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "sv sv tot" "pg ho del"; gap: 6px 10px; padding: 11px 14px; border-bottom: 1px solid var(--line2); align-items: center; }
  .cta td { padding: 0 !important; border: 0 !important; background: none !important; } .cta td:nth-child(1), .cta td:nth-child(3), .cta td:nth-child(4), .cta td:nth-child(8) { display: none; }
  .cta td.sv { grid-area: sv; min-width: 0; } .cta td:nth-child(5) { grid-area: tot; font-size: 15px; } .cta td:nth-child(6) { grid-area: pg; } .cta td:nth-child(7) { grid-area: ho; text-align: right; } .cta td:nth-child(9) { grid-area: del; }
  .cta tr.totrow { display: block; background: #FAFBFC; } .cta tr.totrow td { display: inline !important; } .cta tr.totrow td:nth-child(2) { float: right; } .cta tr.totrow td:nth-child(3) { display: block !important; margin-top: 4px; }
  .beds { grid-template-columns: 1fr 1fr; gap: 8px; } .bed { min-height: 92px; padding: 9px 10px; }
  .ag { grid-template-columns: 48px 1fr; } .cita { min-width: 0; flex: 1 1 100%; }
  .kan { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; } .kcol { flex: 0 0 84%; scroll-snap-align: start; }
  #modal { padding: 0; place-items: end center; } .mod, .mod.w, .mod.xw { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; } .mod { max-width: 100vw; overflow: hidden; } .mod > .body { padding: 16px; overflow-x: hidden; } .mod > .body > * { min-width: 0; max-width: 100%; } .mod .list .li { flex-wrap: nowrap; } .mod .list .li > div { flex: 1 1 auto !important; } .mod > footer { flex-wrap: wrap; border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); } .mod > footer .btn { flex: 1; justify-content: center; } .mod > footer .sp { display: none; }
  .steps { overflow-x: auto; scrollbar-width: none; } .steps span { white-space: nowrap; } .pay { gap: 6px; } .pay button { padding: 10px 4px; } .big { font-size: 26px; } .mod .row { flex-wrap: wrap; }
  .mod table { min-width: 520px; } .mod .body > table, .fac { display: block; overflow-x: auto; } .sheet { min-width: 640px; }
  .hero { padding: 18px 4px; } .hero h1 { font-size: 23px; } .hero p { font-size: 14.5px; } .hero .row { flex-direction: column; align-self: stretch; } .hero .btn { justify-content: center; }
  .bars .b { grid-template-columns: 96px 1fr 76px; gap: 6px; font-size: 12px; } .waph { position: static; } .wachat { height: 460px; } .phone { max-width: 340px; margin: 0 auto; width: 100%; }
  #toast { left: 12px; right: 12px; transform: translateY(20px); bottom: 84px; } #toast.on { transform: none; }
  .seg { max-width: 100%; overflow-x: auto; } .kv { grid-template-columns: 1fr auto; }
}

.sw { flex: none; }
