/* main.css - استایل‌های اصلی سامانه */
:root {
    /* رنگ‌های اصلی جدید */
    --primary-color: #0d0b93;          /* آبی تیره اصلی */
    --primary-light: #3a38c7;          /* آبی روشن‌تر */
    --primary-dark: #090772;           /* آبی تیره‌تر */
    --secondary-color: #f8cb10;        /* زرد اصلی */
    --secondary-light: #fadf70;        /* زرد روشن‌تر */
    --secondary-dark: #d9b00e;         /* زرد تیره‌تر */
    
    /* رنگ‌های سیستم */
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* رنگ‌های خاکستری */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* استایل‌ها */
    --border-radius: 12px;
    --box-shadow: 0 8px 32px rgba(13, 11, 147, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn FD NL', sans-serif;
    background-color: #f5f7fb;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* کانتینر */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* نوار وضعیت */
.status-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 8px 0;
    font-size: 14px;
    direction: ltr;
    text-align: center;
}

.status-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* هدر اصلی */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo a {
    text-decoration: none;
    color: var(--dark-color);
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.logo p {
    font-size: 14px;
    color: var(--gray-color);
}

/* منوی دسکتاپ */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-color);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.main-nav a:hover {
    background-color: #f0f2f5;
    color: var(--primary-color);
}

.main-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.logout-btn {
    background-color: #ffebee !important;
    color: var(--danger-color) !important;
}

/* دکمه منوی موبایل */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s;
}

/* منوی موبایل */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-color);
}

.mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-sidebar-content ul {
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s;
    border-right: 4px solid transparent;
}

.sidebar-link:hover {
    background-color: #f0f2f5;
    border-right-color: var(--primary-color);
}

.sidebar-link.active {
    background-color: #e8f0fe;
    border-right-color: var(--primary-color);
    color: var(--primary-color);
}

.mobile-user-info {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
    font-size: 14px;
}

/* محتوای اصلی */
.main-content {
    flex: 1;
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* کارت‌ها */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
    font-size: 20px;
}

/* داشبورد */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--gray-color);
    font-size: 14px;
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-family: 'Vazirmatn FD NL', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-success {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* پیغام‌ها */
.message {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* فرم‌ها */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Vazirmatn FD NL', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 175, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* فوتر */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 25px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
    font-size: 14px;
}

.footer-content p {
    margin-bottom: 5px;
}

/* صفحه‌بندی */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.page-btn:hover {
    background: #f0f2f5;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* بج وضعیت */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

.badge-draft {
    background-color: #fff3cd;
    color: #856404;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-sent_to_eitaa {
    background-color: #cce5ff;
    color: #004085;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-failed {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* جداول */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

table th {
    padding: 18px 15px;
    text-align: right;
    font-weight: 600;
    font-size: 15px;
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: #555;
}

table tbody tr {
    transition: all 0.3s;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* صفحات خاص */
.login-container,
.upload-container,
.profile-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.login-header,
.upload-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1,
.upload-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: var(--gray-color);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link a:hover {
    color: var(--primary-color);
}

/* فایل آپلود */
.file-input-container {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.file-input-container:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.btn-select {
    margin-top: 20px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-select:hover {
    background: var(--primary-color);
    color: white;
}

/* پیشرفت بارگذاری */
.progress {
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* نمایش رسانه */
.media-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-top: 10px;
}

/* گرید پویش‌ها */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.campaign-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.campaign-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.campaign-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.campaign-body {
    padding: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--gray-color);
    margin-top: 5px;
}

.campaign-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* تب‌ها */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
    overflow-x: auto;
}

.tab-btn,
.tab {
    padding: 12px 25px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Vazirmatn FD NL', sans-serif;
    font-size: 15px;
    color: var(--gray-color);
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover,
.tab:hover {
    color: var(--primary-color);
    background: #f0f7ff;
}

.tab-btn.active,
.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #f0f7ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* آمار فعالیت */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* لیست کاربران */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: #e8f0fe;
    color: var(--primary-color);
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    color: var(--info-color);
    text-decoration: none;
    font-size: 14px;
}

.btn-delete {
    color: var(--danger-color);
    text-decoration: none;
    font-size: 14px;
}

/* گزارشات */
.reports-header {
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.export-btn {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}