/**
 * EL CLASS CRM - Login Page Styles
 * Extends style.css variables with login-specific animations and effects
 */

.login-page {
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 50%,
        rgba(212, 199, 160, 0.03) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 50%,
        rgba(36, 48, 73, 0.3) 0%,
        transparent 50%
    );
    animation: bgShift 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-3%, -2%);
    }
}

/* Animated logo */
.login-logo {
    animation: logoFadeIn 0.8s ease;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo .logo-text {
    position: relative;
    display: inline-block;
}

.login-logo .logo-text::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--tan);
    animation: logoLine 1s ease 0.6s forwards;
}

@keyframes logoLine {
    from {
        width: 0;
    }
    to {
        width: 60%;
    }
}

/* Card entrance */
.login-card {
    animation: cardSlideUp 0.6s ease;
    position: relative;
    z-index: 1;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input focus effects */
.login-card .form-group {
    position: relative;
}

.login-card .form-label {
    transition: color 0.2s ease;
}

.login-card .form-group:focus-within .form-label {
    color: var(--tan);
}

.login-card .form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-card .form-input:focus {
    border-color: var(--tan);
    box-shadow: 0 0 0 3px rgba(212, 199, 160, 0.1);
    background: rgba(11, 18, 32, 0.8);
}

/* Input icon support */
.login-input-group {
    position: relative;
}

.login-input-group .form-input {
    padding-left: 42px;
}

.login-input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    transition: color 0.2s ease;
    pointer-events: none;
}

.login-input-group:focus-within .input-icon {
    color: var(--tan);
}

/* Password toggle */
.login-input-group .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s ease;
}

.login-input-group .password-toggle:hover {
    color: var(--text);
}

/* Login button with subtle hover glow */
.login-card .btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-card .btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.login-card .btn-primary:hover::after {
    transform: translateX(100%);
}

.login-card .btn-primary:hover {
    box-shadow: 0 4px 20px rgba(212, 199, 160, 0.2);
    transform: translateY(-1px);
}

.login-card .btn-primary:active {
    transform: translateY(0);
}

/* Remember me checkbox */
.login-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.login-remember input[type="checkbox"]:checked {
    background: var(--tan);
    border-color: var(--tan);
}

.login-remember input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--bg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-remember a {
    color: var(--text-muted);
    font-size: 12.5px;
    transition: color 0.2s ease;
}

.login-remember a:hover {
    color: var(--tan);
}

/* Error state */
.login-card .alert {
    margin-bottom: 24px;
}

/* Footer text */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }

    .login-logo .logo-text {
        font-size: 26px;
        letter-spacing: 4px;
    }
}
