/* ==========================================================================
   Control Car Wash — estilos base
   Mobile-first. Variables de marca arriba para poder re-tematizar sin tocar
   componentes.
   ========================================================================== */

:root {
    --brand: #0b7fab;
    --brand-dark: #075e7f;
    --brand-soft: #e0f2fe;
    --accent: #06b6d4;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --ok: #15803d;
    --ok-soft: #dcfce7;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --info: #1d4ed8;
    --info-soft: #dbeafe;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
    --nav-h: 68px;
    --max: 560px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body { min-height: 100vh; }

h1, h2, h3, h4 { margin: 0 0 .4rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
small { font-size: .82rem; }

a { color: var(--brand); text-decoration: none; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

/* ---------------------------------------------------------------- layout -- */
.app {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    padding-bottom: calc(var(--nav-h) + 12px);
    position: relative;
}

.app--wide { max-width: 960px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1rem;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--accent));
    color: #fff;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
}

.topbar__title { font-weight: 700; font-size: 1.02rem; }
.topbar__sub { font-size: .76rem; opacity: .85; }
.topbar__logo {
    width: 36px; height: 36px; flex: 0 0 36px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .18);
    border-radius: 11px;
    font-size: 1.1rem;
}
.topbar__spacer { flex: 1; }

.iconbtn {
    position: relative;
    border: 0;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 11px;
    display: grid; place-items: center;
    cursor: pointer;
}
.iconbtn:hover { background: rgba(255, 255, 255, .28); }
.iconbtn__dot {
    position: absolute; top: 6px; right: 7px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #fbbf24; border: 2px solid var(--brand);
}

.page { padding: 1rem 1rem 0; display: grid; gap: .9rem; }
.page--tight { gap: .6rem; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, .8);
}
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem; margin-bottom: .6rem;
}
.card__title { font-weight: 700; font-size: 1rem; }
.card__hint { color: var(--muted); font-size: .82rem; }

.hero {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand) 60%, var(--accent));
    color: #fff;
    border-radius: 22px;
    padding: 1.1rem;
    box-shadow: var(--shadow);
}
.hero__greet { font-size: .86rem; opacity: .9; }
/* Saludo con icono a la derecha del texto. */
.hero__greet--icono {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    line-height: 1;
}
.hero__greet--icono svg { flex: none; }
.hero__name { font-size: 1.32rem; font-weight: 700; margin-bottom: .1rem; }
.hero__plan { font-size: .86rem; opacity: .92; }

.progress {
    margin-top: .8rem;
    background: rgba(255, 255, 255, .22);
    height: 9px;
    border-radius: 99px;
    overflow: hidden;
}
.progress__bar { height: 100%; background: #fff; border-radius: 99px; transition: width .4s ease; }
.progress__legend { display: flex; justify-content: space-between; font-size: .78rem; margin-top: .35rem; opacity: .9; }

/* ------------------------------------------------------------------ grid -- */
.grid { display: grid; gap: .7rem; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 380px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }

.row { display: flex; align-items: center; gap: .55rem; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: grid; gap: .55rem; }
.spacer { flex: 1; }

/* --------------------------------------------------------------- buttons -- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 46px;
    padding: .65rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform .06s ease, filter .15s ease, background .15s ease;
    text-align: center;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { background: #f8fafc; }
.btn--soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn--danger { background: var(--danger); }
.btn--ok { background: var(--ok); }
.btn--sm { min-height: 36px; padding: .35rem .7rem; font-size: .86rem; border-radius: 10px; }
.btn--link { background: none; color: var(--brand); border: 0; padding: .2rem; min-height: 0; font-weight: 600; }

/* ---------------------------------------------------------------- inputs -- */
.field { display: grid; gap: .3rem; }
.field > label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field__hint { font-size: .78rem; color: var(--muted); }
.field__error { font-size: .78rem; color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    min-height: 46px;
    padding: .6rem .75rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 127, 171, .15);
}
.input:disabled { background: #f8fafc; color: var(--muted); }
.input--error { border-color: var(--danger); }

.phone { display: grid; grid-template-columns: auto 1fr; gap: .5rem; }

/* Contador de las copias desbloqueadas (3 minutos) */
.contador-bloqueo {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: var(--danger);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Opciones con radio (Ubícanos: copias automáticas) */
.opcion-radio {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .1rem;
    font-size: .9rem;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}
.opcion-radio input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; flex: none; }
/* Las opciones de copia van una al lado de la otra. */
.row .opcion-radio {
    margin: 0;
    padding: .4rem .7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    white-space: nowrap;
}
.row .opcion-radio:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}

/* Licencia: lista seleccionable de administradores */
.item--sel { cursor: pointer; border-radius: 12px; }
.item--sel:hover { background: var(--brand-soft); }
.item--elegido { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.item--sel input[type="radio"] { accent-color: var(--brand); width: 18px; height: 18px; cursor: pointer; }

/* Ficha de la empresa (Ubícanos, solo lectura y centrada) */
.ficha-empresa { text-align: center; position: relative; }
.ficha-empresa__qr {
    position: absolute;
    top: .6rem;
    right: .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--brand-dark);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.ficha-empresa__qr:hover { background: var(--brand-soft); transform: scale(1.05); }
.ficha-empresa__qr:active { transform: scale(.97); }
.ficha-empresa__qr:disabled { opacity: .5; cursor: default; }
.ficha-empresa__doc {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--brand-dark);
}
.ficha-empresa__nombre {
    font-size: 1rem;
    font-weight: 700;
    margin-top: .15rem;
}
.ficha-empresa__lugar {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: .2rem;
}
.ficha-empresa__nota {
    font-size: .74rem;
    color: var(--muted);
    margin-top: .2rem;
}

/* Ubícanos público: sucursales */
.sucursal {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .6rem .7rem;
    background: var(--surface);
}
.sucursal__nombre {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 700;
    font-size: .92rem;
    flex-wrap: wrap;
}
.sucursal__acciones {
    display: flex;
    gap: .4rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}
.ubi-detalle__portada {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: min(50dvh, 420px);
    border-radius: 12px;
    overflow: hidden;
    background: var(--brand-soft);
}
.ubi-detalle__portada img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Clientes agrupados por empresa (ROOT → Empresas) */
.empresa-clientes {
    margin-top: .45rem;
    border-left: 3px solid var(--brand-soft);
    padding-left: .55rem;
    display: grid;
    gap: .2rem;
}
.empresa-clientes__fila {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: baseline;
    font-size: .8rem;
}
.empresa-clientes__nombre { font-weight: 600; }
.empresa-clientes__dato { color: var(--muted); }

/* Ficha del QR de la empresa */
.qr-ficha { text-align: center; }
.qr-ficha__empresa { font-weight: 800; font-size: 1.02rem; }
.qr-ficha__doc { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.qr-ficha__codigo {
    margin: .7rem auto .5rem;
    max-width: 320px;
    background: #fff;
    padding: .4rem;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--line);
}
.qr-ficha__codigo svg { display: block; width: 100%; height: auto; }
.qr-ficha__url {
    margin-top: .5rem;
    font-size: .72rem;
    color: var(--muted);
    word-break: break-all;
    background: var(--brand-soft);
    border-radius: 10px;
    padding: .4rem .5rem;
}

/* Ficha pública Ubícanos */
.ubi__portada {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    background: var(--bg-soft);
}
.ubi__portada--vacia {
    display: grid;
    place-items: center;
    gap: .3rem;
    color: var(--muted);
    font-size: .82rem;
}
.ubi__dir {
    display: flex;
    gap: .4rem;
    align-items: flex-start;
    font-size: .88rem;
    color: var(--ink-soft);
}
.ubi__redes {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.ubi__red {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}
.ubi__red:hover { background: var(--brand-soft); border-color: var(--brand); }

/* Mapa del modal de ubicación */
.mapa--alto { height: 320px; border-radius: 12px; overflow: hidden; }

/* Ubícanos: foto principal, carrusel y redes */
.foto-principal {
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-soft);
    width: 100%;
    min-height: 140px;
    display: grid;
    place-items: center;
}
/* La foto se adapta al ancho y alto del dispositivo sin recortarse. */
.foto-principal img {
    width: 100%;
    height: 100%;
    max-height: min(58dvh, 520px);
    object-fit: contain;
    display: block;
}
@media (max-width: 480px) {
    .foto-principal { border-radius: 12px; }
    .foto-principal img { max-height: 44dvh; }
}
.foto-principal__vacio {
    display: grid;
    place-items: center;
    gap: .3rem;
    color: var(--muted);
    font-size: .82rem;
}

/* Galería del local: todo se escala con la pantalla y la principal mide el DOBLE. */
.galeria {
    /* Miniaturas fluidas: crecen con el ancho del dispositivo. */
    --galeria-mini: clamp(52px, 11vw, 104px);
    display: grid;
    gap: clamp(.4rem, 1.2vw, .7rem);
}
.galeria__principal {
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-soft);
    width: 100%;
    aspect-ratio: 16 / 10;                       /* se adapta al ancho */
    min-height: calc(var(--galeria-mini) * 2);   /* el doble de la miniatura */
    max-height: min(58dvh, 520px);               /* nunca más alto que la pantalla */
    display: grid;
    place-items: center;
}
.galeria__principal img {
    width: 100%;
    height: 100%;
    object-fit: contain;                          /* se ve completa, sin recortes */
    display: block;
}
.galeria__carrusel {
    display: flex;
    gap: clamp(.35rem, 1vw, .5rem);
    overflow-x: auto;
    padding-bottom: .15rem;
    scroll-behavior: smooth;
}
.galeria__item {
    flex: 0 0 auto;
    width: calc(var(--galeria-mini) * 1.33);
    height: var(--galeria-mini);
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease;
}
.galeria__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria__item:hover { transform: translateY(-1px); }
.galeria__item--activo { border-color: var(--brand); }

/* Transición: la foto entra deslizándose de derecha a izquierda. */
@keyframes galeria-entra-derecha {
    from { opacity: .25; transform: translateX(100%); }
    to   { opacity: 1;   transform: translateX(0); }
}
.galeria__principal img.galeria__slide {
    animation: galeria-entra-derecha .45s cubic-bezier(.22, .61, .36, 1);
    will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
    .galeria__principal img.galeria__slide { animation: none; }
}
@media (max-width: 480px) {
    .galeria { --galeria-mini: clamp(46px, 14vw, 62px); }
    .galeria__principal { border-radius: 12px; max-height: 44dvh; }
}
@media (min-width: 1024px) {
    .galeria { --galeria-mini: 104px; }
}
.carrusel {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    scroll-snap-type: x mandatory;
}
.carrusel__item {
    position: relative;
    flex: 0 0 auto;
    width: clamp(96px, 28vw, 148px);   /* se adapta al ancho del dispositivo */
    aspect-ratio: 4 / 3;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-soft);
    scroll-snap-align: start;
}
.carrusel__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carrusel__x {
    position: absolute;
    top: 4px;
    right: 4px;
    border: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 23, 42, .65);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.red-campo { position: relative; }
.red-campo__icono {
    position: absolute;
    left: .6rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: grid;
    place-items: center;
    pointer-events: none;
}
.red-campo .input { padding-left: 2rem; }

/* Selector de fecha con navegación (‹ fecha › Hoy) */
.fecha-nav {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .15rem;
}
.fecha-nav__btn {
    border: 0;
    background: none;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--ink-soft);
}
.fecha-nav__btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.fecha-nav__valor {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 0;
    background: none;
    padding: .3rem .5rem;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: .86rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.fecha-nav__valor:hover { background: var(--brand-soft); }
.fecha-nav__hoy {
    border: 0;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    padding: .32rem .55rem;
    border-radius: 9px;
    cursor: pointer;
}
.fecha-nav__hoy:hover { background: var(--brand); color: #fff; }

/* Calendario del selector */
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.cal__semana,
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; }
.cal__semana span {
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
    padding: .2rem 0;
}
.cal__dia {
    border: 0;
    background: none;
    aspect-ratio: 1;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: .86rem;
    color: var(--ink);
}
.cal__dia:hover { background: var(--brand-soft); }
.cal__dia--vacio { cursor: default; }
.cal__dia--hoy { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.cal__dia--sel { background: var(--brand); color: #fff; font-weight: 700; }

/* Recordar usuario y contraseña en el ingreso */
.check-recordar {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: .55rem 0 .1rem;
    font-size: .86rem;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}
.check-recordar input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
    flex: none;
}

/* Combo de prefijo con bandera dibujada en SVG */
.prefijo { position: relative; }
.prefijo__boton {
    display: flex;
    align-items: center;
    gap: .35rem;
    height: 100%;
    padding: .45rem .6rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink);
}
.prefijo__boton:hover { border-color: var(--brand); }
.prefijo__boton svg:last-child { color: var(--muted); }
.prefijo__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + .3rem);
    left: 0;
    min-width: 220px;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    padding: .3rem;
}
.prefijo__menu[hidden] { display: none; }
.prefijo__opcion {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .45rem .5rem;
    border: 0;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}
.prefijo__opcion:hover,
.prefijo__opcion[aria-selected="true"] { background: var(--brand-soft); }
.prefijo__codigo { font-weight: 700; min-width: 46px; }
.prefijo__pais { color: var(--muted); font-size: .82rem; }
.bandera { display: block; border-radius: 2px; flex: none; }

/* ------------------------------------------------------------------ auth -- */
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(6, 182, 212, .35), transparent 60%),
        radial-gradient(700px 420px at 110% 10%, rgba(11, 127, 171, .35), transparent 55%),
        linear-gradient(160deg, #072c3c, #0b3f57 55%, #0b7fab);
}
.auth__box {
    width: 100%; max-width: 420px;
    background: rgba(255, 255, 255, .98);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
}
.auth__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.auth__logo {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid; place-items: center; color: #fff; font-size: 1.3rem;
}
.auth__title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.auth__sub { font-size: .8rem; color: var(--muted); }
.auth__center { text-align: center; }
.auth__legend { font-size: .84rem; color: var(--muted); text-align: center; margin: .2rem 0 .8rem; }

/* Cajas del código: una por dígito, angostas y centradas. */
.otp {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .4rem;
    width: 100%;
    max-width: 300px;
    margin: .4rem auto .2rem;
}
.otp input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    padding: .55rem 0;
    border-radius: 10px;
    border: 1px solid var(--line);
    height: 56px;
}
.otp input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 127, 171, .15); outline: none; }

.devhint {
    margin-top: .6rem;
    background: var(--warn-soft);
    color: #78350f;
    border-radius: 10px;
    padding: .5rem .65rem;
    font-size: .8rem;
    display: flex; gap: .4rem; align-items: center;
}

/* Recuperar contraseña: indicador de los 3 pasos dentro del modal */
.codigo__input {
    letter-spacing: .45em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.pasos {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .5rem;
    font-size: .74rem;
}
.pasos__item {
    display: flex;
    align-items: center;
    gap: .3rem;
    color: var(--muted);
    white-space: nowrap;
}
.pasos__item + .pasos__item::before {
    content: "";
    width: 14px;
    height: 2px;
    background: #d5dde5;
    border-radius: 2px;
    margin-right: .1rem;
}
.pasos__num {
    display: inline-grid;
    place-items: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #e6edf3;
    color: var(--muted);
    font-weight: 700;
    font-size: .7rem;
}
.pasos__item--activo { color: var(--brand-dark); font-weight: 700; }
.pasos__item--activo .pasos__num { background: var(--brand); color: #fff; }
.pasos__item--hecho { color: var(--ok, #047857); }
.pasos__item--hecho .pasos__num { background: var(--ok-soft, #d1fae5); color: var(--ok, #047857); }
.pasos__texto { display: none; }
@media (min-width: 420px) {
    .pasos__texto { display: inline; }
}

/* ------------------------------------------------------------------ tabs -- */
.tabs {
    display: flex;
    gap: .25rem;
    background: #e6edf3;
    padding: .25rem;
    border-radius: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    position: relative;
    flex: 1 0 auto;
    border: 0;
    background: transparent;
    padding: .5rem .8rem;
    border-radius: 9px;
    font-size: .87rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.tab[aria-selected="true"] { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Aviso de novedades: check verde arriba a la derecha de la pestaña. */
.tab__check {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--ok);
    color: #fff;
    font-size: 9px;
    line-height: 13px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .35);
}
.tab__check::before { content: "✓"; }

/* ------------------------------- aviso de instalación en iPhone/iPad -- */
.ios-instalar {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    transform: translate(-50%, 12px);
    width: calc(100% - 24px);
    max-width: 430px;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .7rem .75rem;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .32);
    font-size: .82rem;
    line-height: 1.35;
    z-index: 60;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.ios-instalar--visible { opacity: 1; transform: translate(-50%, 0); }
.ios-instalar__icono {
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: .1rem;
    color: #7dd3fc;
}
.ios-instalar__texto { margin: 0; flex: 1 1 auto; }
.ios-instalar__texto strong { color: #fff; }
.ios-instalar__cerrar {
    flex: 0 0 auto;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #e2e8f0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.ios-instalar__cerrar:hover { background: rgba(255, 255, 255, .22); }
/* Sin barra de navegación (login) queda más abajo. */
.ios-instalar--sin-nav {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
}

/* Pasos para instalar la app (modal de escritorio) */
.pasos-instalar {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: .4rem;
    font-size: .86rem;
    color: var(--ink);
}
.pasos-instalar li::marker { color: var(--brand); font-weight: 700; }

/* ------------------------------------------------------------------ nav --- */
.nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 30;
}
.nav--wide { max-width: 960px; }
.nav__item {
    display: grid;
    place-items: center;
    gap: 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: .6rem;
    letter-spacing: 0;
    font-weight: 600;
    cursor: pointer;
    padding-top: 8px;
}
.nav__item svg { width: 22px; height: 22px; }
.nav__item[aria-current="page"] { color: var(--brand); }
.nav__item[aria-current="page"] svg { transform: translateY(-1px); }

/* ---------------------------------------------------------------- badges -- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .18rem .55rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: capitalize;
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--muted { background: #eef2f6; color: var(--muted); }

/* ----------------------------------------------------------------- lists -- */
.list { display: grid; gap: .6rem; }
.item {
    display: grid;
    gap: .45rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.item__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.item__title { font-weight: 700; font-size: .95rem; }
.item__meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .82rem; }
.item__actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.empty {
    text-align: center;
    padding: 1.8rem 1rem;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fbfdff;
}
.empty__icon { font-size: 1.6rem; margin-bottom: .3rem; }

/* ----------------------------------------------------------------- plans -- */
.plan {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .9rem;
    display: grid;
    gap: .5rem;
    background: #fff;
}
.plan--featured { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 127, 171, .1); }
.plan__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.plan__name { font-size: 1.05rem; font-weight: 800; }
.plan__price { font-size: 1.25rem; font-weight: 800; color: var(--brand-dark); }
.plan__price small { font-size: .72rem; font-weight: 600; color: var(--muted); }
.plan__enfoque { font-style: italic; color: var(--ink-soft); font-size: .86rem; }
.plan ul { margin: 0; padding-left: 1.05rem; display: grid; gap: .22rem; font-size: .86rem; color: var(--ink-soft); }
.plan li::marker { color: var(--accent); }

/* --------------------------------------------------------------- stepper -- */
.stepper { display: flex; align-items: center; gap: .35rem; }
.stepper__step {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: #dbe4ec;
}
.stepper__step[data-active="1"] { background: var(--brand); }
.stepper__label { font-size: .76rem; color: var(--muted); margin-top: .25rem; }

/* ---------------------------------------------------------------- slots --- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .45rem; }
.slot {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 11px;
    padding: .5rem .2rem;
    text-align: center;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    min-height: 44px;
}
.slot small { display: block; font-weight: 500; font-size: .68rem; color: var(--muted); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.slot:disabled { background: #f1f5f9; color: #b6c2cf; cursor: not-allowed; text-decoration: line-through; }

/* ----------------------------------------------------------------- toggl -- */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.switch {
    position: relative;
    width: 50px; height: 30px;
    flex: 0 0 50px;
    border-radius: 99px;
    background: #cbd5e1;
    border: 0;
    cursor: pointer;
    transition: background .18s ease;
}
.switch::after {
    content: "";
    position: absolute; top: 3px; left: 3px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* -------------------------------------------------------------- uploads --- */
.uploader {
    border: 1px dashed #c7d4e0;
    border-radius: 14px;
    padding: .8rem;
    text-align: center;
    background: #fbfdff;
    cursor: pointer;
    color: var(--muted);
    font-size: .84rem;
}
.uploader:hover { border-color: var(--brand); color: var(--brand); }
.thumbs { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .5rem; }
.thumb {
    position: relative;
    width: 64px; height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f1f5f9;
}
/* Estrellas en modo lectura (panel) */
.estrellas-mostrar { display: inline-flex; gap: .05rem; color: var(--line); line-height: 0; }
.estrellas-mostrar .on { color: #f59e0b; }
.estrellas-mostrar .on svg { fill: currentColor; }

/* Calificación del lavado (pulgares + estrellas) */
.calificar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
    margin: .4rem 0 .1rem;
}
.calificar__label { font-size: .78rem; color: var(--muted); margin-right: .15rem; }
.calificar__btn,
.estrella {
    border: 0;
    background: none;
    padding: .2rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    display: grid;
    place-items: center;
    line-height: 0;
}
/* Los pulgares son círculos: al elegir uno queda encerrado. */
.calificar__btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px transparent;
    transition: box-shadow .15s ease, background .15s ease;
}
.calificar__btn:hover,
.estrella:hover { background: var(--brand-soft); color: var(--brand-dark); }
.calificar__btn--on {
    color: var(--brand-dark);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 2px var(--brand);
}
.calificar__btn--on[data-pulgar="-1"] {
    color: var(--danger);
    background: var(--danger-soft);
    box-shadow: inset 0 0 0 2px var(--danger);
}
.estrellas { display: inline-flex; gap: .1rem; margin-left: .15rem; }
.estrella--on { color: #f59e0b; }
.estrella--on svg { fill: currentColor; }

/* Tabla de precios del panel */
.precios {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
.precios th,
.precios td {
    border-bottom: 1px solid var(--line);
    padding: .35rem .4rem;
    text-align: center;
}
.precios thead th {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    font-weight: 700;
}
.precios .precios__tipo {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.precios__input {
    width: 100%;
    min-width: 78px;
    text-align: right;
    padding: .35rem .45rem;
}
.input--error { border-color: var(--danger); background: var(--danger-soft); }

/* Tarjeta de fidelización */
.tarjeta-fiel {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .7rem .75rem;
    margin-top: .7rem;
    background: #fbfdff;
}
.sellos {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .35rem;
}
.sello {
    border: 1px dashed var(--line);
    border-radius: 10px;
    min-height: 64px;
    padding: .3rem .25rem;
    display: grid;
    place-items: center;
    gap: .15rem;
    text-align: center;
    background: #fff;
}
.sello--ok {
    border-style: solid;
    border-color: #bae6fd;
    background: var(--brand-soft);
}
.sello__icono {
    display: grid;
    place-items: center;
    min-height: 20px;
    color: var(--brand-dark);
}
.sello__texto {
    font-size: .64rem;
    color: var(--muted);
    line-height: 1.1;
}
.sello--ok .sello__texto { color: var(--brand-dark); font-weight: 700; }
.sello--premio { border-style: solid; background: #fff7ed; border-color: #fdba74; }
.sello--listo { background: #ecfdf3; border-color: #86efac; }
.sello--listo .btn { font-size: .66rem; padding: .25rem .4rem; }

@media (max-width: 380px) {
    .sellos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Campo de contraseña con ojo para mostrarla */
.campo-clave { position: relative; }
.campo-clave .input { padding-right: 2.7rem; }
.campo-clave__ojo {
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: .35rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    display: grid;
    place-items: center;
}
.campo-clave__ojo:hover { color: var(--brand-dark); background: var(--brand-soft); }
.campo-clave__ojo--activo { color: var(--brand-dark); }
.campo-clave__ojo--activo svg { opacity: .65; }

/* Mapa de la dirección (atención a domicilio) */
.mapa {
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f6;
}
.mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb--boton { padding: 0; cursor: zoom-in; }
.thumb--boton:hover { border-color: var(--brand); }
.thumb button {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    border: 0; background: rgba(15, 23, 42, .7); color: #fff;
    font-size: .7rem; line-height: 1; cursor: pointer;
}

/* --------------------------------------------------------------- agenda --- */
.agenda {
    display: grid;
    gap: 3px;
    font-size: .8rem;
}
.agenda__head {
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .35rem .2rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
}
.agenda__hora {
    font-size: .74rem;
    color: var(--muted);
    padding: .45rem .2rem;
    border-bottom: 1px solid var(--line);
    display: grid;
    place-items: center;
}
.agenda__celda {
    min-height: 64px;
    border-bottom: 1px solid var(--line);
    border-radius: 10px;
    padding: .35rem .45rem;
    display: grid;
    gap: 2px;
    align-content: start;
    text-align: left;
    font: inherit;
    color: inherit;
}
.agenda__celda--libre {
    background: #f8fafc;
    border: 1px dashed var(--line);
}
.agenda__celda--ocupada {
    background: var(--brand-soft);
    border: 1px solid #bae6fd;
    cursor: pointer;
}
.agenda__celda--ocupada:hover { filter: brightness(.97); }
.agenda__placa { font-weight: 700; font-size: .82rem; }
.agenda__servicio { font-size: .7rem; color: var(--ink-soft); line-height: 1.2; }
.agenda__celda .badge { font-size: .62rem; padding: .1rem .4rem; justify-self: start; }
.agenda__tags { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.agenda__tags .badge { display: inline-flex; align-items: center; gap: .18rem; }

/* ----------------------------------------------------------------- modal -- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(8, 22, 34, .55);
    display: grid; place-items: end center;
    z-index: 60;
    padding: 0;
    animation: fade .15s ease;
}
@media (min-width: 520px) { .modal-backdrop { place-items: center; } }
.modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    max-height: 88vh;
    overflow: auto;
    animation: slide .2s ease;
}
@media (min-width: 520px) { .modal { border-radius: 20px; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateY(18px); opacity: .6; } }

/* ---------------------------------------------------------------- toasts -- */
.banners {
    position: fixed;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: min(92vw, 460px);
    display: grid;
    gap: .5rem;
    z-index: 95;
    pointer-events: none;
}

.banner {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .7rem .8rem;
    border-radius: 14px;
    background: #0f172a;
    color: #fff;
    border-left: 4px solid var(--accent);
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .6);
    cursor: pointer;
    animation: bannerIn .22s ease;
}
.banner--out { opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease; }
.banner__icon { color: var(--accent); margin-top: 1px; }
.banner__body { flex: 1; min-width: 0; }
.banner__title { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.banner__meta {
    font-size: .76rem;
    margin-top: .2rem;
    color: #7dd3fc;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
}
.banner__text { font-size: .8rem; opacity: .85; margin-top: .1rem; }
.banner__close {
    background: none; border: 0; color: rgba(255, 255, 255, .7);
    font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .1rem;
}
.banner__close:hover { color: #fff; }

@keyframes bannerIn { from { opacity: 0; transform: translateY(-12px); } }

.toasts {
    position: fixed;
    bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 85;
    display: grid; gap: .4rem;
    width: min(92vw, 420px);
}
.toast {
    background: var(--ink);
    color: #fff;
    border-radius: 12px;
    padding: .65rem .8rem;
    font-size: .86rem;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
    animation: slide .2s ease;
}
.toast--ok { background: #14532d; }
.toast--error { background: #7f1d1d; }

/* ----------------------------------------------------------------- misc --- */
.qr {
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: .9rem 1rem;
    text-align: center;
}
.qr__code { font-family: ui-monospace, Consolas, monospace; font-size: 1.45rem; font-weight: 700; letter-spacing: .22em; }

.kpi { display: grid; gap: .2rem; padding: .8rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.kpi__value { font-size: 1.35rem; font-weight: 800; color: var(--brand-dark); }
.kpi__label { font-size: .76rem; color: var(--muted); }

.skeleton {
    background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 12px;
    height: 84px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.hint-box {
    background: var(--brand-soft);
    color: #04556f;
    border-radius: 12px;
    padding: .6rem .75rem;
    font-size: .82rem;
}
.ok-box {
    background: var(--ok-soft);
    color: var(--ok);
    border-radius: 12px;
    padding: .6rem .75rem;
    font-size: .86rem;
    font-weight: 600;
}

.danger-box {
    background: var(--danger-soft);
    color: #7f1d1d;
    border-radius: 12px;
    padding: .6rem .75rem;
    font-size: .82rem;
}

/* ------------------------------------------------------------ impresión -- */
#impresion { display: none; }

@media print {
    body > *:not(#impresion) { display: none !important; }

    #impresion { display: block; }

    .ticket {
        color: #000;
        max-width: 720px;
        margin: 0 auto;
        font-family: "Segoe UI", system-ui, sans-serif;
    }
    .ticket h1 { font-size: 1.35rem; margin: 0 0 .15rem; }
    .ticket__orden { font-size: .95rem; color: #333; }
    .ticket__code {
        font-family: ui-monospace, Consolas, monospace;
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: .2em;
        margin: .7rem 0 1.1rem;
    }
    .ticket table { width: 100%; border-collapse: collapse; }
    .ticket th, .ticket td {
        text-align: left;
        vertical-align: top;
        padding: .4rem .5rem;
        border-bottom: 1px solid #d4d4d4;
        font-size: .92rem;
    }
    .ticket th { width: 34%; font-weight: 600; color: #444; }
    .ticket__pie { margin-top: 1.2rem; font-size: .75rem; color: #555; }
}
