/* اضافه کردن direction RTL */
html, body {
    direction: rtl;
    text-align: right;
}

* {
    direction: rtl;
    text-align: right;
}

.nav-item {
    direction: rtl;
    text-align: center;
}

.bottom-nav {
    direction: rtl;
}

/* استایل‌های اصلی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0D9488;
    --secondary: #14B8A6;
    --accent: #F59E0B;
    --light: #f0fdfa;
    --dark: #134E4A;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray: #6B7280;
    --shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

/* صفحه ورود */
.login-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
    color: white;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    color: var(--dark);
    border: 2px solid var(--accent);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 24px;
    color: var(--secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    outline: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #0daa7a;
}

.slogan {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* صفحه اصلی */
.main-page {
    display: none;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* هدر اصلی برای دسکتاپ */
.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 15px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
}

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

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.today-date {
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    margin: 5px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.simple-header {
    background: white;
    color: var(--dark);
    padding: 20px 15px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent);
}

/* محتوای صفحات */
.page-content {
    padding: 20px 15px;
}

.section-title {
    margin: 25px 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid var(--accent);
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-2px);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(13, 148, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.action-icon i {
    font-size: 24px;
    color: var(--primary);
}

.action-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.action-content p {
    font-size: 14px;
    color: var(--gray);
}

/* ==================== استایل‌های منوی همبرگری ==================== */

/* هدر موبایل و دسکتاپ */
.mobile-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
}

.mobile-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-header h1 {
    font-size: 18px;
    margin: 0;
    color: white;
    flex: 1;
    text-align: center;
}

.user-info-mobile .user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* سایدبار */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s;
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item-sidebar {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border-right: 3px solid transparent;
}

.nav-item-sidebar:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.nav-item-sidebar.active {
    background: rgba(13, 148, 136, 0.1);
    color: var(--primary);
    border-right-color: var(--primary);
}

.nav-item-sidebar i {
    width: 24px;
    text-align: center;
    margin-left: 10px;
    font-size: 18px;
}

.nav-item-sidebar.logout-sidebar {
    color: var(--danger);
    margin-top: auto;
}

.nav-item-sidebar.logout-sidebar:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* overlay سایدبار */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    cursor: pointer;
}

.sidebar-overlay.show {
    display: block;
}

/* نوار ابزار پایین - فقط برای موبایل */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid var(--accent);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray);
    font-size: 12px;
    transition: all 0.3s;
    cursor: pointer;
    padding: 5px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

/* ==================== استایل‌های مشترک برای همه دستگاه‌ها ==================== */

/* مخفی کردن هدرهای قدیمی در همه دستگاه‌ها */
.header, .simple-header {
    display: none !important;
}

/* نمایش هدر همبرگری در همه دستگاه‌ها */
.mobile-header {
    display: flex !important;
}

/* تنظیم محتوای اصلی برای هدر همبرگری */
.main-page {
    margin-top: 60px;
    margin-right: 0 !important;
}

/* لیست بازدیدها */
.visit-list {
    margin-top: 20px;
}

.visit-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.visit-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.visit-info p {
    font-size: 14px;
    color: var(--gray);
}

.visit-date {
    font-size: 14px;
    color: var(--gray);
}

/* تنظیمات */
.settings-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--accent);
}

.success-message {
    background: var(--success);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.grade-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.grade-item label {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
    display: block;
}

.grade-item input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* محتوای آموزشی */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.content-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--accent);
}

.content-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.content-card h3 i {
    margin-left: 10px;
}

.content-list {
    list-style-type: none;
}

.content-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list li i {
    color: var(--accent);
    margin-left: 10px;
}

/* ==================== استایل‌های جدید برای بخش بازدیدها ==================== */
/* مودال */
.modal {
    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: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border: 2px solid var(--accent);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.modal-body {
    padding: 20px;
}

/* نتایج جستجو */
.search-results {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.school-result-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.school-result-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.school-result-item h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
}

.school-result-item p {
    margin: 2px 0;
    font-size: 14px;
    color: var(--gray);
}

/* جدول اطلاعات مدرسه */
.school-info-table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
    border: 1px solid var(--accent);
}

.school-info-table .table-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.school-info-table .table-body {
    padding: 0;
}

.info-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 1;
    font-weight: 600;
    color: var(--dark);
}

.info-value {
    flex: 2;
    color: var(--gray);
}

/* گزینه‌های نوع بازدید */
.visit-type-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.visit-type-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.visit-type-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.visit-type-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.visit-type-icon i {
    font-size: 24px;
    color: var(--primary);
}

.visit-type-card h4 {
    margin: 0 0 10px 0;
    color: var(--dark);
}

.visit-type-card p {
    margin: 0;
    font-size: 14px;
    color: var(--gray);
}

/* دکمه‌های فرم */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

/* ==================== استایل‌های بخش Import ==================== */
/* استایل‌های آپلود */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent);
    background: #f8f9fa;
}

.upload-area.dragover {
    border-color: var(--success);
    background: #f0fff0;
}

.file-info {
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

/* استایل‌های جدول پیش‌نمایش */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.preview-table th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #ddd;
    font-weight: 600;
}

.preview-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.preview-table tr:nth-child(even) {
    background: #f8f9fa;
}

.preview-table tr:hover {
    background: #e9ecef;
}

/* استایل‌های وضعیت import */
.import-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.import-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.import-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* زمینه داشبورد مدیریت */
.main-dashboard {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.3);
    color: white;
    border: 2px solid var(--accent);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.dashboard-header h1 {
    margin: 0;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-filter {
    min-width: 300px;
}

.admin-filter .form-control {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: var(--dark);
}

/* کانتینر همه کارت‌ها */
.all-cards-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.cards-row:last-child {
    margin-bottom: 0;
}

/* استایل کارت‌ها */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

/* رنگ‌های مختلف برای آیکون‌ها */
.card-icon.school { background: rgba(13, 148, 136, 0.1); color: #0D9488; }
.card-icon.class { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.card-icon.student { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.card-icon.total { background: rgba(139, 69, 19, 0.1); color: #8B4513; }
.card-icon.weekly { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.card-icon.monthly { background: rgba(168, 85, 247, 0.1); color: #A855F7; }
.card-icon.education { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.card-icon.administrative { background: rgba(14, 165, 233, 0.1); color: #0EA5E9; }
.card-icon.special { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }

.card-content {
    flex: 1;
}

.card-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card-label {
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

/* اطلاعات کاربر انتخاب شده */
.user-selection-info {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 25px;
    display: none;
    border-right: 4px solid var(--accent);
    font-weight: 600;
}

.user-selection-info i {
    color: var(--primary);
    margin-left: 8px;
}

/* استایل‌های جدید برای بخش انتخاب مدارس */
.school-selection-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.school-category-section {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.school-category-header {
    background: #f8f9fa;
    padding: 12px 15px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-category-content {
    padding: 15px;
    background: white;
}

.school-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.school-checkbox-group label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.school-checkbox-group label:hover {
    background: #e9ecef;
}

.school-checkbox-group input[type="checkbox"] {
    margin-left: 8px;
    transform: scale(1.2);
}

.selection-summary {
    background: #e8f5e8;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #c8e6c9;
    font-size: 14px;
}

.selection-summary strong {
    color: var(--success);
}

/* استایل‌های جدید برای مدیریت کاربران */
.user-management-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.user-management-item:hover {
    border-color: var(--accent);
}

.user-role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}

.role-admin { background: #ffebee; color: #c62828; }
.role-moaven { background: #e8f5e8; color: #2e7d32; }
.role-arzyab { background: #e3f2fd; color: #1565c0; }
.role-karshenas { background: #fff3e0; color: #ef6c00; }
.role-rahbar { background: #f3e5f5; color: #7b1fa2; }

.user-schools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.user-school-tag {
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--gray);
}

.user-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.user-action-buttons .btn-outline {
    font-size: 12px;
    padding: 6px 12px;
}

/* استایل‌های جدید برای انتخاب گروهی مدارس */
.bulk-selection-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.bulk-selection-controls .btn-outline {
    font-size: 12px;
    padding: 6px 12px;
}

.school-category-section.collapsed .school-category-content {
    display: none;
}

.school-category-section.collapsed .school-category-header i {
    transform: rotate(-90deg);
}

.school-category-header i {
    transition: transform 0.3s;
}

.school-checkbox-item {
    transition: all 0.2s ease;
}

.school-checkbox-item:hover {
    background: #f0f8ff !important;
    border-color: #d1e7ff;
}

.school-checkbox-item:has(input:checked) {
    background: #e8f5e8 !important;
    border: 1px solid #c8e6c9;
}

.form-item {
    transition: all 0.3s ease;
}

.form-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

/* استایل برای مدارس بدون بازدید */
.no-visits-row {
    background-color: #ffebee !important;
    color: #c62828;
}

.no-visits-row:hover {
    background-color: #ffcdd2 !important;
}

/* استایل برای اعداد قابل کلیک */
.visit-count-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}

.visit-count-link:hover {
    color: var(--secondary);
}

/* استایل برای دکمه خروج در نوار پایین */
.nav-item.logout {
    color: var(--danger) !important;
}

.nav-item.logout.active {
    color: var(--danger) !important;
}

.nav-item.logout:hover {
    color: white !important;
    background-color: var(--danger);
    border-radius: 10px;
}

/* ==================== رسپانسیو ==================== */

/* موبایل */
@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
    }
    
    .cards-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .admin-filter {
        min-width: auto;
    }
}

/* تبلت */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-content {
        padding: 20px 30px;
    }
    
    .visit-type-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        max-width: 600px;
    }
    
    .bottom-nav {
        display: none;
    }
}

/* دسکتاپ */
@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }
    
    .mobile-header {
        padding: 15px 30px;
    }
    
    .mobile-header h1 {
        font-size: 20px;
    }
    
    .page-content {
        padding: 20px 30px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* رسپانسیو عمومی */
@media (max-width: 480px) {
    .login-card {
        padding: 20px;
    }
    
    .action-card {
        flex-direction: column;
        text-align: center;
    }
    
    .action-icon {
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        border-radius: 15px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .form-actions {
        grid-template-columns: 1fr;
    }
    
    .preview-table {
        font-size: 12px;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 6px 4px;
    }

    .main-dashboard {
        padding: 20px;
        border-radius: 20px;
    }
    
    .all-cards-container {
        padding: 20px;
    }
    
    .dashboard-card {
        padding: 20px 15px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .card-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .card-number {
        font-size: 24px;
    }
}
/* ==================== استایل‌های فرم‌ساز داخلی ==================== */

/* کانتینر اصلی فرم‌ساز */
.form-builder-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 2px solid var(--accent);
}

/* سایدبارهای چپ و راست */
.builder-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.builder-sidebar.left {
    border-right: 2px solid var(--accent);
}

.builder-sidebar.right {
    border-left: 2px solid var(--accent);
}

/* بخش اصلی فرم‌ساز */
.builder-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* انواع سوالات */
.field-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.field-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.field-type-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.field-type-btn i {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 8px;
}

.field-type-btn span {
    font-size: 12px;
    color: var(--dark);
}

/* تب‌های صفحات */
.pages-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
}

.page-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.page-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-tab:hover:not(.active) {
    background: #e9ecef;
}

.page-tab-add {
    padding: 8px 12px;
    background: transparent;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.page-tab-add:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* کانتینر سوالات */
.fields-container {
    flex: 1;
    min-height: 400px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
    border: 2px dashed #e0e0e0;
    overflow-y: auto;
}

/* سوالات */
.form-field {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.form-field:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.form-field.selected {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.05);
}

.field-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.field-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(13, 148, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-type-icon i {
    font-size: 18px;
    color: var(--primary);
}

.field-info {
    flex: 1;
}

.field-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.field-type {
    font-size: 12px;
    color: var(--gray);
}

.field-actions {
    display: flex;
    gap: 8px;
}

.field-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.preview-input,
.preview-textarea,
.preview-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    pointer-events: none;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.required-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* تنظیمات سوال */
.field-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.setting-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.option-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.conditional-settings {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* پیش‌نمایش فرم */
.form-preview-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.form-preview {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.preview-description {
    color: var(--gray);
    margin-top: 10px;
}

.preview-meta {
    margin-top: 15px;
}

.preview-page {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.preview-page:last-child {
    border-bottom: none;
}

.preview-field {
    margin-bottom: 20px;
}

.field-hint {
    color: var(--gray);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.radio-custom,
.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    display: inline-block;
}

.checkbox-custom {
    border-radius: 4px;
}

/* لیست فرم‌ها */
.form-list-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.form-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.form-item-header h4 {
    margin: 0;
    color: var(--dark);
}

.form-item-content {
    color: var(--gray);
    margin-bottom: 15px;
}

.form-item-actions {
    display: flex;
    gap: 10px;
}

/* استایل‌های خالی */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.empty-settings {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-settings i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

/* نوار عملیات */
.form-actions-bar {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* رسپانسیو */
@media (max-width: 1200px) {
    .form-builder-container {
        flex-direction: column;
    }
    
    .builder-sidebar {
        width: 100%;
    }
    
    .builder-sidebar.left,
    .builder-sidebar.right {
        border: none;
        border-bottom: 2px solid var(--accent);
    }
}

@media (max-width: 768px) {
    .field-types-grid {
        grid-template-columns: 1fr;
    }
    
    .form-item-actions {
        flex-wrap: wrap;
    }
}
/* استایل‌های فرم داخلی */
.form-fill-container {
    padding: 15px;
}

.form-fill-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.form-fill-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.meta-item {
    background: white;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #eee;
    font-size: 14px;
}

.form-page {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.form-page h4 {
    margin: 0 0 15px 0;
    color: var(--primary);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
}

.required-star {
    color: #e53935;
    margin-right: 5px;
}

.field-input {
    margin-bottom: 5px;
}

.field-hint {
    display: block;
    color: var(--gray);
    font-size: 13px;
    margin-top: 5px;
}

.file-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin-left: 8px;
}

.radio-option label,
.checkbox-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-custom, .checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-option input[type="radio"]:checked + label .radio-custom {
    border-color: var(--primary);
    background: radial-gradient(circle, var(--primary) 0%, var(--primary) 40%, transparent 45%);
}

.checkbox-option input[type="checkbox"]:checked + label .checkbox-custom {
    border-color: var(--primary);
    background-color: var(--primary);
}

.checkbox-option input[type="checkbox"]:checked + label .checkbox-custom::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}
/* استایل‌های فرم تمام صفحه */
.fullscreen-modal {
    padding: 0 !important;
}

.modal-content-full {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
}

.modal-header-fixed {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    flex-shrink: 0;
}

.modal-header-fixed h3 {
    margin: 0;
    font-size: 18px;
}

.modal-header-fixed .close {
    color: white;
    font-size: 28px;
}

.modal-body-full {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.form-fill-container-full {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.form-fill-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-fill-header h3 {
    margin: 0 0 10px 0;
    color: white;
}

.form-description {
    color: rgba(255,255,255,0.9);
    margin: 0 0 15px 0;
}

.form-fill-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-item {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.form-page-full {
    padding: 25px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.form-fields-full {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-field {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.form-field:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-field.has-error {
    border-color: #e53935;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.2);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

.required-star {
    color: #e53935;
    margin-right: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    background: white;
}

.persian-date-input {
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23666" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>') no-repeat left 15px center;
    background-size: 16px;
    padding-left: 40px;
}

.date-input-wrapper {
    position: relative;
}

.date-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.radio-option:hover, .checkbox-option:hover {
    background: #e9ecef;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin-left: 10px;
    width: 18px;
    height: 18px;
}

.radio-option label,
.checkbox-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

/* نوار پایینی ثابت */
.form-actions-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 10px 20px;
    z-index: 1000;
}

.actions-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.actions-container .btn {
    padding: 8px 20px;
    font-size: 14px;
    min-width: 120px;
}

/* جداول با حاشیه */
.table-bordered {
    border: 1px solid #dee2e6;
    border-collapse: collapse;
    width: 100%;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    text-align: right;
}

.table-bordered thead th {
    background-color: #f8f9fa;
    border-bottom-width: 2px;
    font-weight: bold;
}

.table-bordered tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-bordered tbody tr:hover {
    background-color: #e9ecef;
}

/* نمایش پاسخ‌ها در جدول */
.answers-container {
    margin-top: 20px;
}

.answer-item {
    display: flex;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.answer-question {
    flex: 0 0 40%;
    background: #f8f9fa;
    padding: 15px;
    border-right: 1px solid #dee2e6;
    font-weight: bold;
    color: #495057;
}

.answer-value {
    flex: 1;
    padding: 15px;
    background: white;
    color: #212529;
}

/* برای نمایش پاسخ‌های فرم در مودال */
.form-answers-modal {
    max-width: 1000px !important;
}

.form-answers-table {
    border: 1px solid #dee2e6;
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.form-answers-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: right;
    border: 1px solid #dee2e6;
    font-weight: bold;
    color: #495057;
}

.form-answers-table td {
    padding: 15px;
    border: 1px solid #dee2e6;
    text-align: right;
    color: #212529;
}

.form-answers-table tr:nth-child(even) {
    background: #f8f9fa;
}
/* استایل‌های هدر فرم داخلی */
.form-fill-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.form-fill-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    border-radius: 0 0 0 100%;
}

.form-fill-header h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.form-description {
    color: rgba(255,255,255,0.9);
    margin: 0 0 15px 0;
    position: relative;
    z-index: 1;
}

.form-fill-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.meta-item {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}
/* استایل جداول پاسخ‌ها */
.form-answers-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #dee2e6;
    margin: 15px 0;
}

.form-answers-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: right;
    border: 1px solid #dee2e6;
    font-weight: bold;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.form-answers-table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: right;
    color: #212529;
    vertical-align: top;
}

.form-answers-table tr:nth-child(even) {
    background: #f8f9fa;
}

.form-answers-table tr:hover {
    background: #e9ecef;
}

.form-answers-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}
/* ==================== صفحه موفقیت ==================== */
.success-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.6s ease;
}

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

.success-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.3);
    border: 4px solid #ffd700;
}

.success-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: moveBackground 30s linear infinite;
    z-index: 1;
}

@keyframes moveBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-icon {
    font-size: 100px;
    margin-bottom: 25px;
    color: #ffd700;
    text-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 2;
    animation: bounce 2s infinite, rotate 10s linear infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.success-subtitle {
    font-size: 20px;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.success-info-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid #e8f5e9;
    position: relative;
    overflow: hidden;
}

.success-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-radius: 0 0 0 100%;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 1;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 160px;
    font-size: 16px;
}

.info-value {
    color: #34495e;
    text-align: left;
    font-size: 16px;
    flex: 1;
}

.success-code {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.success-actions {
    margin-bottom: 50px;
}

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

.action-btn {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.action-btn:hover::before {
    transform: translateX(0);
}

.action-btn:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.pdf-btn:hover {
    border-color: #e53935;
    background: linear-gradient(to left, #fff5f5, white);
}

.home-btn:hover {
    border-color: var(--primary);
    background: linear-gradient(to left, #f0f7ff, white);
}

.new-btn:hover {
    border-color: #28a745;
    background: linear-gradient(to left, #f0fff4, white);
}

.action-icon {
    font-size: 50px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pdf-btn .action-icon {
    background: linear-gradient(135deg, #ffeaea 0%, #ffcccc 100%);
    color: #e53935;
}

.home-btn .action-icon {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--primary);
}

.new-btn .action-icon {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #28a745;
}

.action-btn:hover .action-icon {
    transform: rotate(15deg) scale(1.1);
}

.action-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: bold;
}

.action-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 15px;
    line-height: 1.5;
}

.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.secondary-actions .btn {
    min-width: 220px;
    padding: 12px 25px;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.secondary-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.success-notes {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 30px;
    border-right: 5px solid #28a745;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.success-notes h3 {
    color: #28a745;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
}

.success-notes ul {
    margin: 0;
    padding-right: 25px;
}

.success-notes li {
    margin-bottom: 12px;
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    padding-right: 10px;
}

.success-notes li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    position: absolute;
    right: -20px;
}

/* حالت موبایل */
@media (max-width: 768px) {
    .success-page-container {
        padding: 10px;
    }
    
    .success-header {
        padding: 30px 20px;
    }
    
    .success-header h1 {
        font-size: 28px;
    }
    
    .success-subtitle {
        font-size: 18px;
    }
    
    .success-icon {
        font-size: 80px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }
    
    .info-label {
        min-width: auto;
        font-size: 15px;
    }
    
    .info-value {
        font-size: 15px;
        text-align: right;
    }
    
    .secondary-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .secondary-actions .btn {
        min-width: 100%;
    }
    
    .action-btn {
        padding: 20px;
        gap: 15px;
    }
    
    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 40px;
    }
    
    .action-content h4 {
        font-size: 18px;
    }
    
    .action-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .success-header h1 {
        font-size: 24px;
    }
    
    .success-subtitle {
        font-size: 16px;
    }
    
    .success-icon {
        font-size: 70px;
    }
    
    .success-info-card {
        padding: 20px;
    }
    
    .info-label, .info-value {
        font-size: 14px;
    }
}
/* استایل‌های جدول مدارس */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.preview-table th {
    background-color: #f8f9fa;
    padding: 12px 8px;
    text-align: right;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
}

.preview-table tr:hover {
    background-color: #f8f9fa;
}

.preview-table tr:nth-child(even) {
    background-color: #fafafa;
}

.preview-table tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

/* دکمه‌های عملیات */
.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 2px;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

/* دکمه حذف */
.btn-outline[style*="color: var(--danger)"] {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline[style*="color: var(--danger)"]:hover {
    background-color: #dc3545;
    color: white;
}

/* مودال */
.modal-content {
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* به فایل styles.css اضافه کنید یا در JavaScript اعمال کنید */
.compact-page {
    padding-right: 0.5rem !important;
    padding-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
}

/* یا در JavaScript، در تابع showFormsList بعد از ایجاد محتوا: */
setTimeout(() => {
    const mainContainer = document.querySelector('.settings-section');
    if (mainContainer) {
        mainContainer.classList.add('compact-page');
    }
}, 100);
/* استایل‌های صفحه بازدیدها */
.visits-table {
    width: 100%;
    border-collapse: collapse;
}

.visits-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: right;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid #dee2e6;
}

.visits-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.visits-table tr:hover {
    background-color: #f8f9fa;
}

.visits-table tr:last-child td {
    border-bottom: none;
}

.btn-action {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-action.delete {
    color: #dc3545;
    border-color: #f5c6cb;
}

.btn-action.delete:hover {
    background: #f8d7da;
}
/* استایل‌های صفحه بازدیدها */
.action-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    margin: 0 0 10px 0;
    color: var(--dark);
}

.card-content p {
    margin: 0;
    color: var(--gray);
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    color: var(--primary);
    font-weight: 500;
}

/* استایل‌های جستجو */
.school-search-result {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.school-search-result:hover {
    border-color: var(--primary);
    background: #f8f9fa;
    transform: translateX(-5px);
}

/* استایل‌های دکمه‌های عملیات */
.btn-action {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-action:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-action.delete {
    color: #dc3545;
    border-color: #f5c6cb;
}

.btn-action.delete:hover {
    background: #f8d7da;
}

/* انیمیشن */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* به فایل styles.css اضافه کنید */

/* استایل‌های مدیریت کاربران */
.user-management-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.user-card {
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* استایل‌های بادج */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
    margin-left: 5px;
}

.badge-primary {
    background-color: #0d6efd;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: #198754;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

.badge-info {
    background-color: #0dcaf0;
    color: #000;
}

/* استایل‌های لیست مدارس */
#schoolsList {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

#schoolsList::-webkit-scrollbar {
    width: 6px;
}

#schoolsList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#schoolsList::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* استایل فرم مدرک کاربر */
.user-schools-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #dee2e6;
}

.user-schools-info h5 {
    margin-top: 0;
    color: var(--dark);
    font-size: 14px;
}

.school-tag {
    display: inline-block;
    background: white;
    border: 1px solid #dee2e6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px;
}
/* بهبود ظاهر مودال‌ها */
.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #4a6fa5 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-header .close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* کارت مدارس در لیست کاربران */
.schools-list-container {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.school-item {
    padding: 8px;
    border-bottom: 1px dashed #dee2e6;
    font-size: 13px;
}

.school-item:last-child {
    border-bottom: none;
}

.school-item strong {
    color: var(--dark);
}

.school-info {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}
