:root {
    --sidebar-width: 250px;
    --primary-color: #9b66adff;
    --secondary-color: #9b66adff;
    --accent-color: #3f3f46;
    --muted-color: #f4f4f5;
    --border-color: #e4e4e7;
    --text-muted: #71717a;
    --background: #ffffff;
    --foreground: #09090b;
}

[data-theme="dark"] {
    --primary-color: #f4f4f5;
    --secondary-color: #e4e4e7;
    --accent-color: #d4d4d8;
    --muted-color: #18181b;
    --border-color: #27272a;
    --text-muted: #a1a1aa;
    --background: #09090b;
    --foreground: #f4f4f5;
}

[data-theme="dark"] body {
    background-color: var(--muted-color);
    color: var(--foreground);
}

[data-theme="dark"] .navbar {
    background: var(--background) !important;
    color: var(--foreground);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--background);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--foreground);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--muted-color);
    color: var(--foreground);
}

[data-theme="dark"] .btn-primary {
    background: var(--foreground);
    border-color: var(--foreground);
    color: var(--background);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: var(--background);
}

[data-theme="dark"] .btn-outline-primary,
[data-theme="dark"] .btn-outline-success,
[data-theme="dark"] .btn-outline-info,
[data-theme="dark"] .btn-outline-warning {
    border-color: var(--border-color);
    color: var(--foreground);
}

[data-theme="dark"] .btn-outline-primary:hover,
[data-theme="dark"] .btn-outline-success:hover,
[data-theme="dark"] .btn-outline-info:hover,
[data-theme="dark"] .btn-outline-warning:hover {
    background-color: var(--border-color);
    border-color: var(--border-color);
    color: var(--foreground);
}

body {
    background-color: var(--muted-color);
    color: var(--foreground);
}

.form-control:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 0.2rem rgba(24, 24, 27, 0.25);
}

.form-control,
.input-group-text {
    border: 1px solid #e4e4e7;
    border-radius: 6px;
}

.btn-primary {
    background: #18181b;
    border: 1px solid #18181b;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #27272a;
    border-color: #27272a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.input-group-text {
    background-color: #f4f4f5;
    color: #71717a;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
   background: #9b66adff;
    border-right: 1px solid var(--border-color);
    color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-header {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.sidebar-nav .nav-link {
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
    border-radius: 6px;
}

.sidebar-nav .nav-link:hover {
    color: var(--foreground);
    background-color: var(--muted-color);
}

.sidebar-nav .nav-link.active {
    color: var(--foreground);
    background-color: #f4f4f5;
    color: #000;
}

.sidebar-nav .bottom-nav {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.main-content.sidebar-open {
    margin-left: var(--sidebar-width);
}

.navbar {
    background: #9b66adff !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
}

.stats-card {
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
}

.stats-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

.chart-container {
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
}

.table {
    background: var(--background);
}

.table-responsive {
    overflow-x: auto;   /* Enables horizontal scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on mobile */
}

.table td,
.table th {
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 200px;
}


.table th {
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
    /* text-transform: uppercase; */
    letter-spacing: 0.05em;
}

.table td {
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    border-radius: 6px;
    font-weight: 500;
}

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

.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning {
    border-radius: 6px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Modal Styles - shadcn inspired */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    gap: 0.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--foreground);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 1;
}

.btn-close:hover {
    color: var(--foreground);
}

/* Alert/Notification Modal */
.alert-modal .modal-content {
    max-width: 400px;
    margin: 0 auto;
}

.alert-modal .modal-body {
    text-align: center;
    padding: 2rem;
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.alert-icon.success {
    background-color: #dcfce7;
    color: #16a34a;
}

.alert-icon.warning {
    background-color: #fef3c7;
    color: #d97706;
}

.alert-icon.danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Shadcn-style Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    color: var(--foreground);
    background-color: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--muted-color);
    color: var(--foreground);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: transparent;
    border-color: transparent;
}

.content-card {
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

