@font-face {
    font-family: 'ir';
    src: url('/assets/fonts/ir/IRANSansDN_Fa_Num.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ir';
    src: url('/assets/fonts/ir/IRANSansDN_FaNum-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ir';
    src: url('/assets/fonts/ir/IRANSansDN_FaNum_Light.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ir';
    src: url('assets/fonts/ir/IRANSansDN_FaNum_Light.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ir';
    src: url('/assets/fonts/ir/IRANSansDN_FaNum_Light.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
/* ============================================
   فونت‌ها (از هاست شما لود می‌شوند)
   ============================================ */

/* ============================================
   ریست پایه
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'ir', Tahoma, sans-serif;
    background: #f5f7fb;
    color: #2d3748;
    line-height: 1.8;
    direction: rtl;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'ir', Tahoma, sans-serif;
    font-weight: normal;
    color: #1a202c;
}

a {
    text-decoration: none;
    color: #4f46e5;
    transition: color 0.2s;
}

a:hover {
    color: #3730a3;
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-box h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
    color: #4f46e5;
}

.login-box .subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 32px;
    font-size: 14px;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'ir', Tahoma, sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%234a5568'/%3E%3C/svg%3E") no-repeat left 16px center;
    padding-left: 40px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'ir', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
    color: #fff;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #4f46e5;
    border: 2px solid #4f46e5;
}

.btn-outline:hover {
    background: #4f46e5;
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background: #f7fafc;
    font-weight: bold;
    font-size: 13px;
    color: #4a5568;
    white-space: nowrap;
}

table tr:hover {
    background: #f7fafc;
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header .logo {
    font-family:  'ir', Tahoma, sans-serif;
    font-size: 22px;
    color: #4f46e5;
}

.dashboard-header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.dashboard-content {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-icon.blue { background: #ede9fe; color: #4f46e5; }
.stat-card .stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-card .stat-icon.orange { background: #fef3c7; color: #f59e0b; }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    font-family:  'ir', Tahoma, sans-serif;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #718096;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   Test Page
   ============================================ */
.test-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.question-block {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.question-block h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #2d3748;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    border-color: #a78bfa;
    background: #f5f3ff;
}

.option-item.selected {
    border-color: #4f46e5;
    background: #ede9fe;
}

.option-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #4f46e5;
}

.option-item label {
    cursor: pointer;
    flex: 1;
}

/* ============================================
   Report Page
   ============================================ */
.report-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.report-header {
    text-align: center;
    margin-bottom: 24px;
}

.report-header h2 {
    color: #4f46e5;
    font-size: 24px;
    margin-bottom: 12px;
}

.report-header p {
    color: #718096;
    font-size: 14px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.report-table th, .report-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
}

.report-table th {
    background: #4f46e5;
    color: #fff;
    font-family: 'ir', Tahoma, sans-serif;
}

.dimension-section {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border-right: 4px solid #4f46e5;
}

.dimension-section h4 {
    color: #4f46e5;
    margin-bottom: 8px;
}

.strategy-box {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.final-plan {
    background: linear-gradient(135deg, #ede9fe, #fae8ff);
    border-radius: 12px;
    padding: 24px;
    font-size: 15px;
    line-height: 2;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .card {
        padding: 16px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 28px 20px;
        margin: 20px;
    }

    table {
        font-size: 12px;
    }

    table th, table td {
        padding: 8px 10px;
    }
}

@media print {
    .dashboard-header, .btn, #radar-chart, hr {
        display: none !important;
    }
    body {
        font-family: Tahoma, sans-serif;
        font-size: 12px;
    }
    .card {
        box-shadow: none;
        border: none;
    }
}