:root {
    --primary-color: #2563eb; /* Modern Vibrant Blue */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc; /* Clean modern soft grey-blue */
    --sidebar-bg: #ffffff; /* Premium white sidebar */
    --card-bg: #ffffff; /* White cards */
    --border-color: #e2e8f0; /* Soft slate border */
    --text-main: #0f172a; /* Dark slate text */
    --text-muted: #64748b; /* Slate 500 */
    --sidebar-width: 260px;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--text-main);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem 1.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    margin: 0;
    flex-grow: 1;
}

.sidebar-item {
    margin-bottom: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: var(--text-main);
    background-color: #f1f5f9;
}

.sidebar-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Capacity Widget in Sidebar */
.capacity-widget {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 0.75rem 1.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    padding: 2.25rem;
    min-width: 0;
}

/* Premium Cards */
.card-custom {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.card-header-custom {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.card-body-custom {
    padding: 1.5rem;
}

/* Tables */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 1.1rem 1.5rem;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Form inputs */
.form-control-custom, .form-select-custom {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    padding: 0.65rem 1rem;
}

.form-control-custom:focus, .form-select-custom:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    color: var(--text-main);
}

.form-control-custom::placeholder {
    color: #94a3b8;
}

.form-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

/* Contrast Enhancements */
.text-muted {
    color: var(--text-muted) !important;
}
.card, .card-custom {
    color: var(--text-main) !important;
}
.table, .table-custom {
    color: var(--text-main) !important;
}
.modal-content {
    background-color: #ffffff !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
.form-select-custom option {
    background-color: #ffffff;
    color: var(--text-main);
}
.list-group-item {
    color: var(--text-main);
}
input, select, textarea {
    color: var(--text-main) !important;
}

/* Prevent layout shift/shrinkage when Bootstrap modals are opened */
body.modal-open {
    padding-right: 0 !important;
}
