/* FontAwesome Icons */
.fas, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400;
}

.fab {
    font-weight: 400;
}

/* Specific icon fixes */
.fa-chart-bar::before { content: "\f080"; }
.fa-tachometer-alt::before { content: "\f3fd"; }
.fa-users::before { content: "\f0c0"; }
.fa-server::before { content: "\f233"; }
.fa-user-cog::before { content: "\f509"; }
.fa-sign-out-alt::before { content: "\f2f5"; }
.fa-exclamation-triangle::before { content: "\f071"; }
.fa-database::before { content: "\f1c0"; }
.fa-chart-line::before { content: "\f201"; }
.fa-sync::before { content: "\f021"; }
.fa-plus::before { content: "\f067"; }
.fa-search::before { content: "\f002"; }
.fa-activity::before { content: "\f1fe"; }
.fa-clock::before { content: "\f017"; }
.fa-trash::before { content: "\f1f8"; }
.fa-ellipsis-v::before { content: "\f142"; }
.fa-pencil-alt::before { content: "\f303"; }
.fa-copy::before { content: "\f0c5"; }
.fa-spinner::before { content: "\f110"; }
.fa-spin::before { animation: fa-spin 2s infinite linear; }
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fonts */
@font-face {
    font-family: 'IRANSans';
    src: url('./fonts/IRANSansWeb.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('./fonts/IRANSansWeb_Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('./fonts/IRANSansWeb_Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('./fonts/IRANSansWeb_Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('./fonts/IRANSansWeb_UltraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANSans', 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1a202c;
    line-height: 1.6;
    direction: rtl;
}

/* Layout */
#app {
    min-height: 100vh;
}

.page {
    min-height: 100vh;
}

/* Login Page */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    justify-content: center;
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
}

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

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
}

.btn-info {
    background-color: #06b6d4;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background-color: #0891b2;
}

.btn-purple {
    background-color: #8b5cf6;
    color: white;
}

.btn-purple:hover:not(:disabled) {
    background-color: #7c3aed;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Button icons */
.btn i {
    margin-left: 8px;
    font-size: 14px;
}

.btn-sm i {
    margin-left: 4px;
    font-size: 12px;
}

/* Search input icon */
.search-input i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

/* Main App Layout */
#main-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #f8fafc;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar-header {
    margin-bottom: 1rem;
}

.logo {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.app-title i {
    font-size: 2rem;
    color: #3b82f6;
}

.app-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.sidebar-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 1rem 0;
}

.sidebar-nav {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: #f1f5f9;
    color: #1a202c;
}

.nav-link.active {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 500;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-footer .btn {
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background-color: #3b82f6; }
.stat-card:nth-child(2) .stat-icon { background-color: #10b981; }
.stat-card:nth-child(3) .stat-icon { background-color: #f59e0b; }
.stat-card:nth-child(4) .stat-icon { background-color: #8b5cf6; }
.stat-card:nth-child(5) .stat-icon { background-color: #ef4444; }
.stat-card:nth-child(6) .stat-icon { background-color: #06b6d4; }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Services Toolbar */
.services-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: visible;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    position: relative;
    z-index: 1;
}

.data-table th {
    background-color: #f8fafc;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
}

/* Services Table Column Alignment */
#services-table th:nth-child(1), /* نام سرویس */
#services-table td:nth-child(1) {
    text-align: right;
}

#services-table th:nth-child(2), /* وضعیت */
#services-table td:nth-child(2),
#services-table th:nth-child(3), /* پروتکل */
#services-table td:nth-child(3),
#services-table th:nth-child(4), /* تعداد کانفیگ */
#services-table td:nth-child(4),
#services-table th:nth-child(5), /* حجم مصرفی */
#services-table td:nth-child(5),
#services-table th:nth-child(6) { /* زمان باقی مانده */
    text-align: center;
}

#services-table td:nth-child(6) {
    text-align: center;
}

#services-table th:nth-child(7), /* عملیات */
#services-table td:nth-child(7) {
    text-align: left;
}

/* Panels Table Column Alignment */
#panels-table th:nth-child(1), /* نام پنل */
#panels-table td:nth-child(1) {
    text-align: right;
}

#panels-table th:nth-child(2), /* آدرس پنل */
#panels-table td:nth-child(2),
#panels-table th:nth-child(3), /* کاربران آنلاین */
#panels-table td:nth-child(3) {
    text-align: center;
}

#panels-table th:nth-child(4), /* عملیات */
#panels-table td:nth-child(4) {
    text-align: left;
}

/* Admin Table Column Alignment */
#admin-table th:nth-child(1), /* نام کاربری */
#admin-table td:nth-child(1) {
    text-align: right;
}

#admin-table th:nth-child(2), /* API Key */
#admin-table td:nth-child(2),
#admin-table th:nth-child(3) { /* وضعیت */
    text-align: center;
}

#admin-table td:nth-child(3) {
    text-align: center;
}

#admin-table th:nth-child(4), /* عملیات */
#admin-table td:nth-child(4) {
    text-align: left;
}

/* Copy Success Popup */
.copy-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10002;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    font-family: 'IRANSans', sans-serif;
}

.copy-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.copy-popup-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.copy-popup-content i {
    font-size: 1.2rem;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    word-wrap: break-word;
    overflow: hidden;
}

/* Column widths for different tables */
/* Services table */
#services-table th:nth-child(1), #services-table td:nth-child(1) { width: 20%; } /* نام سرویس */
#services-table th:nth-child(2), #services-table td:nth-child(2) { width: 12%; } /* وضعیت */
#services-table th:nth-child(3), #services-table td:nth-child(3) { width: 12%; } /* پروتکل */
#services-table th:nth-child(4), #services-table td:nth-child(4) { width: 12%; } /* تعداد کانفیگ */
#services-table th:nth-child(5), #services-table td:nth-child(5) { width: 18%; } /* حجم مصرفی */
#services-table th:nth-child(6), #services-table td:nth-child(6) { width: 18%; } /* زمان باقی مانده */
#services-table th:nth-child(7), #services-table td:nth-child(7) { width: 8%; } /* عملیات */

/* Panels table */
#panels-table th:nth-child(1), #panels-table td:nth-child(1) { width: 25%; } /* نام پنل */
#panels-table th:nth-child(2), #panels-table td:nth-child(2) { width: 35%; } /* آدرس پنل */
#panels-table th:nth-child(3), #panels-table td:nth-child(3) { width: 20%; } /* کاربران آنلاین */
#panels-table th:nth-child(4), #panels-table td:nth-child(4) { width: 20%; } /* عملیات */

/* Admin table */
#admin-table th:nth-child(1), #admin-table td:nth-child(1) { width: 20%; } /* نام کاربری */
#admin-table th:nth-child(2), #admin-table td:nth-child(2) { width: 40%; } /* API Key */
#admin-table th:nth-child(3), #admin-table td:nth-child(3) { width: 20%; } /* وضعیت */
#admin-table th:nth-child(4), #admin-table td:nth-child(4) { width: 20%; } /* عملیات */

/* Text alignment for specific columns */
.data-table td.text-center {
    text-align: center;
}

.data-table td.text-right {
    text-align: right;
}

.data-table td.text-left {
    text-align: left;
}

/* API Key column styling */
.api-key-display {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* URL column styling */
.data-table td code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

/* Responsive table design */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Adjust column widths for mobile */
    #services-table th:nth-child(1), #services-table td:nth-child(1) { width: 25%; }
    #services-table th:nth-child(2), #services-table td:nth-child(2) { width: 15%; }
    #services-table th:nth-child(3), #services-table td:nth-child(3) { width: 15%; }
    #services-table th:nth-child(4), #services-table td:nth-child(4) { width: 15%; }
    #services-table th:nth-child(5), #services-table td:nth-child(5) { width: 20%; }
    #services-table th:nth-child(6), #services-table td:nth-child(6) { width: 20%; }
    #services-table th:nth-child(7), #services-table td:nth-child(7) { width: 10%; }
    
    #panels-table th:nth-child(1), #panels-table td:nth-child(1) { width: 30%; }
    #panels-table th:nth-child(2), #panels-table td:nth-child(2) { width: 40%; }
    #panels-table th:nth-child(3), #panels-table td:nth-child(3) { width: 20%; }
    #panels-table th:nth-child(4), #panels-table td:nth-child(4) { width: 10%; }
    
    #admin-table th:nth-child(1), #admin-table td:nth-child(1) { width: 25%; }
    #admin-table th:nth-child(2), #admin-table td:nth-child(2) { width: 45%; }
    #admin-table th:nth-child(3), #admin-table td:nth-child(3) { width: 20%; }
    #admin-table th:nth-child(4), #admin-table td:nth-child(4) { width: 10%; }
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge i {
    font-size: 12px;
    margin-left: 4px;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

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

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

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

.badge-purple {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
    z-index: 10000;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: background-color 0.2s;
}

.dropdown-toggle:hover {
    background-color: #f3f4f6;
}

.dropdown-toggle.active {
    background-color: #3b82f6;
    color: white;
}

.dropdown-toggle.active:hover {
    background-color: #2563eb;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 160px;
    z-index: 10001;
    display: none;
    margin-top: 4px;
    overflow: visible;
    isolation: isolate;
    transform: translateX(0);
    white-space: nowrap;
}

.dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
}

.dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

.dropdown-item.danger {
    color: #dc2626;
}

.dropdown-item.danger:hover {
    background-color: #fef2f2;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.25rem 0;
    border: none;
}

/* Ensure dropdown menu is always visible */
.dropdown-menu {
    pointer-events: auto !important;
}

.dropdown-menu.show {
    pointer-events: auto !important;
}

/* Fix any potential clipping issues */
.data-table td {
    overflow: visible !important;
}

.data-table tr {
    overflow: visible !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

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

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    #main-app {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
    }
    
    .nav-link {
        white-space: nowrap;
        margin-bottom: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .services-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-actions {
        flex-wrap: wrap;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
}

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

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

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

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-white { background-color: white; }

.border { border: 1px solid #e2e8f0; }
.border-gray-200 { border-color: #e2e8f0; }
.border-gray-300 { border-color: #d1d5db; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
