@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Figtree:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,800&display=swap');

/* Paleta del panel (pedido 2026-11-20 "menos azul"): blancos puros y grises neutros; el marino queda
   para la marca, el boton principal, los titulos y la barra lateral. Mismos tokens que la landing. */
:root {
  --bg:         #F6F6F4;
  --white:      #ffffff;
  --border:     #E7E7E3;
  --border-md:  #D2D2CC;
  --ink:        #2B2E33;
  --ink-deep:   #24364F;
  --muted:      #4A4D52;
  --subtle:     #66696E;
  --panel:      #F6F6F4;
  --soft:       #EFEFEC;
  --primary:    #2E4A73;
  --primary-d:  #24364F;
  --primary-bg: #F1F1EE;
  --verde:      #1E9E5A;
  --verde-texto:#167A45;
  --acento:     #FFC94A;
  --peligro:    #B42318;
  --r-sm:       8px;
  --r-md:       12px;
  --r-lg:       16px;
  --r-xl:       20px;
  --r-full:     9999px;
  --r-boton:    10px;
  --shadow-sm:  0 1px 2px rgba(20,22,26,0.05);
  --shadow:     0 4px 18px rgba(20,22,26,0.07);
  --tint-2:     #E7E7E3;
  --display:    'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --muesca:     9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Figtree', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app { display: flex; flex-direction: row; height: 100vh; overflow: hidden; }

/* SIDEBAR */

/* Barra de tinta con la trama de puntos del acceso. La seccion activa es un "numerito": blanca y
   con la muesca del boleto del lado del contenido. */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ink-deep);
  color: white;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-brand-label { display: none; }
.sidebar .sidebar-brand-module.logo { height: 84px; margin-left: -8px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 14px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #C8D5E3;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms, color 120ms;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-item:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.nav-item.is-active {
  background: #fff;
  color: var(--ink-deep);
  --muesca: 7px;
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.nav-item.is-active .nav-icon { color: var(--primary); }
.nav-item.is-active:focus-visible { outline-color: var(--primary); }

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* APP BODY */

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* HEADER — solo visible en Agenda */

.header {
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

/* APP SECTIONS */

.app-section {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

.section-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 28px 48px;
}

.section-page-header {
  margin-bottom: 24px;
}
.section-page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--ink-deep);
  letter-spacing: -0.035em;
}
.section-page-sub { margin-top: 6px; font-size: 0.95rem; color: var(--subtle); }

button, input, select, textarea { font: inherit; }
h2, h3, h4, .serif { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }


.date-nav { display: flex; align-items: center; gap: 8px; }

.nav-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--ink-deep);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  display: grid; place-items: center;
  transition: background 100ms, border-color 100ms;
}
.nav-btn:hover { background: var(--primary-bg); border-color: var(--subtle); }

.date-info { min-width: 230px; text-align: center; }
.date-title {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink-deep);
}
.apt-count { font-size: 0.85rem; color: var(--subtle); }

.btn-ghost {
  min-height: 38px;
  padding: 7px 16px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--ink-deep);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms, border-color 100ms;
}
.btn-ghost:hover { background: var(--primary-bg); border-color: var(--subtle); }

/* LAYOUT */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 34%);
  overflow: hidden;
}

.panel-list,
.panel-form,
.panel-detail {
  overflow-y: auto;
  height: 100%;
}

.panel-list {
  border-right: 1px solid var(--border);
  background: var(--white);
}

.panel-form {
  background: var(--bg);
  padding: 24px;
}

.panel-detail {
  border-left: 1px solid var(--border);
  background: var(--white);
  padding: 20px;
}

/* ============ MOBILE: la turnera se usa 95% desde el celular ============ */
@media (max-width: 760px) {
  body { height: auto; overflow-y: auto; }
  #app { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }

  /* Sidebar oscuro -> barra superior compacta (nav con scroll horizontal) */
  /* La barra de scroll horizontal se veia como una mancha gris debajo de la navegacion. Se oculta:
     la barra se sigue deslizando con el dedo. */
  .sidebar { scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar {
    width: 100%; height: auto;
    flex-direction: row; align-items: center; gap: 6px;
    padding: 8px 10px;
    position: sticky; top: 0; z-index: 40;
    overflow-x: auto;
  }
  .sidebar-brand { flex-direction: row; align-items: baseline; gap: 6px; padding: 0 6px 0 2px; border: none; flex-shrink: 0; }
  .sidebar-brand-label { font-size: 0.6rem; }
  .sidebar-nav { flex-direction: row; padding: 0; gap: 2px; flex-shrink: 0; }
  .nav-item { width: auto; padding: 8px 10px; white-space: nowrap; }
  .nav-icon { display: none; }
  .sidebar-bottom { margin-left: auto; padding: 0; flex-shrink: 0; }
  .fab-btn { padding: 8px 12px; white-space: nowrap; }
  .fab-menu { bottom: auto; top: calc(100% + 6px); right: 0; }

  .app-body { overflow: visible; }
  .header { height: auto; padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .date-info { min-width: 0; flex: 1; }
  .app-section { overflow: visible; }
  .section-wrap { padding: 18px 14px; }

  /* Agenda en una sola columna: lista arriba, detalle del turno abajo */
  .layout { grid-template-columns: 1fr; overflow: visible; }
  .panel-list, .panel-detail, .panel-form { height: auto; overflow: visible; }
  .panel-list { border-right: none; border-bottom: 1px solid var(--border); }
  .panel-detail { border-left: none; padding: 16px; }
  .detalle-talon { margin: -16px -16px 20px; padding: 22px 18px 24px; }
  .detalle-talon::after { left: 16px; right: 16px; }
}

/* APPOINTMENT LIST */

.apt-list { display: grid; }

.apt-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--subtle);
  font-size: 0.85rem;
  line-height: 1.6;
}

.apt-item {
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 100ms;
  display: grid; gap: 3px;
  position: relative;
}
.apt-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--apt-bar, var(--border-md));
  border-radius: 0 2px 2px 0;
}
.apt-item:hover { background: var(--panel); }
.apt-item.is-selected { background: var(--primary-bg); }

.apt-item--confirmado  { --apt-bar: #22c55e; }
.apt-item--pendiente   { --apt-bar: #f59e0b; }
.apt-item--en_consulta { --apt-bar: var(--ink-deep); }
.apt-item--atendido    { --apt-bar: #94a3b8; }
.apt-item--cancelado   { --apt-bar: #ef4444; }
.apt-item--past        { --apt-bar: #cbd5e1; }

.apt-status { font-size: 0.7rem; font-weight: 600; }
.apt-status--confirmado  { color: #16a34a; }
.apt-status--pendiente   { color: #d97706; }
.apt-status--en_consulta { color: var(--primary); }
.apt-status--atendido    { color: #94a3b8; }
.apt-status--cancelado   { color: #dc2626; }
.apt-status--past        { color: #cbd5e1; }

.apt-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.apt-delete-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #FECACA;
  border-radius: var(--r-full);
  background: #FEF2F2;
  color: #991B1B;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 0.82rem;
  line-height: 1;
  transition: background 100ms, border-color 100ms, color 100ms;
}
.apt-delete-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #7F1D1D;
}

.apt-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.apt-time { font-family: Georgia, serif; font-size: 0.95rem; font-weight: 600; color: var(--primary); }
.apt-code { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--subtle); }
.apt-name { font-size: 0.88rem; font-weight: 500; color: var(--ink-deep); }
.apt-sub  { font-size: 0.76rem; color: var(--muted); }
.apt-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }

/* CHIPS */

.chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.8rem; font-weight: 700;
  border: 1px solid transparent;
}
.chip-neutral { background: var(--soft);        color: var(--muted);   border-color: var(--border); }
.chip-blue    { background: var(--white);        color: var(--primary); border-color: var(--border-md); }
.chip-amber   { background: #FFFBEB;              color: #92400E;        border-color: #FDE68A; }
.chip-green   { background: #F0FDF4;              color: #166534;        border-color: #BBF7D0; }
.chip-red     { background: #FEF2F2;              color: #991B1B;        border-color: #FECACA; }

/* FORM */

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  max-width: 660px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.section-wrap .form-card { max-width: none; }
.form-title { margin-bottom: 22px; }
.kicker {
  font-size: 0.85rem; font-weight: 600;
  color: var(--subtle);
}
.form-title h2 { margin-top: 2px; font-size: 1.6rem; line-height: 1.1; color: var(--ink-deep); }
.form-title-sub { margin-top: 6px; font-size: 0.95rem; color: var(--subtle); }

.form-section { border: none; padding: 0; margin-bottom: 22px; }
.form-section legend {
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-deep); margin-bottom: 12px; padding: 0;
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
/* la regla de abajo estira los inputs al 100%: una casilla se comia media fila y dejaba el texto al costado */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  box-shadow: none;
  accent-color: var(--primary);
}
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink-deep); }

/* Campos como los del acceso: 16px de letra (el iPhone no hace zoom), borde marcado, foco con halo. */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-md);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms, background-color 120ms;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--subtle); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46,74,115,0.14);
}
.field input:disabled { opacity: 0.55; }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.45; }

.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.btn-primary {
  min-height: 48px;
  background: var(--primary); color: white;
  border: none; border-radius: 12px;
  padding: 11px 26px; font-weight: 700; font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 16px rgba(46,74,115,0.22);
  transition: background 120ms, transform 100ms;
}
.btn-primary:hover { background: var(--primary-d); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 3px solid rgba(46,74,115,0.35); outline-offset: 3px; }

/* DETAIL */

.detail-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%;
  color: var(--subtle); text-align: center;
}
/* sin turno elegido: un boleto vacio dibujado, con sus muescas */
.detail-empty-icon {
  width: 120px; height: 64px;
  margin-bottom: 16px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 37px, var(--border-md) 37px 39px, transparent 39px) 0 14px / 100% 36px no-repeat,
    var(--primary-bg);
  -webkit-mask:
    radial-gradient(circle 8px at 38px 0, #0000 7.5px, #000 8px) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at 38px 100%, #0000 7.5px, #000 8px) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle 8px at 38px 0, #0000 7.5px, #000 8px) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at 38px 100%, #0000 7.5px, #000 8px) bottom / 100% 51% no-repeat;
}
.detail-empty p { font-size: 0.95rem; line-height: 1.55; }

.detail-block { margin-bottom: 20px; }

/* Cabeza del detalle = talon del boleto: tinte, hora grande, muescas abajo y linea troquelada. */
.detalle-talon {
  --muesca: 12px;
  position: relative;
  margin: -20px -20px 22px;
  padding: 24px 24px 26px;
  background: var(--primary-bg);
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.detalle-talon::after {
  content: '';
  position: absolute;
  left: 22px; right: 22px; bottom: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-md) 0 7px, transparent 7px 13px);
}
.detalle-hora { display: flex; align-items: baseline; gap: 10px; color: var(--ink-deep); }
.detalle-hora b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.detalle-hora span { font-size: 1rem; font-weight: 600; color: var(--subtle); }

.detail-code {
  margin-top: 14px;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--subtle);
}
.detail-name {
  margin: 10px 0 2px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink-deep);
  overflow-wrap: anywhere;
}
.detail-datetime { font-size: 0.95rem; color: var(--muted); margin-bottom: 12px; }
.detail-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.detail-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.detail-label {
  font-size: 0.92rem; font-weight: 700;
  color: var(--ink-deep); margin-bottom: 10px;
}
.detalle-pregunta { margin: 0 0 10px; font-size: 0.92rem; color: var(--muted); }

.status-buttons,
.pay-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.status-btn {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--white); color: var(--muted);
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background-color 100ms, border-color 100ms, color 100ms;
}
.status-btn:hover { background: var(--panel); border-color: var(--border-md); }
.status-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.status-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.status-btn:disabled:hover { background: var(--white); border-color: var(--border); }
.status-btn.active-neutral { background: var(--soft);       color: var(--muted);   border-color: var(--border-md); }
.status-btn.active-blue    { background: var(--white);      color: var(--primary); border-color: var(--primary); }
.status-btn.active-amber   { background: #FFFBEB;           color: #92400E;        border-color: #FDE68A; }
.status-btn.active-green   { background: #F0FDF4;           color: #166534;        border-color: #BBF7D0; }
.status-btn.active-red     { background: #FEF2F2;           color: #991B1B;        border-color: #FECACA; }

.info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 0.92rem; gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--muted); flex-shrink: 0; }
.info-val { font-weight: 500; color: var(--ink-deep); text-align: right; }

.wa-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 0.92rem; color: var(--ink);
  background: var(--panel);
  resize: vertical; min-height: 130px;
  outline: none; line-height: 1.5;
}

.btn-copy {
  width: 100%; margin-top: 8px;
  min-height: 44px;
  padding: 9px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  background: var(--white); color: var(--ink-deep);
  font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: all 100ms;
}
.btn-copy:hover { background: var(--panel); }
.btn-copy.copied { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }

.btn-wa-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%; margin-top: 8px;
  min-height: 44px;
  padding: 9px;
  border: none; cursor: pointer;
  border-radius: var(--r-md);
  background: #1FAF55; color: white;
  font-size: 0.92rem; font-weight: 700;
  font-family: inherit;
  text-align: center; text-decoration: none;
  transition: background 100ms;
}
.btn-wa-open:hover { background: #1ebe5b; }

.notify-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.notify-logo-tg {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.notify-logo-wa {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.btn-wa-open .notify-logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.notify-intro {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #bae6fd;
  background: #f0f9ff;
}
.notify-intro-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.notify-intro-text strong {
  color: var(--ink-deep);
  font-size: 0.86rem;
}
.notify-intro-text span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.notify-intro-actions {
  display: flex;
  gap: 8px;
}
.notify-intro-actions button {
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.notify-intro-actions button:first-child {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
/* En el celular los botones van abajo, a lo ancho, en vez de apretar el texto */
@media (max-width: 760px) {
  .notify-intro { grid-template-columns: auto 1fr; row-gap: 10px; padding: 12px 14px; }
  .notify-intro-actions { grid-column: 1 / -1; }
  .notify-intro-actions button { flex: 1; min-height: 40px; }
}
.notify-settings-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
  margin-bottom: 12px;
}
.notify-settings-card-soft {
  border-color: #bbf7d0;
  background: #f0fdf4;
  margin-top: 14px;
}
.notify-settings-card h3 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  color: var(--ink-deep);
}
.notify-settings-card p,
.notify-bot-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.notify-bot-note {
  padding: 9px 10px;
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  background: var(--panel);
}
.field .notify-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  cursor: pointer;
}
.field .notify-check input {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

.btn-danger {
  width: 100%; margin-top: 6px;
  min-height: 44px;
  padding: 9px;
  border: 1.5px solid #F3C4C4;
  border-radius: var(--r-md);
  background: var(--white); color: #991B1B;
  font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: all 100ms;
}
.btn-danger:hover { background: #FEF2F2; }

/* VISTA SEMANA */

.view-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-full);
  background: var(--primary-bg);
  margin-left: 6px;
}
.view-btn {
  min-height: 34px;
  padding: 5px 16px;
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  color: var(--subtle);
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms, color 120ms;
}
.view-btn.is-active  { background: var(--white); color: var(--ink-deep); box-shadow: 0 1px 3px rgba(36,54,79,0.16); }
.view-btn:hover:not(.is-active) { color: var(--ink-deep); }
.view-btn:focus-visible, .nav-btn:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.week-view {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 16px 20px 32px;
  flex-direction: column;
  gap: 12px;
}

.week-nav-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: start;
}

.week-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 160px;
}
.week-col.is-today  { border-color: var(--ink-deep); }
.week-col.is-offday { opacity: 0.45; pointer-events: none; background: transparent; border-style: dashed; }

.week-col-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.week-col-header.is-today { background: var(--ink-deep); border-bottom-color: var(--ink-deep); }

.week-day-name {
  font-size: 0.9rem; font-weight: 600;
  color: var(--subtle);
}
.week-day-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  color: var(--ink-deep);
  line-height: 1;
}
.week-col-header.is-today .week-day-name { color: #C8D5E3; }
.week-col-header.is-today .week-day-num { color: #fff; }

.week-col-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }

.week-apt {
  padding: 7px 9px 7px 11px;
  background: var(--primary-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 100ms;
}
.week-apt:hover { filter: brightness(0.97); }
.week-apt.is-cancelled { opacity: 0.4; background: var(--panel); border-color: var(--border); cursor: default; }

.week-apt-time { font-family: var(--display); font-weight: 800; font-size: 0.9rem; letter-spacing: -0.02em; color: var(--primary); display: block; }
.week-apt-name { font-size: 0.85rem; font-weight: 700; color: var(--ink-deep); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-apt-svc  { font-size: 0.78rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.week-empty   { color: var(--subtle); font-size: 0.85rem; text-align: center; padding: 18px 4px; }
.week-blocked { color: #991B1B; font-size: 0.85rem; font-weight: 600; text-align: center; padding: 8px 4px; background: #FEF2F2; border-radius: 8px; margin: 4px; }

/* CONFIG DE AGENDA */

.config-accordion {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 150ms, border-color 150ms;
}
.config-accordion[open] { border-color: var(--border-md); box-shadow: var(--shadow); }

.config-summary {
  display: grid;
  grid-template-columns: minmax(170px, 240px) 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}

.config-summary::-webkit-details-marker { display: none; }
.config-summary:hover { background: var(--panel); }
.config-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.config-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.config-summary-kicker {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}

.config-summary-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: var(--ink-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-summary-desc {
  font-size: 0.9rem;
  color: var(--subtle);
  line-height: 1.4;
}

.config-summary-chevron {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--ink-deep);
  font-size: 1.25rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 150ms;
}

.config-accordion[open] .config-summary-chevron { transform: rotate(90deg); }

.config-accordion-body {
  border-top: 1px dashed var(--border-md);
  padding: 18px 20px 20px;
}

.config-hint {
  font-size: 0.92rem;
  color: var(--subtle);
  margin-bottom: 14px;
  line-height: 1.5;
}

.cfg-section { margin-bottom: 18px; }

.cfg-label {
  font-size: 0.9rem; font-weight: 700;
  color: var(--ink-deep); margin-bottom: 8px;
}

.cfg-subtitulo {
  margin: 24px 0 12px;
  font-size: 1.1rem;
  color: var(--ink-deep);
}
.cfg-reglas { display: grid; gap: 18px; margin-bottom: 18px; }
.cfg-check,
.field .cfg-check {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px;
  font-size: 0.95rem; font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.cfg-link-btn {
  min-height: 36px;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.cfg-guardar { width: 100%; margin-top: 4px; }

.cfg-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* dia de la semana: chip que se prende (tinta) o queda apagado */
.cfg-pill {
  position: relative;
  display: flex; align-items: center;
  min-height: 40px;
  padding: 5px 13px;
  border: 1.5px solid var(--border-md);
  border-radius: 10px;
  font-size: 0.92rem; font-weight: 700;
  color: var(--subtle);
  cursor: pointer;
  transition: background-color 100ms, color 100ms, border-color 100ms;
  user-select: none;
}
.cfg-pill input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-pill:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.cfg-pill.is-on { background: var(--ink-deep); color: white; border-color: var(--ink-deep); }
.cfg-pill:hover:not(.is-on) { background: var(--panel); }

.cfg-blocks { display: grid; gap: 6px; margin-bottom: 8px; }

.cfg-day-row {
  display: grid;
  grid-template-columns: 64px 1fr 160px;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.cfg-day-row:last-child { border-bottom: none; }

.cfg-day-row .cfg-pill {
  justify-content: center;
  padding: 5px 10px;
}

.cfg-day-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: 40px;
  align-items: center;
}

.cfg-block-row { display: flex; align-items: center; gap: 8px; }

.cfg-time {
  min-height: 40px;
  border: 1.5px solid var(--border-md);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 1rem; color: var(--ink);
  background: var(--bg);
  outline: none; width: 116px;
  font-variant-numeric: tabular-nums;
  transition: border-color 100ms, box-shadow 100ms;
}
.cfg-time:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(46,74,115,0.14); }

.cfg-sep { font-size: 0.92rem; color: var(--subtle); }

.cfg-add-block {
  width: 100%;
  min-height: 40px;
  background: none;
  border: 1.5px dashed var(--border-md);
  border-radius: 10px;
  color: var(--primary);
  font-size: 0.9rem; font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  transition: background-color 100ms, border-color 100ms;
}
.cfg-add-block:hover { border-color: var(--primary); background: var(--primary-bg); }

.cfg-day-row .cfg-add-day-block {
  padding: 6px 10px;
  margin-top: 0 !important;
}

.cfg-msg { font-size: 0.9rem; font-weight: 600; margin-top: 8px; min-height: 20px; }

/* BLOQUEOS */

.block-list { margin-top: 12px; display: grid; gap: 6px; }
.block-empty { font-size: 0.8rem; color: var(--subtle); margin-top: 4px; }

.block-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-md);
  border-radius: 12px;
  gap: 8px;
}
.block-item-info { display: flex; flex-direction: column; gap: 2px; }
.block-item-date { font-size: 0.95rem; font-weight: 700; color: var(--ink-deep); }
.block-item-reason { font-size: 0.85rem; color: var(--subtle); }
.block-empty { font-size: 0.9rem; }

.btn-remove-block {
  min-width: 34px;
  min-height: 34px;
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 100ms;
}
.btn-remove-block:hover { background: #FEF2F2; color: #991B1B; }

/* SERVICES CRUD */

.svc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-md);
  border-radius: 12px;
  margin-bottom: 8px;
  gap: 10px;
}
.svc-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-row-name { font-size: 1rem; font-weight: 700; color: var(--ink-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-row-meta { font-size: 0.88rem; color: var(--subtle); }
.svc-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.svc-btn-edit {
  background: none;
  border: 1.5px solid var(--border-md);
  color: var(--ink-deep);
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 100ms;
}
.svc-btn-edit:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

.svc-editor {
  background: var(--primary-bg);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 8px;
}

.svc-fields-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.svc-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

@media (max-width: 760px) {
  .config-summary {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .config-summary-desc {
    grid-column: 1 / -1;
  }
  .cfg-day-row {
    grid-template-columns: 1fr;
  }
  .cfg-day-row .cfg-pill {
    justify-content: flex-start;
    width: fit-content;
  }
}
.svc-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

/* TIMELINE */

.timeline { display: flex; flex-direction: column; gap: 0; }

.tl-item {
  display: flex;
  gap: 10px;
  position: relative;
  padding-bottom: 12px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-md);
  border: 2px solid var(--white);
  outline: 1px solid var(--border-md);
  flex-shrink: 0;
  margin-top: 3px;
}
.tl-item:first-child .tl-dot { background: var(--primary); outline-color: var(--primary); }

.tl-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tl-label { font-size: 0.82rem; color: var(--ink); font-weight: 500; }
.tl-ts { font-size: 0.73rem; color: var(--subtle); }

/* INLINE EDIT */

.detail-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.detail-label-row .detail-label { margin-bottom: 0; }

.btn-edit-inline {
  background: none;
  border: 1.5px solid var(--border-md);
  color: var(--ink-deep);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 100ms;
}
.btn-edit-inline:hover { border-color: var(--primary); color: var(--primary); }

.inline-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.inline-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inline-field input,
.inline-field textarea {
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  resize: vertical;
}
.inline-field input:focus,
.inline-field textarea:focus { border-color: var(--primary); }

.inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* PRESENTE */

.btn-presente {
  width: 100%;
  min-height: 52px;
  background: var(--ink-deep);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(36,54,79,0.22);
  transition: background 100ms, transform 100ms;
}
.btn-presente:hover { background: var(--primary); }
.btn-presente:active { transform: translateY(1px); }
.btn-presente:focus-visible { outline: 3px solid rgba(46,74,115,0.35); outline-offset: 3px; }

/* RECEIPT - ADMIN */

.receipt-thumb {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  cursor: zoom-in;
  display: block;
}
.receipt-thumb-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.btn-receipt-approve {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 100ms;
}
.btn-receipt-approve:hover { background: var(--primary-d); }
.btn-receipt-approve.approved { background: #166534; cursor: default; }

.btn-receipt-view {
  display: inline-flex;
  width: fit-content;
  border: none;
  background: transparent;
  padding: 0;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--subtle);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.btn-receipt-view:hover { color: var(--primary); }
.receipt-none {
  font-size: 0.8rem;
  color: var(--subtle);
  margin-top: 2px;
}

.receipt-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
}
.receipt-viewer-card {
  width: min(96vw, 1180px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}
.receipt-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-deep);
}
.receipt-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.receipt-viewer-actions a,
.receipt-viewer-actions button {
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.receipt-viewer-actions a:hover,
.receipt-viewer-actions button:hover {
  background: var(--primary-bg);
}
.receipt-viewer img {
  width: 100%;
  max-height: calc(94vh - 52px);
  object-fit: contain;
  background: var(--panel);
}

/* Nav badge */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #F59E0B;
  color: var(--ink-deep);
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: auto;
  line-height: 1;
}

/* Admin toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 320px;
}
.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pending banner */
.pending-banner {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.pending-banner-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.pending-banner-item {
  font-size: 0.8rem;
  color: #78350f;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1px solid #fde68a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pending-banner-item:last-child { border-bottom: none; }
.pending-banner-item:hover { color: #451a03; }
.pending-has-receipt {
  font-size: 0.68rem;
  background: #d97706;
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Receipt review (confirm/reject) */
.receipt-review-block {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn-confirm-pay {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #16a34a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-confirm-pay:hover { background: #15803d; }
.btn-reject-pay {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ef4444;
  border-radius: 6px;
  background: transparent;
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-reject-pay:hover { background: #fef2f2; }

/* Reject form */
.reject-form {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.receipt-review-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.reject-reason-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text);
  padding: 3px 0;
  cursor: pointer;
}
.reject-other-input {
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  box-sizing: border-box;
}

/* Receipt approved / rejected notes */
.receipt-approved-note {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #15803d;
  font-weight: 600;
}
.receipt-rejected-note {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 600;
}

/* Pending reminder block */
.pending-reminder-block {
  margin: 10px 0;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.pending-reminder-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}
.pending-reminder-item {
  font-size: 0.82rem;
  color: #78350f;
  padding: 2px 0;
}

/* MODAL */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24,36,56,0.3);
  backdrop-filter: blur(2px);
  overflow-y: auto;
  padding: 32px 16px 48px;
}
.modal-overlay.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
/* El alta de turno es un boleto: talon con el titulo arriba, muescas y linea troquelada. */
.modal-card {
  --cabeza: 112px;
  --muesca: 12px;
  position: relative;
  background: linear-gradient(var(--primary-bg) 0 var(--cabeza), #fff var(--cabeza));
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 640px;
  overflow: hidden;
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 var(--cabeza), #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% var(--cabeza), #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 var(--cabeza), #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% var(--cabeza), #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.modal-card::before {
  content: '';
  position: absolute;
  top: calc(var(--cabeza) - 1px);
  left: 22px; right: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-md) 0 7px, transparent 7px 13px);
}
.modal-header {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}
.modal-close {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-deep);
  cursor: pointer;
  border-radius: 50%;
  transition: background 100ms;
}
.modal-close:hover { background: #fff; }
.modal-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.modal-body { padding: 0 28px 28px; }
.modal-card .form-card { background: transparent; }
.modal-card .form-title {
  height: var(--cabeza);
  margin: 0 0 26px;
  padding: 26px 52px 0 0;
}
.modal-card .form-title-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-card .form-actions .btn-primary { min-width: 200px; }
@media (max-width: 760px) {
  .modal-overlay { padding: 12px 10px 40px; }
  .modal-body { padding: 0 18px 22px; }
  .modal-card .form-title-sub { white-space: normal; font-size: 0.88rem; }
  .modal-card .form-title h2 { font-size: 1.45rem; }
  .modal-card .form-actions .btn-primary { width: 100%; }
}

/* SIDEBAR FAB */

.sidebar-bottom {
  margin-top: auto;
  padding: 16px 16px 20px;
  position: relative;
}
.fab-wrap { position: relative; }
.fab-btn {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: var(--ink-deep);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  transition: background 100ms, transform 100ms;
}
.fab-btn:hover { background: var(--primary-bg); }
.fab-btn:active { transform: translateY(1px); }
.fab-btn:focus-visible { outline: 3px solid rgba(255,255,255,0.5); outline-offset: 3px; }
.fab-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 4px 24px rgba(24,36,56,0.15);
  overflow: hidden;
  z-index: 50;
}
.fab-menu.is-open { display: block; }
.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--ink-deep);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 100ms;
}
.fab-menu-item:last-child { border-bottom: none; }
.fab-menu-item:hover:not(:disabled) { background: var(--panel); }
.fab-menu-item:disabled { color: var(--subtle); cursor: default; }
.fab-menu-soon {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--subtle);
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-bg);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }

/* === FINANZAS === */
.fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.fin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.fin-card-primary { background: var(--primary-bg); border-color: var(--tint-2); }
.fin-card-warn    { background: #FFF7E8; border-color: #F3D9A4; }
.fin-card-ok      { background: #f0fdf4; border-color: #bbf7d0; }
.fin-card-dim     { opacity: 0.75; }
.fin-kicker { font-size: 0.9rem; font-weight: 600; color: var(--subtle); margin-bottom: 6px; }
.fin-big    { font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink-deep); line-height: 1; font-variant-numeric: tabular-nums; }
.fin-sub    { font-size: 0.85rem; color: var(--subtle); margin-top: 6px; }
.fin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.fin-row:last-child { border-bottom: none; }
.fin-row-label  { flex: 1; font-weight: 500; color: var(--ink); }
.fin-row-count  { color: var(--subtle); font-size: 0.75rem; white-space: nowrap; }
.fin-row-amount { font-weight: 600; color: var(--ink-deep); white-space: nowrap; margin-left: auto; }
.fin-amount-red { color: #dc2626; }
.fin-empty { font-size: 0.82rem; color: var(--subtle); padding: 8px 0; }

/* --- CLIENTES --- */
.cl-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.cl-search {
  flex: 1;
  min-height: 48px;
  border: 1.5px solid var(--border-md);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.cl-search:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(46,74,115,0.14); }
.cl-total {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--subtle);
  white-space: nowrap;
}
.cl-empty {
  font-size: 0.95rem;
  color: var(--subtle);
  padding: 32px 0;
  text-align: center;
  line-height: 1.5;
}
.cl-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  margin-bottom: 8px;
  overflow: hidden;
}
.cl-card[open] { border-color: var(--border-md); box-shadow: var(--shadow); }
.cl-card-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cl-card-summary:hover { background: var(--panel); }
.cl-card-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cl-card-summary::-webkit-details-marker { display: none; }
.cl-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--ink-deep);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cl-info { flex: 1; min-width: 0; }
.cl-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-meta {
  font-size: 0.85rem;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.cl-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-deep);
}
.cl-last {
  font-size: 0.8rem;
  color: var(--subtle);
}
.cl-chevron {
  color: var(--subtle);
  font-size: 1.3rem;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.cl-card[open] .cl-chevron { transform: rotate(90deg); }
.cl-card-body {
  border-top: 1px dashed var(--border-md);
  padding: 12px 18px 14px;
  background: var(--panel);
}
.cl-svcs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.cl-apt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.cl-apt-row:last-of-type { border-bottom: none; }
.cl-apt-date { color: var(--ink-deep); font-weight: 600; white-space: nowrap; min-width: 116px; font-variant-numeric: tabular-nums; }
.cl-apt-svc  { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-apt-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.cl-apt-status--confirmado  { background: #E4F5EA; color: #14532D; }
.cl-apt-status--pendiente   { background: #FDF4D8; color: #713F12; }
.cl-apt-status--en_consulta { background: var(--ink-deep); color: #fff; }
.cl-apt-status--atendido    { background: var(--soft); color: var(--muted); }
.cl-apt-status--cancelado   { background: #fee2e2; color: #dc2626; }
.cl-apt-status--pendiente_de_pago { background: #FDF4D8; color: #713F12; }
.cl-apt-more {
  font-size: 0.72rem;
  color: var(--subtle);
  margin-top: 8px;
  text-align: center;
}

/* SLOT GRID (agenda del dia: libre / bloqueado) */

.slot-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.slot-toolbar-hint { font-size: 0.72rem; color: var(--subtle); }

.slot-row {
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  position: relative;
  cursor: pointer;
  transition: background 100ms;
}
.slot-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--slot-bar, transparent);
  border-radius: 0 2px 2px 0;
}
.slot-time { font-size: 0.8rem; font-weight: 600; color: var(--ink-deep); }
.slot-label { font-size: 0.75rem; color: var(--subtle); }

.slot-row.is-free { --slot-bar: transparent; background: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(20,22,26,0.035) 7px, rgba(20,22,26,0.035) 14px); }
.slot-row.is-free:hover { background: var(--primary-bg); }
.slot-row.is-free:hover .slot-label::after { content: ' — tocar para bloquear'; color: var(--primary); }

.slot-row.is-past { cursor: default; opacity: 0.5; background: none; }
.slot-row.is-past:hover { background: none; }

.slot-row.is-blocked {
  --slot-bar: #ef4444;
  background: repeating-linear-gradient(135deg, #FEF2F2, #FEF2F2 7px, #FEE2E2 7px, #FEE2E2 14px);
}
.slot-row.is-blocked .slot-time,
.slot-row.is-blocked .slot-label { color: #991B1B; }
.slot-row.is-blocked:hover { filter: brightness(0.97); }
.slot-action { margin-left: auto; color: #991B1B; font-size: 0.8rem; }

.slot-new-btn {
  margin-left: auto;
  width: 24px; height: 24px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--primary);
  font-size: 0.9rem; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 100ms;
}
.slot-row.is-free:hover .slot-new-btn { opacity: 1; }
.slot-new-btn:hover { background: var(--primary-bg); }

.slot-section-title {
  padding: 10px 16px 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--subtle);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.day-blocked-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px; padding: 14px 16px;
  background: #FEF2F2; border: 1px solid #FECACA; border-radius: var(--r-md);
}
.day-blocked-text { display: grid; gap: 2px; color: #991B1B; font-size: 0.82rem; }

.week-slot-blocked {
  display: grid; gap: 1px;
  margin: 3px 4px; padding: 5px 7px;
  background: #FEF2F2; border-left: 3px solid #ef4444;
  border-radius: var(--r-sm);
  font-size: 0.7rem; color: #991B1B;
}

.block-item--slots { flex-wrap: wrap; }
.block-slot-chips { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; margin-top: 6px; }
.block-slot-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border: 1px solid #FECACA; border-radius: var(--r-full);
  background: #FEF2F2; color: #991B1B;
  font-size: 0.72rem; font-weight: 600;
  cursor: pointer;
}
.block-slot-chip:hover { background: #FEE2E2; }

@media (max-width: 760px) {
  .slot-new-btn { opacity: 1; }
  .slot-row.is-free:hover .slot-label::after { content: none; }
}

/* === RECORDAR === */

.rec-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.rec-day {
  border: 1px solid var(--border-md, #C8D5E3);
  background: #fff;
  color: var(--ink, #2F3A46);
  border-radius: 999px;
  min-height: 40px;
  padding: 7px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.rec-day:hover { border-color: var(--primary, #2E4A73); }

.rec-day.is-active {
  background: var(--primary, #2E4A73);
  border-color: var(--primary, #2E4A73);
  color: #fff;
}

.rec-date {
  margin-left: auto;
  border: 1px solid var(--border-md, #C8D5E3);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--ink, #2F3A46);
}

.rec-count {
  font-size: 0.85rem;
  color: var(--muted, #4B5563);
  margin: 0 0 12px;
}

.rec-list { display: flex; flex-direction: column; gap: 8px; }

.rec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border, #E4EAF1);
  border-radius: 12px;
  padding: 12px 14px;
}

.rec-row--done { background: var(--panel, #F7F8FA); }

.rec-time {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink-deep, #24364F);
  min-width: 58px;
}

.rec-info { flex: 1; min-width: 0; }

.rec-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #2F3A46);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-meta {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--subtle, #6E89AA);
}

.rec-btn {
  border: 1px solid var(--primary, #2E4A73);
  background: var(--primary, #2E4A73);
  color: #fff;
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.rec-btn:hover { background: var(--primary-dark, #24364F); }
.rec-btn:disabled { opacity: 0.55; cursor: default; }

.rec-btn--again {
  background: #fff;
  color: var(--primary, #2E4A73);
}

.rec-btn--again:hover { background: var(--primary-bg, #EFF4FB); }

.rec-state {
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
}

.rec-state--done  { color: #2F7A55; }
.rec-state--none  { color: var(--subtle, #6E89AA); }

.rec-corto { display: none; }

/* En el celular cada turno es un solo renglon: hora, nombre y el boton a mano del pulgar. */
@media (max-width: 560px) {
  .rec-row { padding: 10px 12px; gap: 10px; }
  .rec-time { min-width: 44px; }
  .rec-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rec-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rec-btn { min-height: 44px; padding: 8px 16px; }
  .rec-largo { display: none; }
  .rec-corto { display: inline; }
}

.cfg-tpl-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--border-md, #C8D5E3);
  border-radius: 10px;
  resize: vertical;
  color: var(--ink, #2F3A46);
}

.cfg-tpl-textarea:focus {
  outline: none;
  border-color: var(--primary, #2E4A73);
}

/* La clase existia pero no tenia ninguna regla: cada uso la compensaba con estilos inline.
   Los que ya traen inline siguen mandando, asi que esto no cambia lo que ya estaba. */
.field-hint {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--subtle, #6E89AA);
  margin: 4px 0 0;
}

.field-hint code {
  background: var(--primary-bg, #EFF4FB);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.78em;
  color: var(--primary-dark, #24364F);
}

/* === INICIO ===
   Home estilo kiosco: una columna, pensada para el celular y el pulgar. En pantallas grandes la
   misma columna se centra; no se reacomoda en grilla, porque es una sola tarea. */

.inicio {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 110px;   /* abajo deja lugar al boton fijo */
  color: var(--ink, #2F3A46);
}

.inicio-cabeza { margin-bottom: 16px; }

.inicio-fecha {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--subtle, #6E89AA);
}

.inicio-resumen {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink-deep, #24364F);
}

/* --- el dia --- */

.dia-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dia-turno {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "hora quien cobro" "hora que cobro";
  column-gap: 14px;
  align-items: baseline;
  width: 100%;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--border, #E4EAF1);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #2F3A46);
  text-align: left;
  cursor: pointer;
}

/* la franja de color a la izquierda: se lee como "bloque de agenda", igual que en las apps del rubro */
.dia-turno::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary, #2E4A73);
}

.dia-hora {
  grid-area: hora;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-deep, #24364F);
  white-space: nowrap;
}

.dia-quien {
  grid-area: quien;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dia-que {
  grid-area: que;
  font-size: 0.82rem;
  color: var(--subtle, #6E89AA);
}

/* los que ya pasaron: se achican y se apagan */
.dia-turno.is-paso {
  padding-top: 7px;
  padding-bottom: 7px;
  background: transparent;
  border-color: transparent;
}
.dia-turno.is-paso::before { background: var(--border-md, #C8D5E3); }
.dia-turno.is-paso .dia-quien,
.dia-turno.is-paso .dia-hora { color: var(--subtle, #6E89AA); font-weight: 400; }
.dia-turno.is-paso .dia-que  { display: none; }

/* el que sigue: el unico elemento grande de la pantalla. Es el numerito del logo: tinta, con una
   muesca a cada costado. La sombra va en la lista (la mascara recortaria la del boton). */
.dia-lista { filter: drop-shadow(0 1px 1px rgba(36,54,79,0.04)); }
.dia-turno.is-sigue {
  --muesca: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 26px 22px;
  margin: 6px 0;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ink-deep, #24364F);
  color: #fff;
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 50%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.dia-turno.is-sigue::before { display: none; }

.dia-cuando  { font-size: 0.95rem; font-weight: 600; color: #C8D5E3; }
.dia-nombre  {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.dia-servicio { font-size: 0.98rem; color: #C8D5E3; }

.dia-cobro {
  grid-area: cobro;
  align-self: center;
  padding-left: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #B45309;
  white-space: nowrap;
}
/* en la tarjeta grande (que es flex, no grid) va arriba a la derecha, donde hay aire */
.dia-turno.is-sigue .dia-cobro {
  position: absolute; top: 18px; right: 20px;
  padding: 2px 10px; border-radius: 999px;
  background: #FDF4D8; color: #7A4B00;
}

.dia-turno:focus-visible {
  outline: 2px solid var(--primary, #2E4A73);
  outline-offset: 2px;
}
/* la mascara recorta el contorno de afuera: el foco va por dentro */
.dia-turno.is-sigue:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }

.dia-ver-todo {
  display: block;
  margin: 10px 0 0 auto;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--primary, #2E4A73);
  font-size: 0.88rem;
  cursor: pointer;
}

.dia-proximo {
  margin: 4px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted, #4B5563);
}

/* --- las demas acciones: una lista, como los ajustes del celular --- */

.inicio-lista {
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--border, #E4EAF1);
  border-radius: 14px;
  overflow: hidden;
}

.inicio-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--border, #E4EAF1);
  background: none;
  color: var(--ink, #2F3A46);
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
}
.inicio-fila:first-child { border-top: 0; }
.inicio-fila:hover { background: var(--panel, #F7F8FA); }
.inicio-fila:focus-visible { outline: 2px solid var(--primary, #2E4A73); outline-offset: -2px; }

.fila-texto  { flex: 1; }
.fila-estado {
  font-size: 0.86rem;
  color: var(--subtle, #6E89AA);
  font-variant-numeric: tabular-nums;
}
.fila-estado.is-alerta { color: #B45309; font-weight: 700; }

.fila-chevron {
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--border-md, #C8D5E3);
  border-right: 2px solid var(--border-md, #C8D5E3);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.inicio-config {
  display: block;
  margin: 22px auto 0;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--subtle, #6E89AA);
  font-size: 0.88rem;
  cursor: pointer;
}
.inicio-config:hover { color: var(--primary, #2E4A73); }

/* --- la accion principal, fija abajo, en la zona del pulgar --- */

.inicio-pie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 65%, rgba(246, 246, 244, 0));
  pointer-events: none;
  z-index: 20;
}

.inicio-principal {
  display: block;
  width: 100%;
  max-width: 480px;
  min-height: 56px;
  margin: 0 auto;
  border: 0;
  border-radius: 14px;
  background: var(--primary, #2E4A73);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 16px rgba(46,74,115,0.25);
  cursor: pointer;
  pointer-events: auto;
}
.inicio-principal:hover  { background: var(--ink-deep, #24364F); }
.inicio-principal:focus-visible { outline: 3px solid var(--primary-bg, #EFF4FB); outline-offset: 2px; }

/* --- lo que necesita accion --- */

/* Reservas para confirmar: estado pendiente = ambar suave */
.inicio-resolver {
  margin: 0 0 20px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: #FFF7E8;
  border: 1px solid #F3D9A4;
}

.resolver-titulo {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #6B4100;
}

.resolver-sub {
  margin: 2px 0 12px;
  font-size: 0.9rem;
  color: #7A4B00;
}

.resolver-lista { display: flex; flex-direction: column; gap: 6px; }

/* nombre arriba con todo el ancho; fecha y etiqueta abajo. En una sola linea, la fecha y la
   etiqueta le comian el lugar al nombre y quedaba "francisco c...". */
.resolver-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "nombre nombre" "cuando tag";
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  width: 100%;
  min-height: 52px;
  padding: 9px 14px;
  border: 1px solid #F3D9A4;
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #2F3A46);
  text-align: left;
  cursor: pointer;
}
.resolver-item:hover { border-color: #E0A008; }
.resolver-item:focus-visible { outline: 2px solid #B45309; outline-offset: 2px; }

.resolver-nombre {
  grid-area: nombre;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resolver-cuando { grid-area: cuando; font-size: 0.82rem; color: var(--muted, #4B5563); white-space: nowrap; }
.resolver-tag {
  grid-area: tag;
  justify-self: start;
  font-size: 0.76rem;
  font-weight: 700;
  color: #7A4B00;
  background: #FDF4D8;
  border-radius: 999px;
  padding: 2px 8px;
}

.resolver-mas {
  margin: 8px 0 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #7A4B00;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

/* --- pantalla mediana: el boton deja de flotar y va debajo de las acciones --- */
@media (min-width: 761px) {
  .inicio { padding-bottom: 40px; }
  .inicio-pie {
    position: static;
    padding: 14px 0 0;
    background: none;
  }
  .inicio-principal { max-width: none; }
  .inicio-config { display: none; }   /* ya esta en la barra lateral */
}

/* --- pantalla grande: dos columnas. A la izquierda el dia; a la derecha lo pendiente y las
   acciones. Una columna sola de 480px en un monitor ancho quedaba perdida en el blanco. --- */
@media (min-width: 1100px) {
  .inicio {
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "cabeza   cabeza"
      "dia      resolver"
      "dia      lateral";
    column-gap: 36px;
    align-items: start;
    padding-top: 36px;
  }
  .inicio-cabeza   { grid-area: cabeza; margin-bottom: 22px; }
  .inicio-dia      { grid-area: dia; }
  .inicio-resolver { grid-area: resolver; }
  .inicio-lateral  { grid-area: lateral; }
  .inicio-lista    { margin-top: 0; }
  .inicio-resumen  { font-size: 2.6rem; }
}

/* El atributo hidden no alcanza si otra regla le pone display a la clase: este gana siempre. */
.config-accordion[hidden] { display: none !important; }

/* === ESTILO KIOSCO ===================================================================
   Mobile first. En el celular la navegacion va abajo, donde llega el pulgar, y cada cosa que
   se toca tiene el tamaño de un dedo. En compu la barra lateral queda como estaba. */

/* Sin rotulos en mayusculas: se leen como plantilla y no agregan informacion.
   Quedan en mayusculas solo los dias de la semana del calendario y los codigos de turno. */
.kicker, .form-section legend, .detail-label, .cfg-label, .inline-field label,
.pending-banner-title, .receipt-review-label, .fin-kicker, .slot-section-title {
  text-transform: none;
  letter-spacing: 0;
}
/* En Configuracion el rotulo repetia el titulo ("Disponibilidad" arriba de "Dias y turnos
   bloqueados"): se saca. */
.config-summary-kicker { display: none; }

.nav-solo-movil { display: none; }

@media (max-width: 760px) {
  /* --- barra de navegacion abajo --- */
  .sidebar {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    background: var(--ink-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 50;
  }
  .sidebar-brand { display: none; }
  .sidebar-nav {
    flex: 1;
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .nav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 0;
    padding: 4px 2px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 10px;
  }
  .nav-item:hover { background: none; }
  .nav-icon { display: block; width: 22px; height: 22px; margin: 0; }
  /* activa: el icono dentro de una pildora clara (sin la muesca de la compu) */
  .nav-item .nav-icon { box-sizing: content-box; padding: 4px 16px; border-radius: 999px; transition: background-color 120ms; }
  .nav-item.is-active {
    background: none;
    color: #fff;
    -webkit-mask: none;
            mask: none;
  }
  .nav-item.is-active .nav-icon { background: rgba(255,255,255,0.16); color: #fff; }
  .nav-en-mas { display: none; }
  .nav-solo-movil { display: flex; }
  .nav-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
  }

  /* el contenido no queda tapado por la barra */
  .app-body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* --- "+ Nuevo" pasa a ser un circulo flotante arriba de la barra --- */
  .sidebar-bottom {
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 0;
    z-index: 51;
  }
  .fab-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    /* su color de base (blanco translucido) esta pensado para la barra oscura; flotando sobre la
       pagina clara quedaba blanco sobre blanco */
    background: var(--primary-dark, #24364F);
    color: #fff;
    font-size: 0;            /* se ve el "+" dibujado abajo, no el texto "+ Nuevo" */
    box-shadow: 0 6px 16px rgba(36, 54, 79, 0.28);
  }
  .fab-btn::before {
    content: "+";
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 400;
  }
  .fab-menu { top: auto; bottom: calc(100% + 10px); right: 0; }
  /* el "+" flotante solo en la Agenda: en las demas pantallas no tiene nada que crear y tapa */
  body:not([data-seccion="agenda"]) .sidebar-bottom { display: none; }
  /* donde aparece el circulo flotante, el contenido deja lugar para que la ultima fila se pueda
     subir por encima del boton en vez de quedar tapada */
  body[data-seccion="agenda"] .app-body {
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }

  /* el boton "Nuevo turno" del Inicio queda arriba de la barra, no debajo */
  .inicio-pie { bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* --- lo que se toca, del tamaño de un dedo --- */
  .config-summary { min-height: 56px; }
  /* la flecha quedaba sola en un tercer renglon, abajo a la izquierda: va a la derecha, centrada
     entre el titulo y la descripcion */
  .config-summary-desc    { grid-column: 1; }
  .config-summary-chevron { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .inicio-fila, .resolver-item { min-height: 52px; }
}

/* "Mas": la misma lista de filas del Inicio */
.mas-lista { margin-top: 4px; }
.mas-lista + .mas-lista { margin-top: 20px; }
.btn-salir .fila-texto { color: #B42318; }

/* Agenda en el celular: la fecha arriba, entera y entre las flechas; abajo "Hoy" y Dia/Semana. */
@media (max-width: 760px) {
  .header .date-nav { flex: 1; flex-wrap: wrap; row-gap: 8px; }
  .header .date-info { flex: 1 1 calc(100% - 120px); }
  .date-title { font-size: 1.25rem; }
  .nav-btn { width: 42px; height: 42px; }
  #btn-today { min-height: 36px; }
  .header .view-toggle { margin-left: auto; }
  .view-btn { min-height: 36px; padding: 6px 16px; }
}

/* Cartel cuando algo no se pudo guardar en la nube (app.js, avisoNube). */
.aviso-nube {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 12px;
  margin: 0 auto;
  z-index: 200;
  max-width: 520px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: #FFF4E5;
  border: 1px solid #F0C98A;
  color: #7A4B00;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(36, 54, 79, 0.15);
}

/* --- Comprobantes con IA --- */
.ia-aviso { margin-top: 10px; font-size: 0.82rem; color: var(--subtle); line-height: 1.45; }
.ia-lectura {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--primary-bg);
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.45;
}
.ia-lectura strong { display: block; color: var(--ink-deep); }
.ia-lectura small { display: block; margin-top: 4px; color: var(--subtle); }
.ia-lectura--ok   { background: #DCFCE7; box-shadow: inset 4px 0 0 #22C55E; }
.ia-lectura--mal  { background: #FEE2E2; box-shadow: inset 4px 0 0 #EF4444; }
.ia-lectura--duda { background: #FEF9C3; box-shadow: inset 4px 0 0 #F59E0B; }
.ia-reintentar { margin-top: 8px; }

/* --- Entrada directa (login y avisos): una sola cosa en pantalla, pensada para el pulgar ---
   La caja es un "numerito de turno" como el logo: talón con la marca, muescas y línea troquelada.
   Las muescas se hacen con mask en cada mitad, así caen siempre en la unión sin importar el alto. */
.acceso {
  /* El acceso conserva su paleta (el pedido "menos azul" es del panel); solo el fondo pasa a neutro. */
  --border:     #E4EAF1;
  --border-md:  #C8D5E3;
  --ink:        #2F3A46;
  --muted:      #4B5563;
  --subtle:     #6E89AA;
  --panel:      #F7F8FA;
  --primary-bg: #EFF4FB;
  --tint-2:     #DCE6F2;
  --acceso-muesca: 12px;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--bg);
  font-family: 'Figtree', 'Inter', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Banda de tinta: arriba en el celu, columna izquierda en la compu */
.acceso-lado {
  padding: 40px 24px 112px;
  background:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ink-deep);
  color: #fff;
}
.acceso-lado-titulo {
  max-width: 13ch;
  font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.acceso-lado-texto,
.acceso-pila { display: none; }

.acceso-ticket {
  position: relative;
  width: calc(100% - 32px);
  max-width: 440px;
  margin: -76px auto 40px;
  filter: drop-shadow(0 1px 1px rgba(36,54,79,0.08)) drop-shadow(0 14px 30px rgba(36,54,79,0.14));
  animation: acceso-entra 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes acceso-entra {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.acceso-talon,
.acceso-caja { background: #fff; }
.acceso-talon {
  padding: 22px 28px 20px;
  border-radius: 20px 20px 0 0;
  background: var(--primary-bg);
  -webkit-mask:
    radial-gradient(circle var(--acceso-muesca) at 0 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--acceso-muesca) at 0 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) right / 51% 100% no-repeat;
}
.acceso-marca { display: flex; }
.acceso-marca .logo { height: 104px; margin-left: -10px; }
.acceso-lema { margin-top: 6px; font-size: 0.9rem; color: var(--subtle); }

.acceso-caja {
  position: relative;
  padding: 30px 28px 26px;
  border-radius: 0 0 20px 20px;
  -webkit-mask:
    radial-gradient(circle var(--acceso-muesca) at 0 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--acceso-muesca) at 0 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) right / 51% 100% no-repeat;
}
/* Línea troquelada entre talón y cuerpo */
.acceso-caja::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-md) 0 7px, transparent 7px 13px);
}

.acceso-titulo {
  margin: 0 0 24px;
  font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink-deep);
  letter-spacing: -0.03em;
}
.acceso-form { display: flex; flex-direction: column; gap: 16px; }
.acceso-campo { display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; font-weight: 600; color: var(--ink-deep); }
.acceso-campo input,
.acceso-campo select {
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--border-md);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  font-weight: 400;
  font-size: 1rem; /* 16px: menos que eso y el iPhone hace zoom al tocar */
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.acceso-campo input:hover,
.acceso-campo select:hover { border-color: var(--subtle); }
.acceso-campo input:focus,
.acceso-campo select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46,74,115,0.14);
}
.acceso-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: #FDF1EF;
  color: #B42318;
  font-size: 0.9rem;
  line-height: 1.4;
}
.acceso-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.acceso-check input { margin-top: 2px; width: 20px; height: 20px; flex: none; accent-color: var(--primary); }
.acceso-boton {
  min-height: 54px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 16px rgba(46,74,115,0.25);
  transition: background-color 150ms ease, transform 100ms ease;
}
.acceso-boton:hover { background: var(--ink-deep); }
.acceso-boton:active { transform: translateY(1px); }
.acceso-boton:focus-visible { outline: 3px solid rgba(46,74,115,0.35); outline-offset: 3px; }
.acceso-boton:disabled { opacity: 0.6; cursor: default; transform: none; }
.acceso-caja > .acceso-boton { width: 100%; margin-top: 24px; }
.acceso-texto + .acceso-form { margin-top: 22px; }
.acceso-texto { margin-top: 18px; font-size: 0.95rem; color: var(--muted); line-height: 1.55; }
.acceso-titulo + .acceso-texto { margin-top: -10px; }
.acceso-texto strong { color: var(--ink-deep); }
.acceso-caja a { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(46,74,115,0.35); }
.acceso-caja a:hover { text-decoration-color: currentColor; }
.acceso-caja a:focus-visible { outline: 3px solid rgba(46,74,115,0.3); outline-offset: 2px; border-radius: 4px; }
.acceso-form + .acceso-texto { margin-top: 22px; }

/* Compu: pantalla partida. A la izquierda, la promesa y unos turnos de muestra */
@media (min-width: 960px) {
  .acceso {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .acceso-lado {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 8vh clamp(48px, 6vw, 120px);
  }
  .acceso-lado-titulo { font-size: clamp(2.8rem, 3.8vw, 4.4rem); }
  .acceso-lado-texto { display: block; max-width: 40ch; font-size: 1.1rem; line-height: 1.55; color: #C8D5E3; }
  .acceso-pila { display: grid; gap: 14px; margin-top: 20px; max-width: 420px; }
  .acceso-ticket { margin: 48px auto; width: min(440px, 100% - 64px); }
}

/* Turnos de muestra (solo compu) */
.acceso-boleto { --acceso-muesca: 9px; display: grid; grid-template-columns: auto 1fr; color: var(--ink-deep); filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25)); }
.acceso-boleto:nth-child(1) { transform: rotate(-3deg); }
.acceso-boleto:nth-child(2) { transform: rotate(1.5deg) translateX(48px); }
.acceso-boleto:nth-child(3) { transform: rotate(-1deg) translateX(14px); }
.acceso-boleto-cabeza {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 14px 0 0 14px;
  background: var(--primary-bg);
  -webkit-mask:
    radial-gradient(circle var(--acceso-muesca) at 100% 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle var(--acceso-muesca) at 100% 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 100% 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) bottom / 100% 51% no-repeat;
}
.acceso-boleto-cabeza b { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1; }
.acceso-boleto-cabeza span { margin-top: 4px; font-size: 0.85rem; color: var(--subtle); }
.acceso-boleto-pie {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  border-radius: 0 14px 14px 0;
  background: #fff;
  font-weight: 600;
  -webkit-mask:
    radial-gradient(circle var(--acceso-muesca) at 0 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 0 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle var(--acceso-muesca) at 0 0, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--acceso-muesca) at 0 100%, #0000 calc(var(--acceso-muesca) - 0.5px), #000 var(--acceso-muesca)) bottom / 100% 51% no-repeat;
}
.acceso-boleto-pie::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--border-md) 0 5px, transparent 5px 10px);
}
.acceso-boleto-pie i {
  align-self: flex-start;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
}
.acceso-boleto-pie i::before { content: '\2713\00a0'; }

@media (prefers-reduced-motion: reduce) {
  .acceso-ticket { animation: none; }
  .acceso-campo input, .acceso-boton { transition: none; }
}

/* --- Agenda: grilla del dia (bloques del alto de su duracion, como Google Calendar) --- */
.dia-grilla {
  position: relative;
  margin: 8px 12px 16px 56px;   /* a la izquierda, la columna de horas */
  /* fuera del horario de atencion: rayado suave */
  background: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(20,22,26,0.045) 7px, rgba(20,22,26,0.045) 14px);
  border-radius: var(--r-sm);
}
.dg-ancla { position: absolute; left: 0; height: 0; scroll-margin-top: 8px; }
.dg-hora {
  position: absolute;
  left: -56px;
  right: 0;
  border-top: 1px solid var(--border);
  pointer-events: none;
}
.dg-hora span {
  position: absolute;
  top: -8px;
  left: 0;
  width: 48px;
  padding-right: 6px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--subtle);
  background: var(--white);
  font-variant-numeric: tabular-nums;
}
/* horario de atencion: blanco; fuera de horario queda el fondo gris de la pagina */
.dg-atiende {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--r-sm);
}
.dg-ahora {
  position: absolute;
  left: -6px;
  right: 0;
  height: 2px;
  background: #DC2626;
  z-index: 4;
  pointer-events: none;
}
.dg-ahora::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #DC2626;
}

/* hueco libre: invisible hasta que se toca */
.dg-libre {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}
.dg-libre-hora { font-size: 0.78rem; color: transparent; font-variant-numeric: tabular-nums; }
.dg-libre-acciones { display: none; gap: 6px; margin-left: auto; }
.dg-libre:hover, .dg-libre.is-open { background: var(--primary-bg); outline: 1px dashed var(--border-md); }
.dg-libre:hover .dg-libre-hora, .dg-libre.is-open .dg-libre-hora { color: var(--primary); }
.dg-libre.is-open { z-index: 3; }
.dg-libre.is-open .dg-libre-acciones { display: flex; }
.dg-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--ink-deep);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.dg-btn--suave { background: var(--white); color: var(--ink-deep); border: 1px solid var(--border-md); }

.dg-bloqueo {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  border: 0;
  border-radius: var(--r-sm);
  padding: 4px 10px;
  text-align: left;
  font: inherit;
  font-size: 0.78rem;
  color: #991B1B;
  background: repeating-linear-gradient(135deg, #FEF2F2, #FEF2F2 6px, #FEE2E2 6px, #FEE2E2 12px);
  cursor: pointer;
  overflow: hidden;
}

/* turno: color de fondo y barra segun estado */
.dg-turno {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  column-gap: 8px;
  padding: 7px 12px 7px 16px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  font: inherit;
  background: var(--dg-bg, #EFEFEC);
  color: var(--dg-ink, #4A4D52);
  box-shadow: inset 4px 0 0 var(--dg-bar, #D2D2CC);
  overflow: hidden;
  cursor: pointer;
  transition: filter 100ms;
}
.dg-turno:hover { filter: brightness(0.97); }
.dg-turno:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.dg-turno.is-selected { outline: 2.5px solid var(--ink-deep); outline-offset: 1px; }
.dg-turno-hora   { font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dg-turno-nombre { flex-basis: 100%; font-size: 1rem; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-turno-que    { flex-basis: 100%; font-size: 0.85rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-turno-tag {
  position: absolute;
  top: 7px;
  right: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  font-size: 0.74rem;
  font-weight: 700;
  color: #B45309;
}
/* turno corto: todo en una linea */
.dg-turno.is-corto { align-items: center; flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
.dg-turno.is-corto .dg-turno-nombre { flex-basis: auto; font-size: 0.85rem; }
.dg-turno.is-corto .dg-turno-que { display: none; }
.dg-turno.is-corto .dg-turno-tag { position: static; margin-left: auto; }

/* Estado = color. Verde, ambar y rojo solo para estados; "en atencion" va en la tinta de la marca. */
.dg-turno--confirmado  { --dg-bg: #E4F5EA; --dg-ink: #14532D; --dg-bar: #22A55A; }
.dg-turno--pendiente,
.dg-turno--pendiente_de_pago { --dg-bg: #FDF4D8; --dg-ink: #713F12; --dg-bar: #E0A008; }
.dg-turno--en_consulta { --dg-bg: var(--ink-deep); --dg-ink: #fff; --dg-bar: var(--acento); }
.dg-turno--atendido    { --dg-bg: #EFEFEC; --dg-ink: #4A4D52; --dg-bar: #D2D2CC; }
.dg-turno--ausente     { --dg-bg: #FBECEC; --dg-ink: #8A1C1C; --dg-bar: #D65C5C; }
.dg-turno--past        { --dg-bg: #F6F6F4; --dg-ink: #66696E; --dg-bar: #D2D2CC; }

@media (min-width: 761px) {
  .dia-grilla { margin: 16px 20px 24px 64px; }
}
@media (max-width: 760px) {
  /* la fecha y Dia/Semana quedan a mano mientras se recorre la grilla */
  body[data-seccion="agenda"] .header { position: sticky; top: 0; z-index: 20; }
  .dg-ancla { scroll-margin-top: 112px; }
}

/* etiquetas de la IA: verde si dio OK, rojo si no coincide */
.dg-turno-tag.is-ok, .resolver-tag.is-ok { color: #15803D; }
.dg-turno-tag.is-mal, .resolver-tag.is-mal { color: #B91C1C; }
.resolver-tag.is-ok  { background: #DCFCE7; }
.resolver-tag.is-mal { background: #FEE2E2; }

/* --- Menu de costado (celular): se abre desde "Mas" --- */
.menu { position: fixed; inset: 0; z-index: 200; }
.menu-fondo {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}
.menu-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(84vw, 340px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(36, 54, 79, 0.25);
  transform: translateX(-100%);
  transition: transform 0.22s ease-out;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.menu.is-open .menu-fondo { opacity: 1; }
.menu.is-open .menu-panel { transform: none; }
.menu-cabeza {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(28px + env(safe-area-inset-top)) 20px 24px;
  background:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ink-deep);
}
.menu-foto {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink-deep);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  overflow: hidden;
}
.menu-foto img { width: 100%; height: 100%; object-fit: cover; }
.menu-quien { display: flex; flex-direction: column; min-width: 0; }
.menu-quien strong { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: 1.25rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-quien small { margin-top: 2px; font-size: 0.88rem; color: #C8D5E3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-items { display: flex; flex-direction: column; padding: 10px 10px 16px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.menu-item .nav-icon { display: block; width: 22px; height: 22px; flex-shrink: 0; color: var(--subtle); }
.menu-item:active, .menu-item:hover { background: var(--panel); }
.menu-item.is-active { background: var(--primary-bg); color: var(--ink-deep); font-weight: 600; }
.menu-item.is-active .nav-icon { color: var(--primary); }
.menu-item--salir, .menu-item--salir .nav-icon { color: #B42318; }
.menu-linea { margin: 8px 14px; border: 0; border-top: 1px solid var(--border); }

/* --- Semana en el celular: lista por dia (en la compu, las 7 columnas) --- */
.week-lista { display: none; }
.week-apt[class*="dg-turno--"] { background: var(--dg-bg); border-color: transparent; box-shadow: inset 3px 0 0 var(--dg-bar); }
.week-apt[class*="dg-turno--"] .week-apt-time,
.week-apt[class*="dg-turno--"] .week-apt-name,
.week-apt[class*="dg-turno--"] .week-apt-svc { color: var(--dg-ink); }
.week-apt[class*="dg-turno--"] .week-apt-svc { opacity: 0.8; }
@media (max-width: 760px) {
  .week-view { padding: 8px 12px 24px; }
  .week-grid { display: none; }
  .week-lista { display: flex; flex-direction: column; }
  .wl-dia {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .wl-dia.is-libre { opacity: 0.55; }
  .wl-fecha { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
  .wl-dow { font-size: 0.8rem; font-weight: 600; color: var(--subtle); }
  .wl-num {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
    font-size: 1.35rem; color: var(--ink-deep);
  }
  .wl-dia.is-hoy .wl-dow { color: var(--primary); }
  .wl-dia.is-hoy .wl-num { background: var(--ink-deep); color: #fff; }
  .wl-turnos { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .wl-turno {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px 8px 14px;
    border: 0;
    border-radius: 10px;
    text-align: left;
    font: inherit;
    background: var(--dg-bg, #EFEFEC);
    color: var(--dg-ink, #4A4D52);
    box-shadow: inset 4px 0 0 var(--dg-bar, #D2D2CC);
    cursor: pointer;
  }
  .wl-hora { font-family: var(--display); font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .wl-quien { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .wl-nombre { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wl-que { font-size: 0.8rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wl-turno .dg-turno-tag { position: static; flex-shrink: 0; }
  .wl-vacio { padding: 10px 0; font-size: 0.88rem; color: var(--subtle); }
  .wl-vacio.is-bloqueado { color: #991B1B; }
}

/* Estado "Faltó" en la lista de clientes */
.cl-apt-status--ausente { background: #fee2e2; color: #dc2626; }

/* Uso del plan Gratis (turnos que quedan en el mes) */
/* Contador del plan: una franja fina con la frase y una barra que se vacia. */
.uso-plan {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px 24px;
  font-size: 0.85rem;
  color: var(--subtle);
  background: var(--primary-bg);
  border-bottom: 1px solid var(--border);
}
.uso-plan-texto { min-width: 0; }
.uso-plan-barra {
  flex: 0 0 120px;
  height: 6px;
  border-radius: 999px;
  background: var(--tint-2);
  overflow: hidden;
}
.uso-plan-barra i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.uso-plan--aviso {
  background: #FFF7E8;
  border-bottom-color: #F3D9A4;
  color: #7A4B00;
  font-weight: 600;
}
.uso-plan--aviso .uso-plan-barra { background: #F6E3BC; }
.uso-plan--aviso .uso-plan-barra i { background: #D97706; }
@media (max-width: 760px) {
  .uso-plan { justify-content: space-between; padding: 8px 16px; font-size: 0.82rem; line-height: 1.35; }
  .uso-plan-barra { flex-basis: 64px; }
}

/* Mi perfil: el link de reservas es un boleto (talon de tinta + cuerpo blanco, troquelado). */
.link-boleto {
  --muesca: 12px;
  margin-bottom: 20px;
  filter: drop-shadow(0 1px 1px rgba(36,54,79,0.06)) drop-shadow(0 10px 24px rgba(36,54,79,0.10));
}
.link-boleto-talon,
.link-boleto-cuerpo { position: relative; }
.link-boleto-talon {
  padding: 24px 26px 22px;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ink-deep);
  color: #fff;
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 100%, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.link-boleto-talon h2 { font-size: 1.5rem; line-height: 1.1; color: #fff; }
.link-boleto-talon p { margin-top: 6px; font-size: 0.95rem; color: #C8D5E3; line-height: 1.45; }
.link-boleto-cuerpo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 26px 24px;
  border-radius: 0 0 18px 18px;
  background: #fff;
  -webkit-mask:
    radial-gradient(circle var(--muesca) at 0 0, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 0, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--muesca) at 0 0, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--muesca) at 100% 0, #0000 calc(var(--muesca) - 0.5px), #000 var(--muesca)) right / 51% 100% no-repeat;
}
.link-boleto-cuerpo::before {
  content: '';
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-md) 0 7px, transparent 7px 13px);
}
.link-boleto-url {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink-deep);
  word-break: break-all;
  line-height: 1.3;
}
.link-boleto-copiar { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) {
  .link-boleto-talon { padding: 22px 20px 20px; }
  .link-boleto-cuerpo { flex-direction: column; align-items: stretch; padding: 20px; }
  .link-boleto-copiar { width: 100%; }
}

@media (max-width: 560px) {
  .section-wrap .form-card { padding: 22px 18px; }
}
.pf-foto { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.pf-foto-circulo {
  width: 76px; height: 76px;
  flex-shrink: 0;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ink-deep);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
}
.pf-foto-texto { flex: 1; min-width: 0; }
.pf-foto-titulo { font-size: 0.95rem; font-weight: 700; color: var(--ink-deep); }
.pf-foto-botones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-foto-botones .btn-ghost { display: inline-flex; align-items: center; cursor: pointer; }
.pf-quitar { color: #B42318; }
.pf-linea { margin: 24px 0 20px; }
.field-hint { font-size: 0.85rem; }


/* ==========================================================================================
   PANEL 2 (2026-11-20): un solo sistema de botones, ayuda junto al titulo, archivos con boton
   propio, Mi pagina / Configuracion / Mi cuenta. Va al final para mandar sobre lo anterior.
   ========================================================================================== */

/* --- Botones: cuatro tipos, misma altura, mismo radio, misma letra ---
   principal = marino lleno (uno por bloque) | secundario = borde gris | texto = link marino |
   peligro = rojo. WhatsApp usa la forma del principal con su verde. */
.btn-primary, .btn-ghost, .btn-text, .btn-danger, .btn-wa-open, .btn-copy,
.cfg-add-block, .cfg-link-btn, .svc-btn-edit, .btn-edit-inline,
.btn-confirm-pay, .btn-reject-pay, .btn-receipt-approve, .rec-btn,
.notify-intro-actions button, .receipt-viewer-actions a, .receipt-viewer-actions button,
.ayuda-accesos button, .cfg-tg-rec-del, .np-palettes button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-boton);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn-primary, .btn-confirm-pay, .btn-receipt-approve, .rec-btn, .notify-intro-actions button:first-child {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover, .btn-confirm-pay:hover, .btn-receipt-approve:hover, .rec-btn:hover,
.notify-intro-actions button:first-child:hover { background: var(--primary-d); border-color: var(--primary-d); }
.btn-ghost, .btn-copy, .svc-btn-edit, .btn-edit-inline, .rec-btn--again,
.notify-intro-actions button, .receipt-viewer-actions a, .receipt-viewer-actions button,
.ayuda-accesos button, .np-palettes button {
  background: var(--white);
  border-color: var(--border-md);
  color: var(--ink);
}
.btn-ghost:hover, .btn-copy:hover, .svc-btn-edit:hover, .btn-edit-inline:hover, .rec-btn--again:hover,
.notify-intro-actions button:hover, .receipt-viewer-actions a:hover, .receipt-viewer-actions button:hover,
.ayuda-accesos button:hover, .np-palettes button:hover { background: var(--panel); border-color: #B9B9B2; color: var(--ink); }
.btn-text, .cfg-add-block, .cfg-link-btn {
  padding: 0 4px;
  background: none;
  border-color: transparent;
  color: var(--primary);
}
.btn-text:hover, .cfg-add-block:hover, .cfg-link-btn:hover {
  background: none;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-danger, .btn-reject-pay, .cfg-tg-rec-del {
  background: var(--white);
  border-color: #E8C4C0;
  color: var(--peligro);
}
.btn-danger:hover, .btn-reject-pay:hover, .cfg-tg-rec-del:hover { background: #FDF1EF; border-color: #D9A39C; }
.btn-wa-open { background: #157F49; border-color: #157F49; color: #fff; }
.btn-wa-open:hover { background: #10673B; border-color: #10673B; }
.btn-copy.copied { background: #F0FDF4; color: var(--verde-texto); border-color: #BBF7D0; }
.btn-receipt-approve.approved { background: var(--verde-texto); border-color: var(--verde-texto); }
.btn-primary:active, .btn-ghost:active, .btn-danger:active, .btn-wa-open:active { transform: translateY(1px); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-text:focus-visible, .btn-danger:focus-visible,
.btn-wa-open:focus-visible, .btn-copy:focus-visible, .cfg-add-block:focus-visible, .cfg-link-btn:focus-visible,
.svc-btn-edit:focus-visible, .btn-edit-inline:focus-visible, .rec-btn:focus-visible {
  outline: 3px solid rgba(46,74,115,0.35);
  outline-offset: 2px;
}
.btn-primary:disabled, .btn-ghost:disabled, .btn-danger:disabled, .btn-text:disabled { opacity: 0.55; cursor: default; transform: none; }
/* las dos acciones de mostrador (Nuevo turno del Inicio y Cliente presente) son mas altas: es la
   jerarquia, no otro tipo de boton */
.inicio-principal, .btn-presente { min-height: 52px; border-radius: var(--r-boton); font-size: 1rem; box-shadow: none; }
.fab-btn { border-radius: var(--r-boton); box-shadow: none; }
.nav-btn { width: 44px; height: 44px; border: 1px solid var(--border-md); border-radius: var(--r-boton); }
.nav-btn:hover { background: var(--panel); border-color: #B9B9B2; }
#btn-today { min-height: 44px; }
.view-toggle { border-radius: var(--r-boton); background: var(--soft); padding: 3px; }
.view-btn { border-radius: 8px; min-height: 38px; color: var(--muted); }
.status-btn { border-radius: var(--r-boton); min-height: 40px; border-width: 1px; border-color: var(--border-md); }
.rec-day { border-radius: var(--r-boton); min-height: 44px; }
.btn-remove-block { border-radius: var(--r-boton); min-width: 44px; min-height: 44px; }
.modal-close { border-radius: var(--r-boton); }

/* --- Acciones de un bloque: abajo, a la izquierda, el principal primero (celu y compu) --- */
.acciones, .form-actions, .inline-actions, .receipt-review-block, .receipt-thumb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.acciones { margin-top: 24px; }
.acciones .cfg-msg { flex-basis: 100%; margin: 0; }
.acciones .cfg-msg:empty { display: none; }
.form-actions { margin-top: 12px; }
.inline-actions { margin-top: 12px; }
.receipt-review-block { margin-top: 12px; }
.cfg-guardar { width: auto; margin-top: 0; }
.modal-card .form-actions .btn-primary { min-width: 0; width: auto; }
.btn-wa-open, .btn-copy { margin-top: 0; }
.detail-block .acciones { margin-top: 12px; }

/* --- Titulos: la ayuda "?" va al lado del titulo, el texto debajo con aire --- */
.section-page-header,
.form-title {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
}
.section-page-header { margin-bottom: 28px; }
.form-title { margin-bottom: 24px; }
.form-title h2 { margin: 0; }
.section-page-sub, .form-title-sub { flex-basis: 100%; margin-top: 8px; color: var(--subtle); line-height: 1.5; }
.modal-card .form-title { align-content: flex-start; }
.modal-card .form-title-sub { margin-top: 6px; }

/* --- Ayuda: un "?" chico junto al titulo; la nota se abre flotando, sin correr el contenido --- */
turnalo-ayuda { position: relative; display: inline-flex; max-width: 100%; vertical-align: middle; }
.ayuda-boton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--subtle);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.ayuda-icono {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-md);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.ayuda-boton:hover .ayuda-icono, .ayuda-boton[aria-expanded="true"] .ayuda-icono { border-color: var(--primary); color: var(--primary); }
.ayuda-boton:hover { color: var(--ink); }
.ayuda-boton:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 14px; }
.ayuda-nota:not([hidden]) {
  position: absolute;
  top: calc(100% + 8px);
  left: -6px;
  z-index: 60;
  display: block;
  width: min(320px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--border-md);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(20,22,26,0.12);
  color: var(--ink);
  font: 400 0.92rem/1.5 'Figtree', system-ui, sans-serif;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
}
.ayuda-accesos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.config-accordion-body > turnalo-ayuda { margin-bottom: 14px; }
.inicio .ayuda-inicio { margin: 0 0 10px; }
@media (pointer: coarse) { .ayuda-boton { min-height: 44px; } }
/* En el celu la nota ocupa el ancho del bloque (no se sale de la pantalla aunque el "?" este a la derecha) */
@media (max-width: 760px) {
  .header, .config-accordion-body, .inicio-cabeza, .cfg-campo-ayuda { position: relative; }
  turnalo-ayuda { position: static; }
  .ayuda-nota:not([hidden]) { left: 0; right: 0; width: auto; }
}

/* --- Tarjetas, campos y espacios --- */
.form-card { border-radius: 16px; box-shadow: none; padding: 28px; }
.section-wrap > .form-card, .section-wrap > .link-boleto, .section-wrap > div > .form-card { margin-bottom: 20px; }
.field { gap: 8px; }
.field-grid { gap: 18px 14px; }
.field input, .field select, .field textarea { background: var(--white); border-width: 1px; border-radius: var(--r-boton); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9B9B2; }
.field-hint { margin-top: 2px; font-size: 0.85rem; line-height: 1.5; color: var(--subtle); }
.cfg-msg { color: var(--verde-texto); }
.form-card h3, .bloque-titulo {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink-deep);
}
.bloque { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--border); }
.bloque:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.bloque > .field-hint:first-of-type { margin-bottom: 14px; }
.svc-editor { background: var(--white); border-radius: var(--r-md); padding: 18px; }
.svc-editor .svc-caja { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); }
.svc-caja-titulo { margin: 0 0 8px; font-size: 0.9rem; font-weight: 700; color: var(--ink-deep); }
.svc-error { margin: 14px 0 0; color: var(--peligro); font-size: 0.92rem; font-weight: 600; }
.cfg-moreinfo-row { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; background: var(--white); }
.cfg-term-input, .cfg-moreinfo-content {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border-md); border-radius: var(--r-boton);
  font: inherit; font-size: 1rem; line-height: 1.45; color: var(--ink); background: var(--white); resize: vertical;
}
.lista-vacia { padding: 4px 0 2px; font-size: 0.9rem; color: var(--subtle); }
.config-summary-chevron { background: var(--soft); }
.config-accordion[open] { box-shadow: var(--shadow-sm); }
.config-accordion-body { border-top: 1px solid var(--border); padding: 22px 20px 22px; }
.config-hint { color: var(--subtle); }
.cfg-day-row .cfg-add-day-block { padding: 0 4px; }
.cfg-tpl-textarea { border-color: var(--border-md); font-size: 0.95rem; }
.uso-plan { background: var(--white); color: var(--subtle); }
.uso-plan-barra { background: var(--soft); }
.notify-intro { background: var(--white); border-bottom: 1px solid var(--border); }
.detail-empty-icon { background: linear-gradient(90deg, transparent 37px, var(--border-md) 37px 39px, transparent 39px) 0 14px / 100% 36px no-repeat, var(--soft); }
@media (max-width: 760px) {
  .section-wrap { padding: 22px 16px 40px; }
  .section-wrap .form-card { padding: 22px 16px; }
  .config-accordion-body { padding: 18px 16px; }
}

/* hidden siempre gana, aunque la clase del boton le ponga display */
[hidden] { display: none !important; }
.archivo + .field-grid { margin-top: 26px; }
.cfg-moreinfo-row .field + .field { margin-top: 14px; }
.cfg-moreinfo-row .acciones { margin-top: 8px; }
.cfg-term-row { align-items: flex-start; margin-bottom: 10px; }
.cfg-term-row .cfg-term-input { flex: 1; }
/* "+ Agregar ..." va justo debajo de su lista; el Guardar del bloque, al final */
#cfg-add-svc, #cfg-add-moreinfo, #cfg-add-term, #cfg-tg-add, #np-add-member { margin-top: 4px; }
.cfg-subtitulo { margin: 28px 0 14px; }
.cfg-reglas { gap: 20px; margin-bottom: 0; }
.np-editor-actions { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.np-template-picker .btn-text { margin-top: 4px; }

/* --- Archivo: boton propio "Elegir foto" con vista previa (el input queda oculto) --- */
.archivo { display: flex; align-items: center; gap: 16px; }
.archivo + .archivo { margin-top: 18px; }
.archivo-mini {
  width: 72px; height: 72px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); color: var(--subtle);
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
}
.archivo-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archivo-mini--logo { border-radius: 50%; background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.archivo-mini--logo img { object-fit: cover; }
.archivo-mini--portada { width: 168px; height: 72px; }
.archivo-texto { flex: 1; min-width: 0; }
.archivo-titulo { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--ink-deep); }
.archivo-texto .acciones { margin-top: 10px; }
.archivo-texto .field-hint:empty { display: none; }
@media (max-width: 480px) {
  .archivo { align-items: flex-start; }
  .archivo-mini--portada { width: 96px; height: 56px; }
}

/* --- Mi pagina: el link (boleto) con sus tres acciones --- */
.link-boleto { filter: none; border: 1px solid var(--border); border-radius: 18px; }
.link-boleto-talon p { color: rgba(255,255,255,0.78); }
.link-boleto-cuerpo { display: block; padding: 22px 26px 24px; }
.link-boleto-url { display: block; font-size: 1.05rem; }
.link-boleto .acciones { margin-top: 16px; }
@media (max-width: 560px) {
  .link-boleto-cuerpo { padding: 20px 16px; }
  .link-boleto-copiar { width: auto; }
}

/* --- Configuracion: avisos --- */
.canal { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.canal:first-of-type { border-top: 0; padding-top: 0; }
.canal-icono {
  grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
}
.canal-icono--wa { background: #E7F6EC; color: var(--verde-texto); }
.canal-icono--tg { background: var(--soft); color: var(--muted); }
.canal-nombre { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-deep); }
.canal-texto { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.canal-cuerpo { grid-column: 2; margin-top: 10px; }
.pronto {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: #FFF4D6; color: #6B4A00; font-size: 0.78rem; font-weight: 700;
}
.cfg-tg-recipient-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.cfg-tg-recipient-row .field { flex: 1 1 180px; margin: 0; }
.notify-settings-card, .notify-bot-note { display: none; }

/* --- Mi cuenta --- */
.cuenta-datos { display: grid; gap: 0; margin: 0; }
.cuenta-datos > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.cuenta-datos > div:first-child { border-top: 0; padding-top: 0; }
.cuenta-datos dt { color: var(--muted); }
.cuenta-datos dd { margin: 0; font-weight: 700; color: var(--ink-deep); text-align: right; overflow-wrap: anywhere; }
.cuenta-uso { margin-top: 6px; }
.cuenta-uso-barra { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.cuenta-uso-barra i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }

/* --- Editor de la pagina (antes en negocio.css, que es de reservas: el panel ya no lo carga) --- */
.np-editor textarea { width: 100%; min-height: 112px; resize: vertical; line-height: 1.6; }
.np-editor .cfg-msg { min-height: 0; }
.np-editor .np-error { color: var(--peligro); }
.np-editor button:disabled { opacity: .65; cursor: wait; }
.np-editor .np-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 8px; }
.np-editor .np-template-card { position: relative; display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; padding: 0; border: 1px solid var(--border-md); border-radius: 12px; overflow: hidden; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.np-editor .np-template-card:hover { border-color: #B9B9B2; }
.np-editor .np-template-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.np-editor .np-template-card[data-template][aria-pressed="true"]::after {
  content: "\2713"; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  display: grid; place-items: center; background: var(--verde); color: #fff; border-radius: 50%; font-weight: 700;
}
.np-editor .np-template-card:focus-visible { outline: 3px solid rgba(46,74,115,0.35); outline-offset: 2px; }
.np-editor .np-template-photo { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.np-editor .np-template-caption { display: flex; align-items: center; gap: 10px; padding: 12px; }
.np-editor .np-template-caption img { flex-shrink: 0; border-radius: 8px; }
.np-editor .np-template-caption strong { display: block; font-size: .95rem; line-height: 1.3; }
.np-editor .np-template-caption small { display: block; font-size: .8rem; line-height: 1.4; color: var(--subtle); margin-top: 2px; }
.np-editor .np-custom-card { grid-column: 1 / -1; border-style: dashed; }
.np-editor .np-custom-card .np-template-caption { flex-direction: row; align-items: center; padding: 14px 16px; }
.np-editor .np-custom-symbol { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--soft); color: var(--ink-deep); font-size: 1.5rem; }
.np-editor .np-custom-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 16px; }
.np-editor input[type="color"] { width: 100%; height: 46px; padding: 4px; cursor: pointer; }
.np-editor .np-palettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.np-editor .np-sample { border: 1px solid var(--np-border, var(--border)); padding: 22px; border-radius: 12px; background: var(--np-page-bg); color: var(--np-page-ink); display: flex; gap: 12px; flex-direction: column; margin: 18px 0 0; }
.np-editor .np-sample strong { font-family: var(--np-font); font-size: 1.4rem; }
.np-editor .np-sample-button { align-self: flex-start; border-radius: 8px; padding: 10px 16px; font-weight: 700; background: var(--np-accent); color: var(--np-on-accent); }
.np-editor #np-logo-preview { object-fit: contain; border-radius: 12px; }
.np-editor #np-logo-preview[hidden], .np-editor #np-cover-preview[hidden] { display: none; }
.np-editor .np-logo-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 10px; cursor: pointer; font-size: 0.95rem; }
.np-editor .np-logo-choice input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--primary); }
.np-editor .np-member-editor { margin: 0 0 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.np-editor .np-member-editor legend { padding: 0 6px; font-weight: 700; color: var(--ink-deep); }
.np-editor .np-member-editor label { display: block; margin-bottom: 12px; font-size: .9rem; font-weight: 600; color: var(--ink-deep); }
.np-editor .np-member-editor input, .np-editor .np-member-editor textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--border-md); border-radius: var(--r-boton); padding: 10px 14px; background: var(--white); color: var(--ink); font: inherit; font-size: 1rem; }
.np-editor .np-member-editor textarea { min-height: 72px; }
.np-editor .np-quick-guide { margin-top: 6px; }
.np-editor .np-quick-guide summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--primary); cursor: pointer; }
.np-editor .np-quick-guide ol { padding-left: 22px; margin: 0 0 8px; color: var(--muted); }
.np-editor .np-quick-guide li { padding: 0 0 8px 4px; font-size: .92rem; line-height: 1.55; }
.np-editor .np-customize { scroll-margin-top: 20px; }
@media (max-width: 760px) {
  .np-editor input, .np-editor select, .np-editor textarea { font-size: 16px; }
  .np-editor .np-template-grid { gap: 10px; }
  .np-editor .np-template-caption { padding: 10px 8px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .np-editor .np-template-caption img { width: 32px; height: 32px; }
  .np-editor .np-custom-grid { grid-template-columns: 1fr 1fr; }
  .np-editor .np-custom-grid .field:last-child { grid-column: 1 / -1; }
}

.np-editor .np-titulo-ayuda {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.np-editor .np-titulo-ayuda h3 { margin: 0; }
.np-editor turnalo-ayuda .ayuda-boton { justify-content: center; min-width: 44px; min-height: 44px; }
