.metric-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.metric-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.metric-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.solar-icon {
    color: #ffc107;
}
.battery-icon {
    color: #28a745;
    animation: pulse 2s infinite;
}
.load-icon {
    color: #17a2b8;
}
.status-icon {
    color: #dc3545;
    transition: color 0.3s ease;
}

.charging-history {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    padding: 25px;
    height: calc(100vh - 150px);
    overflow-y: auto;
}

.battery-status {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.battery-info {
    flex: 1;
    padding: 20px;
    border-right: 2px solid #eee;
    height: 100%;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

.chart-container {
    flex: 2;
    min-height: 400px;
    height: 100%;
    background: #ffffff;
    border-radius: 0 15px 15px 0;
    padding: 1rem;
    height: calc(100% - 2rem);
    width: 100%;
}

.battery-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.battery-metric {
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.battery-metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chart-container {
    min-height: 350px;
    padding: 1rem;
    background: #fff;
    border-radius: 0 15px 15px 0;
    width: 100%;
}

#charging-chart {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge i {
    font-size: 8px;
}

@media (max-width: 768px) {
    .battery-info {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .battery-metrics {
        grid-template-columns: 1fr;
    }

    .charging-history {
        height: auto;
        margin-bottom: 20px;
    }

    .chart-container {
        min-height: 350px;
        height: 350px;
        border-radius: 0 0 15px 15px;
    }

    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }

    #charging-chart {
        height: 100%;
        min-height: 350px;
    }
}

.container-fluid {
    padding: 0 30px;
}

.card {
    border: none;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
    padding: 1rem 1.5rem;
}

.bg-gradient {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #2c3e50;
    font-weight: 600;
}

/* Battery Level Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Add to existing styles */
.battery-status-main {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.battery-status-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.chart-container {
    width: 100%;
    min-height: 350px;
    background: #fff;
    border-radius: 15px;
}

@media (max-width: 768px) {
    .battery-status-main {
        margin-bottom: 1rem;
    }

    .chart-container {
        height: 300px !important;
        min-height: 300px;
    }
}

/* Add these new styles */
.value-danger {
    color: #dc3545 !important;
}

.value-warning {
    color: #ffc107 !important;
}

.value-success {
    color: #28a745 !important;
}

.icon-danger {
    color: #dc3545 !important;
    animation: none !important;
}

.icon-warning {
    color: #ffc107 !important;
    animation: none !important;
}

.icon-success {
    color: #28a745 !important;
}

/* Modal sizing and scrolling */
.modal-xl {
    min-height: calc(100% - 3.5rem);
}

.modal-content {
    max-height: 95vh;
    overflow-y: auto;
}

.modal-body {
    padding: 1.5rem;
}

.modal-dialog.modal-xl {
    max-width: 90%;
    margin: 1rem auto;
}

/* Adjust card spacings */
.card {
    margin-bottom: 1rem;
}

/* Make sticky positioning work better */
.sticky-top {
    top: 1rem;
    z-index: 1020;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .modal-dialog.modal-xl {
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .modal-body {
        padding: 1rem;
    }
}

.soc-id {
    font-family: monospace;
    letter-spacing: 0.5px;
}

.location {
    font-size: 0.9rem;
    color: #6c757d;
}

.fa-microchip,
.fa-map-marker-alt {
    color: #0d6efd;
}

/* Modal scrolling styles */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Sticky sidebar improvements */
.sticky-top {
    position: sticky;
    top: 1rem;
    z-index: 1020;
}

/* Chart container improvements */
.chart-container {
    min-height: 400px;
    height: 100%;
}

/* Modal size optimization */
@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

@media (max-width: 991px) {
    .sticky-top {
        position: relative;
        top: 0;
    }
}

/* Warning Card Styles */
.warning-card .warning-icon {
    color: #dc3545;
}

.warning-card .card-header {
    border-bottom: 2px solid rgba(220, 53, 69, 0.2);
}

.warning-section h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

.warning-section .alert {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.warning-section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Warning Icons */
.warning-section .fa-solar-panel {
    color: #ffc107;
}

.warning-section .fa-battery-three-quarters {
    color: #0dcaf0;
}

.warning-section .fa-lightbulb {
    color: #198754;
}

/* No Warnings Message */
#no-warnings {
    color: #198754;
    font-size: 0.9rem;
}

#no-warnings .fa-check-circle {
    font-size: 1.1rem;
}
