/* ===== Anka Fire · Login ===== */
:root {
    --red: #E30613;
    --red-dark: #B8050F;
    --orange: #F7941D;
    --yellow: #FFC20E;
    --black: #1A1A1A;
    --gray: #F2F2F2;
    --text-muted: #6b7280;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.login-body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #1a1a1a url('../img/fondo_ANKA.png') center / cover no-repeat fixed;
    color: var(--black);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ----- Contenedor y tarjeta ----- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ----- Columna del formulario ----- */
.login-form-col {
    padding: 3.25rem 3.5rem;
    display: flex;
    flex-direction: column;
}

.brand { display: inline-block; text-decoration: none; line-height: 1; align-self: flex-start; }
.brand-name { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; }
.brand-red { color: var(--red); }
.brand-fire {
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand-tagline {
    display: block;
    margin-top: .35rem;
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.login-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2.5rem 0; }
.login-content h1 { font-size: 2.25rem; font-weight: 600; }
.login-sub { margin-top: .5rem; font-size: .875rem; color: var(--text-muted); }

.alert-ok {
    margin-top: 1.5rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
    font-size: .875rem;
}

.login-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* ----- Inputs ----- */
.input-wrap { position: relative; }

.input-wrap input {
    width: 100%;
    border: 2px solid transparent;
    background: var(--gray);
    border-radius: 9999px;
    padding: .9rem 3rem .9rem 3rem;
    font: inherit;
    font-size: .875rem;
    color: var(--black);
    outline: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.input-wrap input::placeholder { color: #9ca3af; }
.input-wrap input:focus { background: #fff; border-color: var(--red); }

.input-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    width: 20px; height: 20px;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.toggle-pass {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
}
.toggle-pass svg { width: 20px; height: 20px; }
.toggle-pass:hover { color: #4b5563; }
.toggle-pass:focus-visible { outline: 2px solid var(--red); }
.toggle-pass .slash { display: none; }
.toggle-pass.is-on .slash { display: block; }

.field-error { margin-top: .5rem; padding-left: 1rem; font-size: .8125rem; color: var(--red); }

/* ----- Opciones ----- */
.row-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .875rem;
}
.check { display: inline-flex; align-items: center; gap: .5rem; color: #4b5563; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--red); }
.link-red { color: var(--red); text-decoration: none; }
.link-red:hover { text-decoration: underline; }

/* ----- Botón ----- */
.btn-primary {
    width: 100%;
    border: 0;
    border-radius: 9999px;
    background: var(--red);
    color: #fff;
    padding: .95rem 1rem;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.login-footer { font-size: .75rem; color: #9ca3af; }

/* ----- Panel del logo ----- */
.login-panel {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    padding: 2.75rem 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: linear-gradient(160deg, var(--black) 0%, #2B0B0E 100%);
}

/* Logo grande y centrado */
.logo-anim {
    position: relative;
    isolation: isolate;
    width: min(58%, 300px);
}
.logo-anim img { display: block; width: 100%; height: auto; }

/* El canvas (llamas animadas) se coloca encima de la imagen */
.logo-anim canvas {
    display: none;
    position: absolute;
    bottom: 0;
    height: auto;
}
.logo-anim.is-live canvas { display: block; }
.logo-anim.is-live img { visibility: hidden; }

/* Resplandor cálido detrás de las llamas */
.logo-anim::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 24%;
    width: 130%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(247, 148, 29, .34), rgba(227, 6, 19, .12) 55%, transparent 100%);
    animation: brasa 2.6s ease-in-out infinite alternate;
}

@keyframes brasa {
    from { opacity: .65; }
    to   { opacity: 1; }
}
.panel-bottom {
    position: relative;
    z-index: 1;
    width: 100%;
}

.panel-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.panel-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.25rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 110px;
}

.feature-icon {
    width: 72px;
    height: 72px;
    padding: 18px;
    box-sizing: border-box;
    background: linear-gradient(160deg, #5a1414 0%, #3a0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: .85rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
.feature-item span {
    display: block;
    width: 100%;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.35;
    color: #f2f2f2;
}
/* ----- Responsive ----- */
@media (max-width: 900px) {
    .login-card { grid-template-columns: 1fr; max-width: 480px; }
    .login-panel { display: none; }
    .login-form-col { padding: 2.25rem 1.75rem; }
    .login-content h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .input-wrap input, .btn-primary { transition: none; }
    .logo-anim::before { animation: none; }
}
