:root{
    --bg:#07111f;
    --panel:#0f1b2d;
    --panel-2:#13233a;
    --panel-3:#182c49;
    --text:#e5eefc;
    --muted:#93a7c6;
    --primary:#3b82f6;
    --primary-2:#60a5fa;
    --border:#233754;
    --ok:#16a34a;
    --warn:#f59e0b;
    --danger:#ef4444;
}
*{
    box-sizing:border-box
}
html{
    scroll-behavior:smooth
}
body{
    margin:0;
    font-family:Segoe UI,Arial,sans-serif;
    background:radial-gradient(circle at top left, #10233d 0%, #050d18 52%, #02060d 100%);
    color:var(--text)
}
a{
    text-decoration:none;
    color:inherit
}
.shell{
    display:grid;
    grid-template-columns:280px 1fr;
    min-height:100vh
}
.sidebar{
    background:rgba(7,17,31,.95);
    padding:28px 22px;
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    gap:24px;
    position:sticky;
    top:0;
    height:100vh
}
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem 1.5rem;
}

.brand-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}
.brand span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-top:6px;
    font-weight:500
}
.sidebar nav{
    display:flex;
    flex-direction:column;
    gap:12px
}
.sidebar nav a{
    padding:14px 16px;
    background:linear-gradient(180deg, rgba(15,27,45,.95), rgba(11,20,34,.95));
    border-radius:14px;
    border:1px solid var(--border);
    transition:.2s ease;
    font-weight:600
}
.sidebar nav a:hover{
    transform:translateY(-1px);
    border-color:#3867a7;
    background:#142641
}
.sidebar-footer{
    margin-top:auto;
    display:flex;
    flex-direction:column;
    gap:12px
}
.sidebar-stat{
    padding:14px 16px;
    border-radius:16px;
    background:rgba(16,31,53,.9);
    border:1px solid var(--border)
}
.sidebar-stat span{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-bottom:4px
}
.sidebar-stat strong{
    font-size:14px;
    line-height:1.4
}
.main{
    display:flex;
    flex-direction:column
}
.topbar{
    padding:26px 32px;
    border-bottom:1px solid rgba(35,55,84,.9);
    background:rgba(6,14,24,.82);
    backdrop-filter:blur(12px);
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start
}
.topbar h1{
    margin:0 0 6px;
    font-size:32px;
    letter-spacing:-.03em
}
.topbar p{
    margin:0;
    color:var(--muted)
}
.topbar-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px
}
.topbar-chip{
    padding:10px 14px;
    border-radius:999px;
    border:1px solid var(--border);
    background:rgba(17,30,50,.9);
    font-size:13px;
    color:#d9e8ff
}
.content{
    padding:26px 32px 34px
}
.eyebrow{
    display:inline-block;
    color:#8fc2ff;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.12em;
    margin-bottom:8px
}
.hero-panel{
    display:grid;
    grid-template-columns:1.7fr 1fr;
    gap:18px;
    margin-bottom:22px
}
.hero-panel-compact{
    grid-template-columns:1.5fr .9fr
}
.hero-copy,.panel-glass{
    border:1px solid rgba(62,96,146,.65);
    border-radius:24px;
    background:linear-gradient(180deg, rgba(15,30,53,.95), rgba(10,18,31,.92));
    box-shadow:0 12px 34px rgba(0,0,0,.26)
}
.hero-copy{
    padding:28px 28px 24px
}
.hero-copy h2{
    margin:0 0 12px;
    font-size:36px;
    line-height:1.08;
    letter-spacing:-.04em;
    max-width:14ch
}
.hero-copy p{
    margin:0;
    color:#c3d4ef;
    max-width:70ch;
    line-height:1.6
}
.hero-badges{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
    align-items:center
}
.hero-range{
    display:inline-flex;
    gap:8px;
    align-items:center;
    padding:10px 14px;
    border-radius:999px;
    background:rgba(8,18,31,.88);
    border:1px solid var(--border);
    font-size:13px
}
.hero-side{
    padding:22px 22px 18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:12px
}
.hero-side-label{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:#8fc2ff
}
.hero-side strong{
    font-size:21px;
    line-height:1.35
}
.hero-side small{
    color:var(--muted);
    line-height:1.45
}
.filter-bar{
    display:flex;
    gap:16px;
    align-items:end;
    flex-wrap:wrap;
    background:var(--panel);
    padding:16px;
    border:1px solid var(--border);
    border-radius:20px;
    margin-bottom:22px
}
.filter-bar-modern{
    background:linear-gradient(180deg, rgba(14,25,42,.95), rgba(9,18,31,.95));
    box-shadow:0 12px 30px rgba(0,0,0,.18)
}
.filter-bar div,.form-group{
    display:flex;
    flex-direction:column;
    gap:8px
}
label{
    font-size:13px;
    color:#d7e6ff;
    font-weight:600
}
input, textarea{
    background:#07111f;
    color:var(--text);
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px 14px;
    min-width:220px
}
textarea.textarea{
    width:100%;
    min-height:120px
}
.btn-primary,.btn-secondary{
    border:none;
    padding:12px 18px;
    border-radius:12px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease
}
.btn-primary{
    background:linear-gradient(180deg, var(--primary), #1d4ed8);
    color:white;
    box-shadow:0 10px 20px rgba(29,78,216,.25)
}
.btn-secondary{
    background:#334155;
    color:#fff
}
.btn-primary:hover,.btn-secondary:hover{
    transform:translateY(-1px)
}
.cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-bottom:20px
}
.card,.panel{
    background:linear-gradient(180deg, rgba(14,25,42,.95), rgba(9,18,31,.95));
    border:1px solid var(--border);
    border-radius:22px;
    padding:18px;
    box-shadow:0 10px 28px rgba(0,0,0,.18)
}
.cards-modern .card{
    padding:20px
}
.card span{
    display:block;
    color:var(--muted);
    margin-bottom:8px;
    font-size:13px
}
.card strong{
    font-size:28px;
    letter-spacing:-.03em
}
.card small{
    display:block;
    margin-top:10px;
    color:#bfd2ee;
    line-height:1.45
}
.feature-card{
    position:relative;
    overflow:hidden
}
.feature-card::after{
    content:'';
    position:absolute;
    inset:auto -40px -40px auto;
    width:120px;
    height:120px;
    background:radial-gradient(circle, rgba(96,165,250,.16), transparent 70%)
}
.card-alert{
    border-color:rgba(239,68,68,.45);
    background:linear-gradient(180deg, rgba(49,18,24,.96), rgba(25,12,16,.96))
}
.card-risk{
    border-color:rgba(245,158,11,.45)
}
.card-risk-critical{
    border-color:rgba(239,68,68,.65);
    box-shadow:0 0 0 1px rgba(239,68,68,.18), 0 10px 28px rgba(239,68,68,.14)
}
.grid-2{
    display:grid;
    grid-template-columns:1.7fr 1fr;
    gap:16px
}
.dashboard-main{
    align-items:start
}
.panel-title-row{
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-start;
    margin-bottom:12px
}
.panel-title-row h3,.panel-title-row h4{
    margin:0
}
.legend-pill{
    padding:9px 12px;
    border-radius:999px;
    background:rgba(11,21,37,.9);
    border:1px solid var(--border);
    font-size:12px;
    color:#d7e6ff
}
.recommendation-panel{
    margin-bottom:20px
}
.quick-nav-panel{
    margin-bottom:20px
}
.sticky-nav-panel{
    position:sticky;
    top:14px;
    z-index:6;
    backdrop-filter:blur(10px)
}
.quick-nav-header{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    flex-wrap:wrap
}
.quick-nav-header h3{
    margin:0 0 8px;
    font-size:28px;
    letter-spacing:-.03em
}
.quick-nav-header p,.section-header p{
    margin:0;
    color:var(--muted);
    line-height:1.5
}
.quick-nav-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap
}
.quick-nav-actions-grid{
    max-width:620px;
    justify-content:flex-end
}
.nav-chip,.chip,.badge{
    background:#091321;
    border:1px solid var(--border);
    color:var(--text);
    padding:10px 14px;
    border-radius:999px;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    font-weight:600
}
.nav-chip:hover,.chip:hover{
    border-color:#4f8de7
}
.nav-chip-primary{
    background:linear-gradient(180deg, rgba(59,130,246,.95), rgba(29,78,216,.95));
    border-color:transparent
}
.chart-focus-toolbar{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px
}
.nav-chip-chart.active{
    background:linear-gradient(180deg, rgba(59,130,246,.95), rgba(29,78,216,.95));
    border-color:transparent
}
.chart-panel-featured{
    padding:20px
}
.chart-wrap{
    position:relative;
    height:320px
}
.chart-wrap-lg{
    height:430px
}
.table{
    width:100%;
    border-collapse:collapse
}
.table th,.table td{
    padding:12px 10px;
    border-bottom:1px solid rgba(35,55,84,.8);
    text-align:left;
    vertical-align:top;
    line-height:1.5
}
.table th{
    color:var(--muted);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.08em
}
.table-compact td,.table-compact th{
    padding:11px 8px
}
.table-decision td:last-child{
    color:#d8e7ff
}
.badge{
    padding:7px 10px;
    font-size:12px
}
.badge-baixo{
    background:rgba(22,163,74,.16);
    border-color:rgba(22,163,74,.35)
}
.badge-medio,.badge-alto{
    background:rgba(245,158,11,.16);
    border-color:rgba(245,158,11,.35)
}
.badge-critico{
    background:rgba(239,68,68,.16);
    border-color:rgba(239,68,68,.35)
}
.badge-neutral{
    background:rgba(148,163,184,.12);
    border-color:rgba(148,163,184,.28)
}
.section-panel{
    margin-top:20px
}
.section-header{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    margin-bottom:16px
}
.section-header h3{
    margin:0 0 8px;
    font-size:28px;
    letter-spacing:-.03em
}
.insight-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}
.insight-card,.timeline-card{
    padding:18px;
    border-radius:20px;
    border:1px solid var(--border);
    background:linear-gradient(180deg, rgba(17,32,54,.95), rgba(11,20,34,.95));
    min-height:190px;
    display:flex;
    flex-direction:column;
    gap:10px
}
.insight-card span,.timeline-card span{
    color:var(--muted);
    font-size:13px
}
.insight-card strong,.timeline-card strong{
    font-size:28px;
    letter-spacing:-.03em
}
.insight-card p,.timeline-card p{
    margin:0;
    color:#d9e8ff;
    line-height:1.5
}
.insight-card small,.timeline-card small{
    margin-top:auto;
    color:#9bb4d8;
    line-height:1.45
}
.insight-ok{
    border-color:rgba(22,163,74,.38);
    background:linear-gradient(180deg, rgba(11,50,34,.9), rgba(9,22,18,.92))
}
.insight-alerta{
    border-color:rgba(245,158,11,.4);
    background:linear-gradient(180deg, rgba(57,40,11,.92), rgba(23,17,8,.94))
}
.insight-critico{
    border-color:rgba(239,68,68,.45);
    background:linear-gradient(180deg, rgba(62,20,24,.92), rgba(24,10,14,.94))
}
.insight-info{
    border-color:rgba(59,130,246,.42)
}
.timeline-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}
.section-timeline{
    border-color:rgba(59,130,246,.35)
}
.panel-subtable{
    margin-top:18px
}
.page-panel{
    margin-bottom:20px
}
.upload-form{
    display:flex;
    gap:16px;
    align-items:end;
    flex-wrap:wrap
}
.form-group-wide{
    min-width:min(620px,100%)
}
.cell-break{
    word-break:break-word;
    overflow-wrap:anywhere
}
.alert{
    margin-top:16px;
    padding:14px 16px;
    border-radius:14px;
    background:#052e16;
    border:1px solid #166534;
    color:#dcfce7
}
.chat-shell{
    display:flex;
    flex-direction:column;
    gap:16px;
    min-height:75vh
}
.chat-header{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
    flex-wrap:wrap
}
.chat-header h3{
    margin:0 0 8px;
    font-size:28px
}
.chat-header p{
    margin:0;
    color:var(--muted)
}
.chat-suggestions{
    display:flex;
    gap:8px;
    flex-wrap:wrap
}
.chat-messages{
    display:flex;
    flex-direction:column;
    gap:14px;
    background:#081425;
    border:1px solid var(--border);
    border-radius:20px;
    padding:18px;
    min-height:420px;
    max-height:60vh;
    overflow:auto
}
.message{
    display:flex;
    width:100%
}
.message.user{
    justify-content:flex-end
}
.message.assistant{
    justify-content:flex-start
}
.bubble{
    max-width:min(820px,100%);
    padding:14px 16px;
    border-radius:18px;
    border:1px solid var(--border);
    background:#111827;
    box-shadow:0 10px 22px rgba(0,0,0,.16)
}
.message.user .bubble{
    background:#1d4ed8;
    border-color:#2563eb
}
.message.assistant .bubble{
    background:#12223a
}
.bubble strong{
    display:block;
    margin-bottom:8px
}
.bubble p{
    margin:0;
    white-space:pre-wrap;
    line-height:1.55
}
.bubble.ia{
    background:#18243f;
    border-left:4px solid #4ea1ff
}
.bubble.erro{
    background:#3a1f1f;
    border-left:4px solid #ff6b6b;
    color:#ffdede
}
.chat-inputbar{
    display:flex;
    flex-direction:column;
    gap:12px
}
.chat-textarea{
    min-height:110px
}
.chat-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px
}
@media (max-width: 1280px){
    .cards,.insight-grid{
        grid-template-columns:repeat(2,1fr)
    }
    .hero-panel{
        grid-template-columns:1fr
    }
}
@media (max-width: 980px){
    .shell{
        grid-template-columns:1fr
    }
    .sidebar{
        position:relative;
        height:auto;
        border-right:none;
        border-bottom:1px solid var(--border)
    }
    .topbar{
        flex-direction:column;
        padding:20px
    }
    .grid-2,.timeline-grid,.insight-grid,.cards{
        grid-template-columns:1fr
    }
    .content{
        padding:20px
    }
    .chart-wrap-lg{
        height:360px
    }
    .quick-nav-actions-grid{
        justify-content:flex-start
    }
    .sticky-nav-panel{
        position:relative;
        top:auto
    }
}

.import-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    margin-bottom:20px
}
.upload-form-stack{
    align-items:stretch
}
.panel-highlight{
    border-color:rgba(96,165,250,.45);
    box-shadow:0 0 0 1px rgba(96,165,250,.12),0 10px 28px rgba(0,0,0,.18)
}
.downtime-detail-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:18px
}
.table-scroll{
    max-height:460px;
    overflow:auto;
    border-radius:16px
}
.panel-note{
    margin:0 0 12px;
    color:var(--muted);
    line-height:1.5
}
@media (max-width: 1280px){
    .import-grid{
        grid-template-columns:1fr
    }
}


.module-selector-panel{
    margin-top:20px;
    margin-bottom:20px
}
.module-selector-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px
}
.module-tile{
    appearance:none;
    border:1px solid var(--border);
    background:linear-gradient(180deg, rgba(16,28,46,.98), rgba(8,16,29,.98));
    border-radius:22px;
    padding:18px;
    text-align:left;
    display:flex;
    flex-direction:column;
    gap:8px;
    cursor:pointer;
    color:#f8fbff;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
    box-shadow:0 10px 22px rgba(0,0,0,.18)
}
.module-tile:hover,.module-tile.active{
    transform:translateY(-2px);
    border-color:rgba(78,161,255,.5);
    box-shadow:0 16px 34px rgba(10,30,58,.32)
}
.module-tile-label{
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#8fb8ff
}
.module-tile strong{
    font-size:22px;
    line-height:1.15
}
.module-tile small{
    color:#9bb4d8;
    line-height:1.4
}
.module-empty-state{
    text-align:center;
    padding:34px 24px
}
.module-empty-state h3{
    margin:6px 0 10px;
    font-size:28px
}
.module-empty-state p{
    margin:0;
    color:var(--muted);
    max-width:780px;
    margin-inline:auto;
    line-height:1.6
}
.module-section{
    display:none;
    animation:fadeSlide .22s ease
}
.module-section.is-active{
    display:block
}
.downtime-header-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px;
    align-items:start
}
.downtime-mode-panel{
    display:none;
    margin-top:18px
}
.downtime-mode-panel.is-active{
    display:block
}
.date-chip-grid{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:14px
}
.date-chip{
    display:flex;
    flex-direction:column;
    gap:5px;
    padding:12px 14px;
    border-radius:16px;
    text-decoration:none;
    border:1px solid var(--border);
    background:#0e1b2f;
    color:#eef6ff;
    min-width:180px
}
.date-chip strong{
    font-size:16px
}
.date-chip small{
    color:#b6cbe6
}
.date-chip-ok{
    border-color:rgba(22,163,74,.34)
}
.date-chip-alerta{
    border-color:rgba(245,158,11,.4)
}
.date-chip-critico{
    border-color:rgba(239,68,68,.45)
}
.downtime-day-card{
    scroll-margin-top:100px
}
.downtime-day-title h4{
    margin:4px 0 0;
    font-size:28px
}
.day-kpis-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin:16px 0
}
.day-kpi{
    padding:14px 16px;
    border-radius:16px;
    background:rgba(8,20,37,.75);
    border:1px solid var(--border);
    display:flex;
    flex-direction:column;
    gap:6px
}
.day-kpi span{
    color:var(--muted);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em
}
.day-kpi strong{
    font-size:22px
}
.downtime-story-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-bottom:16px
}
.story-card{
    padding:16px;
    border-radius:16px;
    background:rgba(8,20,37,.75);
    border:1px solid var(--border)
}
.story-card span{
    display:block;
    margin-bottom:8px;
    color:#8fb8ff;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.08em
}
.story-card p{
    margin:0;
    line-height:1.55;
    color:#e4eefc
}
@keyframes fadeSlide{
    from{
        opacity:.35;
        transform:translateY(8px)
    }
    to{
        opacity:1;
        transform:translateY(0)
    }
}
@media (max-width: 1280px){
    .module-selector-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
@media (max-width: 980px){
    .module-selector-grid,.day-kpis-grid,.downtime-story-grid{
        grid-template-columns:1fr
    }
    .downtime-header-grid{
        grid-template-columns:1fr
    }
    .downtime-actions{
        justify-content:flex-start
    }
}


.downtime-tabs{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end;
    align-items:center;
    padding:8px;
    border:1px solid rgba(59,130,246,.22);
    border-radius:18px;
    background:rgba(7,18,36,.75);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.03)
}
.downtime-tab{
    appearance:none;
    border:1px solid rgba(96,165,250,.22);
    background:transparent;
    color:var(--text);
    padding:10px 16px;
    border-radius:14px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
    white-space:nowrap
}
.downtime-tab:hover{
    border-color:#4f8de7;
    transform:translateY(-1px)
}
.downtime-tab.active{
    background:linear-gradient(180deg, rgba(18,59,120,.98), rgba(8,29,63,.98));
    border-color:rgba(96,165,250,.55);
    box-shadow:0 8px 18px rgba(2,12,27,.35), inset 0 1px 0 rgba(255,255,255,.06)
}
.downtime-filter-bar{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end
}
.filter-label{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--muted);
    font-weight:700
}
.select-filter{
    min-width:120px;
    background:#08172e;
    color:var(--text);
    border:1px solid rgba(96,165,250,.28);
    border-radius:12px;
    padding:10px 12px;
    font-weight:600;
    outline:none
}
.select-filter:focus{
    border-color:#60a5fa;
    box-shadow:0 0 0 3px rgba(96,165,250,.12)
}
.downtime-selection-note{
    margin-top:16px;
    padding:14px 16px;
    border-radius:14px;
    border:1px dashed rgba(96,165,250,.26);
    background:rgba(8,23,46,.5);
    color:var(--muted)
}
.date-chip{
    appearance:none;
    text-align:left
}
.date-chip.is-hidden,.downtime-day-card.is-hidden{
    display:none !important
}
.date-chip.is-active{
    border-color:rgba(96,165,250,.78);
    box-shadow:0 0 0 2px rgba(96,165,250,.12), 0 12px 24px rgba(2,12,27,.35)
}
.panel-title-stack-mobile{
    gap:14px
}
@media (max-width: 980px){
    .downtime-tabs{
        justify-content:flex-start;
        width:100%
    }
    .downtime-filter-bar{
        justify-content:flex-start
    }
    .panel-title-stack-mobile{
        align-items:flex-start
    }
}


.whatsapp-shell{
    background:linear-gradient(180deg, rgba(12,24,40,.96), rgba(8,17,29,.96));
    border-radius:28px;
    border:1px solid rgba(59,130,246,.2)
}
.chat-phone-frame{
    width:min(980px,100%);
    margin:0 auto;
    border-radius:28px;
    overflow:hidden;
    border:1px solid rgba(35,55,84,.95);
    background:#0b1626;
    box-shadow:0 18px 42px rgba(0,0,0,.28)
}
.chat-wa-topbar{
    padding:18px;
    background:linear-gradient(180deg, rgba(17,40,63,.98), rgba(11,25,41,.98));
    border-bottom:1px solid var(--border);
    display:flex;
    flex-direction:column;
    gap:14px
}
.chat-wa-profile{
    display:flex;
    gap:14px;
    align-items:flex-start
}
.chat-wa-avatar{
    width:52px;
    height:52px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    font-size:20px;
    color:#e8f1ff;
    background:linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow:0 8px 20px rgba(37,99,235,.35)
}
.whatsapp-messages{
    background:
      linear-gradient(rgba(7,17,31,.88), rgba(7,17,31,.88)),
      radial-gradient(circle at 20% 20%, rgba(59,130,246,.08), transparent 28%),
      radial-gradient(circle at 80% 10%, rgba(22,163,74,.08), transparent 22%),
      radial-gradient(circle at 60% 70%, rgba(96,165,250,.06), transparent 24%),
      #081425;
    padding:20px 18px 12px
}
.whatsapp-inputbar{
    padding:14px 16px 16px;
    background:#0d1828;
    border-top:1px solid var(--border)
}
.chat-compose-box{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    align-items:end
}
.whatsapp-textarea{
    min-height:64px;
    max-height:180px;
    resize:vertical;
    border-radius:22px;
    padding:16px 18px;
    background:#101d31
}
.btn-send-wa{
    width:56px;
    height:56px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    font-size:22px;
    color:#fff;
    background:linear-gradient(180deg, #22c55e, #16a34a);
    box-shadow:0 10px 24px rgba(22,163,74,.28)
}
.btn-send-wa:hover{
    transform:translateY(-1px)
}
.btn-chat-clear{
    align-self:flex-end
}
.bubble{
    position:relative
}
.bubble-meta{
    display:block;
    margin-top:10px;
    font-size:11px;
    opacity:.8;
    text-align:right
}
.message.assistant .bubble{
    border-top-left-radius:8px
}
.message.user .bubble{
    border-top-right-radius:8px
}
.bubble.welcome{
    background:#15304f;
    border-left:4px solid #22c55e
}
@media (max-width: 980px){
    .chat-phone-frame{
        border-radius:22px
    }
    .chat-wa-profile{
        align-items:center
    }
    .chat-compose-box{
        grid-template-columns:1fr
    }
    .btn-send-wa,
    .btn-chat-clear{
        width:100%
    }
}

.compact-panel{
    padding:20px;
}
.notice-panel{
    margin-bottom:18px;
    background:linear-gradient(135deg,#132338,#0f172a);
    border:1px solid rgba(148,163,184,.16);
}
.notice-panel h3{
    margin:6px 0 8px;
}
.filter-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:14px;
    align-items:end;
}
.field-group{
    display:flex;
    flex-direction:column;
    gap:6px;
}
.field-group label{
    font-size:.88rem;
    color:#cbd5e1;
}
.input-shell,
.btn-shell{
    width:100%;
    min-height:42px;
    border-radius:12px;
    border:1px solid rgba(148,163,184,.2);
    background:#0f172a;
    color:#e5e7eb;
    padding:0 12px;
    box-sizing:border-box;
}
.btn-shell{
    background:#2563eb;
    border:none;
    cursor:pointer;
    font-weight:700;
}
.helper-text{
    color:#94a3b8;
    font-size:.9rem;
    margin:10px 0 0;
}
.executive-grid,
.summary-grid{
    margin:18px 0;
}
.kpi-card small{
    color:#94a3b8;
    line-height:1.4;
}
.kpi-note{
    color:#cbd5e1;
    margin:4px 0 0;
    line-height:1.45;
}
.accent-ok{border-top:3px solid #22c55e}
.accent-warning{border-top:3px solid #f59e0b}
.accent-danger{border-top:3px solid #ef4444}
.accent-info{border-top:3px solid #38bdf8}
.table-shell{
    overflow:auto;
}
.table-shell .table th,
.table-shell .table td{
    vertical-align:top;
}
.simple-insight-grid{
    grid-template-columns:1fr;
}
.executive-sections{
    margin-top:18px;
}
@media (max-width: 768px){
    .kpi-card-wide{
        grid-column:span 1;
    }
}

/* Correção v1.1.6: navegação web, módulos e estados ativos */
.is-hidden{
    display:none !important;
}
.sidebar nav a.active,
.sidebar nav a[aria-current="page"],
.topbar-chip.active,
.topbar-chip[aria-current="page"]{
    border-color:rgba(96,165,250,.78);
    background:linear-gradient(180deg, rgba(29,78,216,.95), rgba(13,42,96,.95));
    color:#ffffff;
    box-shadow:0 10px 24px rgba(2,12,27,.28);
}
.module-tile:focus-visible,
.downtime-tab:focus-visible,
.date-chip:focus-visible,
.sidebar nav a:focus-visible,
.topbar-chip:focus-visible{
    outline:3px solid rgba(96,165,250,.48);
    outline-offset:3px;
}
.date-chip.is-active,
.date-chip.active{
    border-color:rgba(96,165,250,.78);
    box-shadow:0 0 0 2px rgba(96,165,250,.12), 0 12px 24px rgba(2,12,27,.35);
}
@media (max-width: 1280px){
    .module-selector-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media (max-width: 640px){
    .module-selector-grid{
        grid-template-columns:1fr;
    }
    .topbar-actions,
    .sidebar nav{
        width:100%;
    }
    .topbar-chip,
    .sidebar nav a{
        width:100%;
        text-align:center;
    }
}
.alert-warning{
    background:rgba(146,64,14,.28);
    border-color:rgba(245,158,11,.55);
    color:#ffedd5;
}


/* Correção v1.1.7: links de módulo com fallback por hash, sem depender exclusivamente do JavaScript externo */
a.module-tile{
    text-decoration:none;
}
.module-section:target{
    display:block;
}
body:has(.module-section:target) .module-empty-state{
    display:none !important;
}
body:has(#sec-chart:target) [data-module-target="overview"],
body:has(#sec-uptime:target) [data-module-target="uptime"],
body:has(#sec-downtime:target) [data-module-target="downtime"],
body:has(#sec-risco:target) [data-module-target="risco"],
body:has(#sec-queima:target) [data-module-target="queima"],
body:has(#sec-eficiencia:target) [data-module-target="eficiencia"],
body:has(#sec-timeline:target) [data-module-target="timeline"],
body:has(#sec-cruzamentos:target) [data-module-target="cross"]{
    transform:translateY(-2px);
    border-color:rgba(78,161,255,.5);
    box-shadow:0 16px 34px rgba(10,30,58,.32);
}

.report-form{
    display:flex;
    flex-direction:column;
    gap:18px
}
.form-grid{
    display:grid;
    gap:14px
}
.form-grid-1{
    grid-template-columns:1fr
}
.form-grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr))
}
.form-grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr))
}
.report-form input,.report-form textarea{
    width:100%;
    min-width:0
}
.check-row{
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--muted);
    font-weight:600
}
.check-row input{
    width:auto;
    min-width:0
}
.download-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    padding-top:8px
}
.report-kpis{
    grid-template-columns:repeat(3,1fr)
}
.alert-warning{
    background:#422006;
    border-color:#92400e;
    color:#ffedd5;
    margin-bottom:18px
}
@media (max-width: 1100px){
    .form-grid-4,.form-grid-3,.report-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
@media (max-width: 720px){
    .form-grid-4,.form-grid-3,.report-kpis{
        grid-template-columns:1fr
    }
    .download-actions .btn-primary,.download-actions .btn-secondary{
        width:100%
    }
}


/* Correção v1.1.10: formulário de relatórios redesenhado para digitação, alinhamento e responsividade */
.af-form{
    display:flex !important;
    flex-direction:column !important;
    gap:22px !important;
    max-width:1180px !important;
    margin:0 auto 22px !important;
    padding:22px !important;
    overflow:visible !important;
}
.af-form-header{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:18px !important;
    padding-bottom:16px !important;
    border-bottom:1px solid rgba(96,165,250,.18) !important;
}
.af-form-header h3{margin:2px 0 6px !important;font-size:20px !important;line-height:1.2 !important}
.af-form-header p{margin:0 !important;color:#93a7c6 !important;line-height:1.45 !important;max-width:720px !important}
.af-form-actions{display:flex !important;gap:10px !important;flex-wrap:wrap !important;justify-content:flex-end !important;min-width:210px !important}
.af-section{border:1px solid rgba(96,165,250,.18) !important;border-radius:18px !important;background:rgba(7,17,31,.42) !important;padding:18px !important}
.af-section-title{display:flex !important;align-items:center !important;gap:10px !important;margin-bottom:16px !important;color:#e5eefc !important;font-weight:800 !important}
.af-section-title span{display:inline-flex !important;align-items:center !important;justify-content:center !important;width:28px !important;height:28px !important;border-radius:999px !important;background:linear-gradient(180deg,#3b82f6,#1d4ed8) !important;color:#fff !important;font-size:13px !important;box-shadow:0 8px 18px rgba(29,78,216,.22) !important}
.af-grid{display:grid !important;gap:14px !important;width:100% !important;align-items:start !important}
.af-grid-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
.af-grid-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
.af-grid-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
.af-field{display:flex !important;flex-direction:column !important;gap:7px !important;min-width:0 !important}
.af-field-wide{grid-column:1/-1 !important}
.af-field label{font-size:12px !important;color:#d7e6ff !important;font-weight:800 !important;line-height:1.2 !important}
.af-field small{font-size:11px !important;color:#7f94b7 !important;line-height:1.35 !important}
.af-input,.af-form input,.af-form textarea{width:100% !important;min-width:0 !important;max-width:100% !important;background:#06101d !important;border:1px solid #294466 !important;border-radius:12px !important;padding:11px 12px !important;color:#e5eefc !important;font-weight:650 !important;outline:none !important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.01) !important}
.af-input:focus,.af-form input:focus,.af-form textarea:focus{border-color:#60a5fa !important;box-shadow:0 0 0 3px rgba(96,165,250,.16), inset 0 0 0 1px rgba(255,255,255,.03) !important}
.af-input-money{text-align:right !important;font-variant-numeric:tabular-nums !important}
.af-input-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace !important;letter-spacing:.02em !important}
.af-form textarea{min-height:92px !important;resize:vertical !important;line-height:1.45 !important}
.af-check-row{display:flex !important;align-items:flex-start !important;gap:10px !important;padding:12px 14px !important;border-radius:14px !important;background:rgba(37,99,235,.08) !important;border:1px solid rgba(96,165,250,.16) !important;color:#cbd5e1 !important;font-weight:650 !important}
.af-check-row input{width:18px !important;min-width:18px !important;height:18px !important;margin-top:1px !important}
.af-download-actions{display:grid !important;grid-template-columns:repeat(5,minmax(0,1fr)) !important;gap:12px !important;padding-top:4px !important}
.af-download-actions input{white-space:normal !important;min-height:46px !important;text-align:center !important}
@media (max-width:1280px){.af-download-actions{grid-template-columns:repeat(3,minmax(0,1fr)) !important}.af-grid-4{grid-template-columns:repeat(2,minmax(0,1fr)) !important}.af-grid-3{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media (max-width:760px){.af-form{padding:16px !important}.af-form-header{flex-direction:column !important}.af-form-actions,.af-form-actions input{width:100% !important}.af-grid-4,.af-grid-3,.af-grid-2,.af-download-actions{grid-template-columns:1fr !important}.af-section{padding:14px !important}}
