/* Panel de administracion nuevo. Mismo lenguaje que my-nuevo: tarjetas redondeadas y el color de marca de cada empresa en variables. */
:root {
  --brand: #7460ee; --brand-d: #5a47c9; --brand-l: #ece9fd; --brand-dd: #2b2450;
  --bg: #f6f5fd; --card: #fff; --text: #1d1b2e; --muted: #7a7790; --line: #e8e6f4;
  --ok: #1f9d6b; --bad: #d94a4a; --bad-l: #fde8e8; --warn: #b7791f;
  --r: 16px; --side: 232px; --bar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --login-btn: #b9b0f6;
}
@supports (color: color-mix(in srgb, red, blue)) { :root { --login-btn: color-mix(in srgb, var(--brand) 50%, #fff); } }
/* Modo oscuro: oculto por ahora (nunca se aplica solo; nada pone data-theme="dark"). Puede volver como ajuste mas adelante. */
:root[data-theme="dark"] { --bg: #14121f; --card: #1e1b2f; --text: #f1eff9; --muted: #9a97b3; --line: #2d2a44; --brand-l: #2b2650; --bad-l: #3a1f27; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 22px; margin: 0; font-weight: 600; } h2 { font-size: 15px; margin: 0; font-weight: 600; }
p { margin: 0 0 10px; } a { color: var(--brand); text-decoration: none; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); } .sm { font-size: 12px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 60px auto; animation: sp .7s linear infinite; } @keyframes sp { to { transform: rotate(360deg); } }

/* botones y campos */
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 14px; font-weight: 600; background: var(--brand); color: #fff; }
.btn.ghost { background: var(--brand-l); color: var(--brand-d); } .btn[disabled] { opacity: .55; }
.btn.sm { display: inline-block; width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn.sm.icon { padding: 4px 8px; font-size: 14px; line-height: 1; }
.field { display: block; margin-bottom: 12px; min-width: 0; } .field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select { height: 48px; } input[type="checkbox"] { height: 18px; }
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7790' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
input { width: 100%; font: inherit; color: var(--text); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* entrar */
body.auth { background: var(--brand-d); }
.login { min-height: 100vh; padding: 48px 24px; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; color: #fff; }
.login img.logo { width: 84px; height: 84px; border-radius: 22px; display: block; margin: 0 auto 20px; box-shadow: 0 0 0 3px rgba(255,255,255,.28), 0 10px 26px rgba(0,0,0,.25); }
.login .logo-text { font-size: 32px; font-weight: 800; margin: 0 0 18px; text-align: center; }
.login h1, .login p.sub { text-align: center; color: #fff; } .login p.sub { opacity: .8; margin: 4px 0 24px; }
.login .field span { color: rgba(255,255,255,.8); }
.login input { background: #fff; color: #1d1b2e; border-color: transparent; }
.login input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.login .btn { background: var(--login-btn); color: var(--brand-dd); margin-top: 26px; }
.login .err { color: #ffd6d6; text-align: center; }

/* estructura: menu lateral en pantalla grande, barra inferior en movil */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; font-weight: 700; font-size: 17px; }
.brand img { width: 30px; height: 30px; border-radius: 9px; } .brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: block; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; }
.nav a svg, .tabs a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { background: var(--bg); } .nav a.on { background: var(--brand-l); color: var(--brand-d); }
.nav a .soon { margin-left: auto; font-size: 10px; background: var(--bg); color: var(--muted); border-radius: 6px; padding: 1px 6px; }
.who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.who .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); display: grid; place-items: center; font-weight: 600; flex: none; }
.who button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 12px; }
main { padding: 22px 28px 40px; min-width: 0; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head .sub { color: var(--muted); font-size: 13px; }
.tabs { display: none; }

/* tarjetas e indicadores */
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 2px rgba(40,30,90,.06), 0 6px 18px rgba(40,30,90,.05); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 1px 2px rgba(40,30,90,.06); }
.stat small { display: block; color: var(--muted); font-size: 12px; } .stat b { display: block; font-size: 24px; font-weight: 600; margin: 2px 0; } .stat em { font-style: normal; color: var(--muted); font-size: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.card .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row .hr { width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; } .row .nm { flex: 1; min-width: 0; } .row .nm small { display: block; color: var(--muted); font-size: 12px; }
.bar { width: 64px; height: 6px; border-radius: 3px; background: var(--brand-l); overflow: hidden; flex: none; } .bar i { display: block; height: 100%; background: var(--brand); }
.bar.full i { background: var(--bad); }
.pill { font-size: 12px; border-radius: 8px; padding: 2px 8px; background: var(--brand-l); color: var(--brand-d); font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; }
.pill.full { background: var(--bad-l); color: var(--bad); }
.row.past { opacity: .5; } .row.now { background: linear-gradient(90deg, var(--brand-l), transparent); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); } .alert:first-of-type { border-top: 0; } .alert .n { flex: 1; }
.alert svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.alert.bad svg { color: var(--bad); } .alert.ok svg { color: var(--ok); } .alert.warn svg { color: var(--warn); }
.dayctl { display: flex; align-items: center; gap: 6px; }
.dayctl button { border: 0; background: var(--card); color: var(--text); border-radius: 10px; width: 34px; height: 34px; box-shadow: 0 1px 2px rgba(40,30,90,.08); }
.dayctl button.t { width: auto; padding: 0 12px; font-size: 13px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.soonbox { max-width: 460px; margin: 40px auto; text-align: center; } .soonbox p { color: var(--muted); }
dialog { border: 0; border-radius: 20px; padding: 22px; background: var(--card); color: var(--text); width: min(92vw, 380px); } dialog::backdrop { background: rgba(10,8,25,.5); }
dialog .row { border: 0; padding: 0; margin-top: 14px; } dialog .btn { margin: 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1d1b2e; color: #fff; padding: 11px 18px; border-radius: 24px; opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); display: grid; place-items: center; font-weight: 600; flex: none; font-size: 14px; overflow: hidden; } .av.big { width: 54px; height: 54px; font-size: 19px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
input[type="search"] { margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.chip { border: 0; background: var(--bg); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.chip.on { background: var(--brand); color: #fff; }
.urow { color: var(--text); } .urow:hover { background: var(--bg); }
.urow .sub { text-align: right; font-size: 13px; max-width: 42%; } .urow .sub small { display: block; color: var(--muted); font-size: 12px; }
.urow .ucol { width: 130px; flex: none; text-align: right; font-size: 13px; color: var(--muted); }
.urow .ucol.narrow { width: 80px; }
.uhead { color: var(--muted); font-size: 12px; padding: 6px 0; }
.uhead .nm, .uhead .sub { font-weight: 400; }
.uhead .ucol.sortable { cursor: pointer; user-select: none; }
.uhead .ucol.sortable:hover { color: var(--text); }
.uhead .ucol .arr { margin-left: 3px; }
.cols3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; height: calc(100vh - 260px); min-height: 320px; }
.cols3 .card.col { display: flex; flex-direction: column; overflow: hidden; }
.cols3 .card.col .ch { flex: none; }
.cols3 .listbox { flex: 1; overflow-y: auto; }
.cols3 .listbox .empty { padding: 20px; }
@media (max-width: 860px) { .cols3 { grid-template-columns: minmax(0, 1fr); height: auto; } .cols3 .listbox { max-height: 280px; } }
.row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pill.ok { background: #dff5ea; color: #137a52; } .pill.bad { background: var(--bad-l); color: var(--bad); }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; } .fhead b { font-size: 18px; }
.fhead .who { display: flex; align-items: center; gap: 14px; min-width: 0; border-top: 0; padding-top: 0; }
.quickacts { display: flex; gap: 8px; flex: none; }
.iconbtn { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; flex: none; cursor: pointer; }
.iconbtn svg { width: 15px; height: 15px; }
.iconbtn:hover { background: var(--brand-l); color: var(--brand-d); border-color: var(--brand-l); }
.iconbtn.wa { background: #25d366; color: #fff; border-color: #25d366; }
.iconbtn.wa:hover { background: #1fb858; border-color: #1fb858; }
.nmrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.statuspill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px 3px 8px; background: #dff5ea; color: #137a52; }
.statuspill .dot { width: 6px; height: 6px; border-radius: 50%; background: #1f9d6b; }
.statuspill.bad { background: var(--bad-l); color: var(--bad); } .statuspill.bad .dot { background: var(--bad); }
.tabsrow { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
/* Tira de pestañas con subrayado (ficha del socio): una sola barra de navegación en vez de píldoras sueltas; si no caben todas, hace scroll horizontal en vez de partirse en dos líneas. */
.utabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; }
.utabs::-webkit-scrollbar { display: none; }
.utab { flex: none; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; padding: 10px 2px 11px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.utab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--brand); }
.utab:hover:not(.on) { color: var(--text); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } .cols2 h2 { margin-bottom: 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 12px; } dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
/* Edicion in-place de un campo suelto (ficha): el valor es el control, sin icono ni dialogo aparte. */
.editable { cursor: pointer; border-bottom: 1px dashed var(--muted); }
.editable:hover, .editable:focus-visible { color: var(--brand-d); border-bottom-color: var(--brand-d); outline: none; }
.editable .pencil-ic { color: var(--muted); }
.editable:hover .pencil-ic, .editable:focus-visible .pencil-ic { color: var(--brand-d); }
.editable.muted { cursor: default; border-bottom-color: transparent; }
.editable.muted .pencil-ic { display: none; }
.edit-row { grid-column: 1 / -1; display: none; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 2px 0 4px; }
.edit-row.on { display: flex; }
.edit-row select, .edit-row input[type="date"] { font: inherit; border: 1.5px solid var(--line); border-radius: 9px; padding: 7px 10px; background: var(--card); color: var(--text); height: auto; }
.edit-row p { margin: 0; flex: 1 1 100%; color: var(--muted); font-size: 13px; }
.edit-row .err { margin: 0; flex: 1 1 100%; min-height: 0; }
.edit-row .sp { flex: 1; }
.edit-row .btnrow { display: flex; gap: 8px; }
.filters { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.fgrp { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; } .chk input { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); }
.dd { position: relative; } .dd summary { list-style: none; cursor: pointer; background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: 13px; } .dd summary::-webkit-details-marker { display: none; }
.dd[open] summary { background: var(--brand-l); color: var(--brand-d); }
.ddp { position: absolute; z-index: 8; top: 40px; left: 0; width: 300px; max-height: 360px; overflow: auto; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: 0 10px 30px rgba(40,30,90,.2); display: flex; flex-direction: column; gap: 8px; }
.ddp h3 { margin: 6px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; } .ddq { display: flex; gap: 6px; flex-wrap: wrap; } .ddq .chip { padding: 5px 10px; font-size: 12px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
select { width: 100%; font: inherit; color: var(--text); background-color: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 38px 12px 14px; }
dialog.wide { width: min(94vw, 520px); max-height: 92vh; overflow: auto; }
.tsum { background: var(--brand-l); border-radius: 12px; padding: 10px 12px; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; } .tsum .lb { display: inline-block; width: 46px; font-size: 12px; color: var(--muted); }
.tlab { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; } .seg button { flex: 1; border: 0; background: none; color: var(--text); border-radius: 9px; padding: 9px 6px; font-size: 14px; } .seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(40,30,90,.18); font-weight: 600; color: var(--brand-d); }
.tlist { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.tcard { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--text); border-radius: 12px; padding: 10px 12px; }
.tcard.on { border-color: var(--brand); background: var(--brand-l); } .tcard .tn { font-weight: 500; } .tcard .tn em { font-style: normal; font-size: 11px; background: var(--bg); color: var(--muted); border-radius: 6px; padding: 1px 6px; margin-left: 8px; } .tcard .tp { white-space: nowrap; font-size: 13px; } .tcard .tp b { font-size: 15px; }
.tsep { font-size: 12px; color: var(--muted); margin: 8px 2px 2px; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.nbody { overflow-wrap: anywhere; } .nbody p { margin: 0 0 4px; } .nbody img { max-width: 100%; }
.caps { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow: auto; padding: 4px 2px; }
.inbox2 { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ilist { min-width: 0; } .rows { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; background: none; color: var(--text); padding: 11px 12px; } .mrow + .mrow { border-top: 1px solid var(--line); }
.mrow:hover { background: var(--bg); } .mrow.on { background: var(--brand-l); border-left-color: var(--brand); }
.mrow .mtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mtxt b, .msub, .mprev { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mtxt b { font-weight: 600; } .mprev { color: var(--muted); font-size: 13px; }
.mwhen { flex: none; color: var(--muted); font-size: 12px; padding-top: 2px; }
.ipane { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.mpHead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .mpSubj { font-size: 18px; margin: 0 0 12px; color: var(--text); }
.mbody2 { overflow-wrap: anywhere; line-height: 1.55; } .mbody2 h4 { margin: 0 0 8px; } .mbody2 p { margin: 0 0 10px; } .mbody2 img { max-width: 100%; }
.mback { display: none; margin-bottom: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; } .pager .chip[disabled] { opacity: .4; cursor: default; }
.lfil { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; } .lfil input[type="search"] { margin: 0; flex: 1 1 220px; } .ldate { display: flex; flex-direction: column; } .ldate input { width: 160px; }
.cnt { opacity: .65; font-size: 11px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.lbox { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dayh { background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 7px 14px; } .lbox > .dayh:not(:first-child) { border-top: 1px solid var(--line); }
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); } .dayh + .lrow { border-top: 0; }
.lico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-l); color: var(--brand-d); } .lico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lico.creada { background: #dff5ea; color: #137a52; } .lico.eliminada { background: var(--bad-l); color: var(--bad); } .lico.otros { background: var(--bg); color: var(--muted); }
.ltxt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ltxt b { font-weight: 600; } .ltxt span, .ltxt small { overflow-wrap: anywhere; } .ltxt small { color: var(--muted); font-size: 12px; }
.nform { max-width: 720px; } textarea { width: 100%; font: inherit; color: var(--text); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; } textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.edbar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; } .edbar button { border: 0; background: var(--bg); color: var(--text); border-radius: 9px; padding: 7px 12px; font-size: 13px; }
.editor { min-height: 180px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); overflow-wrap: anywhere; } .editor:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); } .editor:empty::before { content: attr(data-ph); color: var(--muted); }
.pusers { border: 1px solid var(--line); border-radius: 14px; max-height: 320px; overflow: auto; margin-bottom: 10px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); cursor: pointer; } .prow:first-child { border-top: 0; } .prow.head { position: sticky; top: 0; background: var(--card); z-index: 1; } .prow input { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); flex: none; }
.ptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ptxt small { color: var(--muted); font-size: 12px; }
.pill.warn { background: #fff3e0; color: #b4630c; }
.sbtns { display: inline-flex; gap: 4px; flex: none; } .sbtn { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-size: 15px; padding: 0; }
.sbtn.ok.on { background: #dff5ea; border-color: #137a52; color: #137a52; } .sbtn.bad.on { background: var(--bad-l); border-color: var(--bad); color: var(--bad); } .sbtn.del:hover { border-color: var(--bad); }
.rlist { border: 1px solid var(--line); border-radius: 12px; max-height: 280px; overflow: auto; } .rit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); padding: 9px 12px; } .rit:first-child { border-top: 0; } .rit:hover { background: var(--bg); }
.dayctl input[type="date"] { height: 34px; width: 150px; padding: 0 8px; border-radius: 10px; border: 0; box-shadow: 0 1px 2px rgba(40,30,90,.08); }
.calchips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; white-space: nowrap; } .calchips .chip { flex: none; }
.ctrchips .chip { font-weight: 600; padding: 9px 18px; } .ctrchips { margin-bottom: 4px; }
.ctrchips .chip, .subchips .chip { background: transparent; border: 1.5px solid var(--line); } .ctrchips .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; } .subchips .chip.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); }
.weekbar { padding: 12px; margin-bottom: 14px; } .wtop { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .wtop b { font-size: 15px; min-width: 0; } .wtop input[type="date"] { height: 34px; width: 150px; padding: 0 8px; border-radius: 10px; }
.dayctlb { border: 0; background: var(--bg); color: var(--text); border-radius: 10px; width: 34px; height: 34px; }
.week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: var(--bg); color: var(--text); border-radius: 12px; padding: 8px 2px; } .wd small { color: var(--muted); font-size: 11px; font-weight: 600; } .wd b { font-size: 17px; } .wd em { font-style: normal; font-size: 11px; color: var(--muted); min-height: 14px; }
.wd.today b { color: var(--brand-d); } .wd.closed { opacity: .55; } .wd.sel { background: var(--brand); color: #fff; } .wd.sel small, .wd.sel em, .wd.sel b { color: #fff; }
.dayhead { display: flex; align-items: baseline; gap: 12px; margin: 4px 2px 10px; flex-wrap: wrap; }
.slotc { margin-bottom: 12px; } .slothead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; } .shr { font-size: 20px; font-variant-numeric: tabular-nums; }
.mrowb { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; } .mrowb:hover { background: var(--bg); }
.dayctlb[disabled] { opacity: .4; }
.bchart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 8px 2px 0; margin: 8px 0 16px; }
.bcol { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; } .bcol i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: var(--brand); opacity: .85; } .bcol:hover i { opacity: 1; } .bcol small { font-size: 10px; color: var(--muted); }
.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; } .tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 9px 12px; background: var(--bg); white-space: nowrap; position: sticky; top: 0; } .tbl td { text-align: right; padding: 9px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); } .tbl th:first-child { background: var(--bg); } .tbl tbody tr:hover td { background: var(--bg); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 6px; }
.scard { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; } .scard .sh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.sgrid.one { grid-template-columns: minmax(0, 1fr); } .srow { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); } .srow:first-of-type { border-top: 0; } .srow b { font-variant-numeric: tabular-nums; } .srow.sub { padding-left: 14px; color: var(--muted); font-size: 13px; border-top: 0; padding-top: 0; }
.tbl.tfix { table-layout: fixed; } .tbl.tfix th { overflow: hidden; text-overflow: ellipsis; } .tbl.tfix td { overflow: hidden; text-overflow: ellipsis; }
.tbl .cx { color: var(--muted); font-size: 13px; } .tbl tr.tfoot td { font-weight: 600; background: var(--bg); }
.srow .sl { flex: 0 1 280px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sbar { flex: 1; height: 8px; border-radius: 4px; background: var(--brand-l); overflow: hidden; } .srow.sub .sbar { background: none; } .sbar i { display: block; height: 100%; background: var(--brand); } .spc { width: 52px; text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; } .srow b { width: 64px; text-align: right; }
.inbox2.trf { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); }
.qrow { padding: 10px 0; border-top: 1px solid var(--line); } .qrow:first-of-type { border-top: 0; } .qh { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; } .qlim { color: var(--brand-d); font-weight: 600; }
.tsec { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; font-weight: 600; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; } .pgrid .stat { background: var(--bg); box-shadow: none; padding: 10px 12px; } .pgrid .stat b { font-size: 18px; }
.acc { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); } .acc span { color: var(--muted); font-size: 13px; }
.tbl td .muted { white-space: normal; } .tbl.tfix2 td, .tbl.tfix2 th { text-align: left; white-space: normal; }
.ptab { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; } .pt { display: grid; grid-template-columns: minmax(0, 1fr) 100px 110px 110px; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); } .pt:first-child { border-top: 0; }
.pt.head { background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px; } .pt .r { text-align: right; justify-self: end; } .pt .nm small { display: block; color: var(--muted); font-size: 12px; } .pt b.r { font-variant-numeric: tabular-nums; }
.pt .pnote { grid-column: 1 / -1; background: #fff6bf; color: #5c4a00; border-left: 3px solid #e5c100; border-radius: 6px; padding: 6px 10px; font-size: 12.5px; margin-top: -2px; box-shadow: 0 1px 2px rgba(80,60,0,.12); } .pt .pnote a { color: #5c4a00; font-weight: 600; text-decoration: underline; }
:root[data-theme="dark"] .pt .pnote { background: #3d3408; color: #f3e3a0; border-left-color: #b89a00; } :root[data-theme="dark"] .pt .pnote a { color: #f3e3a0; }
.pt.flash { animation: flashbg 1.6s ease-out; } @keyframes flashbg { 0% { background: #fff0a0; } 100% { background: transparent; } }
.urowlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); }
.racts { display: flex; gap: 6px; flex: none; }
.hform { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; } .hform .field { margin-bottom: 0; }
.hcal { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 8px 0; } .hmon { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; } .hmt { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; } .hgrid small { color: var(--muted); font-size: 11px; padding: 2px 0; }
.hd { border: 0; background: none; color: var(--text); border-radius: 50%; width: 100%; aspect-ratio: 1; font-size: 13px; padding: 0; } .hd:hover { background: var(--bg); } .hd.hol { background: #e53935; color: #fff; font-weight: 600; } .hd.today { box-shadow: inset 0 0 0 2px var(--brand); } .hd.sel { outline: 2px solid var(--brand-d); }
.hrow { grid-template-columns: minmax(0, 1fr) auto; }
.hcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .hcard.warn { background: #fff8e1; border-color: #f0d98a; color: #5c4a00; }
.sdates select { height: 36px; width: auto; padding: 0 28px 0 8px; font-size: 14px; }
.hbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; } .seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; } .seg button { border: 0; background: none; color: var(--text); border-radius: 9px; padding: 8px 14px; font-size: 14px; } .seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(40,30,90,.18); font-weight: 600; color: var(--brand-d); }
.sch7 { margin-top: 6px; }
.slr { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 8px 6px; border-top: 1px solid var(--line); } .slr label { flex: 1 1 100px; min-width: 90px; } .slr .sltx { flex: 2 1 160px; } .slr .slb { flex: 0 0 auto; }
.slr.new { background: #e8f5e9; box-shadow: inset 4px 0 0 #43a047; border-radius: 8px; } .slr label small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; } .slr input { height: 40px; padding: 0 8px; } .slb { display: flex; gap: 4px; } .slw { flex: 1 1 100%; color: var(--bad); font-size: 12px; }
.okm { color: #137a52; font-size: 13px; margin: 4px 0; } .cpd { position: relative; } .cpd summary { cursor: pointer; list-style: none; } .cpd .ddp { right: 0; left: auto; top: 36px; width: 200px; }
@media (max-width: 860px) {
  .layout { display: block; } .side { display: none; }
  main { padding: calc(14px + var(--safe-t)) 14px calc(var(--bar) + var(--safe-b) + 20px); }
  .inbox2 { grid-template-columns: minmax(0, 1fr); } .inbox2 .ipane { display: none; position: static; max-height: none; } .inbox2.reading .ilist { display: none; } .inbox2.reading .ipane { display: block; } .mback { display: inline-block; }
  .pt { grid-template-columns: minmax(0, 1fr) auto; } .pt.head { display: none; } .pt .nm { grid-column: 1 / -1; } .pt .r:last-child { grid-column: 1 / -1; justify-self: start; }
  .cols2 { grid-template-columns: minmax(0, 1fr); } .urow .sub { display: none; } .urow .ucol { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(8px + var(--safe-b)); height: var(--bar); background: var(--card); border-radius: 999px; box-shadow: 0 6px 24px rgba(40,30,90,.18); z-index: 6; }
  .tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; } .tabs a.on { color: var(--brand-d); }
  #toast { bottom: calc(var(--bar) + var(--safe-b) + 24px); }
}

/* Hoja de pruebas de cobro */
.pruebas h2 { font-size: 20px; margin: 4px 0; } .pruebas h3 { font-size: 15px; margin: 18px 0 6px; }
.pcmp .pt { grid-template-columns: 1.3fr .7fr 1.2fr 1.4fr; } .pcmp .pt small { display: block; } .pruebas .pt.head { margin-bottom: 0; }
@media print {
  .side, nav.tabs, .head, .chips, .utabs, .noprint, #dialog, .toast { display: none !important; }
  body, .layout, main, .card { background: #fff !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
  .pruebas { font-size: 11px; } .pruebas .pt { break-inside: avoid; }
}

/* Primer pago de una tarifa de tarjeta y pago pendiente */
.fp { margin-top: 10px; padding: 12px; border: 1px solid var(--line, #e5e5ea); border-radius: 12px; } .fp .renew { margin-top: 8px; font-size: 14px; }
.pendbox { margin: 8px 0 14px; padding: 10px 12px; border-radius: 10px; background: #fff7e0; border: 1px solid #f0d58a; font-size: 14px; }

.tgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .acctab { width: 100%; border-collapse: collapse; font-size: 14px; } .acctab td, .acctab th { padding: 6px 8px; }

.qedit { padding: 10px 0; border-top: 1px solid var(--line, #e5e5ea); } .qeh { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.pcons .pt { grid-template-columns: 1.6fr .8fr .9fr .6fr; } .pcons .pt small { display: block; word-break: break-word; }

/* logo ancho de una empresa (marca con texto) */
.brand img.wide { width: auto; height: auto; max-width: 150px; max-height: 24px; border-radius: 0; object-fit: contain; } .brand.widebrand span { display: none; }
.login img.logo.wide { width: auto; height: auto; max-width: min(280px, 80%); max-height: 56px; border-radius: 0; box-shadow: none; object-fit: contain; margin-bottom: 26px; }

/* Ajustes > Programa del día */
.pgcard { margin-top: 12px; } .pgcard h4 { margin: 0 0 8px; }
.pgsec { margin-bottom: 12px; } .pgsec .pgt { flex: 1; min-width: 0; } .pgsec .btn { width: 48px; flex: none; padding: 0; } .pgsec textarea { width: 100%; margin-top: 8px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); resize: vertical; }
