:root {
  font-family: Montserrat, system-ui, sans-serif;
  color: #201e1d;
  background: #f6f3ee;
  --tinta: #211e1d;
  --muted: #655d56;
  --borde: #e4dcd2;
  --coral: #e95a36;
  --papel: #fffdf9;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
button, select { font: inherit; }
button { cursor: pointer; }
a, button { transition: background-color .18s, color .18s, transform .18s; }
:focus-visible { outline: 3px solid #bc482a; outline-offset: 3px; }
button:active { transform: translateY(1px); }
.icono { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.saltar { position: absolute; z-index: 2; padding: 12px; background: var(--papel); transform: translateY(-120%); }
.saltar:focus { transform: none; }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 42px); border-bottom: 1px solid var(--borde); background: var(--papel); min-height: 64px; }
.barra img { display: block; width: 118px; max-width: 100%; }
.barra-enlaces { display: flex; gap: clamp(10px, 2vw, 24px); align-items: center; }
.barra-enlaces a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; font-size: .8rem; font-weight: 700; text-decoration: none; }
.barra-enlaces a:hover { color: #a4371e; }
.barra-enlaces .registro { border: 1px solid var(--borde); padding: 6px 14px; border-radius: 8px; }
.panel { display: grid; grid-template-columns: minmax(210px, 16rem) minmax(0, 1fr); min-height: calc(100dvh - 64px); }
aside { background: var(--tinta); color: #f9f3ea; padding: 26px 16px; }
.negocio { display: flex; align-items: center; gap: 11px; padding: 0 8px 23px; margin-bottom: 16px; border-bottom: 1px solid #4a403b; }
.negocio > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #ed9c76; color: var(--tinta); flex: none; }
.negocio strong { font-size: .86rem; }
.negocio small { color: #d3c2b8; }
small { display: block; color: var(--muted); margin-top: 4px; font-size: .74rem; }
nav { display: grid; gap: 5px; }
nav a { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 9px 11px; border-radius: 9px; color: #ded3cc; font-size: .83rem; font-weight: 650; text-decoration: none; }
nav a:hover { background: #352d29; }
nav a[aria-current] { background: #483128; color: #fff6eb; box-shadow: inset 3px 0 #ef805c; }
nav a[aria-current] .icono { color: #f79c7f; }
.nav-cuenta { margin-left: auto; background: #55443c; color: #fff6eb; min-width: 20px; padding: 2px 5px; border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; }
main { width: 100%; max-width: 1320px; margin-inline: auto; padding: clamp(18px, 3.7vw, 48px); }
.aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; color: var(--muted); font-size: .73rem; margin-bottom: 20px; }
.aviso strong { border: 1px solid #eacbb9; padding: 4px 8px; border-radius: 5px; background: #f9e9dd; color: #78391f; }
.resultado { background: #e5efe5; color: #254829; border: 1px solid #c8dcc8; padding: 11px 13px; border-radius: 8px; margin-bottom: 14px; font-size: .8rem; }
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1, h2 { font-family: Archivo, Montserrat, system-ui, sans-serif; }
h1 { font-size: clamp(2rem, 4.3vw, 3.6rem); letter-spacing: -.045em; font-weight: 820; line-height: 1.04; }
h2 { font-size: 1.14rem; letter-spacing: -.018em; }
.cabecera p { color: var(--muted); margin-top: 8px; font-size: .85rem; line-height: 1.55; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; border: 0; border-radius: 9px; background: var(--coral); color: #211b17; padding: 9px 14px; font-size: .82rem; font-weight: 750; }
button:hover { background: #f47956; }
button.secundario { background: #f0eae1; }
button.secundario:hover { background: #e6dbcf; }
#anotar { flex: none; }
.indicadores { display: grid; grid-template-columns: 1.23fr 1fr 1fr; gap: 12px; margin-bottom: 17px; }
.indicadores article, .tarjeta, dialog { min-width: 0; border: 1px solid var(--borde); border-radius: 14px; background: var(--papel); padding: 17px; }
.indicadores article { display: grid; align-content: start; gap: 6px; }
.indicadores article > span { color: var(--muted); font-size: .75rem; font-weight: 650; }
.indicadores article [data-icono] { color: #9e3f24; margin-bottom: 3px; }
.indicadores article strong { font-family: Archivo, Montserrat, sans-serif; font-variant-numeric: tabular-nums; font-size: clamp(1.12rem, 3.1vw, 2.25rem); letter-spacing: -.04em; line-height: 1.05; }
.indicadores .indicador-destacado { background: #fae7db; border-color: #ecd2c1; }
.resumen { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.agenda-resumen { grid-row: span 2; }
.tarjeta-cab { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.tarjeta-cab a { color: #89371e; font-size: .72rem; font-weight: 750; text-decoration: none; }
.tarjeta-cab a:hover { text-decoration: underline; }
.fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 12px 0; font-size: .84rem; }
.fila:last-child { padding-bottom: 4px; }
.fila + .fila, #atendiendo:not(:empty) .fila { border-top: 1px solid #eee7dd; }
.fila-detalle { flex: 1; min-width: 0; }
.cita time { display: grid; place-items: center; flex: none; padding: 6px; min-width: 54px; border-radius: 8px; background: #f2ece3; color: var(--tinta); font-variant-numeric: tabular-nums; font-weight: 750; }
.cita time small { font-size: .61rem; margin-top: 1px; }
.estado { display: inline-flex; flex: none; gap: 5px; align-items: center; border-radius: 6px; padding: 5px 7px; background: #e4eee3; color: #254829; font-size: .68rem; font-weight: 700; }
.estado::before, .reparto-leyenda dt::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.estado-atencion { background: #f9e8d8; color: #724223; }
.vacio, #sin-espera { padding: 9px 0; color: var(--muted); font-size: .8rem; }
.reparto { height: 8px; margin: 15px 0 11px; border-radius: 5px; overflow: hidden; background: #564a42; }
.reparto span { display: block; height: 100%; background: var(--coral); transition: width .25s; }
.reparto-leyenda { display: grid; gap: 8px; font-size: .74rem; }
.reparto-leyenda div, .reparto-leyenda dt { display: flex; align-items: center; gap: 6px; }
.reparto-leyenda div { justify-content: space-between; }
.reparto-leyenda dt { color: var(--muted); }
.reparto-leyenda dt::before { background: var(--coral); }
.reparto-leyenda div + div dt::before { background: #564a42; }
.reparto-leyenda dd { font-weight: 750; font-variant-numeric: tabular-nums; }
dialog { width: min(420px, calc(100% - 32px)); padding: 22px; color: inherit; }
dialog::backdrop { background: #211e1d8c; }
form { display: grid; gap: 12px; }
label, select { display: block; width: 100%; font-size: .83rem; }
select { min-height: 44px; padding: 9px; border: 1px solid var(--borde); border-radius: 8px; margin-top: 4px; background: white; color: inherit; }
.acciones { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1050px) { .resumen { grid-template-columns: 1fr 1fr; } .agenda-resumen { grid-column: 1/-1; grid-row: auto; } }
@media (max-width: 760px) {
  .panel { display: block; }
  aside { padding: 12px 14px 10px; }
  .negocio { margin-bottom: 8px; padding: 0 0 10px; }
  .negocio > span { width: 35px; height: 35px; }
  nav { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  nav a { flex-direction: column; justify-content: center; text-align: center; gap: 5px; padding: 6px 3px; font-size: .67rem; min-height: 49px; }
  nav a[aria-current] { box-shadow: inset 0 -2px #ef805c; }
  .nav-cuenta { display: none; }
  main { padding: 16px 14px 25px; }
  .cabecera { flex-wrap: wrap; margin-bottom: 16px; }
}
@media (max-width: 500px) {
  .barra { gap: 8px; padding: 8px 13px; }
  .barra img { width: 87px; }
  .barra-enlaces { gap: 8px; }
  .barra-enlaces a { font-size: .66rem; }
  .barra-enlaces a [data-icono] { display: none; }
  .barra-enlaces .registro { padding: 5px 7px; }
  .indicadores { gap: 6px; }
  .indicadores article { padding: 10px 7px; }
  .indicadores article > span { font-size: .67rem; }
  .resumen { grid-template-columns: minmax(0, 1fr); }
  .tarjeta { padding: 12px; }
  .fila { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
