/* ===================================
   DOJ RECRUITMENT - MODERN GLASS STYLES
   Part 1: Variables, Progress, Form Base, Inputs, Buttons
   =================================== */

/* Import shared form styles (دست نخورده) */
@import url('recruitment-form.css');

/* ===================================
   ROOT VARIABLES - LIGHT MODE (پیش‌فرض)
   =================================== */
:root {
    --doj-primary: #3b82f6;
    --doj-light: #60a5fa;
    --doj-dark: #2563eb;
    --doj-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);
    --doj-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
    --doj-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* شیشه‌ای روشن */
    --bg-glass-doj: rgba(255, 255, 255, 0.65);
    --border-glass-doj: rgba(255, 255, 255, 0.5);
    --shadow-glass-doj: 0 8px 32px rgba(0, 0, 0, 0.05);
    --card-bg-doj: rgba(255, 255, 255, 0.45);
    
    /* رنگ‌های عمومی (هماهنگ با صفحه اصلی) */
    --primary-dark: #1e293b;
    --text-muted: #475569;
    --text-light: #64748b;
    --white: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* فاصله‌ها و اندازه‌ها */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition-normal: 0.3s ease;
}

/* ===================================
   DARK MODE - با کلاس روی body
   =================================== */
body.dark-mode {
    --doj-primary: #60a5fa;
    --doj-light: #93c5fd;
    --doj-dark: #3b82f6;
    --doj-gradient: linear-gradient(135deg, #2563eb, #60a5fa);
    --doj-shadow: 0 8px 24px rgba(96, 165, 250, 0.2);
    --doj-glow: 0 0 20px rgba(96, 165, 250, 0.2);
    
    --bg-glass-doj: rgba(15, 20, 35, 0.7);
    --border-glass-doj: rgba(255, 255, 255, 0.08);
    --shadow-glass-doj: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-bg-doj: rgba(20, 25, 45, 0.55);
    
    --primary-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
}

/* ===================================
   RESET & BASE (ریسپانسیو)
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
    background: var(--grad-bg, linear-gradient(145deg, #fef9f0 0%, #eef2ff 100%));
    color: var(--primary-dark);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.2s ease;
}

body.dark-mode {
    background: linear-gradient(145deg, #0f1222 0%, #1a1f2e 100%);
}

/* ===================================
   FORM PROGRESS WRAPPER
   =================================== */
.form-progress-wrapper {
    background: var(--bg-glass-doj);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-glass-doj);
    box-shadow: var(--shadow-glass-doj);
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--doj-primary);
}

.progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    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: var(--doj-gradient);
    border-radius: 10px;
    transition: width 0.4s ease;
    box-shadow: var(--doj-shadow);
}

.form-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    text-align: center;
    min-width: 60px;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 700;
    transition: all var(--transition-normal);
    color: var(--text-muted);
}

body.dark-mode .step-circle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.step.active .step-circle {
    background: var(--doj-gradient);
    border-color: var(--doj-primary);
    box-shadow: var(--doj-shadow);
    color: white;
    animation: dojPulse 2s infinite;
}

.step.completed .step-circle {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--doj-primary);
    color: var(--doj-primary);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

body.dark-mode .step-label {
    color: #94a3b8;
}

/* ===================================
   FORM STEPS (هر مرحله به صورت کارت)
   =================================== */
.form-step {
    display: none;
    background: var(--bg-glass-doj);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-glass-doj);
    box-shadow: var(--shadow-glass-doj);
    animation: fadeInStep 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   SECTION HEADER & ICON
   =================================== */
.form-section {
    width: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    flex-wrap: wrap;
}

.form-icon {
    width: 55px;
    height: 55px;
    background: var(--doj-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    box-shadow: var(--doj-shadow);
}

.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;
}

/* ===================================
   FORM GROUPS & INPUTS
   =================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

.required {
    color: var(--error);
    margin-right: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-normal);
    color: var(--primary-dark);
}

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(--doj-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    background: transparent;
}

.btn-primary {
    background: var(--doj-gradient);
    color: white;
    box-shadow: var(--doj-shadow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--doj-primary);
    color: var(--doj-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .form-navigation {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* دکمه تم (Theme Toggle) */
.btn-theme {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--primary-dark);
}

.btn-theme i {
    transition: transform 0.3s ease;
}

.btn-theme:hover i {
    transform: rotate(15deg);
}

body.dark-mode .btn-theme {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

/* ===================================
   INFO BOXES
   =================================== */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--doj-primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--doj-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.info-box.warning .info-icon {
    background: var(--warning);
}

.info-box-header h4 {
    font-weight: 700;
    color: var(--primary-dark);
}

.info-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===================================
   TOAST (پیام‌ها)
   =================================== */
#toastContainer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toast {
    background: var(--bg-glass-doj);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    border-right: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-glass-doj);
    animation: toastSlide 0.3s ease;
    color: var(--primary-dark);
}

.toast.doj {
    border-right-color: var(--doj-primary);
}

.toast-success { border-right-color: var(--success); }
.toast-error { border-right-color: var(--error); }
.toast-warning { border-right-color: var(--warning); }

@keyframes toastSlide {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   BACK TO TOP
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 45px;
    height: 45px;
    background: var(--doj-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--doj-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

/* ===================================
   RESPONSIVE BASE
   =================================== */
@media (max-width: 768px) {
    .form-step {
        padding: 1.5rem;
    }
    .form-steps {
        justify-content: center;
    }
    .step {
        min-width: 50px;
    }
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .step-label {
        font-size: 0.7rem;
    }
    .form-navigation {
        flex-direction: column;
    }
    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }
    #toastContainer {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    .toast {
        width: calc(100% - 2rem);
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes dojPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

/* ===================================
   UTILITIES
   =================================== */
.error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===================================
   PART 2: GOVERNMENT EXPERIENCE, KNOWLEDGE, FILE UPLOAD, RANGE SLIDER
   =================================== */

/* ---------- Experience Grid (Checkboxes) ---------- */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.experience-item {
    position: relative;
}

.experience-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.experience-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--card-bg-doj);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    color: var(--primary-dark);
}

.experience-item label:hover {
    border-color: var(--doj-primary);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.experience-item input:checked ~ label {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--doj-primary);
    box-shadow: var(--doj-shadow);
}

/* رفع مشکل هاله زرد هنگام کلیک */
.experience-item input:focus ~ label {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.experience-badge {
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--doj-primary);
    transition: all var(--transition-normal);
}

.experience-item input:checked ~ label .experience-badge {
    background: var(--doj-primary);
    color: white;
}

/* ---------- Radio Grid (جنسیت، سوالات بله/خیر) ---------- */
.radio-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-item {
    position: relative;
}

.radio-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--card-bg-doj);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--primary-dark);
    font-weight: 500;
}

body.dark-mode .radio-item label {
    border-color: rgba(255, 255, 255, 0.1);
}

.radio-item label:hover {
    border-color: var(--doj-primary);
    background: rgba(59, 130, 246, 0.05);
}

.radio-item input:checked ~ label {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--doj-primary);
    color: var(--doj-primary);
}

.radiomark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.radio-item input:checked ~ label .radiomark {
    background: var(--doj-primary);
    color: white;
}

.radiomark i {
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.radio-item input:checked ~ label .radiomark i {
    opacity: 1;
}

/* ---------- Knowledge Section (سوالات دانش قضایی) ---------- */
.knowledge-section {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.knowledge-section h3 {
    color: var(--doj-primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
}

.knowledge-question {
    background: var(--card-bg-doj);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
}

.knowledge-question:last-child {
    margin-bottom: 0;
}

.knowledge-question p {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.knowledge-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.knowledge-options .radio-item {
    flex: 1;
    min-width: 100px;
}

.knowledge-options .radio-item label {
    justify-content: center;
    text-align: center;
}

/* هشدار دانش (knowledge-warning) */
.knowledge-warning {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-right: 3px solid var(--warning);
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- File Upload Area ---------- */
.file-upload-area {
    position: relative;
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--card-bg-doj);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--doj-primary);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-area input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--doj-primary);
    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 {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    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 {
    font-size: 1.5rem;
    color: var(--doj-primary);
}

.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.1);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    color: var(--error);
    cursor: pointer;
    font-size: 0.8rem;
    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: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    outline: none;
}

body.dark-mode .range-slider input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--doj-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--doj-shadow);
    transition: transform 0.2s;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--doj-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--doj-shadow);
}

.range-value {
    background: rgba(59, 130, 246, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: var(--doj-primary);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

/* ---------- متن کمکی و خطاها ---------- */
small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ---------- ریسپانسیو برای پارت ۲ ---------- */
@media (max-width: 768px) {
    .experience-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-options {
        flex-direction: column;
    }
    .knowledge-options .radio-item {
        width: 100%;
    }
    .range-slider {
        flex-direction: column;
        align-items: stretch;
    }
    .range-value {
        text-align: center;
    }
    .file-preview {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .file-info {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .knowledge-section {
        padding: 1rem;
    }
    .knowledge-question {
        padding: 0.8rem;
    }
}
/* ===================================
   PART 3: GOV REQUIREMENT, MODAL, ANIMATIONS, PRINT, ACCESSIBILITY
   =================================== */

/* ---------- Government Requirement Box (شرایط دادگستری) ---------- */
.gov-requirement {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border: 2px solid var(--doj-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all var(--transition-normal);
}

.gov-requirement h4 {
    color: var(--doj-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.gov-requirement ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.gov-requirement li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--primary-dark);
}

body.dark-mode .gov-requirement li {
    background: rgba(0, 0, 0, 0.2);
}

.gov-requirement li i {
    color: var(--doj-primary);
    font-size: 0.9rem;
}

/* ---------- Judicial Standards Section (استانداردهای قضایی) ---------- */
.judicial-standards {
    background: var(--card-bg-doj);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.standard-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .standard-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.standard-item:last-child {
    border-bottom: none;
}

.standard-icon {
    width: 40px;
    height: 40px;
    background: var(--doj-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.standard-content h5 {
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.standard-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ---------- Confirmation Modal (مربوط به showConfirmationModal) ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: var(--bg-glass-doj);
    backdrop-filter: blur(24px);
    border: 2px solid var(--doj-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    color: var(--primary-dark);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* اسکرول داخل مودال (رفع مشکل گوشه‌های گرد) */
.modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content .modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
}

.modal-content .modal-body-scroll::-webkit-scrollbar {
    width: 5px;
}

.modal-content .modal-body-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.modal-content .modal-body-scroll::-webkit-scrollbar-thumb {
    background: var(--doj-primary);
    border-radius: 10px;
}

/* ---------- Loading State for Button ---------- */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Progress Fill Animation (Shimmer) ---------- */
@keyframes dojShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.progress-bar-fill {
    background-size: 200% 100%;
    animation: dojShimmer 2s linear infinite;
}

/* ---------- Character Counter (Scenario) ---------- */
.char-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
}

body.dark-mode .char-counter {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.char-count {
    color: var(--text-muted);
}

.char-count.valid {
    color: var(--success);
}

.char-count.invalid {
    color: var(--error);
}

.min-chars-label {
    color: var(--text-muted);
}

/* ---------- Responsive Complete ---------- */
@media (max-width: 768px) {
    .gov-requirement ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    .judicial-standards {
        padding: 1rem;
    }
    .standard-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .gov-requirement {
        padding: 1rem;
    }
    .gov-requirement h4 {
        font-size: 1rem;
    }
    .modal-content .modal-body-scroll {
        padding-right: 0;
    }
}

/* ---------- Print Styles (چاپ فرم) ---------- */
@media print {
    .animated-bg,
    .navbar,
    .back-to-top,
    .form-progress-wrapper,
    .form-navigation,
    .btn,
    .file-upload-area,
    .modal-overlay,
    .toast,
    #toastContainer,
    .gov-requirement,
    .judicial-standards {
        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-control, textarea {
        border: 1px solid #000;
        background: transparent;
        color: black;
    }
    
    .section-header {
        border-bottom-color: #000;
    }
    
    .knowledge-section {
        border: 1px solid #000;
        background: transparent;
    }
    
    .radio-item label, .experience-item label {
        border: 1px solid #000;
        background: transparent;
    }
    
    .checkmark, .radiomark {
        border-color: #000;
    }
}



/* ---------- Accessibility & Focus Visible ---------- */
*:focus-visible {
    outline: 2px solid var(--doj-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- High Contrast Mode ---------- */
@media (prefers-contrast: high) {
    .form-control:focus {
        outline: 2px solid var(--doj-primary);
    }
    .btn-primary {
        border: 1px solid currentColor;
    }
}

/* ---------- Final Polish: Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* جلوگیری از overflow افقی */
body {
    overflow-x: hidden;
}

/* استایل برای اسکرول کل صفحه (هماهنگ با دکمه تم) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--doj-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--doj-dark);
}

body.dark-mode ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

