/* RESET */
:root {
    --bg: #f0f4f8;
    --bg-2: #e8edf3;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-2: rgba(241, 245, 249, 0.86);

    --border: rgba(100, 116, 139, 0.14);
    --border-2: rgba(100, 116, 139, 0.20);
    --text: #1e293b;
    --muted: #64748b;

    --accent: #7c3aed;
    --accent-2: #3b82f6;

    --green: #16a34a;
    --orange: #d97706;
    --red: #dc2626;

    --radius: 22px;
    --shadow: 0 8px 26px rgba(0,0,0,0.08);
    --shadow-soft: 0 12px 40px rgba(100, 116, 139, 0.15);
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 100%);
    color: var(--text);
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* LAYOUT */
.layout {
    display: grid;
    grid-template-columns: 0px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.3s ease;
}

.layout.sidebar-open {
    grid-template-columns: 280px minmax(0, 1fr);
}

aside {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95));
    border-right: 1px solid var(--border);
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 100;
}

.layout.sidebar-open aside {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

main {
    padding: 25px;
    overflow-x: hidden;
    position: relative;
}

.sidebar-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 200;
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, left 0.3s ease;
}

.layout.sidebar-open .sidebar-toggle {
    left: 298px;
}

.sidebar-toggle:hover {
    background: rgba(241,245,249,0.98);
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    transform: none;
    filter: none;
}

/* SIDEBAR */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.18);
    /* margin-top: 40px; */
}

.brand-mark {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #38bdf8, #2dd4bf);
    color: #03111f;
    font-size: 1.2rem;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.brand-title {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
}

.brand-subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.tabs {
    display: grid;
    gap: 8px;
    margin: 20px 0 16px;
}

.tabs a {
    padding: 12px 14px;
    text-decoration: none;
    color: #1e40af;
    background: rgba(226, 232, 240, 0.7);
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tabs a.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.20), rgba(45, 212, 191, 0.14));
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.import-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 18px;
    padding: 16px;
}

.import-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.import-card p {
    color: var(--muted);
    margin: 0 0 12px;
}

.file-wrap {
    position: relative;
    display: inline-flex;
}

.file-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px dashed rgba(14, 116, 144, 0.45);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    font-weight: 800;
    color: #0e7490;
}

/* TOPBAR */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-kicker {
    margin: 0 0 6px;
    color: #0e7490;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-title {
    margin: 0;
    font-size: 1.4rem;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
}

.page-note {
    margin: 6px 0 0;
    color: #475569;
    font-size: 0.95rem;
}

.page-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* CARDS */
.card,
.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.92));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(100, 116, 139, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover,
.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 50px rgba(100, 116, 139, 0.20);
    border-color: rgba(124, 58, 237, 0.25);
}


.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 16px;
    flex-direction: row;
    flex-wrap: wrap;
}

.panel-head h2,
.panel-head h3 {
    margin: 0;
}

.panel-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.small-muted {
    color: var(--muted);
    font-size: 0.92rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

.metric-card,
.piora-card {
    display: block;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.90));
    border: 1px solid rgba(100, 116, 139, 0.14);
    border-radius: 20px;
    padding: 16px;
    text-align: left;
    border-left: 6px solid rgba(124, 58, 237, 0.35);
    transition: transform 0.16s ease, border-color 0.16s ease;
    text-decoration: none;
    color: inherit;
}

.metric-card:hover,
.piora-card:hover {
    transform: translateY(-2px);
    border-left-color: rgba(124, 58, 237, 0.65);
}


.metric-card.normal,
.piora-card.normal { border-left-color: var(--green); }
.metric-card.monitorar,
.piora-card.monitorar { border-left-color: var(--orange); }
.metric-card.alerta,
.piora-card.alerta { border-left-color: var(--red); }

.metric-card span,
.piora-card .equip {
    display: block;
    font-size: 13px;
    color: #475569;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    font-size: 26px;
    margin-top: 5px;
    color: #0f172a;
}

.piora-card .valor {
    font-size: 20px;
    font-weight: 800;
}

.plan-summary-card {
    border-radius: 24px;
    padding: 20px 18px 18px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    /* margin-top: 20px; */
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.plan-summary-card.plan-summary-bronze { border-left-color: #c2410c; background: rgba(254, 224, 179, 0.35); }
.plan-summary-card.plan-summary-prata { border-left-color: #475569; background: rgba(148, 163, 184, 0.22); }
.plan-summary-card.plan-summary-ouro { border-left-color: #f59e0b; background: rgba(253, 224, 71, 0.22); }
.plan-summary-card.plan-summary-corporativo { border-left-color: #7c3aed; background: rgba(199, 210, 254, 0.26); }

.plan-summary-card .plan-summary-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: #111827;
}

.plan-summary-card .plan-summary-list {
    list-style: none;
    padding: 0;
    /* margin: 0 0 16px; */
    display: grid;
    /* gap: 5px; */
}

.plan-summary-card .plan-summary-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: #334155;
    font-size: 0.8rem;
    /* line-height: 1.5; */
}

.plan-summary-bullet {
    display: inline-flex;
    width: 1.3rem;
    min-width: 1.3rem;
    /* height: 1.3rem; */
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    /* background: #e2e8f0; */
    color: #111827;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.plan-footnote{
    font-size: 0.7rem;
}
.plan-summary-bullet-lightning {
    /* background: #fde68a; */
    color: #92400e;
}

.plan-summary-card .plan-summary-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.plan-summary-card.plan-summary-bronze .plan-summary-cta { background: #c2410c; color: #fff; }
.plan-summary-card.plan-summary-prata .plan-summary-cta { background: #475569; color: #fff; }
.plan-summary-card.plan-summary-ouro .plan-summary-cta { background: #f59e0b; color: #111; }
.plan-summary-card.plan-summary-corporativo .plan-summary-cta { background: #7c3aed; color: #fff; }

@media (max-height: 820px) {
    aside {
        padding: 16px;
    }

    .tabs {
        margin: 14px 0 12px;
        gap: 6px;
    }

    .tabs a {
        padding: 10px 12px;
    }

    .plan-summary-card {
        padding: 16px 14px 14px;
    }

    .plan-summary-card .plan-summary-title {
        margin-bottom: 10px;
        font-size: 0.95rem;
    }

    .plan-summary-card .plan-summary-list li {
        font-size: 0.76rem;
    }

    .plan-summary-card .plan-summary-cta {
        margin-top: 10px;
        padding: 9px 10px;
    }
}

.panel.panel-active {
    border-color: #4338ca;
    box-shadow: 0 20px 45px rgba(67, 56, 202, 0.08);
}

.plan-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #3730a3;
    background: rgba(196, 181, 253, 0.25);
}

.plan-card {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.plan-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 18px;
}

.plan-card-head h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.2;
}

.plan-title-dot {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #fff;
}

.plan-card-bronze .plan-title-dot { background: #c2410c; }
.plan-card-prata .plan-title-dot { background: #475569; }
.plan-card-ouro .plan-title-dot { background: #f59e0b; color: #111; }
.plan-card-corporativo .plan-title-dot { background: #7c3aed; }

.plan-price {
    margin: 16px 0 20px;
}

.plan-price strong {
    font-size: 1.6rem;
    color: #111827;
    display: block;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.plan-features li {
    position: relative;
    padding-left: 34px;
    color: #334155;
    line-height: 1.6;
    font-size: 0.95rem;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #6366f1;
    color: #fff;
    font-size: 0.75rem;
}

.plan-card-prata .plan-features li::before { background: #475569; }
.plan-card-ouro .plan-features li::before { background: #f59e0b; color: #111; }
.plan-card-bronze .plan-features li::before { background: #c2410c; }
.plan-card-corporativo .plan-features li::before { background: #7c3aed; }

.plan-action {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    align-items: center;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.plan-action:hover {
    transform: translateY(-1px);
}

.plan-action-bronze { background: #c2410c; color: #fff; }
.plan-action-prata { background: #475569; color: #fff; }
.plan-action-ouro { background: #f59e0b; color: #111; }
.plan-action-corporativo { background: #7c3aed; color: #fff; }

.plan-action-disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: default;
    border-color: rgba(148, 163, 184, 0.3);
    opacity: 0.75;
}

.plan-action-primary {
    box-shadow: inset 0 0 0 0 transparent;
}

.piora-card .delta {
    font-size: 13px;
    margin-top: 8px;
    display: block;
}

.delta.pos { color: #dc2626; }
.delta.neg { color: #16a34a; }

/* TABELAS */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.14);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.td-highlight {
    background: rgba(124, 58, 237, 0.04);
    border-left: 1px solid rgba(124, 58, 237, 0.03);
    border-right: 1px solid rgba(124, 58, 237, 0.03);
}

.status-pill {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.pill-normal { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.pill-monitorar { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.pill-alerta { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.pill-sem-configuracao { background: rgba(100, 116, 139, 0.12); color: #334155; text-decoration: none; }

/* FILTROS */
label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1e293b;
}

input,
select,
textarea,
button {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(100, 116, 139, 0.28);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 2.5rem;
}

button {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(59, 130, 246, 0.98));
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    border: none;
    margin-top: 10px;
    border-radius: 12px;
    transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.16);
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(124, 58, 237, 0.22);
}

button:active {
    transform: translateY(0);
}


button.secondary {
    background: rgba(241, 245, 249, 0.95);
    color: #1e293b;
    border: 1px solid rgba(100, 116, 139, 0.28);
    box-shadow: none;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

button.secondary:hover {
    background: rgba(226, 232, 240, 0.98);
    border-color: rgba(124, 58, 237, 0.35);
    transform: translateY(-1px);
}


.inline-check {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.inline-check > strong {
    width: 100%;
    flex-basis: 100%;
    margin-bottom: 2px;
    color: #1e293b;
}

.inline-check label {
    font-weight: 600;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin: 0;
    background: rgba(226, 232, 240, 0.85);
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    color: #1e293b;
}

.inline-check input {
    width: auto;
}

.flash {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 15px;
    font-weight: 700;
}

.success { background: rgba(22, 163, 74, 0.10); color: #15803d; border: 1px solid rgba(22, 163, 74, 0.25); }
.danger { background: rgba(220, 38, 38, 0.10); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.25); }
.warning { background: rgba(217, 119, 6, 0.10); color: #b45309; border: 1px solid rgba(217, 119, 6, 0.25); }

/* MONITORAMENTO */
.monitoring-page {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.monitoring-hero {
    padding: 0 4px 4px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.monitoring-title {
    margin: 0;
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}

.monitoring-lead {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
    max-width: 760px;
    line-height: 1.6;
}

.monitoring-steps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(241, 245, 249, 0.92);
    border: 1px solid rgba(100, 116, 139, 0.20);
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 700;
}

.monitoring-stack {
    display: grid;
    gap: 24px;
}

.monitoring-section-card,
.monitoring-action-card,
.monitoring-graph-card {
    background: #ffffff;
    border: 1px solid rgba(100, 116, 139, 0.14);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 24px 80px rgba(100, 116, 139, 0.12);
}

.monitoring-section-card-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95));
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.14);
}

.section-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.section-eyebrow {
    margin: 0 0 6px;
    color: #0e7490;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    font-weight: 800;
}

.section-copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.section-badge,
.graph-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.20);
    font-size: 0.86rem;
    font-weight: 700;
}

.filters-grid {
    grid-template-columns: minmax(0, 220px) minmax(0, 280px) minmax(0, 320px);
    gap: 16px;
    align-items: end;
}

.field-block {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.field-block-full {
    grid-column: 1 / -1;
    margin-top: 16px;
    min-width: 0;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 1px;
    margin-top: 16px;
}

/* evita "barra"/largura infinita em casos em que não há conteúdo */


.chip-option {
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.20);
    background: rgba(241, 245, 249, 0.90);
    color: #334155;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.chip-option:hover {
    transform: translateY(-1px);
}

.chip-option.is-active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.94), rgba(59, 130, 246, 0.94));
    color: #ffffff;
    border-color: transparent;
}

/**/
.chip-option input {
    position: fixed; 
    opacity: 0;
    pointer-events: none;
}

.measurement-stack {
    display: grid;
    gap: 14px;
}

.measurement-card {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.92));
    border: 1px solid rgba(100, 116, 139, 0.14);
}

.measurement-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.measurement-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 116, 144, 0.08);
    border: 1px solid rgba(14, 116, 144, 0.20);
    color: #0e7490;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.measurement-card-sub {
    color: var(--muted);
    font-size: 0.9rem;
}

.measurement-grid {
    display: grid;
    /* grid-template-columns: 1fr 1fr 1fr; */
    gap: 16px;
    grid-auto-flow: row;
}

.measurement-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(100, 116, 139, 0.14);
}

.switch-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #1e293b;
    font-weight: 700;
}

.switch-pill input {
    display: none;
}

.switch-track {
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.22);
    position: relative;
    transition: background 0.2s ease;
}

.switch-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    transition: left 0.2s ease;
}

.switch-pill input:checked + .switch-track {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(45, 212, 191, 0.95));
}

.switch-pill input:checked + .switch-track .switch-thumb {
    left: 28px;
}

.obs-toggle {
    width: auto;
    margin: 0;
    padding: 0.7rem 1rem;
    font-weight: 800;
}

.monitoring-action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.primary-action {
    width: auto;
    min-width: 320px;
    height: 54px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(45, 212, 191, 0.95));
    color: #03111f;
    box-shadow: 0 14px 30px rgba(56, 189, 248, 0.24);
    border-radius: 16px;
    margin-bottom: 15px;
}

.monitoring-graph-card {
    padding: 20px 20px 8px;
}

.monitoring-graph,
.chart-wrap {
    width: 100%;
    min-height: 360px;
}

.monitoring-graph {
    min-height: 700px;
}

.obs-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 16px;
    background: rgba(241, 245, 249, 0.95);
    display: grid;
    gap: 10px;
}

.obs-panel[hidden] {
    display: none;
}

.obs-panel textarea {
    min-height: 110px;
    resize: vertical;
    width: 100%;
}

.obs-panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.obs-panel-actions button {
    width: auto;
    margin: 0;
}

/* AUXILIARES */
.mb-20 { margin-bottom: 20px; }
.period-select { min-width: 220px; }
.h3-reset { margin: 0; }
.p-reset { margin-bottom: 0; }

/* RESPONSIVO */
@media (max-width: 980px) {
    .layout,
    .layout.sidebar-open {
        grid-template-columns: 1fr;
    }

    aside {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        z-index: 150;
        overflow-y: scroll;
    }

    .layout.sidebar-open aside {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    main {
        padding-top: 68px;
    }

    .monitoring-hero,
    .monitoring-action-card,
    .section-head {
        flex-direction: column;
        align-items: start;
    }

    .filters-grid,
    .measurement-grid {
        grid-template-columns: 1fr;
    }

    .primary-action {
        width: 100%;
        min-width: 0;
    }

    .monitoring-steps {
        justify-content: flex-start;
    }

    .col-3,
    .col-4,
    .col-6 {
        grid-column: span 12;
    }
}












.monitoring-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px); /* ajuste conforme seu header */
    overflow: hidden;
}

.monitoring-sidebar {
    width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: 100%;
}

.monitoring-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.graph-container {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}

.monitoring-graph {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Estilo para datas bloqueadas */
select.date-blocked,
input.date-blocked {
    background: rgba(220, 38, 38, 0.08); /* Fundo do card de bloqueio */
    border-color: rgba(220, 38, 38, 0.22); /* Borda do card de bloqueio */
    color: #b91c1c; /* Cor do texto do card de bloqueio */
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.w-full { width: 100%; }

/* Scrollbar bonita na sidebar */
.monitoring-sidebar::-webkit-scrollbar {
    width: 6px;
}
.monitoring-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hide-on-print {
    display: block;
}

.show-on-print {
    display: none;
}

@media print {
    .hide-on-print {
        display: none !important;
    }

    .show-on-print {
        display: block !important;
    }

    .print-page-break {
        break-before: page;
        page-break-before: always;
    }
}