/* ==================== LOGIN PAGE ==================== */

main {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

footer {
    margin-top: 0 !important;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: var(--s4);
    padding-bottom: 0;
}

.login-card {
    background: #ffffff;
    padding: clamp(30px, 5vw, 40px);
    border-radius: var(--r-xl);
    box-shadow: 0 20px 40px rgba(8, 20, 32, 0.08);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.login-card-header {
    text-align: center;
    margin-bottom: var(--s5);
}

.login-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--r-md);
    background: rgba(31, 74, 115, 0.08);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s3);
}

.login-icon .material-symbols-outlined {
    font-size: 32px;
}

.login-card h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== FORM ==================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--s4);
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.login-form .form-group label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.88rem;
}

/* ==================== INPUTS ==================== */

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
}

.login-form input[type="password"],
.login-form input[type="text"] {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    background: #f8fafc;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-form input[type="password"]:focus,
.login-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(31, 74, 115, 0.1);
}

.input-with-icon .admin-input-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-with-icon .admin-input-toggle:hover {
    color: var(--primary);
    background: rgba(31, 74, 115, 0.05);
}

.input-with-icon .admin-input-toggle .material-symbols-outlined {
    font-size: 18px;
}

/* ==================== SUBMIT BUTTON & FOOTER ==================== */

.login-btn-main {
    width: 100%;
    padding: 12px;
    margin-top: var(--s2);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer {
    text-align: center;
    margin-top: var(--s4);
}

.forgot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link .material-symbols-outlined {
    font-size: 16px;
}

.forgot-link:hover {
    color: var(--primary);
}

/* ==================== INLINE ALERTS ==================== */

.mb-4 {
    margin-bottom: var(--s4);
}

/* ==================== ERROR MODAL ==================== */
/* Scoped to login page — admin.css has its own modal styles */

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 20, 32, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: var(--space-4);
}

.login-modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, var(--bg-alt) 100%);
    border-radius: var(--radius-md);
    max-width: 340px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(8, 20, 32, 0.3);
    animation: loginModalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes loginModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.login-modal-header h3 {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f7f1e8;
    letter-spacing: 0.3px;
}

.login-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #f7f1e8;
    font-size: 1.2rem;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.login-modal-body {
    padding: var(--space-5);
    text-align: center;
}

.login-modal-body p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-modal-footer {
    padding: var(--space-3) var(--space-4) var(--space-4);
    display: flex;
    justify-content: center;
}

.login-modal-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.login-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 47, 75, 0.3);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .login-card {
        padding: var(--space-5);
    }

    .login-card h2 {
        font-size: 1.3rem;
    }

    .login-modal-content {
        max-width: 300px;
    }

    .login-modal-header {
        padding: var(--space-3);
    }

    .login-modal-body {
        padding: var(--space-4);
    }
}
