/* Dashboard Custom Styles */

/* Site-wide max-width wrapper */
.site-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure navbar takes full width within wrapper */
.site-wrapper .navbar {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Top nav quick actions: icon above label (layout only; keeps navbar colors) */
#guestAuthNav,
.top-nav-quick-actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.15rem;
}

.top-nav-icon-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    text-align: center;
    padding: 0.3rem 0.45rem;
    line-height: 1.1;
}

.top-nav-icon-stack.dropdown-toggle::after {
    display: none;
}

.top-nav-icon-stack i {
    font-size: 1.15rem;
    line-height: 1;
    margin: 0 !important;
}

.top-nav-icon-stack-media {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 !important;
    object-fit: contain;
}

.top-nav-icon-stack-avatar {
    border-radius: 50%;
    object-fit: cover;
}

.nav-company-logo.top-nav-icon-stack-media {
    border-radius: 0.35rem;
    background: #fff;
}

.top-nav-icon-stack-label {
    font-size: 0.68rem;
    font-weight: 500;
    max-width: 4.75rem;
    white-space: normal;
}

.top-nav-user-stack .top-nav-icon-stack-label {
    max-width: 5.75rem;
}

.top-nav-quick-actions .admin-notif-bell-btn {
    align-self: flex-end;
}

/* Admin delivery health (Node WhatsApp + Resend) — top nav, left of Painel */
.top-nav-quick-actions .admin-delivery-health {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.35rem;
    align-self: center;
}

.admin-delivery-health-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.05rem;
    line-height: 1;
    cursor: default;
}

.admin-delivery-health-badge.is-live {
    background: rgba(25, 135, 84, 0.35);
    border-color: rgba(144, 238, 144, 0.75);
}

.admin-delivery-health-badge.is-down {
    background: rgba(220, 53, 69, 0.35);
    border-color: rgba(255, 182, 193, 0.85);
}

.admin-delivery-health-badge.is-off {
    opacity: 0.55;
}

.admin-delivery-health-badge .fab.fa-whatsapp {
    color: #25d366;
}

/* Bell in top nav — in dashboard.css because lean pages skip admin_notifications.css */
.navbar .admin-notif-bell-btn {
    position: relative;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.navbar .admin-notif-bell-btn:hover,
.navbar .admin-notif-bell-btn:focus,
.navbar .admin-notif-bell-btn:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    outline: none;
    box-shadow: none;
}

.navbar .admin-notif-bell-btn .fa-bell {
    font-size: 1.15rem;
    color: inherit;
}

.navbar .admin-notif-bell-btn.top-nav-icon-stack .top-nav-icon-stack-label {
    color: inherit;
}

.admin-notif-bell-btn.top-nav-icon-stack {
    padding: 0.3rem 0.45rem;
}

.top-nav-notif-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.admin-notif-bell-btn.top-nav-icon-stack .admin-notif-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.62rem;
    line-height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
    color: #1a1a2e;
    font-weight: 700;
    text-align: center;
    border: 2px solid #667eea;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.admin-notif-bell-btn.top-nav-icon-stack .admin-notif-badge.d-none {
    display: none !important;
}

/* Ensure main content grows to fill available space */
.site-wrapper main {
    flex: 1;
}

/* Responsive behavior */
@media (max-width: 1300px) {
    .site-wrapper {
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .site-wrapper {
        padding: 0;
    }
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

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

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Chart specific styles */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Status cards */
.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Brand primary CTA — overrides Bootstrap blue on every base.html page.
   Matches auth.css / modal_base footer (gradient #667eea → #764ba2). */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}
.btn-primary:disabled,
.btn-primary.disabled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    opacity: 0.65;
}
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    border: none;
    color: #fff;
}

.bg-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    #main-chart {
        height: 60vh !important;
    }
}

/* Loading animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Form controls */
.form-range {
    height: 1.5rem;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Fullscreen chart adjustments */
.card:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
}

.card:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
}

.card:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
}

/* ===== SEASONAL PIE CHART STYLES ===== */

/* Main seasonal chart container */
.seasonal-chart-container {
    margin-top: 20px;
    /* Made invisible - keeping only as structural placeholder */
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Pie chart wrapper */
.seasonal-pie-wrapper {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.seasonal-chart-canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 450px;
}

/* Seasonal summary - Right side vertical */
.seasonal-summary {
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 500px;
    overflow-y: auto;
    padding: 15px;
}

.seasonal-summary-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.seasonal-summary-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seasonal-summary-item {
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.seasonal-summary-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.seasonal-summary-item.active {
    background: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Seasonal summary icon */
.seasonal-summary-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.seasonal-summary-item:hover .seasonal-summary-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    border-color: currentColor;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Seasonal summary info */
.seasonal-summary-info {
    flex: 1;
}

.seasonal-summary-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.seasonal-summary-consumption {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 2px;
}

.seasonal-summary-consumption .consumption-value {
    font-weight: 600;
    color: #2c3e50;
}

.seasonal-summary-consumption .consumption-unit {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 2px;
}

.seasonal-summary-percentage {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Seasonal legend styles */
.seasonal-legend {
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.seasonal-legend-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

/* Individual legend items */
.seasonal-legend-item {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.seasonal-legend-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.seasonal-legend-item.active {
    background: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Legend icon */
.seasonal-legend-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.seasonal-legend-item:hover .seasonal-legend-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    border-color: currentColor;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Legend info */
.seasonal-legend-info {
    flex: 1;
}

.seasonal-legend-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.seasonal-legend-consumption {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 2px;
}

.seasonal-legend-consumption .consumption-value {
    font-weight: 600;
    color: #2c3e50;
}

.seasonal-legend-consumption .consumption-unit {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 2px;
}

.seasonal-legend-percentage {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Seasonal color scheme for legend items */
.seasonal-legend-item[data-season="spring"] .seasonal-legend-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.seasonal-legend-item[data-season="summer"] .seasonal-legend-icon {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.seasonal-legend-item[data-season="autumn"] .seasonal-legend-icon {
    background: linear-gradient(135deg, #fd7e14, #dc3545);
}

.seasonal-legend-item[data-season="winter"] .seasonal-legend-icon {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

/* Responsive adjustments for seasonal chart */
@media (max-width: 991px) {
    .seasonal-chart-container .row {
        flex-direction: column-reverse;
    }
    
    .seasonal-pie-wrapper {
        height: 500px;
        margin-top: 20px;
    }
    
    .seasonal-summary {
        height: auto;
        max-height: 300px;
    }
    
    .seasonal-summary-item {
        padding: 8px;
    }
    
    .seasonal-summary-icon {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .seasonal-chart-container {
        /* Keep invisible - no padding needed for placeholder */
        padding: 0;
        margin-top: 15px;
    }
    
    .seasonal-pie-wrapper {
        height: 500px;
    }
    
    .seasonal-summary {
        padding: 12px;
        margin-top: 15px;
    }
    
    .seasonal-summary-item {
        padding: 6px;
    }
    
    .seasonal-summary-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    .seasonal-summary-name {
        font-size: 0.85rem;
    }

    .seasonal-summary-consumption {
        font-size: 0.8rem;
    }
}

/* Features Carousel Styles */
#features-carousel {
    position: relative;
}

#features-carousel .carousel-item {
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

#features-carousel .carousel-item.active {
    opacity: 1;
}

#features-carousel .carousel-indicators {
    bottom: -50px;
}

#features-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #007bff;
    background-color: transparent;
    transition: all 0.3s ease;
}

#features-carousel .carousel-indicators button.active {
    background-color: #007bff;
    transform: scale(1.2);
}

#features-carousel .carousel-control-prev,
#features-carousel .carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#features-carousel .carousel-control-prev:hover,
#features-carousel .carousel-control-next:hover {
    opacity: 1;
}

#features-carousel .carousel-control-prev-icon,
#features-carousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

#features-carousel .feature-icon {
    transition: transform 0.3s ease;
}

#features-carousel .carousel-item.active .feature-icon {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#features-carousel .card-title {
    transition: color 0.3s ease;
}

#features-carousel .carousel-item.active .card-title {
    color: #007bff;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#features-carousel .card-text {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    #features-carousel .carousel-control-prev,
    #features-carousel .carousel-control-next {
        display: none;
    }

    #features-carousel .carousel-indicators {
        bottom: -40px;
    }
}

@media (max-width: 576px) {
    #features-carousel .card-body {
        padding: 2rem 1rem !important;
    }

    #features-carousel .feature-icon i {
        font-size: 3rem !important;
    }

    #features-carousel .card-title {
        font-size: 1.5rem !important;
    }
}

/* Nested year master tabs + chart-type tabs */
.year-charts-shell {
    background: #fff;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.year-charts-shell-header {
    padding: 1.15rem 1.25rem 0;
}

.year-charts-shell-header--nested {
    padding-top: 0.85rem;
}

.dashboard-scope-tabs-header {
    padding: 0.7rem 1.25rem 0;
    margin: 0;
}

.dashboard-scope-pane {
    display: none;
}

.dashboard-scope-pane.is-active {
    display: block;
}

.year-charts-shell-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.85rem;
}

.year-master-tab-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 0 0 0.55rem;
    border-bottom: 1px solid #dee2e6;
}

.year-master-tab {
    appearance: none;
    border: 0;
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 0.55rem 0.95rem 0.7rem;
    min-width: 6.75rem;
    flex: 1 1 0;
    max-width: 12rem;
    text-align: left;
    cursor: pointer;
    opacity: 0.5;
    position: relative;
    transition: opacity 0.15s ease;
}

.year-master-tab:hover {
    opacity: 0.82;
}

.year-master-tab.is-active,
.year-master-tab.active {
    opacity: 1;
}

.year-master-tab.is-active::after,
.year-master-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.55rem;
    height: 3px;
    background: #0d6efd;
    border-radius: 1px;
}

.year-master-tab-year {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}

.year-master-tab-kwh {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.95;
    margin-top: 0.15rem;
}

.year-master-tab-months {
    display: block;
    font-size: 0.72rem;
    opacity: 0.85;
}

.year-master-tab:nth-child(5n+1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.year-master-tab:nth-child(5n+2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.year-master-tab:nth-child(5n+3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.year-master-tab:nth-child(5n+4) {
    background: linear-gradient(135deg, #07e651 0%, #38f9d7 100%);
}

.year-master-tab:nth-child(5n) {
    background: linear-gradient(135deg, #667eea 0%, #3b4cca 100%);
}

.year-charts-shell .year-section {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.year-charts-shell .year-chart-tabs,
.year-charts-shell .chart-tabs {
    margin-top: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.year-charts-shell .no-data {
    padding: 1.25rem;
}

.rolling-consumption-range-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.25rem;
}

.rolling-consumption-range-summary-wrap {
    max-width: 100%;
}

.rolling-consumption-range-summary {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0;
    border: 0;
    white-space: nowrap;
    line-height: 1.4;
    color: #212529;
    text-decoration: none;
    cursor: pointer;
}

.rolling-consumption-range-summary:hover,
.rolling-consumption-range-summary:focus {
    color: #0d6efd;
    text-decoration: underline;
}

.rolling-consumption-range-summary .rolling-selected-range-label {
    font-weight: 500;
}

.rolling-consumption-range-summary .rolling-selected-range-dates {
    font-weight: 600;
}

#rolling-12-charts-shell > .year-chart-tabs {
    margin-top: 0.35rem;
}

/* Nested tab chrome (year charts + Consumo CPE) */
.chart-tabs,
.year-chart-tabs {
    margin-top: 1.5rem;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.year-chart-tabs-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem 0;
    margin: 0;
    background: transparent;
    border-bottom: 1px solid #dee2e6;
}

.year-chart-tab-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    min-width: 0;
}

.year-chart-tab {
    appearance: none;
    display: inline-block;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.45rem 0 0.55rem;
    margin-right: 1.25rem;
    margin-bottom: -1px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.year-chart-tab:hover {
    color: #0d6efd;
    background: none;
}

.year-chart-tab.is-active {
    color: #1e293b;
    border-bottom-color: #0d6efd;
    font-weight: 600;
}

.year-chart-tabs-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-bottom: 0.4rem;
}

.year-chart-tab-monthly-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.year-chart-tabs[data-active-tab="monthly"] .year-chart-tab-monthly-actions {
    display: inline-flex;
}

.cpe-schedule-mode-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.cpe-chart-tabs[data-active-tab="schedule_comparison"] .cpe-schedule-mode-actions {
    display: inline-flex;
}

.cpe-seasonal-mode-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.cpe-chart-tabs[data-active-tab="seasonal_comparison"] .cpe-seasonal-mode-actions {
    display: inline-flex;
}

.year-schedule-monthly-mode-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.year-chart-tabs[data-active-tab="schedule_monthly"] .year-schedule-monthly-mode-actions {
    display: inline-flex;
}

.year-cost-metrics-mode-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.year-chart-tabs[data-active-tab="cost_metrics"] .year-cost-metrics-mode-actions {
    display: inline-flex;
}

.monthly-hourly-actions,
.monthly-consumption-actions,
.monthly-cost-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.monthly-chart-tabs[data-active-tab="hourly"] .monthly-hourly-actions,
.monthly-chart-tabs[data-active-tab="consumption"] .monthly-consumption-actions,
.monthly-chart-tabs[data-active-tab="cost"] .monthly-cost-actions {
    display: inline-flex;
}

.monthly-chart-tabs.year-chart-tabs {
    margin-top: 0.75rem;
}

.cpe-schedule-mode-actions .btn.is-active,
.cpe-seasonal-mode-actions .btn.is-active,
.year-schedule-monthly-mode-actions .btn.is-active,
.year-cost-metrics-mode-actions .btn.is-active {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.year-chart-tabs-close {
    flex-shrink: 0;
}

.year-chart-pane {
    display: none;
}

.year-chart-pane.is-active {
    display: block;
}

.chart-tabs .chart-section,
.year-chart-tabs .chart-section {
    margin: 0;
    padding: 1.15rem 1.25rem 1.25rem;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.chart-tabs .monthly-chart-header,
.chart-tabs .seasonal-chart-header,
.year-chart-tabs .monthly-chart-header,
.year-chart-tabs .seasonal-chart-header {
    display: none;
}

.chart-pane-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

@media (max-width: 576px) {
    .year-chart-tab {
        font-size: 0.8rem;
        margin-right: 0.75rem;
    }

    .year-chart-tabs-header {
        padding: 0.55rem 0.85rem 0;
    }

    .chart-tabs .chart-section,
    .year-chart-tabs .chart-section {
        padding: 0.85rem;
    }

    .year-charts-shell-header {
        padding: 0.9rem 0.85rem 0;
    }

    .year-master-tab {
        min-width: 5.75rem;
        padding: 0.45rem 0.7rem 0.55rem;
        max-width: none;
        flex: 0 0 auto;
    }
}