body {
  margin: 0;
  padding: 0;
  background-color: #17a2b8;
  height: 100vh;
}
#login .container #login-row #login-column #login-box {
  margin-top: 120px;
  max-width: 600px;
  height: 320px;
  border: 1px solid #9C9C9C;
  background-color: #EAEAEA;
}
#login .container #login-row #login-column #login-box #login-form {
  padding: 20px;
}
#login .container #login-row #login-column #login-box #login-form #register-link {
  margin-top: -85px;
}


/* ===== VARIÁVEIS ===== */
:root {
    --sidebar-width: 240px;
    --header-height: 60px;
    --bg-primary: #f5f7fb;
    --bg-card: #ffffff;
    --text-primary: #1a2332;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --sidebar-bg: #1a2332;
    --sidebar-hover: #2c3e50;
    --primary: #4a6cf7;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-card: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --sidebar-bg: #0d1117;
    --sidebar-hover: #21262d;
}

/* ===== LAYOUT ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .logo {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header .logo i {
    color: var(--primary);
    font-size: 24px;
}

.sidebar-header .version {
    font-size: 10px;
    opacity: 0.5;
    padding: 2px 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 2px 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    gap: 12px;
    position: relative;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-nav li.active a {
    background: rgba(74, 108, 247, 0.15);
    color: #fff;
}

.sidebar-nav li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav .badge {
    margin-left: auto;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-footer .avatar i {
    font-size: 32px;
    opacity: 0.8;
}

.sidebar-footer .user-details .name {
    font-weight: 600;
    font-size: 13px;
}

.sidebar-footer .user-details .role {
    font-size: 11px;
    opacity: 0.6;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-actions .btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-actions .btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.top-bar .breadcrumb i {
    color: var(--primary);
}

.top-bar .breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
}

.top-bar-actions {
    display: flex;
    gap: 8px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h5 i {
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-card .stat-change {
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
    font-weight: 500;
}

.stat-card .stat-change.up {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.stat-card .stat-change.down {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.stat-card.bg-primary { background: linear-gradient(135deg, #4a6cf7, #6a4cf7); color: #fff; }
.stat-card.bg-success { background: linear-gradient(135deg, #28a745, #20c997); color: #fff; }
.stat-card.bg-danger { background: linear-gradient(135deg, #dc3545, #e74c3c); color: #fff; }
.stat-card.bg-info { background: linear-gradient(135deg, #17a2b8, #0dcaf0); color: #fff; }

.stat-card.bg-primary .stat-change.up,
.stat-card.bg-success .stat-change.up,
.stat-card.bg-danger .stat-change.down,
.stat-card.bg-info .stat-change.up {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ===== TABLES ===== */
.table {
    color: var(--text-primary);
    font-size: 13px;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 12px;
}

.table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(74, 108, 247, 0.04);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(74, 108, 247, 0.08);
}

/* ===== BADGES ===== */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 11px;
}

.badge-success { background: rgba(40, 167, 69, 0.15); color: #28a745; }
.badge-danger { background: rgba(220, 53, 69, 0.15); color: #dc3545; }
.badge-warning { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.badge-info { background: rgba(23, 162, 184, 0.15); color: #17a2b8; }
.badge-primary { background: rgba(74, 108, 247, 0.15); color: #4a6cf7; }

[data-theme="dark"] .badge-success { background: rgba(40, 167, 69, 0.25); }
[data-theme="dark"] .badge-danger { background: rgba(220, 53, 69, 0.25); }
[data-theme="dark"] .badge-warning { background: rgba(255, 193, 7, 0.25); }
[data-theme="dark"] .badge-info { background: rgba(23, 162, 184, 0.25); }
[data-theme="dark"] .badge-primary { background: rgba(74, 108, 247, 0.25); }

/* ===== MODALS ===== */
.modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.modal-header .close {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
}

.modal .form-control {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
}

/* ===== LOADING ===== */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.loading-container .spinner-border {
    width: 40px;
    height: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .top-bar-actions {
        flex-wrap: wrap;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* ===== ANIMAÇÕES ===== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TOASTR OVERRIDE ===== */
.toast {
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

.toast-success { background: var(--bg-card) !important; color: var(--text-primary) !important; }
.toast-error { background: var(--bg-card) !important; color: var(--text-primary) !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== INTERFACE OPERACIONAL INSPIRADA NO GLPI ===== */
:root {
    --sidebar-width: 256px;
    --primary: #2f3f64;
    --glpi-accent: #e67e22;
    --bg-primary: #f1f3f5;
    --border-color: #dce1e7;
    --shadow: 0 1px 3px rgba(20, 30, 50, .12);
}

.sidebar { background: #202b3c; }
.sidebar-header { min-height: 64px; background: #172130; border-bottom: 3px solid var(--glpi-accent); }
.sidebar-header .logo i { color: var(--glpi-accent); }
.sidebar-nav li.active a { background: #34445d; }
.sidebar-nav li.active a::before { background: var(--glpi-accent); width: 4px; }
.top-bar { background: #fff; margin: -20px -20px 20px; padding: 14px 22px; border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow); }
.card { border: 1px solid var(--border-color); border-radius: 4px; box-shadow: var(--shadow); }
.card:hover { box-shadow: 0 2px 7px rgba(20, 30, 50, .15); }
.card-header { padding: 12px 16px; background: #f8f9fa; }
.stat-card { border-radius: 4px; min-height: 128px; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; inset: auto 0 0; height: 4px; background: rgba(255,255,255,.42); }

.dashboard-filter-card { margin-bottom: 16px; border-top: 3px solid var(--glpi-accent); }
.filter-toolbar { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(125px, 1fr)) auto auto; gap: 9px; align-items: center; }
.filter-search { position: relative; }
.filter-search i { position: absolute; left: 12px; top: 12px; color: #8a94a5; z-index: 2; }
.filter-search input { padding-left: 35px; }
.filter-toolbar .form-control { height: 38px; font-size: 13px; border-color: #cbd2da; }
.live-strip { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 12px; }
.live-strip .btn { margin-left: auto; color: var(--primary); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #2fb344; box-shadow: 0 0 0 0 rgba(47,179,68,.55); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(47,179,68,0); } 100% { box-shadow: 0 0 0 0 rgba(47,179,68,0); } }

.mini-stat { display: flex; align-items: center; gap: 14px; padding: 15px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; min-height: 78px; }
.mini-stat i { width: 40px; height: 40px; display: grid; place-items: center; background: rgba(47,63,100,.1); color: var(--primary); border-radius: 50%; font-size: 17px; }
.mini-stat strong, .mini-stat span { display: block; }
.mini-stat strong { font-size: 21px; line-height: 1.1; }
.mini-stat span { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
#dashboard-map { height: 390px; width: 100%; background: #e9ecef; }
.evolution-chart-body { height: 250px; position: relative; }

.glpi-page-title { display: flex; justify-content: space-between; margin-bottom: 16px; }
.glpi-page-title h2 { font-size: 22px; margin: 0; color: var(--text-primary); }
.glpi-page-title span { color: var(--text-secondary); font-size: 13px; }
.search-panel { border-top: 3px solid var(--glpi-accent); }
.atendimento-filtros { grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(125px, 1fr)) auto; }
.list-header, .result-footer { display: flex; align-items: center; justify-content: space-between; }
.list-header label { margin: 0 5px 0 0; font-size: 12px; color: var(--text-secondary); }
.list-header select { width: 72px; }
.glpi-table { margin: 0; font-size: 12px; }
.glpi-table thead th { background: #eef1f4; border-bottom: 2px solid #cbd2da; color: #4c5667; text-transform: uppercase; font-size: 10px; letter-spacing: .35px; white-space: nowrap; }
.glpi-table td { vertical-align: middle; border-color: #e5e8ec; }
.glpi-table td small { display: block; color: var(--text-secondary); margin-top: 2px; }
.result-footer { background: #f8f9fa; font-size: 12px; color: var(--text-secondary); }
.pagination-compact { display: flex; align-items: center; gap: 3px; }
.pagination-compact button { min-width: 31px; height: 31px; border: 1px solid #ccd2d9; background: #fff; color: #3c4658; border-radius: 3px; cursor: pointer; }
.pagination-compact button.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.pagination-compact button:disabled { opacity: .45; cursor: default; }

@media (max-width: 1100px) {
    .filter-toolbar, .atendimento-filtros { grid-template-columns: 1fr 1fr; }
    .filter-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .filter-toolbar, .atendimento-filtros { grid-template-columns: 1fr; }
    .filter-search { grid-column: auto; }
    .compact-stats > div { margin-bottom: 10px; }
    #dashboard-map { height: 300px; }
    .evolution-chart-body { height: 210px; }
    .result-footer { align-items: flex-start; gap: 12px; flex-direction: column; }
}

/* ===== AJUSTES FIÉIS À REFERÊNCIA GLPI ===== */
.sidebar { width: 244px; background: #123f54; }
.main-content { margin-left: 244px; transition: margin-left .25s ease; }
.sidebar-header { height: 70px; padding: 13px 18px; background: #123f54; border-bottom: 0; }
.sidebar-header .logo { font-style: italic; letter-spacing: 1px; font-size: 17px; }
.logo-mark { font-size: 27px; line-height: 1; font-weight: 800; color: #fff; }
.sidebar-collapse-btn { position: absolute; right: -1px; top: 8px; width: 22px; height: 30px; border: 0; border-radius: 4px 0 0 4px; background: rgba(255,255,255,.08); color: #dceaf0; cursor: pointer; }
.sidebar-nav { padding: 7px 0; }
.sidebar-nav li { margin: 0; }
.sidebar-nav a { min-height: 37px; padding: 8px 18px; border-radius: 0; color: #eef7fa; font-size: 13px; }
.sidebar-nav a:hover { background: rgba(0,0,0,.16); }
.sidebar-nav li.active a { background: #0c3447; color: #fff; border-left: 3px solid #ea4c58; }
.sidebar-nav li.active a::before { display: none; }
.sidebar-nav li.active a i { color: #f05c68; }
.sidebar-footer { background: rgba(0,0,0,.1); }

.top-bar { min-height: 58px; margin: -20px -20px 15px; padding: 9px 18px; display: grid; grid-template-columns: 1fr minmax(260px, 360px) auto; }
.global-search { position: relative; }
.global-search input { width: 100%; height: 40px; padding: 0 42px 0 14px; border: 1px solid #d9dfe6; border-radius: 5px; outline: 0; background: var(--bg-card); color: var(--text-primary); }
.global-search i { position: absolute; right: 14px; top: 12px; color: #008da8; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 -3px; }
.kpi-grid > [class*="col-"] { width: auto; max-width: none; flex: none; padding: 3px; }
.stat-card { position: relative; min-height: 112px; padding: 13px 11px; border-radius: 3px; box-shadow: none; transform: none !important; }
.stat-card .stat-icon { position: absolute; right: 12px; top: 12px; font-size: 25px; opacity: .75; }
.stat-card .stat-value { font-size: 31px; font-weight: 400; line-height: 1.15; }
.stat-card .stat-label { margin-top: 8px; font-size: 14px; opacity: .92; }
.stat-card .stat-change { position: absolute; bottom: 7px; right: 9px; font-size: 10px; background: rgba(0,0,0,.12) !important; padding: 2px 8px; border-radius: 8px; }
.stat-card::after { display: none; }
.stat-card.bg-primary { background: #a9dba6 !important; color: #277d2f !important; }
.stat-card.bg-success { background: #e78f94 !important; color: #922126 !important; }
.stat-card.bg-danger { background: #b7e1e3 !important; color: #178994 !important; }
.stat-card.bg-info { background: #cfdeed !important; color: #3976a8 !important; }
.secondary-kpis .mini-stat { position: relative; display: block; min-height: 112px; padding: 13px 11px; border: 0; border-radius: 3px; background: #ececec; box-shadow: none; }
.secondary-kpis > div:nth-child(even) .mini-stat { background: #d1d1d1; }
.secondary-kpis .mini-stat i { position: absolute; right: 11px; top: 10px; width: auto; height: auto; background: transparent; color: #7c8790; font-size: 23px; }
.secondary-kpis .mini-stat strong { font-size: 31px; font-weight: 400; color: #77838d; }
.secondary-kpis .mini-stat span { font-size: 14px; color: #77838d; margin-top: 8px; }
.dashboard-grid .card { border-radius: 3px; box-shadow: none; }
.dashboard-grid .card-header { background: #f7f8f8; }
.dashboard-grid > .row:not(.kpi-grid) { align-items: stretch; margin-left: -7px; margin-right: -7px; }
.dashboard-grid > .row:not(.kpi-grid) > [class*="col-"] { display: flex; padding-left: 7px; padding-right: 7px; }
.dashboard-grid > .row:not(.kpi-grid) > [class*="col-"] > .card { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; margin-bottom: 0; }
.dashboard-grid > .row:not(.kpi-grid) .card-header { min-height: 50px; display: flex; align-items: center; }
.dashboard-grid > .row:not(.kpi-grid) .card-body { flex: 1 1 auto; }
.dashboard-grid canvas { max-width: 100%; }
.dashboard-grid .row.mt-4 { margin-top: 14px !important; }
.kpi-grid { align-items: stretch; }
.kpi-grid > [class*="col-"] { display: flex; }
.kpi-grid .stat-card, .kpi-grid .mini-stat { width: 100%; height: 112px; margin-bottom: 0; }
.compact-stats { margin-top: 2px !important; }
.card-header h5 { line-height: 1.3; }

body.sidebar-collapsed .sidebar { width: 68px; }
body.sidebar-collapsed .main-content { margin-left: 68px; }
body.sidebar-collapsed .sidebar-header { padding: 14px 10px; justify-content: center; }
body.sidebar-collapsed .sidebar-header .logo > span:not(.logo-mark),
body.sidebar-collapsed .sidebar-nav a span,
body.sidebar-collapsed .sidebar-footer .user-details,
body.sidebar-collapsed .sidebar-header .version { display: none; }
body.sidebar-collapsed .sidebar-nav a { padding: 10px 21px; justify-content: center; }
body.sidebar-collapsed .sidebar-nav a i { font-size: 18px; }
body.sidebar-collapsed .sidebar-footer { padding: 12px 8px; }
body.sidebar-collapsed .sidebar-footer .user-info { justify-content: center; }
body.sidebar-collapsed .sidebar-actions { justify-content: center; flex-direction: column; align-items: center; }

[data-theme="dark"] {
    --bg-primary: #171b22;
    --bg-card: #222832;
    --text-primary: #edf1f5;
    --text-secondary: #a7b0bc;
    --border-color: #38404c;
    --shadow: none;
}
[data-theme="dark"] body, [data-theme="dark"] .main-content { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="dark"] .top-bar, [data-theme="dark"] .card, [data-theme="dark"] .mini-stat { background: var(--bg-card); color: var(--text-primary); }
[data-theme="dark"] .card-header, [data-theme="dark"] .result-footer, [data-theme="dark"] .glpi-table thead th { background: #292f3a; color: #d6dce4; }
[data-theme="dark"] .form-control, [data-theme="dark"] .global-search input { background: #1b2028; border-color: #424b58; color: #eef2f7; }
[data-theme="dark"] .form-control option { background: #1b2028; }
[data-theme="dark"] .secondary-kpis .mini-stat { background: #303640; }
[data-theme="dark"] .secondary-kpis > div:nth-child(even) .mini-stat { background: #373e49; }
[data-theme="dark"] .secondary-kpis .mini-stat strong, [data-theme="dark"] .secondary-kpis .mini-stat span { color: #d8dee7; }
[data-theme="dark"] .btn-light { background: #303743; border-color: #46505e; color: #e7ebf0; }
[data-theme="dark"] .leaflet-layer, [data-theme="dark"] .leaflet-control-zoom-in, [data-theme="dark"] .leaflet-control-zoom-out { filter: brightness(.72) contrast(1.12); }

@media (max-width: 900px) {
    .top-bar { grid-template-columns: 1fr auto; }
    .global-search { grid-column: 1 / -1; grid-row: 2; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid > .row:not(.kpi-grid) > [class*="col-"] { margin-bottom: 14px; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 244px; }
    .sidebar.open { transform: translateX(0); }
    .main-content, body.sidebar-collapsed .main-content { margin-left: 0; }
}

@media (max-width: 520px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-grid .stat-card, .kpi-grid .mini-stat { height: 104px; }
}

/* ===== CENTRAL SGA HINOVA ===== */
.hinova-title { align-items: center; }
.hinova-title h2 i { color: #00a2c7; margin-right: 7px; }
.hinova-connection { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border-color); border-radius: 4px; background: var(--bg-card); font-size: 12px; }
.hinova-connection span { width: 9px; height: 9px; border-radius: 50%; background: #f0ad4e; }
.hinova-connection.online span { background: #2fb344; box-shadow: 0 0 0 4px rgba(47,179,68,.13); }
.hinova-connection.offline span { background: #d63939; }
.hinova-summary { margin: 0 -4px 14px; }
.hinova-summary > div { padding: 4px; }
.hinova-tile { position: relative; height: 105px; padding: 13px; border-radius: 3px; background: #a9dba6; color: #277d2f; }
.hinova-tile.red { background: #e9a0a4; color: #922126; }
.hinova-tile.blue { background: #b7e1e3; color: #178994; }
.hinova-tile.gray { background: #d7dde4; color: #526172; }
.hinova-tile i { position: absolute; right: 13px; top: 13px; font-size: 25px; opacity: .75; }
.hinova-tile strong, .hinova-tile span { display: block; }
.hinova-tile strong { font-size: 29px; font-weight: 400; line-height: 1.2; }
.hinova-tile span { margin-top: 9px; font-size: 13px; }
.hinova-search-card { border-top: 3px solid #00a2c7; }
.hinova-search-form { display: grid; grid-template-columns: 180px 130px minmax(260px, 1fr) auto; gap: 8px; }
.hinova-tabs { display: flex; align-items: center; gap: 3px; padding: 0; overflow-x: auto; }
.hinova-tabs button { padding: 13px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; font-size: 12px; }
.hinova-tabs button.active { color: #008eaa; border-bottom-color: #00a2c7; background: rgba(0,162,199,.06); }
.hinova-tabs button i { margin-right: 5px; }
.hinova-query-toolbar { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.hinova-query-toolbar > div { width: 220px; }
.hinova-query-toolbar > div:nth-child(2) { width: 100px; }
#hinova-event-filters { width: auto; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; }
#hinova-event-filters > div { flex: 1 1 180px; }
#hinova-event-filters select[multiple] { min-height: 86px; }
.hinova-query-toolbar label { display: block; margin-bottom: 3px; font-size: 11px; color: var(--text-secondary); }
.hinova-query-toolbar small { margin-left: auto; align-self: center; color: var(--text-secondary); }
.hinova-result { min-height: 260px; }
.hinova-empty, .hinova-loading { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); }
.hinova-empty i, .hinova-loading i { margin-bottom: 10px; font-size: 35px; color: #9ba6b2; }
.hinova-error { display: flex; align-items: flex-start; gap: 13px; margin: 18px; padding: 16px; border-left: 4px solid #d63939; background: rgba(214,57,57,.08); color: var(--text-primary); }
.hinova-error i { color: #d63939; font-size: 22px; }
.hinova-error p { margin: 3px 0 0; color: var(--text-secondary); }
.hinova-table { white-space: nowrap; }
.hinova-view-button { min-width: 34px; }
.hinova-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 0; }
.hinova-detail-grid > div { padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 5px; background: var(--bg-card); min-width: 0; }
.hinova-detail-grid dt { margin-bottom: 4px; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; }
.hinova-detail-grid dd { margin: 0; color: var(--text-primary); overflow-wrap: anywhere; white-space: normal; }
.hinova-detail-list section { margin-top: 10px; padding: 10px; border-left: 3px solid var(--primary-color); }
.modal-dialog.hinova-modal-fullscreen { width: calc(100% - 40px); max-width: 1240px; height: calc(100% - 48px); max-height: calc(100% - 48px); margin: 24px auto; padding: 0; }
.modal-dialog.hinova-modal-fullscreen .modal-content { height: 100%; max-height: 100%; border: 1px solid var(--border-color); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.hinova-modal-fullscreen .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
.hinova-modal-fullscreen .modal-title { font-weight: 700; }
.hinova-modal-fullscreen .modal-body { padding: 24px; background: var(--bg-body, #f4f6f9); }
.hinova-modal-fullscreen .modal-footer { padding: 12px 24px; }
.hinova-detail-section { margin-bottom: 24px; }
.hinova-detail-section > h6 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--text-primary); }
.hinova-detail-grid > .hinova-detail-wide { grid-column: 1 / -1; }
.hinova-detail-grid dd { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.hinova-detail-grid dd .hinova-detail-section { margin: 12px 0 0; }
.hinova-financial { padding: 20px; background: rgba(16,145,108,.08); border: 1px solid rgba(16,145,108,.25); border-radius: 14px; }
.hinova-financial > h6 i { margin-right: 7px; }
.hinova-money-grid > div { padding: 16px; border-color: rgba(16,145,108,.25); border-radius: 10px; }
.hinova-money-grid dd { font-size: clamp(20px, 2.2vw, 28px); font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text-primary); letter-spacing: -.5px; }
.hinova-money-grid dt { font-size: 12px; }
.hinova-secondary .hinova-detail-grid > div { background: transparent; }
.hinova-empty-details { border: 1px dashed var(--border-color); border-radius: 10px; padding: 14px 16px; color: var(--text-secondary); }
.hinova-empty-details > summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.hinova-empty-details > summary span { margin-left: 8px; font-variant-numeric: tabular-nums; }
.hinova-empty-details[open] > summary { margin-bottom: 16px; }
.hinova-empty-details > summary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; }
@media (max-width: 575.98px) {
    .modal-dialog.hinova-modal-fullscreen { width: 100%; height: 100%; max-height: 100%; margin: 0; }
    .modal-dialog.hinova-modal-fullscreen .modal-content { border-radius: 0; }
    .hinova-modal-fullscreen .modal-body { padding: 16px; }
    .hinova-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .hinova-financial { padding: 14px; }
}
.modal-dialog.hinova-modal-fullscreen .modal-body { overflow-y: auto; }
.modal-dialog.hinova-modal-fullscreen .modal-header { flex-shrink: 0; }
.modal-dialog.hinova-modal-fullscreen .modal-footer { flex-shrink: 0; }
.modal-dialog.hinova-modal-fullscreen .modal-header .close { float: none; font-size: 1.35rem; padding: .5rem .9rem; margin: -.4rem .2rem -.4rem auto; border: 1px solid var(--border-color); border-radius: 4px; opacity: .8; color: var(--text-primary); text-shadow: none; }
.modal-dialog.hinova-modal-fullscreen .modal-header .close:hover { opacity: 1; color: #d63939; background: rgba(214,57,57,.12); }
.hinova-result-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border-color); background: #f8f9fa; font-size: 12px; }
.hinova-result-footer div { display: flex; align-items: center; gap: 9px; }
.hinova-result-footer button { width: 30px; height: 28px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); border-radius: 3px; }
[data-theme="dark"] .hinova-result-footer { background: #292f3a; }
[data-theme="dark"] .hinova-tile.gray { background: #414956; color: #eef2f6; }
@media (max-width: 900px) {
    .hinova-search-form { grid-template-columns: 1fr 1fr; }
    .hinova-search-form .filter-search { grid-column: 1 / -1; }
    .hinova-query-toolbar { flex-wrap: wrap; }
    .hinova-query-toolbar small { width: 100%; margin-left: 0; }
}
@media (max-width: 600px) {
    .hinova-search-form { grid-template-columns: 1fr; }
    .hinova-search-form .filter-search { grid-column: auto; }
    .hinova-summary > div { width: 50%; }
}

/* ===== ANÁLISES AVANÇADAS ===== */
.analytics-grid { margin: 0 -5px 10px; }
.analytics-grid > div { padding: 5px; }
.analytics-grid .card { height: 100%; margin: 0; }
.analytics-grid .card-header { display: flex; align-items: center; justify-content: space-between; }
.analytics-grid .card-header small { color: var(--text-secondary); }
#analytics-heat-map { height: 430px; }
.analytics-chart { height: 300px; }
.analytics-list { max-height: 430px; overflow: auto; }
.analytics-list-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.analytics-list-item > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #008eaa; color: #fff; font-size: 11px; }
.analytics-list-item strong,.analytics-list-item small { display: block; }
.analytics-list-item small { color: var(--text-secondary); }
.correlation-grid { display: grid; gap: 3px; margin-bottom: 12px; overflow: auto; }
.correlation-grid > * { display: grid; place-items: center; min-height: 48px; padding: 5px; border-radius: 2px; color: var(--text-primary); text-align: center; font-size: 11px; }
.correlation-grid span { color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.tree-root { width: min(300px,100%); margin: 0 auto 14px; padding: 13px; border: 2px solid #008eaa; border-radius: 5px; text-align: center; background: rgba(0,142,170,.08); }
.tree-root small,.tree-root strong,.tree-root span,.tree-branch small,.tree-branch strong,.tree-branch span { display: block; }
.tree-root span,.tree-branch small,.tree-branch span { color: var(--text-secondary); font-size: 11px; }
.tree-branches { max-height: 330px; overflow: auto; }
.tree-branch { display: grid; grid-template-columns: 1fr 24px 1.35fr; align-items: center; gap: 7px; margin-bottom: 7px; padding: 9px; border: 1px solid var(--border-color); border-radius: 3px; }
.tree-branch > i { color: #f59f00; text-align: center; }
@media (max-width: 600px) { #analytics-heat-map { height: 330px; } }

/* ===== CENTRAL DE ALERTAS ===== */
.alerts-toolbar { margin-bottom: 12px; }
.alerts-toolbar .card-body { display: flex; align-items: center; gap: 16px; padding: 10px 14px; color: var(--text-secondary); font-size: 12px; }
.alerts-toolbar select { width: 85px; height: 34px; margin-left: auto; font-size: 12px; }
.alerts-list { display: grid; gap: 8px; }
.alert-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--border-color); border-left: 4px solid #008eaa; border-radius: 4px; background: var(--bg-card); }
.alert-item.level-sucesso { border-left-color: #2fb344; }
.alert-item.level-aviso { border-left-color: #f59f00; }
.alert-item.level-critico { border-left-color: #d63939; }
.alert-item.acknowledged { opacity: .65; }
.alert-item-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,142,170,.1); color: #008eaa; font-size: 18px; }
.level-critico .alert-item-icon { background: rgba(214,57,57,.1); color: #d63939; }
.level-sucesso .alert-item-icon { background: rgba(47,179,68,.1); color: #2fb344; }
.alert-item-content > div { display: flex; align-items: center; gap: 8px; }
.alert-item-content strong { color: var(--text-primary); }
.alert-item-content time { margin-left: auto; color: var(--text-secondary); font-size: 11px; }
.alert-item-content p { margin: 4px 0 0; color: var(--text-secondary); font-size: 13px; }
.alert-item-content small { color: var(--text-secondary); }
.alert-item-content .badge { color: #fff; background: #6c757d; text-transform: uppercase; }
.level-critico .alert-item-content .badge { background: #d63939; }
.level-sucesso .alert-item-content .badge { background: #2fb344; }
.alerts-empty { display: flex; min-height: 220px; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); }
.alerts-empty i { margin-bottom: 10px; color: #2fb344; font-size: 38px; }
@media (max-width: 700px) { .alert-item { grid-template-columns: 36px 1fr; } .alert-item > button { grid-column: 2; justify-self: start; } .alert-item-content > div { align-items: flex-start; flex-wrap: wrap; } .alert-item-content time { width: 100%; margin-left: 0; } .alerts-toolbar .card-body { align-items: flex-start; flex-wrap: wrap; } }

/* ===== DESEMPENHO DA EQUIPE ===== */
.nps-register { margin-bottom: 12px; }
.nps-register form { display: grid; grid-template-columns: 1.2fr 110px 2fr auto; align-items: end; gap: 10px; }
.nps-register label,.team-filter-card label { display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.nps-register .form-control,.nps-register .btn { height: 38px; }
.team-filter-card { margin-bottom: 12px; }
.team-filter-card form { display: grid; grid-template-columns: 2fr 1fr 120px auto; align-items: end; gap: 10px; padding: 13px; }
.team-filter-card .form-control,.team-filter-card .btn { height: 38px; font-size: 13px; }
.team-rank { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #008eaa; color: #fff; font-size: 11px; font-weight: 700; }
.team-page td small { display: block; color: var(--text-secondary); font-size: 10px; }
.team-rule-note { display: flex; gap: 8px; margin-top: 11px; padding: 11px 13px; border: 1px solid var(--border-color); border-radius: 3px; color: var(--text-secondary); font-size: 12px; }
.team-rule-note i { color: #008eaa; }
@media (max-width: 800px) { .nps-register form,.team-filter-card form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .nps-register form,.team-filter-card form { grid-template-columns: 1fr; } }

/* ===== TRIAGEM AUTOMÁTICA ===== */
.triage-form-card { margin-bottom: 12px; border-top: 3px solid #008eaa; }
#triage-form { display: grid; grid-template-columns: 1.2fr 1.2fr auto; align-items: end; gap: 10px; }
#triage-form label { display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
#triage-form .triage-message { grid-column: 1 / -1; }
#triage-form button { height: 38px; }
#triage-result { margin-top: 12px; }
.triage-controls { display: flex; gap: 7px; }
.triage-controls select { width: 160px; height: 34px; font-size: 12px; }
.triage-controls select:last-child { width: 72px; }
.triage-list { display: grid; gap: 8px; padding: 10px; }
.triage-item { display: grid; grid-template-columns: 82px 1fr 145px; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--border-color); border-left: 4px solid #008eaa; border-radius: 4px; background: var(--bg-card); }
.triage-item.priority-alta { border-left-color: #f59f00; }
.triage-item.priority-critica { border-left-color: #d63939; }
.triage-priority { text-align: center; color: #008eaa; text-transform: uppercase; font-size: 10px; font-weight: 700; }
.triage-priority i { display: block; margin-bottom: 5px; font-size: 21px; }
.priority-alta .triage-priority { color: #f59f00; }.priority-critica .triage-priority { color: #d63939; }
.triage-info > div:first-child { display: flex; align-items: center; gap: 8px; }.triage-info p { margin: 4px 0; color: var(--text-secondary); font-size: 12px; }
.triage-tags { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--text-secondary); font-size: 11px; }
.triage-info details { margin-top: 7px; color: var(--text-secondary); font-size: 11px; cursor: pointer; }.triage-info details p { padding: 8px; border-radius: 3px; background: rgba(0,142,170,.06); }
.triage-status { height: 36px; font-size: 12px; text-transform: capitalize; }
@media (max-width: 800px) { #triage-form { grid-template-columns: 1fr 1fr; } #triage-form button { grid-column: 1 / -1; } .triage-item { grid-template-columns: 60px 1fr; }.triage-status { grid-column: 2; width: 160px; } }
@media (max-width: 500px) { #triage-form { grid-template-columns: 1fr; } #triage-form .triage-message,#triage-form button { grid-column: auto; }.triage-item { grid-template-columns: 1fr; }.triage-priority { text-align: left; }.triage-priority i { display: inline; margin-right: 6px; }.triage-status { grid-column: auto; } }

/* ===== PÁGINAS MODULARES DA SIDEBAR ===== */
.module-page .glpi-page-title h2 i { margin-right: 7px; color: #008eaa; }
.module-kpis { margin: 0 -4px 14px; }
.module-kpis > div { display: flex; padding: 4px; }
.module-kpi { position: relative; width: 100%; min-height: 108px; padding: 13px; border-radius: 3px; background: #d7dde4; color: #526172; overflow: hidden; }
.module-kpi.green { background: #a9dba6; color: #277d2f; }
.module-kpi.blue { background: #b7e1e3; color: #178994; }
.module-kpi.orange { background: #f5ce79; color: #8b6410; }
.module-kpi.red { background: #e9a0a4; color: #922126; }
.module-kpi i { position: absolute; right: 13px; top: 13px; font-size: 25px; opacity: .72; }
.module-kpi strong, .module-kpi span { display: block; }
.module-kpi strong { max-width: calc(100% - 30px); font-size: clamp(20px, 2vw, 29px); font-weight: 400; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-kpi span { margin-top: 9px; font-size: 13px; }
.module-table-card { margin-bottom: 0; }
.module-table-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.module-table-search { width: min(280px, 45%); height: 34px; font-size: 12px; }
.module-table { margin: 0; white-space: nowrap; }
.providers-filter-card { margin-bottom: 14px; }
.providers-filters { display: grid; grid-template-columns: minmax(230px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto; gap: 10px; align-items: end; padding: 14px; }
.providers-filters label { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.providers-filters .form-control, .providers-filters .input-group-text { height: 38px; font-size: 13px; }
.providers-filters .btn { height: 38px; white-space: nowrap; }
.providers-total { color: var(--text-secondary); font-size: 12px; }
.providers-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 10px 14px; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 12px; }
.providers-pagination .page-link { min-width: 32px; text-align: center; }
.module-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
.module-progress { display: inline-block; width: 70px; height: 6px; margin-right: 7px; overflow: hidden; vertical-align: middle; border-radius: 4px; background: #dfe4e9; }
.module-progress > span { display: block; height: 100%; background: #2fb344; }
[data-theme="dark"] .module-kpi:not(.green):not(.blue):not(.orange):not(.red) { background: #414956; color: #eef2f6; }
@media (max-width: 767px) {
    .module-kpis > div { width: 50%; }
    .module-table-card .card-header { align-items: flex-start; flex-direction: column; }
    .module-table-search { width: 100%; }
    .providers-filters { grid-template-columns: 1fr 1fr; }
    .provider-filter-search { grid-column: 1 / -1; }
    .providers-pagination { align-items: flex-start; flex-direction: column; }
}
@media (min-width: 768px) and (max-width: 1200px) { .providers-filters { grid-template-columns: 2fr 1fr 1fr; } }
@media (max-width: 480px) { .module-kpis > div { width: 100%; } }

/* ===== CONFIGURAÇÃO RECAPTCHA ===== */
.recaptcha-card { border-top: 3px solid #008eaa; }
.recaptcha-card .card-header { display: flex; align-items: center; justify-content: space-between; }
.recaptcha-page label { color: var(--text-primary); font-size: 13px; font-weight: 600; }
.recaptcha-page label small { color: var(--text-secondary); font-weight: 400; }
.secret-input { position: relative; }
.secret-input input { padding-right: 44px; }
.secret-input button { position: absolute; right: 1px; top: 1px; width: 40px; height: calc(100% - 2px); border: 0; border-left: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); cursor: pointer; }
.recaptcha-switch-wrap { display: flex; align-items: center; padding-top: 25px; }
.recaptcha-help p, .recaptcha-help li { color: var(--text-secondary); font-size: 13px; }
.recaptcha-help ul { padding-left: 20px; }
[data-theme="dark"] .recaptcha-page .text-muted { color: #a7b0bc !important; }
@media (max-width: 991px) { .recaptcha-help { margin-top: 14px; } }

/* ===== PREVISÃO DE DEMANDA ===== */
.forecast-horizon { display: flex; align-items: center; gap: 8px; }
.forecast-horizon label { margin: 0; color: var(--text-secondary); font-size: 12px; }
.forecast-horizon select { width: 120px; height: 34px; font-size: 12px; }
.forecast-grid { margin: 0 -5px 10px; }
.forecast-grid > div { padding: 5px; }
.forecast-grid .card { height: 100%; margin-bottom: 0; }
.forecast-chart-wrap { height: 340px; }
.forecast-alert-card .card-body { max-height: 340px; overflow: auto; }
.forecast-alert { display: flex; gap: 11px; margin-bottom: 9px; padding: 12px; border-left: 3px solid #2fb344; border-radius: 3px; background: rgba(47,179,68,.08); }
.forecast-alert.alto { border-color: #d63939; background: rgba(214,57,57,.09); }
.forecast-alert > i { margin-top: 2px; color: #2fb344; font-size: 18px; }
.forecast-alert.alto > i { color: #d63939; }
.forecast-alert strong, .forecast-alert span { display: block; }
.forecast-alert span { color: var(--text-secondary); font-size: 12px; }
.forecast-pattern { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border-color); }
.forecast-pattern:last-child { border-bottom: 0; }
.forecast-pattern span { color: var(--text-secondary); font-size: 12px; }
.forecast-pattern strong { color: var(--text-primary); text-align: right; text-transform: capitalize; }
.forecast-peak-row { background: rgba(214,57,57,.06); }
.forecast-method { display: flex; gap: 9px; margin-top: 10px; padding: 11px 13px; border: 1px solid var(--border-color); border-radius: 3px; color: var(--text-secondary); font-size: 12px; }
.forecast-method i { color: #008eaa; }
@media (max-width: 767px) {
    .forecast-horizon { width: 100%; margin-top: 10px; }
    .forecast-chart-wrap { height: 280px; }
}

/* ===== DASHBOARD PERSONALIZÁVEL ===== */
.dashboard-custom-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.dashboard-custom-toolbar > strong { color: var(--text-primary); font-size: 13px; }
.dashboard-custom-toolbar > div { display: flex; gap: 6px; }
.dashboard-widget { position: relative; transition: opacity .15s ease, outline .15s ease; }
.dashboard-widget-handle { display: none; position: absolute; z-index: 25; top: -9px; left: 18px; height: 28px; padding: 0 10px; border: 1px solid #008eaa; border-radius: 3px; background: #008eaa; color: #fff; cursor: grab; font-size: 11px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.layout-editing .dashboard-widget { min-height: 55px; margin-top: 24px !important; padding-top: 7px; outline: 2px dashed rgba(0,142,170,.55); outline-offset: 2px; }
.layout-editing .dashboard-widget-handle { display: block; }
.dashboard-widget.dragging { opacity: .35; }
.dashboard-widget.drag-over { outline-color: #f59f00; background: rgba(245,159,0,.06); }
.dashboard-widget-hidden { display: none !important; }
.layout-option { margin-top: 32px; }
.layout-widget-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.layout-widget-options label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--border-color); border-radius: 3px; color: var(--text-primary); cursor: pointer; }
.layout-list { max-height: 230px; overflow: auto; }
.layout-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border-color); }
.layout-list-item strong, .layout-list-item small { display: block; color: var(--text-primary); }
.layout-list-item small { color: var(--text-secondary); }
.layout-list-item .badge { margin-left: 5px; }
.layout-list-item > div:last-child { display: flex; gap: 4px; }
@media print {
    body.dashboard-printing .sidebar, body.dashboard-printing .top-header, body.dashboard-printing .dashboard-filter-card, body.dashboard-printing .dashboard-widget-handle { display: none !important; }
    body.dashboard-printing .main-content, body.dashboard-printing .content-wrapper { margin: 0 !important; padding: 0 !important; width: 100% !important; }
    body.dashboard-printing .dashboard-widget { display: block; break-inside: avoid; }
    body.dashboard-printing .dashboard-widget-hidden { display: none !important; }
}
@media (max-width: 600px) {
    .dashboard-custom-toolbar { align-items: flex-start; flex-direction: column; }
    .dashboard-custom-toolbar > div { flex-wrap: wrap; }
    .layout-widget-options { grid-template-columns: 1fr; }
    .layout-option { margin-top: 4px; }
}
