/* Lumora Citas · panel. Paleta y tipografía de la marca. */
@font-face { font-family: 'Outfit'; font-weight: 400; font-display: swap; src: url('/panel/fonts/Outfit-400.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 500; font-display: swap; src: url('/panel/fonts/Outfit-500.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 600; font-display: swap; src: url('/panel/fonts/Outfit-600.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 700; font-display: swap; src: url('/panel/fonts/Outfit-700.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 400; font-display: swap; src: url('/panel/fonts/GeistMono-400.woff2') format('woff2'); }

:root {
  --night: #060F22; --navy: #0B1A33; --navy-mid: #122648; --ivory: #F5F1E8; --gold: #C9A84C; --goldb: #E2C266; --teal: #1AADA0;
  --texto: #0B1A33; --texto-2: rgba(11,26,51,.62); --texto-3: rgba(11,26,51,.42);
  --borde: rgba(11,26,51,.09); --borde-2: rgba(11,26,51,.16);
  --blanco: #fff; --fondo: #F5F1E8; --rojo: #C94B3F; --rojo-f: #FBE5E2; --amarillo-f: #FFF4D6; --verde-f: #DDF4F0; --azul-f: #E8ECFF;
  --radio: 18px; --radio-chico: 12px; --sombra: 0 1px 2px rgba(6,15,34,.04), 0 8px 24px -16px rgba(6,15,34,.25);
  --lateral: 248px; --barra: 64px; --inferior: 64px;
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0 0 8px; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 12.5px; background: rgba(11,26,51,.06); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--texto-2); font-size: 13.5px; }
.chico { font-size: 12.5px; }
.centro { text-align: center; }
.movil { display: none !important; }
.vacio { color: var(--texto-3); text-align: center; padding: 28px 12px; font-size: 14px; }
.err { color: var(--rojo); font-size: 13.5px; margin-top: 8px; min-height: 0; }
.ok { color: #0f7f74; font-size: 13.5px; margin-top: 8px; }
.err:empty, .ok:empty { display: none; }

/* ---------- Marca ---------- */
.marca { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: #fff; }
.marca img { border-radius: 10px; }
.marca b { color: var(--goldb); font-weight: 700; }

/* ---------- Controles ---------- */
label { display: block; font-weight: 500; font-size: 13px; margin: 14px 0 5px; color: var(--texto); }
label .muted { font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13.5px; color: var(--texto-2); }
label.check input { margin-top: 3px; accent-color: var(--gold); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; padding: 11px 13px; border-radius: var(--radio-chico); border: 1px solid var(--borde-2); background: var(--blanco); font: inherit; color: var(--texto); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.18); }
textarea { min-height: 120px; resize: vertical; }
textarea.corta { min-height: 64px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B1A33' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
input[type=date] { width: auto !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; border: 0; padding: 10px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.gold { background: var(--goldb); color: var(--navy); }
.btn.gold:hover { background: #e9cc78; }
.btn.claro { background: var(--blanco); color: var(--navy); border: 1px solid var(--borde-2); }
.btn.claro:hover { background: #fafafa; }
.btn.rojo { background: var(--rojo-f); color: var(--rojo); }
.btn.wa { background: var(--teal); color: #fff; }
.btn.chico { padding: 7px 14px; font-size: 13px; }
.btn.ancho { width: 100%; margin-top: 18px; }
.btn.icono { width: 38px; height: 38px; padding: 0; border-radius: 12px; background: var(--blanco); color: var(--navy); border: 1px solid var(--borde-2); font-size: 18px; }
.link { background: none; border: 0; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; font: inherit; font-size: 13.5px; }
.grupo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.grupo label { margin: 0; }
.dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.dos-col { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.5fr); gap: 14px; align-items: start; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(11,26,51,.07); color: var(--texto); vertical-align: middle; }
.pill.humano { background: var(--amarillo-f); } .pill.cerrada { background: #e9e9e9; color: var(--texto-2); } .pill.abierta { background: var(--verde-f); }
.estado { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 12.5px; }
.estado.activa, .estado.sin_cobro { background: var(--verde-f); } .estado.prueba { background: var(--azul-f); } .estado.vencida { background: var(--amarillo-f); } .estado.suspendida, .estado.cancelada { background: var(--rojo-f); }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); margin-left: 6px; vertical-align: middle; }
.enlace { font-family: var(--mono); font-size: 12.5px; word-break: break-all; background: rgba(11,26,51,.05); padding: 10px 12px; border-radius: var(--radio-chico); flex: 1; }

/* ---------- Tarjetas y tablas ---------- */
.card { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--sombra); }
.card.admin { border: 1px dashed var(--gold); }
.card-titulo { font-weight: 600; font-size: 16px; letter-spacing: -.01em; margin-bottom: 4px; }
.card-titulo.entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--texto-2); text-transform: uppercase; letter-spacing: .06em; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--borde); }
td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--borde); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.item { border: 1px solid var(--borde); border-radius: var(--radio-chico); padding: 12px 14px; margin-top: 10px; background: #fcfbf8; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 4px 14px 4px 0; }
.dias { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; align-items: center; margin-top: 6px; }
.dias span { font-size: 13px; font-weight: 500; }
.barra-progreso { height: 8px; background: rgba(11,26,51,.1); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.barra-progreso i { display: block; height: 100%; background: var(--teal); }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; }
.lateral { background: var(--night); color: #fff; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.selector-negocio { background-color: var(--navy-mid); color: #fff; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radio-chico); padding: 9px 36px 9px 12px; font-size: 13.5px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E"); }
.selector-negocio[hidden] { display: none !important; }
.nav-lateral { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-lateral button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; color: rgba(255,255,255,.72); border: 0; padding: 9px 12px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.nav-lateral button i { font-style: normal; font-size: 16px; width: 22px; text-align: center; }
.nav-lateral button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-lateral button.on { background: rgba(226,194,102,.14); color: var(--goldb); }
.nav-grupo { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 14px 12px 4px; }
.lateral-pie { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.usuario { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.75); }
.usuario .link { color: rgba(255,255,255,.6); }
.contenido { min-width: 0; display: flex; flex-direction: column; }
.barra { height: var(--barra); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; background: rgba(245,241,232,.85); backdrop-filter: blur(10px); z-index: 5; border-bottom: 1px solid var(--borde); }
.barra h1 { font-size: 20px; }
.barra .estado { font-size: 13px; color: var(--teal); font-weight: 500; background: none; padding: 0; }
.barra-der { margin-left: auto; display: flex; gap: 8px; align-items: center; }
main { padding: 20px 24px 40px; max-width: 1240px; width: 100%; }
.nav-inferior, .hoja { display: none; }

/* ---------- Acceso ---------- */
body:not(.sin-sesion) #login { display: none; }
body.sin-sesion .app { display: none; }
.acceso { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 46%) 1fr; }
.acceso-marca { background: var(--night); color: #fff; padding: 36px 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.acceso-marca::before { content: ''; position: absolute; width: 520px; height: 520px; right: -200px; top: -160px; background: radial-gradient(circle, rgba(201,168,76,.28), transparent 65%); filter: blur(50px); }
.acceso-texto { position: relative; max-width: 440px; }
.acceso-texto h2 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px; }
.acceso-texto h2::after { content: ''; display: block; width: 44px; height: 3px; background: var(--goldb); margin-top: 18px; border-radius: 2px; }
.acceso-texto p { color: rgba(255,255,255,.7); font-size: 15.5px; line-height: 1.6; }
.acceso-puntos { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 8px; color: rgba(255,255,255,.85); font-size: 14px; }
.acceso-puntos li::before { content: '✓'; color: var(--goldb); margin-right: 10px; font-weight: 700; }
.acceso-pie { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); position: relative; }
.acceso-form { display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.acceso-form .card { width: 100%; max-width: 440px; margin: 0 auto; padding: 28px; }
.acceso-form h1 { font-size: 24px; margin-bottom: 4px; }

/* ---------- Agenda ---------- */
.agenda-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.agenda-barra .grupo { margin: 0; }
.vista { display: inline-flex; background: rgba(11,26,51,.08); border-radius: 999px; padding: 3px; }
.vista button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--texto); }
.vista button.on { background: var(--blanco); box-shadow: 0 1px 3px rgba(6,15,34,.12); }
.agenda-titulo { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.agenda-titulo b { font-size: 17px; text-transform: capitalize; }
.semana { display: grid; grid-template-columns: 56px repeat(7, 1fr); gap: 2px; font-size: 12.5px; }
.semana .dia-h { text-align: center; font-weight: 500; padding: 6px 2px; cursor: pointer; border-radius: 10px; }
.semana .dia-h:hover { background: rgba(11,26,51,.05); }
.semana .dia-h.hoy { color: var(--teal); font-weight: 600; }
.semana .hora-l { color: var(--texto-3); padding-top: 4px; font-family: var(--mono); font-size: 11px; }
.semana .celda { min-height: 48px; border-top: 1px solid var(--borde); }
.cita-b { background: var(--verde-f); border-left: 3px solid var(--teal); border-radius: 8px; padding: 4px 7px; margin: 2px 0; cursor: pointer; font-size: 12px; line-height: 1.25; overflow: hidden; transition: transform .12s; }
.cita-b:hover { transform: translateY(-1px); }
.cita-b.cancelada { background: #eee; border-left-color: #bbb; text-decoration: line-through; opacity: .7; }
.cita-b.completada { background: var(--azul-f); border-left-color: #5b6ad1; }
.cita-b.no_asistio { background: var(--rojo-f); border-left-color: var(--rojo); }
.cita-b.reagendada { background: var(--amarillo-f); border-left-color: var(--goldb); }
.mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mes .dh { text-align: center; color: var(--texto-3); font-size: 12px; font-weight: 500; padding-bottom: 4px; }
.mes .md { background: #fcfbf8; border: 1px solid var(--borde); border-radius: 12px; min-height: 86px; padding: 7px; font-size: 12px; cursor: pointer; transition: border-color .15s; }
.mes .md:hover { border-color: var(--gold); }
.mes .md.otro { opacity: .4; } .mes .md.hoy { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.mes .md b { display: block; margin-bottom: 4px; }
.mes .md .n { display: inline-block; background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-bottom: 3px; }
.mes .md .mc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texto-2); }
.fila-cita { cursor: pointer; }
.fila-cita:hover td { background: #fcfbf8; }
.hora-g { font-family: var(--mono); font-size: 13px; }

/* ---------- Primeros pasos e instalación ---------- */
.pasos { list-style: none; padding: 0; margin: 10px 0 0; }
.pasos li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--borde); font-size: 14px; }
.pasos li:last-child { border-bottom: 0; }
.pasos li i { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; background: rgba(11,26,51,.08); flex: none; }
.pasos li.hecho i { background: var(--teal); color: #fff; }
.pasos li.hecho { color: var(--texto-2); }
.pasos li .btn { margin-left: auto; }
.instalar { background: linear-gradient(135deg, #fff4d6, #fff9ea); border: 1px solid rgba(201,168,76,.35); border-radius: var(--radio); padding: 12px 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.instalar .link { margin-left: auto; }

/* ---------- Plan ---------- */
.plan-bar { height: 8px; border-radius: 999px; background: rgba(11,26,51,.1); overflow: hidden; margin: 8px 0 4px; }
.plan-bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; transition: width .4s; }
.plan-bar.aviso i { background: var(--goldb); } .plan-bar.agotado i { background: var(--rojo); }
.plan-alerta { padding: 12px 14px; border-radius: var(--radio-chico); margin-top: 10px; font-size: 14px; }
.plan-alerta.aviso { background: var(--amarillo-f); } .plan-alerta.agotado { background: var(--rojo-f); }

/* ---------- Bandeja de conversaciones ---------- */
.bandeja { display: grid; grid-template-columns: 300px minmax(0, 1fr) 280px; gap: 0; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); height: calc(100vh - var(--barra) - 40px); min-height: 520px; overflow: hidden; }
.bandeja-lista { border-right: 1px solid var(--borde); display: flex; flex-direction: column; min-height: 0; }
.buscador { padding: 12px; }
.buscador input { padding: 9px 12px; font-size: 14px; background: #f6f4ee; border-color: transparent; }
.filtros { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; }
.filtros button { border: 1px solid var(--borde-2); background: var(--blanco); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.filtros button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
#convs { display: block; overflow-y: auto; flex: 1; }
#convs tbody { display: block; }
#convs tr { display: block; cursor: pointer; }
#convs td { display: block; padding: 11px 14px; border-bottom: 1px solid var(--borde); }
#convs tr:hover td { background: #faf8f3; }
#convs tr.activa td { background: #fff6dc; }
.conv-fila { display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy-mid); color: var(--goldb); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.avatar.humano { background: var(--amarillo-f); color: var(--navy); }
.conv-texto { min-width: 0; flex: 1; }
.conv-texto b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-texto span { display: block; font-size: 12.5px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { font-size: 11px; color: var(--texto-3); flex: none; text-align: right; }
.bandeja-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f7f5ef; }
.chat-cabecera { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blanco); border-bottom: 1px solid var(--borde); }
.chat-cabecera .grupo { margin: 0; margin-left: auto; }
.chat-quien { min-width: 0; }
.chat-quien b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-quien span { font-size: 12.5px; }
.chat { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 14px; flex: 1; min-height: 0; }
.chat-vacio { margin: auto; color: var(--texto-3); font-size: 14px; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(6,15,34,.06); }
.msg.user { background: var(--blanco); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.assistant { background: #d9fdd3; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg img { max-width: 100%; border-radius: 10px; display: block; }
.msg .adj { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; color: inherit; }
.msg .hora { display: block; font-size: 10.5px; color: var(--texto-3); margin-top: 4px; text-align: right; }
.chat-pie { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--blanco); border-top: 1px solid var(--borde); }
.chat-pie input[type=text] { flex: 1; border-radius: 999px; padding: 10px 16px; }
.chat-pie .btn.icono { cursor: pointer; }
.bandeja-chat .err { padding: 0 14px 8px; background: var(--blanco); margin: 0; }
.bandeja-info { border-left: 1px solid var(--borde); padding: 16px; overflow-y: auto; font-size: 13.5px; }
.bandeja-info h3 { font-size: 16px; }
.bandeja-info .avatar { width: 56px; height: 56px; font-size: 20px; margin-bottom: 10px; }
.bandeja-info dl { margin: 12px 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.bandeja-info dt { color: var(--texto-2); } .bandeja-info dd { margin: 0; }
.bandeja-info .proxima { background: var(--verde-f); border-radius: var(--radio-chico); padding: 10px 12px; margin: 10px 0; }
.sim { display: flex; flex-direction: column; height: calc(100vh - var(--barra) - 60px); min-height: 460px; }
.sim-chat { background: #f7f5ef; border-radius: var(--radio-chico); }
.sim .chat-pie { border: 0; padding: 10px 0 0; background: transparent; }

/* ---------- Pacientes ---------- */
.lista-p tr { cursor: pointer; }
.lista-p tr:hover td { background: #fcfbf8; }
.lista-p tr.activa td { background: #fff6dc; }

/* ---------- Reportes ---------- */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi div { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); }
.kpi b { font-size: 28px; display: block; letter-spacing: -.03em; line-height: 1.1; }
.kpi span { font-size: 12.5px; color: var(--texto-2); }
.grafico { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: 12px; }
.grafico i { flex: 1; background: var(--teal); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.grafico i:hover { opacity: 1; }

/* ---------- WhatsApp y calendario ---------- */
.wa-card, #wa-card { border: 1.5px solid var(--teal); }
.wa-estado { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 12.5px; background: var(--rojo-f); color: var(--rojo); }
.wa-estado.on { background: var(--verde-f); color: #0f7f74; }

/* ---------- Modales y hoja móvil ---------- */
.modal-fondo { position: fixed; inset: 0; background: rgba(6,15,34,.5); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--blanco); border-radius: 22px; padding: 22px; width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; box-shadow: 0 30px 60px -20px rgba(6,15,34,.5); }
.modal h3 { font-size: 18px; margin-bottom: 4px; }
.hoja-cuerpo { background: var(--blanco); border-radius: 22px 22px 0 0; padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); width: 100%; }
.hoja-asa { width: 40px; height: 4px; border-radius: 2px; background: rgba(11,26,51,.2); margin: 0 auto 10px; }
.hoja-cuerpo button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 13px 10px; font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); border-radius: 12px; cursor: pointer; }
.hoja-cuerpo button:active { background: rgba(11,26,51,.06); }
.hoja-cuerpo button i { font-style: normal; width: 24px; text-align: center; }

/* ---------- Roles ---------- */
body:not(.es-admin) .solo-admin { display: none !important; }
body.es-equipo .solo-duenio { display: none !important; }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .movil { display: inline-flex !important; }
  .agenda-barra { flex-direction: column; align-items: stretch; }
  .agenda-barra .grupo { flex-wrap: nowrap; justify-content: space-between; }
  .agenda-barra input[type=date] { flex: 1; min-width: 0; width: 100% !important; }
  .selector-negocio.movil { max-width: 46vw; font-size: 12.5px; padding: 7px 30px 7px 10px; }
  .app { grid-template-columns: 1fr; }
  .lateral { display: none; }
  .barra { padding: 0 16px; height: 56px; }
  .barra h1 { font-size: 18px; }
  main { padding: 14px 14px calc(var(--inferior) + 24px + env(safe-area-inset-bottom)); }
  .nav-inferior { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--blanco); border-top: 1px solid var(--borde); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .nav-inferior button { background: none; border: 0; font: inherit; font-size: 10.5px; font-weight: 500; color: var(--texto-2); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px; position: relative; }
  .nav-inferior button i { font-style: normal; font-size: 20px; }
  .nav-inferior button.on { color: var(--navy); }
  .nav-inferior button.on i { transform: translateY(-1px); }
  .nav-inferior .punto { position: absolute; top: 2px; right: 22%; margin: 0; }
  .hoja { display: flex; position: fixed; inset: 0; background: rgba(6,15,34,.5); align-items: flex-end; z-index: 40; }
  .hoja[hidden] { display: none; }
  .acceso { grid-template-columns: 1fr; }
  .acceso-marca { display: none; }
  .acceso-form { padding: 28px 16px; justify-content: flex-start; }
  .marca.movil { color: var(--navy); margin: 0 auto 20px; display: flex !important; }
  .marca.movil b { color: var(--gold); }
  .dos-col { grid-template-columns: 1fr; }
  .bandeja { grid-template-columns: 1fr; height: calc(100vh - 56px - var(--inferior) - 28px); min-height: 0; }
  .bandeja-chat, .bandeja-info { display: none; }
  .bandeja.abierta .bandeja-lista { display: none; }
  .bandeja.abierta .bandeja-chat { display: flex; }
  .chat-cabecera .grupo .btn { padding: 6px 10px; font-size: 12px; }
  .msg { max-width: 88%; }
  .semana { grid-template-columns: 40px repeat(7, 1fr); font-size: 10.5px; }
  .cita-b { font-size: 10px; padding: 2px 3px; }
  .mes .md { min-height: 62px; padding: 4px; }
  .mes .md .mc { display: none; }
  .agenda-barra .btn.gold { padding: 8px 14px; font-size: 13px; }
  .sim { height: calc(100vh - 56px - var(--inferior) - 60px); }
  th:nth-child(n+4), td:nth-child(n+4) { display: none; }
  .lista-p th:nth-child(n+2), .lista-p td:nth-child(n+2) { display: table-cell; }
  #mp-pagos th:nth-child(n+4), #mp-pagos td:nth-child(n+4) { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px) { .bandeja { grid-template-columns: 260px minmax(0, 1fr); } .bandeja-info { display: none; } }
