:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --border-color: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --header-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --border-color: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --header-bg: #1e293b;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--header-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: 100vh;
    box-sizing: border-box;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.sidebar-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu a:hover {
    background-color: var(--border-color);
}

.sidebar-menu a.active {
    background-color: var(--primary);
    color: white;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
}

.top-header {
    height: 60px;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1.5rem;
    gap: 15px;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

h1, h2, h3 {
    margin-top: 0;
}

/* Common Styles (Buttons, Forms, Tables) */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}
.card {
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.table-responsive {
    overflow-x: auto;
    width: 100%;
}
.master-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1800px;
}
.master-table th, .master-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}
.master-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    position: sticky;
    top: 0;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
}
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

/* Pagination Styling (Bootstrap Structure) */
nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}
.pagination .page-item {
    display: inline-block;
}
.pagination .page-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--header-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background: var(--border-color);
}
.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination Text ("Showing 1 to X of Y results") */
.text-muted, p.small {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.875rem;
    margin: 0;
}