/* ============================================
   فایل استایل جامع - بنیاد هفت خوشه سبز
   ============================================ */

/* ===== متغیرهای اصلی ===== */
:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --primary-light: #a8e6cf;
    --secondary: #3498db;
    --secondary-dark: #2980b9;
    --accent: #e74c3c;
    --accent-warning: #f39c12;
    --accent-info: #1abc9c;
    
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --success: #2ecc71;
    --success-bg: #d4edda;
    --danger: #e74c3c;
    --danger-bg: #f8d7da;
    --warning: #f39c12;
    --warning-bg: #fff3cd;
    --info: #3498db;
    --info-bg: #d1ecf1;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.2);
    
    --font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 24px;
    --radius-full: 50%;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    --transition: 0.3s ease;
    --font-sm: 14px;
    --font-md: 16px;
    --font-lg: 20px;
    --font-xl: 24px;
    --font-2xl: 30px;
}

/* ===== ریست ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    direction: rtl;
}

a {
    text-decoration: none;
    color: var(--secondary);
}

ul, ol {
    list-style: none;
}

/* ===== اسکرولبار ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
  
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
   
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== کانتینر اصلی ===== */
#app {
    width: 100%;
    max-width: 1366px;
    margin: 20px auto;
    padding: 20px;
    min-height: calc(100vh - 40px);
}

/* ===== صفحات ===== */
.page {
    display: none;
    animation: fadeIn 0.4s ease;
}
.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   احراز هویت (Auth)
   ============================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: var(--spacing-lg);
}

.auth-card {
    max-width: 420px;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    /*! box-shadow: var(--shadow-lg); */
    transition: var(--transition);
}

.auth-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.auth-logo h2 {
    font-size: var(--font-xl);
    color: var(--gray-800);
}

.auth-logo p {
    color: var(--gray-500);
    font-size: var(--font-sm);
}

/* ===== تب‌ها ===== */
.auth-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: var(--spacing-xs);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gray-600);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-content.active {
    display: block;
}

/* ============================================
   فیلدهای فرم
   ============================================ */
.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    font-size: var(--font-sm);
    color: var(--gray-700);
}

.input-group .required-star {
    color: var(--accent);
    margin-right: 2px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: var(--font-md);
    font-family: var(--font-family);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.input-group input::placeholder {
    color: var(--gray-400);
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   دکمه‌ها
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-md);
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
}

.btn i {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: var(--white);
}
.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   پیام‌ها
   ============================================ */
.auth-message {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    text-align: center;
}

.auth-message .error {
    color: var(--danger);
    background: var(--danger-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    display: block;
    border-right: 3px solid var(--danger);
}

.auth-message .success {
    color: var(--success);
    background: var(--success-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    display: block;
    border-right: 3px solid var(--success);
}

.auth-message .info {
    color: var(--info);
    background: var(--info-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    display: block;
    border-right: 3px solid var(--info);
}

.auth-message .warning {
    color: var(--accent-warning);
    background: var(--warning-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    display: block;
    border-right: 3px solid var(--accent-warning);
}

/* ============================================
   مودال
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: var(--spacing-lg);
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: var(--font-lg);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-800);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

/* ============================================
   توست (اعلان)
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 500px;
    direction: rtl;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    animation: slideIn 0.4s ease;
    border-right: 4px solid transparent;
}

.toast-item .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast-item .toast-content {
    flex: 1;
}
.toast-item .toast-title {
    font-weight: 600;
    font-size: var(--font-md);
}
.toast-item .toast-message {
    font-size: var(--font-sm);
    color: var(--gray-600);
}
.toast-item .toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
}

.toast-success {
    border-color: var(--success);
    background: var(--success-bg);
}
.toast-success .toast-icon { color: var(--success); }

.toast-error {
    border-color: var(--danger);
    background: var(--danger-bg);
}
.toast-error .toast-icon { color: var(--danger); }

.toast-warning {
    border-color: var(--accent-warning);
    background: var(--warning-bg);
}
.toast-warning .toast-icon { color: var(--accent-warning); }

.toast-info {
    border-color: var(--info);
    background: var(--info-bg);
}
.toast-info .toast-icon { color: var(--info); }

/* ============================================
   صفحه انتظار (Pending)
   ============================================ */
.pending-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: var(--spacing-lg);
}

.pending-card {
    max-width: 480px;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.pending-icon {
    font-size: 64px;
    color: var(--accent-warning);
    margin-bottom: var(--spacing-lg);
    animation: spin 2s linear infinite;
}

.pending-card h2 {
    font-size: var(--font-2xl);
    color: var(--gray-800);
}
.pending-card p {
    color: var(--gray-500);
    margin-bottom: var(--spacing-xl);
}

.pending-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    text-align: right;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}
.detail-item:last-child {
    border-bottom: none;
}
.detail-item .label {
    color: var(--gray-500);
}
.detail-item .value {
    font-weight: 500;
}
.detail-item .status-pending { color: var(--accent-warning); }
.detail-item .status-approved { color: var(--success); }
.detail-item .status-rejected { color: var(--danger); }

/* ============================================
   Badge
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--accent-warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: rgba(46, 204, 113, 0.15); color: var(--primary); }

/* ============================================
   DASHBOARD - هسته اصلی
   ============================================ */
.dashboard-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--spacing-lg);
    min-height: 70vh;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ===== سایدبار ===== */
.sidebar {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--spacing-lg);
    min-height: 100%;
}

.sidebar-header {
    text-align: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: var(--spacing-lg);
}

.sidebar-header .user-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    font-size: 32px;
    color: var(--white);
}

.sidebar-header h3 {
    font-size: var(--font-md);
    margin-bottom: 2px;
}

.sidebar-header small {
    color: var(--gray-400);
    font-size: var(--font-sm);
}

.sidebar-nav .menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.sidebar-nav .menu-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
}

.sidebar-nav .menu-item.active {
    background: rgba(46, 204, 113, 0.15);
    color: var(--primary);
}

.sidebar-nav .menu-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-nav .menu-item.logout-btn {
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: var(--spacing-lg);
    color: var(--danger);
}

.sidebar-nav .menu-item.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* ===== محتوای اصلی ===== */
.main-content {
    padding: var(--spacing-xl);
    background: var(--gray-50);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.dashboard-header h2 {
    font-size: var(--font-2xl);
    color: var(--gray-800);
}

/* ===== کارت‌های آمار ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.stat-card .stat-number {
    display: block;
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--gray-800);
}

.stat-card .stat-label {
    font-size: var(--font-sm);
    color: var(--gray-500);
}

/* ===== کارت محتوا ===== */
.content-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.content-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-200);
}

.content-card .card-title {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--gray-800);
}

.content-card .card-title i {
    margin-left: var(--spacing-sm);
    color: var(--primary);
}

/* ============================================
   جدول‌ها
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
}

.table thead {
    background: var(--gray-100);
}

.table th {
    padding: 12px 16px;
    text-align: right;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: var(--warning-bg);
    color: var(--accent-warning);
}
.status-badge.approved {
    background: var(--success-bg);
    color: var(--success);
}
.status-badge.rejected {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ============================================
   فایل آپلود
   ============================================ */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(46, 204, 113, 0.05);
}

.file-upload-icon {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: var(--spacing-sm);
}

.file-upload-text {
    color: var(--gray-600);
}

.file-upload-text .browse-btn {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: var(--spacing-xs);
}

.file-list {
    margin-top: var(--spacing-sm);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
}

.file-item .file-name {
    flex: 1;
    font-size: var(--font-sm);
}
.file-item .file-size {
    font-size: 12px;
    color: var(--gray-400);
}
.file-item .file-remove {
    color: var(--danger);
    cursor: pointer;
}

/* ============================================
   نقش‌های سازمانی
   ============================================ */
.organization-roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.role-chip {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.role-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.role-chip.selected {
    border-color: var(--primary);
    background: rgba(46, 204, 113, 0.05);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.role-chip .role-chip-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.role-chip .role-chip-title {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--gray-800);
}

.role-chip .role-chip-desc {
    font-size: 12px;
    color: var(--gray-500);
}

.role-chip .role-chip-check {
    color: var(--gray-300);
    font-size: 20px;
    transition: var(--transition);
}

.role-chip.selected .role-chip-check {
    color: var(--primary);
}

/* ============================================
   آزمون (Quiz)
   ============================================ */
.quiz-container {
    padding: var(--spacing-md);
}

.quiz-question {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-right: 3px solid var(--primary);
}

.quiz-question .question-text {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.quiz-question .question-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.quiz-option:hover {
    background: var(--gray-100);
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   چت
   ============================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}

.chat-messages {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chat-messages .message {
    max-width: 80%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius);
    font-size: var(--font-sm);
    animation: slideIn 0.3s ease;
}

.chat-messages .message.user {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-left-radius: 4px;
}

.chat-messages .message.system {
    align-self: flex-start;
    background: var(--gray-100);
    color: var(--gray-700);
    border-bottom-right-radius: 4px;
}

.chat-input {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.chat-input input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: var(--font-md);
    outline: none;
    transition: var(--transition);
}

.chat-input input:focus {
    border-color: var(--primary);
}

.chat-input button {
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.chat-input button:hover {
    background: var(--primary-dark);
}

/* ============================================
   کلاس‌های کمکی
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--gray-500); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }

.w-100 { width: 100%; }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.radius-sm { border-radius: var(--radius-sm); }
.radius { border-radius: var(--radius); }
.radius-lg { border-radius: var(--radius-lg); }
.radius-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* ============================================
   ریسپانسیو
   ============================================ */
@media (max-width: 1024px) {
    .dashboard-shell {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 768px) {
   

    .auth-card {
        padding: var(--spacing-lg);
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
        border-radius: var(--radius);
    }

    .sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm);
        min-height: auto;
        border-radius: var(--radius) var(--radius) 0 0;
    }
 

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        width: 100%;
        overflow-x: auto;
    }

    .sidebar-nav .menu-item {
        padding: 8px 14px;
        font-size: var(--font-sm);
        white-space: nowrap;
        margin-bottom: 0;
    }

    .sidebar-nav .menu-item.logout-btn {
        margin-top: 0;
        padding-top: 8px;
        border-top: none;
    }

    .sidebar-nav .menu-item i {
        font-size: 14px;
        width: auto;
    }

    .main-content {
        padding: var(--spacing-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .stat-card {
        padding: var(--spacing-md);
    }
    .stat-card i {
        font-size: 24px;
    }
    .stat-card .stat-number {
        font-size: var(--font-xl);
    }

    .organization-roles-container {
        grid-template-columns: 1fr 1fr;
    }

    .modal {
        margin: var(--spacing-md);
        max-height: 95vh;
    }
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }

    .chat-container {
        height: 400px;
    }

    .toast-container {
        max-width: 95%;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--spacing-md);
        border-radius: var(--radius);
    }

    .auth-logo i {
        font-size: 36px;
    }
    .auth-logo h2 {
        font-size: var(--font-lg);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card {
        padding: var(--spacing-sm);
    }
    .stat-card .stat-number {
        font-size: var(--font-lg);
    }

    .organization-roles-container {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 10px 16px;
        font-size: var(--font-sm);
        min-height: 40px;
    }

    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .chat-container {
        height: 300px;
    }
}
.auth-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: calc(100vh - 80px);
            padding: 20px;
        }

        .auth-card {
            /*! max-width: 420px; */
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            /*! backdrop-filter: blur(20px); */
            /*! -webkit-backdrop-filter: blur(20px); */
            /*! border-radius: 32px; */
            /*! padding: 48px 40px 40px; */
            border: 1px solid rgba(255, 255, 255, 0.08);
            /*! box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5); */
        }

        .auth-card .auth-logo {
            text-align: center;
            margin-bottom: 36px;
        }

        .auth-card .auth-logo .logo-icon {
		width: 100px;
		  height: 100px;
		  display: inline-flex;
		  justify-content: center;
		  font-size: 28px;
		  color: white;
        }

        .auth-card .auth-logo h1 {
            font-size: 22px;
            font-weight: 900;
            color: #ffffff;
            margin-bottom: 4px;
        }

        .auth-card .auth-logo p {
            color: rgba(255, 255, 255, 0.4);
            font-size: 14px;
        }

        .input-group {
            margin-bottom: 20px;
        }

        .input-group label {
            display: block;
            color: rgba(255, 255, 255, 0.6);
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .input-group input {
            width: 100%;
            padding: 14px 16px;
            background: rgba(255, 255, 255, 0.06);
            border: 2px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            font-size: 16px;
            color: #ffffff;
            transition: all 0.3s ease;
            outline: none;
        }

        .input-group input:focus {
            border-color: rgba(46, 204, 113, 0.5);
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.08);
        }

        .input-group input::placeholder {
            color: rgba(255, 255, 255, 0.25);
        }

        .btn-primary {
            width: 100%;
            padding: 16px;
            background: linear-gradient(135deg, #2ecc71, #27ae60);
            border: none;
            border-radius: 16px;
            font-size: 16px;
            font-weight: 700;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 40px rgba(46, 204, 113, 0.3);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }

        .auth-message {
            margin-top: 16px;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 14px;
            display: none;
        }

        .auth-message.show {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        .auth-message.error {
            background: rgba(231, 76, 60, 0.12);
            border: 1px solid rgba(231, 76, 60, 0.2);
            color: #e74c3c;
        }

        .auth-message.success {
            background: rgba(46, 204, 113, 0.12);
            border: 1px solid rgba(46, 204, 113, 0.2);
            color: #2ecc71;
        }

        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 480px) {
            .auth-card {
                padding: 32px 24px 28px;
                border-radius: 24px;
            }
            .auth-card .auth-logo h1 { font-size: 18px; }
            .auth-card .auth-logo .logo-icon { width: 48px; height: 48px; font-size: 22px; }
        }
		/* ============================================
   افکت ستاره‌ها (Stars Background)
   ============================================ */

.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.stars, .stars1, .stars2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stars {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ccircle cx='50' cy='50' r='1.5' fill='white' opacity='0.8'/%3E%3Ccircle cx='150' cy='80' r='1' fill='white' opacity='0.6'/%3E%3Ccircle cx='250' cy='30' r='2' fill='white' opacity='0.9'/%3E%3Ccircle cx='350' cy='100' r='1.5' fill='white' opacity='0.7'/%3E%3Ccircle cx='80' cy='200' r='1' fill='white' opacity='0.5'/%3E%3Ccircle cx='180' cy='250' r='2' fill='white' opacity='0.8'/%3E%3Ccircle cx='300' cy='200' r='1.5' fill='white' opacity='0.6'/%3E%3Ccircle cx='100' cy='350' r='1' fill='white' opacity='0.7'/%3E%3Ccircle cx='200' cy='300' r='2' fill='white' opacity='0.9'/%3E%3Ccircle cx='350' cy='350' r='1.5' fill='white' opacity='0.5'/%3E%3C/svg%3E") repeat;
    animation: starsMove 200s linear infinite;
}

.stars1 {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Ccircle cx='30' cy='30' r='1' fill='white' opacity='0.4'/%3E%3Ccircle cx='120' cy='60' r='1.5' fill='white' opacity='0.5'/%3E%3Ccircle cx='220' cy='40' r='1' fill='white' opacity='0.3'/%3E%3Ccircle cx='60' cy='150' r='2' fill='white' opacity='0.6'/%3E%3Ccircle cx='160' cy='180' r='1' fill='white' opacity='0.4'/%3E%3Ccircle cx='280' cy='150' r='1.5' fill='white' opacity='0.5'/%3E%3Ccircle cx='40' cy='280' r='1' fill='white' opacity='0.3'/%3E%3Ccircle cx='140' cy='260' r='2' fill='white' opacity='0.6'/%3E%3Ccircle cx='260' cy='280' r='1' fill='white' opacity='0.4'/%3E%3C/svg%3E") repeat;
    animation: starsMove 150s linear infinite reverse;
    opacity: 0.6;
}

.stars2 {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ccircle cx='20' cy='20' r='0.8' fill='white' opacity='0.3'/%3E%3Ccircle cx='80' cy='50' r='1.2' fill='white' opacity='0.4'/%3E%3Ccircle cx='150' cy='30' r='0.8' fill='white' opacity='0.3'/%3E%3Ccircle cx='40' cy='120' r='1.5' fill='white' opacity='0.5'/%3E%3Ccircle cx='100' cy='140' r='0.8' fill='white' opacity='0.3'/%3E%3Ccircle cx='180' cy='120' r='1.2' fill='white' opacity='0.4'/%3E%3Ccircle cx='30' cy='190' r='0.8' fill='white' opacity='0.3'/%3E%3Ccircle cx='90' cy='180' r='1.5' fill='white' opacity='0.5'/%3E%3Ccircle cx='170' cy='190' r='0.8' fill='white' opacity='0.3'/%3E%3C/svg%3E") repeat;
    animation: starsMove 100s linear infinite;
    opacity: 0.4;
}

@keyframes starsMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-1000px);
    }
}

/* ===== ستاره‌های در حال سقوط (Shooting Stars) ===== */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shooting-stars::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    border-radius: 50%;
    animation: shootingStar1 8s infinite linear;
    top: 10%;
    left: 10%;
    transform: rotate(-45deg);
    opacity: 0;
}

.shooting-stars::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    animation: shootingStar2 12s infinite linear;
    top: 30%;
    left: 70%;
    transform: rotate(-30deg);
    opacity: 0;
    animation-delay: 4s;
}

@keyframes shootingStar1 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-45deg);
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 1;
        transform: translate(-200px, 200px) rotate(-45deg);
    }
    31% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes shootingStar2 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-30deg);
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 1;
        transform: translate(-150px, 150px) rotate(-30deg);
    }
    31% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* ============================================
   لامپ‌های رنگی (Router Lamps)
   ============================================ */

.router-lamps-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.router-center-text {
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    user-select: none;
    min-height: 20px;
    text-align: center;
}

.router-center-text:hover {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 5px;
}

.router-lamps-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 320px;
}

.router-lamps-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.router-lamp {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.router-lamp::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.8s ease;
}

.router-lamp.router-lit {
    transform: scale(1.2);
}

.router-lamp.router-lit::after {
    opacity: 0.6;
}

/* ===== رنگ‌های لامپ ===== */
.router-lamp[data-rt-color="blue"] { background: rgba(52, 152, 219, 0.15); }
.router-lamp[data-rt-color="blue"].router-lit { 
    background: #3498db; 
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
}

.router-lamp[data-rt-color="green"] { background: rgba(46, 204, 113, 0.15); }
.router-lamp[data-rt-color="green"].router-lit { 
    background: #2ecc71; 
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.6);
}

.router-lamp[data-rt-color="orange"] { background: rgba(243, 156, 18, 0.15); }
.router-lamp[data-rt-color="orange"].router-lit { 
    background: #f39c12; 
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
}

.router-lamp[data-rt-color="red"] { background: rgba(231, 76, 60, 0.15); }
.router-lamp[data-rt-color="red"].router-lit { 
    background: #e74c3c; 
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
}

.router-lamp[data-rt-color="purple"] { background: rgba(155, 89, 182, 0.15); }
.router-lamp[data-rt-color="purple"].router-lit { 
    background: #9b59b6; 
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.6);
}

.router-lamp[data-rt-color="cyan"] { background: rgba(26, 188, 156, 0.15); }
.router-lamp[data-rt-color="cyan"].router-lit { 
    background: #1abc9c; 
    box-shadow: 0 0 20px rgba(26, 188, 156, 0.6);
}

.router-lamp[data-rt-color="pink"] { background: rgba(233, 30, 99, 0.15); }
.router-lamp[data-rt-color="pink"].router-lit { 
    background: #e91e63; 
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.6);
}

.router-lamp[data-rt-color="lime"] { background: rgba(205, 220, 57, 0.15); }
.router-lamp[data-rt-color="lime"].router-lit { 
    background: #cddc39; 
    box-shadow: 0 0 20px rgba(205, 220, 57, 0.6);
}

/* ============================================
   ریسپانسیو لامپ‌ها
   ============================================ */
@media (max-width: 480px) {
    .router-lamp {
        width: 8px;
        height: 8px;
    }
    .router-lamps-row {
        gap: 4px;
    }
    .router-center-text {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .router-lamp {
        width: 6px;
        height: 6px;
    }
    .router-lamps-row {
        gap: 3px;
    }
    .router-center-text {
        font-size: 9px;
        letter-spacing: 1px;
    }
}
/* اضافه کردن به انتهای فایل style.css */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
 .dashboard-shell {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 0;
        min-height: 80vh;
        background: #ffffff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 24px rgba(0,0,0,0.06);
        border: 1px solid #e2e8f0;
    }

    /* ===== سایدبار ===== */
    .sidebar {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 0;
    }

    .sidebar-header {
        text-align: center;
        padding: 28px 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .sidebar-header .user-avatar {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 12px;
        font-size: 36px;
        color: white;
        box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3);
        overflow: hidden;
    }

    .sidebar-header .user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sidebar-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: white;
        margin-bottom: 2px;
    }

    .sidebar-header small {
        color: rgba(255,255,255,0.5);
        font-size: 13px;
    }

    .sidebar-header .user-status {
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 12px;
        color: rgba(255,255,255,0.6);
    }

    .sidebar-header .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
    }

    .sidebar-header .status-dot.pending { background: #f39c12; animation: pulse 2s infinite; }
    .sidebar-header .status-dot.approved { background: #2ecc71; }
    .sidebar-header .status-dot.rejected { background: #e74c3c; }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.3; }
    }

    /* ===== منو ===== */
    .sidebar-nav {
        flex: 1;
        padding: 8px 12px;
    }

    .sidebar-nav .menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 10px;
        color: rgba(255,255,255,0.6);
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 2px;
        font-size: 14px;
        position: relative;
    }

    /* Shared sidebar actions are buttons, but should look like the native menu items. */
    .sidebar-nav button.menu-item {
        width: 100%;
        border: 0;
        appearance: none;
        background: transparent;
        text-align: right;
        font-family: inherit;
        font-size: 14px;
        font-weight: normal;
        line-height: inherit;
    }

    .sidebar-nav .menu-item:hover {
        background: rgba(255,255,255,0.05);
        color: white;
    }

    .sidebar-nav .menu-item.active {
        background: rgba(46, 204, 113, 0.12);
        color: #2ecc71;
    }

    .sidebar-nav .menu-item.active::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 24px;
        background: #2ecc71;
        border-radius: 0 4px 4px 0;
    }

    .sidebar-nav .menu-item i {
        width: 20px;
        text-align: center;
        font-size: 16px;
    }

    .sidebar-nav .menu-item .badge {
        margin-right: auto;
        font-size: 11px;
        padding: 2px 10px;
        border-radius: 20px;
        background: rgba(46, 204, 113, 0.2);
        color: #2ecc71;
    }

    .sidebar-nav .menu-item .badge.badge-danger {
        background: rgba(231, 76, 60, 0.2);
        color: #e74c3c;
    }

    .sidebar-nav .menu-item.logout-btn {
        margin-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 14px;
        color: rgba(255,255,255,0.4);
    }

    .sidebar-nav .menu-item.logout-btn:hover {
        background: rgba(231, 76, 60, 0.1);
        color: #e74c3c;
    }

    /* ===== فوتر سایدبار ===== */
    .sidebar-footer {
        padding: 12px 16px;
        border-top: 1px solid rgba(255,255,255,0.06);
        text-align: center;
    }

    .sidebar-footer .sidebar-version {
        font-size: 11px;
        color: rgba(255,255,255,0.2);
    }

    /* ===== محتوای اصلی ===== */
    .main-content {
        background: #f8fafc;
        padding: 28px 32px;
        min-height: 80vh;
    }

    /* ===== هدر ===== */
    .dashboard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 28px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-left h2 {
        font-size: 24px;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: 2px;
    }

    .header-left .header-subtitle {
        color: #64748b;
        font-size: 14px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .btn-refresh, .btn-notification {
        width: 40px;
        height: 40px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: white;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        position: relative;
    }

    .btn-refresh:hover, .btn-notification:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

    .btn-refresh:active {
        transform: rotate(180deg);
    }

    .btn-notification .notification-dot {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 8px;
        height: 8px;
        background: #e74c3c;
        border-radius: 50%;
        border: 2px solid white;
        display: none;
    }

    .header-date {
        font-size: 14px;
        color: #64748b;
        background: white;
        padding: 8px 16px;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
    }

    /* ===== کارت‌های آمار ===== */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-bottom: 28px;
    }

    .stat-card {
        background: white;
        border-radius: 14px;
        padding: 20px 24px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        display: flex;
        align-items: center;
        gap: 16px;
        transition: all 0.3s ease;
        border: 1px solid #e2e8f0;
    }

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .stat-card .stat-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        flex-shrink: 0;
    }

    .stat-card .stat-info {
        flex: 1;
    }

    .stat-card .stat-number {
        display: block;
        font-size: 26px;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.2;
    }

    .stat-card .stat-label {
        font-size: 13px;
        color: #64748b;
    }

    /* ===== محتوای داینامیک ===== */
    #roleContent {
        margin-top: 8px;
    }

    /* ===== ریسپانسیو ===== */
    @media (max-width: 1200px) {
        .stats-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 768px) {
        .dashboard-shell {
            grid-template-columns: 1fr;
            border-radius: 12px;
        }

        .sidebar {
            min-height: auto;
            border-radius: 12px 12px 0 0;
        }

        .sidebar-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            padding: 8px;
        }

     

        .sidebar-nav .menu-item .badge {
            display: none;
        }

        .sidebar-header {
            padding: 16px;
        }

        .sidebar-header .user-avatar {
            width: 56px;
            height: 56px;
            font-size: 28px;
        }

        .main-content {
            padding: 16px;
        }

        .stats-grid {
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .stat-card {
            padding: 14px 16px;
        }

        .stat-card .stat-number {
            font-size: 20px;
        }

        .stat-card .stat-icon {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .dashboard-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .header-actions {
            width: 100%;
            justify-content: flex-start;
        }

        .header-date {
            font-size: 12px;
            padding: 6px 12px;
        }
    }

    @media (max-width: 480px) {
        .stats-grid {
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .stat-card {
            padding: 12px;
            flex-direction: column;
            text-align: center;
        }

        .stat-card .stat-number {
            font-size: 18px;
        }

        .stat-card .stat-label {
            font-size: 11px;
        }

        .stat-card .stat-icon {
            width: 36px;
            height: 36px;
            font-size: 16px;
        }
    }
    /* ============================================
   استایل اختصاصی Admin (با ریسپانسیو کامل)
   ============================================ */

/* ===== منوی گروهی ===== */
.menu-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.menu-group-title {
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 14px 8px;
    font-weight: 600;
}

.sidebar-nav .menu-item .badge {
    margin-right: auto;
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 20px;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.sidebar-nav .menu-item .badge.badge-danger {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.sidebar-footer .system-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
}

.sidebar-footer .status-dot.online {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ecc71;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* ===== محتوای Admin ===== */
#adminContent {
    margin-top: 4px;
}

/* ===== دکمه همبرگر ===== */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hamburger-menu span {
    font-size: 12px;
}

/* ===== اوورلی ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   ریسپانسیو
   ============================================ */

/* ===== تبلت و موبایل ===== */
@media (max-width: 992px) {
    .hamburger-menu {
        display: flex !important;
    }
    
    .sidebar {
        position: fixed;
        right: -300px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        background: #0f172a;
        padding-top: 20px;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    
    .sidebar.open {
        right: 0;
    }
    
    .main-content {
        margin-right: 0 !important;
        padding: 10px !important;
        width: 100% !important;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
        padding: 10px 0 !important;
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-left h2 {
        font-size: 18px !important;
    }
    
    .header-date {
        font-size: 11px !important;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .admin-stat-card {
        padding: 12px 14px !important;
    }
    
    .admin-stat-card .stat-number {
        font-size: 18px !important;
    }
    
    .admin-stat-card .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
}

/* ===== موبایل کوچک ===== */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
    }
    
    .admin-stat-card {
        padding: 10px 12px !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: right !important;
    }
    
    .admin-stat-card .stat-number {
        font-size: 16px !important;
    }
    
    .admin-stat-card .stat-label {
        font-size: 10px !important;
    }
    
    .admin-stat-card .stat-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    
    /* جدول‌ها */
    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table-wrap table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .admin-table-wrap table th,
    .admin-table-wrap table td {
        padding: 6px 8px !important;
        white-space: nowrap;
    }
    
    .admin-table-wrap .table-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px !important;
    }
    
    .admin-table-wrap .table-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* دکمه‌ها */
    .btn-admin {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
    
    .btn-admin-sm {
        font-size: 10px !important;
        padding: 2px 8px !important;
    }
    
    /* فیلترها */
    .filter-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    
    .filter-container select,
    .filter-container input {
        font-size: 12px !important;
        padding: 6px 10px !important;
        width: 100% !important;
    }
    
    /* صفحه‌بندی */
    #casesPagination {
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    #casesPageButtons .page-btn {
        padding: 2px 8px !important;
        font-size: 11px !important;
    }
    
    /* مودال */
    .modal-overlay > div {
        width: 95% !important;
        max-width: 95% !important;
        padding: 16px !important;
        margin: 10px !important;
    }
    
    .modal-overlay .info-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .modal-overlay .field-row {
        flex-wrap: wrap !important;
    }
    
    .modal-overlay .field-row .label {
        width: 100% !important;
        font-size: 11px !important;
    }
}

/* ===== موبایل خیلی کوچک ===== */
@media (max-width: 480px) {
    .sidebar {
        width: 260px;
        right: -280px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
    }
    
    .admin-stat-card {
        padding: 8px 10px !important;
    }
    
    .admin-stat-card .stat-number {
        font-size: 14px !important;
    }
    
    .admin-stat-card .stat-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    .admin-table-wrap table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .admin-table-wrap table th,
    .admin-table-wrap table td {
        padding: 4px 6px !important;
    }
    
    .header-left h2 {
        font-size: 16px !important;
    }
    
    .header-left .header-subtitle {
        font-size: 11px !important;
    }
    
    .hamburger-menu {
        padding: 6px 10px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }
    
    .hamburger-menu span {
        font-size: 10px;
    }
}
 .dashboard-shell { display: flex; min-height: 100vh; background: #f1f5f9; }
    .sidebar { width: 260px; background: #0f172a; color: white; display: flex; flex-direction: column; min-height: 100vh; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
    .sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .sidebar-header .user-avatar { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; background: linear-gradient(135deg, #2ecc71, #27ae60); display: flex; align-items: center; justify-content: center; font-size: 32px; color: white; }
    .sidebar-header h3 { font-size: 16px; font-weight: 600; margin: 0; color: white; }
    .sidebar-header small { font-size: 12px; color: #94a3b8; display: block; margin-top: 2px; }
    .sidebar-header .user-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #94a3b8; }
    .sidebar-header .status-dot.approved { background: #2ecc71; }
    .sidebar-nav {display: block !important; flex: 1; padding: 8px 0; overflow-y: auto; }
    .menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: rgba(255,255,255,0.6); cursor: pointer; transition: all 0.3s ease; border-right: 3px solid transparent; font-size: 13px; }
    .menu-item:hover { background: rgba(255,255,255,0.05); color: white; }
    .menu-item.active { background: rgba(46,204,113,0.1); color: #2ecc71; border-right-color: #2ecc71; }
    .menu-item i:first-child { width: 20px; text-align: center; font-size: 15px; }
    .menu-item.locked { opacity: 0.4; pointer-events: none; cursor: not-allowed; }
    .menu-item.locked::after { content: "🔒"; font-size: 12px; margin-right: auto; opacity: 0.6; }
    .menu-item.logout-btn { margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 12px; color: #e74c3c; }
    .menu-item.logout-btn:hover { background: rgba(231,76,60,0.1); }
    .sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; flex-shrink: 0; }
    .sidebar-footer .sidebar-version { font-size: 11px; color: rgba(255,255,255,0.2); }
    .main-content { flex: 1; padding: 20px; background: #f1f5f9; min-height: 100vh; overflow-x: hidden; }
    .dashboard-header { display: flex; justify-content: space-between; align-items: center; background: white; padding: 16px 24px; border-radius: 12px; border: 1px solid #e2e8f0; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .header-left h2 { margin: 0; font-size: 20px; color: #0f172a; }
    .header-left .header-subtitle { margin: 0; font-size: 13px; color: #64748b; }
    .header-actions { display: flex; align-items: center; gap: 12px; }
    .header-actions .btn-refresh { background: #f1f5f9; border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; transition: all 0.3s ease; font-size: 16px; color: #475569; }
    .header-actions .btn-refresh:hover { background: #e2e8f0; }
    .header-date { font-size: 13px; color: #64748b; white-space: nowrap; }
    .mandatory-form-section { background: white; border-radius: 12px; border: 1px solid #e2e8f0; padding: 20px; margin-bottom: 16px; }
    .mandatory-form-section .form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f39c12; }
    .mandatory-form-section .form-header h3 { margin: 0; color: #0f172a; font-size: 17px; }
    .mandatory-form-section .form-header .required-badge { background: #f39c12; color: white; padding: 2px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .field-group { margin-bottom: 12px; }
    .field-group label { display: block; font-size: 13px; color: #334155; margin-bottom: 4px; font-weight: 500; }
    .field-group label .required-star { color: #e74c3c; }
    .field-group input, .field-group select, .field-group textarea { width: 100%; padding: 8px 12px; border-radius: 6px; border: 1px solid #e2e8f0; font-size: 14px; font-family:   inherit, sans-serif; }
    .field-group input:focus, .field-group select:focus, .field-group textarea:focus { outline: none; border-color: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,0.1); }
    .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
    .btn-submit-form { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; }
    .btn-submit-form:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46,204,113,0.3); }
    .btn-submit-form:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .page-locked-overlay { position: relative; }
    .page-locked-overlay::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.6); backdrop-filter: blur(2px); z-index: 10; border-radius: 12px; }
    .page-locked-overlay::after { content: "🔒 برای دسترسی به این بخش، ابتدا فرم اجباری را تکمیل کنید"; position: absolute; inset: 0; z-index: 11; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #475569; text-align: center; padding: 20px; font-weight: 500; }
    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
    .stat-card { background: white; border-radius: 12px; padding: 16px 20px; border: 1px solid #e2e8f0; display: flex; align-items: center; gap: 14px; }
    .stat-card .stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
    .stat-card .stat-number { display: block; font-size: 20px; font-weight: 700; color: #0f172a; }
    .stat-card .stat-label { font-size: 12px; color: #64748b; }
    .content-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; padding: 16px 20px; margin-bottom: 16px; }
    .content-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
    .content-card .card-title { margin: 0; font-size: 15px; color: #0f172a; }
    @media (max-width: 768px) { .sidebar { width: 220px; } .dashboard-header { flex-direction: column; align-items: flex-start; } .header-actions { width: 100%; justify-content: space-between; } }
    @media (max-width: 480px) { .sidebar { width: 180px; } .menu-item { font-size: 12px; padding: 8px 12px; } }
.field-group.field-half {
    grid-column: span 1;
}

.field-group.field-full {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .field-group.field-half,
    .field-group.field-full {
        grid-column: span 2;
    }
}
/* استایل برای مراحل فرم */
.step-badge {
    background: #3498db;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.step-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-right: 4px solid #3498db;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.btn-prev-step {
    background: #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-prev-step:hover {
    background: #cbd5e1;
}

.btn-next-step {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-next-step:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-datepicker {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-datepicker:hover {
    background: #e2e8f0;
}

/* استایل برای سوالات آزمون */
.quiz-question {
    transition: all 0.2s ease;
}

.quiz-question:hover {
    border-color: #3498db;
    background: #f1f5f9;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    .form-actions button {
        width: 100%;
        justify-content: center;
    }
    .fields-grid {
        grid-template-columns: 1fr !important;
    }
}
/* استایل تقویم شمسی */
.datepicker-popup {
    min-width: 250px;
    max-width: 300px;
}

.datepicker-popup span {
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.datepicker-popup span:hover:not([style*="color:#e2e8f0"]) {
    background: #f1f5f9;
}

.date-nav-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #475569;
    transition: all 0.2s ease;
}

.date-nav-btn:hover {
    background: #f1f5f9;
}

.date-action-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    transition: all 0.2s ease;
}

.date-action-btn:hover {
    background: #f1f5f9;
}

.date-action-btn.primary {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.date-action-btn.primary:hover {
    background: #27ae60;
}

.btn-datepicker {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-datepicker:hover {
    background: #e2e8f0;
}

/* استایل برای فیلدهای فرم */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family:   inherit, sans-serif;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-control-file {
    padding: 6px 0;
    width: 100%;
}

.help-text {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.required-star {
    color: #e74c3c;
    margin-right: 2px;
}
/* ===== استایل فایل آپلود ===== */
.file-upload-wrapper {
    width: 100%;
    position: relative;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px dashed #2ecc71;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0f172a;
    font-size: 13px;
    font-weight: 500;
}

.file-upload-label:hover {
    background: #e8f5e9;
    border-color: #27ae60;
}

.file-upload-label i {
    color: #2ecc71;
    font-size: 18px;
}

.form-control-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* دکمه مرحله بعد و قبل */
.btn-prev-step, .btn-next-step {
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
}
/* ===== استایل سوالات آزمون ===== */
.quiz-question {
    transition: all 0.2s ease;
}

.quiz-question:hover {
    border-color: #3498db;
    background: #f1f5f9;
}

.quiz-question input[type="radio"],
.quiz-question input[type="checkbox"] {
    accent-color: #2ecc71;
    cursor: pointer;
}

.quiz-question input[type="radio"]:checked + label,
.quiz-question input[type="checkbox"]:checked + label {
    color: #2ecc71;
    font-weight: 600;
}

.quiz-container .questions-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.quiz-container .questions-list::-webkit-scrollbar {
    width: 4px;
}

.quiz-container .questions-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.quiz-container .questions-list::-webkit-scrollbar-thumb {
    background: #2ecc71;
    border-radius: 4px;
}

/* ===== ریسپانسیو برای موبایل ===== */
@media (max-width: 768px) {
    .quiz-question {
        padding: 12px !important;
    }
    
    .quiz-question input[type="radio"],
    .quiz-question input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }
    
    .quiz-question label {
        font-size: 13px !important;
    }
}
/* ===== استایل برای سایدبار ===== */
.menu-item .badge {
    margin-right: auto;
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 20px;
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}
/* ============================================
   استایل لیست درخواست‌ها - نسخه کامل
   ============================================ */

/* ===== کانتینر اصلی درخواست‌ها ===== */
.requests-container {
    padding: 10px 0;
}

.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.requests-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.requests-header h3 i {
    color: #2ecc71;
}

.requests-header .requests-count {
    font-size: 13px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 14px;
    border-radius: 20px;
}

/* ===== کارت درخواست ===== */
.request-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.request-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.request-card.status-pending::before {
    background: #f39c12;
}

.request-card.status-approved::before {
    background: #2ecc71;
}

.request-card.status-rejected::before {
    background: #e74c3c;
}

.request-card.status-in_progress::before {
    background: #3498db;
}

.request-card:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* ===== هدر کارت ===== */
.request-card .request-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.request-card .request-info {
    flex: 1;
    min-width: 200px;
}

.request-card .request-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.request-card .request-title .id {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
}

.request-card .request-title .form-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

/* ===== وضعیت ===== */
.request-status {
    font-size: 11px;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.request-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.request-status.approved {
    background: #d4edda;
    color: #155724;
}

.request-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

.request-status.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.request-status i {
    font-size: 11px;
}

/* ===== اطلاعات پایین کارت ===== */
.request-card .request-meta {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
}

.request-card .request-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.request-card .request-meta .user-name {
    font-weight: 500;
    color: #0f172a;
}

.request-card .request-meta .role-badge {
    background: #f1f5f9;
    padding: 1px 10px;
    border-radius: 12px;
    font-size: 10px;
    color: #475569;
}

/* ===== یادداشت ادمین ===== */
.request-card .admin-note {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    border-right: 3px solid #3498db;
    display: flex;
    align-items: center;
    gap: 6px;
}

.request-card .admin-note i {
    color: #3498db;
}

/* ===== دکمه‌های عملیات ===== */
.request-card .request-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.request-card .request-actions .btn-detail {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.request-card .request-actions .btn-detail:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.request-card .request-actions .btn-detail i {
    font-size: 12px;
}

.request-card .request-actions .btn-cancel {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.request-card .request-actions .btn-cancel:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* ===== خالی بودن لیست ===== */
.requests-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.requests-empty i {
    color: #cbd5e1;
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.requests-empty h4 {
    color: #475569;
    margin: 0;
    font-size: 16px;
}

.requests-empty p {
    color: #94a3b8;
    font-size: 13px;
    margin: 8px 0 0;
}

/* ============================================
   مودال جزئیات درخواست
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-overlay .modal-header h4 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
}

.modal-overlay .modal-header h4 i {
    color: #2ecc71;
}

.modal-overlay .modal-header .modal-status {
    font-size: 12px;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.modal-overlay .modal-header .modal-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.modal-overlay .modal-header .modal-status.approved {
    background: #d4edda;
    color: #155724;
}

.modal-overlay .modal-header .modal-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

.modal-overlay .modal-header .modal-status.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.modal-overlay .modal-body {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.modal-overlay .modal-body .field-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.modal-overlay .modal-body .field-row:last-child {
    border-bottom: none;
}

.modal-overlay .modal-body .field-label {
    font-weight: 500;
    color: #334155;
    min-width: 140px;
    font-size: 13px;
}

.modal-overlay .modal-body .field-value {
    color: #0f172a;
    font-size: 13px;
}

.modal-overlay .modal-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.modal-overlay .modal-footer .btn-close {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-overlay .modal-footer .btn-close:hover {
    background: #e2e8f0;
}

.modal-overlay .modal-footer .btn-cancel {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-overlay .modal-footer .btn-cancel:hover {
    background: #fecaca;
}

.modal-overlay .admin-note-box {
    background: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    border-right: 3px solid #f39c12;
    margin-bottom: 12px;
}

.modal-overlay .admin-note-box .note-title {
    font-weight: 600;
    color: #d97706;
    font-size: 13px;
}

.modal-overlay .admin-note-box .note-text {
    color: #856404;
    font-size: 13px;
}

/* ============================================
   ریسپانسیو
   ============================================ */

@media (max-width: 768px) {
    .request-card {
        padding: 12px 14px;
    }
    
    .request-card .request-top {
        flex-direction: column;
        align-items: stretch;
    }
    
    .request-card .request-actions {
        margin-top: 10px;
        justify-content: flex-start;
    }
    
    .request-card .request-meta {
        gap: 10px;
        font-size: 11px;
    }
    
    .modal-overlay .modal-content {
        padding: 16px;
        margin: 10px;
        border-radius: 12px;
    }
    
    .modal-overlay .modal-body .field-row {
        flex-wrap: wrap;
    }
    
    .modal-overlay .modal-body .field-label {
        width: 100%;
        min-width: unset;
        font-size: 12px;
    }
    
    .modal-overlay .modal-body .field-value {
        font-size: 12px;
        padding-right: 4px;
    }
    
    .modal-overlay .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .modal-overlay .modal-footer {
        flex-direction: column;
    }
    
    .modal-overlay .modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .request-card {
        padding: 10px;
    }
    
    .request-card .request-title .id {
        font-size: 13px;
    }
    
    .request-card .request-title .form-name {
        font-size: 12px;
    }
    
    .request-status {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .request-card .request-actions .btn-detail,
    .request-card .request-actions .btn-cancel {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .requests-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ===== استایل دکمه‌های عمومی ===== */
.btn-admin {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    
}

.btn-admin:hover {
    transform: translateY(-1px);
}

.btn-admin-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}
.btn-admin-secondary:hover {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-admin-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-admin-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.btn-admin-danger:hover {
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}
/* ============================================
   استایل ریسپانسیو سایدبار
   ============================================ */

 /* ============================================
   استایل ریسپانسیو سایدبار - اصلاح شده
   ============================================ */

/* ===== دکمه همبرگر ===== */
.hamburger-menu {
    display: none !important;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.hamburger-menu:hover {
    background: #27ae60;
    transform: scale(1.05);
}

.hamburger-menu i {
    font-size: 20px;
    color: white;
}

/* ===== اوورلی ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block !important;
}

/* ============================================
   ریسپانسیو برای تبلت و موبایل
   ============================================ */

@media (max-width: 992px) {
    /* ===== همبرگر ===== */
    .hamburger-menu {
        display: flex !important;
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 1001;
    }

    /* ===== سایدبار ===== */
    .sidebar {
        position: fixed !important;
        right: -100% !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 80% !important;
        z-index: 1000 !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        background: #0f172a !important;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3) !important;
        height: 100vh !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar.open {
        right: 0 !important;
    }

    /* ===== هدر سایدبار ===== */
    .sidebar .sidebar-header {
        padding: 20px 16px 16px !important;
        padding-top: 50px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        flex-shrink: 0 !important;
    }

    .sidebar .sidebar-header .user-avatar {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        margin: 0 auto 8px !important;
    }

    .sidebar .sidebar-header h3 {
        font-size: 15px !important;
        margin: 0 !important;
    }

    .sidebar .sidebar-header small {
        font-size: 11px !important;
        display: block !important;
        margin-top: 2px !important;
    }

    .sidebar .sidebar-header .user-status {
        font-size: 11px !important;
        margin-top: 4px !important;
    }

    /* ===== منوی سایدبار ===== */
    .sidebar .sidebar-nav {
        flex: 1 !important;
        padding: 8px 0 !important;
        overflow-y: auto !important;
    }

    .sidebar .menu-item {
        padding: 10px 16px !important;
        font-size: 13px !important;
        gap: 10px !important;
        min-height: 44px !important;
    }

    .sidebar .menu-item i:first-child {
        width: 20px !important;
        font-size: 15px !important;
        text-align: center !important;
    }

    .sidebar .menu-item span {
        font-size: 13px !important;
    }

    .sidebar .menu-item .badge {
        font-size: 10px !important;
        padding: 1px 8px !important;
    }

    .sidebar .menu-item.logout-btn {
        margin-top: 8px !important;
        padding-top: 12px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* ===== فوتر سایدبار ===== */
    .sidebar .sidebar-footer {
        padding: 10px 16px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        flex-shrink: 0 !important;
    }

    .sidebar .sidebar-footer .sidebar-version {
        font-size: 10px !important;
    }

    .sidebar .sidebar-footer .system-status {
        font-size: 10px !important;
        margin-top: 2px !important;
    }

    /* ===== محتوای اصلی ===== */
    .main-content {
        padding: 12px !important;
        width: 100% !important;
        min-height: 100vh !important;
        padding-top: 60px !important;
    }

    /* ===== هدر ===== */
    .dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px 14px !important;
        gap: 8px !important;
        margin-top: 0 !important;
    }

    .header-left h2 {
        font-size: 17px !important;
    }

    .header-left .header-subtitle {
        font-size: 12px !important;
    }

    .header-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .header-date {
        font-size: 11px !important;
    }

    /* ===== کارت‌های آمار ===== */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .stat-card {
        padding: 12px 14px !important;
        gap: 10px !important;
    }

    .stat-card .stat-number {
        font-size: 18px !important;
    }

    .stat-card .stat-label {
        font-size: 10px !important;
    }

    .stat-card .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    /* ===== فیلدهای فرم ===== */
    .fields-grid {
        grid-template-columns: 1fr !important;
    }

    .field-group.field-half {
        grid-column: span 2 !important;
    }

    .form-actions {
        flex-direction: column !important;
    }

    .form-actions button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* ===== مودال ===== */
    .modal-overlay > div,
    .custom-modal-overlay > div {
        width: 95% !important;
        max-width: 95% !important;
        padding: 14px !important;
        margin: 10px !important;
        border-radius: 12px !important;
        max-height: 95vh !important;
    }

    /* ===== جدول درخواست‌ها ===== */
    .admin-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .admin-table-wrap table {
        font-size: 12px !important;
        min-width: 550px !important;
    }

    .admin-table-wrap table th,
    .admin-table-wrap table td {
        padding: 6px 8px !important;
        white-space: nowrap !important;
        font-size: 11px !important;
    }

    /* ===== فیلترها ===== */
    .filter-container {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .filter-container select,
    .filter-container input {
        width: 100% !important;
    }
}

/* ============================================
   ریسپانسیو برای موبایل کوچک
   ============================================ */

@media (max-width: 480px) {
    .sidebar {
        width: 260px !important;
        max-width: 85% !important;
        right: -100% !important;
    }

    .hamburger-menu {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        top: 8px !important;
        right: 8px !important;
    }

    .hamburger-menu i {
        font-size: 16px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
    }

    .stat-card {
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .stat-card .stat-number {
        font-size: 15px !important;
    }

    .stat-card .stat-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    .stat-card .stat-label {
        font-size: 9px !important;
    }

    .header-left h2 {
        font-size: 15px !important;
    }

    .header-left .header-subtitle {
        font-size: 11px !important;
    }

    .dashboard-header {
        padding: 8px 10px !important;
    }

    .sidebar .menu-item {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-height: 38px !important;
    }

    .sidebar .menu-item span {
        font-size: 12px !important;
    }

    .btn-admin {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }

    .btn-admin-sm {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    .request-card {
        padding: 8px 10px !important;
    }

    .request-card .request-title .id {
        font-size: 12px !important;
    }

    .request-card .request-title .form-name {
        font-size: 11px !important;
    }

    .request-status {
        font-size: 9px !important;
        padding: 2px 8px !important;
    }
}

/* ============================================
   حالت تاچ برای موبایل
   ============================================ */

@media (hover: none) {
    .menu-item:active {
        background: rgba(46, 204, 113, 0.15) !important;
    }

    .btn-admin:active {
        transform: scale(0.95);
    }

    .stat-card:active {
        transform: scale(0.98);
    }
}
/* ============================================
   استایل‌های جدید برای پنل پیشران
   ============================================ */

/* ===== فیلتر شهر ===== */
.city-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(46, 204, 113, 0.2);
    white-space: nowrap;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.filter-search {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    min-width: 150px;
}

.filter-search:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* ===== استایل کسب‌وکارها ===== */
.business-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.business-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.business-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.business-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(46,204,113,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2ecc71;
    font-size: 18px;
}

.business-info {
    flex: 1;
}
.business-name { font-weight: 600; font-size: 14px; color: #0f172a; display: block; }
.business-desc { font-size: 12px; color: #64748b; }

.business-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.business-visits { font-size: 11px; color: #94a3b8; }

/* ===== استایل نقشه ===== */
.map-container {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 30px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-placeholder { text-align: center; }
.map-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.map-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== استایل فرصت‌ها ===== */
.opportunity-item, .problem-item, .followup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.opportunity-item:last-child,
.problem-item:last-child,
.followup-item:last-child { border-bottom: none; }

.opp-info, .prob-info, .followup-info { flex: 1; }
.opp-title, .prob-title, .followup-title { font-weight: 500; font-size: 14px; color: #0f172a; display: block; }
.opp-desc, .prob-desc, .followup-desc { font-size: 12px; color: #64748b; }

.problem-item.severity-high { border-right: 3px solid #e74c3c; }
.problem-item.severity-medium { border-right: 3px solid #f39c12; }

.followup-item.status-overdue { border-right: 3px solid #e74c3c; background: #fef2f2; }
.followup-item.status-today { border-right: 3px solid #f39c12; background: #fffbeb; }

/* ===== استایل تحلیل ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.analytics-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
}
.analytics-card i { font-size: 28px; display: block; margin-bottom: 6px; }
.analytics-card h4 { margin: 0 0 4px; font-size: 14px; color: #0f172a; }
.analytics-card p { margin: 0; font-size: 13px; color: #64748b; }

/* ===== استایل عملکرد ===== */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.perf-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}
.perf-label { display: block; font-size: 12px; color: #64748b; }
.perf-value { display: block; font-size: 24px; font-weight: 700; color: #0f172a; }
.perf-change { font-size: 12px; font-weight: 600; }
.perf-change.up { color: #2ecc71; }
.perf-change.down { color: #e74c3c; }

.perf-chart-placeholder {
    margin-top: 16px;
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
}

/* ===== استایل ارتباطات ===== */
.comm-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.comm-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    gap: 4px;
}
.comm-unit i { font-size: 24px; }
.comm-unit span { font-size: 13px; color: #0f172a; }
.comm-status { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 12px; }
.comm-status.online { background: #d4edda; color: #155724; }
.comm-status.offline { background: #f8d7da; color: #721c24; }
.comm-status.busy { background: #fff3cd; color: #856404; }

.comm-messages .comm-msg {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}
.msg-sender { font-weight: 600; font-size: 13px; color: #0f172a; min-width: 80px; }
.msg-text { flex: 1; font-size: 13px; color: #475569; }
.msg-time { font-size: 11px; color: #94a3b8; }

/* ===== استایل اعلان‌ها ===== */
.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f8fafc; padding: 10px 12px; border-radius: 8px; }

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-info { flex: 1; }
.notif-title { font-weight: 600; font-size: 13px; color: #0f172a; display: block; }
.notif-text { font-size: 12px; color: #64748b; }
.notif-time { font-size: 11px; color: #94a3b8; }
.notif-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== استایل پروفایل ===== */
.profile-container {
    display: flex;
    gap: 30px;
    padding: 10px 0;
}
.profile-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.avatar-large i { font-size: 80px; color: #cbd5e1; }

.profile-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
}
.profile-row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f8fafc;
}
.profile-label { font-weight: 500; color: #64748b; min-width: 100px; }

/* ===== استایل تنظیمات ===== */
.settings-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}
.settings-group:last-child { border-bottom: none; margin-bottom: 0; }
.settings-group h4 { margin: 0 0 12px; font-size: 15px; color: #0f172a; }

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.setting-item span { font-size: 14px; color: #334155; }

/* ===== سوئیچ ===== */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s ease;
}
.switch .slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s ease;
}
.switch input:checked + .slider { background: #2ecc71; }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ============================================
   ریسپانسیو استایل‌های اختصاصی
   ============================================ */

@media (max-width: 992px) {
    .business-grid { grid-template-columns: 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .performance-grid { grid-template-columns: 1fr 1fr; }
    .comm-grid { grid-template-columns: 1fr 1fr; }
    .profile-container { flex-direction: column; align-items: center; }
    .profile-info { grid-template-columns: 1fr; }
    .filter-container { flex-direction: column; align-items: stretch; }
}

@media (max-width: 768px) {
    .performance-grid { grid-template-columns: 1fr 1fr; }
    .comm-grid { grid-template-columns: 1fr 1fr; }
    .business-card { flex-wrap: wrap; gap: 6px; }
    .business-status { flex-direction: row; gap: 8px; width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px) {
    .opportunity-item, .problem-item, .followup-item {
        flex-wrap: wrap;
        gap: 4px;
    }
    .opportunity-item .status-badge,
    .problem-item .status-badge,
    .followup-item .status-badge {
        order: 1;
    }
    .performance-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .perf-value { font-size: 18px; }
    .comm-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .comm-unit { padding: 10px; }
    .comm-unit i { font-size: 18px; }
    .notif-item { flex-wrap: wrap; gap: 4px; }
    .notif-item .notif-time { width: 100%; text-align: left; }
    .city-filter-badge { font-size: 10px; padding: 2px 10px; }
}
/* ============================================
   استایل اصلی داشبورد - با سایدبار ثابت
   ============================================ */

.dashboard-shell {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
    position: relative;
}

/* ===== سایدبار ثابت ===== */
.sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== محتوای اصلی ===== */
.main-content {
    flex: 1;
    padding: 20px 24px;
    background: #f1f5f9;
    min-height: 100vh;
    overflow-y: auto;
    max-height: 100vh;
    overflow-x: hidden;
}

/* ===== اسکرول محتوا ===== */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   ریسپانسیو - تبلت و موبایل
   ============================================ */

@media (max-width: 992px) {
    .sidebar {
        position: fixed !important;
        right: -100% !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 80% !important;
        z-index: 1000 !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        background: #0f172a !important;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3) !important;
        height: 100vh !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        padding-top: 10px !important;
        position: fixed !important;
    }

    .sidebar.open {
        right: 0 !important;
    }

    .main-content {
        padding: 12px !important;
        padding-top: 60px !important;
        width: 100% !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    .hamburger-menu {
        display: flex !important;
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 1001;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 10px !important;
        padding-top: 56px !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 6px !important;
        padding-top: 50px !important;
    }
}

/* ============================================
   پوسته بصری مشترک پنل‌های کاربری
   فقط ظاهر پوسته را یکسان می‌کند؛ چیدمان و رفتار هر نقش حفظ می‌شود.
   ============================================ */
#app .dashboard-shell,
#app #leaderPanel {
    --panel-ink: #152238;
    --panel-muted: #718096;
    --panel-green: #14845b;
    --panel-line: #e7edf0;
    font-family: Vazirmatn, sans-serif !important;
    color: var(--panel-ink);
    background: #f4f7f6;
}

#app .dashboard-shell :is(button, input, select, textarea),
#app #leaderPanel :is(button, input, select, textarea) {
    font-family: Vazirmatn, sans-serif;
}

#app .dashboard-shell :not(i):not([class*="fa-"]),
#app #leaderPanel :not(i):not([class*="fa-"]) {
    font-family: Vazirmatn, sans-serif !important;
}

#app .dashboard-shell > .sidebar,
#app .dashboard-shell .sidebar,
#app #leaderPanel .leader-sidebar {
    background: #102b27 !important;
    color: #fff;
    border-left-color: rgba(255,255,255,.08);
    box-shadow: 0 0 0 1px rgba(12,42,32,.2);
}

#app .dashboard-shell .sidebar-nav .menu-item,
#app #leaderPanel .leader-nav-item {
    color: #b7cbc5;
    border-radius: 9px;
    font-family: Vazirmatn, sans-serif;
    transition: background .18s ease, color .18s ease;
}

#app .dashboard-shell .sidebar-nav .menu-item:hover,
#app .dashboard-shell .sidebar-nav .menu-item.active,
#app #leaderPanel .leader-nav-item:hover,
#app #leaderPanel .leader-nav-item.is-active {
    color: #fff;
    background: rgba(110,211,159,.16);
}

#app .dashboard-shell .sidebar-nav .menu-item.active,
#app #leaderPanel .leader-nav-item.is-active {
    box-shadow: inset -3px 0 #7edba8;
}

#app .dashboard-shell .main-content,
#app #leaderPanel .leader-main {
    color: var(--panel-ink);
    background: #f4f7f6;
}

#app .dashboard-shell .dashboard-header {
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid #e4ece7;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(21,43,36,.04);
}

#app .dashboard-shell .dashboard-header h2,
#app #leaderPanel .leader-header h1 {
    color: #12342d;
    font-family: Vazirmatn, sans-serif;
    font-weight: 700;
}

#app .dashboard-shell .header-subtitle,
#app .dashboard-shell .header-date,
#app #leaderPanel .leader-header p,
#app #leaderPanel .leader-date {
    color: var(--panel-muted);
}

#app .dashboard-shell .btn-refresh,
#app #leaderPanel .leader-refresh {
    border: 1px solid var(--panel-line);
    border-radius: 10px;
    color: #3c5a50;
    background: #fff;
    box-shadow: 0 3px 10px rgba(20,54,41,.04);
}

#app .dashboard-shell :is(.stat-card, .content-card, .cb-card, .cb-report-card, .cb-development-card),
#app #leaderPanel :is(.leader-stat, .leader-card) {
    border-color: #e4ece7;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(24,54,44,.03);
}

#app .dashboard-shell :is(.stat-card, .content-card, .cb-card, .cb-report-card, .cb-development-card) :is(h2, h3, h4),
#app #leaderPanel .leader-card-head h3 {
    color: #20392e;
    font-family: Vazirmatn, sans-serif;
}

#app .dashboard-shell :is(.btn-primary, .cb-primary),
#app #leaderPanel .leader-action-button:not(.leader-approve) {
    border-radius: 9px;
    color: #fff;
    background: var(--panel-green);
    font-family: Vazirmatn, sans-serif;
}

@media (max-width: 900px) {
    #app .dashboard-shell .dashboard-header {
        padding: 13px 14px;
    }
}