/**
 * SATA Login Page Styles
 * Optimized and extracted for caching
 */

/* ============================================
   LOGIN PAGE BASE STYLES
   ============================================ */
body.login-page {
    background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   LOGIN CONTAINER & CARD
   ============================================ */
.login-container {
    max-width: 480px;
    border-radius: 1.5rem;
    position: relative;
    z-index: 1;
    /* Animation applied after CSS loads to not delay LCP */
}

/* Animation class added via JS after page load */
.login-container.animated {
    animation: fadeInUp 0.4s ease-out;
}

.login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ============================================
   BRANDING
   ============================================ */
#brand {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1d4ed8;
    letter-spacing: 0.02em;
    margin: 0;
}

.subtitle {
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-control-modern {
    border: 1px solid #e5e7eb;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label-modern {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.input-group-text {
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.input-group-text:hover {
    background: #f9fafb;
    color: #667eea;
}

/* Hide browser's built-in password toggle */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
}

/* ============================================
   LOGIN BUTTON
   ============================================ */
.btn-login {
    background: #2563eb;
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.btn-login:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 6px rgba(29, 78, 216, 0.4);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* ============================================
   ALERTS
   ============================================ */
.login-container .alert {
    border: none;
    border-radius: 0.75rem;
    animation: slideInDown 0.4s ease-out;
}

/* ============================================
   COPYRIGHT
   ============================================ */
.copyright {
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 2rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .login-container {
        margin: 1rem;
    }

    .login-card {
        padding: 2rem !important;
    }

    #brand {
        font-size: 2.5rem;
    }
}

/* Legacy login styles */
.brand-logo-legacy {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    font-weight: 700;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    margin: 0 auto 1.5rem;
}

.login-card-legacy {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
