/* 1. Variables and Reset */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --bg-dark: #212529;
    --bg-darker: #1a1d20;
    --bg-light: #2c3034;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;
    --border-color: #495057;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Base Styles */
html, body {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-light);
    background-color: var(--bg-dark);
    min-height: 100vh;
}

h1, h2 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
}

/* 3. Layout */
.layout-row {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    background-color: var(--bg-darker);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding-top: 48px;
    z-index: 100;
    width: auto;
    flex-shrink: 0;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding: 0.5rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.main-content {
    padding: 2rem;
    min-height: 100vh;
    background-color: var(--bg-light);
    flex-grow: 1;
    margin-left: 220px;
}

.page-header {
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* 4. Navigation */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* 5. Forms */
.form-control, .form-select {
    display: block;
    width: 100%;
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-light);
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    margin-bottom: 0.125rem;
}

.form-switch {
    padding-left: 3.5em;
}

.form-check-input {
    float: left;
    margin-left: -2.5em;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

/* Date and Time input icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 6. Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    color: var(--text-light);
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left; /* Ensure left alignment */
    border-bottom: 1px solid var(--border-color);
}

.table thead th {
    font-weight: 600;
    text-align: left; /* Explicitly set left alignment for headers */
    border-bottom: 2px solid var(--border-color);
    vertical-align: bottom;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

.current-timezone {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.table-striped tbody tr.current-timezone:nth-of-type(odd) {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

.table-hover tbody tr.current-timezone:hover {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

/* 7. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    min-width: 100px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* 8. Utilities */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }

.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ms-2 { margin-left: 0.5rem !important; }

/* 9. Responsive */
@media (max-width: 992px) {
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s ease-in-out;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 4rem;
    }

    .sidebar-collapsed .sidebar {
        left: 0;
    }

    .sidebar-collapsed::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1031;
        padding: 0.5rem;
        font-size: 1.5rem;
        line-height: 1;
        background: var(--bg-darker);
        border: 1px solid var(--border-color);
        border-radius: 0.25rem;
        color: var(--text-light);
        cursor: pointer;
    }

    .sidebar-collapsed .sidebar-toggle {
        visibility: hidden;
    }
}

/* ... keep rest of existing styles ... */

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-primary {
    background-color: var(--primary-color);
    color: white;
}

/* ... keep rest of existing styles ... */

/* 5. Forms */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
}

/* Form Switch */
.form-switch {
    padding-left: 3.5em;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    margin-left: -3.5em;
    background-color: rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: contain;
    border-radius: 2em;
    transition: background-position .15s ease-in-out;
    appearance: none;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-switch .form-check-label {
    padding-left: 0.75rem; /* Add spacing between switch and label */
}

/* Remove any other form-check-input styles that might be interfering */
