/*
 * public/assets/turnos.css
 * Sistema de diseño de sistema-turnos, sobre Bootstrap 5.3. Adaptado de
 * miraquehay-sistema/public/assets/panel.css (mismos criterios: base cálida,
 * Work Sans y Fraunces, cabecera blanca con menú de cuenta, pestañas con
 * íconos de color, tarjetas redondeadas, ventanas que en el celular suben
 * desde abajo), con un acento propio verde azulado (--st-acento).
 * Es el único archivo de estilos del sistema: las páginas usan estas clases
 * y no llevan estilos propios.
 */

/* ===== 1. Base: colores, letras y lo de Bootstrap ===== */
:root {
  --st-texto: #2B2A26;
  --st-suave: #6B6448;
  --st-linea: #E4DED1;
  --st-fondo: #F1EFEA;
  --st-papel: #FFFFFF;
  --st-hundido: #F4F2EE;
  --st-verde: #3F7A5B;
  --st-ambar: #B5822E;
  --st-azul: #3B6E96;
  --st-rojo: #B5442E;
  --st-acento: #0F766E;
  --st-acento-oscuro: #115E59;
  --st-acento-suave: #E2F2EF;
  --st-sombra: 0 1px 4px rgba(0, 0, 0, .04);
  --bs-body-font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: var(--st-texto);
  --bs-border-color: var(--st-linea);
  --bs-primary: #0F766E;
  --bs-primary-rgb: 15, 118, 110;
  --bs-link-color-rgb: 17, 94, 89;
  --bs-link-hover-color-rgb: 12, 66, 62;
}
body { background: var(--st-fondo); color: var(--st-texto); min-height: 100vh; }
h1, h2, h3, .h4, .h5, .h6 { font-weight: 600; }
a { text-underline-offset: 3px; }

.btn { border-radius: 10px; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--st-acento); --bs-btn-border-color: var(--st-acento);
  --bs-btn-hover-bg: var(--st-acento-oscuro); --bs-btn-hover-border-color: var(--st-acento-oscuro);
  --bs-btn-active-bg: #0C4A46; --bs-btn-active-border-color: #0C4A46;
  --bs-btn-disabled-bg: var(--st-acento); --bs-btn-disabled-border-color: var(--st-acento);
}
.btn-outline-primary {
  --bs-btn-color: var(--st-acento-oscuro); --bs-btn-border-color: var(--st-acento);
  --bs-btn-hover-bg: var(--st-acento); --bs-btn-hover-border-color: var(--st-acento);
  --bs-btn-active-bg: var(--st-acento-oscuro); --bs-btn-active-border-color: var(--st-acento-oscuro);
}
.btn-outline-secondary { --bs-btn-color: var(--st-suave); --bs-btn-border-color: var(--st-linea); --bs-btn-hover-bg: var(--st-hundido); --bs-btn-hover-color: var(--st-texto); --bs-btn-hover-border-color: var(--st-texto); --bs-btn-active-bg: var(--st-hundido); --bs-btn-active-color: var(--st-texto); }
.btn-link { text-decoration: none; }
.card { border-radius: 16px; border-color: var(--st-linea); box-shadow: var(--st-sombra); }
.alert { border-radius: 12px; }
.form-control, .form-select { border-radius: 10px; border-color: #DCD5C6; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--st-acento); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.form-check-input:checked { background-color: var(--st-acento); border-color: var(--st-acento); }
.form-label { font-weight: 500; margin-bottom: 4px; }
.form-text { color: var(--st-suave); }
/* Números sin flechitas: se escribe el número (como en MiraQueHay). */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ===== 2. Cabecera: logo redondo, nombre y menú de la cuenta ===== */
.st-cabecera { background: var(--st-papel); }
.st-cabecera.con-linea { border-bottom: 1px solid var(--st-linea); }
.st-cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 14px; }
.st-marca { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.st-marca:hover { color: inherit; }
.st-logo {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--st-acento); color: #fff; font-weight: 700; font-size: 20px; box-shadow: 0 2px 8px rgba(15, 118, 110, .3);
}
.st-nombre { font-family: 'Fraunces', serif; font-size: 23px; font-weight: 600; letter-spacing: -.01em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-etiqueta { padding: 3px 10px; border-radius: 99px; background: var(--st-texto); color: #fff; font-family: 'Work Sans', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0; }

.st-cuenta { position: relative; flex: none; }
.st-cuenta-boton { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--st-linea); cursor: pointer; color: var(--st-suave); font-size: 13px; font-weight: 600; background: #fff; }
.st-cuenta-boton::-webkit-details-marker { display: none; }
.st-cuenta-boton:hover, .st-cuenta[open] .st-cuenta-boton { border-color: var(--st-texto); color: var(--st-texto); }
.st-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--st-acento); color: #fff; font-weight: 700; font-size: 14px; }
.st-avatar.grande { width: 42px; height: 42px; font-size: 18px; }
.st-avatar.claro { background: var(--st-hundido); color: var(--st-texto); border: 1px solid var(--st-linea); }
.st-cuenta-nombre { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cuenta-lista { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 270px; padding: 8px; border-radius: 14px; border: 1px solid var(--st-linea); background: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .16); }
.st-cuenta-datos { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--st-linea); min-width: 0; }
.st-cuenta-datos > div { min-width: 0; }
.st-cuenta-datos b { display: block; font-size: 15px; }
.st-cuenta-datos small { display: block; color: var(--st-suave); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cuenta-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--st-texto); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.st-cuenta-item:hover { background: var(--st-hundido); color: var(--st-texto); }
.st-cuenta-item svg { color: var(--st-suave); flex: none; }
.st-cuenta-item.peligro, .st-cuenta-item.peligro svg { color: #B42318; }
@media (max-width: 640px) {
  .st-nombre { font-size: 19px; }
  .st-cuenta-nombre { display: none; }
  .st-cuenta-boton { padding-right: 8px; }
}

/* ===== 3. Pestañas: ícono de color y subrayado; en el celular se deslizan ===== */
.st-tabs { background: var(--st-papel); border-bottom: 1px solid var(--st-linea); }
.st-tabs-fila { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.st-tabs-fila::-webkit-scrollbar { display: none; }
.st-tab {
  --c: var(--st-suave);
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap;
  padding: 13px 15px 11px; margin-bottom: -1px; font-size: 14.5px; font-weight: 600; color: var(--st-suave); text-decoration: none;
  border-bottom: 3px solid transparent; transition: color .15s, background .15s;
}
.st-tab svg { color: var(--c); flex-shrink: 0; }
.st-tab:hover { color: var(--st-texto); background: rgba(0, 0, 0, .025); }
.st-tab.active { color: var(--st-texto); border-bottom-color: var(--c); }
.st-tab.t-inicio { --c: #6B6448; }
.st-tab.t-agenda { --c: #0F766E; }
.st-tab.t-clinica { --c: #B5442E; }
.st-tab.t-pacientes { --c: #3B78B5; }
.st-tab.t-profesionales { --c: #2E8B5C; }
.st-tab.t-servicios { --c: #8E5BB5; }
.st-tab.t-recursos { --c: #B5822E; }
.st-tab.t-feriados { --c: #C2410C; }
.st-tab.t-usuarios { --c: #5B4BA8; }
.st-tab.t-ajustes { --c: #475569; }
.st-tab.t-instituciones { --c: #0F766E; }
.st-tab.t-auditoria { --c: #475569; }
@media (max-width: 640px) { .st-tab { padding: 12px 12px 10px; font-size: 14px; } }

/* "Hay más para el costado" (deslizar.js): degradé y flecha que late. */
.st-desliza-marco { position: relative; }
.st-desliza-marco::before, .st-desliza-marco::after { content: ''; position: absolute; top: 0; bottom: 0; width: 48px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.st-desliza-marco::before { left: 0; background: linear-gradient(to left, transparent, var(--st-desliza-fondo, #fff) 70%); }
.st-desliza-marco::after { right: 0; background: linear-gradient(to right, transparent, var(--st-desliza-fondo, #fff) 70%); }
.st-desliza-marco.hay-izq::before, .st-desliza-marco.hay-der::after { opacity: 1; }
.st-flecha { position: absolute; top: 0; bottom: 0; z-index: 2; display: none; align-items: center; justify-content: center; width: 30px; padding: 0 0 4px; border: 0; background: none; color: var(--st-texto); font-size: 2rem; font-weight: 700; line-height: 1; cursor: pointer; }
.st-flecha.izq { left: 0; }
.st-flecha.der { right: 0; }
.st-desliza-marco.hay-izq .st-flecha.izq { display: flex; animation: st-latido-izq 1.4s ease-in-out infinite; }
.st-desliza-marco.hay-der .st-flecha.der { display: flex; animation: st-latido-der 1.4s ease-in-out infinite; }
@keyframes st-latido-der { 0%, 100% { transform: translateX(0); opacity: .45; } 50% { transform: translateX(4px); opacity: 1; } }
@keyframes st-latido-izq { 0%, 100% { transform: translateX(0); opacity: .45; } 50% { transform: translateX(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .st-flecha { animation: none !important; opacity: .8; } }

/* ===== 4. Página: anchos, encabezado, volver y barra de una lista ===== */
.st-angosto { max-width: 520px; margin-left: auto; margin-right: auto; }
.st-medio { max-width: 880px; }
.st-encabezado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.st-encabezado h1 { font-size: 1.35rem; margin: 0; }
.st-encabezado p { margin: 2px 0 0; color: var(--st-suave); font-size: 14px; }
.st-encabezado-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-volver { gap: 4px; height: 38px; padding: 0 16px 0 10px; margin-bottom: 14px; border-radius: 99px; font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--st-linea); color: var(--st-texto); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); transition: background .15s, transform .15s; }
.st-volver:hover { background: var(--st-hundido); color: var(--st-texto); transform: translateX(-2px); }
.st-seccion { margin: 26px 0 10px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--st-texto); display: flex; align-items: center; gap: 10px; }
.st-seccion::after { content: ''; flex: 1; height: 1px; background: var(--st-linea); }
.st-seccion:first-child { margin-top: 0; }
.st-ayuda { color: var(--st-suave); font-size: 14px; }
.st-buscador { display: flex; gap: 8px; max-width: 520px; margin-bottom: 14px; }

/* ===== 5. Listas: tarjetas-renglón ===== */
.st-lista { display: flex; flex-direction: column; gap: 8px; }
.st-renglon {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px;
  background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 12px; box-shadow: var(--st-sombra);
  color: inherit; text-decoration: none;
}
a.st-renglon:hover, button.st-renglon:hover, .st-renglon.tocable:hover { border-color: #CFC7B5; background: #FDFCFA; color: inherit; }
button.st-renglon { width: 100%; text-align: left; font: inherit; }
.st-renglon.apagado .st-renglon-info { opacity: .55; }
.st-renglon-info { flex: 1; min-width: 0; }
.st-renglon-titulo { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-renglon-detalle { font-size: 13px; color: var(--st-suave); }
.st-renglon-fin { display: flex; align-items: center; gap: 8px; flex: none; color: var(--st-suave); font-size: 13px; }
.st-renglon-flecha { color: var(--st-suave); flex: none; }
.st-color { width: 6px; align-self: stretch; border-radius: 99px; background: var(--c, var(--st-acento)); flex: none; margin: -2px 0; }

/* ===== 6. Recuadros de datos, pastillas y estados ===== */
.st-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.st-dato { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; text-decoration: none; color: var(--st-texto); background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 14px; }
.st-dato span { font-size: 12.5px; color: var(--st-suave); font-weight: 600; }
.st-dato b { font-size: 22px; font-weight: 700; }
a.st-dato:hover { border-color: var(--st-texto); color: var(--st-texto); }
.st-dato.activo { border-color: var(--st-acento); box-shadow: 0 0 0 1px var(--st-acento); }

.st-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--st-hundido); color: var(--st-suave); white-space: nowrap; }
.st-pill.ok, .st-pill.activa { background: #E6F2EA; color: #2E6B47; }
.st-pill.mal, .st-pill.suspendida { background: #FDE8E8; color: #9B1C1C; }
.st-pill.aviso { background: #FFF1D6; color: #9A5B00; }
.st-pill.info { background: #E3EEF8; color: #2B5C86; }
.st-pill.acento { background: var(--st-acento-suave); color: var(--st-acento-oscuro); }

.st-turno-estado { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--st-hundido); color: var(--st-suave); white-space: nowrap; }
.st-turno-estado.reservado { background: #E3EEF8; color: #2B5C86; }
.st-turno-estado.confirmado { background: #E6F2EA; color: #2E6B47; }
.st-turno-estado.presente { background: #FFF1D6; color: #9A5B00; }
.st-turno-estado.atendido { background: #ECEAE4; color: #4B4637; }
.st-turno-estado.ausente { background: #FDE8E8; color: #9B1C1C; }
.st-turno-estado.cancelado { background: #F4F3EF; color: #A39C88; text-decoration: line-through; }

.st-vacio { text-align: center; color: var(--st-suave); font-size: 14px; padding: 40px 20px; background: var(--st-papel); border: 1px dashed var(--st-linea); border-radius: 16px; }
.st-vacio svg { display: block; margin: 0 auto 10px; color: #C9C1AE; }
.st-vacio .btn { margin-top: 12px; }

/* ===== 7. Tablas en tarjeta ===== */
.st-tabla { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 16px; overflow: hidden; box-shadow: var(--st-sombra); }
.st-tabla .table { margin: 0; --bs-table-bg: transparent; }
.st-tabla th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--st-suave); background: #FBFAF7; border-bottom-color: var(--st-linea); padding: 10px 14px; white-space: nowrap; }
.st-tabla td { padding: 11px 14px; vertical-align: middle; border-color: var(--st-linea); }
.st-tabla tr:last-child td { border-bottom: 0; }
.st-tabla a { font-weight: 500; text-decoration: none; }
.st-tabla a:hover { text-decoration: underline; }

/* ===== 8. Tarjetas desplegables por tema (Ajustes, ficha) ===== */
.st-ajuste { --c: #57534E; --f: var(--st-hundido); background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 16px; margin-bottom: 10px; box-shadow: var(--st-sombra); transition: border-color .15s, box-shadow .15s; }
.st-ajuste.c-azul { --c: #2563EB; --f: #E7EEFD; }
.st-ajuste.c-verde { --c: #16A34A; --f: #E5F6EA; }
.st-ajuste.c-violeta { --c: #7C3AED; --f: #F0E9FE; }
.st-ajuste.c-naranja { --c: #D97706; --f: #FDF1E1; }
.st-ajuste.c-acento { --c: #0F766E; --f: #E2F2EF; }
.st-ajuste.c-rosa { --c: #DB2777; --f: #FCE7F3; }
.st-ajuste.c-gris { --c: #475569; --f: #EEF1F5; }
.st-ajuste.c-rojo { --c: #B5442E; --f: #FBEAE6; }
.st-ajuste:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .06); }
.st-ajuste[open] { border-color: var(--c); box-shadow: 0 0 0 3px var(--f), 0 4px 14px rgba(0, 0, 0, .06); }
.st-ajuste > summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.st-ajuste > summary::-webkit-details-marker { display: none; }
.st-ajuste > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin: 0 4px 4px; border-right: 2px solid var(--st-suave); border-bottom: 2px solid var(--st-suave); transform: rotate(45deg); transition: transform .15s; }
.st-ajuste[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; border-color: var(--c); }
.st-ajuste[open] > summary { border-bottom: 1px solid var(--st-linea); }
.st-ajuste-icono { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--f); display: flex; align-items: center; justify-content: center; color: var(--c); }
.st-ajuste-titulo { flex: 1; min-width: 0; font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.st-ajuste-titulo small { display: block; margin-top: 2px; font-weight: 500; font-size: 13px; color: var(--st-suave); }
.st-ajuste-cuerpo { padding: 16px 18px; }
.st-ajuste-pie { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px dashed var(--st-linea); }
.st-tarjeta { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 16px; padding: 18px; box-shadow: var(--st-sombra); }
.st-tarjeta + .st-tarjeta { margin-top: 14px; }
.st-tarjeta-titulo { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 560px) { .st-ajuste > summary { padding: 12px 14px; gap: 12px; } .st-ajuste-cuerpo { padding: 14px; } .st-tarjeta { padding: 14px; } }

/* ===== 9. Ventanas (<dialog>): centradas; en el celular suben desde abajo ===== */
.st-dialogo { width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 20px 22px; border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--st-texto); }
.st-dialogo.ancho { width: min(680px, calc(100vw - 32px)); }
.st-dialogo::backdrop { background: rgba(30, 28, 22, .45); }
.st-dialogo-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.st-dialogo-cabeza h2 { font-size: 1.1rem; margin: 0; }
.st-dialogo-cerrar { border: 0; background: none; font-size: 28px; line-height: 1; color: var(--st-suave); padding: 0 4px; }
.st-dialogo-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.st-dialogo-borrar { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--st-linea); }
@media (max-width: 640px) {
  .st-dialogo, .st-dialogo.ancho { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; padding: 18px 16px 22px; }
  .st-dialogo[open] { animation: st-subir .2s ease-out; }
}
@keyframes st-subir { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ===== 10. Pantallas de acceso y página pública ===== */
.st-acceso .st-angosto { padding-top: 12px; }
.st-acceso-tarjeta { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); padding: 28px; }
.st-acceso-tarjeta h1 { font-size: 1.4rem; margin-bottom: 4px; }
.st-acceso-tarjeta .st-sub { color: var(--st-suave); margin-bottom: 18px; }
.st-acceso-tarjeta .form-control { padding-top: 10px; padding-bottom: 10px; }
.st-acceso-pie { text-align: center; font-size: 14px; margin-top: 16px; color: var(--st-suave); }
@media (max-width: 560px) { .st-acceso-tarjeta { padding: 22px 18px; } }
.st-paso { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; }
.st-paso-n { width: 26px; height: 26px; border-radius: 50%; background: var(--st-acento); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.st-elegido { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--st-acento-suave); border: 1px solid #BFE0DA; }
.st-elegido a { font-weight: 600; text-decoration: none; }

/* ===== 11. Agenda ===== */
.st-agenda { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 16px; overflow: hidden; box-shadow: var(--st-sombra); --c: var(--st-acento); }
.st-fila { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--st-linea); min-height: 50px; color: inherit; text-decoration: none; }
.st-fila:first-child { border-top: 0; }
a.st-fila:hover { background: #FDFCFA; color: inherit; }
.st-hora { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--st-texto); }
.st-fila.libre .st-hora { font-weight: 500; color: var(--st-suave); }
.st-fila.libre { background: #FBFDFC; }
.st-fila.bloqueado { background: repeating-linear-gradient(45deg, #F6F4EF, #F6F4EF 8px, #fff 8px, #fff 16px); color: var(--st-suave); }
.st-fila.turno { box-shadow: inset 4px 0 0 var(--c); }
.st-quien { font-weight: 600; color: inherit; text-decoration: none; }
a.st-quien:hover { text-decoration: underline; }
.st-detalle { color: var(--st-suave); font-size: 13.5px; }
.st-acciones-turno { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.st-acciones-turno form { margin: 0; }
@media (max-width: 575px) { .st-fila { grid-template-columns: 52px 1fr; } .st-acciones-turno { grid-column: 1 / -1; justify-content: flex-start; } }
.st-barra-agenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.st-barra-agenda form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-right: auto; }
.st-barra-agenda .form-select { max-width: 280px; }
.st-barra-agenda input[type=date] { max-width: 170px; }
.st-semana { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.st-dia { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 12px; padding: 10px; min-height: 140px; }
.st-dia.hoy { border-color: var(--st-acento); box-shadow: 0 0 0 1px var(--st-acento); }
.st-dia h3 { font-size: 13px; margin: 0 0 8px; }
.st-dia h3 a { color: inherit; text-decoration: none; }
.st-mini { display: block; font-size: 12.5px; padding: 4px 7px; margin-bottom: 4px; border-radius: 7px; background: var(--st-hundido); color: inherit; text-decoration: none; box-shadow: inset 3px 0 0 var(--c, var(--st-acento)); }
.st-mini:hover { background: #ECE8DF; color: inherit; }
.st-horarios { display: flex; flex-wrap: wrap; gap: 6px; }
.st-horarios a, .st-horarios button { padding: 6px 12px; border: 1px solid var(--st-linea); border-radius: 10px; background: #fff; color: var(--st-texto); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 500; font-size: 14px; }
.st-horarios a:hover, .st-horarios button:hover { border-color: var(--st-acento); color: var(--st-acento-oscuro); background: var(--st-acento-suave); }
.st-dia-titulo { font-size: 13px; font-weight: 700; margin: 14px 0 6px; color: var(--st-texto); }
.st-dia-titulo:first-child { margin-top: 0; }

/* ===== 12. Historial y registro clínico ===== */
.st-historial { list-style: none; padding: 0; margin: 0; }
.st-historial li { position: relative; padding: 0 0 14px 20px; font-size: 14px; }
.st-historial li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--st-acento); }
.st-historial li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--st-linea); }
.st-historial li:last-child::after { display: none; }
.st-historial small { display: block; color: var(--st-suave); font-size: 12.5px; }
.st-entrada { background: var(--st-papel); border: 1px solid var(--st-linea); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--st-sombra); }
.st-entrada.enmienda { margin-left: 28px; border-left: 4px solid var(--st-ambar); }
.st-entrada.anulada { background: #FBFAF7; }
.st-entrada-cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--st-suave); margin-bottom: 6px; }
.st-entrada-cabeza b { color: var(--st-texto); }
.st-entrada-texto { white-space: pre-wrap; }
.st-entrada.anulada .st-entrada-texto { text-decoration: line-through; color: var(--st-suave); }
.st-entrada-acciones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13.5px; }
.st-entrada-acciones summary { cursor: pointer; color: var(--st-acento-oscuro); font-weight: 500; }
.st-adjunto { display: inline-flex; align-items: center; gap: 6px; margin: 6px 8px 0 0; padding: 4px 10px; border-radius: 8px; background: var(--st-hundido); font-size: 13px; }
.st-adjunto a { text-decoration: none; font-weight: 500; }
@media (max-width: 560px) { .st-entrada.enmienda { margin-left: 12px; } }

/* ===== 13. Superadmin ===== */
.st-super .st-logo { background: var(--st-texto); box-shadow: none; }
.st-subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.st-subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--st-linea); background: #fff; color: var(--st-suave); font-size: 14px; font-weight: 600; text-decoration: none; }
.st-subnav a:hover { border-color: var(--st-texto); color: var(--st-texto); }
.st-subnav a.active { background: var(--st-texto); border-color: var(--st-texto); color: #fff; }
.st-modulo-fila.ok > td { background: #F1F8F3; }
.st-modulo-fila.ok > td:first-child { box-shadow: inset 4px 0 0 #2E8B5C; }
.st-modulo-fila.falta > td:first-child { box-shadow: inset 4px 0 0 #D9921E; }
.st-modulo-fila.apagado > td { color: var(--st-suave); }

/* ===== 14. Avisos, carga y contraseñas ===== */
.st-flash { transition: opacity .4s, margin .4s, padding .4s, max-height .4s; max-height: 200px; overflow: hidden; }
.st-flash.saliendo { opacity: 0; max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.st-cargando-barra { position: fixed; top: 0; left: 0; z-index: 3000; height: 3px; width: 0; opacity: 0; pointer-events: none; background: var(--st-acento); box-shadow: 0 0 8px rgba(15, 118, 110, .6); transition: opacity .2s; }
.st-cargando-barra.activa { opacity: 1; width: 15%; }
.st-cargando-barra.avanza { width: 90%; transition: width 10s cubic-bezier(.08, .7, .2, 1), opacity .2s; }
.st-cargando-rueda { position: fixed; top: 12px; right: 12px; z-index: 3000; width: 34px; height: 34px; border-radius: 50%; opacity: 0; pointer-events: none; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transition: opacity .2s; }
.st-cargando-rueda.activa { opacity: 1; }
.st-cargando-rueda::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 3px solid #E6E1D7; border-top-color: var(--st-acento); animation: st-gira .7s linear infinite; }
@keyframes st-gira { to { transform: rotate(360deg); } }
.st-clave { position: relative; display: block; }
.st-clave input { padding-right: 42px; }
.st-clave-ojo { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); border: 0; background: transparent; color: var(--st-suave); padding: 6px; line-height: 0; }
.st-trampa { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ===== 15. Anchos por zona ===== */
.st-publica .st-angosto { max-width: 680px; }
.st-tarjeta.plana { box-shadow: none; background: #FBFAF7; }
.st-duracion { width: 110px; }
