@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

.scrollable-dropdown {
    max-height: 60vh;
    /* Set a maximum height for the dropdown */
    overflow-y: auto;
    /* Enable vertical scrolling */
    overflow-x: hidden;
    /* Hide horizontal overflow */
}

::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
}

td.details-control {
    background: url('https://www.datatables.net/examples/resources/details_open.png') no-repeat center center;
    cursor: pointer;
}

tr.shown td.details-control {
    background: url('https://www.datatables.net/examples/resources/details_close.png') no-repeat center center;
}

body {
    font-family: 'Poppins', sans-serif;
}

.sublevel:before {
    padding-left: 15px;
    content: "\00a0 \00a0 ";
}

.subleveltwo:before {
    padding-left: 30px;
    content: "\00a0 \00a0 \00a0 \00a0 ";
}

.wrapper {
    display: flex;
}

.white-bg {
    background-color: #FFF;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0px 6px 11px rgba(33, 33, 33, .2);
    margin-top: 70px;
    /* Push down other content to start after the stretched top part */

}

table.bgspecial,
tr.bgspecial,
td.bgspecial {
    background: #f5f2f0 !important;
}

.main {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    background-color: #fafbfe;
}

#sidebar {
    width: 70px;
    min-width: 70px;
    z-index: 1000;
    transition: all .25s ease-in-out;
    background-color: #005387;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-fixed-part {
    /* This part will not scroll and will stay fixed at the top of the sidebar */
    width: 260px;
    position: fixed;
    height: 100vh;
}

#sidebar-shadow {
    position: absolute;
    top: 70px;
    /* Start below the top 70px */
    left: 0;
    width: 70px;
    height: calc(100% - 70px);
    /* Height adjusts to fill the remaining space */
    box-shadow: 0 10px 15px rgba(33, 33, 33, 0.2);
    z-index: -1;
    /* Keep shadow behind sidebar content but above other page elements */
}

.toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: 0;
    padding: 1rem 1.5rem;
}

.toggle-btn i {
    font-size: 1.5rem;
    color: #000;
}

.sidebar-logo {
    margin: auto 0;
}

.sidebar-logo a {
    color: #000;
    font-size: 1.15rem;
    font-weight: 600;
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span {
    display: none;
}

#sidebar.expand .top-logo {
    display: none;
}

.sidebar-nav {
    padding: 2rem 0;
    flex: 1 1 auto;
}

a.sidebar-link {
    padding: .625rem 1.625rem;
    color: #000;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    border-left: 3px solid transparent;

}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: .75rem;
}

a.sidebar-link:hover {
    /* background-color: rgba(255, 255, 255, .075); */
    border-left: 3px solid #000;
    font-weight: bold;
    box-shadow: 0px 6px 11px rgba(33, 33, 33, .1)
}

a.sidebar-link.active {
    background-color: rgba(255, 255, 255, .075);
    border-left: 3px solid #000;
    font-weight: bold;

}

.sidebar-item {
    position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 70px;
    background-color: #fff;
    padding: 0;
    min-width: 15rem;
    display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown {
    display: block;
    max-height: 15em;
    width: 100%;
    opacity: 1;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 .075rem .075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all .2s ease-out;
}





/* Shows the first-level dropdown adjacent to the sidebar when hovered */
#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown {
    display: block;
    position: absolute;
    top: 0;
    left: 100%;
    /* Position to the right of the parent menu */
    width: 190px;
    /* Adjust width as necessary */
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

/* Additional styling for nested dropdowns */
#sidebar:not(.expand) .sidebar-dropdown .sidebar-item:hover .sublevel+.sidebar-dropdown {
    display: block;
    position: absolute;
    left: 100%;
    /* Ensures it pops out to the right */
    top: 0;
    width: 190px;
    /* Adjust width as necessary */
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1002;
}

/* Optional: Hide all dropdowns when sidebar is not expanded and not hovered */
#sidebar:not(.expand) .sidebar-dropdown {
    display: none;
}


/* When sidebar is not expanded, remove content from sublevel indicators */
#sidebar:not(.expand) .sublevel:before,
#sidebar:not(.expand) .subleveltwo:before {
    content: "";
    padding-left: 0;
    /* Also remove padding if it's not needed when content is empty */
}


/* Optional: Additional styling for fixed-top navigation bar */
.navbar.fixed-top {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


@media (max-width: 767px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 0;
    }
}

/* Custom CSS to position the modal in the top right corner */
#navModal .modal-dialog {
    position: fixed;
    top: 0;
    right: 0;
    margin: 0;
    width: auto;
    /* Adjust width as needed, or set to a specific value */
    max-width: 100%;
    /* Ensure the modal doesn't extend beyond the viewport */
}

#navModal .modal-content {
    min-height: 10vh;
    /* Optional: extend the modal to the full height of the viewport */
    border-bottom-left-radius: 0;
    /* Remove rounded corner if modal extends full height */
    border-top-right-radius: 0;
    /* Optionally remove this too if you prefer sharp corners */
}



.top-flex {
    position: absolute;
    /* Position absolutely to allow full width stretching */
    top: 0;
    left: 0;
    width: 100vw;
    /* Set the width to full viewport width */
    height: 70px;
    /* Set the height as needed */
    background-color: #fff;
    /* Background color for the top part */
    z-index: 1050;
    /* Ensure it sits above other content */
    display: flex;
    /* Makes .d-flex a flex container */
    align-items: center;
    /* Aligns children vertically in the middle */
    justify-content: space-between;
    /* Distributes space between and around content items */
}

.profile {
    margin-left: auto;
    /* Pushes the .profile to the far right */
    margin-right: 30px;
}

.top-logo a {
    margin-right: auto;
    /* Pushes the .profile to the far right */
    margin-right: 30px;
    color: #000;
    font-size: 1.15rem;
    font-weight: 600;
}

.sidebar-nav,
.sidebar-footer {
    margin-top: 70px;
    /* Push down other content to start after the stretched top part */
}

/* Base sidebar styles */
#sidebar {
    position: relative;
    width: 260px;
    /* Expanded width */
    min-width: 260px;
    transition: width 0.25s ease-in-out;
    /* Smooth transition for width changes */
    background-color: #fff;
    z-index: 1000;
    /* Ensure it is stacked correctly */
}

#sidebar.expand {
    width: 260px;
    /* Width when expanded */
    min-width: 260px;
}

#sidebar:not(.expand) {
    width: 70px;
    /* Width when collapsed */
    min-width: 70px;
}

.sidebar-fixed-part:not(.expand) {
    width: 70px;
    /* Width when collapsed */
    min-width: 70px;
}

.sidebar-fixed-part.expand {
    width: 260px;
    min-width: 260px;
}


#sidebar-shadow:not(.expand) {
    width: 70px;
    /* Width when collapsed */
    min-width: 70px;
}

#sidebar-shadow.expand {
    width: 260px;
    min-width: 260px;
}



/* Full-width top part */
/* .d-flex {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 70px; 
    background-color: #fff;  
    z-index: 1050;

} */

/* Adjust sidebar content padding/margin */
.sidebar-nav,
.sidebar-footer {
    margin-top: 70px;
    /* Offset for the top part */
    transition: margin-top 0.25s ease-in-out;
    /* Smooth transition for margin changes */
}

/* Ensure internal sidebar navigation adapts to width */
#sidebar .sidebar-nav li a,
#sidebar .sidebar-footer a {
    white-space: nowrap;
    /* Prevent wrapping and ensure visibility */
    overflow: hidden;
    /* Hide overflow when sidebar collapses */
}

.shadow-caster {
    position: absolute;
    top: 0;
    left: 260px;
    /* Start from the end of the expanded sidebar */
    height: 70px;
    width: calc(100vw - 260px);
    /* Adjust width to fill the rest of the viewport */
    box-shadow: 20px 6px 20px 0px rgba(33, 33, 33, 0.2);
    transition: left 0.25s ease-in-out, width 0.25s ease-in-out;
    /* Smooth transition for sidebar toggle */
    display: none;
    /* Initially hidden */
}

#sidebar.expand .shadow-caster {
    display: block;
    /* Only display shadow when sidebar is expanded */
}

#sidebar:not(.expand) .shadow-caster {
    display: block;
    left: 70px;
    /* Adjust to the collapsed sidebar width */
    width: calc(100vw - 70px);
    /* Adjust width to fill from the collapsed sidebar */
}

.nav-tabs {
    --bs-nav-tabs-border-width: 0px;
}

.tab-content {
    margin-left: 1rem;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    font-weight: bold;
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
    color: #000;
    font-weight: bold;

}

.nav-tabs .nav-link {
    color: #000;
}

.custom-card {
    max-width: 200px;
    /* Adjust based on your layout */
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

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

.icon {
    background-color: #fff;
    /* Placeholder color, replace with your icon and color */
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
}

.percentage {
    font-size: 2.5rem;
    font-weight: bold;
    color: #123456;
    /* Replace with the color that you want */
}

.align-left {
    text-align: left;
}

.bold {
    font-weight: bold;
}

.align-right {
    float: right;
}

.sidebar-link .fa-chevron-right {
    margin-left: 5px;
    /* Adjust the spacing between the text and the arrow icon */
}

.icon-online {
    text-shadow: 0 0 2px green;
}

.icon-offline {
    text-shadow: 0 0 2px red;
}

.hidden-field {
    display: none;
}

/* Modern styles for Realtime Charger Info panel */
.charger-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.header {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 1.2rem;
    gap: 0.7rem;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 1.1em;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    background: #f5f7fa;
    color: #333;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.07);
    width: auto;
    max-width: 100%;
}

.status.online {
    background: #e8f5e9;
    color: #388e3c;
}

.status.offline {
    background: #ffebee;
    color: #c62828;
}

.status.available {
    background: #e3f2fd;
    color: #1976d2;
}

.status.noerror {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status.occupied {
    background: #fff9c4 !important;
    color: #b8860b !important;
}

/* Additional status types to match the design */
.status.charging {
    background: #e8f5e9;
    color: #388e3c;
}

.status.preparing {
    background: #fff3e0;
    color: #f57c00;
}

.status.finishing {
    background: #e1f5fe;
    color: #0277bd;
}

.status.reserved {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status.unavailable {
    background: #ffebee;
    color: #c62828;
}

.status.faulted {
    background: #ffebee;
    color: #c62828;
}

.status.suspended {
    background: #fff9c4;
    color: #b8860b;
}

.status.success {
    background: #e8f5e9;
    color: #388e3c;
}

.status.info {
    background: #e3f2fd;
    color: #1976d2;
}

.status.danger {
    background: #ffebee;
    color: #c62828;
}

.status.warning {
    background: #fff9c4;
    color: #b8860b;
}

.connector-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.04);
    width: 100%;
}

.connector-header {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    gap: 0.5em;
}

.badge.suspended {
    background: #eceff1;
    color: #607d8b;
    border-radius: 999px;
    padding: 0.3em 1em;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-weight: 500;
}

.soft-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    font-size: 1.05rem;
}

.soft-table th,
.soft-table td {
    padding: 0.7rem 1.2rem;
    border: none;
    background: none;
    font-weight: 500;
}

.soft-table th {
    color: #1976d2;
    font-weight: 700;
    text-align: left;
    width: 180px;
    background: none;
}

.soft-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.soft-table tr:last-child {
    border-bottom: none;
}

/* --- Flex alignment for cards --- */
.row.g-4.mt-2 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.col-md-6 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* --- Responsive stacking --- */
@media (max-width: 900px) {
    .row.g-4.mt-2 {
        flex-direction: column;
    }

    .col-md-6 {
        max-width: 100%;
    }
}

/* --- Remove min-height from .soft-card --- */
.soft-card {
    min-height: unset;
}

/* --- General Info Card tweaks if needed --- */
.general-info-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.connector-row {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.connector-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}

@media (max-width: 700px) {

    .charger-card,
    .soft-card {
        padding: 1rem;
    }

    .connector-card {
        padding: 0.7rem;
    }

    .header {
        font-size: 1.1rem;
    }

    .connector-row {
        flex-direction: column;
        gap: 0.7rem;
    }

    .connector-col {
        max-width: 100%;
    }

    .connector-card {
        width: 100%;
    }
}

.soft-card.widget-row {
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.widget-row .d-flex {
    width: 100%;
}

.widget {
    background: #f9f9f9;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.04);
    padding: 1.2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    transition: box-shadow 0.2s;
    width: 100%;
}

.widget:hover {
    box-shadow: 0 6px 24px rgba(25, 118, 210, 0.10);
}

.widget-icon {
    font-size: 2rem;
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.widget-title {
    font-size: 1.05rem;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.widget-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
}

@media (max-width: 991px) {
    .widget-row .d-flex {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .widget {
        margin-bottom: 0;
    }
}

.online-icon {
    color: #16a34a;
    font-size: 1.25em;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px #bbf7d0);
}

.offline-icon {
    color: #dc2626;
    font-size: 1.25em;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px #fecaca);
}