:root {
    /* Dark Theme Variables */
    --bg-primary: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-inverse: white;
    --text-muted: rgba(255, 255, 255, 0.4);
    --border-primary: #333;
    --border-secondary: #555;
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #0095ff 100%);
    --accent-blue: #00d4ff;
    --accent-success: #51cf66;
    --accent-warning: #fbbf24;
    --accent-danger: #ff6b6b;
    --scrollbar-track: #333;
    --scrollbar-thumb: #555;
    --scrollbar-thumb-hover: #777;
    --table-hover: rgba(0, 212, 255, 0.05);
    --btn-primary-shadow: rgba(0, 212, 255, 0.3);

    /* Sidebar Variables - Dark */
    --sidebar-bg: #1a1a1a;
    --sidebar-text: #ffffff;
    --sidebar-text-muted: rgba(255, 255, 255, 0.7);
    --sidebar-text-dim: rgba(255, 255, 255, 0.6);
    --sidebar-border: #333;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(255, 255, 255, 0.15);
    --sidebar-accent: #ffffff;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: white;
    --bg-tertiary: #f1f5f9;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-tertiary: #1e293b;
    --text-inverse: white;
    --text-muted: #a0a0a0;
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
    --table-hover: rgba(0, 122, 255, 0.08);
    --accent-blue: #7aa5ad; /* Matches website brand color */
    --gradient-secondary: linear-gradient(135deg, #7aa5ad 0%, #5a8a94 100%); /* Brand teal gradient */
    --btn-primary-shadow: rgba(122, 165, 173, 0.4); /* Brand teal shadow */

    /* Sidebar Variables - Light */
    --sidebar-bg: #ffffff;
    --sidebar-text: #334155;
    --sidebar-text-muted: #64748b;
    --sidebar-text-dim: #94a3b8;
    --sidebar-border: #e2e8f0;
    --sidebar-hover: rgba(0, 0, 0, 0.05);
    --sidebar-active: rgba(0, 122, 255, 0.1);
    --sidebar-accent: #0066cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout */
.admin-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.admin-sidebar {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
}

.workspace-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    background: none;
    border: none;
    color: var(--sidebar-text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-collapse-btn svg {
    width: 16px;
    height: 16px;
}

/* Menu Styles */
.sidebar-menu {
    flex: 1;
    list-style: none;
    padding: 1rem 0;
    overflow-y: auto;
    min-height: 0;
}

.menu-item {
    margin: 0.25rem 0;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 400;
    position: relative;
}

.menu-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.menu-item.active .menu-link {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
    font-weight: 500;
}

.menu-item.active .menu-link::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--sidebar-accent);
    border-radius: 2px 0 0 2px;
}

.menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: var(--accent-warning);
    border-radius: 9px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--sidebar-border);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 1001;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-tertiary);
}

.sidebar-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Sidebar collapsed state */
.admin-container.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
}

.admin-container.sidebar-collapsed .admin-main {
    margin-left: 0;
}

.admin-container.sidebar-collapsed .sidebar-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Main Content Styles */
.admin-main {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    background: var(--bg-primary);
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    flex: 1;
    overflow: auto;
    position: relative;
}

.page-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

/* Section containers */
.section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-primary);
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Card styles */
.card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.card-icon.blue { background: var(--gradient-secondary); color: var(--text-inverse); }
.card-icon.purple { background: var(--gradient-primary); color: var(--text-inverse); }
.card-icon.green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); color: var(--text-inverse); }
.card-icon.pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: var(--text-inverse); }

.card h3 {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-stat {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Custom select styling */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bg-tertiary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 44px;
}

select:hover {
    border-color: var(--border-secondary);
}

select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

[data-theme="light"] select:focus {
    box-shadow: 0 0 0 3px rgba(122, 165, 173, 0.2);
}

/* Style the dropdown options */
select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Custom checkbox styling */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin: 0;
}

input[type="checkbox"]:hover {
    border-color: var(--accent-blue);
}

input[type="checkbox"]:checked {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Checkbox with label alignment */
label input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

[data-theme="light"] input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(122, 165, 173, 0.2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(122, 165, 173, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

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

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

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--btn-primary-shadow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

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

.btn-danger {
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.2);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

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

/* Data Table */
.data-table {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

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

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

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

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

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

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-active, .status-ok {
    background: rgba(81, 207, 102, 0.15);
    color: var(--accent-success);
}

.status-inactive, .status-error {
    background: rgba(255, 107, 107, 0.15);
    color: var(--accent-danger);
}

.status-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-warning);
}

/* Controls Bar */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-bar::before {
    content: "";
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: var(--accent-danger);
}

.alert.success {
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid rgba(81, 207, 102, 0.2);
    color: var(--accent-success);
}

.alert.warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--accent-warning);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.pagination button {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-tertiary);
}

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

.pagination .page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* API Key Display */
.api-key {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    -webkit-user-select: all;
    -moz-user-select: all;
    user-select: all;
}

/* Action Buttons in Table */
.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

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

.action-btn.danger {
    color: var(--accent-danger);
    border-color: rgba(255, 107, 107, 0.3);
}

.action-btn.danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-success);
    border-color: var(--accent-success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 260px;
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .admin-sidebar.mobile-open {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: flex !important;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: none;
    }
}

/* Scrollbar Styling */
.admin-main::-webkit-scrollbar,
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.admin-main::-webkit-scrollbar-track,
.content-wrapper::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.admin-main::-webkit-scrollbar-thumb,
.content-wrapper::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

.admin-main::-webkit-scrollbar-thumb:hover,
.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Utility Classes */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-center { text-align: center; }
.p-2 { padding: 2rem; }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Additional utility classes for inline style replacement */
.loading-cell { text-align: center; padding: 2rem; }
.text-nowrap { white-space: nowrap; }
.opacity-muted { opacity: 0.6; }
.scrollable-md { max-height: 400px; overflow-y: auto; }
.scrollable-lg { max-height: 600px; overflow-y: auto; }
.font-small { font-size: 0.75rem; }
.highlight-row { background: rgba(59, 130, 246, 0.1); }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }

/* Modal width variants */
.modal-content.modal-wide { max-width: 700px; }
.modal-content.modal-xl { max-width: 900px; }

/* Sidebar footer styles */
.sidebar-footer-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 12px;
}
.sidebar-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-footer-link {
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    transition: opacity 0.2s ease;
}
.sidebar-footer-link:hover {
    opacity: 0.8;
}
.sidebar-footer-link.back-link {
    color: var(--accent-blue);
}
.sidebar-footer-link.logout-link {
    color: var(--accent-danger);
}
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--sidebar-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--sidebar-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 14px;
    justify-content: center;
}
.theme-toggle-btn:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}
