/* ============================================================
   admin.css — Panel de gestión interno
   Karina Petelín · Mayo 2026
   ============================================================ */

/* ─── Utilidades ──────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Body ────────────────────────────────────────────────── */
.kpa-body {
  min-height: 100vh;
  background: var(--kp-blanco-cal);
  font-family: var(--font-ui);
  color: var(--kp-texto);
}

.kpa-login-body {
  min-height: 100vh;
  background: var(--kp-negro);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* ─── Login ───────────────────────────────────────────────── */
.kpa-login-wrap {
  width: 100%;
  max-width: 360px;
}

.kpa-login-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.kpa-login-brand img {
  height: 64px;
  width: auto;
  margin: 0 auto 1.2rem;
}

.kpa-login-eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kp-rojo);
  margin-bottom: 0.4rem;
}

.kpa-login-name {
  font-family: var(--font-titulo);
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--kp-blanco-cal);
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.kpa-login-sub {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(255, 248, 250, 0.4);
  letter-spacing: 0.06em;
}

.kpa-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kpa-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kpa-input-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 248, 250, 0.5);
}

.kpa-input {
  width: 100%;
  padding: 0.78rem 0.95rem;
  background: rgba(255, 248, 250, 0.05);
  border: 1.5px solid rgba(255, 248, 250, 0.12);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--kp-blanco-cal);
  outline: none;
  transition: border-color var(--t);
}

.kpa-input::placeholder { color: rgba(255, 248, 250, 0.2); }

.kpa-input:focus {
  border-color: var(--kp-rojo);
  background: rgba(255, 248, 250, 0.07);
}

.kpa-login-error {
  font-size: 0.8rem;
  color: var(--kp-rojo);
  text-align: center;
  padding: 0.5rem;
  background: rgba(225, 29, 72, 0.1);
  border-radius: var(--radius);
}

.kpa-btn-confirmar {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t);
  margin-top: 0.5rem;
}

.kpa-btn-confirmar:hover:not(:disabled) { background: var(--kp-bordeaux-dk); }

.kpa-btn-confirmar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.kpa-login-back {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(255, 248, 250, 0.3);
  text-decoration: none;
  transition: color var(--t);
  letter-spacing: 0.04em;
}

.kpa-login-back:hover { color: rgba(255, 248, 250, 0.7); }

/* ─── Nav del panel ───────────────────────────────────────── */
.kpa-nav {
  background: var(--kp-negro);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.kpa-nav-logo img {
  height: 36px;
  width: auto;
}

.kpa-nav-links {
  display: flex;
  gap: 0.2rem;
  margin: 0 auto 0 1.5rem;
}

/* Tablets/desktop: todo el menú (links + usuaria + salir) alineado a la
   derecha, a 20px del borde — en mobile sigue el menú hamburguesa aparte. */
@media (min-width: 768px) {
  .kpa-nav { padding-right: 20px; }
  .kpa-nav-links { margin: 0 0 0 auto; }
}

.kpa-nav-link {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: color var(--t), background var(--t);
}

.kpa-nav-link:hover {
  color: var(--kp-rosa);
  background: rgba(253, 218, 226, 0.07);
}

.kpa-nav-link--active {
  color: var(--kp-rosa);
  background: rgba(253, 218, 226, 0.1);
}

.kpa-nav-user {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(255, 248, 250, 0.35);
  letter-spacing: 0.03em;
  display: none;
}

@media (min-width: 640px) {
  .kpa-nav-user { display: block; }
}

.kpa-btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 248, 250, 0.15);
  border-radius: var(--radius);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 248, 250, 0.4);
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
}

.kpa-btn-logout:hover {
  color: var(--kp-rojo);
  border-color: var(--kp-rojo);
}

/* ─── Layout de páginas ───────────────────────────────────── */
.kpa-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.kpa-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(159, 18, 57, 0.1);
}

.kpa-page-title-block {}

.kpa-page-eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kp-bordeaux);
  display: block;
  margin-bottom: 0.3rem;
}

.kpa-page-title {
  font-family: var(--font-titulo);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--kp-texto);
  line-height: 1.05;
}

/* ─── Selector de fecha (agenda) ──────────────────────────── */
.kpa-date-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--kp-blanco);
  border: 1px solid rgba(159, 18, 57, 0.12);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}

.kpa-date-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--kp-bordeaux);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: background var(--t);
  line-height: 1;
}

.kpa-date-btn:hover { background: var(--kp-rosa); }

.kpa-date-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--kp-texto);
  min-width: 160px;
  text-align: center;
}

.kpa-date-today {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kp-bordeaux);
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(159, 18, 57, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  background: none;
}

.kpa-date-today:hover {
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
}

/* ─── Tabla de turnos ─────────────────────────────────────── */
.kpa-table-wrap {
  background: var(--kp-blanco);
  border: 1px solid rgba(159, 18, 57, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.kpa-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  table-layout: fixed;
}

/* Agenda: Hora | Cliente | Servicios | Duración | Estado | Acciones */
#agenda-table th:nth-child(1) { width: 46px; text-align: center; }
#agenda-table td:nth-child(1) { padding-left: 0.35rem; padding-right: 0.35rem; text-align: center; }
#agenda-table th:nth-child(2) { width: 28%; }
#agenda-table th:nth-child(3) { width: 30%; }
#agenda-table th:nth-child(4) { width: 72px; }
#agenda-table th:nth-child(5) { width: 100px; }
/* col 6 (Acciones) toma el espacio restante */

.kpa-table thead {
  background: var(--kp-negro);
}

.kpa-table th {
  padding: 0.75rem 1rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 248, 250, 0.5);
  text-align: left;
  white-space: nowrap;
}

.kpa-table td {
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  color: var(--kp-texto);
  border-bottom: 1px solid rgba(159, 18, 57, 0.06);
  vertical-align: middle;
}

.kpa-table tr:last-child td { border-bottom: none; }

.kpa-table tr:hover td {
  background: var(--kp-blanco-cal);
}

.kpa-table-hora {
  font-weight: 700;
  color: var(--kp-bordeaux);
  font-size: 0.95rem;
  white-space: nowrap;
}

.kpa-table-cliente strong {
  display: block;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpa-table-cliente span {
  font-size: 0.76rem;
  color: #9A8A8A;
}

.kpa-cliente-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--kp-bordeaux);
}

.kpa-cliente-link:hover {
  color: var(--kp-bordeaux);
}

.kpa-table-servicios {
  font-size: 0.8rem;
  line-height: 1.6;
  word-break: break-word;
}

.kpa-table-duracion {
  font-size: 0.76rem;
  color: #9A8A8A;
  white-space: nowrap;
}

/* ─── Ícono bolsita en fila de agenda ────────────────────── */
.kpa-bag-agenda {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  vertical-align: middle;
}

/* ─── Panel "Preparar para hoy" ───────────────────────────── */
.kpa-preparar {
  background: var(--kp-blanco);
  border: 2px solid var(--kp-bordeaux);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.3rem;
  margin-bottom: 1.25rem;
}

.kpa-preparar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.kpa-preparar__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kp-bordeaux);
}

.kpa-preparar__count {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: #9A8A8A;
}

.kpa-preparar__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpa-preparar__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--kp-blanco-cal);
  border-radius: var(--radius);
  border-left: 3px solid var(--kp-bordeaux);
  transition: opacity 0.2s ease;
}

.kpa-preparar__item--listo {
  opacity: 0.45;
  border-left-color: #ccc;
}

.kpa-preparar__item--listo .kpa-preparar__nombre {
  text-decoration: line-through;
  color: #9A8A8A;
}

.kpa-preparar__check {
  width: 17px;
  height: 17px;
  accent-color: var(--kp-bordeaux);
  cursor: pointer;
  flex-shrink: 0;
}

.kpa-preparar__info { flex: 1; }

.kpa-preparar__nombre {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--kp-texto);
}

.kpa-preparar__meta {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: #9A8A8A;
  margin-top: 0.1rem;
}

.kpa-preparar__cant {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--kp-blanco);
  background: var(--kp-bordeaux);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

/* ─── Banner pedidos sin turno ────────────────────────────── */
.kpa-pedidos-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff3f6;
  border: 1px solid var(--kp-rojo);
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  margin-bottom: 1rem;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: var(--kp-texto);
}

.kpa-pedidos-banner__btn {
  display: inline-block;
  background: var(--kp-rojo);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.kpa-pedidos-banner__btn:hover { background: #c41538; }

/* ─── Badges de estado ────────────────────────────────────── */
.kpa-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpa-badge--pendiente,
.kpa-badge--reservado {
  background: #FEF3C7;
  color: #92400E;
}

.kpa-badge--confirmado {
  background: #D1FAE5;
  color: #065F46;
}

.kpa-badge--completado {
  background: rgba(159, 18, 57, 0.1);
  color: var(--kp-bordeaux-dk);
}

.kpa-badge--cancelado {
  background: #F3F4F6;
  color: #6B7280;
}
.kpa-badge--feriado {
  background: #fddae2;
  color: #9F1239;
}
.kpa-badge--vacaciones {
  background: #dbeafe;
  color: #1d4ed8;
}
.kpa-badge--especial {
  background: #fef9c3;
  color: #854d0e;
}
.kpa-badge--listo {
  background: #d1fae5;
  color: #065f46;
}
.kpa-badge--entregado {
  background: #e0e7ff;
  color: #3730a3;
}

/* Largo de cabello seleccionado por la clienta al reservar */
.kpa-largo-tag {
  display: inline-block;
  background: var(--kp-rosa);
  color: var(--kp-bordeaux);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: capitalize;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.3rem;
  white-space: nowrap;
}

/* Cumpleaños — sección dashboard */
.db-cumple-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.db-cumple-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: var(--kp-rosa);
  border-radius: 3px;
  gap: 0.75rem;
}
.db-cumple-nombre {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--kp-texto);
  flex: 1;
}
.db-cumple-tel {
  font-size: 0.78rem;
  color: var(--kp-bordeaux);
}
.db-cumple-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #25D366;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  white-space: nowrap;
}

/* Recordatorios de turno de mañana — sección dashboard */
.db-recordatorio-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.db-recordatorio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  background: var(--kp-rosa);
  border: none;
  border-radius: 3px;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}
.db-recordatorio-item:hover {
  background: #fbc7d4;
}
.db-recordatorio-item:disabled {
  opacity: 0.6;
  cursor: default;
}
.db-recordatorio-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.db-recordatorio-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--kp-blanco);
}
.db-recordatorio-nombre {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--kp-texto);
}
.db-recordatorio-detalle {
  font-size: 0.78rem;
  color: var(--kp-bordeaux);
}
.db-recordatorio-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #25D366;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  white-space: nowrap;
}

/* ─── Botones de acción en tabla ──────────────────────────── */
.kpa-table-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

/* ─── Botón eliminar — ícono × rojo ──────────────────────── */
.kpa-btn-delete {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: #E11D48;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.kpa-btn-delete:hover { background: #9b1c3a; }

.kpa-btn-action {
  background: none;
  border: 1px solid rgba(159, 18, 57, 0.18);
  border-radius: var(--radius);
  padding: 0.32rem 0.65rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kp-texto);
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
  white-space: nowrap;
}

.kpa-btn-action:hover {
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
  border-color: var(--kp-bordeaux);
}

/* Botón WA — ícono verde WhatsApp */
.kpa-btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: var(--radius);
  padding: 0.32rem 0.55rem;
  color: #25D366;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  text-decoration: none;
}
.kpa-btn-wa:hover {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

.kpa-btn-action--danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: var(--kp-blanco);
}

/* ─── Botón primario del panel ────────────────────────────── */
.kpa-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
}

.kpa-btn-primary:hover { background: var(--kp-bordeaux-dk); }

/* ─── Input de búsqueda ───────────────────────────────────── */
.kpa-search-wrap {
  position: relative;
  max-width: 280px;
  flex: 1;
}

.kpa-search {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.2rem;
  border: 1.5px solid rgba(159, 18, 57, 0.15);
  border-radius: var(--radius);
  background: var(--kp-blanco);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: var(--kp-texto);
  outline: none;
  transition: border-color var(--t);
}

.kpa-search::placeholder { color: #C0B0B0; }
.kpa-search:focus { border-color: var(--kp-bordeaux); }

.kpa-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #C0B0B0;
  pointer-events: none;
}

/* ─── Estado vacío ────────────────────────────────────────── */
.kpa-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #9A8A8A;
}

.kpa-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}

.kpa-empty-text {
  font-family: var(--font-ui);
  font-size: 0.87rem;
  line-height: 1.7;
}

/* ─── Modal ───────────────────────────────────────────────── */
.kpa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.kpa-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.kpa-modal {
  background: var(--kp-blanco);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.kpa-modal-overlay.open .kpa-modal {
  transform: translateY(0);
}

.kpa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  background: var(--kp-negro);
  border-radius: var(--radius) var(--radius) 0 0;
}

.kpa-modal-title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kp-blanco-cal);
}

.kpa-modal-close {
  background: none;
  border: none;
  color: rgba(255, 248, 250, 0.4);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  transition: color var(--t);
  line-height: 1;
}

.kpa-modal-close:hover { color: var(--kp-rojo); }

.kpa-modal-body {
  padding: 1.4rem 1.3rem;
}

.kpa-modal-footer {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 1rem 1.3rem;
  border-top: 1px solid rgba(159, 18, 57, 0.08);
}

/* ─── Selector de estado (modal agenda) ──────────────────── */
.kpa-estado-opts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.kpa-estado-opt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(159, 18, 57, 0.12);
  border-radius: var(--radius);
  background: var(--kp-blanco-cal);
  cursor: pointer;
  transition: border-color var(--t);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}

.kpa-estado-opt:hover { border-color: var(--kp-bordeaux); }

.kpa-estado-opt--selected {
  border-color: var(--kp-bordeaux);
  background: var(--kp-rosa);
}

/* ─── Tarjetas de estadísticas (opcional) ─────────────────── */
.kpa-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.kpa-stat-card {
  background: var(--kp-blanco);
  border: 1px solid rgba(159, 18, 57, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.kpa-stat-num {
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: 2rem;
  color: var(--kp-bordeaux);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.kpa-stat-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9A8A8A;
}

/* ─── Responsive — layout mobile/desktop ─────────────────── */
/*
   Patrón: cada página con tabla tiene:
     .mob-table-wrap  → visible en desktop, oculto en mobile
     .mob-cards-wrap  → oculto en desktop, visible en mobile
   El JS también puede usar applyLayout() para toggling por JS.
*/
.mob-table-wrap { }
.mob-cards-wrap { display: none; }

@media (max-width: 768px) {
  .kpa-page { padding: 1rem 0.85rem 3rem; }
  .mob-table-wrap { display: none !important; }
  .mob-cards-wrap { display: block !important; }
}

/* ─── Cards compartidas (mobile) ─────────────────────────── */
.kpa-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(32,30,30,0.07);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}
.kpa-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.kpa-card__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--kp-texto);
  line-height: 1.3;
}
.kpa-card__subtitle {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: #9A8A8A;
  margin-top: 0.15rem;
}
.kpa-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--kp-texto);
  padding: 0.3rem 0;
  border-bottom: 1px solid #f5f0f1;
  gap: 0.5rem;
}
.kpa-card__row:last-of-type { border-bottom: none; }
.kpa-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9A8A8A;
  flex-shrink: 0;
  min-width: 64px;
}
.kpa-card__val {
  text-align: right;
  word-break: break-word;
}
.kpa-card__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f5f0f1;
}

/* ─── Hamburger button ────────────────────────────────────── */
.kpa-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.25rem;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  flex-shrink: 0;
}
.kpa-ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,248,250,0.8);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.kpa-hamburger.is-open .kpa-ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.kpa-hamburger.is-open .kpa-ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.kpa-hamburger.is-open .kpa-ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile menu overlay ─────────────────────────────────── */
.kpa-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: var(--kp-negro);
  z-index: 9999;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.kpa-mobile-menu.is-open { display: flex; }

.kpa-mobile-menu .kpa-nav-links {
  display: flex !important;
  flex-direction: column;
}
.kpa-mobile-menu .kpa-nav-link {
  font-family: var(--font-ui) !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  padding: 0.9rem 1.5rem !important;
  min-height: 44px;
  display: flex !important;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,248,250,0.65) !important;
  text-decoration: none;
  transition: background var(--t), color var(--t);
}
.kpa-mobile-menu .kpa-nav-link:hover {
  background: rgba(253, 218, 226, 0.1);
  color: var(--kp-rosa) !important;
}
.kpa-mobile-menu .kpa-nav-link--active {
  background: rgba(253, 218, 226, 0.12);
  color: var(--kp-rosa) !important;
}
.kpa-mobile-menu-footer {
  padding: 1rem 1.5rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.kpa-mobile-logout {
  width: 100%;
  padding: 0.9rem 1.5rem;
  min-height: 44px;
  background: transparent;
  border: 1px solid rgba(255,248,250,0.2);
  border-radius: var(--radius);
  color: rgba(255,248,250,0.65);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.kpa-mobile-logout:hover {
  background: rgba(255,255,255,0.08);
  color: var(--kp-blanco);
}

/* ─── Mobile ≤ 768px ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav — ocultar links desktop, mostrar hamburguesa */
  .kpa-nav-links  { display: none !important; }
  .kpa-nav-user   { display: none !important; }
  .kpa-btn-logout { display: none !important; }
  .kpa-hamburger  { display: flex; }

  /* Tap targets mínimos */
  .kpa-btn-action,
  .kpa-btn-primary,
  .kpa-btn-outline {
    min-height: 44px;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }
  .kpa-btn-action { padding: 0.75rem 1rem; }
  .kpa-btn-wa     { min-height: 44px; padding: 0.75rem 0.9rem; }

  /* Inputs y labels */
  .kpa-input    { font-size: 1rem !important; min-height: 44px; }
  .kpa-input-label { font-size: 0.85rem; }

  /* Page header apilado */
  .kpa-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .kpa-page-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    width: 100%;
  }
  .kpa-search-wrap { max-width: 100% !important; flex: 1; min-width: 0; }

  /* Tabla scroll horizontal como fallback */
  .kpa-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Modal → bottom sheet */
  .kpa-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .kpa-modal {
    max-width: 100% !important;
    border-radius: 16px 16px 0 0;
    max-height: 90dvh;
    transform: translateY(100%);
  }
  .kpa-modal-overlay.open .kpa-modal { transform: translateY(0); }
  .kpa-modal-header { border-radius: 16px 16px 0 0; }
  .kpa-modal-close {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Grids de cards en mobile */
  .inv-grid      { grid-template-columns: 1fr !important; }
  .staff-grid    { grid-template-columns: 1fr !important; }
  .cli-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── Botón outline ────────────────────────────────────────── */
.kpa-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  background: transparent;
  color: var(--kp-bordeaux);
  border: 1.5px solid var(--kp-bordeaux);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.kpa-btn-outline:hover {
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
}

/* ─── Inventario — Cards ──────────────────────────────────── */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.inv-card {
  background: var(--kp-blanco);
  border-radius: var(--radius);
  border: 1px solid rgba(159, 18, 57, 0.08);
  border-left: 3px solid transparent;
  box-shadow: 0 2px 8px rgba(32,30,30,0.05);
  overflow: hidden;
  transition: box-shadow var(--t);
}

.inv-card:hover { box-shadow: 0 4px 16px rgba(32,30,30,0.1); }

.inv-card--bajo-stock { border-left-color: #F59E0B; }

.inv-card-top {
  padding: 1rem 1rem 0.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

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

.inv-card-nombre-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.inv-card-nombre {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--kp-texto);
}

.inv-badge-bajo {
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}

.inv-card-desc {
  font-size: 0.78rem;
  color: #9A8A8A;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.inv-card-precio {
  font-family: var(--font-titulo);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--kp-bordeaux);
}

.inv-card-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
}

.inv-card-delete {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  color: #C0B0B0;
  border-radius: var(--radius);
  transition: color var(--t), background var(--t);
  display: flex;
  align-items: center;
}

.inv-card-delete:hover { color: #DC2626; background: #FEF2F2; }

.inv-card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(159, 18, 57, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--kp-blanco-cal);
}

.inv-stock-ctrl {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.inv-stock-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(159, 18, 57, 0.2);
  border-radius: 50%;
  background: var(--kp-blanco);
  color: var(--kp-bordeaux);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t);
  line-height: 1;
}

.inv-stock-btn:hover { background: var(--kp-rosa); border-color: var(--kp-bordeaux); }
.inv-stock-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.inv-stock-num {
  min-width: 44px;
  text-align: center;
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--kp-texto);
}

.inv-stock-label {
  font-size: 0.68rem;
  color: #9A8A8A;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── FAB ──────────────────────────────────────────────────── */
.inv-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
  border: none;
  font-size: 1.7rem;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(159, 18, 57, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), transform var(--t);
  z-index: 200;
  line-height: 1;
}

.inv-fab:hover { background: var(--kp-bordeaux-dk); transform: scale(1.08); }

/* ─── Banner alerta stock ──────────────────────────────────── */
.inv-alerta-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: #92400E;
}

/* ─── Modal — inputs sobre fondo claro ─────────────────────── */
.kpa-modal .kpa-input-label { color: #9A8A8A; }

.kpa-modal .kpa-input {
  background: var(--kp-blanco-cal);
  border-color: rgba(159, 18, 57, 0.15);
  color: var(--kp-texto);
}

.kpa-modal .kpa-input::placeholder { color: #C0B0B0; }

.kpa-modal .kpa-input:focus {
  border-color: var(--kp-bordeaux);
  background: var(--kp-blanco);
}

/* ─── Detalle de clienta (cliente.html) ───────────────────── */
.cli-header {
  background: var(--kp-blanco);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 16px rgba(32,30,30,0.07);
  margin-bottom: 1.5rem;
  position: relative;
}
.cli-back {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cli-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
  font-family: var(--font-titulo);
  font-size: 2.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}
.cli-nombre-full {
  font-family: var(--font-titulo);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--kp-texto);
  margin: 0 0 1.1rem;
  line-height: 1.2;
}
.cli-quick-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.cli-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--t);
  border: 1.5px solid var(--kp-bordeaux);
  background: transparent;
  color: var(--kp-bordeaux);
}
.cli-action-btn:hover {
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
}
.cli-action-btn--wa {
  border-color: #25D366;
  color: #25D366;
}
.cli-action-btn--wa:hover {
  background: #25D366;
  color: var(--kp-blanco);
}

/* Tabs */
.cli-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.cli-tab {
  flex: 1;
  padding: 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  background: var(--kp-blanco);
  color: #9A8A8A;
  cursor: pointer;
  transition: var(--t);
  box-shadow: 0 1px 4px rgba(32,30,30,0.06);
}
.cli-tab:hover { color: var(--kp-bordeaux); }
.cli-tab--active {
  background: var(--kp-bordeaux);
  color: var(--kp-blanco);
}

/* Info cards */
.cli-info-card {
  background: var(--kp-blanco);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(32,30,30,0.06);
}
.cli-section-title {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kp-bordeaux);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cli-info-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--kp-blanco-cal);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--kp-texto);
}
.cli-info-row:last-child { border-bottom: none; }
.cli-info-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9A8A8A;
  min-width: 96px;
  flex-shrink: 0;
}
.cli-notas-text {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--kp-texto);
  line-height: 1.65;
  font-style: italic;
  min-height: 1.5rem;
  margin: 0;
}

/* Historial */
.cli-hist-item {
  background: var(--kp-blanco);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 8px rgba(32,30,30,0.05);
}
.cli-hist-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.cli-hist-fecha {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: #9A8A8A;
  margin-bottom: 0.2rem;
}
.cli-hist-servicios {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--kp-texto);
  font-weight: 500;
}
.cli-hist-badge {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cli-hist-badge--completado { background: #d1fae5; color: #065f46; }
.cli-hist-badge--confirmado { background: var(--kp-rosa); color: var(--kp-bordeaux); }
.cli-hist-badge--reservado  { background: var(--kp-blanco-cal); color: #9A8A8A; }
.cli-hist-badge--cancelado  { background: #fee2e2; color: #991b1b; }

.cli-hist-responsable {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: #9A8A8A;
  margin-top: 0.35rem;
}
.cli-hist-responsable--faltante {
  color: var(--kp-rojo);
  font-weight: 600;
}

.cli-hist-item-list {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--kp-blanco-cal);
}
.cli-hist-item-row {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--kp-blanco-cal);
}
.cli-hist-item-row:last-child { border-bottom: none; }
.cli-hist-item-row__main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cli-hist-item-tag {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  flex-shrink: 0;
}
.cli-hist-item-tag--prestacion { background: var(--kp-rosa); color: var(--kp-bordeaux); }
.cli-hist-item-tag--compra     { background: #E8F0EE; color: #2E7D82; }
.cli-hist-item-tag--otro       { background: var(--kp-blanco-cal); color: #9A8A8A; }
.cli-hist-item-nombre {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--kp-texto);
  font-weight: 500;
  flex: 1;
}
.cli-hist-item-precio {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: #9A8A8A;
  white-space: nowrap;
}
.cli-hist-item-corregido {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--kp-bordeaux);
  font-style: italic;
  margin-top: 0.25rem;
}
.cli-hist-item-obs {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--kp-texto);
  background: var(--kp-blanco-cal);
  border-radius: 3px;
  padding: 0.5rem 0.65rem;
  margin-top: 0.35rem;
  white-space: pre-wrap;
}
.cli-hist-item-edit-toggle {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kp-bordeaux);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0 0;
}
.cli-hist-item-edit {
  margin-top: 0.5rem;
  display: none;
}
.cli-hist-item-edit--open { display: block; }
.cli-hist-item-edit textarea,
.cli-hist-item-edit input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  border: 1px solid var(--kp-blanco-cal);
  border-radius: 3px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  box-sizing: border-box;
}

/* Galería */
.cli-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.cli-photo-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--kp-blanco-cal);
}
.cli-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cli-photo-badge {
  position: absolute;
  bottom: 4px; left: 4px;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}
.cli-photo-badge--antes   { background: var(--kp-bordeaux); color: white; }
.cli-photo-badge--despues { background: #065f46; color: white; }
.cli-photo-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
}
.cli-photo-wrap:hover .cli-photo-del { opacity: 1; }
.cli-gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #9A8A8A;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

/* ─── Solapas de página, estilo "carpeta" (ej. Caja/Reportes/Finanzas,
   Agenda/Calendario) — inspirado en referencia solapas.png, con paleta y
   tipografía de Karina Petelín. La tira de solapas y el panel de contenido
   forman una sola pieza visual: la solapa activa "se funde" con el panel
   blanco de abajo; las inactivas quedan sobre el fondo crema de atrás. ──── */
.kpa-tabs {
  display: flex;
  gap: 0.3rem;
  background: var(--kp-blanco-cal);
  border-radius: 12px 12px 0 0;
  padding: 0.6rem 0.6rem 0;
  overflow-x: auto;
}
.kpa-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0.85rem 1.35rem;
  border-radius: 10px 10px 0 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: #9A8A8A;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t, 0.2s), color var(--t, 0.2s);
}
.kpa-tab-btn:hover { color: var(--kp-bordeaux-dk); }
.kpa-tab-btn--active {
  background: var(--kp-blanco);
  color: var(--kp-bordeaux-dk);
  font-weight: 700;
}
.kpa-tab-btn__icon img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}
.kpa-tabs-panel {
  background: var(--kp-blanco);
  border-radius: 0 12px 12px 12px;
  padding: 1.5rem clamp(1rem, 3vw, 1.75rem) 1.75rem;
  box-shadow: 0 2px 20px rgba(32,30,30,0.06);
}
.kpa-tab-content { display: none; }
.kpa-tab-content--active { display: block; }

/* ─── Buscador de productos (venta en Caja/Agenda) ──────────────────────────── */
.kpa-buscador-resultado {
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid rgba(159,18,57,0.08);
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
}
.kpa-buscador-resultado:hover { background: var(--kp-blanco-cal); }

@media (max-width: 480px) {
  .kpa-tab-btn { font-size: 0.74rem; padding: 0.7rem 0.9rem; }
  .kpa-tab-btn__icon img { height: 24px; }
  .kpa-tabs-panel { padding: 1.1rem 0.9rem 1.4rem; }
}
