.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--grad); color: var(--on-accent); font-family: var(--display); font-weight: 600; flex: none; }

/* ---------- Acceso ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(700px circle at 20% 10%, color-mix(in srgb, var(--glow-1) 35%, transparent), transparent 60%), radial-gradient(600px circle at 90% 90%, color-mix(in srgb, var(--accent-2) 25%, transparent), transparent 60%); }
.login-card { width: min(100%, 400px); display: grid; gap: 1.1rem; padding: 2.4rem; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 85%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.9rem; }
.login-card a { text-align: center; }

/* ---------- Estructura ---------- */
.app { min-height: 100vh; }
/* Menú hamburguesa: panel que se desliza desde la izquierda, en todos los tamaños de pantalla */
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; width: min(86vw, 290px); display: flex; flex-direction: column; gap: 1.3rem; padding: 1.2rem 1rem; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-2); border-right: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-104%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.28s; }
.app.menu-open .sidebar { transform: none; visibility: visible; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.menu-backdrop { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } }
.menu-close { margin-left: auto; }
.head-left { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.head-left h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { position: relative; flex: none; display: grid; align-content: center; justify-items: center; gap: 5px; width: 2.9rem; height: 2.9rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color 0.2s ease, transform 0.15s ease; }
.menu-toggle:hover { border-color: var(--accent); }
.menu-toggle:active { transform: scale(0.95); }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); }
.menu-count { position: absolute; top: -0.45rem; right: -0.45rem; min-width: 1.3rem; padding: 0.05rem 0.35rem; border-radius: var(--pill); background: var(--danger); color: #fff; font-size: 0.7rem; font-style: normal; font-weight: 800; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .sidebar, .app.menu-open .sidebar { transition: none; } }
.side-brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-size: 1.15rem; padding: 0 0.4rem; }
#menu { display: grid; gap: 0.25rem; flex: 1; align-content: start; }
#menu button { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.7rem 0.9rem; border-radius: 12px; border: 0; background: none; font-weight: 700; font-size: 0.93rem; color: var(--muted); cursor: pointer; text-align: left; transition: all 0.2s ease; }
#menu button:hover { color: var(--text); background: var(--hover); }
#menu button.active { color: var(--on-accent); background: var(--grad); }
#menu .ico { width: 1.2rem; text-align: center; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.9rem; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.side-user strong { display: block; font-size: 0.9rem; }
.side-user small { color: var(--muted); font-size: 0.75rem; text-transform: capitalize; }

.main { padding: clamp(1.2rem, 3vw, 2.4rem); min-width: 0; }
.main-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.main-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.head-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.panel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 1.3rem; }
.panel h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.2rem; align-items: start; }
.stack { display: grid; gap: 1.2rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Resumen ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { position: relative; overflow: hidden; padding: 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform 0.3s ease, border-color 0.3s ease; }
.stat:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--grad); opacity: 0.1; }
.stat > span { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat strong { display: block; font-family: var(--display); font-size: 2.3rem; line-height: 1.2; margin-top: 0.3rem; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.6rem; align-items: end; height: 150px; }
.bar { display: grid; gap: 0.35rem; justify-items: center; align-content: end; height: 100%; font-size: 0.75rem; color: var(--muted); }
.bar i { width: 100%; max-width: 38px; min-height: 4px; border-radius: 8px 8px 3px 3px; background: var(--grad); transition: height 0.6s ease; }
.bar b { color: var(--text); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.mini-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border: 0; padding: 0; }

/* ---------- Citas ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; margin-bottom: 1.2rem; }
.filters .field { min-width: 150px; }
.filters .field input, .filters .field select { padding: 0.6rem 0.8rem; }
.quick { display: flex; gap: 0.4rem; }
.day-title { font-family: var(--body); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 1.4rem 0 0.6rem; }
.day-title:first-child { margin-top: 0; }
.appt { display: grid; grid-template-columns: 92px 1.3fr 1fr auto auto; gap: 1rem; align-items: center; padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); margin-bottom: 0.5rem; transition: border-color 0.2s ease, transform 0.2s ease; }
.appt:hover { transform: translateX(3px); }
.appt.off { opacity: 0.55; }
.appt-time strong { display: block; font-family: var(--display); font-size: 1.25rem; line-height: 1.1; }
.appt small { color: var(--muted); font-size: 0.8rem; }
.appt-who strong, .appt-what strong { display: block; font-size: 0.95rem; }
.appt-note { grid-column: 2 / -1; font-size: 0.82rem; color: var(--muted); font-style: italic; }
.row-actions { display: flex; gap: 0.35rem; }
.icon-btn { width: 2.2rem; height: 2.2rem; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center; transition: all 0.2s ease; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.status { padding: 0.4rem 0.7rem; border-radius: var(--pill); border: 1px solid transparent; font-size: 0.8rem; font-weight: 800; cursor: pointer; background: var(--chip); }
.status option { background: var(--surface); color: var(--text); }
.status.pendiente { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.status.confirmada { color: var(--info); background: color-mix(in srgb, var(--info) 14%, transparent); }
.status.completada { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.status.cancelada, .status.no_presentado { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- Tarjetas de gestión ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mcard { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.mcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--shadow); }
.mcard.inactive { opacity: 0.55; }
.mcard .ph { aspect-ratio: 16 / 10; }
.mcard-body { padding: 1.1rem; display: grid; gap: 0.5rem; flex: 1; align-content: start; }
.mcard-body h3 { font-size: 1.2rem; }
.mcard-foot { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1.1rem 1.1rem; }
.person-head { display: flex; align-items: center; gap: 0.9rem; }
.person-head .ph { width: 3.6rem; height: 3.6rem; border-radius: 50%; flex: none; aspect-ratio: auto; border: 2px solid var(--c, var(--accent)); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag { padding: 0.2rem 0.6rem; border-radius: var(--pill); font-size: 0.72rem; font-weight: 700; background: var(--chip); color: var(--muted); }
.tag.accent { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.tag.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.tag.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.price-line strong { font-family: var(--display); font-size: 1.4rem; }
.stock { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.stock b { min-width: 2.4rem; text-align: center; font-family: var(--display); font-size: 1.3rem; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.85rem 1rem; text-align: left; white-space: nowrap; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
tbody tr { border-bottom: 1px solid var(--line); transition: background 0.15s ease; }
tbody tr:last-child { border: 0; }
tbody tr:hover { background: var(--hover); }
td.num, th.num { text-align: right; }

/* ---------- Ventanas ---------- */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); width: min(94vw, 560px); max-height: 92vh; }
dialog.wide { width: min(94vw, 760px); }
dialog::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: modal-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.modal-card { display: flex; flex-direction: column; max-height: 92vh; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.modal-card > header, .modal-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 1.1rem 1.4rem; }
.modal-card > header { border-bottom: 1px solid var(--line); }
.modal-card > header h3 { font-size: 1.35rem; }
.modal-card > footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.modal-body { padding: 1.4rem; overflow-y: auto; display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.5rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin: 0; display: grid; gap: 0.7rem; }
legend { padding: 0 0.5rem; font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.sched-row { display: grid; grid-template-columns: 100px repeat(2, 1fr) 14px repeat(2, 1fr); gap: 0.4rem; align-items: center; font-size: 0.88rem; }
.sched-row input { padding: 0.45rem 0.5rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--field); width: 100%; min-width: 0; }
.sched-row i { text-align: center; color: var(--muted); font-style: normal; }
.secret { padding: 1rem; border-radius: var(--radius-sm); background: var(--field); border: 1px dashed var(--accent); font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem; text-align: center; letter-spacing: 0.08em; user-select: all; }
input[type='color'] { width: 100%; height: 2.9rem; padding: 0.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--field); }
.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: 0.92rem; }

/* Dentro de un panel (resumen) la fila es más estrecha: servicio bajo el cliente */
@media (min-width: 901px) {
  .panel .appt { grid-template-columns: 84px 1fr auto auto; row-gap: 0.15rem; }
  .panel .appt-time, .panel .appt .status, .panel .appt .row-actions { grid-row: span 2; }
  .panel .appt-what { grid-column: 2; grid-row: 2; }
  .panel .appt-what strong { font-weight: 500; font-size: 0.88rem; color: var(--muted); }
}

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .appt { grid-template-columns: 76px 1fr auto; }
  .appt-what { grid-column: 2; }
  .appt .status { grid-column: 2; justify-self: start; }
  .appt .row-actions { grid-row: 1; grid-column: 3; }
  .form-grid { grid-template-columns: 1fr; }
  .sched-row { grid-template-columns: 78px repeat(2, 1fr); }
  .sched-row i { display: none; }
  .sched-row input:nth-of-type(3) { grid-column: 2; }
}

/* ---------- Cobro y ticket ---------- */
.line { display: grid; grid-template-columns: 1fr auto 5.5rem; gap: 0.8rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.line small { display: block; color: var(--muted); font-size: 0.8rem; }
.line .stock { margin: 0; }
.line-total { text-align: right; }
.total-box { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.total-box strong { font-family: var(--display); font-size: 2rem; }
tr.voided td { opacity: 0.5; text-decoration: line-through; }
tr.voided td:last-child, tr.voided td:nth-child(5) { opacity: 1; text-decoration: none; }

.ticket { width: 100%; max-width: 72mm; margin: 0 auto; padding: 5mm 4mm; background: #fff; color: #000; font-family: ui-monospace, 'Courier New', monospace; font-size: 12px; line-height: 1.45; text-align: center; border-radius: 4px; }
.ticket p { margin: 0; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket .t-title { font-size: 15px; font-weight: 700; }
.ticket .t-row { display: flex; justify-content: space-between; gap: 8px; text-align: left; }
.ticket .t-row span:last-child { text-align: right; white-space: nowrap; }
.ticket .t-total { font-size: 16px; font-weight: 700; margin: 4px 0; }
#receipt { display: none; }

/* Al imprimir solo sale el ticket */
@media print {
  @page { margin: 3mm; }
  html, body { background: #fff !important; }
  body > *:not(#receipt) { display: none !important; }
  #receipt { display: block; }
  #receipt .ticket { max-width: none; padding: 0; border-radius: 0; }
}

/* ---------- Modo mostrador ---------- */
.kiosk { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 2rem; padding: 2rem 1.2rem; text-align: center; background: radial-gradient(700px circle at 20% 10%, color-mix(in srgb, var(--glow-1) 35%, transparent), transparent 60%), radial-gradient(600px circle at 90% 90%, color-mix(in srgb, var(--accent-2) 25%, transparent), transparent 60%); }
.kiosk-head { display: flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-size: 1.3rem; }
.kiosk-step { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; width: 100%; }
.kiosk-step h1 { font-size: clamp(2rem, 5vw, 3rem); }
.kiosk-staff { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-top: 1.5rem; max-width: 1100px; }
.kiosk-person { width: 170px; display: grid; justify-items: center; gap: 0.9rem; padding: 1.4rem 1rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 80%, transparent); cursor: pointer; font-size: 1.05rem; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.kiosk-person:hover, .kiosk-person:focus-visible { transform: translateY(-5px); border-color: var(--c, var(--accent)); box-shadow: var(--shadow); }
.kiosk-person .ph, .kiosk-avatar { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--c, var(--accent)); }
.pin-dots { display: flex; gap: 1rem; margin: 0.6rem 0 1rem; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all 0.15s ease; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.pin-dots.shake { animation: shake 0.4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 0.8rem; }
.keypad button { height: 84px; border-radius: 50%; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 80%, transparent); font-family: var(--display); font-size: 1.9rem; cursor: pointer; transition: background 0.15s ease, transform 0.1s ease; }
.keypad button:hover { border-color: var(--accent); }
.keypad button:active { background: var(--grad); color: var(--on-accent); transform: scale(0.94); }
.keypad .key-alt { font-family: var(--body); font-size: 0.78rem; font-weight: 700; color: var(--muted); border-color: transparent; background: none; }
.kiosk-exit { border: 0; background: none; color: var(--muted); font-size: 0.82rem; cursor: pointer; text-decoration: underline; }

/* ---------- Informes ---------- */
.rank { display: grid; grid-template-columns: 1.6rem 3rem 1fr; gap: 0.9rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.rank:last-child { border: 0; }
.rank-pos { font-family: var(--display); font-size: 1.4rem; color: var(--muted); text-align: center; }
.rank .ph { width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--c, var(--accent)); }
.rank-top { display: flex; justify-content: space-between; gap: 1rem; }
.rank-bar { height: 8px; margin: 0.4rem 0 0.3rem; border-radius: var(--pill); background: var(--chip); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: var(--pill); background: var(--c, var(--accent)); }

/* ---------- Actividad ---------- */
.activity { padding: 0.4rem 1.3rem; }
.act { display: grid; grid-template-columns: 3.2rem 10rem 8.5rem 1fr; gap: 0.9rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.act:last-child { border: 0; }
.act time { color: var(--muted); font-variant-numeric: tabular-nums; }
.act .tag { justify-self: start; }
@media (max-width: 900px) {
  .act { grid-template-columns: 3.2rem 1fr auto; row-gap: 0.2rem; }
  .act span:last-child { grid-column: 2 / -1; }
}

.form-error { margin: 0 1.4rem 1rem; padding: 0.8rem 1rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 14%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); font-size: 0.92rem; font-weight: 500; }

.after-charge { display: grid; gap: 0.7rem; justify-items: start; }

/* =================== Sistema nuevo =================== */

/* Selector de negocio */
.biz-switch { display: grid; gap: 0.3rem; }
.biz-switch select { width: 100%; padding: 0.6rem 0.8rem; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--field); font-weight: 700; }
.biz-switch small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding-left: 0.2rem; }
.side-sep { height: 1px; background: var(--line); margin: 0.2rem 0; }

/* Barra de fecha de la agenda */
.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.datebar strong { font-family: var(--display); font-size: 1.3rem; font-weight: 400; margin: 0 0.6rem; }
.datebar input[type='date'] { padding: 0.5rem 0.7rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); }

/* Agenda visual: una columna por profesional */
.agenda { --k: 1.15px; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.agenda-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.8rem; background: var(--bg-2); border-bottom: 1px solid var(--line-strong); border-left: 1px solid var(--line); font-weight: 800; font-size: 0.88rem; white-space: nowrap; }
.agenda-head:first-child { border-left: 0; }
.agenda-head i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--c); flex: none; }
.agenda-head small { color: var(--muted); font-weight: 600; }
.agenda-times, .agenda-col { position: relative; height: calc(var(--span) * var(--k)); }
.agenda-col { border-left: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--hover) 0 6px, transparent 6px 12px); }
.agenda-col.off { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 10%, transparent) 0 6px, transparent 6px 12px); }
.agenda-times span { position: absolute; right: 0.5rem; transform: translateY(-50%); font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.work-block { position: absolute; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); cursor: copy; }
.work-block:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.appt-block { position: absolute; left: 4px; right: 4px; z-index: 2; overflow: hidden; padding: 0.35rem 0.5rem; border-radius: 9px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); font-size: 0.78rem; line-height: 1.3; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; color: var(--text); }
.appt-block:hover { transform: translateX(2px); box-shadow: var(--shadow); z-index: 4; }
.appt-block strong { display: block; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-block span { display: block; color: color-mix(in srgb, var(--text) 72%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-block.pendiente { border-left-style: dashed; }
.appt-block.cancelada, .appt-block.no_presentado { opacity: 0.4; text-decoration: line-through; }
.appt-block.completada { filter: saturate(0.4); }
.now-line { position: absolute; left: 0; right: 0; z-index: 5; border-top: 2px solid var(--danger); pointer-events: none; }
.agenda-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.8rem; font-size: 0.8rem; color: var(--muted); }

/* Huecos libres al dar cita */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 0.4rem; max-height: 14rem; overflow-y: auto; }
.slot { padding: 0.5rem 0; border-radius: 9px; border: 1px solid var(--line-strong); background: transparent; font-weight: 700; cursor: pointer; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.selected { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-check { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: var(--pill); border: 1px solid var(--line-strong); cursor: pointer; font-size: 0.86rem; }
.chip-check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.chip-check input { accent-color: var(--accent); }
.results { display: grid; gap: 0.3rem; margin-top: 0.4rem; }
.results button { text-align: left; padding: 0.5rem 0.8rem; border-radius: 9px; border: 1px solid var(--line); background: var(--sunken); cursor: pointer; }
.results button:hover { border-color: var(--accent); }

/* Listas genéricas */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { min-width: 200px; }
.swatch { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c); vertical-align: -0.05rem; margin-right: 0.4rem; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: 0.4rem 1rem; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: 2.2rem; letter-spacing: 0.3em; text-align: center; padding: 1rem; border-radius: var(--radius-sm); border: 1px dashed var(--accent); background: var(--field); user-select: all; }
.pre { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; background: var(--field); padding: 0.8rem; border-radius: 10px; max-height: 12rem; overflow: auto; }
@media (max-width: 900px) {
  .agenda { --k: 1px; grid-template-columns: 44px repeat(var(--cols), minmax(130px, 1fr)); }
}

/* ---------- Cobro ---------- */
.checkout { display: grid; gap: 1rem; }
.checkout .lines { display: grid; }
.line.done { opacity: 0.55; }
.line .qty { display: flex; align-items: center; gap: 0.4rem; }
.line .qty span { min-width: 1.6rem; text-align: center; font-weight: 800; }
.line .qty .icon-btn { width: 1.9rem; height: 1.9rem; }
.line-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 0.25rem; font-size: 0.78rem; }
.line-acts select { padding: 0.15rem 0.3rem; border-radius: 8px; font-size: 0.78rem; }
.checkout .line { grid-template-columns: 1fr auto 8rem; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; justify-self: start; }
.link.danger { color: var(--danger); }
.add-line select { width: 100%; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.seg { padding: 0.8rem 0.5rem; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--sunken); font-weight: 800; cursor: pointer; color: var(--muted); }
.seg.on { color: var(--on-accent); background: var(--grad); border-color: transparent; }
.change { display: grid; align-content: end; padding-bottom: 0.4rem; }
.change strong { font-family: var(--display); font-size: 1.5rem; font-weight: 500; }
.tag.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.stat small { display: block; margin-top: 0.2rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.8rem; margin-top: 1rem; }
.open-cash { margin-bottom: 1.2rem; }
@media (max-width: 560px) {
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
  .checkout .line { grid-template-columns: 1fr auto; }
  .checkout .line .line-total { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}

/* La primera hora de la agenda no queda bajo la cabecera fija */
.agenda-times, .agenda-col { margin-top: 0.8rem; margin-bottom: 0.4rem; }

/* ---------- Panel del negocio ---------- */
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--c); margin-right: 0.45rem; vertical-align: 0.02rem; }
.stat.hero { grid-column: span 2; }
.stat strong { font-size: clamp(1.5rem, 2.6vw, 2.1rem); white-space: nowrap; }
.stat.hero strong { font-size: clamp(2rem, 4vw, 2.8rem); }
.stat small { font-size: 0.8rem; }
.stat strong.neg { color: var(--danger); }
.delta { font-weight: 800; font-size: 0.85rem; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; }
.chart-head h2 { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--muted); }
.legend i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; background: var(--c); margin-right: 0.4rem; vertical-align: -0.1rem; }
.dchart { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; height: 200px; padding-top: 0.5rem; border-bottom: 1px solid var(--line-strong); }
.dcol { display: grid; grid-template-rows: 1fr auto; min-width: 0; cursor: default; }
.dcol:hover .dstack { background: var(--hover); }
.dstack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; height: 100%; border-radius: 4px 4px 0 0; }
.dstack i { display: block; width: min(100%, 34px); margin: 0 auto; background: var(--c); border-radius: 2px; min-height: 2px; }
.dstack i:last-child { border-radius: 4px 4px 2px 2px; }
.dcol small { text-align: center; font-size: 0.7rem; color: var(--muted); padding: 0.35rem 0 0.2rem; white-space: nowrap; overflow: hidden; }
.dtip { position: absolute; top: 0; transform: translateX(-50%); z-index: 5; white-space: pre-line; pointer-events: none; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 0.8rem; line-height: 1.45; min-width: 130px; }
.dtable { margin-top: 1rem; }
.dtable summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.6rem; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.biz-card { border-top: 3px solid var(--c); }
.biz-card h3 { font-family: var(--body); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 1.3rem 0 0.6rem; }
.biz-total strong { display: block; font-family: var(--display); font-size: 2.1rem; font-weight: 500; }
.biz-card .notice { margin-top: 0.8rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 1rem; }
.kpis div { padding: 0.7rem; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.kpis span { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.kpis strong { font-size: 1.05rem; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.hbars li { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 0.7rem; align-items: center; font-size: 0.9rem; }
.hbars i { display: block; height: 10px; border-radius: 2px 4px 4px 2px; background: var(--c); }
.alerts { margin-bottom: 1.2rem; border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.alerts li { align-items: center; }
@media (max-width: 700px) {
  .stat.hero { grid-column: auto; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cobro en el bar: partes y pagos mixtos ---------- */
.line-name { display: flex; align-items: flex-start; gap: 0.7rem; }
.pick { width: 1.3rem; height: 1.3rem; margin-top: 0.15rem; accent-color: var(--accent); flex: none; }
.line.skipped { opacity: 0.45; }
.split-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.chip-btn { min-width: 2.4rem; padding: 0.35rem 0.7rem; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--hover); font-weight: 800; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.parts { display: grid; gap: 0.5rem; }
.part { display: grid; grid-template-columns: 1fr 8rem auto; gap: 0.5rem; align-items: center; }
.part select, .part input { padding: 0.7rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--field); }
.warn-text { color: var(--warn); font-weight: 700; }
.guests { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: 0.5rem; margin: 0.8rem 0; }
.guests .seg { display: grid; gap: 0.1rem; font-size: 1.1rem; }
.guests .seg small { font-size: 0.7rem; font-weight: 600; }

/* ---------- Sala: plano de mesas ---------- */
.ftabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.ftabs button { padding: 0.65rem 1.1rem; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--hover); font-weight: 800; font-family: var(--display); letter-spacing: 0.03em; cursor: pointer; color: var(--muted); }
.ftabs button.on { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.ftabs button small { opacity: 0.75; font-family: var(--body); }
.ftabs .ghost-tab { border-style: dashed; }
.fplan { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(92px, auto)); gap: 0.6rem; padding: 0.8rem; border-radius: var(--radius); background: var(--sunken); border: 1px solid var(--line); }
.fplan.editing { grid-template-columns: repeat(var(--cols), minmax(56px, 1fr)); overflow-x: auto; }
.ftable { position: relative; display: grid; align-content: center; justify-items: center; gap: 0.15rem; min-height: 92px; padding: 0.5rem 0.4rem; border-radius: var(--radius-sm); border: 2px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; text-align: center; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.ftable:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ftable.redonda { border-radius: 50%; aspect-ratio: 1; }
.ftable strong { font-family: var(--display); font-size: 1.35rem; line-height: 1; }
.ftable small { font-size: 0.72rem; color: var(--muted); }
.ftable .famount { font-weight: 800; font-size: 0.95rem; }
.ftable em { position: absolute; top: -0.55rem; right: -0.3rem; padding: 0.1rem 0.45rem; border-radius: var(--pill); font-size: 0.66rem; font-style: normal; font-weight: 800; }
.ftable.busy { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.ftable.unsent { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.ftable.unsent em { background: var(--warn); color: var(--on-accent); }
.ftable.ready { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); animation: ready-pulse 1.6s ease-in-out infinite; }
.ftable.ready em { background: var(--ok); color: var(--bg); }
.ftable.moving { outline: 3px dashed var(--accent); outline-offset: 3px; }
@keyframes ready-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 25%, transparent); } }
.fcell { border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; min-height: 56px; }
.fcell:hover { border-color: var(--accent); color: var(--accent); }
.flegend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.8rem; font-size: 0.8rem; color: var(--muted); }
.flegend span::before { content: ''; display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -0.1rem; border: 2px solid var(--line-strong); }
.flegend .busy::before { border-color: var(--accent); }
.flegend .unsent::before { border-color: var(--warn); }
.flegend .ready::before { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 30%, transparent); }
.fsub { font-size: 1.2rem; margin: 1.6rem 0 0.8rem; }
.fbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }

/* ---------- Comanda de una mesa ---------- */
.order-screen { display: grid; gap: 0.8rem; }
.ohead { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ohead h2 { font-size: 1.5rem; }
.ohead > div { flex: 1; min-width: 0; }
.ohead-total { font-family: var(--display); font-size: 1.6rem; white-space: nowrap; }
.otabs { display: none; }
.obody { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; align-items: start; }
.omenu, .obill { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 0.9rem; }
.ocats { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
.ocats button, .ocourse button { flex: none; padding: 0.55rem 0.95rem; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--hover); font-weight: 800; cursor: pointer; color: var(--muted); }
.ocats button.on { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.ocourse { display: flex; align-items: center; gap: 0.35rem; margin: 0.3rem 0 0.8rem; }
.ocourse button { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.ocourse button.on { border-color: var(--accent); color: var(--accent); }
.oitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.55rem; }
.oitem { display: grid; gap: 0.25rem; align-content: start; min-height: 84px; padding: 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: transform 0.12s ease, border-color 0.2s ease; }
.oitem:hover { border-color: var(--accent); }
.oitem:active { transform: scale(0.97); }
.oitem strong { font-size: 0.98rem; line-height: 1.25; }
.oitem span { font-size: 0.85rem; color: var(--accent); font-weight: 800; }
.oitem em { font-style: normal; color: var(--muted); font-weight: 600; }
.oitem.bump { animation: bump 0.35s ease; }
@keyframes bump { 40% { transform: scale(0.94); border-color: var(--ok); } }
.olines { list-style: none; margin: 0; padding: 0; display: grid; }
.oline { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: start; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.oline.done { opacity: 0.5; }
.oqty { display: flex; align-items: center; gap: 0.3rem; }
.oqty b { min-width: 1.4rem; text-align: center; font-size: 1.05rem; }
.oqty .icon-btn { width: 1.9rem; height: 1.9rem; }
.oname { display: grid; gap: 0.1rem; min-width: 0; }
.oname small { color: var(--muted); font-size: 0.8rem; }
.oname .onote { color: var(--warn); font-weight: 700; }
.oacts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.25rem; font-size: 0.8rem; }
.ototal { font-weight: 800; white-space: nowrap; }
.kchip { padding: 0.12rem 0.55rem; border-radius: var(--pill); font-size: 0.72rem; font-weight: 800; background: var(--chip); color: var(--muted); }
.kchip.new { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.kchip.pendiente, .kchip.en_marcha { background: color-mix(in srgb, var(--info) 18%, transparent); color: var(--info); }
.kchip.lista { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.kchip.voided { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.obar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.9rem; margin-top: 0.4rem; background: var(--surface); }
.obar .btn:not(.small) { flex: 1; }
.mods { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mods legend { font-weight: 800; margin-bottom: 0.5rem; }

/* ---------- Pantalla de cocina ---------- */
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; align-items: start; }
.kcard { display: grid; gap: 0.5rem; padding: 0.9rem; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line-strong); border-top: 6px solid var(--info); }
.kcard.warn { border-top-color: var(--warn); }
.kcard.late { border-top-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.kcard.done { opacity: 0.55; border-top-color: var(--ok); }
.kcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.kcard header strong { font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.ktime { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.kcard.warn .ktime { color: var(--warn); }
.kcard.late .ktime { color: var(--danger); }
.kmeta { font-size: 0.8rem; color: var(--muted); }
.kcourse { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 0.3rem; }
.kcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.kline { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; padding: 0.7rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; font-size: 1.05rem; }
.kline b { font-size: 1.3rem; }
.kline span { display: grid; gap: 0.1rem; }
.kline em { font-style: normal; font-size: 0.85rem; color: var(--muted); }
.kline .knote { color: var(--warn); font-weight: 800; }
.kline .kvoid { color: var(--danger); font-weight: 800; letter-spacing: 0.1em; }
.kline i { font-style: normal; font-size: 0.75rem; font-weight: 800; padding: 0.2rem 0.5rem; border-radius: var(--pill); background: var(--chip); white-space: nowrap; }
.kline.en_marcha { border-color: var(--info); background: color-mix(in srgb, var(--info) 14%, var(--surface-2)); }
.kline.en_marcha i { background: var(--info); color: var(--bg); }
.kline.lista { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface-2)); }
.kline.lista i { background: var(--ok); color: var(--bg); }
.kline.lista strong { text-decoration: line-through; text-decoration-thickness: 2px; }
.kline.voided { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface-2)); }
.kline.voided strong { text-decoration: line-through; }
.kline:disabled { cursor: default; }
.kready { justify-self: stretch; }
.ksub { font-size: 1.1rem; margin: 1.6rem 0 0.8rem; color: var(--muted); }
.kempty h2 { margin-bottom: 0.5rem; }

@media (max-width: 860px) {
  .otabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .otabs button { padding: 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--hover); font-weight: 800; color: var(--muted); }
  .otabs button.on { background: var(--grad); color: var(--on-accent); border-color: transparent; }
  .obody { grid-template-columns: 1fr; }
  .obody.tab-carta .obill, .obody.tab-cuenta .omenu { display: none; }
  .oitems { grid-template-columns: repeat(2, 1fr); }
  .fplan { gap: 0.4rem; padding: 0.5rem; grid-template-rows: repeat(var(--rows), minmax(78px, auto)); }
  .ftable { min-height: 78px; }
  .ftable strong { font-size: 1.1rem; }
  .ftable small { font-size: 0.64rem; }
  .ohead h2 { font-size: 1.2rem; }
  .ohead-total { font-size: 1.2rem; }
}
.otabs button.on .tag { background: rgba(0, 0, 0, 0.18); color: inherit; }

/* Campo de foto con vista previa y subida */
.photo-field { display: grid; grid-template-columns: 4rem 1fr auto; gap: 0.6rem; align-items: center; }
.photo-preview { width: 4rem; height: 4rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
.photo-field label.btn { cursor: pointer; }
.photo-field label.btn.busy { opacity: 0.6; pointer-events: none; }
@media (max-width: 560px) { .photo-field { grid-template-columns: 3.4rem 1fr; } .photo-field label.btn { grid-column: 1 / -1; } }

/* Autorización de una encargada con su PIN, encima de otra ventana */
dialog.approval { width: min(94vw, 420px); }
.approval-card .modal-body { display: grid; justify-items: center; gap: 0.6rem; text-align: center; }
.approvers { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.approvers .seg { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.6rem 0.9rem; }
.small-keypad { grid-template-columns: repeat(3, 64px); gap: 0.55rem; }
.small-keypad button { height: 64px; font-size: 1.5rem; }
.small-keypad .key-alt { font-size: 0.8rem; font-family: var(--body); font-weight: 700; }

/* Contador de avisos en el menú */
#menu .badge { margin-left: auto; min-width: 1.4rem; padding: 0.05rem 0.4rem; border-radius: var(--pill); background: var(--danger); color: #fff; font-size: 0.72rem; font-weight: 800; text-align: center; }

/* Control por persona */
.control-table td, .control-table th { padding: 0.45rem 0.55rem; font-size: 0.84rem; }
.control-table tr.flag td { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.blind-note { font-size: 0.85rem; }

/* Acceso a los manuales */
.help-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.9rem; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.help-link .ico { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.75rem; }
.help-link:hover { color: var(--accent); background: var(--hover); }

/* Botón para ver u ocultar la contraseña */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 3rem !important; }
.pw-toggle { position: absolute; top: 50%; right: 0.4rem; transform: translateY(-50%); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--accent); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Saber dónde se entra ---------- */
.login-head { display: flex; align-items: center; gap: 0.8rem; }
.login-head small { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.login-head strong { font-family: var(--display); font-size: 1.15rem; }
.login-biz { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.biz-chip { padding: 0.25rem 0.7rem; border-radius: var(--pill); border: 1px solid var(--line-strong); font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.biz-chip.peluqueria { border-color: color-mix(in srgb, #b8559a 60%, transparent); }
.biz-chip.bar { border-color: color-mix(in srgb, #bf8228 70%, transparent); }
.login-staff { font-size: 0.85rem; color: var(--muted); padding: 0.8rem 0.9rem; border-radius: var(--radius-sm); background: var(--hover); border: 1px dashed var(--line-strong); }
.kiosk-head { gap: 0.9rem; text-align: left; }
.station-ico { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--grad); font-size: 1.7rem; box-shadow: var(--shadow); }
.station-text strong { display: block; font-family: var(--display); font-size: 1.45rem; line-height: 1.1; }
.station-text small { color: var(--muted); font-family: var(--body); font-size: 0.85rem; }
.title-block { min-width: 0; }
.where { display: block; font-size: 0.78rem; font-weight: 800; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.1rem; }

/* Aviso del periodo de prueba (plataforma) */
.plan-banner { margin: -0.4rem 0 1.2rem; padding: 0.7rem 1rem; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--info) 45%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); font-size: 0.9rem; }
.plan-banner.urgent { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* ---------- Soporte de la plataforma y comunicados ---------- */
.support-banner { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: -0.4rem 0 1rem; padding: 0.7rem 1rem; border-radius: var(--radius-sm); background: #1d4ed8; color: #fff; font-size: 0.92rem; box-shadow: 0 6px 20px rgb(0 0 0 / 0.2); }
.support-banner .btn { color: #fff; border-color: rgb(255 255 255 / 0.6); }
body.support-mode .main { outline: 3px solid #1d4ed8; outline-offset: -3px; }
.news { display: grid; gap: 0.6rem; margin: -0.4rem 0 1.2rem; }
.news-item { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: start; padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--info) 45%, transparent); background: color-mix(in srgb, var(--info) 10%, var(--surface)); font-size: 0.92rem; }
.news-item.mantenimiento { border-color: color-mix(in srgb, var(--warn) 60%, transparent); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.news-item p { margin: 0.2rem 0 0; }
.news-item .news-when { font-weight: 700; }
.news-item .news-when::first-letter { text-transform: uppercase; }
.news-ico { font-size: 1.3rem; line-height: 1.2; }

/* ---------- Código QR ---------- */
.qr-panel { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 1.4rem; align-items: start; }
.qr-code { padding: 0.8rem; border-radius: var(--radius-sm); background: #fff; }
.qr-code svg { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .qr-panel { grid-template-columns: 1fr; } .qr-code { max-width: 260px; } }

/* ---------- Código para autorizar a distancia ---------- */
.remote-code { margin: 0.4rem 0 1rem; text-align: center; font: 800 2.6rem/1.1 var(--display), system-ui, sans-serif; letter-spacing: 0.12em; color: var(--accent); }
.approval-switch { margin: 0.9rem 0 0; text-align: center; }
.approval-switch .link { font-size: 0.9rem; }

/* ---------- Fichar entrada y salida ---------- */
/* Fichajes en el TPV: una tarjeta más junto a las fotos; al tocarla, las fotos de todo el personal con su estado */
.kiosk-person .clock-state { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-top: -0.4rem; }
.kiosk-person .clock-state.in { color: var(--ok); }
.kiosk-special .ph { display: grid; place-items: center; font-size: 2.6rem; border-style: dashed; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.clock-done { width: 6rem; height: 6rem; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #fff; background: var(--ok); }
.clock-done.out { background: var(--accent); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.8rem 1rem; }
.filters .field { min-width: 150px; }
.filter-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timeclock { min-width: 0; }
.timeclock > * { min-width: 0; }

/* Cobro en efectivo: «¿Con cuánto paga?» con billetes de un toque y el cambio bien grande */
.cash-given { display: grid; gap: 0.5rem; padding: 0.8rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.bills { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 0.45rem; }
.bill { padding: 0.75rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--hover); color: var(--text); font-family: var(--display); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.bill:disabled { opacity: 0.35; cursor: default; }
.bill.on { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.change.has strong { font-size: 2.2rem; color: var(--accent); }
