@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/roboto-medium.woff2') format('woff2');
}

:root {
    --oro: #C9A84C;
    --tinta: #16191D;
    --gris: #5A6470;
    --linea: #C9CED5;
    --enlace: #7A5F1F;
    --error: #A52A1F;
    --raya: rgba(22, 25, 29, .07);
    --bloque: rgba(22, 25, 29, .075);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: 'DM Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    color: var(--tinta);
    background: #fff;
}

a { color: var(--tinta); }

:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }

.lg {
    display: flex;
    flex-wrap: wrap;
    min-height: 100dvh;
}

/* ── Mitad de marca ── */
.lg-marca {
    --paso: 110px;
    position: relative;
    flex: 1 1 460px;
    min-width: 0;
    overflow: hidden;
    background: var(--oro);
}

.lg-fondo {
    position: absolute;
    inset: 0;
    display: flex;
    overflow: hidden;
    background-image: repeating-linear-gradient(to bottom, var(--raya) 0 1px, transparent 1px var(--paso));
}

.lg-col {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    border-left: 1px solid var(--raya);
}

.lg-bloque {
    position: absolute;
    left: 6px;
    right: 6px;
    top: calc(var(--m) / 60 * var(--paso) + 10px);
    height: calc(var(--d) / 60 * var(--paso));
    border-radius: 9px;
    background: var(--bloque);
}

.lg-marca-contenido {
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 48px;
    text-align: center;
}

.lg-logo {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: .14em;
}

.lg-lema {
    margin: 0 auto 32px;
    max-width: 520px;
    font-family: 'DM Serif Display', serif;
    font-size: 68px;
    font-weight: 400;
    line-height: 1.02;
}

.lg-pie-marca { font-size: 17px; }

/* ── Ticket ── */
.lg-ticket {
    width: 340px;
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
    border-radius: 18px;
    background: #fff;
    transform: rotate(-3deg);
    box-shadow: 0 18px 40px rgba(60, 44, 6, .26);
}

.lg-ticket-cabeza { padding: 20px 24px; }

.lg-ticket-etiqueta { font-size: 14px; color: var(--gris); }

.lg-ticket-dia {
    font-family: 'DM Serif Display', serif;
    font-size: 36px;
    line-height: 1.1;
}

.lg-ticket-hora { font-size: 18px; font-weight: 600; }

.lg-ticket-corte {
    position: relative;
    height: 18px;
}

.lg-ticket-corte::before {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    top: 8px;
    border-top: 2px dashed #E3D7B5;
}

.lg-ticket-corte i {
    position: absolute;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--oro);
}

.lg-ticket-corte i:first-child { left: -9px; }
.lg-ticket-corte i:last-child { right: -9px; }

.lg-ticket-linea {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    font-weight: 600;
}

/* ── Formulario ── */
.lg-acceso {
    flex: 1 1 460px;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 32px;
    background: #fff;
}

.lg-acceso-caja {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lg-titulo {
    margin: 0;
    font-family: 'DM Serif Display', serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
}

.lg-error {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #FCEDEC;
    color: var(--error);
    font-size: 15px;
}

.lg-error svg { flex: none; margin-top: 2px; }
.lg-error ul { list-style: none; margin: 0; padding: 0; }

#account {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lg-campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lg-campo label { font-size: 14px; font-weight: 500; }

.lg-campo input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--linea);
    border-radius: 10px;
    background: #fff;
    color: var(--tinta);
    font: inherit;
}

.lg-campo input:focus {
    outline: none;
    border-color: var(--enlace);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .35);
}

.lg-clave { position: relative; }
.lg-clave input { padding-right: 48px; }

.lg-ojo {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--gris);
    cursor: pointer;
}

.lg-ojo.activo { color: var(--enlace); }

.field-validation-error { font-size: 14px; color: var(--error); }
.field-validation-valid { display: none; }

.lg-opciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    font-size: 15px;
}

.lg-recordar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
}

.lg-recordar input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--oro);
}

.lg-opciones a, .lg-alta a { color: var(--enlace); font-weight: 600; }
.lg-opciones a { font-weight: 500; }

.lg-entrar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--oro);
    color: var(--tinta);
    font: 600 16px 'DM Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s;
}

.lg-entrar:disabled { opacity: .45; cursor: not-allowed; }

.lg-entrar:hover { background: #BC9A3E; }

.lg-alta {
    margin: 0;
    font-size: 15px;
    color: var(--gris);
    text-align: center;
}

.lg-reservar {
    padding-top: 16px;
    border-top: 1px solid #E1E4E9;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

/* ── Formularios de acceso ── */
.lg-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lg-texto {
    margin: 0;
    color: var(--gris);
}

/* ── Código de verificación ── */
.lg-digitos {
    display: flex;
    gap: 8px;
}

.lg-digito {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    border: 1px solid var(--linea);
    border-radius: 10px;
    background: #fff;
    color: var(--tinta);
    font: 600 22px 'DM Sans', sans-serif;
    text-align: center;
}

.lg-digito:focus {
    outline: none;
    border-color: var(--enlace);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .35);
}

.lg-digito.es-error { border-color: var(--error); }

.lg-mensaje { font-size: 15px; color: var(--error); }
.lg-mensaje:empty { display: none; }
.lg-mensaje.ok { color: #2E6B3E; }

.lg-reenvio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    font-size: 15px;
    color: var(--gris);
}

.lg-enlace {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--enlace);
    font: 600 15px 'DM Sans', sans-serif;
    cursor: pointer;
}

.lg-enlace:disabled { color: var(--gris); font-weight: 400; cursor: default; }

/* ── Invitación a registrarse ── */
.lg-invitacion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #FBF3E2;
    font-size: 15px;
}

.lg-invitacion a {
    margin-top: 6px;
    color: var(--enlace);
    font-weight: 600;
}

/* ── Otros proveedores ── */
.lg-externos {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lg-separador {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--gris);
}

.lg-separador::before,
.lg-separador::after {
    content: '';
    flex: 1 1 0;
    border-top: 1px solid #E1E4E9;
}

.lg-externos-botones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lg-externo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #747775;
    border-radius: 12px;
    background: #fff;
    color: #1F1F1F;
    font: 500 14px/20px 'Roboto', 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background-color .15s;
}

.lg-externo:hover { background: #F2F4F5; }

/* ── Móvil ── */
@media (max-width: 860px) {
    .lg { display: block; min-height: 0; }
    .lg-marca { --paso: 70px; }
    .lg-col:nth-child(n+4) { display: none; }
    .lg-marca-contenido { display: block; min-height: 0; padding: 24px 22px 26px; text-align: left; }
    .lg-logo { font-size: 24px; }
    .lg-lema { margin: 16px 0 0; font-size: 38px; line-height: 1.05; }
    .lg-ticket, .lg-pie-marca { display: none; }
    .lg-acceso { display: block; padding: 24px 22px 32px; }
    .lg-acceso-caja { max-width: 420px; margin: 0 auto; gap: 18px; }
    .lg-titulo { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-entrar, .lg-externo { transition: none; }
}
