/* Sidebar layout */
.sidebar {
    width: 150px;
    min-height: calc(100vh - 56px); /* header height */
    transition: width 0s;
    position: fixed;
    margin-top:67px;
    background-color:rgb(148, 212, 247);
    border-right: 1px solid black;
}

.sidebar.collapsed {
    width: 50px;
}

.main-content {
    margin-left: 150px;
    transition: margin-left 0s;
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

/* Optional: Hide text when sidebar is collapsed */
.sidebar.collapsed .link-text {
    display: none;
}
.content{
    margin-top:50px;
}

.sidebar .nav-link {
    display: flex;
    align-items: left;
    padding: 0.75rem;
    justify-content: left;
    text-align: left;
    transition: background-color 0.s;
    white-space: nowrap;
}

.sidebar .nav-link .link-text {
    margin-left: 10px;
    display: inline-block;
}

.sidebar.collapsed .nav-link .link-text {
    display: none;
}

.sidebar .nav-link.active {
    background-color: #71a7f8;
    color: white;
}

.navbar{
    background-color: rgb(148, 212, 247) !important;
    border-bottom: 1px solid black;
}

/* Ensure navbar background color is applied */
.navbar.fixed-top {
    background-color: rgb(148, 212, 247) !important;
}

/* Scrollable tbody inside a fixed table header */
.scrollable-table {
    overflow-y: auto;
    display: block;
}

.scrollable-table thead, .scrollable-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.scrollable-table thead {
    width: calc(100% - 1em); /* Prevent scrollbar overlay */
    position: sticky;
    top: 0;
    z-index: 2;
    color: white;
}

.scrollable-table tbody {
    display: block;
    max-height: 45vh;
    overflow-y: auto;
}

.scrollable-table td, .scrollable-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#map {
    height: 50vh
}

/* Month input styling */
input[type="month"] {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="month"]:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Form help text styling */
.form-text {
    font-size: 0.875em;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Dependent table styling */
.dependent-table {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    margin: 0.5rem 0;
}

.dependent-table .table {
    margin-bottom: 0;
}

.dependent-table .table-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Dependent sub-row styling */
.table-info {
    background-color: #d1ecf1 !important;
}

.table-info h6 {
    color: #0c5460;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Inline dependent table styling */
.table-sm .table-info {
    background-color: #d1ecf1;
    color: #0c5460;
    font-size: 0.875em;
}

.table-sm .table-bordered {
    border: 1px solid #dee2e6;
}

.table-sm .table-bordered th,
.table-sm .table-bordered td {
    border: 1px solid #dee2e6;
    padding: 0.25rem;
}

.table-light {
    background-color: #f8f9fa;
    color: #495057;
}

/* Calculated expense styling */
.table-warning {
    background-color: #fff3cd !important;
}

.table-warning td {
    border-color: #ffeaa7;
}

.table-warning .fas.fa-calculator {
    color: #856404;
}

.table-warning .text-muted {
    color: #856404 !important;
}
    width: 100%;
}

/* Custom table header styling - override Bootstrap's table-dark */
.custom-thead {
    background-color: rgb(148, 212, 247) !important;
    color: #333 !important;
}

.custom-thead th {
    background-color: rgb(148, 212, 247) !important;
    color: #333 !important;
    border-color: #dee2e6 !important;
}

/* Override Bootstrap table-dark class for custom headers */
.table-dark.custom-thead,
.table-dark.custom-thead th {
    background-color: rgb(148, 212, 247) !important;
    color: #333 !important;
    border-color: #dee2e6 !important;
}

/* Compact table styling */
.table {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    padding: 0.4rem 0.3rem;
    font-size: 0.8rem;
}

.table td {
    vertical-align: middle;
    padding: 0.4rem 0.3rem;
    font-size: 0.8rem;
}

/* Make table-sm even more compact */
.table-sm th, .table-sm td {
    padding: 0.3rem 0.2rem;
    font-size: 0.75rem;
}

/* Ensure table-responsive works properly */
.table-responsive {
    border: 0;
}

.table-responsive .table {
    margin-bottom: 0;
}

/* Additional compact styling for better table appearance */
.table-hover tbody tr:hover {
    background-color: rgba(148, 212, 247, 0.1);
}

/* Ensure sticky headers work properly with custom-thead */
.sticky-top.custom-thead {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Compact card styling for better table containers */
.card-body.p-0 {
    padding: 0 !important;
}

.card-header.bg-light {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
}

/* Compact styling for targets templates */
.card-header h6, .card-header h5 {
    font-size: 0.95rem;
    font-weight: 600;
}

.form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.card-body {
    padding: 0.75rem;
}

.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-select-sm, .form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.progress {
    height: 0.75rem;
}

.badge {
    font-size: 0.75rem;
}

/* Additional compact styling */
.container-fluid.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

/* Compact card styling */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Progress bar styling */
.progress {
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    font-size: 0.75rem;
    line-height: 0.75rem;
}
