/* ===================================
   RECRUITMENT FORM - SHARED STYLES (MODERN GLASS)
   Part 1: Variables, Base, Progress, Steps, Sections
   Version: 3.0 (Light/Dark Mode Ready)
   =================================== */

/* ===================================
   CSS VARIABLES (LIGHT MODE - DEFAULT)
   =================================== */
:root {
    /* Colors - Light Mode */
    --primary-dark: #1e293b;
    --primary-blue: #1e293b;
    --secondary-blue: #334155;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --text-light: #475569;
    --text-muted: #64748b;
    
    /* Brand Colors */
    --doj-color: #3b82f6;
    --doj-light: #60a5fa;
    --lawyer-color: #a855f7;
    --lawyer-light: #c084fc;
    --accent-gold: #f5b042;
    --accent-gold-light: #ffd966;
    
    /* Status Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Glass Effects (Light) */
    --bg-glass: rgba(255, 255, 255, 0.65);
    --border-glass: rgba(255, 255, 255, 0.5);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.05);
    --card-bg: rgba(255, 255, 255, 0.45);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
}

/* ===================================
   DARK MODE VARIABLES (با کلاس روی body)
   =================================== */
body.dark-mode {
    --primary-dark: #e2e8f0;
    --primary-blue: #e2e8f0;
    --secondary-blue: #94a3b8;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    
    --bg-glass: rgba(15, 20, 35, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-bg: rgba(20, 25, 45, 0.55);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.6);
}

/* ===================================
   RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
    background: linear-gradient(145deg, #fef9f0 0%, #eef2ff 100%);
    color: var(--primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.2s ease;
}

body.dark-mode {
    background: linear-gradient(145deg, #0f1222 0%, #1a1f2e 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ===================================
   FORM PROGRESS WRAPPER
   =================================== */
.form-progress-wrapper {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-normal);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

body.dark-mode .progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ===================================
   FORM STEPS
   =================================== */
.form-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    flex-wrap: wrap;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

body.dark-mode .form-steps::before {
    background: rgba(255, 255, 255, 0.1);
}

.step {
    flex: 1;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all var(--transition-fast);
}

.step-circle {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 2px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border-color: transparent;
    color: #1e293b;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 176, 66, 0.3);
}

.step.completed .step-circle {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    color: var(--success);
}

.step.completed .step-circle i {
    font-size: 1.2rem;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary-dark);
}

body.dark-mode .step.active .step-label,
body.dark-mode .step.completed .step-label {
    color: #e2e8f0;
}

/* ===================================
   FORM SECTIONS & STEPS CONTAINER
   =================================== */
.form-step {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-normal);
}

.form-section:hover {
    border-color: rgba(245, 176, 66, 0.4);
    box-shadow: var(--shadow-md);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(245, 176, 66, 0.3);
    flex-wrap: wrap;
}

.form-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1e293b;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 176, 66, 0.2);
}

.section-info h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===================================
   RESPONSIVE (Part 1 base)
   =================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .form-progress-wrapper {
        padding: 1rem;
    }
    .form-section {
        padding: 1.5rem;
    }
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .form-steps::before {
        top: 20px;
    }
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    .form-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .form-steps {
        gap: 0.25rem;
    }
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    .step-label {
        font-size: 0.65rem;
    }
}

/* ===================================
   PART 2: FORM CONTROLS, CHECKBOX/RADIO, FILE UPLOAD, RANGE SLIDER, STAR RATING
   =================================== */

/* ===================================
   FORM ROWS & GROUPS
   =================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.required {
    color: var(--error);
    font-size: 1.1rem;
    margin-right: 0.25rem;
}

/* ===================================
   FORM CONTROLS (INPUT, TEXTAREA, SELECT)
   =================================== */
.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all var(--transition-normal);
}

body.dark-mode .form-control {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(245, 176, 66, 0.2);
    background: white;
}

body.dark-mode .form-control:focus {
    background: rgba(0, 0, 0, 0.5);
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 0.8;
}

body.dark-mode .form-control::placeholder {
    color: #64748b;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
    cursor: pointer;
}

body.dark-mode select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Validation States */
.form-control.is-valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.form-control.is-invalid {
    border-color: var(--error);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.error-message {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--error);
    align-items: center;
    gap: 0.5rem;
}

.form-control.is-invalid ~ .error-message {
    display: flex;
}

.success-message {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--success);
    align-items: center;
    gap: 0.5rem;
}

.form-control.is-valid ~ .success-message {
    display: flex;
}

/* ===================================
   CHECKBOX & RADIO (سفارشی)
   =================================== */
.checkbox-grid,
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.checkbox-item,
.radio-item {
    position: relative;
}

.checkbox-item input,
.radio-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-item label,
.radio-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    color: var(--primary-dark);
}

body.dark-mode .checkbox-item label,
body.dark-mode .radio-item label {
    border-color: rgba(255, 255, 255, 0.1);
}

.checkbox-item label:hover,
.radio-item label:hover {
    border-color: var(--accent-gold);
    background: rgba(245, 176, 66, 0.05);
    transform: translateY(-1px);
}

.checkbox-item input:checked ~ label,
.radio-item input:checked ~ label {
    background: rgba(245, 176, 66, 0.1);
    border-color: var(--accent-gold);
    border-width: 2px;
}

.checkmark,
.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    background: white;
}

body.dark-mode .checkmark,
body.dark-mode .radiomark {
    border-color: #475569;
    background: rgba(0, 0, 0, 0.3);
}

.radiomark {
    border-radius: 50%;
}

.checkmark i,
.radiomark i {
    color: #1e293b;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

body.dark-mode .checkmark i,
body.dark-mode .radiomark i {
    color: white;
}

.checkbox-item input:checked ~ label .checkmark,
.radio-item input:checked ~ label .radiomark {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.checkbox-item input:checked ~ label .checkmark i,
.radio-item input:checked ~ label .radiomark i {
    opacity: 1;
    transform: scale(1);
}

/* ===================================
   FILE UPLOAD AREA
   =================================== */
.file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--card-bg);
}

body.dark-mode .file-upload-area {
    border-color: rgba(255, 255, 255, 0.2);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--accent-gold);
    background: rgba(245, 176, 66, 0.05);
    transform: scale(1.01);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File Preview */
.file-preview {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.file-preview.active {
    display: flex;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--success);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-file {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--error);
    cursor: pointer;
    transition: all 0.2s;
}

.remove-file:hover {
    background: var(--error);
    color: white;
}

/* ===================================
   RANGE SLIDER
   =================================== */
.range-slider {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.range-slider input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    outline: none;
}

body.dark-mode .range-slider input[type="range"] {
    background: #334155;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 176, 66, 0.4);
    transition: transform 0.2s;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-value {
    background: rgba(245, 176, 66, 0.15);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

/* ===================================
   STAR RATING
   =================================== */
.stars {
    display: flex;
    gap: 0.5rem;
    direction: ltr;
}

.stars i {
    font-size: 1.8rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

body.dark-mode .stars i {
    color: #475569;
}

.stars i:hover,
.stars i.active {
    color: var(--accent-gold);
    transform: scale(1.1);
    text-shadow: 0 0 8px rgba(245, 176, 66, 0.5);
}

/* ===================================
   INFO BOXES
   =================================== */
.info-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--info);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--warning);
}

.info-box.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--success);
}

.info-box.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--error);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--info);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-box.warning .info-icon {
    background: var(--warning);
}

.info-box.success .info-icon {
    background: var(--success);
}

.info-box.error .info-icon {
    background: var(--error);
}

.info-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.info-box p,
.info-box ul {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-box ul {
    padding-right: 1.5rem;
    margin: 0.5rem 0 0;
}

/* ===================================
   RESPONSIVE FOR PART 2
   =================================== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .checkbox-grid,
    .radio-grid {
        grid-template-columns: 1fr;
    }
    .range-slider {
        flex-direction: column;
        align-items: stretch;
    }
    .range-value {
        text-align: center;
    }
    .stars i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .file-upload-area {
        padding: 1.5rem;
    }
    .upload-icon {
        font-size: 2rem;
    }
    .info-box {
        padding: 1rem;
    }
}

/* ===================================
   PART 3: NAVIGATION BUTTONS, TOAST, PRINT, RESPONSIVE FINAL, LIGHT MODE FIXES
   =================================== */

/* ===================================
   FORM NAVIGATION BUTTONS
   =================================== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .form-navigation {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    background: transparent;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(245, 176, 66, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 176, 66, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--primary-dark);
}

body.dark-mode .btn-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

body.dark-mode .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn i {
    font-size: 1rem;
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #1e293b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .spinner {
    display: inline-block;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading i {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
#toastContainer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.2rem;
    border-right: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-dark);
    min-width: 280px;
    max-width: 400px;
}

.toast.success {
    border-right-color: var(--success);
}
.toast.error {
    border-right-color: var(--error);
}
.toast.warning {
    border-right-color: var(--warning);
}
.toast.info {
    border-right-color: var(--info);
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}
.toast.success .toast-icon { background: var(--success); }
.toast.error .toast-icon { background: var(--error); }
.toast.warning .toast-icon { background: var(--warning); }
.toast.info .toast-icon { background: var(--info); }

.toast-content {
    flex: 1;
}
.toast-message {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
}
.toast-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: inherit;
}
.toast-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   PRINT STYLES (چاپ فرم)
   =================================== */
@media print {
    .animated-bg,
    .navbar,
    .back-to-top,
    .form-progress-wrapper,
    .form-navigation,
    .btn,
    .file-upload-area,
    .toast,
    #toastContainer,
    .info-box,
    .stars,
    .range-slider .range-value,
    .remove-file {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        padding: 0;
        margin: 0;
    }

    .form-step {
        display: block !important;
        page-break-inside: avoid;
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .form-section {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        padding: 1rem;
    }

    .form-control, textarea, select {
        border: 1px solid #000;
        background: transparent;
        color: black;
    }

    .section-header {
        border-bottom-color: #000;
    }

    .checkbox-item label, .radio-item label {
        border: 1px solid #000;
        background: transparent;
    }

    .checkmark, .radiomark {
        border-color: #000;
        background: white;
    }
}

/* ===================================
   FINAL RESPONSIVE ENHANCEMENTS
   =================================== */
@media (max-width: 768px) {
    .form-navigation {
        flex-direction: column;
        gap: 0.8rem;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    #toastContainer {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    .toast {
        min-width: auto;
        width: calc(100% - 2rem);
        max-width: none;
    }
    .toast-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    .toast-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .form-navigation {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===================================
   LIGHT MODE CONTRAST FIXES (تم سفید خوانا)
   =================================== */
/* این قوانین فقط در لایت مود اعمال می‌شوند و در دارک مود override نمی‌شوند */
:root {
    --light-bg-input: #ffffff;
    --light-border-input: #cbd5e1;
    --light-text-input: #1e293b;
}

.form-control {
    background: var(--light-bg-input);
    border-color: var(--light-border-input);
    color: var(--light-text-input);
}

.form-control:focus {
    background: #ffffff;
}

.checkbox-item label,
.radio-item label {
    background: #ffffff;
    border-color: #e2e8f0;
}

.checkbox-item input:checked ~ label,
.radio-item input:checked ~ label {
    background: rgba(245, 176, 66, 0.15);
}

.file-upload-area {
    background: #ffffff;
}

.range-value {
    background: rgba(245, 176, 66, 0.15);
    color: #d97706;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: #1e293b;
    border-right-width: 4px;
}

body.dark-mode .toast {
    background: rgba(15, 20, 35, 0.95);
    color: #e2e8f0;
}

/* اسکرول بار سفارشی برای کل صفحه */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}
body.dark-mode ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}