/* Panel operativo ZOE — mobile first.
   Hereda las variables del tema zoe-caninapeluqueria cuando está activo;
   los valores de :root son el fallback para cualquier otro tema. */

/* Página completa (plantilla propia, sin cabecera ni pie del sitio) */
body.zoe-body {
  margin: 0;
  background: var(--paper, #fbf7f1);
  color: var(--ink, #2e241c);
  font-family: 'Mulish', -apple-system, "Segoe UI", sans-serif;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  -webkit-text-size-adjust: 100%;
}

.zoe-bloqueado {
  max-width: 420px;
  margin: 48px auto;
  text-align: center;
  color: var(--ink-soft, #6b5c4d);
}

.zoe-panel {
  --zoe-brown: var(--brown, #6e4a34);
  --zoe-brown-deep: var(--brown-deep, #4f3524);
  --zoe-paper: var(--paper, #fbf7f1);
  --zoe-surface: var(--surface, #f1e8dc);
  --zoe-ink: var(--ink, #2e241c);
  --zoe-ink-soft: var(--ink-soft, #6b5c4d);
  --zoe-line: var(--line, rgba(46, 36, 28, 0.14));
  --zoe-on-brown: var(--on-brown, #fff7ee);
  --zoe-ok: #2f7d52;
  --zoe-danger: #a33b2c;

  max-width: 560px;
  margin: 0 auto;
  padding: 4px 0 48px;
  color: var(--zoe-ink);
  font-family: 'Mulish', -apple-system, "Segoe UI", sans-serif;
}

.zoe-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.zoe-panel__title {
  font-family: 'Baloo2', 'Mulish', sans-serif;
  font-size: 1.35rem;
  margin: 0;
}

.zoe-refresh {
  border: 1px solid var(--zoe-line);
  background: transparent;
  color: var(--zoe-ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 40px;
}

.zoe-meta {
  color: var(--zoe-ink-soft);
  font-size: 0.8rem;
  margin: 0 0 16px;
  min-height: 1.2em;
}

/* Selector de sucursal (solo administradores) */
.zoe-sucursales {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  background: var(--zoe-surface);
  border: 1px solid var(--zoe-line);
  border-radius: 999px;
  padding: 4px;
}

.zoe-suc {
  flex: 1;
  min-height: 40px;
  border: none;
  background: transparent;
  color: var(--zoe-ink-soft);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}

.zoe-suc--activa {
  background: var(--zoe-brown);
  color: var(--zoe-on-brown);
}

.zoe-sucursal-fija {
  color: var(--zoe-ink-soft);
  font-size: 0.85rem;
  margin: 0 0 10px;
}

/* Barra de avance de la subida */
.zoe-progreso {
  margin: 0 0 14px;
}

.zoe-progreso__barra {
  height: 10px;
  border-radius: 999px;
  background: var(--zoe-surface);
  border: 1px solid var(--zoe-line);
  overflow: hidden;
}

.zoe-progreso__relleno {
  height: 100%;
  width: 0;
  background: var(--zoe-brown);
  border-radius: 999px;
  transition: width 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .zoe-progreso__relleno { transition: none; }
}

.zoe-progreso__texto {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--zoe-brown-deep);
  font-variant-numeric: tabular-nums;
}

.zoe-demo-aviso {
  background: var(--zoe-brown);
  color: var(--zoe-on-brown);
  border-radius: var(--radius-sm, 10px);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 8px 0 12px;
}

.zoe-grupo__titulo {
  font-family: 'Baloo2', 'Mulish', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zoe-ink-soft);
  margin: 24px 0 10px;
}

.zoe-card {
  background: var(--zoe-surface);
  border: 1px solid var(--zoe-line);
  border-radius: var(--radius-lg, 22px);
  padding: 16px;
  margin-bottom: 12px;
}

.zoe-card--activa {
  border-color: var(--zoe-brown);
  border-width: 2px;
}

.zoe-card__pet {
  font-family: 'Baloo2', 'Mulish', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 2px;
}

.zoe-card__linea {
  color: var(--zoe-ink-soft);
  font-size: 0.9rem;
  margin: 0 0 2px;
}

.zoe-crono {
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--zoe-brown-deep);
  margin: 12px 0 4px;
}

.zoe-card__acciones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.zoe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.zoe-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.zoe-btn--primary {
  background: var(--zoe-brown);
  color: var(--zoe-on-brown);
}

.zoe-btn--ghost {
  background: transparent;
  border-color: var(--zoe-brown);
  color: var(--zoe-brown-deep);
}

.zoe-btn--plain {
  background: transparent;
  color: var(--zoe-ink-soft);
  border-color: var(--zoe-line);
}

.zoe-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--zoe-brown);
  color: var(--zoe-on-brown);
  margin-bottom: 8px;
}

.zoe-badge--video {
  background: var(--zoe-ok);
}

.zoe-card__error {
  color: var(--zoe-danger);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

/* Servicios ya ejecutados: presentes pero en segundo plano, sin acciones */
.zoe-card--lista {
  opacity: 0.72;
  border-style: dashed;
}

.zoe-badge--lista {
  background: transparent;
  color: var(--zoe-ink-soft);
  border: 1px solid var(--zoe-line);
}

.zoe-card__cierre {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--zoe-ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Fallo de red en la primera carga */
.zoe-error {
  text-align: center;
  padding: 28px 12px;
}

.zoe-error__titulo {
  margin: 0 0 6px;
  font-weight: 700;
}

.zoe-error__detalle {
  margin: 0 0 16px;
  color: var(--zoe-ink-soft);
  font-size: 0.9rem;
}

.zoe-loading,
.zoe-vacio {
  color: var(--zoe-ink-soft);
  text-align: center;
  padding: 32px 0;
}

/* Hoja modal de captura */
.zoe-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
}

.zoe-sheet[hidden] {
  display: none;
}

.zoe-sheet__panel {
  background: var(--zoe-paper);
  color: var(--zoe-ink);
  width: 100%;
  max-width: 560px;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
}

.zoe-sheet__title {
  font-family: 'Baloo2', 'Mulish', sans-serif;
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.zoe-sheet__hint {
  color: var(--zoe-ink-soft);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.zoe-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoe-sheet__actions .zoe-btn {
  width: 100%;
}

.zoe-sheet__status {
  font-size: 0.9rem;
  min-height: 1.3em;
  margin: 12px 0 0;
}

.zoe-sheet__status--error {
  color: var(--zoe-danger);
}

.zoe-sheet__footer {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.zoe-sheet__footer .zoe-btn {
  flex: 1;
}

.zoe-preview {
  margin-bottom: 14px;
}

.zoe-preview img,
.zoe-preview video {
  width: 100%;
  border-radius: var(--radius-md, 14px);
  display: block;
  max-height: 46vh;
  object-fit: cover;
  background: #000;
}
