@font-face {
    font-family: font;
    src: url('../vazir-font-v16.1.0/vazir-font-v16.1.0/Vazir-Bold.woff2');
}

* {
    font-family: font;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}



/* تم‌های مختلف */
body.theme-light {
    background: linear-gradient(135deg, #4e54c8, #4e54c8);
}

body.theme-dark {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

body.theme-blue {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

body.theme-green {
    background: linear-gradient(135deg, green, green);
}

body.theme-white {
    background: linear-gradient(135deg, white, white);
}

img.user-profile-picture{
    width: 2.5vw;
    border-radius: 50%;
}

.dashboard {
    width: 100%;
    max-width: 1600px;
    height: 90vh;
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================== هدر ==================== */
.dashboard-header {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section i {
    font-size: 2rem;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-section i {
    font-size: 2rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ==================== منوی اصلی ==================== */
.main-nav {
    background: #f8f9fa;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
    overflow-x: auto;
}

.nav-btn {
    background: white;
    border: 2px solid transparent;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
}

.form-button-logout {

    background: white;
    border: 2px solid transparent;
    padding: 0.8rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    text-decoration: none;
    text-align: center;

}

        /* استایل کلی */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: system-ui, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: #f5f7fc;
            min-height: 100vh;
        }

        /* هدر و دکمه همبرگر */
        .mobile-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            background: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .logo {
            font-weight: bold;
            font-size: 1.3rem;
            background: linear-gradient(135deg, #4e54c8, #8f94fb);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .hamburger {
            background: none;
            border: none;
            font-size: 1.8rem;
            cursor: pointer;
            color: #4e54c8;
            padding: 0.5rem;
            transition: 0.2s;
        }

        .hamburger:hover {
            opacity: 0.7;
        }

        /* منوی کشویی (در موبایل مخفی و در دسکتاپ افقی) */
        .nav-menu {
            position: fixed;
            top: 0;
            right: -280px; /* مخفی در سمت راست */
            width: 260px;
            height: 100%;
            background: white;
            box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
            transition: right 0.3s ease-in-out;
            z-index: 1000;
            padding: 5rem 1rem 2rem;
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
            overflow-y: auto;
        }

        /* زمانی که منو باز است */
        .nav-menu.open {
            right: 0;
        }

        /* دکمه بستن داخل منو */
        .close-menu {
            position: absolute;
            top: 1rem;
            left: 1rem;
            background: #f0f0f0;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #555;
        }

        /* استایل دکمه‌های شما (همان کلاس‌ها با کمی بهبود) */
        .nav-btn {
            background: white;
            border: 2px solid transparent;
            padding: 0.7rem 1rem;
            border-radius: 40px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.9rem;
            color: #555;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            white-space: nowrap;
            text-decoration: none;
            text-align: center;
            width: 100%;
            justify-content: flex-start;
        }

        .form-button-logout {
            background: white;
            border: 2px solid transparent;
            padding: 0.8rem 1rem;
            border-radius: 40px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.9rem;
            color: #555;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            white-space: nowrap;
            text-decoration: none;
            text-align: center;
            width: 100%;
            background: #fff;
            margin-top: 0.5rem;
        }

        .nav-btn i, .form-button-logout i {
            font-size: 1.1rem;
            width: 24px;
        }

        .nav-btn:hover {
            background: #f0f0f0;
            border-color: #ddd;
        }

        .nav-btn.active {
            background: linear-gradient(135deg, #4e54c8, #8f94fb);
            color: white;
            border-color: transparent;
            box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
        }

        .form-button-logout:hover {
            background: #ffe6e6;
            border-color: #ffaaaa;
            color: #d32f2f;
        }

        /* پوشش تاریک پشت منو */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(2px);
            z-index: 999;
            display: none;
        }

        .overlay.show {
            display: block;
        }

        /* محتوای اصلی صفحه (برای نمایش افکت) */
        .content {
            padding: 2rem 1rem;
            text-align: center;
        }

        .content h1 {
            margin-bottom: 1rem;
            color: #333;
        }

        
        @media (min-width: 768px) {
            .mobile-header .hamburger {
                display: none;
            }
            
            .nav-menu {
                position: static;
                width: auto;
                height: auto;
                flex-direction: row;
                background: transparent;
                box-shadow: none;
                padding: 0;
                gap: 0.5rem;
                overflow-y: visible;
                right: auto;
                margin-left: auto;
            }
            
            .close-menu {
                display: none;
            }
            
            .overlay {
                display: none !important;
            }
            
            .nav-btn, .form-button-logout {
                width: auto;
                white-space: nowrap;
            }
            
            .mobile-header {
                justify-content: space-between;
            }
        }

        /* در موبایل، دکمه‌ها در منوی کشویی عمودی می‌شوند */
        @media (max-width: 767px) {
            .nav-btn, .form-button-logout {
                white-space: normal;
                justify-content: center;
            }
        }

/* ==================== محتوای اصلی ==================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #fafafa;
}

.content-section {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== صفحه خانه ==================== */
.welcome-section {
    text-align: center;
    padding: 4rem 2rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
}

/* ==================== هدر بخش‌ها ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: #4e54c8;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.add-btn,
.report-btn {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: inline;
    text-decoration: none;
}

.active-border {
    border: 2px solid lime;
    opacity: 0.8;
}

.report-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.add-btn:hover,
.report-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

/* ==================== بخش جستجو ==================== */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 2px solid #f0f0f0;
}

.search {
    display: flex;
    flex-wrap: wrap;
    columns: 2;
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 1;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem 0.8rem 2.5rem !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 15px !important;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline;

}

.search-input:focus {
    border-color: #4e54c8 !important;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1) !important;
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-filters .filter-group {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    border: 1px solid #e0e0e0;
}

.search-filters .filter-group label {
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.search-filters .filter-group select {
    border: none;
    background: transparent;
    padding: 0.3rem;
    font-size: 0.9rem;
    color: #333;
    outline: none;
    cursor: pointer;
}

.reset-search-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.reset-search-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* ==================== فیلترها ==================== */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group label {
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select {
    border: none;
    background: transparent;
    padding: 0.3rem;
    font-size: 0.9rem;
    color: #333;
    outline: none;
    cursor: pointer;
}

/* ==================== اطلاعات جدول ==================== */
.table-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.results-count {
    background: #4e54c8;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== جداول ==================== */
.table-container {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.data-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    color: #555;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.9rem;
}

.data-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* ==================== نشان‌ها ==================== */
.badge {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.badge.active,
.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.income {
    background: #d4edda;
    color: #155724;
}

.badge.expense {
    background: #f8d7da;
    color: #721c24;
}

/* ==================== دکمه‌های عملیات ==================== */
.action-btn {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0.5vw;
    margin-right: 1vw;
    margin-left: 1vw;
    text-decoration: none;
}

.action-btn.edit {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.delete {
    background: #ffebee;
    color: #c62828;
}

.action-btn.print,
.action-btn.download {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-btn.view {
    background: #f3e5f5;
    color: #7b1fa2;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* ==================== کارت‌های واحدهای سازمانی ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.unit-card,
.field-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
}

.unit-card:hover,
.field-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.unit-header i {
    font-size: 2rem;
    color: #4e54c8;
}

.unit-header h3 {
    font-size: 1.2rem;
    color: #333;
    flex: 1;
}

.unit-badge {
    background: #4e54c8;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.unit-body p {
    margin: 0.5rem 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.unit-body i {
    width: 20px;
    color: #8f94fb;
}

.unit-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.unit-btn,
.field-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.unit-btn.edit,
.field-btn.edit {
    background: #e3f2fd;
    color: #1976d2;
}

.unit-btn.details,
.field-btn.courses {
    background: #f3e5f5;
    color: #7b1fa2;
}

.unit-btn:hover,
.field-btn:hover {
    transform: scale(1.02);
}

/* ==================== هدر رشته‌ها ==================== */
.field-header {
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-bottom: 1rem;
}

.field-header.riazi {
    background: linear-gradient(135deg, #1976d2, #64b5f6);
}

.field-header.tajrobi {
    background: linear-gradient(135deg, #388e3c, #81c784);
}

.field-header.ensani {
    background: linear-gradient(135deg, #f57c00, #ffb74d);
}

.field-header.fani {
    background: linear-gradient(135deg, #7b1fa2, #ba68c8);
}

.field-header i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.field-header h3 {
    font-size: 1.2rem;
}

/* ==================== آمار مالی ==================== */
.financial-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.stat-card i {
    font-size: 2rem;
    padding: 1rem;
    border-radius: 15px;
}

.stat-card.income i {
    background: #d4edda;
    color: #155724;
}

.stat-card.expense i {
    background: #f8d7da;
    color: #721c24;
}

.stat-card.balance i {
    background: #cce5ff;
    color: #004085;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-value {
    color: #333;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ==================== کارت‌های گزارشات ==================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(78, 84, 200, 0.2);
}

.report-card i {
    font-size: 2.5rem;
    color: #4e54c8;
    margin-bottom: 1rem;
}

.report-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.report-card p {
    color: #666;
    font-size: 0.85rem;
}

/* ==================== نمودار ==================== */
.chart-container {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.chart-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.bar {
    width: 30px;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border-radius: 10px 10px 0 0;
    transition: height 0.3s;
    margin-bottom: 0.5rem;
}

.bar-item span {
    color: #666;
    font-size: 0.8rem;
    transform: rotate(-45deg);
    white-space: nowrap;
}

/* ==================== تنظیمات ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.settings-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.settings-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card h3 i {
    color: #4e54c8;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item label {
    color: #666;
    font-size: 0.9rem;
}

.settings-btn {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: #bbdefb;
}

.settings-item select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

/* ==================== اطلاعات پشتیبان ==================== */
.backup-info {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.backup-info h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.backup-info h3 i {
    color: #4e54c8;
}

/* ==================== استایل مودال ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-lg {
    max-width: 800px;
}

.modal-header {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    padding: 1.5rem 2rem;
    border-radius: 30px 30px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    font-size: 1.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

/* ==================== استایل فرم‌ها ==================== */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-group label .required {
    color: #e74c3c;
    font-size: 1.1rem;
}

.form-control {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 0.95rem;
    transition: all 0.3s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #4e54c8;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.btn-cancel,
.btn-save {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 100px;
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-save {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
}

.btn-save:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

/* ==================== استایل گزارشات ==================== */
.report-container {
    padding: 1rem 0;
}

.report-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.report-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.report-header p {
    color: #666;
    font-size: 0.9rem;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.report-stats .stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
}

.report-stats .stat-item.income {
    background: #d4edda;
}

.report-stats .stat-item.expense {
    background: #f8d7da;
}

.report-stats .stat-item.balance {
    background: #cce5ff;
}

.report-stats .stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.report-stats .stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.report-section {
    margin-bottom: 2rem;
}

.report-section h4 {
    font-size: 1.1rem;
    color: #4e54c8;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    border-right: 4px solid #4e54c8;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.report-table th {
    background: #f8f9fa;
    padding: 0.8rem;
    text-align: center;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
}

.report-table td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

.report-table tr:last-child td {
    border-bottom: none;
}

.report-table tr:hover {
    background: #f8f9fa;
}

/* ==================== استایل تنظیمات ==================== */
.settings-form {
    padding: 1rem 0;
}

.log-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.log-filters .form-control {
    width: auto;
    min-width: 150px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ==================== اسکرول ==================== */
.main-content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3f44a0, #7a7fd9);
}

/* ==================== نوتیفیکیشن ==================== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
    direction: rtl;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -100%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 1200px) {
    .dashboard {
        height: 95vh;
    }

    .logo-section h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .main-nav {
        justify-content: flex-start;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content.modal-lg {
        max-width: 95%;
    }

    .report-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }

    .logo-section {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filters,
    .search-filters {
        flex-direction: column;
        width: 100%;
    }

    .filter-group,
    .search-filters .filter-group {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .financial-stats {
        grid-template-columns: 1fr;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .chart-bars {
        justify-content: flex-start;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-save {
        width: 100%;
    }

    .report-stats {
        grid-template-columns: 1fr;
    }

    .log-filters {
        flex-direction: column;
    }

    .log-filters .form-control {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard {
        height: 98vh;
        border-radius: 20px;
    }

    .main-content {
        padding: 1rem;
    }

    .data-table {
        min-width: 800px;
    }

    .search-section {
        padding: 1rem;
    }

    .search-input {
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .reset-search-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .report-table {
        font-size: 0.85rem;
    }

    .report-table th,
    .report-table td {
        padding: 0.5rem;
    }
}

/* messages */

/* استایل برای پیام‌های خطا */
div.show-message {
    background: linear-gradient(135deg, #ff7373, #ff4444);
    color: #fff;
    border-left: 5px solid #ff2222;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 50, 50, 0.3);
    font-family: "Vazirmatn", "IRANSans", sans-serif;
    font-size: 15px;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.6s ease;
}

/* افکت ورود نرم از سمت چپ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@keyframes message {
    0% {
        transform: translateX(10px);

    }

    25% {
        transform: translateY(10px);

    }

    50% {
        transform: translateX(-20px);

    }

    75% {
        transform: translateY(-20px);

    }

    100% {
        transform: translateX(10px);

    }
}

/* آیکون هشدار در گوشه چپ */
div.show-message::before {
    content: "⚠️";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
}

/* متن داخل <p> */
div.show-message p {
    margin: 0;
    padding-left: 40px;
    line-height: 1.6;
    font-size: 2rem;
    text-align: center;
    animation: message 5s infinite;
}

/* افکت هنگام هاور */
div.show-message:hover {
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.4);
    transform: scale(1.02);
    transition: all 0.2s ease;
}



/* Pagination styles (برای HTML که در سوال استفاده شده) */
.pagination {
    display: flex;
    justify-content: center;
    padding: 0;
    margin-top: 2vw;
    list-style: none;
    direction: rtl;
    /* مناسب برای محتوای فارسی */
}

.pagination li {
    margin: 0.5vw 4px;
}

.pagination .page-item {
    color: red
        /* افزودن استایل پایه برای هر آیتم */
}

.pagination .page-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    color: #007bff;
    text-decoration: none;
    border-radius: 0.25rem;
    background: #fff;
    transition: background 0.2s ease, color 0.2s ease;
}

.pagination .page-item.active .page-link {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background: #fff;
    border-color: #dee2e6;
}

.pagination .page-link:hover:not(.active):not(.disabled) {
    background: #e9ecef;
    text-decoration: none;
}

/* بهینه‌سازی برای صفحه نمایش‌های کوچک */
@media (max-width: 768px) {
    .pagination li {
        margin: 0 2px;
    }

    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* استایل برای خطاهای فرم */
.field-errors {
    display: none;
    margin-top: 5px;
}

.error-text {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 3px;
    animation: slideDown 0.3s ease-out;
}

.error-text i {
    margin-left: 5px;
}

/* فیلد با خطا */
.form-control.error-field {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.error-field:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.35);
}

/* خطای کلی */
.general-errors {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.alert i {
    margin-left: 10px;
    font-size: 18px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

/* انیمیشن */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* دکمه در حالت غیرفعال */
.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-save i.fa-spinner {
    margin-left: 5px;
}
/* ==================== منوی همبرگر و کشویی موبایل ==================== */

/* دکمه همبرگر (مخصوص موبایل) */
.hamburger-menu {
    display: none;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border: none;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1rem;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: sticky;
    top: 70px;
    z-index: 99;
    width: fit-content;
}

.hamburger-menu:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

.hamburger-menu i {
    font-size: 1.2rem;
}

/* پوشش تاریک */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 998;
    display: none;
    transition: all 0.3s ease;
}

.menu-overlay.show {
    display: block;
}

/* دکمه بستن منو */
.close-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #555;
    z-index: 1001;
    transition: all 0.3s ease;
}

.close-menu-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

/* ==================== استایل موبایل (کمتر از 768px) ==================== */
@media (max-width: 768px) {
    /* تنظیم هدر برای موبایل */
    .dashboard-header {
        flex-direction: row;
        padding: 0.8rem 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .logo-section h1 {
        font-size: 0.85rem;
    }
    
    .logo-section i {
        font-size: 1.5rem;
    }
    
    .user-section span {
        font-size: 0.8rem;
    }
    
    /* نمایش دکمه همبرگر */
    .hamburger-menu {
        display: flex;
    }
    
    /* منوی اصلی به حالت کشویی */
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        flex-direction: column;
        background: white;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 5rem 1rem 2rem;
        overflow-y: auto;
        transition: right 0.3s ease-in-out;
        border-bottom: none;
        gap: 0.8rem;
    }
    
    .main-nav.open {
        right: 0;
    }
    
    /* نمایش دکمه بستن */
    .close-menu-btn {
        display: flex;
    }
    
    /* استایل دکمه‌های داخل منوی کشویی */
    .main-nav .nav-btn {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .main-nav .nav-btn i {
        width: 28px;
        font-size: 1.1rem;
    }
    
    .main-nav form {
        width: 100%;
        margin: 0;
    }
    
    .main-nav .form-button-logout {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
    }
    
    /* اسکرول برای محتوای اصلی */
    .main-content {
        padding: 1rem;
    }
    
    /* تنظیم دکمه بستن در موقعیت مناسب */
    .close-menu-btn {
        top: 1rem;
        right: 1rem;
    }
}

/* ==================== استایل موبایل کوچک (کمتر از 480px) ==================== */
@media (max-width: 480px) {
    .logo-section h1 {
        font-size: 0.7rem;
    }
    
    .logo-section i {
        font-size: 1.2rem;
    }
    
    .user-section i {
        font-size: 1.5rem;
    }
    
    .user-section span {
        font-size: 0.7rem;
        display: none; /* مخفی کردن متن در موبایل‌های خیلی کوچک */
    }
    
    .hamburger-menu {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .hamburger-menu span {
        display: none; /* فقط آیکون نمایش داده شود */
    }
    
    .main-nav {
        width: 260px;
        right: -260px;
    }
}

/* ==================== استایل تبلت (بین 768px تا 992px) ==================== */
@media (min-width: 769px) and (max-width: 992px) {
    .main-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .nav-btn {
        white-space: nowrap;
    }
    
    .dashboard-header h1 {
        font-size: 1.2rem;
    }
}

/* ==================== رفع مشکلات لمسی در موبایل ==================== */
@media (max-width: 768px) {
    .nav-btn, 
    .form-button-logout,
    .hamburger-menu,
    .close-menu-btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-btn:active {
        transform: scale(0.98);
    }
}


/* record grade for teacher css */

.grade-input {
    width: 70px;
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}
.locked-cell {
    display: inline-block;
    min-width: 40px;
    color: #888;
    text-align: center;
    padding: 4px 6px;
    background: #f5f5f5;
    border-radius: 4px;
}
.badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-inline-start: 4px;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-muted   { background: #e2e3e5; color: #555; }

.record-score-btn {
    width: 110px;
    height: 60px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0.5vw;
    font-weight: bold;
}
.edit{
    background: #e3f2fd;
    color: #1976d2;
}


/* grade access */

.badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
  display: inline-block;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-muted   { background: #e2e3e5; color: #555; }

.filter-bar label { font-weight: 500; }
.filter-bar select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
  margin-inline-start: 6px;
}
.action-btn.danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.action-btn.danger:hover { background: #c82333; }

/* unit selection css */ 

