/* Pantallas de acceso: login.html (tema .acceso--clik, azul corporativo,
   porque la usan dueños de restaurante, negocios de Clik IA y el
   superadmin) y register.html (tema .acceso--rest, noche y dorado: el
   registro crea solo cuentas de CLIK Restaurantes).
   Hoja propia a propósito: personal-login.html sigue con auth.css, así este
   rediseño no le cambia nada a la tablet del personal.
   Es solo presentación: login.js, register.js, recorte-imagen.js e
   instalar-pwa.js no cambiaron y solo alternan las clases .oculto,
   .visible, .invalido, .activo, .completo y .paso-entrando que se estilan
   aquí. */

.acceso {
  --fuente: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  --radio-sm: 10px;
  --radio: 14px;
  --radio-lg: 24px;
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  --peligro: #b42318;          /* 6,5:1 sobre blanco */
  --peligro-fondo: #fef3f2;
  --exito: #067647;            /* 5,9:1 sobre #ecfdf3 */
  --exito-fondo: #ecfdf3;
}

/* Tema CLIK (login): azul cielo de la landing corporativa. */
.acceso--clik {
  --fondo: #f6faff;
  --superficie: #ffffff;
  --texto: #0b1b33;
  --texto-suave: #4a5a73;      /* 6,9:1 sobre blanco */
  --texto-tenue: #5d6b82;      /* 5,5:1 sobre blanco */
  --borde: rgba(15, 40, 80, 0.16);
  --borde-fuerte: rgba(15, 40, 80, 0.28);
  --acento: #2563eb;           /* 5,2:1 con texto blanco */
  --acento-hover: #1d4ed8;
  --acento-texto: #1d4ed8;     /* enlaces: 6,7:1 sobre blanco */
  --acento-suave: #eaf2ff;
  --boton-texto: #ffffff;
  --anillo: rgba(37, 99, 235, 0.22);
  --vista-fondo: linear-gradient(160deg, #eaf4ff 0%, #d6eaff 55%, #c4defd 100%);
  --vista-texto: #0b1b33;
  --vista-suave: #33445f;      /* 8,4:1 sobre #d6eaff */
  --vista-linea: rgba(15, 40, 80, 0.1);
  --primario: #2563eb;           /* lo lee js/cookie-consent.js */
  --primario-hover: #1d4ed8;
}

/* Tema Restaurantes (registro): el mismo dorado de /qr/ y del menú público. */
.acceso--rest {
  --fondo: #f5efe4;
  --superficie: #fbf8f2;
  --texto: #1b1711;
  --texto-suave: #574e41;      /* 7,4:1 sobre #fbf8f2 */
  --texto-tenue: #6b6152;      /* 5,6:1 sobre #fbf8f2 */
  --borde: rgba(27, 23, 17, 0.16);
  --borde-fuerte: rgba(27, 23, 17, 0.3);
  --acento: #d9b45f;           /* fondo de botón: 9,3:1 con #1a1408 */
  --acento-hover: #e6c578;
  --acento-texto: #7d5a12;     /* enlaces: 5,8:1 sobre #fbf8f2 */
  --acento-suave: #f3e8cc;
  --boton-texto: #1a1408;
  --anillo: rgba(125, 90, 18, 0.22);
  --vista-fondo: #100e0b;
  --vista-texto: #f5efe4;
  --vista-suave: #b3aa9b;      /* 8,4:1 sobre #100e0b */
  --vista-linea: rgba(245, 239, 228, 0.12);
  --oro: #d9b45f;
  --primario: #1b1711;           /* lo lee js/cookie-consent.js */
  --primario-hover: #000;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.acceso {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* :where() deja estos reinicios en especificidad 0, así no pisan los márgenes de cada componente. */
:where(.acceso) img { max-width: 100%; height: auto; display: block; }
:where(.acceso) :is(h1, h2, p) { margin: 0; }
:where(.acceso) a { color: var(--acento-texto); }
.acceso :focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; border-radius: 6px; }
.acceso input, .acceso select, .acceso textarea { font-size: 16px; } /* anti-zoom de iOS */

.oculto { display: none !important; }

.saltar {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--texto); color: var(--superficie) !important; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.saltar:focus { top: 16px; }

/* ===== Estructura ===== */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.auth-vista { order: -1; align-self: start; }

.auth-principal {
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 28px clamp(20px, 5vw, 64px) 24px;
}
.auth-cabecera { display: flex; align-items: center; gap: 14px; }
.btn-volver {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--borde); background: var(--superficie);
  color: var(--texto) !important; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--curva);
}
.btn-volver:hover { border-color: var(--borde-fuerte); transform: translateX(-2px); }
.btn-volver svg { width: 18px; height: 18px; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.auth-logo img { width: 62px; }
.auth-logo-producto {
  padding-left: 10px; border-left: 1px solid var(--borde-fuerte);
  font-size: 0.8125rem; font-weight: 600; color: var(--texto-suave); line-height: 1.2;
}

.auth-card {
  width: 100%; max-width: 440px;
  margin: auto; padding: clamp(32px, 6vh, 56px) 0;
}
.auth-pie {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px;
  font-size: 0.8125rem;
}
.auth-pie a { display: inline-flex; align-items: center; min-height: 36px; color: var(--texto-tenue); text-decoration: none; }
.auth-pie a:hover { color: var(--texto); text-decoration: underline; }

/* ===== Encabezado del formulario ===== */
.auth-etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--acento-suave);
  font-size: 0.8125rem; font-weight: 600; color: var(--texto-suave);
}
.punto { width: 8px; height: 8px; border-radius: 50%; }
.punto--ia { background: #7c3aed; }
.punto--rest { background: #0b766d; margin-right: 4px; }
.auth-titulo {
  font-size: clamp(1.85rem, 3.2vw, 2.35rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em;
  text-wrap: balance;
}
.auth-subtitulo { margin-top: 10px; color: var(--texto-suave); font-size: 1rem; }

/* ===== Campos ===== */
#form-login, #form-registro, #vista-recuperar { margin-top: 28px; }
.campo { display: flex; flex-direction: column; margin-bottom: 18px; }
.campo > label, .campo-fila label {
  margin-bottom: 8px;
  font-size: 0.9375rem; font-weight: 600; color: var(--texto);
}
.campo input[type="text"], .campo input[type="email"], .campo input[type="password"], .campo input[type="tel"] {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--borde); border-radius: var(--radio);
  background: #fff; color: var(--texto);
  font: 400 16px/1.2 var(--fuente);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo input::placeholder { color: #6b7587; }
.acceso--rest .campo input::placeholder { color: #7a705f; }
.campo input:hover { border-color: var(--borde-fuerte); }
.campo input:focus { outline: none; border-color: var(--acento-texto); box-shadow: 0 0 0 4px var(--anillo); }
.campo input.invalido { border-color: var(--peligro); }
.campo input.invalido:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.16); }
.campo-opcional { font-weight: 400; color: var(--texto-tenue); }
.campo-hint { margin-top: 8px; font-size: 0.875rem; color: var(--texto-tenue); }
.campo-codigo { font-family: var(--mono) !important; letter-spacing: 0.4em; font-size: 1.25rem !important; }

.campo-error-msg { display: none; }
.campo-error-msg.visible {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 8px; font-size: 0.875rem; font-weight: 500; color: var(--peligro);
}
.campo-error-msg.visible::before {
  content: ''; flex: none; width: 16px; height: 16px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.campo-con-ojo { position: relative; }
.campo-con-ojo input { padding-right: 56px !important; }
.campo-ojo {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--texto-tenue); cursor: pointer;
}
.campo-ojo:hover { color: var(--texto); background: var(--acento-suave); }
.campo-ojo svg { width: 20px; height: 20px; }
.campo-ojo .ojo-oculto, .campo-ojo.activo .ojo-ver { display: none; }
.campo-ojo.activo .ojo-oculto { display: block; }

.auth-olvide {
  align-self: flex-end; display: inline-flex; align-items: center; min-height: 40px; margin-top: 4px;
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
.auth-olvide:hover { text-decoration: underline; }

/* ===== Errores generales (credenciales, conexión, sesión cerrada) ===== */
.auth-error { display: none; }
.auth-error.visible {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radio);
  background: var(--peligro-fondo); border: 1px solid rgba(180, 35, 24, 0.2);
  color: #7a271a; font-size: 0.9375rem; line-height: 1.45;
  animation: error-entra 0.3s var(--curva);
}
.auth-error.visible::before {
  content: ''; flex: none; width: 20px; height: 20px; margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
#vista-recuperar .auth-error.visible { margin-top: 0; margin-bottom: 16px; }
@keyframes error-entra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ===== Botones ===== */
.btn-auth {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 8px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radio);
  background: var(--acento); color: var(--boton-texto);
  font: 600 1rem/1 var(--fuente); letter-spacing: -0.005em; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 24px -12px var(--acento);
  transition: background-color 0.2s, transform 0.2s var(--curva), box-shadow 0.2s;
}
.btn-auth:hover:not(:disabled) { background: var(--acento-hover); transform: translateY(-1px); }
.btn-auth:active:not(:disabled) { transform: none; }
/* Estado de carga: los scripts deshabilitan el botón y cambian su texto
   ("Ingresando…", "Creando tu cuenta…"); aquí solo se le suma el giro. */
.btn-auth:disabled { cursor: progress; opacity: 0.85; }
.btn-auth:disabled::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.btn-auth--secundario {
  background: transparent; color: var(--texto); border-color: var(--borde-fuerte); box-shadow: none;
}
.btn-auth--secundario:hover:not(:disabled) { background: var(--superficie); border-color: var(--texto-tenue); }

/* ===== Enlaces de pie de formulario ===== */
.auth-link { margin-top: 28px; text-align: center; font-size: 0.9375rem; color: var(--texto-suave); }
.auth-link a { display: inline-block; padding: 12px 2px; margin: -12px 0; font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }
.auth-link--alternativas { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--borde); }
.auth-link--volver { margin-top: 18px; }

/* ===== Recuperar contraseña ===== */
.auth-recuperar-titulo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-recuperar-intro { margin: 6px 0 20px; color: var(--texto-suave); }
.auth-recuperar-reenviar {
  display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 8px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
}
.auth-recuperar-exito {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radio);
  background: var(--exito-fondo); border: 1px solid rgba(6, 118, 71, 0.22);
  color: var(--exito); font-weight: 600;
}
.auth-recuperar-exito::before {
  content: ''; flex: none; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067647' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 2.7 2.5L16 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ===== Instalar la app (PWA) ===== */
.btn-instalar-pwa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin-top: 20px; padding: 0 16px;
  border: 1px dashed var(--borde-fuerte); border-radius: var(--radio);
  background: transparent; color: var(--texto-suave); font: 600 0.9375rem/1 var(--fuente); cursor: pointer;
}
.btn-instalar-pwa:hover { color: var(--texto); border-color: var(--texto-tenue); }
.btn-instalar-pwa svg { width: 18px; height: 18px; }
.instalar-pwa-ios { margin-top: 16px; text-align: center; font-size: 0.875rem; color: var(--texto-tenue); }

/* ===== Panel lateral ===== */
.auth-vista {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  padding: clamp(40px, 6vw, 80px);
  background: var(--vista-fondo); color: var(--vista-texto);
}
.auth-vista-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.acceso--clik .auth-vista-fondo {
  background:
    radial-gradient(45% 40% at 85% 15%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(50% 45% at 10% 95%, rgba(37, 99, 235, 0.16), transparent 70%);
}
.acceso--rest .auth-vista-fondo {
  background:
    radial-gradient(50% 40% at 20% 10%, rgba(217, 180, 95, 0.2), transparent 70%),
    radial-gradient(40% 35% at 90% 85%, rgba(190, 110, 50, 0.14), transparent 70%);
}
.auth-vista-fondo::after {
  content: ''; position: absolute; inset: 0; opacity: 0.6;
  background-image: linear-gradient(var(--vista-linea) 1px, transparent 1px), linear-gradient(90deg, var(--vista-linea) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
}
.auth-vista-contenido { width: 100%; max-width: 560px; margin-inline: auto; }
.auth-vista-sello {
  display: inline-block; margin-bottom: 22px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--vista-linea); background: rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem; font-weight: 600; color: var(--vista-suave);
}
.acceso--rest .auth-vista-sello { background: rgba(245, 239, 228, 0.04); }
.auth-vista-frase {
  font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em;
  text-wrap: balance;
}
.acceso--clik .auth-vista-frase span { color: #1d4ed8; }
.auth-vista-frase em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em;
  font-size: 1.06em; color: var(--oro);
}
.auth-vista-texto { margin-top: 16px; max-width: 34em; color: var(--vista-suave); font-size: 1.0625rem; }

.auth-collage { position: relative; margin: 40px 0 0; padding-bottom: 64px; }
.collage-ventana {
  overflow: hidden; border-radius: 14px; background: #fff;
  border: 1px solid rgba(15, 40, 80, 0.12);
  box-shadow: 0 2px 6px rgba(11, 27, 51, 0.08), 0 30px 70px -30px rgba(20, 60, 140, 0.45);
}
.acceso--rest .collage-ventana { border-color: rgba(245, 239, 228, 0.18); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 40px 90px -30px rgba(0, 0, 0, 0.8); }
.collage-barra {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: #f3f6fb; border-bottom: 1px solid #e3e9f2;
  font-size: 0.75rem; font-weight: 600; color: #4a5a73;
}
.acceso--rest .collage-barra { background: #f1ede6; border-bottom-color: #e3ddd2; color: #574e41; }
.collage-barra i { width: 8px; height: 8px; border-radius: 50%; background: #d3dbe7; }
.acceso--rest .collage-barra i { background: #d8d0c3; }
.collage-barra i:last-of-type { margin-right: 6px; }
.collage-ventana img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.collage-ventana--ia { width: 82%; }
.collage-ventana--rest { position: absolute; right: 0; bottom: 20px; width: 62%; }
.auth-collage--rest .collage-ventana--rest { position: relative; bottom: auto; width: 84%; }
.collage-telefono {
  position: absolute; right: 0; bottom: 18px; width: 30%;
  padding: 8px; border-radius: 30px;
  background: linear-gradient(160deg, #2a251d, #0b0a08); border: 1px solid rgba(245, 239, 228, 0.16);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.collage-telefono img { border-radius: 23px; }
.auth-collage figcaption { position: absolute; left: 0; bottom: 0; font-size: 0.8125rem; color: var(--vista-suave); }

.auth-vista-lista { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 28px 0 0; padding: 0; list-style: none; }
.auth-vista-lista li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 500; color: var(--vista-suave); }
.auth-vista-lista svg { width: 18px; height: 18px; color: var(--acento-texto); }
.acceso--rest .auth-vista-lista svg { color: var(--oro); }

/* ===== Registro: progreso de pasos ===== */
.paso-progreso { display: flex; align-items: center; gap: 0; }
.paso-punto {
  position: relative; flex: none; width: 32px; height: 32px; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--borde-fuerte); background: var(--superficie);
  cursor: default; color: var(--texto-tenue);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.paso-punto::after { content: attr(data-punto); font: 700 0.8125rem/1 var(--fuente); }
.paso-punto.activo { border-color: var(--texto); background: var(--texto); color: var(--superficie); box-shadow: 0 0 0 4px var(--anillo); }
.paso-punto.completo { border-color: var(--acento); background: var(--acento); color: var(--boton-texto); cursor: pointer; }
.paso-punto.completo::after {
  content: ''; position: absolute; inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.paso-punto.completo:hover { background: var(--acento-hover); }
.paso-punto.completo::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; } /* área táctil de 46 px */
.paso-linea { flex: 1; height: 2px; margin: 0 6px; border-radius: 2px; background: var(--borde); }
.paso-contador { margin: 12px 0 24px; font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; color: var(--texto-tenue); text-transform: uppercase; }
.paso-panel .auth-subtitulo { margin-bottom: 26px; }
.paso-panel .btn-auth--secundario { margin-top: 10px; }
.paso-panel.paso-entrando { animation: paso-entra 0.35s var(--curva); }
@keyframes paso-entra { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
#form-registro { margin-top: 0; }

.slug-preview {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 10px; padding: 6px 12px; border-radius: 999px;
  background: var(--acento-suave); font-size: 0.8125rem; color: var(--texto-suave);
  max-width: 100%;
}
.slug-preview strong { font-family: var(--mono); font-weight: 600; color: var(--texto); overflow-wrap: anywhere; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--borde); background: #fff; color: var(--texto);
  font: 500 0.9375rem/1 var(--fuente); cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--borde-fuerte); }
.chip.activo { border-color: var(--texto); background: var(--texto); color: var(--superficie); font-weight: 600; }

.campo-terminos { margin-top: 4px; }
.terminos-label { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9375rem; color: var(--texto-suave); cursor: pointer; }
.terminos-label input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--texto); cursor: pointer; }
.terminos-label a { font-weight: 600; }

.negocio-fotos { display: grid; grid-template-columns: 108px 1fr; gap: 12px; margin-bottom: 14px; }
.negocio-upload {
  position: relative; display: grid; place-items: center; min-height: 108px;
  border: 1.5px dashed var(--borde-fuerte); border-radius: var(--radio);
  background: #fff center / cover no-repeat; cursor: pointer; overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s;
}
.negocio-upload:hover { border-color: var(--acento-texto); background-color: var(--acento-suave); }
.negocio-upload--logo { border-radius: 50%; aspect-ratio: 1; min-height: 0; }
.negocio-upload-vacio { display: grid; justify-items: center; gap: 6px; color: var(--texto-tenue); }
.negocio-upload-vacio svg { width: 26px; height: 26px; }
.negocio-upload-vacio span { font-size: 0.8125rem; font-weight: 600; }
.negocio-upload.tiene-imagen { border-style: solid; }
.negocio-upload.tiene-imagen .negocio-upload-vacio { display: none; }

.auth-confianza {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px; font-size: 0.8125rem; color: var(--texto-tenue); text-align: center;
}
.auth-confianza svg { width: 16px; height: 16px; flex: none; }

/* ===== Modal de recorte (register.html, js/recorte-imagen.js) ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; overflow-y: auto;
  background: rgba(16, 14, 11, 0.62); backdrop-filter: blur(4px);
}
.modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 440px; max-height: calc(100vh - 40px);
  border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--borde); }
.modal-head h2 { font-size: 1.125rem; font-weight: 700; }
.modal-close {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: none; color: var(--texto-suave); font-size: 18px; cursor: pointer;
}
.modal-close:hover { background: var(--acento-suave); color: var(--texto); }
.modal-body { flex: 1; min-height: 0; padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--borde); }
.hint { margin: 0 0 14px; font-size: 0.875rem; color: var(--texto-suave); }
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: 600 0.9375rem/1 var(--fuente); cursor: pointer;
}
.btn-primary { background: var(--acento); color: var(--boton-texto); }
.btn-primary:hover { background: var(--acento-hover); }
.btn-secondary { background: #fff; color: var(--texto); border-color: var(--borde-fuerte); }
.btn-secondary:hover { background: var(--superficie); }
.recorte-marco {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 12px; background: #f1ede6; border: 1px solid var(--borde);
  cursor: grab; touch-action: none; user-select: none;
}
.recorte-marco:active { cursor: grabbing; }
#recorte-imagen { position: absolute; top: 0; left: 0; transform-origin: top left; max-width: none; pointer-events: none; }
.recorte-zoom-slider { width: 100%; margin-top: 14px; accent-color: var(--acento-texto); }

/* ===== Pantalla de marca al entrar (login.js) ===== */
.splash-entrar {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(90% 70% at 50% 0%, #d6eaff 0%, #f6faff 65%);
  animation: aparecer 0.35s ease both;
}
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
.splash-entrar-marca { text-align: center; animation: subir 0.5s var(--curva) both; }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.splash-entrar-anillo { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 22px; }
.splash-entrar-anillo::before {
  content: ''; position: absolute; inset: 16px; border-radius: 50%;
  background: #2563eb; filter: blur(18px); opacity: 0.3;
  animation: halo 2s ease-in-out infinite;
}
@keyframes halo { 0%, 100% { opacity: 0.15; transform: scale(0.9); } 50% { opacity: 0.4; transform: scale(1.06); } }
.splash-entrar-spinner { position: absolute; inset: 0; width: 96px; height: 96px; animation: girar 2s linear infinite; }
.splash-entrar-pista { fill: none; stroke: rgba(15, 40, 80, 0.1); stroke-width: 4; }
.splash-entrar-arco {
  fill: none; stroke: #2563eb; stroke-width: 4; stroke-linecap: round;
  /* Circunferencia de r=44 ≈ 276,5: los dasharray suman eso. */
  animation: arco 1.5s ease-in-out infinite;
}
@keyframes arco {
  0%   { stroke-dasharray: 12 264; stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 190 86; stroke-dashoffset: -40; }
  100% { stroke-dasharray: 12 264; stroke-dashoffset: -275; }
}
.splash-entrar-logo { position: relative; width: 34px; height: 34px; color: #0b1b33; }
.splash-entrar-nombre { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.22em; text-indent: 0.22em; color: #0b1b33; }
.splash-entrar-sub { margin-top: 6px; min-height: 1.4em; font-size: 0.9375rem; color: #4a5a73; transition: opacity 0.3s; }

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-vista { display: none; }
  .auth-principal { min-height: 100vh; min-height: 100dvh; }
  .auth-card { max-width: 480px; }
}

@media (max-width: 599px) {
  .auth-principal { padding: 16px 16px 20px; }
  .auth-card { padding: 28px 0 32px; margin-top: 0; }
  .auth-titulo { font-size: 1.85rem; }
  .auth-etiqueta { margin-bottom: 14px; }
  #form-login, #vista-recuperar { margin-top: 24px; }
  .negocio-fotos { grid-template-columns: 92px 1fr; }
  .negocio-upload { min-height: 92px; }
}

@media (max-width: 374px) {
  .auth-etiqueta { font-size: 0.75rem; }
  .paso-punto { width: 30px; height: 30px; }
  .chip { padding: 0 13px; }
}

/* Pantallas bajas (teclado abierto, paisaje): menos aire arriba. */
@media (max-height: 640px) {
  .auth-card { padding-top: 20px; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .acceso *, .acceso *::before, .acceso *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  /* El giro del botón y del splash es información de estado: se deja, más lento. */
  .btn-auth:disabled::before, .splash-entrar-spinner { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
  .splash-entrar-arco { animation: none !important; stroke-dasharray: 120 156; }
}

/* ===== Identidad CLIK (2026-11) ==========================================
   Capa final: el acceso y el registro usan la misma paleta que la web
   corporativa y CLIK Enterprise POS (tinta, pizarra, petróleo, superficies
   claras, solo Inter). Va al final para ganar por orden sobre los dos temas
   de arriba sin reescribirlos; quitar este bloque devuelve el aspecto
   anterior. No toca ninguna clase que alternen los scripts. */
.acceso--clik,
.acceso--rest {
  --fondo: #F5F6F7;
  --superficie: #FFFFFF;
  --texto: #17212B;
  --texto-suave: #4A5866;      /* 7,2:1 sobre blanco */
  --texto-tenue: #5B6B7F;      /* 5,4:1 sobre blanco */
  --borde: #D8DEE4;
  --borde-fuerte: #AEB8C2;
  --acento: #075460;           /* 8,6:1 con texto blanco */
  --acento-hover: #06444E;
  --acento-texto: #075460;     /* enlaces: 8,6:1 sobre blanco */
  --acento-suave: #E7F0F1;
  --boton-texto: #FFFFFF;
  --anillo: rgba(7, 84, 96, 0.22);
  --vista-fondo: #26323C;      /* pizarra */
  --vista-texto: #FFFFFF;
  --vista-suave: #C3CCD5;      /* 9,0:1 sobre pizarra */
  --vista-linea: rgba(255, 255, 255, 0.08);
  --oro: #8FD3DA;
  --primario: #075460;         /* lo lee js/cookie-consent.js */
  --primario-hover: #06444E;
}
.acceso--clik .auth-vista-fondo,
.acceso--rest .auth-vista-fondo {
  background: radial-gradient(55% 45% at 85% 10%, rgba(7, 84, 96, 0.45), transparent 70%);
}
.acceso--clik .auth-vista-sello,
.acceso--rest .auth-vista-sello { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
.acceso--clik .auth-vista-frase span { color: var(--oro); }
.auth-vista-frase em { font-family: var(--fuente); font-style: normal; font-weight: 800; font-size: 1em; letter-spacing: -0.04em; color: var(--oro); }
.acceso--clik .collage-ventana,
.acceso--rest .collage-ventana { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 40px 90px -30px rgba(0, 0, 0, 0.7); }
.acceso--clik .collage-barra,
.acceso--rest .collage-barra { background: #F5F6F7; border-bottom-color: #E7EBEF; color: #4A5866; }
.acceso--clik .collage-barra i,
.acceso--rest .collage-barra i { background: #D8DEE4; }
.acceso--clik .auth-vista-lista svg,
.acceso--rest .auth-vista-lista svg { color: var(--oro); }
.acceso--clik .campo input::placeholder,
.acceso--rest .campo input::placeholder { color: #6B7785; }
.collage-telefono { background: #17212B; border-color: rgba(255, 255, 255, 0.14); }
