/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE CSS - Colores dinámicos desde panel admin
══════════════════════════════════════════════════════════════ */

.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--gray-100);
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   LEFT PANEL - BRANDING (usa colores del tema)
══════════════════════════════════════════════════════════════ */
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.login-branding {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.login-branding .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 2rem;
}

.login-branding .logo-icon {
    background: rgba(255,255,255,0.2);
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
}

.login-branding .logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.login-branding .logo-text span {
    opacity: 0.9;
}

.login-branding h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.login-branding p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.7;
}

.login-features {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.login-feature i {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-feature span {
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT PANEL - FORM
══════════════════════════════════════════════════════════════ */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-500);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════════════════
   PASSWORD TOGGLE
══════════════════════════════════════════════════════════════ */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.password-toggle:focus {
    outline: none;
}

.password-toggle i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   FORM OPTIONS
══════════════════════════════════════════════════════════════ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.remember-me span {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.forgot-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════
   LOGIN BUTTON WITH LOADER
══════════════════════════════════════════════════════════════ */
.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    transition: all 0.3s ease;
}

.btn-login .btn-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.btn-login .btn-loader {
    display: none;
    align-items: center;
    gap: 0.75rem;
    position: absolute;
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn-login.loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.btn-login.loading .btn-loader {
    display: flex;
}

/* Spinner Animation */
.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 2s linear infinite;
}

.spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ══════════════════════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════════════════════ */
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.login-divider span {
    color: var(--gray-400);
    font-size: 0.875rem;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   MEGACITY BADGE
══════════════════════════════════════════════════════════════ */
.megacity-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.megacity-badge i {
    color: var(--primary);
    font-size: 1.5rem;
}

.megacity-badge span {
    font-weight: 600;
    color: var(--dark);
}

.megacity-badge span strong {
    color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-back {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.login-back a:hover {
    color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 0;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}