/* auth.css - Authentication Pages Styles */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */

#login, #register, #reset-password {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--fa-gradient-surface);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
#login::before, #register::before, #reset-password::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(40,54,85,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

/* ============================================
   AUTH CONTAINER
   ============================================ */

.auth-container {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 2;
    border: 2px solid #DFA774;
}

.auth-header {
    background: #0056b3;
    padding: 22px 24px 23px;
    text-align: center;
    color: #FFFFFF;
}

.auth-logo {
    font-size: 2rem;
    margin-bottom: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
    color: #93c572;
}

.auth-subtitle {
    opacity: 1;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    margin: 0;
    color: #FFFFFF;
}

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

.auth-form {
    padding: 24px;
}

.auth-form-group {
    margin-bottom: 25px;
    position: relative;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
    font-size: 0.95rem;
}

.auth-form-group .required {
    color: #f44336;
    margin-left: 3px;
}

.auth-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #DFA774;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FFFFFF;
    color: #283655;
    position: relative;
}

.auth-input::placeholder {
    color: #999;
}

.auth-input:focus {
    outline: none;
    border-color: #0056b3;
    background: #FFFFFF;
    color: #283655;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
    transform: translateY(-1px);
}

.auth-input:focus::placeholder {
    color: #999;
}

.auth-input:valid {
    border-color: #DFA774;
}

.auth-input:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

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

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #DFA774;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.input-with-icon .auth-input {
    padding-left: 45px;
}

.input-with-icon .auth-input:focus + i {
    color: var(--fa-primary);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: #e9ecef;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-bar.weak { background: #f44336; }
.strength-bar.medium { background: #ff9800; }
.strength-bar.strong { background: var(--fa-success); }

.strength-text {
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
}

.strength-text.weak { color: #f44336; }
.strength-text.medium { color: #ff9800; }
.strength-text.strong { color: var(--fa-success); }

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

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.auth-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: #93c572;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(147, 197, 114, 0.3);
}

.auth-btn-primary:hover {
    background: #7fb85e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 197, 114, 0.4);
}

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

.auth-btn-secondary {
    background: white;
    color: var(--fa-primary);
    border: 2px solid var(--fa-primary);
}

.auth-btn-secondary:hover {
    background: var(--fa-primary);
    color: white;
}

/* Button Loading State */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   FORM LINKS & EXTRAS
   ============================================ */

.auth-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-link {
    color: var(--fa-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--fa-accent-hover);
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 10px;
}

.forgot-password a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--fa-accent);
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #DFA774;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background: #0056b3;
    border-color: #0056b3;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.checkbox-label a {
    color: var(--fa-accent);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ============================================
   ERROR & SUCCESS MESSAGES
   ============================================ */

.auth-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.auth-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.auth-message.warning {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

.auth-message i {
    font-size: 1.1rem;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.social-login {
    margin: 25px 0;
}

.social-divider {
    text-align: center;
    position: relative;
    margin: 25px 0;
    color: #666;
    font-size: 0.9rem;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.social-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #ddd;
    background: #f8f9fa;
    transform: translateY(-1px);
    text-decoration: none;
    color: #333;
}

.social-btn i {
    font-size: 1.2rem;
}

.social-btn.google i { color: #db4437; }
.social-btn.facebook i { color: #4267b2; }
.social-btn.apple i { color: #000; }

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

@media (max-width: 768px) {
    #login, #register, #reset-password {
        padding: 16px 12px;
    }

    .auth-container {
        max-width: 100%;
        border-radius: 8px;
    }

    .auth-header {
        padding: 10px 16px 8px;
    }

    .auth-logo {
        font-size: 1.8rem;
    }

    .auth-title {
        font-size: 1.2rem;
    }

    .auth-form {
        padding: 20px 16px;
    }
    
    .auth-input {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .input-with-icon .auth-input {
        padding-left: 40px;
    }
    
    .input-with-icon i {
        left: 12px;
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 10px 15px 8px;
    }
    
    .auth-form {
        padding: 25px 15px;
    }
    
    .auth-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .social-buttons {
        gap: 8px;
    }
    
    .social-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form Animation */
.auth-form-group {
    animation: slideUp 0.6s ease-out;
    animation-fill-mode: both;
}

.auth-form-group:nth-child(1) { animation-delay: 0.1s; }
.auth-form-group:nth-child(2) { animation-delay: 0.2s; }
.auth-form-group:nth-child(3) { animation-delay: 0.3s; }
.auth-form-group:nth-child(4) { animation-delay: 0.4s; }

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