/* ===========================================================================
   Pantallas de acceso (login, recuperar y restablecer contrasena)
   =========================================================================== */

:root {
    --auth-ink: #0f172a;
    --auth-soft: #64748b;
    --auth-line: #e2e8f0;
    --auth-bg: #f1f5f9;
}

* { box-sizing: border-box; }

.auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    min-height: 100vh;
}

/* ---------------------------------------------------------------------------
   Columna del formulario
   --------------------------------------------------------------------------- */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #fff;
}

.auth-box {
    width: 100%;
    max-width: 384px;
}

.auth-brand { margin-bottom: 34px; }

.auth-logo {
    display: block;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.6px;
    line-height: 1;
    color: var(--auth-ink);
}

.auth-logo b { color: var(--cb-primary); font-weight: 800; }

.auth-brand small {
    display: block;
    margin-top: 7px;
    font-size: 11.5px;
    letter-spacing: 3.4px;
    text-transform: lowercase;
    color: #94a3b8;
}

.auth-brand img { display: block; }

.auth-title {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.9px;
    margin: 0 0 6px;
}

.auth-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-soft);
    margin: 0 0 26px;
}

/* ---- Campos ---- */
.auth-field { margin-bottom: 15px; }

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input > i {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
    transition: color .15s;
}

.auth-input input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 42px;
    border: 1.5px solid var(--auth-line);
    border-radius: 13px;
    background: #f8fafc;
    font-size: 14.5px;
    color: var(--auth-ink);
    outline: 0;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.auth-input input::placeholder { color: #cbd5e1; }

.auth-input input:focus {
    background: #fff;
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-primary) 14%, transparent);
}

.auth-input:focus-within > i { color: var(--cb-primary); }

.auth-input.has-toggle input { padding-right: 46px; }

.pw-toggle {
    position: absolute;
    right: 6px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .15s;
}

.pw-toggle:hover { background: #eef2f7; color: var(--auth-ink); }

/* ---- Recordarme / olvidé la contraseña ---- */
.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
    font-size: 13px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--auth-soft);
    user-select: none;
}

.auth-check input { width: 15px; height: 15px; accent-color: var(--cb-primary); cursor: pointer; }

.auth-links a {
    color: var(--cb-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover { text-decoration: underline; }

/* ---- Botón ---- */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 13px;
    background: var(--cb-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .14s, box-shadow .14s, filter .14s;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--cb-primary) 32%, transparent);
}

.auth-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--cb-primary) 38%, transparent);
}

.auth-btn:active { transform: translateY(0); }

/* Llamada al formulario de contacto: tiene que verse, es la unica puerta
   abierta para quien no tiene cuenta. */
.auth-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--auth-ink);
    background: color-mix(in srgb, var(--cb-primary) 7%, #fff);
    border: 1.5px solid color-mix(in srgb, var(--cb-primary) 30%, transparent);
    transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}

.auth-cta:hover {
    color: var(--auth-ink);
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--cb-primary) 11%, #fff);
    border-color: var(--cb-primary);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cb-primary) 20%, transparent);
}

.auth-cta-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 18px;
    color: #fff;
    background: var(--cb-primary);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--cb-primary) 34%, transparent);
}

.auth-cta-title {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.25;
}

.auth-cta-note {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--auth-soft);
}

.auth-cta-go {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 15px;
    color: var(--cb-primary);
    transition: transform .15s;
}

.auth-cta:hover .auth-cta-go { transform: translateX(3px); }

.min-w-0 { min-width: 0; }

/* ---- Avisos ---- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert i { margin-top: 1px; flex: 0 0 auto; }
.auth-alert.is-success { background: #f0fdf4; color: #15803d; }
.auth-alert.is-danger  { background: #fef2f2; color: #b91c1c; }
.auth-alert.is-warning { background: #fffbeb; color: #b45309; }
.auth-alert.is-info    { background: #eff6ff; color: #1d4ed8; }

.auth-footer {
    margin: 30px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

/* ---------------------------------------------------------------------------
   Columna de marca: solo el logotipo sobre el color corporativo
   --------------------------------------------------------------------------- */
.auth-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 78% 18%, color-mix(in srgb, #fff 22%, transparent), transparent 46%),
        linear-gradient(140deg,
            color-mix(in srgb, var(--cb-primary) 84%, #0f172a),
            var(--cb-primary) 52%,
            color-mix(in srgb, var(--cb-primary) 68%, #7c3aed));
}

/* Manchas suaves que dan profundidad al fondo. */
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    background: radial-gradient(circle, rgba(255, 255, 255, .17), transparent 65%);
}

.auth-blob-1 { width: 520px; height: 520px; top: -170px; right: -140px; }
.auth-blob-2 { width: 420px; height: 420px; bottom: -160px; left: -120px; }

/* Trama de puntos de fondo, como la retícula de una hoja de impresión. */
.auth-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .3;
    mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 72%);
}

/* ---- Adornos de copistería, dibujados a mano con SVG ---- */
.auth-art { position: absolute; opacity: .17; }
.auth-art .ln { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.auth-art .fill { fill: rgba(255, 255, 255, .14); }
.auth-art .fill2 { fill: rgba(255, 255, 255, .08); }
.auth-art .dot { fill: #fff; }
.auth-art .ring { stroke: #fff; stroke-width: 3.4; stroke-linecap: round; }

.auth-art-printer { width: 200px; left: -34px; bottom: 34px; transform: rotate(-9deg); }
.auth-art-book { width: 168px; right: -26px; top: 54px; transform: rotate(11deg); }

/* Cian, magenta, amarillo y negro: la impresión en color. */
.auth-cmyk {
    position: absolute;
    right: 46px;
    bottom: 40px;
    display: flex;
    gap: 9px;
    opacity: .5;
}

.auth-cmyk i { width: 15px; height: 15px; border-radius: 50%; mix-blend-mode: screen; }
.auth-cmyk i:nth-child(1) { background: #22d3ee; }
.auth-cmyk i:nth-child(2) { background: #f472b6; }
.auth-cmyk i:nth-child(3) { background: #fde047; }
.auth-cmyk i:nth-child(4) { background: rgba(255, 255, 255, .55); mix-blend-mode: normal; }

/* ---- Contenido del lateral ---- */
.auth-hero-inner {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 40px 28px;
    text-align: center;
}

.auth-hero-mark { color: #fff; }

.auth-hero-logo {
    display: block;
    font-size: 62px;
    font-weight: 800;
    letter-spacing: -3.2px;
    line-height: 1;
    text-shadow: 0 6px 26px rgba(15, 23, 42, .3);
}

.auth-hero-logo b { font-weight: 800; color: rgba(255, 255, 255, .62); }

.auth-hero-tag {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    letter-spacing: 7px;
    text-transform: lowercase;
    color: rgba(255, 255, 255, .78);
}

/* ---- Lo que se hace en el mostrador ---- */
.auth-services {
    position: relative;
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.auth-services li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(3px);
}

.auth-services i { font-size: 13px; opacity: .85; }

/* ---- Las dos tiendas ---- */
.auth-shops {
    position: relative;
    display: grid;
    gap: 9px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.auth-shop {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .17);
}

.auth-shop-pin {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.auth-shop-city {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.auth-shop-addr {
    display: block;
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .74);
}

/* ---------------------------------------------------------------------------
   Pantallas estrechas: la marca pasa a una banda arriba
   --------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    .auth-art-printer { width: 150px; left: -46px; }
    .auth-art-book { width: 128px; right: -38px; }
}

@media (max-width: 991px) {
    .auth-shell { grid-template-columns: 1fr; }

    /* En móvil la marca va arriba, en una banda, y sin adornos que estorben. */
    .auth-hero { order: -1; }
    .auth-hero-inner { padding: 30px 22px 26px; max-width: 520px; }
    .auth-art, .auth-cmyk { display: none; }

    .auth-hero-logo { font-size: 44px; letter-spacing: -2.2px; }
    .auth-hero-tag { margin-top: 11px; font-size: 11px; letter-spacing: 5px; }

    .auth-services { margin-top: 22px; gap: 6px; }
    .auth-services li { padding: 6px 11px; font-size: 11.5px; }

    .auth-shops { margin-top: 22px; padding-top: 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

    .auth-panel { padding: 34px 22px 44px; }
    .auth-brand { margin-bottom: 26px; }
    .auth-brand .auth-logo, .auth-brand small, .auth-brand img { display: none; }
}

@media (max-width: 575px) {
    .auth-services li:nth-child(n+5) { display: none; }
}

/* ===========================================================================
   Formulario de contacto
   =========================================================================== */

/* La caja del formulario necesita algo mas de aire que la del login. */
.auth-box.is-wide { max-width: 520px; }

/* Trampa para bots: fuera de pantalla, no oculta con display:none (algunos la
   detectan) sino movida lejos. */
.ct-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ct-subjects {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ct-subject input { position: absolute; opacity: 0; pointer-events: none; }

.ct-subject span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--auth-line);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all .14s;
}

.ct-subject span i { font-size: 15px; color: #94a3b8; transition: color .14s; }
.ct-subject span:hover { border-color: color-mix(in srgb, var(--cb-primary) 40%, transparent); }

.ct-subject input:checked + span {
    background: color-mix(in srgb, var(--cb-primary) 8%, #fff);
    border-color: var(--cb-primary);
    color: var(--auth-ink);
}

.ct-subject input:checked + span i { color: var(--cb-primary); }
.ct-subject input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-primary) 14%, transparent); }

.ct-two { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }

/* El area de texto reutiliza el marco de los campos. */
.auth-input.is-area { align-items: stretch; }

.auth-input.is-area textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--auth-line);
    border-radius: 13px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--auth-ink);
    outline: 0;
    resize: vertical;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.auth-input.is-area textarea::placeholder { color: #cbd5e1; }

.auth-input.is-area textarea:focus {
    background: #fff;
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-primary) 14%, transparent);
}

.ct-count { margin-top: 5px; text-align: right; font-size: 11.5px; color: #94a3b8; }

.ct-legal { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: #94a3b8; }

.ct-shops {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-line);
}

.ct-shops-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 9px;
}

.ct-shop {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--auth-soft);
}

.ct-shop i { margin-top: 2px; color: var(--cb-primary); }
.ct-shop b { color: var(--auth-ink); }

/* ---- Confirmación ---- */
.ct-done { text-align: center; }

.ct-done-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
    color: #16a34a;
    background: #f0fdf4;
}

.ct-done .auth-subtitle { margin-bottom: 26px; }

@media (max-width: 575px) {
    .ct-two { grid-template-columns: 1fr; }
    .ct-subjects { grid-template-columns: 1fr; }
}

/* Promesa de respuesta: lo primero que quiere saber quien escribe. */
.ct-promise {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -14px 0 24px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
