/**
 * فایل CSS مرکزی سیستم - طراحی مدرن و حرفه‌ای
 */

/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-bg);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* مخفی کردن دکمه خروج موبایل در دسکتاپ */
.mobile-logout-item {
    display: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: visible;
    max-width: 100%;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.15rem;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.main-nav li {
    position: relative;
    flex-shrink: 0;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 500;
    position: relative;
    flex-shrink: 0;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.main-nav a:active {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Dropdown Menu Styles */
.main-nav .dropdown {
    position: relative;
}

.main-nav .dropdown-toggle {
    cursor: pointer;
    position: relative;
}

.main-nav .dropdown-toggle .arrow {
    font-size: 0.7rem;
    margin-right: 0.25rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.main-nav .dropdown:hover .dropdown-toggle .arrow,
.main-nav .dropdown.active .dropdown-toggle .arrow {
    transform: rotate(180deg);
}

/* ایجاد یک منطقه نامرئی برای اتصال dropdown به منوی اصلی */
.main-nav .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 0.75rem;
    background: transparent;
    z-index: 999;
}

.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
    z-index: 1000;
    list-style: none;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.main-nav .dropdown:hover .dropdown-menu,
.main-nav .dropdown-menu:hover {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.main-nav .dropdown-menu li {
    margin: 0;
}

.main-nav .dropdown-menu a {
    color: #333;
    padding: 0.75rem 1.25rem;
    display: block;
    transition: all 0.2s ease;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: none;
}

.main-nav .dropdown-menu a:hover {
    background-color: #667eea;
    color: #ffffff;
    transform: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

/* مخفی کردن user-menu در موبایل */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

.username {
    font-weight: 600;
    font-size: 0.875rem;
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

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

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

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: var(--white);
}

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

.form-control:hover {
    border-color: var(--gray-400);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-left: 2.5rem;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: var(--white);
    cursor: text;
}

.autocomplete-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.autocomplete-input.error {
    border-color: var(--danger-color);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.25rem;
    direction: rtl;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--gray-100);
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: var(--gray-100);
}

.autocomplete-item.selected {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.autocomplete-no-result {
    padding: 1rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--gray-500);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--gray-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

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

thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

th {
    padding: 1rem 1.25rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem 1.25rem;
    text-align: right;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background-color: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--gray-900);
}

/* Search and Filter */
.search-filter-container {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
    display: inline-block;
}

.pagination a:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.pagination .active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
.main-footer {
    background-color: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.875rem;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem;
}

.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid .card {
    text-align: center;
    padding: 2rem;
}

.stats-grid .card-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.stats-grid .card > div {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* استایل کارت‌های آمار داشبورد */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.stat-card-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

/* رنگ‌بندی کارت‌های آمار */
.stat-card-primary {
    border-right-color: var(--primary-color);
}

.stat-card-primary .stat-card-value {
    color: var(--primary-color);
}

.stat-card-primary::before {
    background: var(--primary-color);
}

.stat-card-info {
    border-right-color: var(--info-color);
}

.stat-card-info .stat-card-value {
    color: var(--info-color);
}

.stat-card-info::before {
    background: var(--info-color);
}

.stat-card-success {
    border-right-color: var(--success-color);
}

.stat-card-success .stat-card-value {
    color: var(--success-color);
}

.stat-card-success::before {
    background: var(--success-color);
}

.stat-card-danger {
    border-right-color: var(--danger-color);
}

.stat-card-danger .stat-card-value {
    color: var(--danger-color);
}

.stat-card-danger::before {
    background: var(--danger-color);
}

.stat-card-warning {
    border-right-color: var(--warning-color);
}

.stat-card-warning .stat-card-value {
    color: var(--warning-color);
}

.stat-card-warning::before {
    background: var(--warning-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .header-content {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    /* مخفی کردن عناصر desktop-only در موبایل */
    .desktop-only {
        display: none !important;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        position: relative;
    }
    
    .logo {
        flex: 1;
        text-align: right;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: -1;
        margin-left: 1rem;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        justify-content: flex-start;
        padding: 4rem 0 2rem 0;
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul,
    .main-nav li,
    .main-nav a {
        pointer-events: auto;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav a {
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
        display: block;
        text-align: right;
    }
    
    /* نمایش دکمه خروج در منوی موبایل */
    .main-nav .mobile-logout-item {
        display: block;
        margin-top: auto;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
        border-bottom: none;
    }
    
    .main-nav .mobile-logout-item .logout-btn {
        background: rgba(255, 255, 255, 0.15);
        color: var(--white);
        font-weight: 600;
        text-align: center;
        border-radius: 0;
        transition: background 0.2s ease;
    }
    
    .main-nav .mobile-logout-item .logout-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    
    /* Dropdown در موبایل به صورت عمودی و قابل کلیک */
    .main-nav .dropdown {
        width: 100%;
    }
    
    .main-nav .dropdown-toggle {
        width: 100%;
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .main-nav .dropdown-toggle .arrow {
        margin-right: 0;
        margin-left: 0.5rem;
    }
    
    .main-nav .dropdown::before {
        display: none;
    }
    
    .main-nav .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: auto;
        margin-top: 0;
        margin-right: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.2);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: none;
        padding: 0;
    }
    
    .main-nav .dropdown.active .dropdown-menu {
        display: flex;
    }
    
    .main-nav .dropdown-menu a {
        padding: 0.875rem 2.5rem;
        font-size: 0.875rem;
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }
    
    .main-nav .dropdown-menu li:last-child a {
        border-bottom: none;
    }
    
    /* Overlay برای بستن منو - به صورت جداگانه */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* جلوگیری از اسکرول body وقتی منو باز است */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* اسکرول افقی برای محتوای اصلی */
    .main-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* جلوگیری از wrap شدن محتوا */
    .card, .table-container, .table-responsive {
        min-width: 100%;
        overflow-x: auto;
    }
}
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        border-radius: var(--radius);
    }
    
    table {
        font-size: 0.8125rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
