/* ============================================
   فونت استعداد (Estedad) - تمام وزن‌ها
   ============================================ */

/* استعداد - نازک (Thin) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* استعداد - بسیار سبک (Extra Light) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-ExteraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* استعداد - سبک (Light) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* استعداد - معمولی (Regular) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* استعداد - متوسط (Medium) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* استعداد - نیمه ضخیم (Semi Bold) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* استعداد - ضخیم (Bold) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* استعداد - بسیار ضخیم (Extra Bold) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-ExteraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* استعداد - سیاه (Black) */
@font-face {
    font-family: 'Estedad';
    src: url('/static/fonts/Estedad/Estedad-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   متغیرهای CSS (تم لایت - پیش‌فرض)
   ============================================ */
:root {
    /* رنگ‌های اصلی */
    --primary: #1e3a5f;
    --primary-dark: #0f2b45;
    --primary-light: #2c5a8c;
    --primary-glow: rgba(30, 58, 95, 0.15);
    
    --secondary: #2c3e50;
    --secondary-dark: #1a2632;
    --secondary-light: #34495e;
    
    /* رنگ‌های پس‌زمینه */
    --bg-primary: #f0f2f5;
    --bg-secondary: #e4e6eb;
    --bg-tertiary: #dce0e8;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.92);
    --bg-glass-dark: rgba(255, 255, 255, 0.98);
    
    /* رنگ‌های متن */
    --text-primary: #1a1a2e;
    --text-secondary: #2d3e50;
    --text-muted: #6c7a8e;
    --text-light: #9aa9bc;
    --text-white: #ffffff;
    
    /* رنگ‌های وضعیت */
    --success: #27ae60;
    --success-light: #d4edda;
    --success-dark: #1e8449;
    --warning: #f39c12;
    --warning-light: #fff3cd;
    --warning-dark: #d68910;
    --danger: #e74c3c;
    --danger-light: #f8d7da;
    --danger-dark: #c0392b;
    --info: #3498db;
    --info-light: #d1ecf1;
    --info-dark: #2980b9;
    
    /* سایه‌ها */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.16);
    --shadow-inner: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    
    /* مرزها */
    --border-radius-xs: 4px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    /* انیمیشن */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* افکت شیشه‌ای */
    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(0, 0, 0, 0.06);
    
    /* فاصله‌ها */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

/* ============================================
   تم دارک
   ============================================ */
[data-theme="dark"] {
    /* رنگ‌های اصلی */
    --primary: #5dade2;
    --primary-dark: #3498db;
    --primary-light: #85c1e9;
    --primary-glow: rgba(93, 173, 226, 0.2);
    
    /* رنگ‌های پس‌زمینه */
    --bg-primary: #0f1419;
    --bg-secondary: #1a202c;
    --bg-tertiary: #253141;
    --bg-card: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.92);
    --bg-glass-dark: rgba(15, 20, 25, 0.98);
    
    /* رنگ‌های متن */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    /* سایه‌ها */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    
    /* مرزها */
    --glass-border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   ریست و استایل پایه
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Estedad', 'Vazir', 'Tahoma', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    transition: background var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
}

/* ============================================
   اسکرول بار مدرن
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--border-radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   انتخاب متن
   ============================================ */
::selection {
    background: var(--primary);
    color: var(--text-white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--text-white);
}

/* ============================================
   کانتینرها (بهینه شده برای ریسپانسیو)
   ============================================ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* ============================================
   نوار ناوبری (بهینه شده)
   ============================================ */
.navbar {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: all var(--transition-normal);
    border-bottom: var(--glass-border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-nav {
    display: flex;
    gap: 12px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

/* ============================================
   دکمه‌ها (بهینه شده)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: 'Estedad', 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--text-white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    color: var(--text-white);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    color: var(--text-white);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   کارت‌ها (بهینه شده برای ریسپانسیو)
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    border: var(--glass-border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--bg-glass);
}

.card-header h4, .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: var(--glass-border);
    background: var(--bg-glass);
}

/* ============================================
   فرم‌ها (بهینه شده)
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: 'Estedad', 'Vazir', sans-serif;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* ============================================
   جدول‌ها (بهینه شده برای ریسپانسیو)
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--glass-border);
}

.table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.table tr:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   وضعیت‌ها و نشانگرها
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: var(--success-light);
    color: var(--success);
}

.status-pending, .status-pending_setup {
    background: var(--warning-light);
    color: var(--warning);
}

.status-suspended {
    background: var(--danger-light);
    color: var(--danger);
}

.status-expired {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ============================================
   آلرت و نوتیفیکیشن
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border-right: 4px solid var(--success);
}

.alert-danger, .alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border-right: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border-right: 4px solid var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: var(--info-dark);
    border-right: 4px solid var(--info);
}

/* ============================================
   انیمیشن‌ها
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.pulse {
    animation: pulse 1.5s ease infinite;
}

/* اسکلتون لودینگ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--border-radius-md);
}

/* اسپینر */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   دکمه تغییر تم (بهینه شده برای ریسپانسیو)
   ============================================ */
.theme-toggle {
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius-full);
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    font-family: 'Estedad', 'Vazir', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* دکمه تغییر تم آیکونی (برای نوار ناوبری) */
.theme-toggle-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-full);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 18px;
}

.theme-toggle-icon:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    transform: scale(1.05);
}

/* ============================================
   فوتر
   ============================================ */
footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    border-top: var(--glass-border);
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-card);
}

/* ============================================
   دکمه‌های کمکی
   ============================================ */
.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   وضعیت خالی
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 18px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   ریسپانسیو کامل و بهینه (تمام سایزها)
   ============================================ */

/* دستگاه‌های بزرگ (دسکتاپ) - 1200px به بالا */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* دستگاه‌های متوسط (لپ‌تاپ) - 992px تا 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* دستگاه‌های تبلت و کوچک - 768px تا 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 var(--spacing-md);
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        gap: 8px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .btn {
        padding: 7px 16px;
        font-size: 13px;
    }
    
    .card-header {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hide-on-tablet {
        display: none;
    }
}

/* دستگاه‌های موبایل (بزرگ) - 576px تا 767px */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 var(--spacing-md);
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .btn-lg {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .hide-on-mobile {
        display: none;
    }
    
    .d-sm-block {
        display: block;
    }
    
    .text-sm-center {
        text-align: center;
    }
}

/* دستگاه‌های موبایل (کوچک) - 481px تا 575px */
@media (min-width: 481px) and (max-width: 575px) {
    :root {
        --spacing-lg: 20px;
        --spacing-md: 12px;
        --border-radius-md: 10px;
        --border-radius-lg: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .nav-link {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .btn {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .btn-sm {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .btn-lg {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .alert {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    footer {
        margin-top: 40px;
        padding: 20px 0;
        font-size: 11px;
    }
    
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-icon {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 16px;
    }
    
    .hide-on-mobile {
        display: none;
    }
    
    .show-on-mobile {
        display: block;
    }
    
    .text-xs-center {
        text-align: center;
    }
}

/* دستگاه‌های موبایل (خیلی کوچک) - حداکثر 480px */
@media (max-width: 480px) {
    :root {
        --border-radius-md: 8px;
        --border-radius-lg: 12px;
        --spacing-lg: 16px;
        --spacing-md: 12px;
        --spacing-sm: 6px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .navbar {
        padding: 8px 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 8px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    .nav-link {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .card-header h4, .card-header h5 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .btn {
        padding: 4px 10px;
        font-size: 10px;
        gap: 4px;
    }
    
    .btn-sm {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    .btn-lg {
        padding: 6px 16px;
        font-size: 12px;
    }
    
    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-control {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .alert {
        padding: 8px 12px;
        font-size: 11px;
        gap: 8px;
    }
    
    .status-badge {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    footer {
        margin-top: 30px;
        padding: 16px 0;
        font-size: 10px;
    }
    
    .empty-state {
        padding: 30px 12px;
    }
    
    .empty-icon {
        font-size: 40px;
    }
    
    .empty-state h3 {
        font-size: 14px;
    }
    
    .empty-state p {
        font-size: 12px;
    }
    
    .theme-toggle {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .theme-toggle-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .hide-on-mobile {
        display: none;
    }
    
    .show-on-mobile {
        display: block;
    }
    
    .text-xs-center {
        text-align: center;
    }
    
    .w-xs-100 {
        width: 100%;
    }
    
    .mx-auto-xs {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   کلاس‌های کمکی (بهینه شده)
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.mx-auto { margin-left: auto; margin-right: auto; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-100 { width: 100%; }
.w-50 { width: 50%; }
.h-100 { height: 100%; }

.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-md { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: var(--border-radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* کلاس‌های ریسپانسیو کمکی */
@media (max-width: 768px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-flex { display: flex; }
    .text-sm-center { text-align: center; }
    .w-sm-100 { width: 100%; }
}

@media (max-width: 480px) {
    .d-xs-none { display: none; }
    .d-xs-block { display: block; }
    .text-xs-center { text-align: center; }
    .w-xs-100 { width: 100%; }
}