/* --- NEW SIDEBAR & LAYOUT STYLES --- */
:root {
    --main-bg-color: #f8f9fc;
    --primary-text-color: #0d6efd;
    --second-text-color: #adb5bd;
}

.primary-text {
    color: var(--primary-text-color);
}

.second-text {
    color: var(--second-text-color);
}

#wrapper {
    overflow-x: hidden;
    background-color: var(--main-bg-color);
}

body {
    background-color: #f4f7f6;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    color: #fff;
}

.sidebar-bg{
    background: #1a2942;
}
#sidebar-wrapper .list-group {
    width: 15rem;
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

#menu-toggle {
    cursor: pointer;
}

.list-group-item {
    border: none;
    padding: 20px 30px;
    color: var(--second-text-color);
}

.list-group-item.active {
    background-color: transparent;
    color: #fff;
    font-weight: bold;
    border-right: 5px solid #fff;
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* --- (Keep your existing styles for cards, tables, etc., below this line) --- */

/* Custom search inputs in headers */
#customersDataTable thead th input {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Enhanced table styling */
#customersDataTable {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#customersDataTable thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem 0.75rem;
}

#customersDataTable tbody tr {
    transition: all 0.2s ease;
}

#customersDataTable tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#customersDataTable tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

/* Action buttons enhancement */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-group-sm .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Status badges enhancement */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Export buttons styling */
#exportExcelBtn, #exportPdfBtn {
    transition: all 0.2s ease;
}

#exportExcelBtn:hover, #exportPdfBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 1rem;
    }
    
    #customersDataTable thead th input {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Calculated end date styling */
#calculatedEndDate {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    color: #495057;
    min-height: 38px;
    display: flex;
    align-items: center;
}

/* Date adjustment modal styling */
#dateAdjustModal .form-control[type="date"] {
    cursor: pointer;
}

#dateAdjustModal .input-group {
    max-width: 200px;
}

#dateAdjustModal .form-control-plaintext {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    color: #495057;
}

/* Improve button spacing */
#dateAdjustModal .modal-footer .btn {
    margin-left: 0.5rem;
}

#dateAdjustModal .modal-footer .btn:first-child {
    margin-left: 0;
}

/* Table actions styling */
.table-actions .btn {
    margin-right: 5px;
}

/* Stat cards enhancement */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .icon {
    font-size: 2.5rem;
    padding: 15px;
    border-radius: 50%;
    margin-right: 20px;
    color: white;
}

body,
html {
    height: 100%;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #3b5d94, #1a2942)
}

.login-box {
    width: 100%;
    max-width: 850px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Important for the rounded corners */
}

.login-branding {
    background: #1a2942;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-branding h1 {
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.login-branding p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.login-form-container {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Make it look good on small screens */
@media (max-width: 767.98px) {
    .login-branding {
        min-height: 250px;
    }

    .login-form-container {
        padding: 30px;
    }
}