/* ===================================
   NexMart - Authentication Pages CSS
   Login, Register, Admin Login
   =================================== */

/* ===================================
   1. AUTH BASE
   =================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1%, transparent 1%);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ===================================
   2. AUTH CONTAINER
   =================================== */
.auth-container {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   3. AUTH HEADER
   =================================== */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.auth-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* ===================================
   4. AUTH FORM
   =================================== */
.auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #bbb;
}

/* ===================================
   5. PASSWORD TOGGLE
   =================================== */
.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* ===================================
   6. REMEMBER & FORGOT
   =================================== */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* ===================================
   7. SUBMIT BUTTON
   =================================== */
.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn i {
    font-size: 18px;
}

/* ===================================
   8. DIVIDER
   =================================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    color: #999;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* ===================================
   9. SOCIAL LOGIN
   =================================== */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
}

.social-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.social-btn i {
    font-size: 20px;
}

.social-btn.google { color: #DB4437; }
.social-btn.facebook { color: #4267B2; }

/* ===================================
   10. AUTH FOOTER
   =================================== */
.auth-footer {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* ===================================
   11. BACK TO HOME
   =================================== */
.back-to-home {
    text-align: center;
    margin-top: 25px;
}

.back-to-home a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-to-home a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ===================================
   12. ALERT MESSAGES
   =================================== */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: none;
    animation: slideDown 0.3s ease;
}

.alert.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===================================
   13. ADMIN LOGIN SPECIFIC
   =================================== */
.admin-login-container {
    max-width: 450px;
}

.admin-login-header i {
    font-size: 70px;
    color: #667eea;
    margin-bottom: 20px;
}

.admin-credentials {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-family: monospace;
    text-align: center;
}

.admin-credentials p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.admin-credentials strong {
    color: #667eea;
}

/* ===================================
   14. REGISTER PAGE SPECIFIC
   =================================== */
.register-container {
    max-width: 550px;
}

.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
}

.terms-checkbox input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.terms-checkbox a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* ===================================
   15. LOADING STATE
   =================================== */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   16. PASSWORD STRENGTH
   =================================== */
.password-strength {
    margin-top: 10px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #e74c3c;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f39c12;
}

.password-strength-bar.strong {
    width: 100%;
    background: #2ecc71;
}

.password-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* ===================================
   17. RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .auth-container {
        padding: 35px 25px;
        max-width: 100%;
    }
    
    .auth-header h1 {
        font-size: 26px;
    }
    
    .auth-logo {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .name-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 15px;
    }
    
    .auth-container {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===================================
   18. ANIMATION UTILITIES
   =================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ===================================
   19. FOCUS STATES
   =================================== */
.form-group input:focus ~ .input-group i {
    color: #667eea;
}

/* ===================================
   20. ERROR STATES
   =================================== */
.form-group.error input {
    border-color: #e74c3c;
}

.form-group.error .error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.error-message {
    display: none;
}

/* ===================================
   21. SUCCESS STATES
   =================================== */
.form-group.success input {
    border-color: #2ecc71;
}

.form-group.success .success-icon {
    display: block;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #2ecc71;
}

.success-icon {
    display: none;
}
