/* ============================================
   SKU Forge - Auth Pages Styles
   Login, Register, Verification Pages
   ============================================ */

/* Auth Page Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Side - Branding */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    background: var(--gradient-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-brand .logo {
    color: white;
    margin-bottom: auto;
}

.brand-content {
    margin: auto 0;
    max-width: 400px;
}

.brand-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
}

.brand-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.brand-feature svg {
    color: var(--success);
    flex-shrink: 0;
}

.brand-testimonial {
    margin-top: auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.brand-testimonial p {
    font-size: 15px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    line-height: 1.6;
}

.brand-testimonial .testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-testimonial .author-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.brand-testimonial .author-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.brand-testimonial .author-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Right Side - Form */
.auth-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-header a {
    color: var(--primary);
    font-weight: 500;
}

.auth-header a:hover {
    text-decoration: underline;
}

/* Form Progress */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-dot {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.progress-step span {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-step.active .step-dot {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

.progress-step.active span {
    color: var(--primary);
    font-weight: 500;
}

.progress-step.completed .step-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.progress-step.completed span {
    color: var(--success);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 8px 24px;
}

.progress-line.active {
    background: var(--primary);
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.required {
    color: var(--error);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group input.success {
    border-color: var(--success);
}

.form-group.has-error label {
    color: var(--error);
}

.error-message {
    display: block;
    font-size: 13px;
    color: var(--error);
    margin-top: 6px;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 12px;
}

.phone-input select {
    width: 120px;
    flex-shrink: 0;
}

.phone-input input {
    flex: 1;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--border);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.strength-fill[data-strength="1"] {
    width: 25%;
    background: var(--error);
}

.strength-fill[data-strength="2"] {
    width: 50%;
    background: var(--warning);
}

.strength-fill[data-strength="3"] {
    width: 75%;
    background: #84CC16;
}

.strength-fill[data-strength="4"] {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Checkbox */
.checkbox-group {
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
    margin-top: 2px;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label a {
    color: var(--primary);
}

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

/* Verification Step */
.verification-header {
    text-align: center;
    margin-bottom: 32px;
}

.verification-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: 50%;
    margin: 0 auto 20px;
    color: var(--primary);
}

.verification-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.verification-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.verification-header strong {
    color: var(--text-primary);
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.otp-input {
    width: 48px !important;
    height: 56px;
    text-align: center;
    font-size: 24px !important;
    font-weight: 600;
    font-family: var(--font-display);
    padding: 0 !important;
}

.otp-input:focus {
    border-color: var(--primary);
}

/* Resend Code */
.resend-code {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.btn-link:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-link:not(:disabled):hover {
    text-decoration: underline;
}

/* Buttons */
.auth-form .btn-primary,
.auth-form .btn-ghost {
    margin-top: 8px;
}

.auth-form .btn-ghost {
    margin-top: 12px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-social:hover {
    background: var(--bg-dark);
    border-color: var(--border);
}

.btn-social img {
    width: 20px;
    height: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast.active {
    display: flex;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.toast.success .toast-icon::after {
    content: '✓';
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.toast.error .toast-icon::after {
    content: '✕';
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

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

/* ============================================
   Login Page Specific
   ============================================ */
.login-form .form-group {
    margin-bottom: 24px;
}

.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.remember-forgot .checkbox-label {
    font-size: 14px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ============================================
   Pending Approval Page
   ============================================ */
.pending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.pending-card {
    max-width: 480px;
    text-align: center;
    padding: 48px 40px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.pending-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: 50%;
    margin: 0 auto 24px;
    font-size: 40px;
}

.pending-card h1 {
    font-size: 28px;
    margin-bottom: 16px;
}

.pending-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.pending-steps {
    text-align: left;
    padding: 24px;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.pending-steps h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pending-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.pending-step:last-child {
    border-bottom: none;
}

.step-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    border-radius: 50%;
    color: white;
    font-size: 12px;
}

.step-check.pending {
    background: var(--border);
    color: var(--text-muted);
}

.pending-step span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .auth-brand {
        display: none;
    }
    
    .auth-form-container {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .auth-form-wrapper {
        padding: 0;
    }
    
    .form-progress {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .progress-line {
        width: 30px;
        margin: 0 4px 24px;
    }
    
    .progress-step span {
        font-size: 11px;
    }
    
    .otp-inputs {
        gap: 8px;
    }
    
    .otp-input {
        width: 42px !important;
        height: 48px;
        font-size: 20px !important;
    }
    
    .phone-input {
        flex-direction: column;
    }
    
    .phone-input select {
        width: 100%;
    }
}
