:root {
    --bg-top: #eef7ff;
    --bg-bottom: #f6f3ea;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-border: rgba(15, 43, 74, 0.08);
    --text-main: #12304f;
    --text-soft: #5f7186;
    --accent: #0a84ff;
    --accent-strong: #0059b8;
    --accent-green: #1e9d63;
    --shadow-card: 0 20px 45px rgba(18, 48, 79, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(10, 132, 255, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(30, 157, 99, 0.14), transparent 22%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
    position: relative;
}

.hero-card,
.panel-card,
.metric-card {
    border: 1px solid var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}

.hero-card {
    border-radius: 28px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
}

.hero-brand {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.hero-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(18, 48, 79, 0.12));
}

.eyebrow,
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--accent-strong);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(1.7rem, 3vw, 2.9rem);
    line-height: 1.02;
    font-weight: 800;
    margin: 0;
}

.hero-copy {
    font-size: 0.98rem;
    margin-bottom: 0;
}

.hero-copy,
.section-subtitle,
.metric-foot,
.alerts-summary,
.detail-empty,
.empty-state p {
    color: var(--text-soft);
}

.panel-card {
    border-radius: 24px;
    padding: 1.5rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.section-heading-tight {
    align-items: center;
}

.section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.toolbar-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.segmented {
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(18, 48, 79, 0.06);
}

.segmented .btn {
    border-radius: 999px;
}

.segmented .btn.is-active {
    box-shadow: 0 10px 22px rgba(10, 132, 255, 0.22);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-summary {
    position: relative;
    overflow: hidden;
}

.dashboard-summary::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(10, 132, 255, 0.9), rgba(30, 157, 99, 0.85));
}

.dashboard-summary-copy {
    max-width: 420px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-soft);
}

.dashboard-summary .section-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
}

.dashboard-summary .section-title {
    font-size: 1.05rem;
}

.dashboard-summary .section-heading {
    margin-bottom: 0.85rem;
}

.metric-card {
    border-radius: 22px;
    padding: 1.25rem;
    min-height: 144px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 1px solid rgba(10, 132, 255, 0.08);
}

.metric-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 22px 0 0 22px;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.7), rgba(30, 157, 99, 0.55));
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 800;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    overflow: hidden;
    text-overflow: clip;
}

.metric-unit {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.metric-dual {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.2rem;
}

.metric-dual-line {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.chart-shell {
    position: relative;
    min-height: 420px;
}

.chart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.meta-chip,
.alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(10, 132, 255, 0.1);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.meta-chip.warning,
.alert-chip.warning {
    background: rgba(255, 177, 46, 0.18);
    color: #7a5300;
}

.meta-chip.success,
.alert-chip.success {
    background: rgba(30, 157, 99, 0.14);
    color: #146542;
}

.alerts-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.alert-item {
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(18, 48, 79, 0.08);
}

.alert-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.detail-panel {
    overflow: visible;
}

.detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.detail-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.detail-title-date {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.detail-table-wrap {
    border-radius: 16px;
    overflow: auto;
    background: rgba(18, 48, 79, 0.03);
}

.detail-table {
    margin-bottom: 0;
    min-width: 760px;
    font-size: 0.92rem;
}

.detail-table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(161, 221, 111, 0.65), rgba(111, 209, 173, 0.45));
    color: #425066;
    z-index: 1;
}

.hour-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(10, 132, 255, 0.1);
    color: var(--accent-strong);
}

.detail-empty,
.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 18px;
    background: rgba(18, 48, 79, 0.04);
}

.empty-state i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.results-shell .table {
    margin-bottom: 0;
}

.results-shell thead th {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(30, 157, 99, 0.18)) !important;
    color: var(--text-main) !important;
    border-color: rgba(18, 48, 79, 0.08);
}

.results-shell tbody tr:hover {
    background: rgba(10, 132, 255, 0.05);
}

.results-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.results-pagination-info {
    font-size: 0.9rem;
    color: var(--text-soft);
    font-weight: 600;
}

.results-help-note {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(10, 132, 255, 0.08);
    border: 1px solid rgba(10, 132, 255, 0.12);
    color: var(--text-main);
}

.results-help-note strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.results-help-note span {
    display: block;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.45;
}

.btn-soft {
    box-shadow: 0 12px 25px rgba(10, 132, 255, 0.18);
}

.form-control,
.form-select,
.btn {
    border-radius: 14px;
}

.form-control,
.form-select {
    border-color: rgba(18, 48, 79, 0.12);
    min-height: 48px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(10, 132, 255, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(10, 132, 255, 0.14);
}

.info-trigger {
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.consulta-modal {
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}

.consulta-info-modal {
    padding: 0.35rem 0.1rem 0.2rem;
}

.consulta-info-modal strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1rem;
    color: var(--text-main);
}

.consulta-info-modal span {
    display: block;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-soft);
    margin-bottom: 0.35rem;
}

@media (max-width: 1399px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .hero-card,
    .hero-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart-shell {
        min-height: 340px;
    }
}

@media (max-width: 767px) {
    .panel-card,
    .hero-card {
        border-radius: 20px;
        padding: 1.15rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        justify-content: flex-start;
    }

    .toolbar-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .toolbar-group .form-control,
    .toolbar-group .btn,
    .toolbar-group .btn-group {
        width: 100%;
    }
}
