/* ========== متغیرهای اصلی ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #3b82f6;
    --info-dark: #2563eb;
    
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --header-height: 70px;
    
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== ساختار اصلی ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: -4px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.sidebar-brand i {
    font-size: 32px;
    color: #60a5fa;
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    padding: 8px 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar.collapsed .menu-section-title {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
    border-right: 3px solid transparent;
    font-size: 14px;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-right-color: rgba(255,255,255,0.5);
}

.menu-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-right-color: #60a5fa;
    font-weight: 600;
}

.menu-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar-footer {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.user-credit {
    font-size: 12px;
    color: #60a5fa;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar.collapsed .user-info {
    display: none;
}

/* ========== Main Content ========== */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-right: var(--sidebar-collapsed);
}

/* ========== Top Bar ========== */
.top-bar {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.page-heading {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 700;
}

.breadcrumb-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.breadcrumb-text i {
    font-size: 11px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.credit-display {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: var(--bg-color);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    position: relative;
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--border-color);
    color: var(--primary);
}

.icon-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid var(--card-bg);
}

/* ========== Page Body ========== */
.page-body {
    padding: 30px;
    flex: 1;
}

/* ========== Cards ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.stat-card:nth-child(2):hover {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.stat-card:nth-child(3):hover {
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.stat-card:nth-child(4):hover {
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.4);
}

.stat-card .stat-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* ========== Quick Actions ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.action-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.action-box:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-box i {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
    transition: var(--transition);
}

.action-box:hover i {
    transform: scale(1.1);
}

.action-box span {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

/* ========== Forms ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

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

.form-group label i {
    margin-left: 6px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-group input[type="file"] {
    padding: 10px;
    background: var(--bg-color);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

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

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

.btn-success:hover {
    background: var(--success-dark);
}

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

.btn-danger:hover {
    background: var(--danger-dark);
}

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

.btn-warning:hover {
    background: var(--warning-dark);
}

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

.btn-info:hover {
    background: var(--info-dark);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========== Tables ========== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.data-table th,
.data-table td {
    padding: 14px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: var(--bg-color);
}

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

/* ========== Alerts ========== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-right: 4px solid;
}

.alert i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: var(--info);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning);
}

.alert ul {
    margin-top: 8px;
    padding-right: 20px;
}

.alert code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* ========== API Key Input ========== */
.api-key-input {
    position: relative;
}

.api-key-input input {
    padding-left: 45px;
    font-family: monospace;
    direction: ltr;
    text-align: left;
}

.api-key-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 4px;
    transition: var(--transition);
}

.api-key-toggle:hover {
    color: var(--primary);
}

/* ========== Dropdown ========== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-header {
    padding: 15px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dropdown-header small {
    color: var(--text-secondary);
    font-size: 12px;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.dropdown-menu a i {
    font-size: 16px;
}

.dropdown-item-danger:hover {
    color: var(--danger) !important;
    background: #fee2e2 !important;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* ========== Notifications ========== */
.notification-item {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: var(--transition);
}

.notification-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 15px;
}

.notification-body {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 8px;
    font-size: 14px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== User List (API Keys) ========== */
.user-list-item {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.user-list-item:hover {
    background: var(--bg-color);
}

.user-list-item.active {
    background: #dbeafe;
    border-right: 3px solid var(--primary);
}

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

/* ========== Badges ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* ========== Loading Spinner ========== */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.collapsed {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .main-content.expanded {
        margin-right: 0;
    }
    
    .top-bar {
        padding: 0 15px;
    }
    
    .page-body {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-heading {
        font-size: 18px;
    }
    
    .breadcrumb-text {
        display: none;
    }
    
    .credit-display {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .dropdown-menu {
        left: auto;
        right: 0;
    }
    
    .card {
        padding: 16px;
    }
    
    .modal-box {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    .stat-card .stat-icon {
        font-size: 32px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ========== Print Styles ========== */
@media print {
    .sidebar,
    .top-bar,
    .btn,
    .menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

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

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-secondary { color: var(--text-secondary); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.hidden { display: none; }
.visible { display: block; }

.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
/* ========== فاصله بیشتر بین ستون‌های جدول ========== */
.data-table th,
.data-table td {
    padding: 16px 20px !important;  /* افزایش از 14px به 16px 20px */
}

.data-table th {
    letter-spacing: 0.3px;
}

/* فاصله بیشتر برای جداول خاص */
.users-table th,
.users-table td,
.lines-table th,
.lines-table td,
.groups-table th,
.groups-table td {
    padding: 18px 24px !important;
}

/* ========== استایل دکمه‌های عملیات در جدول ========== */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.action-btn-edit {
    background: #3b82f6;
    color: white;
}

.action-btn-delete {
    background: #ef4444;
    color: white;
}

.action-btn-view {
    background: #10b981;
    color: white;
}

/* ========== استایل تاریخ انقضا ========== */
.expiry-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.expiry-active {
    background: #d1fae5;
    color: #065f46;
}

.expiry-warning {
    background: #fef3c7;
    color: #92400e;
}

.expiry-expired {
    background: #fee2e2;
    color: #991b1b;
}

/* ========== استایل فرم تاریخ شمسی ========== */
.date-input-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========== استایل آپلود فایل و عکس ========== */
.file-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    background: var(--bg-color);
}

.file-upload-box:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.file-upload-box i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.file-upload-box input[type="file"] {
    margin-top: 10px;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius);
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* ========== استایل صفحات تماس و قوانین ========== */
.page-content-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    line-height: 2;
}

.page-content-box h1,
.page-content-box h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.page-content-box ul,
.page-content-box ol {
    padding-right: 30px;
    margin: 15px 0;
}

.page-content-box li {
    margin-bottom: 10px;
}

/* ========== استایل Rich Text Editor ساده ========== */
.rich-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.rich-editor-toolbar {
    background: var(--bg-color);
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.rich-editor-toolbar button {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.rich-editor-toolbar button:hover {
    background: var(--primary);
    color: white;
}

.rich-editor textarea {
    width: 100%;
    min-height: 300px;
    border: none;
    padding: 15px;
    font-family: inherit;
    resize: vertical;
}

.rich-editor textarea:focus {
    outline: none;
}
