/* ============================================
   LauGestion – Modern Login (mockup match)
   Primary: #E30613  |  Font: Inter
   ============================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #F8FAFC;
    color: #1e293b;
}

/* ---------- Utility ---------- */
.display-hide { display: none; }
/* Ocultar alertas que llevan display-hide (mayor especificidad que .alert-danger) */
.alert-danger.display-hide { display: none; }

/* ---------- Split layout ---------- */
.login-split {
    display: flex;
    min-height: 100vh;
}

/* --- Form panel (left 40%) --- */
.login-form-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 5rem;
    background: #fff;
    z-index: 10;
    box-shadow: 4px 0 30px rgba(0,0,0,.08);
}

.login-form-wrapper {
    max-width: 28rem;
    margin: 0 auto;
    width: 100%;
}

/* Logo / Brand */
.login-brand {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.login-brand .brand-primary {
    font-size: 1.875rem;
    font-weight: 700;
    color: #E30613;
    letter-spacing: -0.05em;
}

.login-brand .brand-secondary {
    font-size: 1.875rem;
    font-weight: 300;
    color: #64748b;
    letter-spacing: -0.05em;
}

.login-brand img {
    height: 40px;
    margin-right: 12px;
}

/* Heading area */
.login-heading {
    margin-bottom: 2.5rem;
}

.login-heading h1 {
    font-size: 2.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.login-heading p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

/* ---------- Alerts ---------- */
.alert-danger {
    background: #fff0f0;
    border: 1px solid rgba(227,6,19,.2);
    color: #c0392b;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-danger .close {
    background: none;
    border: none;
    font-size: 1.125rem;
    line-height: 1;
    color: #c0392b;
    cursor: pointer;
    padding: 0;
}

/* ---------- Form fields ---------- */
.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.375rem;
    padding-left: 0.25rem;
}

/* Input with icon */
.input-icon {
    position: relative;
}

.input-icon > .material-icons-round {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.25rem;
    pointer-events: none;
}

.input-icon > .form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: #f8fafc;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    color: #1e293b;
    outline: none;
    transition: box-shadow .2s;
    font-family: inherit;
}

.input-icon > .form-control:focus {
    box-shadow: 0 0 0 2px #E30613;
}

.input-icon > .form-control::placeholder {
    color: #94a3b8;
}

/* Validation error state */
.input-icon.has-error > .form-control {
    box-shadow: 0 0 0 2px #e85858;
}

.help-block {
    display: block;
    color: #c0392b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding-left: 0.25rem;
}

/* ---------- Remember / Actions row ---------- */
.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #475569;
}

.remember-label:hover {
    color: #1e293b;
}

/* Custom checkbox */
.remember-label .checkbox-wrap {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
}

.remember-label .checkbox-wrap input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.remember-label .checkbox-visual {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.remember-label .checkbox-wrap input:checked + .checkbox-visual {
    background: #E30613;
    border-color: #E30613;
}

.remember-label .checkbox-check {
    color: #fff;
    font-size: 1rem;
    transform: scale(0);
    transition: transform .15s;
}

.remember-label .checkbox-wrap input:checked + .checkbox-visual .checkbox-check {
    transform: scale(1);
}

.forgot-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #E30613;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ---------- Submit button ---------- */
.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    background: #E30613;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 8px 24px rgba(227,6,19,.3);
    font-family: inherit;
    letter-spacing: 0.04em;
}

.btn-login:hover {
    background: #b91c1c;
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login .material-icons-round {
    font-size: 1.125rem;
}

/* ---------- Footer ---------- */
.login-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    gap: 1rem;
}

.login-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color .2s;
}

.login-footer a:hover {
    color: #E30613;
}

/* ============================================
   Carousel panel (right 60%)
   ============================================ */
.login-carousel-panel {
    width: 60%;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.8), transparent, transparent);
}

/* Motto: lemas rotatorios sobre el carrusel */
.motto {
    position: absolute;
    bottom: 5rem;
    left: 4rem;
    right: 4rem;
    max-width: 32rem;
    min-height: 8rem;
    color: #fff;
    z-index: 4;
}

.motto .claim {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
}

.motto .claim.shown {
    opacity: 1;
    visibility: visible;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 3rem;
    right: 4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 5;
}

.nav-dot {
    width: 3rem;
    height: 0.375rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background .3s;
    padding: 0;
}

.nav-dot {
    background: rgba(255,255,255,.2);
}

.nav-dot.active {
    background: rgba(255,255,255,.5);
}

.nav-dot:hover {
    background: rgba(255,255,255,.7);
}

/* Dark mode toggle */
.dark-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    z-index: 20;
    padding: 0;
}

.dark-toggle:hover {
    background: rgba(255,255,255,.2);
}

/* Dark mode icon switching */
.dark-toggle .icon-dark  { display: inline; }
.dark-toggle .icon-light { display: none; }

html.dark .dark-toggle .icon-dark  { display: none; }
html.dark .dark-toggle .icon-light { display: inline; }

/* ============================================
   Dark mode overrides
   ============================================ */
html.dark body {
    background: #0f172a;
    color: #e2e8f0;
}

html.dark .login-form-panel {
    background: #0f172a;
}

html.dark .login-brand .brand-secondary {
    color: #94a3b8;
}

html.dark .login-heading h1 {
    color: #f8fafc;
}

html.dark .login-heading p {
    color: #94a3b8;
}

html.dark .login-form .form-group label {
    color: #94a3b8;
}

html.dark .input-icon > .form-control {
    background: #1e293b;
    color: #f8fafc;
}

html.dark .input-icon > .form-control::placeholder {
    color: #64748b;
}

html.dark .remember-label {
    color: #94a3b8;
}

html.dark .remember-label:hover {
    color: #e2e8f0;
}

html.dark .remember-label .checkbox-visual {
    border-color: #475569;
}

html.dark .login-footer {
    border-top-color: #1e293b;
    color: #475569;
}

html.dark .login-footer a {
    color: #475569;
}

html.dark .login-carousel-panel {
    background: #1e293b;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .login-split {
        flex-direction: column;
    }

    .login-form-panel {
        width: 100%;
        padding: 2rem 1.5rem;
        order: 2;
    }

    .login-carousel-panel {
        width: 100%;
        height: 35vh;
        order: 1;
    }

    .motto {
        bottom: 3rem;
        left: 2rem;
        right: 2rem;
        min-height: 6rem;
    }

    .motto .claim {
        font-size: 1.5rem;
    }

    .carousel-dots {
        bottom: 1.5rem;
        right: 2rem;
    }
}

@media (max-width: 480px) {
    .login-carousel-panel {
        height: 25vh;
    }

    .login-form-panel {
        padding: 1.5rem 1.125rem;
    }

    .login-heading h1 {
        font-size: 1.5rem;
    }

    .login-footer {
        flex-direction: column;
        text-align: center;
    }

    .motto {
        display: none;
    }
}
