
#login_div {
    width: 100%;
    height: 100vh;
    background-image: url("../images/login_bg.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.right_side {
    max-width: 500px;
    margin: 0 20%;
}

.h-100vh {
    height: 100vh;
}

.bg_img {
    width: 100%;
    height: 100vh;
    background-image: url("../images/background_light.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#event_search {
    text-indent: 25px;
}

.search_icon {
    top: 10px;
    left: 10px;
    color: #e0e5ec;
}

/* .chart_card {
    height: 114px;
    display: flex;
    align-items: center;
    justify-content: center;
} */

.loader {
    position: absolute;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.opacity0 {
    opacity: 0;
}

#eventTableDiv {
    height: 500px;
    overflow-y: auto;
}

#eventTable {
    border-collapse: separate;
    border-spacing: 0;
}

#eventTable thead tr th,
#eventTable tbody tr td {
    border-right: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

table.dataTable th.dt-type-numeric,
table.dataTable td.dt-type-numeric {
    text-align: left;
}

.dropdown-toggle::after {
    content: unset;
}

#ups_tabs .nav-link,
#ups_tabs .nav-link:hover {
    color: #6c757d;
}

#ups_tabs .nav-link.active {
    color: #000;
}

.dropdown-menu[data-bs-popper] {
    right: 0px;
    left: unset;
}

@media screen and (max-width: 492px) {
    #login_div {
        background-image: none;
    }

    .right_side {
        margin: 0 10%;
    }

}

.top_div {
    background-image: url("../images/banner.svg");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
}

.top_div>.row {
    position: relative;
    top: 80px;
}

.main_div {
    position: relative;
    top: 100px;
}

.border-10 {
    border: 10px solid #e5e5e5;
}

.battery_div {
    box-sizing: content-box;
    height: 1.6em;
    width: 5em;
    border: 0.6em solid #212529;
    margin: auto;
    border-radius: 0.6em;
    position: relative;
    display: grid;
    place-items: center;
}

.battery_div:before {
    position: absolute;
    content: "";
    height: 2em;
    width: 0.7em;
    background-color: #212529;
    margin: auto;
    top: 0;
    bottom: 0;
    right: -1.4em;
    border-radius: 0 0.3em 0.3em 0;
}

.charge_div {
    position: absolute;
    height: 1.3em;
    width: 4.75em;
    background-color: #198754;
    top: 0.16em;
    left: 0.1em;
}

.charge_level_div {
    position: absolute;
    font-size: 1em;
    font-weight: 500;
}

/* .active {
    animation: charge-animation 3s infinite linear;
} */

@keyframes charge-animation {
    0% {
        width: 0;
    }

    100% {
        width: 16.25em;
    }
}

.ups_card{
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    border-left: 1px solid #fff;
    border-bottom: 4px solid #fff;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    font-weight: bold;
    font-size: 20px;
    color: #333;
    text-decoration: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.sidebar-nav {
    flex: 1;
    padding: 30px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 16px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin: 0 15px;
    font-weight: 500;
    font-size: 15px;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: translateX(8px);
}

/* .nav-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transform: translateX(8px);
} */

/* .nav-link.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: #ffffff;
} */

.nav-icon {
    width: 22px;
    height: 22px;
    margin-right: 15px;
    filter: brightness(0) saturate(100%) invert(48%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
}

.nav-link:hover .nav-icon {
    filter: brightness(0) saturate(100%) invert(28%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
}



.nav-text {
    font-weight: 500;
    font-size: 15px;
}

.sidebar-footer {
    padding: 25px 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.logout-link {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: #dc3545;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin: 0 15px;
    font-weight: 500;
    font-size: 15px;
}

.logout-link:hover {
    background-color: #f8d7da;
    color: #721c24;
    transform: translateX(8px);
}

.logout-link .nav-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(340deg) brightness(104%) contrast(97%);
}

.logout-link:hover .nav-icon {
    filter: brightness(0) saturate(100%) invert(15%) sepia(67%) saturate(7482%) hue-rotate(340deg) brightness(95%) contrast(118%);
}

/* Main Content */
.main-content {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    transition: left 0.3s ease;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content.expanded {
    left: 0;
}

/* Top Bar */
.top-bar {
    background: #343a40;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    z-index: 100;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 18px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.hamburger-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.top-bar-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.top-bar-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.top-bar-action {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.top-bar-action:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.top-bar-action.refresh-btn {
    transition: transform 0.3s ease;
}

.top-bar-action.refresh-btn:hover {
    transform: rotate(180deg) scale(1.1);
}

.top-bar-action.refresh-btn:active {
    transform: rotate(360deg) scale(0.95);
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-image: url("../images/background_light.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Summary Cards */
.summary-cards {
    margin-bottom: 30px;
}

.summary-cards .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
}

.summary-cards .col-lg-3 {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    margin: 0;
    display: flex;
}

.summary-cards .col-lg-3 > div {
    width: 100%;
}

.summary-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100px;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.active-card {
    border-left: 4px solid #28a745;
}

.active-card .card-icon {
    color: #28a745;
}

.alarm-card {
    border-left: 4px solid #ffc107;
}

.alarm-card .card-icon {
    color: #ffc107;
}

.critical-card {
    border-left: 4px solid #007bff;
}

.critical-card .card-icon {
    color: #007bff;
}

.ideal-card {
    border-left: 4px solid #6c757d;
}

.ideal-card .card-icon {
    color: #6c757d;
}

.card-content h3 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.card-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-weight: 500;
}

/* UPS Cards Section */
.ups-cards-section {
    margin-top: 20px;
}

/* Fix UPS cards alignment */
#ups_card_div {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
}

#ups_card_div .col-lg-3 {
    flex: 0 0 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
    margin: 0;
    display: flex;
}

#ups_card_div .col-lg-3 > div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure cards have equal height */
.card {
    display: flex;
    flex-direction: column;
}

/*.card .row {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card .row .col-lg-6 {
    flex: 1;
    display: flex;
    flex-direction: column;
}*/

.card .row .col-lg-6 .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.custom-sidebar {
    background: #fff;
    border-right: 1px solid #eee;
    min-height: 100vh;
    width: 280px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}


.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}



/* .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px 12px 32px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    background: transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
} */

.nav-link .nav-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    margin-left: 12px;
}

.nav-link.active {
    background: #ffffff00;
    border-left: 4px solid #000; 
    color: #222;
    font-weight: bold;
}

.nav-link.active .nav-icon {
    color: #000;
}

.nav-link:hover:not(.active) {
    background: #f5f5f5;
    color: #222;
}


.logout-link {
    color: #888;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.logout-link .nav-icon {
    margin-right: 10px;
    font-size: 1.1rem;
    color: #888;
}

.logout-link:hover {
    color: #000;
}

.logout-link:hover .nav-icon {
    color: #000;
}
/* Responsive Design */
@media (max-width: 1024px) {
    .custom-sidebar {
        width: 250px;
    }
    
    .main-content {
        left: 250px;
    }
    
    .custom-sidebar.collapsed {
        transform: translateX(-250px);
    }
}

@media (max-width: 768px) {
    .custom-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .custom-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        left: 0;
        width: 100%;
    }
    
    .main-content.mobile-expanded {
        left: 0;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    /* Fix summary cards for tablet */
    .summary-cards .col-lg-3 {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    /* Fix UPS cards for tablet */
    #ups_card_div .col-lg-3 {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    .summary-cards .row {
        margin: 0 10px;
    }
    
    .ups-cards-section {
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .custom-sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .top-bar {
        padding: 10px 15px;
    }
    
    .dashboard-content {
        padding: 10px;
    }
    
    /* Fix summary cards for mobile */
    .summary-cards .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    /* Fix UPS cards for mobile */
    #ups_card_div .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .summary-cards .row {
        margin: 0 5px;
    }
    
    .ups-cards-section {
        margin: 0 5px;
    }
    
    .col-lg-3 {
        margin-bottom: 15px;
    }
    
    .summary-card {
        padding: 15px;
        height: 80px;
    }
    
    .card-content h3 {
        font-size: 24px;
    }
}

/* Overlay for mobile */
.custom-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.custom-sidebar-overlay.show {
    display: block;
}

/* Remove body scroll */
body {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure proper height for dashboard div */
#dashboard_div {
    height: 100vh;
    overflow: hidden;
}

/* Fix for existing dashboard styles */
.top_div {
    margin-top: 0;
}

.main_div {
    margin-top: 20px;
}

/* Ensure cards work well with new layout */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* UPS Card Styles */
.ups-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #ffffff;
    margin-bottom: 20px;
}

.ups-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chart_card {
    position: relative;
    min-height: 126px;  
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.chart_card .apexcharts-canvas {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.chart_card svg {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .chart_card {
        min-height: 100px;
    }
}

@media (max-width: 576px) {
    .chart_card {
        min-height: 80px;
    }
}


/* Battery styles */
.battery_div {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.charge_div {
    height: 100%;
    background: #28a745;
    border-radius: 15px;
    transition: width 0.5s ease;
    min-width: 0;
}

.charge_level_div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 12px;
    color: #333;
    z-index: 2;
}

/* Card content styles */
.ups_heading h4 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.ups_heading p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
}

.ups_img {
    border-radius: 8px;
}

/* Ensure proper card structure */
.card {
    position: relative;
    overflow: hidden;
}

.card p-2, .card p-3 {
    position: relative;
    z-index: 1;
}

/* Fix for ApexCharts positioning */
.apexcharts-container {
    position: relative !important;
}

.apexcharts-canvas {
    position: relative !important;
}

/* Ensure charts don't overflow */
.col-lg-3 {
    position: relative;
    overflow: hidden;
}

/* Responsive chart sizing */
@media (max-width: 768px) {
    .chart_card {
        height: 100px;
    }
}

@media (max-width: 576px) {
    .chart_card {
        height: 80px;
    }
}



