/* Modern Auth Pages - Professional UI Theme */

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: pulse 8s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Auth Box */
.auth-box {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.auth-header p {
    color: #9ca3af;
    font-size: 15px;
    font-weight: 400;
    margin-top: 8px;
}

/* Form */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(31, 31, 31, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder {
    color: #6b7280;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(31, 31, 31, 1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.eye-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.eye-icon svg {
    display: block;
}

.password-toggle:hover .eye-icon {
    opacity: 1;
}

/* Password Strength */
.password-strength {
    margin-top: 12px;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: #ef4444;
}

.strength-fill.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-fill.strong {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 12px;
    color: #9ca3af;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.checkbox-text {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #60a5fa;
}

/* Buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-loading {
    position: relative;
}

.btn-loading .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.btn-loading.loading .btn-loader {
    display: block;
}

.btn-loading.loading .btn-text {
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-message {
    display: block;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
    display: none;
}

/* Footer */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

.auth-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Auth Info */
.auth-info {
    display: none;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 16px;
    margin-bottom: 24px;
}

.form-col {
    margin-bottom: 0;
}

/* Password Requirements */
.password-requirements {
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.password-requirements li {
    color: #6b7280;
    font-size: 11px;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-left: 18px;
}

.password-requirements li::before {
    content: '';
    position: absolute;
    left: 0;
    width: 12px;
    height: 12px;
    border: 2px solid #4b5563;
    border-radius: 50%;
    background: transparent;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid::before {
    border-color: #10b981;
    background: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 8px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Auth Avatar */
.auth-avatar {
    text-align: center;
    margin-bottom: 24px;
}

.auth-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Responsive Design */
@media (max-width: 640px) {
    .auth-box {
        padding: 36px 24px;
        border-radius: 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .logo-icon {
        font-size: 48px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 14px;
        font-size: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .password-requirements {
        padding: 12px 16px;
    }
    
    .password-requirements li {
        font-size: 12px;
        padding: 4px 0;
        padding-left: 20px;
    }
    
    .password-requirements li::before {
        width: 14px;
        height: 14px;
    }
    
    .auth-avatar img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 16px;
    }
    
    .auth-box {
        padding: 28px 20px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
}

/* Loading State */
.form-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
