/* Gestoravia · portal de clientes — misma identidad visual que gestoravia.com */
:root {
  /* Tokens de gestoravia.com */
  --ink: #0A1124; --ink-2: #667085; --text: #3B4658; --line: #E7EAF0; --bg: #fff;
  --lilac: #EEF3FF; --mint: #F6F7F9; --peach: #F6F7F9; --sky: #EEF3FF; --sun: #F6F7F9;
  --cta: #1F5BF5; --cta-h: #1847C9; --blue: #1F5BF5; --navy: #0A1124;
  --wa: #1F5BF5; --wa-bg: #F6F7F9; --wa-me: #1F5BF5;
  --ok: #12805C; --ok-bg: #E8F6EF; --no: #C2283A; --warn: #B45309;
  --c-trim: #1F5BF5; --c-anual: #6D4BC4; --c-rec: #F2A93B; --c-gest: #C2283A; --c-cita: #12805C;
  --serif: "Manrope", "Inter", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--peach); line-height: 1.5; font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: var(--cta); cursor: pointer; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #FFB020; outline-offset: 2px; border-radius: 8px; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.012em; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }
.tiny { font-size: .78rem; }
.upper { text-transform: uppercase; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.kicker:empty { display: none; }
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .5; }

/* ---------- Botones (pill como en la web) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-cta { background: var(--cta); color: #fff; } .btn-cta:hover { background: var(--cta-h); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); } .btn-ghost:hover { border-color: var(--navy); }
.btn-soft { background: var(--lilac); color: var(--cta); }
.btn-danger { background: #fff; color: var(--no); border: 2px solid #F3C9CF; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: .82rem; font-weight: 700; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.2rem; line-height: 1; display: grid; place-items: center; }
.icon-btn:hover { background: var(--lilac); }

/* ---------- Formularios ---------- */
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px #D6E6FC; }
input:disabled { background: var(--sun); color: var(--ink-2); }
label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink); min-width: 0; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
label.check input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; accent-color: var(--cta); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-msg { font-size: .88rem; margin: 0; min-height: 0; }
.form-msg:empty { display: none; }
.error { color: var(--no); } .ok { color: var(--ok); }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; background: linear-gradient(180deg, #F3F7FD 0, #fff 100%); }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 24px 60px rgba(11,42,85,.10); padding: 34px 30px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-logo { width: 200px; height: auto; margin-bottom: 8px; }
.login-title { font-size: 1.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; font-weight: 600; }
.login-foot { font-size: .8rem; color: var(--ink-2); }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; }
.side-logo { width: 168px; height: auto; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; }
.side-body { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 6px 14px 16px; overflow-y: auto; min-height: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a i { font-style: normal; width: 22px; text-align: center; }
.nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--sun); }
.nav a.active { background: var(--lilac); color: var(--cta); }
.label { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.nav-label { padding: 0 12px 6px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-picker { display: flex; flex-direction: column; gap: 8px; }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.search { padding: 9px 12px; font-size: .9rem; background: var(--sun); }
#client-list { list-style: none; max-height: 32vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
#client-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
#client-list li:hover { background: var(--sun); }
#client-list li.active { background: var(--lilac); }
#client-list .cl-txt { flex: 1; min-width: 0; }
#client-list .cl-txt b, #client-list .cl-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#client-list .cl-txt b { font-size: .9rem; font-weight: 600; }
#client-list .cl-txt small { font-size: .75rem; color: var(--ink-2); }
#client-list li.empty-li { color: var(--ink-2); font-size: .85rem; cursor: default; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.me-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-txt { min-width: 0; }
.me-txt b, .me-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt b { font-size: .9rem; } .me-txt small { font-size: .75rem; color: var(--ink-2); }

main { padding: 32px clamp(16px, 3vw, 40px) 100px; display: flex; flex-direction: column; gap: 22px; min-width: 0; max-width: 1240px; width: 100%; }
.topbar-txt { min-width: 0; }
.topbar h1 { overflow-wrap: anywhere; }
.topbar p.muted { margin-top: 4px; }
.view { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ---------- Tarjetas ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.cal-head h3 { text-transform: capitalize; font-family: var(--serif); font-size: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.side-cards { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.stat > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.stat strong { font-family: var(--serif); font-size: 1.75rem; color: var(--navy); line-height: 1.1; overflow-wrap: anywhere; }
.stat small { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--cta); color: #fff; font-size: .72rem; font-weight: 800; font-style: normal; }
.pill-soft { background: var(--lilac); color: var(--cta); }
.chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--lilac); color: var(--cta); white-space: nowrap; }
.chip.recibido { background: #E7F6EE; color: var(--ok); }
.chip.pendiente { background: #FEF3E2; color: var(--warn); }
.chip.confirmada { background: #E7F6EE; color: var(--ok); }
.chip.rechazada, .chip.cancelada { background: #FBE9EC; color: var(--no); }
.empty { text-align: center; padding: 26px 10px; }
.empty p { margin: 4px 0; }
.empty .btn { margin-top: 14px; }

/* ---------- Avatares ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: var(--sky); color: var(--cta); display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; overflow: hidden; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; }

/* ---------- Calendario ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar .dow { font-size: .7rem; text-align: center; color: var(--ink-2); font-weight: 700; padding-bottom: 4px; }
.calendar .day { min-height: 70px; border-radius: 10px; background: var(--sun); padding: 5px; font-size: .75rem; display: flex; flex-direction: column; gap: 2px; overflow: hidden; min-width: 0; }
.calendar .day.out { opacity: .35; }
.calendar .day.today { box-shadow: inset 0 0 0 2px var(--cta); background: #fff; }
.calendar .day .n { font-weight: 700; }
.ev { display: block; font-size: .66rem; line-height: 1.3; padding: 1px 5px; border-radius: 4px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.trimestral { background: var(--c-trim); } .ev.anual { background: var(--c-anual); }
.ev.recordatorio { background: var(--c-rec); color: var(--ink); } .ev.gestor { background: var(--c-gest); }
.ev.cita { background: var(--c-cita); } .ev.cita.pendiente { background: #fff; color: var(--c-cita); box-shadow: inset 0 0 0 1px var(--c-cita); }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2); margin-top: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dot.trimestral { background: var(--c-trim); } .dot.anual { background: var(--c-anual); } .dot.recordatorio { background: var(--c-rec); } .dot.gestor { background: var(--c-gest); } .dot.cita { background: var(--c-cita); }
.cal-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }

.upcoming, .appt-list, .feed { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.upcoming li { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.date-box { text-align: center; background: var(--lilac); border-radius: 12px; padding: 6px 0; line-height: 1.1; color: var(--navy); }
.date-box b { display: block; font-family: var(--serif); font-size: 1.25rem; }
.date-box span { font-size: .66rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.li-main { min-width: 0; }
.li-main > div:first-child { font-weight: 600; overflow-wrap: anywhere; }
.li-sub { font-size: .78rem; color: var(--ink-2); }
.days { font-weight: 700; } .days.soon { color: var(--no); }
.del { border: 0; background: none; color: var(--ink-2); font-size: 1rem; padding: 4px; }
.appt-list li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.appt-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.appt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.appt-list .empty-li { display: block; color: var(--ink-2); border: 0; }
.feed li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; cursor: pointer; }
.feed li:last-child { border-bottom: 0; }
.feed .li-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: center; }
.table .fn { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .who { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.table .who b { display: block; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--sun); }

/* ---------- Subida ---------- */
.uploader { display: flex; flex-direction: column; gap: 12px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #C9D6EA; border-radius: 16px; padding: 24px 16px; text-align: center; background: var(--mint); font-weight: 500; cursor: pointer; transition: .15s; }
.drop.over, .drop:hover { border-color: var(--cta); background: var(--sky); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ico { font-size: 1.4rem; }
.file-list { list-style: none; font-size: .85rem; margin-top: 6px; }
.upload-opts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr) minmax(0, .6fr) minmax(0, 1.4fr) auto; gap: 8px; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: 7px 16px; border-radius: 999px; font-size: .86rem; font-weight: 600; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.select-sm { width: auto; margin-left: auto; padding: 7px 12px; font-size: .86rem; border-radius: 999px; }

/* ---------- Chat estilo WhatsApp (como en la web) ---------- */
.wa { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 420px; border-radius: var(--r); overflow: hidden; box-shadow: 0 24px 60px rgba(23,26,58,.14); border: 1px solid var(--line); }
.wa-head { display: flex; align-items: center; gap: 12px; background: var(--wa); color: #fff; padding: 12px 16px; }
.wa-head .avatar { width: 42px; height: 42px; background: #B9DCD5; color: var(--wa); }
.wa-who { min-width: 0; }
.wa-who b, .wa-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-who small { opacity: .85; font-size: .78rem; }
.wa-body { flex: 1; overflow-y: auto; background: var(--wa-bg); padding: 18px clamp(10px, 3vw, 28px); display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: min(75%, 560px); background: #fff; border-radius: 12px 12px 12px 4px; padding: 7px 10px 5px; font-size: .93rem; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msg.me { align-self: flex-end; background: var(--wa-me); border-radius: 12px 12px 4px 12px; }
.msg time { display: block; text-align: right; font-size: .68rem; color: #667; margin-top: 2px; }
.msg-row { display: flex; align-items: flex-end; gap: 6px; }
.msg-row .avatar { width: 26px; height: 26px; font-size: .62rem; }
.msg-row.me { justify-content: flex-end; }
.day-sep { align-self: center; font-size: .72rem; color: #54656F; background: #E1F2FB; padding: 4px 10px; border-radius: 8px; margin: 8px 0; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.day-sep::first-letter { text-transform: uppercase; }
.wa-form { display: flex; gap: 8px; padding: 10px; background: #F0F2F5; align-items: flex-end; }
.wa-form textarea { resize: none; max-height: 140px; border-radius: 22px; border: 0; padding: 11px 16px; }
.wa-send { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; border: 0; background: var(--wa); color: #fff; font-size: 1.1rem; }

/* ---------- Botón flotante de chat (abajo a la izquierda) ---------- */
.chat-fab { position: fixed; left: calc(272px + 24px); bottom: 20px; z-index: 40; width: 62px; height: 62px; border-radius: 50%; border: 3px solid #fff; background: var(--wa); padding: 0; box-shadow: 0 12px 30px rgba(7,94,84,.35); display: grid; place-items: center; }
.chat-fab .avatar { width: 56px; height: 56px; background: #B9DCD5; color: var(--wa); font-size: 1.1rem; }
.chat-fab::after { content: "💬"; position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--wa); border: 2px solid #fff; display: grid; place-items: center; font-size: .72rem; }
.chat-fab .pill { position: absolute; top: -4px; right: -4px; background: var(--no); }

/* ---------- Mi cuenta ---------- */
.account-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.gestor-box { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.gestor-box .avatar { width: 64px; height: 64px; font-size: 1.3rem; }

/* ---------- Modales ---------- */
dialog { border: 0; border-radius: 24px; padding: 26px; width: min(520px, calc(100vw - 24px)); margin: auto; box-shadow: 0 30px 80px rgba(11,42,85,.25); color: var(--ink); }
dialog::backdrop { background: rgba(11,42,85,.45); }
dialog h3 { font-family: var(--serif); font-size: 1.4rem; }
.cred { background: var(--mint); border: 1px solid var(--line); padding: 14px; border-radius: 14px; font-size: .9rem; display: flex; flex-direction: column; gap: 10px; }
.cred textarea { font-size: .85rem; }
.cred .row-end { justify-content: flex-start; }
.pending { list-style: none; font-size: .85rem; }
.pending li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
code { background: var(--lilac); color: var(--navy); padding: 1px 7px; border-radius: 6px; font-weight: 700; }
.kind-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border: 1.5px solid var(--line); border-radius: 14px; font-size: 1.4rem; cursor: pointer; text-align: center; }
.kind span b { font-size: .82rem; }
.kind input:checked + span { border-color: var(--cta); background: var(--lilac); color: var(--cta); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .upload-opts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .upload-opts input[name=note] { grid-column: 1 / -1; }
  .upload-opts .btn { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: auto; z-index: 30; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-top { padding: 10px 16px; }
  .side-logo { width: 140px; }
  .menu-btn { display: grid; place-items: center; }
  .side-body { display: none; max-height: calc(100vh - 66px); padding-bottom: 20px; }
  .sidebar.open .side-body { display: flex; }
  main { padding: 20px 14px 110px; gap: 16px; }
  .view { gap: 16px; }
  .card { padding: 16px; }
  .stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stats-3 .stat { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .stats-3 .stat > span { flex: 1 0 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .inline-form { grid-template-columns: minmax(0, 1fr); }
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .calendar .day { min-height: 46px; padding: 3px; }
  .ev { font-size: 0; height: 5px; padding: 0; border-radius: 3px; }
  .wa { height: calc(100dvh - 190px); min-height: 380px; margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .msg { max-width: 85%; }
  .table .hide-sm { display: none; }
  .table .fn { max-width: 52vw; }
  .stat strong { font-size: 1.4rem; }
  .upload-opts select[name=category] { grid-column: 1 / -1; }
  .table-wrap { margin: 0; }
  .select-sm { margin-left: 0; }
  .chat-fab { left: 14px; bottom: 14px; }
}

/* Google Drive */
.drive-actions { justify-content: flex-start; margin-top: 12px; }
#drive-txt { font-size: .9rem; }
.chip.off { background: var(--sun); color: var(--ink-2); }
.in-drive { font-size: .72rem; color: var(--ok); font-weight: 700; white-space: nowrap; }

/* ===== Funciones nuevas ===== */
.notice { background: var(--mint); border: 1px solid #CFE0F7; border-radius: 14px; padding: 12px 16px; font-size: .9rem; box-shadow: none; }
.notice.warn { background: #FEF3E2; border-color: #F7D9A8; color: #7A4A06; }
.link-btn { border: 0; background: none; color: var(--cta); font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions .btn { margin-left: 4px; }

/* Apártate */
.top-cards { align-items: start; }
.set-aside { background: linear-gradient(160deg, #0B2A55 0%, #16407A 100%); color: #fff; border: 0; }
.set-aside .icon-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.tax-title { text-align: center; min-width: 0; }
.tax-title .label { color: #B9CCEA; display: block; }
.tax-title b { font-size: .85rem; font-weight: 600; color: #DCE7F7; }
.tax-big { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; text-align: center; margin: 4px 0 14px; letter-spacing: -.02em; }
.tax-rows { display: flex; flex-direction: column; gap: 8px; }
.tax-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .9rem; }
.tax-row small { display: block; color: #B9CCEA; font-size: .74rem; }
.tax-row b { white-space: nowrap; }
.set-aside #tax-note { color: #C9D7EE; margin-top: 10px; }
.set-aside #tax-note a { color: #fff; }
.set-aside .btn-dark { background: #fff; color: var(--navy); }

/* Avisos */
.alert-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--sun); font-size: .88rem; line-height: 1.4; }
.alert[data-goto-alert], .alert[data-amounts], .alert[data-client] { cursor: pointer; }
.alert:hover[data-goto-alert] { filter: brightness(.97); }
.alert .a-ico { flex: 0 0 auto; }
.alert .a-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alert .a-go { color: var(--ink-2); font-weight: 700; }
.alert.danger { background: #FBE9EC; color: #8E1B2A; }
.alert.warn { background: #FEF3E2; color: #7A4A06; }
.alert.info { background: var(--lilac); color: var(--navy); }
.alert.ok { background: #E7F6EE; color: var(--ok); }

/* Alta guiada */
.progress { height: 8px; background: var(--lilac); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.progress span { display: block; height: 100%; background: var(--cta); border-radius: 99px; transition: width .3s; }
.onb-list { list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.onb-list li { display: flex; gap: 12px; align-items: flex-start; }
.onb-list li.done .li-main > div:first-child { color: var(--ink-2); text-decoration: line-through; }
.onb-check { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; border: 2px solid #C9D6EA; background: #fff; color: #fff; font-weight: 800; display: grid; place-items: center; }
.onb-check[data-step] { cursor: pointer; } .onb-check[data-step]:hover { border-color: var(--cta); }
.onb-check:disabled { cursor: default; }
li.done .onb-check { background: var(--ok); border-color: var(--ok); }
.onb-list .li-sub { margin: 2px 0; }
.onb-list a.tiny { font-weight: 700; margin-right: 10px; }
.onb-list .chip { margin-left: 4px; font-size: .68rem; }

/* Facturar */
.inv-form { display: flex; flex-direction: column; gap: 14px; }
.inv-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-weight: 800; font-size: .85rem; padding: 0 6px; }
.table.lines td { padding: 6px 4px; }
.table.lines input, .table.lines select { padding: 8px 10px; font-size: .92rem; }
.table.lines td:nth-child(2) input { width: 70px; } .table.lines td:nth-child(3) input { width: 110px; } .table.lines td:nth-child(4) select { width: 84px; }
.table.lines td:first-child { min-width: 220px; }
.inv-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.inv-totals { display: flex; flex-direction: column; gap: 4px; min-width: 260px; margin-left: auto; order: -1; width: 100%; max-width: 340px; }
.inv-totals div { display: flex; justify-content: space-between; gap: 20px; font-size: .92rem; }
.inv-totals .grand { border-top: 2px solid var(--navy); padding-top: 6px; margin-top: 4px; font-size: 1.15rem; font-family: var(--serif); }
.inv-bottom .row-end { width: 100%; }
@media (max-width: 860px) {
  .inv-grid { grid-template-columns: minmax(0,1fr); }
  .inv-totals { max-width: none; }
  .table td.actions .btn { margin: 2px 0 2px 4px; }
}
@media (max-width: 860px) {
  .table.lines thead { display: none; }
  .table.lines, .table.lines tbody { display: block; }
  .table.lines tr { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .table.lines td { border: 0; padding: 0; min-width: 0 !important; }
  .table.lines td:first-child { grid-column: 1 / -1; }
  .table.lines td:nth-child(2) input, .table.lines td:nth-child(3) input, .table.lines td:nth-child(4) select { width: 100%; }
  .table.lines td:nth-child(5) { grid-column: 1 / 4; text-align: left; }
  .table.lines td:nth-child(5)::before { content: "Importe: "; color: var(--ink-2); font-size: .85rem; }
}

/* ===== Facturas: revisión y corrección ===== */
dialog.wide { width: min(680px, calc(100vw - 24px)); }
.readonly { background: var(--sun); color: var(--ink-2); font-weight: 700; }
.help-strip { display: flex; gap: 12px; align-items: flex-start; background: var(--mint); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: .88rem; }
.help-strip span { font-size: 1.3rem; }
.notice.replace { background: #E7F6EE; border-color: #BFE5CF; color: #0E5E37; margin-bottom: 14px; }
.inv-link { font-size: .74rem; color: var(--ink-2); font-weight: 500; }
tr.is-rect td { background: #FFF7F8; }
tr.is-closed td { color: var(--ink-2); }
tr.is-closed td .num, tr.is-closed td:nth-child(4) { text-decoration: line-through; }
.num.neg { color: var(--no); font-weight: 700; }
.chip.rect { background: #FBE9EC; color: var(--no); }

/* Revisión */
.review { display: flex; flex-direction: column; gap: 16px; }
.review-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.rv-top { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--mint); }
.rv-top b { display: block; font-size: 1.05rem; } .rv-top small { color: var(--ink-2); }
.rv-num { text-align: right; }
.rv-lines { list-style: none; padding: 6px 18px; }
.rv-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.rv-lines li span { min-width: 0; overflow-wrap: anywhere; }
.rv-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; background: var(--navy); color: #fff; }
.rv-total b { font-family: var(--serif); font-size: 1.7rem; }
.review-checks { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.review-checks li { display: flex; gap: 10px; align-items: center; }
.review-checks li span { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; }
.review-checks li.ok span { background: var(--ok); }
.review-checks li.warn span { background: #E59A1A; }
.review-checks li.warn { color: #7A4A06; }

/* Asistente de corrección */
.rect { display: flex; flex-direction: column; gap: 14px; }
.rect section { display: flex; flex-direction: column; gap: 14px; }
.stepper { list-style: none; display: flex; gap: 6px; counter-reset: st; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--ink-2); counter-increment: st; padding-bottom: 8px; border-bottom: 3px solid var(--line); }
.stepper li::before { content: counter(st); width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; font-size: .75rem; }
.stepper li.on { color: var(--cta); border-color: var(--cta); } .stepper li.on::before { background: var(--cta); color: #fff; }
.stepper li.done { color: var(--ok); border-color: var(--ok); } .stepper li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reason { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); transition: .15s; }
.reason:hover { border-color: var(--cta); background: var(--lilac); }
.reason span { font-size: 1.7rem; }
.reason b { font-size: .95rem; } .reason small { color: var(--ink-2); font-size: .8rem; }
.partial { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.flow { display: flex; align-items: stretch; gap: 8px; }
.fbox { flex: 1; min-width: 0; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); }
.fbox b { font-size: .95rem; overflow-wrap: anywhere; } .fbox small { font-size: .74rem; color: var(--ink-2); line-height: 1.3; }
.fbox .famt { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.fbox.orig { background: var(--sun); }
.fbox.rectb { background: #FBE9EC; border-color: #F3C9CF; } .fbox.rectb .famt { color: var(--no); }
.fbox.newb { background: #E7F6EE; border-color: #BFE5CF; }
.fbox.res { background: var(--navy); color: #fff; border-color: var(--navy); } .fbox.res small, .fbox.res .label { color: #C9D7EE; }
.farrow { align-self: center; font-size: 1.4rem; font-weight: 800; color: var(--ink-2); }
.tax-impact { background: var(--lilac); border-radius: 14px; padding: 12px 14px; font-size: .88rem; }
.done-big { font-size: 3rem; text-align: center; }
#rect-modal section[data-rstep="3"] h3, #rect-modal section[data-rstep="3"] p { text-align: center; }

/* Aviso flotante */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(11,42,85,.3); z-index: 100; transition: .3s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .reason-grid, .partial { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .farrow { transform: rotate(90deg); }
  .stepper li { font-size: 0; gap: 0; justify-content: center; } .stepper li::before { font-size: .75rem; }
}

/* Lista de facturas como tarjetas en móvil */
@media (max-width: 640px) {
  .inv-table thead { display: none; }
  .inv-table, .inv-table tbody, .inv-table tr, .inv-table td { display: block; width: 100%; }
  .inv-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 4px; border-bottom: 1px solid var(--line, #E4EAF3); }
  .inv-table td { padding: 0; border: 0; }
  .inv-table td:nth-child(1) { grid-column: 1; }
  .inv-table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; }
  .inv-table td:nth-child(2) { grid-column: 1; }
  .inv-table td:nth-child(3) { grid-column: 1; }
  .inv-table td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; }
  .inv-table td.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: flex-start; }
  .inv-table td:nth-child(2)::before { content: '📅 '; }
  .inv-table tr.is-rect { background: #FFF7F8; border-radius: 10px; }
  .inv-table tr.is-rect td { background: transparent; }
}

/* =====================================================================
   Estilo gestoravia.com (Inter + Manrope, azul #1F5BF5, bordes finos, radios 10–14 px)
   ===================================================================== */
body { color: var(--text); background: var(--mint); font-size: 15.5px; }
h1, h2, h3, dialog h3 { font-family: var(--serif); color: var(--ink); font-weight: 800; letter-spacing: -.03em; }
h3 { font-weight: 700; letter-spacing: -.015em; }
:focus-visible { outline: 3px solid #B9CCFD; outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--cta); box-shadow: 0 0 0 3px #DCE6FE; }
label { color: var(--ink); font-weight: 600; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800; font-size: 1.35rem; letter-spacing: -.035em; color: var(--ink); line-height: 1; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.login-logo.brand { width: auto; font-size: 1.6rem; margin-bottom: 6px; }
.login-logo.brand img { width: 40px; height: 40px; }
.side-logo.brand { width: auto; }

/* Botones como la web: rectangulares redondeados, peso 600 */
.btn { border-radius: 10px; font-weight: 600; font-size: .97rem; min-height: 46px; padding: 0 20px; border: 1.5px solid transparent; letter-spacing: -.005em; }
.btn-cta { background: var(--cta); box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 -1px 0 rgba(0,0,0,.12); }
.btn-cta:hover { background: var(--cta-h); }
.btn-dark { background: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.btn-ghost:hover { border-color: #C9D0DC; background: #FBFCFD; }
.btn-soft { background: var(--lilac); color: var(--cta-h); }
.btn-danger { border: 1.5px solid #F3C9CF; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-xs { min-height: 32px; padding: 0 11px; font-size: .82rem; font-weight: 600; border-radius: 8px; }
.icon-btn { border-radius: 10px; }
.tab { border-radius: 8px; font-weight: 600; }
.tab.active, .tab[aria-selected="true"] { background: var(--lilac); color: var(--cta-h); border-color: transparent; }
.select-sm { border-radius: 8px; }

/* Tarjetas: blancas, borde fino, sombra mínima */
.card { border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login { background: radial-gradient(1200px 500px at 70% -10%, #EEF3FF 0, transparent 60%), #fff; }
.login-card { border-radius: 18px; box-shadow: 0 30px 60px -24px rgba(16,24,40,.2); }
dialog { border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(16,24,40,.35); color: var(--text); }
dialog::backdrop { background: rgba(10,17,36,.45); }

/* Menú lateral como el panel de la web */
.nav a { border-radius: 8px; padding: 10px 12px; color: var(--text); font-weight: 500; }
.nav a.active { background: var(--lilac); color: var(--cta-h); font-weight: 600; }
.label, .kicker { letter-spacing: .08em; }
.kicker { color: var(--cta); letter-spacing: .02em; text-transform: none; font-size: .8rem; }
.kicker::before { width: 6px; height: 6px; border-radius: 2px; opacity: 1; }

/* Chips de estado */
.chip { border-radius: 999px; font-weight: 600; padding: 2px 9px; }
.chip.ok, .chip.pagada, .chip.green { background: var(--ok-bg); color: var(--ok); }
.pill { background: var(--cta); }

/* Números con la tipografía de titulares */
.stat strong, .tax-big, .fbox .famt, .rv-total b, .inv-totals .grand, .date-box b, .cal-head h3 { font-family: var(--serif); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.progress { height: 6px; background: #EEF1F6; }

/* Tarjeta "Apártate" y avisos oscuros como el toast de la web */
.set-aside { background: var(--ink); }
.set-aside .tax-big, .set-aside h3 { color: #fff; }
.toast { background: var(--ink); border-radius: 12px; box-shadow: 0 18px 40px -10px rgba(10,17,36,.4); }
.notice, .help-strip, .tax-impact { background: var(--lilac); border: 1px solid #DCE6FE; border-radius: 12px; color: var(--text); }
.alert { border-radius: 10px; }

/* Chat como el de la web: limpio, burbujas azules */
.wa { box-shadow: 0 30px 60px -24px rgba(16,24,40,.2); border-radius: 18px; background: #fff; }
.wa-head { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.wa-head .avatar { background: var(--lilac); color: var(--cta-h); }
.wa-who small { color: var(--ok); opacity: 1; }
.wa-who small::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #12B76A; margin-right: 6px; vertical-align: 1px; }
.wa-body { background: #fff; }
.msg { background: #F2F4F7; color: var(--ink); border-radius: 14px 14px 14px 4px; box-shadow: none; padding: 9px 12px 6px; }
.msg.me { background: var(--cta); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg.me time { color: rgba(255,255,255,.75); }
.msg.me a { color: #fff; }
.msg time { color: var(--ink-2); }
.day-sep { background: var(--mint); color: var(--ink-2); box-shadow: none; border: 1px solid var(--line); }
.wa-form { background: #fff; border-top: 1px solid var(--line); }
.wa-form textarea { border: 1.5px solid var(--line); border-radius: 12px; background: var(--mint); }
.wa-send { border-radius: 10px; background: var(--cta); }
.chat-fab { background: var(--cta); box-shadow: 0 12px 30px rgba(31,91,245,.35); }
.chat-fab .avatar { background: var(--lilac); color: var(--cta-h); }
.chat-fab::after { background: var(--cta); }

/* Facturas y rectificativas */
.inv-totals .grand { border-top-color: var(--ink); }
.reason { border-radius: 12px; }
.reason:hover, .reason.sel, .reason[aria-pressed="true"] { border-color: var(--cta); background: var(--lilac); }
.review-card, .fbox, fieldset { border-radius: 12px; }
.drop { border-color: #C9D3E6; border-radius: 12px; background: var(--mint); }
.drop:hover, .drop.over { border-color: var(--cta); background: var(--lilac); }
.calendar .day { border-radius: 8px; }
.nav a i { display: grid; place-items: center; color: var(--ink-2); }
.nav a.active i, .nav a:hover i { color: var(--cta); }

/* ---------- Fichaje (empleado) ---------- */
.fich-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 30px 22px; }
.fich-clock { display: grid; gap: 2px; }
.fich-clock span { font-family: var(--serif); font-weight: 800; font-size: clamp(2.8rem, 9vw, 4rem); letter-spacing: -.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.fich-clock small { color: var(--ink-2); }
.fich-state { display: grid; gap: 6px; justify-items: center; }
.fich-state .chip { font-size: .9rem; padding: 5px 14px; }
.fich-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.fich-btn { min-height: 64px; min-width: min(260px, 100%); font-size: 1.1rem; }
.fich-btn:disabled { opacity: .55; }
#fe-phone-form { grid-template-columns: minmax(0, 1fr) auto; }
#fe-wa-link { margin-top: 12px; }
.timeline { list-style: none; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline li b { font-variant-numeric: tabular-nums; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav b { min-width: 118px; text-align: center; text-transform: capitalize; font-size: .92rem; }
.month-nav .icon-btn:disabled { opacity: .35; cursor: default; }
.warn-txt { color: var(--warn); }

/* ---------- Equipo (empresa y gestor) ---------- */
.team-list { list-style: none; display: flex; flex-direction: column; }
.team-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 64px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-list li:last-child { border-bottom: 0; }
.team-list .li-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-h { text-align: right; font-variant-numeric: tabular-nums; }
.pend-row .li-main b { display: block; }
.card-head:has(.month-nav) { flex-wrap: wrap; }
.card-head:has(.month-nav) h3 { white-space: nowrap; }
.pend-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.code-box { display: flex; align-items: center; justify-content: center; background: var(--lilac); border: 1px dashed #B9CCFB; border-radius: 12px; padding: 14px; margin: 12px 0; }
.code-box code { font-family: var(--serif); font-weight: 800; font-size: 1.6rem; letter-spacing: .18em; color: var(--cta); }
.table tr.dim td { opacity: .55; }
.table tr.dim td.actions { opacity: 1; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--mint); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-chip.whatsapp { background: #E8F6EF; border-color: #BFE5CF; }
.ev-chip.correccion { background: #FEF3E2; border-color: #F7D9A8; }
.ev-chip button { border: 0; background: transparent; color: var(--ink-2); width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; line-height: 1; }
.ev-chip button:hover { background: #FBE9EC; color: var(--no); }
.fm-table { max-height: 46vh; overflow-y: auto; margin: 6px 0 18px; }
.corr-form { border-top: 1px solid var(--line); padding-top: 16px; }
.corr-form h4 { font-size: .95rem; }
@media (max-width: 700px) {
  .team-list li { grid-template-columns: auto minmax(0, 1fr) 54px; }
  .team-list li .chip { display: none; }
  .pend-row { grid-template-columns: auto minmax(0, 1fr); }
  .pend-row .row-end { grid-column: 1 / -1; justify-content: flex-start; }
}

.bajas { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.bajas summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.bajas ul { margin-top: 8px; }

/* ---------- Suscripción (Stripe) ---------- */
.sub-card { margin-bottom: 22px; }
.sub-card.sub-warn { border-color: #F3C9CF; background: #FFF8F9; }
.sub-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.sub-plan { border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.sub-plan:hover { border-color: var(--cta); }
.sub-plan p { flex: 1; margin: 2px 0 8px; }
.sub-price { font-family: var(--serif); font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.sub-price small { font-family: var(--font); font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.sub-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sub-kpis div { background: var(--mint); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; }
.sub-kpis strong { font-size: 1.5rem; font-family: var(--serif); }
.sub-kpis span { font-size: .8rem; color: var(--ink-2); }
.sub-kpis .bad { background: #FBE9EC; } .sub-kpis .bad strong { color: var(--no); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 640px) { .sub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
