:root {
    --bg: #f6f9fd;
    --surface: #ffffff;
    --border: #dfe7f2;
    --text: #08142a;
    --muted: #52617c;
    --muted-light: #8290ad;
    --primary: #1164ff;
    --primary-2: #0097ff;
    --success: #0c8f3a;
    --danger: #ef202e;
    --warning: #f8b400;
    --sidebar-closed: 100px;
    --sidebar-open: 252px;
    --shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.nav-svg {
    width: 24px !important;
    height: 24px !important;
    display: block;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Login */
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.35), transparent 34%),
        linear-gradient(135deg, #06152b, #0b1f3d 55%, #06152b);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: 34px;
    background: rgba(255,255,255,.96);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.brand-icon {
    width: 56px;
    min-width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(17, 100, 255, .35);
}

.login-brand h1 { margin: 0; font-size: 24px; }
.login-brand p { margin: 5px 0 0; color: var(--muted); }

/* Sidebar: fechado por padrão, expande no hover */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-closed);
    background:
        radial-gradient(circle at top left, rgba(17,100,255,.20), transparent 34%),
        linear-gradient(180deg, #06152b, #020b18 100%);
    color: #fff;
    z-index: 1000;
    padding: 22px 12px;
    transition: width .22s ease;
    overflow: visible;
    box-shadow: 12px 0 34px rgba(15,23,42,.10);
}

.sidebar:hover {
    width: var(--sidebar-open);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 56px;
    min-width: 0;
}

.sidebar .brand-icon {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
}

.brand-text,
.menu-text {
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    transform: translateX(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.sidebar:hover .brand-text,
.sidebar:hover .menu-text {
    opacity: 1;
    visibility: visible;
    width: auto;
    transform: translateX(0);
}

.brand-text strong {
    display: block;
    font-size: 17px;
}

.brand-text span {
    display: block;
    margin-top: 4px;
    color: #bcd4ff;
    font-size: 13px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: calc(100vh - 142px);
}

.sidebar nav a {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    color: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0;
    font-weight: 800;
    position: relative;
    transition: background .12s ease, color .12s ease, width .22s ease, justify-content .22s ease, padding .22s ease;
}

.sidebar:hover nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 0 16px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(17, 100, 255, .24);
    color: #fff;
}

.menu-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e7f0ff;
}

.sidebar:not(:hover) nav a:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #111827;
    color: white;
    padding: 7px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    z-index: 2000;
}

.sidebar-spacer { flex: 1; }

/* Main */
.main {
    margin-left: var(--sidebar-closed);
    min-height: 100vh;
}

.topbar {
    height: 98px;
    background:
        radial-gradient(circle at center top, rgba(17,100,255,.14), transparent 38%),
        linear-gradient(135deg, #06152b, #081a36);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 34px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .15);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hamburger {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin-right: 10px;
}

.monitor-logo {
    width: 74px;
    height: 70px;
    position: relative;
}

.cloud-shape {
    position: relative;
    width: 74px;
    height: 70px;
}

.cloud-dot {
    position: absolute;
    display: block;
    background: linear-gradient(135deg, #60a5fa, #1164ff);
    border-radius: 50%;
}

.cloud-dot.c1 { width: 30px; height: 30px; left: 7px; top: 24px; }
.cloud-dot.c2 { width: 42px; height: 42px; left: 22px; top: 12px; }
.cloud-dot.c3 { width: 29px; height: 29px; left: 45px; top: 26px; }

.cloud-base {
    position: absolute;
    left: 8px;
    top: 39px;
    width: 60px;
    height: 20px;
    background: linear-gradient(135deg, #60a5fa, #1164ff);
    border-radius: 999px;
}

.chart-bars {
    position: absolute;
    left: 24px;
    top: 34px;
    width: 28px;
    height: 22px;
    border-bottom: 4px solid #06152b;
    border-left: 4px solid #06152b;
}

.chart-bars::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 2px;
    width: 5px;
    height: 9px;
    background: #06152b;
    box-shadow: 9px -5px 0 #06152b, 18px -11px 0 #06152b;
    border-radius: 2px 2px 0 0;
}

.topbar h1 {
    margin: 0;
    font-size: 31px;
    line-height: 1;
    letter-spacing: -.5px;
}

.topbar p {
    margin: 7px 0 0;
    color: #c7d5ea;
    font-size: 16px;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.top-icon {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
}

.notification {
    position: relative;
    color: white;
    font-size: 29px;
    padding-left: 18px;
    border-left: 1px solid rgba(255,255,255,.22);
}

.notification strong {
    position: absolute;
    top: -9px;
    right: -9px;
    width: 21px;
    height: 21px;
    background: #ef202e;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 12px 28px rgba(37,99,235,.30);
}

.user-info strong { display: block; font-size: 16px; }
.user-info small { display: block; color: #c7d5ea; margin-top: 4px; font-size: 13px; font-weight: 700; }
.chevron { margin-left: auto; font-size: 24px; color: #e2e8f0; }

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 36px 34px 24px;
}

.metric-card {
    min-height: 140px;
    background: rgba(255,255,255,.94);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow);
    border: 1px solid #dfe7f2;
    position: relative;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 18px;
    align-items: center;
    overflow: hidden;
}

.metric-card::before {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    grid-row: span 3;
    color: white;
}

.metric-card span { color: #425577; font-weight: 900; font-size: 15px; }
.metric-card strong { display: block; font-size: 34px; margin-top: 4px; letter-spacing: -.5px; }
.metric-card small { color: #52617c; font-weight: 700; }

/* Panels / filters */
.panel {
    background: rgba(255,255,255,.96);
    border-radius: 18px;
    padding: 28px;
    border: 1px solid #dfe7f2;
    box-shadow: var(--shadow);
    margin: 0 34px 28px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.panel-header h2 { margin: 0; font-size: 27px; line-height: 1.1; }
.panel-header h2::before { content: "⌁"; font-size: 24px; margin-right: 10px; color: #06152b; }

.filters,
.filters-wide,
.filters-autocomplete {
    display: grid;
    grid-template-columns: 180px 180px minmax(220px, 1fr) minmax(220px, 1fr) 160px 150px;
    gap: 18px;
    align-items: end;
}

label {
    display: block;
    margin-bottom: 9px;
    font-weight: 900;
    font-size: 13px;
    color: #0b1730;
}

input, select {
    width: 100%;
    height: 53px;
    min-height: 53px;
    border: 1px solid #ced8e8;
    border-radius: 10px;
    padding: 0 14px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-size: 15px;
}

input[type="checkbox"] { width: auto; height: auto; min-height: auto; }

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(17, 100, 255, .11);
}

.filter-action .btn { width: 100%; height: 53px; }

.btn {
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1164ff, #0059f7);
    color: white;
    box-shadow: 0 12px 28px rgba(17, 100, 255, .28);
}

.btn-light {
    background: #f0f5ff;
    color: #103b91;
    border: 1px solid #d6e2f6;
}

.btn-success { background: #0c8f3a; color: white; }
.btn.small { min-height: auto; height: auto; padding: 8px 11px; font-size: 12px; }

.selected-filters-panel {
    margin-top: 22px;
    padding: 17px 18px;
    border-radius: 12px;
    background: #fbfdff;
    border: 1px solid #e1e8f4;
}

.selected-filters-panel strong { display: block; color: var(--text); margin-bottom: 10px; }

.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    min-height: 34px;
    align-items: center;
}

.filter-chip {
    border: 0;
    background: #f2f6ff;
    color: #103b91;
    border-radius: 8px;
    padding: 9px 12px 9px 14px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
}

.filter-chip.integration { background: #eff7ff; color: #0a4d91; }
.filter-chip strong { font-size: 20px; line-height: 1; color: #41516f; }

.autocomplete-filter {
    position: relative;
    min-width: 0;
}

.autocomplete-suggestions {
    display: none;
    position: absolute;
    z-index: 3000;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d7deea;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
}

.autocomplete-item {
    display: block;
    width: 100%;
    border: 0;
    background: white;
    text-align: left;
    padding: 13px 14px;
    color: #1f2937;
    font-weight: 800;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.autocomplete-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.autocomplete-empty {
    padding: 14px;
    color: var(--muted-light);
    font-size: 13px;
    text-align: center;
}

.auto-refresh-pill { display: none !important; }

/* Visual charts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 0 34px 28px;
}

.chart-card {
    background: rgba(255,255,255,.96);
    border-radius: 18px;
    border: 1px solid #dfe7f2;
    box-shadow: var(--shadow);
    padding: 26px;
    min-height: 290px;
}

.chart-card h3 { margin: 0 0 18px; font-size: 17px; }

.fake-line-chart {
    height: 210px;
    background:
        linear-gradient(to bottom, transparent 0 24%, #e7edf6 25%, transparent 26% 49%, #e7edf6 50%, transparent 51% 74%, #e7edf6 75%, transparent 76%);
    position: relative;
    border-bottom: 1px solid #e7edf6;
}

.fake-line-chart::before {
    content: "";
    position: absolute;
    inset: 28px 18px 42px 32px;
    background:
        linear-gradient(160deg, transparent 0 12%, #16a34a 13% 15%, transparent 16% 100%),
        linear-gradient(20deg, transparent 0 28%, #ef202e 29% 31%, transparent 32% 100%);
    opacity: .8;
}

.donut-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    align-items: center;
}

.donut {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: conic-gradient(#1164ff 0 38%, #35b857 38% 56%, #f8b400 56% 74%, #6d28d9 74% 88%, #a8b1c2 88% 100%);
    position: relative;
    margin: auto;
}

.donut::after {
    content: "87\A Total";
    white-space: pre;
    position: absolute;
    inset: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.4;
}

.legend { display: grid; gap: 13px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; color: #13213d; font-size: 14px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; padding: 0 12px 8px; white-space: nowrap; }
td { background: #fff; padding: 14px 12px; border-top: 1px solid #edf2f7; border-bottom: 1px solid #edf2f7; vertical-align: top; font-size: 13px; }
td:first-child { border-left: 1px solid #edf2f7; border-radius: 14px 0 0 14px; }
td:last-child { border-right: 1px solid #edf2f7; border-radius: 0 14px 14px 0; }
tr.row-error td { background: #fff7f7; border-color: #fecaca; }

.badge { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-info { background: #cffafe; color: #155e75; }

.details { max-width: 420px; white-space: normal; }
.details small { display: block; margin-top: 8px; color: var(--muted); font-weight: 800; }
.muted { color: var(--muted-light); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 28px; }

.app-footer {
    display: flex;
    justify-content: space-between;
    color: #52617c;
    padding: 0 34px 28px;
    font-size: 14px;
}

/* Admin forms */
.check-line { display: flex; align-items: center; gap: 8px; height: 53px; font-weight: 800; }
.checkbox-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.checkbox-grid label, .permission-box label { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; }
.permission-box { display: grid; gap: 8px; margin-top: 10px; min-width: 220px; }
.token-box { display: block; max-width: 280px; white-space: normal; word-break: break-all; background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px; border-radius: 10px; }

@media (max-width: 1300px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters, .filters-wide, .filters-autocomplete { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .sidebar, .sidebar:hover {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .brand-text, .menu-text {
        opacity: 1;
        visibility: visible;
        width: auto;
        transform: none;
    }

    .sidebar nav a, .sidebar:hover nav a {
        width: 100%;
        justify-content: flex-start;
        padding: 0 16px;
    }

    .main { margin-left: 0; }

    .topbar {
        height: auto;
        padding: 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .cards,
    .filters,
    .filters-wide,
    .filters-autocomplete,
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .cards,
    .dashboard-grid,
    .app-footer {
        margin-left: 18px;
        margin-right: 18px;
    }

    .donut-layout { grid-template-columns: 1fr; }
}


/* Atributos dinâmicos do log */
.btn-more {
    white-space: nowrap;
}

.atributos-row td {
    background: #f8fbff !important;
    border-color: #dbe7f6 !important;
}

.atributos-box {
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
}

.atributos-title {
    font-size: 13px;
    font-weight: 900;
    color: #0b1730;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 12px;
}

.atributos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.atributo-card {
    border: 1px solid #e1e8f4;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.atributo-card strong {
    display: block;
    color: #103b91;
    font-size: 13px;
    margin-bottom: 6px;
}

.atributo-card span {
    color: #1f2937;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 1000px) {
    .atributos-grid {
        grid-template-columns: 1fr;
    }
}


/* Ajuste: topo sem ícones de tema/notificação */
.topbar-actions {
    gap: 0;
}

.user-info {
    margin-left: 0;
}


/* Ajuste: topo sem ícone hamburguer */
.hamburger {
    display: none !important;
}

.topbar-left {
    gap: 16px;
}


/* Gráficos reais */
.chart-legend-top {
    display: flex;
    justify-content: center;
    gap: 22px;
    font-size: 13px;
    color: #52617c;
    margin-bottom: 8px;
}

.chart-legend-top span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chart-legend-top i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

.line-chart-svg {
    width: 100%;
    height: 230px;
    display: block;
}

.grid-line {
    stroke: #e7edf6;
    stroke-width: 1;
}






.line-success,
.line-error {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-success {
    stroke: #35b857;
}

.line-error {
    stroke: #ef202e;
}

.dot-success {
    fill: #35b857;
    stroke: #fff;
    stroke-width: 2;
}

.dot-error {
    fill: #ef202e;
    stroke: #fff;
    stroke-width: 2;
}

.axis-label {
    fill: #52617c;
    font-size: 12px;
}

.donut {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    position: relative;
    margin: auto;
}

.donut-center {
    position: absolute;
    inset: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text);
    line-height: 1.2;
}

.donut-center strong {
    font-size: 30px;
    font-weight: 900;
}

.donut-center span {
    margin-top: 4px;
    color: #52617c;
    font-size: 15px;
}

.empty-chart {
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8290ad;
    font-weight: 800;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px dashed #dfe7f2;
}


/* Ajuste de espaçamento da tela de login */
.login-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card label {
    margin-bottom: -4px;
}

.login-card input {
    margin-bottom: 0 !important;
}

.login-card .btn.full,
.login-card button[type="submit"] {
    margin-top: 10px;
}


/* Ajuste definitivo do espaçamento do login */
body.login-body .login-card form {
    display: flex !important;
    flex-direction: column !important;
}

body.login-body .login-card form label {
    margin: 0 0 8px 0 !important;
}

body.login-body .login-card form input {
    margin: 0 0 18px 0 !important;
}

body.login-body .login-card form input[type="password"] {
    margin-bottom: 26px !important;
}

body.login-body .login-card form button[type="submit"],
body.login-body .login-card form .btn {
    margin-top: 0 !important;
}

body.login-body .login-card .btn.full {
    width: auto !important;
    min-width: 90px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    align-self: flex-start !important;
}


/* Ajuste menu lateral compacto */
:root {
    --sidebar-closed: 76px;
    --sidebar-open: 238px;
}

.sidebar {
    width: 76px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.sidebar:hover {
    width: 238px !important;
}

.sidebar-brand {
    justify-content: center !important;
    margin-bottom: 54px !important;
}

.sidebar:hover .sidebar-brand {
    justify-content: flex-start !important;
}

.sidebar .brand-icon {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    border-radius: 13px !important;
    font-size: 16px !important;
}

.sidebar nav {
    align-items: center !important;
}

.sidebar:hover nav {
    align-items: stretch !important;
}

.sidebar nav a {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    border-radius: 13px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.sidebar:hover nav a {
    width: 100% !important;
    height: 46px !important;
    padding: 0 13px !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.menu-icon {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-svg {
    width: 22px !important;
    height: 22px !important;
    margin: 0 auto !important;
}

.sidebar nav a.active {
    background: linear-gradient(135deg, #1164ff, #0059f7) !important;
    box-shadow: 0 12px 25px rgba(17, 100, 255, .28) !important;
}

.sidebar:hover nav a.active {
    background: rgba(17, 100, 255, .24) !important;
    box-shadow: none !important;
}

.main {
    margin-left: 76px !important;
}

@media (max-width: 800px) {
    .sidebar,
    .sidebar:hover {
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .sidebar nav {
        align-items: stretch !important;
    }

    .sidebar nav a,
    .sidebar:hover nav a {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 13px !important;
    }
}


/* Correção gráfico donut: remover total fixo antigo */
.donut::after {
    content: none !important;
    display: none !important;
}

.donut-center {
    position: absolute !important;
    inset: 50px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

.donut-center strong {
    font-size: 30px !important;
    font-weight: 900 !important;
    color: #08142a !important;
}

.donut-center span {
    margin-top: 4px !important;
    color: #52617c !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}


/* Arquivos de comunicação */
.more-actions {
    display: grid;
    gap: 7px;
    min-width: 170px;
}

.btn-communication {
    white-space: normal;
    line-height: 1.2;
    text-align: left;
}

.comunicacao-row td {
    background: #f8fbff !important;
    border-color: #dbe7f6 !important;
}

.comunicacao-box {
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
}

.comunicacao-title {
    font-size: 13px;
    font-weight: 900;
    color: #0b1730;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 12px;
}

.comunicacao-item {
    border: 1px solid #e1e8f4;
    border-radius: 14px;
    padding: 14px;
    background: #f8fafc;
    margin-bottom: 14px;
}

.comunicacao-item:last-child {
    margin-bottom: 0;
}

.comunicacao-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #52617c;
    font-size: 13px;
    margin-bottom: 12px;
}

.comunicacao-meta strong {
    color: #0b1730;
}

.comunicacao-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.comunicacao-file {
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    overflow: hidden;
}

.comunicacao-file-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #eef4ff;
    color: #103b91;
    font-size: 13px;
    font-weight: 900;
}

.comunicacao-file-header span {
    color: #52617c;
    font-weight: 800;
    text-transform: uppercase;
}

.comunicacao-file pre {
    margin: 0;
    padding: 12px;
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.5;
    color: #1f2937;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

@media (max-width: 1100px) {
    .comunicacao-grid {
        grid-template-columns: 1fr;
    }
}


/* Swagger */
.swagger-panel {
    overflow: hidden;
}

#swagger-ui {
    margin-top: 10px;
}

#swagger-ui .swagger-ui .topbar {
    display: none;
}

.swagger-ui .info {
    margin: 20px 0;
}

.swagger-ui .scheme-container {
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #dfe7f2;
}

.swagger-ui .opblock {
    border-radius: 12px !important;
    overflow: hidden;
}


/* Login com logo Echo Solutions */
.login-brand-logo {
    justify-content: center !important;
    margin-bottom: 30px !important;
}

.login-logo {
    display: block !important;
    max-width: 310px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.login-card {
    max-width: 520px !important;
}


/* Logo customizado no menu lateral */
.brand-icon.brand-icon-image {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.brand-icon.brand-icon-image img {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
    display: block !important;
}


/* Centralização fina dos ícones do menu lateral */
.sidebar nav a {
    position: relative !important;
}

.sidebar:not(:hover) nav a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.sidebar:not(:hover) nav a .menu-icon {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    line-height: 1 !important;
}

.sidebar:not(:hover) nav a .nav-svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    margin: 0 auto !important;
    position: static !important;
    transform: none !important;
}

.sidebar:not(:hover) nav a.active,
.sidebar:not(:hover) nav a:hover {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar:hover nav a .menu-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* Filtros de período dos gráficos */
.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.chart-card-header h3 {
    margin: 0 !important;
}

.chart-period-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #f2f6ff;
    border: 1px solid #dfe7f2;
    border-radius: 999px;
}

.chart-period-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #52617c;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.chart-period-tabs a.active {
    background: linear-gradient(135deg, #1164ff, #0059f7);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(17, 100, 255, .20);
}

.line-fixed {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: #1164ff;
}

.dot-fixed {
    fill: #1164ff;
    stroke: #fff;
    stroke-width: 2;
}

.donut::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 800px) {
    .chart-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-period-tabs {
        width: 100%;
        overflow-x: auto;
    }
}


/* Detalhes unificados na Monitoria */
.more-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    min-width: 120px !important;
}

.btn-details {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    font-weight: 900 !important;
}

.detalhes-unificados-row td {
    background: #f8fbff !important;
    border-color: #dbe7f6 !important;
}

.detalhes-unificados-box {
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
}

.detalhes-section {
    margin-bottom: 18px;
}

.detalhes-section:last-child {
    margin-bottom: 0;
}

.detalhes-section-title {
    font-size: 13px;
    font-weight: 900;
    color: #0b1730;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 12px;
}

.detalhes-section + .detalhes-section {
    padding-top: 18px;
    border-top: 1px solid #e1e8f4;
}


/* Fix Detalhes Monitoria */
.detalhes-unificados-row {
    display: none;
}

.detalhes-unificados-row td {
    background: #f8fbff !important;
    border: 1px solid #dbe7f6 !important;
    border-radius: 14px !important;
    padding: 16px !important;
}

.btn-details {
    cursor: pointer !important;
    pointer-events: auto !important;
}


/* Correção de cores/ícones dos cards por status */
.metric-card.total::before {
    content: "▦";
    background: rgba(17,100,255,.11);
    color: var(--primary);
}

.metric-card.success::before {
    content: "✓";
    background: rgba(12,143,58,.13);
    color: var(--success);
}

.metric-card.danger::before {
    content: "×";
    background: rgba(239,32,46,.13);
    color: var(--danger);
}

.metric-card.corrected::before {
    content: "↺";
    background: rgba(17,100,255,.11);
    color: var(--primary);
}

.metric-card.total strong {
    color: var(--primary);
}

.metric-card.success strong {
    color: var(--success);
}

.metric-card.danger strong {
    color: var(--danger);
}

.metric-card.corrected strong {
    color: var(--primary);
}


/* Detalhes por integração no resumo do dashboard */
.cliente-integracoes-row td {
    background: #f8fbff !important;
    border: 1px solid #dbe7f6 !important;
    border-radius: 14px !important;
    padding: 16px !important;
}

.cliente-integracoes-box {
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    padding: 16px;
}

.nested-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 8px;
}

.nested-table th {
    font-size: 11px;
}

.nested-table td {
    font-size: 13px;
    padding: 12px;
}

.btn-details {
    min-width: 90px;
}


/* Auto-refresh silencioso: sem reload visual da página */
.silent-refresh-updating {
    opacity: .98;
}


/* Seleção em lote nos logs detalhados */
.select-column {
    width: 46px;
    text-align: center !important;
    vertical-align: middle !important;
}

.select-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0c8f3a;
    cursor: pointer;
}

.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
}

.bulk-actions > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bulk-actions strong {
    color: #0b1730;
    font-size: 14px;
}

.bulk-actions span {
    color: #52617c;
    font-size: 13px;
    font-weight: 700;
}

.bulk-actions .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .bulk-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-actions .btn {
        width: 100%;
    }
}


/* Checkbox do cabeçalho: selecionar/desselecionar todos */
#selecionar-todos-logs {
    cursor: pointer;
}

.select-column input[type="checkbox"]:indeterminate {
    accent-color: #1164ff;
}


/* Cadastro de cliente com integrações internas */
.integration-form-grid {
    grid-template-columns: 160px 1.5fr 1fr 1fr 150px 170px !important;
}

.actions-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-inline form {
    margin: 0;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    filter: brightness(.96);
}

@media (max-width: 1200px) {
    .integration-form-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 760px) {
    .integration-form-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Erros agrupados por cliente - detalhes por integração */
.cliente-integracoes-row td {
    background: #f8fbff !important;
    border: 1px solid #dbe7f6 !important;
    border-radius: 14px !important;
    padding: 16px !important;
}

.cliente-integracoes-box {
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    padding: 16px;
}

.nested-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 8px;
}

.nested-table th {
    font-size: 11px;
}

.nested-table td {
    font-size: 13px;
    padding: 12px;
}


/* Fix botão Detalhes - Erros agrupados */
.btn-detalhes-agrupado {
    cursor: pointer !important;
    pointer-events: auto !important;
    min-width: 90px;
}

tr[id^="detalhes-agrupado-"] td {
    background: #f8fbff !important;
}


/* Fix v2 botão Detalhes - evita duplo clique lógico */
.btn-detalhes-agrupado {
    cursor: pointer !important;
    pointer-events: auto !important;
}


/* ============================================================
   AJUSTES MOBILE / RESPONSIVO
   ============================================================ */

@media (max-width: 980px) {
    body {
        overflow-x: hidden;
    }

    .app,
    .layout,
    .dashboard-layout,
    .page,
    .main,
    .content,
    .app-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        overflow-x: hidden !important;
    }

    .sidebar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        z-index: 50 !important;
        border-radius: 0 !important;
        padding: 10px 12px !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        box-shadow: 0 8px 22px rgba(11, 23, 48, .08) !important;
    }

    .sidebar:hover {
        width: 100% !important;
        min-width: 100% !important;
    }

    .sidebar .brand,
    .sidebar-brand,
    .brand {
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .sidebar .brand img,
    .sidebar-brand img,
    .brand img {
        max-height: 34px !important;
        width: auto !important;
    }

    .sidebar nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
        min-width: max-content !important;
        overflow: visible !important;
    }

    .sidebar nav a {
        min-width: 46px !important;
        width: auto !important;
        height: 42px !important;
        padding: 0 12px !important;
        border-radius: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        gap: 8px !important;
    }

    .sidebar nav a .menu-icon {
        width: 22px !important;
        min-width: 22px !important;
        height: 22px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    .sidebar nav a span:not(.menu-icon),
    .sidebar nav a .menu-text {
        display: none !important;
    }

    .topbar,
    .header,
    .page-header {
        position: static !important;
        margin: 12px !important;
        padding: 14px !important;
        border-radius: 18px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .topbar h1,
    .header h1,
    .page-header h1,
    h1 {
        font-size: 22px !important;
        line-height: 1.18 !important;
    }

    .topbar-actions,
    .header-actions,
    .page-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    main,
    .main-content,
    .content,
    .page-content {
        padding: 12px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .cards,
    .metric-grid,
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .metric-card,
    .card,
    .stat-card {
        padding: 14px !important;
        min-height: auto !important;
        border-radius: 18px !important;
    }

    .metric-card::before {
        width: 34px !important;
        height: 34px !important;
        font-size: 16px !important;
        right: 12px !important;
        top: 12px !important;
    }

    .metric-card span {
        font-size: 12px !important;
        padding-right: 42px !important;
    }

    .metric-card strong {
        font-size: 26px !important;
        margin-top: 8px !important;
    }

    .metric-card small {
        font-size: 11px !important;
    }

    .dashboard-grid,
    .charts-grid,
    .grid-2,
    .two-columns {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .panel,
    .chart-card,
    .form-card {
        border-radius: 18px !important;
        padding: 14px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .panel-header,
    .chart-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .panel-header h2,
    .chart-card-header h3 {
        font-size: 17px !important;
        line-height: 1.25 !important;
    }

    .chart-period-tabs {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding: 4px !important;
    }

    .chart-period-tabs a {
        min-width: max-content !important;
        padding: 0 10px !important;
    }

    .filters,
    .filter-grid,
    .form-grid,
    .search-grid,
    .inputs-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .filters .btn,
    .filter-actions .btn,
    .form-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    input,
    select,
    textarea {
        max-width: 100% !important;
        font-size: 16px !important;
    }

    .table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 16px !important;
    }

    table {
        min-width: 820px !important;
    }

    th,
    td {
        padding: 10px 9px !important;
        font-size: 12px !important;
        vertical-align: top !important;
    }

    th {
        white-space: nowrap !important;
    }

    td {
        word-break: break-word !important;
    }

    .badge {
        font-size: 11px !important;
        padding: 5px 8px !important;
        white-space: nowrap !important;
    }

    .btn,
    button,
    .button {
        min-height: 38px !important;
        border-radius: 12px !important;
        font-size: 13px !important;
    }

    .btn.small,
    button.small {
        min-height: 34px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }

    .more-actions,
    .table-actions {
        min-width: 110px !important;
    }

    .bulk-actions {
        position: sticky !important;
        bottom: 10px !important;
        z-index: 20 !important;
        align-items: stretch !important;
        flex-direction: column !important;
        box-shadow: 0 16px 36px rgba(11, 23, 48, .16) !important;
    }

    .bulk-actions .btn {
        width: 100% !important;
    }

    .donut-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        justify-items: center !important;
    }

    .donut {
        width: 170px !important;
        height: 170px !important;
    }

    .legend {
        width: 100% !important;
    }

    .legend-row {
        grid-template-columns: auto 1fr auto !important;
        gap: 8px !important;
        font-size: 12px !important;
    }

    .line-chart-svg {
        min-width: 680px !important;
    }

    .atributos-grid,
    .comunicacao-grid {
        grid-template-columns: 1fr !important;
    }

    .detalhes-unificados-box,
    .cliente-integracoes-box {
        padding: 12px !important;
        overflow-x: auto !important;
    }

    .nested-table {
        min-width: 720px !important;
    }

    .comunicacao-file pre {
        max-height: 260px !important;
        font-size: 11px !important;
        white-space: pre-wrap !important;
        word-break: break-word !important;
    }

    .login-page,
    .login-wrapper {
        padding: 16px !important;
    }

    .login-card {
        width: 100% !important;
        max-width: 420px !important;
        padding: 22px !important;
        border-radius: 22px !important;
    }
}

@media (max-width: 560px) {
    .cards,
    .metric-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .metric-card {
        padding: 14px 16px !important;
    }

    .metric-card strong {
        font-size: 30px !important;
    }

    .sidebar {
        gap: 8px !important;
    }

    .sidebar nav a {
        width: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
    }

    .sidebar .brand img,
    .sidebar-brand img,
    .brand img {
        max-height: 30px !important;
    }

    .panel,
    .chart-card,
    .form-card {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .panel-header h2,
    .chart-card-header h3 {
        font-size: 16px !important;
    }

    table {
        min-width: 760px !important;
    }

    th,
    td {
        padding: 9px 8px !important;
        font-size: 11.5px !important;
    }

    .chart-period-tabs a {
        font-size: 11px !important;
        min-height: 26px !important;
        padding: 0 8px !important;
    }

    .btn,
    button,
    .button {
        width: auto;
    }

    .panel-header .btn,
    .topbar-actions .btn,
    .form-actions .btn,
    .filter-actions .btn {
        width: 100% !important;
    }

    .line-chart-svg {
        min-width: 620px !important;
    }

    .donut {
        width: 150px !important;
        height: 150px !important;
    }

    .select-column {
        width: 42px !important;
        min-width: 42px !important;
    }

    .select-column input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 420px) {
    main,
    .main-content,
    .content,
    .page-content {
        padding: 10px !important;
    }

    .topbar,
    .header,
    .page-header {
        margin: 10px !important;
        padding: 12px !important;
    }

    .topbar h1,
    .header h1,
    .page-header h1,
    h1 {
        font-size: 20px !important;
    }

    .metric-card strong {
        font-size: 28px !important;
    }

    table {
        min-width: 720px !important;
    }

    .sidebar nav a {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
    }
}


/* Usuários logados */
.badge-light {
    background: #eef3fb;
    color: #52617c;
}

.usuario-online-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

@media (max-width: 980px) {
    .usuarios-table table,
    body table {
        min-width: 900px;
    }
}


/* ============================================================
   FIX MOBILE MENU - menu compacto no celular
   Corrige menu ocupando a tela inteira em iPhone/Android.
   ============================================================ */

@media (max-width: 980px) {
    html,
    body {
        width: 100% !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
    }

    body {
        background: #f3f6fb !important;
    }

    .app-shell,
    .app,
    .layout,
    .dashboard-layout {
        display: block !important;
        width: 100% !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    aside.sidebar,
    .sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        column-gap: 12px !important;
        row-gap: 10px !important;
        padding: 14px 16px 12px 16px !important;
        margin: 0 !important;
        border-radius: 0 0 22px 22px !important;
        overflow: visible !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        box-shadow: 0 12px 26px rgba(1, 13, 32, .18) !important;
        z-index: 30 !important;
    }

    aside.sidebar:hover,
    .sidebar:hover {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .sidebar .brand,
    .sidebar-brand,
    .brand {
        grid-column: 1 / 3 !important;
        display: grid !important;
        grid-template-columns: 42px 1fr !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar .brand img,
    .sidebar-brand img,
    .brand img,
    .brand-mark,
    .brand-logo {
        width: 42px !important;
        height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
        object-fit: contain !important;
        margin: 0 !important;
        flex: 0 0 42px !important;
    }

    .sidebar .brand h1,
    .sidebar-brand h1,
    .brand h1,
    .brand-title {
        display: block !important;
        font-size: 22px !important;
        line-height: 1.1 !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #ffffff !important;
        white-space: nowrap !important;
    }

    .sidebar .brand p,
    .sidebar-brand p,
    .brand p,
    .brand-subtitle {
        display: block !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        margin: 4px 0 0 0 !important;
        color: rgba(255,255,255,.72) !important;
        white-space: nowrap !important;
    }

    aside.sidebar nav,
    .sidebar nav,
    .menu,
    .nav-menu {
        grid-column: 1 / 3 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 0 2px 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    aside.sidebar nav::-webkit-scrollbar,
    .sidebar nav::-webkit-scrollbar,
    .menu::-webkit-scrollbar,
    .nav-menu::-webkit-scrollbar {
        display: none !important;
    }

    aside.sidebar nav a,
    .sidebar nav a,
    .menu a,
    .nav-menu a {
        flex: 0 0 auto !important;
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        overflow: hidden !important;
    }

    aside.sidebar nav a.active,
    .sidebar nav a.active,
    .menu a.active,
    .nav-menu a.active {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
    }

    aside.sidebar nav a span:not(.menu-icon),
    .sidebar nav a span:not(.menu-icon),
    aside.sidebar nav a .menu-text,
    .sidebar nav a .menu-text,
    .menu a span:not(.menu-icon),
    .nav-menu a span:not(.menu-icon) {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        width: 0 !important;
        max-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    aside.sidebar nav a svg,
    .sidebar nav a svg,
    aside.sidebar nav a i,
    .sidebar nav a i,
    .menu-icon {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
        font-size: 24px !important;
        margin: 0 !important;
    }

    .sidebar-footer,
    .sidebar .logout-area,
    .sidebar-bottom {
        display: none !important;
    }

    main,
    .main,
    .main-content,
    .content,
    .app-content,
    .page-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        padding: 14px 12px 28px 12px !important;
        overflow-x: hidden !important;
        transform: none !important;
    }

    .topbar,
    .header,
    .page-header {
        margin: 0 0 12px 0 !important;
        padding: 14px !important;
        border-radius: 18px !important;
    }

    .cards,
    .metric-grid,
    .stats-grid {
        margin-top: 0 !important;
    }
}

@media (max-width: 560px) {
    aside.sidebar,
    .sidebar {
        padding: 12px 14px 10px 14px !important;
        border-radius: 0 0 20px 20px !important;
        row-gap: 9px !important;
    }

    .sidebar .brand,
    .sidebar-brand,
    .brand {
        grid-template-columns: 38px 1fr !important;
        gap: 10px !important;
    }

    .sidebar .brand img,
    .sidebar-brand img,
    .brand img,
    .brand-mark,
    .brand-logo {
        width: 38px !important;
        height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        flex-basis: 38px !important;
    }

    .sidebar .brand h1,
    .sidebar-brand h1,
    .brand h1,
    .brand-title {
        font-size: 20px !important;
    }

    .sidebar .brand p,
    .sidebar-brand p,
    .brand p,
    .brand-subtitle {
        font-size: 13px !important;
    }

    aside.sidebar nav a,
    .sidebar nav a,
    .menu a,
    .nav-menu a {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 44px !important;
        min-height: 44px !important;
        border-radius: 15px !important;
    }

    aside.sidebar nav a.active,
    .sidebar nav a.active,
    .menu a.active,
    .nav-menu a.active {
        width: 58px !important;
        min-width: 58px !important;
        max-width: 58px !important;
    }

    aside.sidebar nav a svg,
    .sidebar nav a svg,
    aside.sidebar nav a i,
    .sidebar nav a i,
    .menu-icon {
        width: 22px !important;
        min-width: 22px !important;
        height: 22px !important;
        font-size: 22px !important;
    }

    main,
    .main,
    .main-content,
    .content,
    .app-content,
    .page-content {
        padding: 12px 10px 24px 10px !important;
    }
}

@media (max-width: 390px) {
    aside.sidebar,
    .sidebar {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    aside.sidebar nav a,
    .sidebar nav a,
    .menu a,
    .nav-menu a {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }

    aside.sidebar nav a.active,
    .sidebar nav a.active,
    .menu a.active,
    .nav-menu a.active {
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
    }
}


/* Status Pendente */
.badge-pendente {
    background: #ffffff;
    color: #334155;
    border: 1px solid #dbe3ef;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.metric-card.pending,
.metric-card.pendente,
.card-pendente {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

.metric-card.pending span,
.metric-card.pending small,
.metric-card.pendente span,
.metric-card.pendente small,
.card-pendente span,
.card-pendente small {
    color: #64748b !important;
}

.metric-card.pending strong,
.metric-card.pendente strong,
.card-pendente strong {
    color: #0f172a !important;
}

.metric-card.pending::before,
.metric-card.pendente::before,
.card-pendente::before {
    content: "◷" !important;
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}


/* ============================================================
   Ajuste cards menores para caber em uma linha
   ============================================================ */

@media (min-width: 981px) {
    .cards,
    .metric-grid,
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .metric-card,
    .card,
    .stat-card {
        padding: 14px 16px !important;
        min-height: 112px !important;
        border-radius: 18px !important;
    }

    .metric-card::before {
        width: 34px !important;
        height: 34px !important;
        right: 12px !important;
        top: 12px !important;
        font-size: 16px !important;
    }

    .metric-card span {
        font-size: 12px !important;
        line-height: 1.15 !important;
        padding-right: 38px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .metric-card strong {
        font-size: 26px !important;
        line-height: 1 !important;
        margin-top: 8px !important;
    }

    .metric-card small {
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin-top: 6px !important;
    }

    .metric-card .metric-icon,
    .card .metric-icon,
    .stat-card .metric-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }
}

@media (min-width: 981px) and (max-width: 1280px) {
    .cards,
    .metric-grid,
    .stats-grid {
        gap: 10px !important;
    }

    .metric-card,
    .card,
    .stat-card {
        padding: 12px 13px !important;
        min-height: 104px !important;
        border-radius: 16px !important;
    }

    .metric-card span {
        font-size: 11px !important;
        padding-right: 34px !important;
    }

    .metric-card strong {
        font-size: 23px !important;
    }

    .metric-card small {
        font-size: 10px !important;
    }

    .metric-card::before {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
        right: 10px !important;
        top: 10px !important;
    }
}

/* Em telas menores, mantém responsivo sem forçar 5 colunas */
@media (max-width: 980px) {
    .cards,
    .metric-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .cards,
    .metric-grid,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================
   Correção card Pendente
   ============================================================ */

.metric-card.pending span,
.metric-card.pendente span,
.card-pendente span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: normal !important;
    line-height: 1.2 !important;
    max-width: calc(100% - 40px) !important;
}

.metric-card.pending,
.metric-card.pendente,
.card-pendente {
    min-width: 0 !important;
}

.metric-card.pending small,
.metric-card.pendente small,
.card-pendente small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.2 !important;
}

/* Em telas de desktop, os cards continuam pequenos, mas sem cortar o título. */
@media (min-width: 981px) {
    .metric-card.pending span,
    .metric-card.pendente span,
    .card-pendente span {
        font-size: 12px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }

    .metric-card.pending small,
    .metric-card.pendente small,
    .card-pendente small {
        font-size: 11px !important;
        white-space: normal !important;
    }
}

.metric-card.pending span,
.metric-card.pendente span,
.card-pendente span {
    font-size: 14px !important;
}


/* ============================================================
   FIX linha Pendentes no gráfico Histórico
   ============================================================ */

.line-pending {
    fill: none !important;
    stroke: #cbd5e1 !important;
    stroke-width: 4 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-dasharray: 7 6 !important;
    opacity: .95 !important;
}

.dot-pending {
    fill: #cbd5e1 !important;
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
    r: 5;
}

.chart-legend-top i[style*="#cbd5e1"] {
    border: 1px solid #94a3b8 !important;
}


/* Auto-refresh discreto do Index */
#index-cards,
#index-resumo,
#index-graficos,
#index-ultimos-logs {
    transition: none !important;
}

.auto-refresh-pill {
    user-select: none;
}


/* Filtro múltiplo de Status */
.status-filter-options {
    min-height: 53px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #d7e3f4;
    border-radius: 12px;
    background: #ffffff;
}

.status-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.status-check input {
    width: 16px;
    height: 16px;
    accent-color: #1164ff;
}

.status-check .badge {
    white-space: nowrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    background: #eef4ff;
    color: #24406f;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .status-filter-options {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ============================================================
   Layout do Status ao lado de Integrações
   ============================================================ */

.filters-grid {
    display: grid;
    grid-template-columns: 180px 180px minmax(260px, 1fr) minmax(280px, 1fr) minmax(280px, 340px);
    gap: 16px;
    align-items: start;
}

.filters-actions-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group-status .status-filter-options {
    min-height: 53px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 12px;
}

.filter-group-status .status-check {
    margin: 0;
}

.filter-group-status .badge {
    min-height: 28px;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

@media (max-width: 1400px) {
    .filters-grid {
        grid-template-columns: 180px 180px minmax(220px, 1fr) minmax(220px, 1fr);
    }

    .filter-group-status {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-group-status,
    .filter-group-integracoes {
        grid-column: auto;
    }

    .filters-actions-row {
        margin-top: 14px;
    }
}

@media (max-width: 700px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-group-status .status-filter-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-actions-row {
        width: 100%;
    }

    .filters-actions-row .filter-actions,
    .filters-actions-row .filter-actions .btn,
    .filters-actions-row .filter-actions button {
        width: 100%;
    }
}


/* ============================================================
   FIX DEFINITIVO - Status na mesma linha de Integrações
   ============================================================ */

/*
   Em desktop, força o grid dos filtros a ter 5 colunas:
   Data inicial | Data final | Clientes | Integrações | Status
   O botão Pesquisar vai para a linha de baixo.
*/
@media (min-width: 1181px) {
    .filters-grid {
        display: grid !important;
        grid-template-columns: 180px 180px minmax(230px, 1fr) minmax(260px, 1fr) 430px !important;
        column-gap: 16px !important;
        row-gap: 14px !important;
        align-items: start !important;
        width: 100% !important;
    }

    .filters-grid > .filter-group {
        min-width: 0 !important;
    }

    .filters-grid > .filter-group-integracoes {
        grid-column: 4 !important;
        grid-row: 1 !important;
    }

    .filters-grid > .filter-group-status {
        grid-column: 5 !important;
        grid-row: 1 !important;
        min-width: 430px !important;
    }

    .filters-grid > .filter-actions,
    .filters-actions-row {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        margin-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .filter-group-status .status-filter-options {
        min-height: 53px !important;
        height: 53px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        overflow: hidden !important;
    }

    .filter-group-status .status-check {
        display: inline-flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        gap: 5px !important;
        white-space: nowrap !important;
    }

    .filter-group-status .status-check input {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
    }

    .filter-group-status .badge {
        min-height: 25px !important;
        padding: 4px 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }
}

/*
   Em telas médias, onde não cabe tudo em 5 colunas,
   deixa Data/Cliente/Integrações e Status mais organizados,
   mas ainda tenta manter Integrações + Status na mesma linha.
*/
@media (min-width: 981px) and (max-width: 1180px) {
    .filters-grid {
        display: grid !important;
        grid-template-columns: 180px 180px minmax(260px, 1fr) 380px !important;
        gap: 14px !important;
        align-items: start !important;
    }

    .filter-group-integracoes {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }

    .filter-group-status {
        grid-column: 4 !important;
        grid-row: 2 !important;
        min-width: 380px !important;
    }

    .filter-actions,
    .filters-actions-row {
        grid-column: 1 / -1 !important;
        grid-row: 3 !important;
    }

    .filter-group-status .status-filter-options {
        min-height: 53px !important;
        height: 53px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        gap: 7px !important;
    }

    .filter-group-status .badge {
        padding: 4px 7px !important;
        font-size: 10.5px !important;
    }
}

/* Sobrescreve a regra anterior que mandava o Status para ocupar a linha inteira */
@media (max-width: 1400px) and (min-width: 981px) {
    .filter-group-status {
        grid-column: auto !important;
    }
}


/* ============================================================
   Gráficos - opção 60 dias
   ============================================================ */

.chart-period-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-period-tabs a {
    white-space: nowrap;
}

@media (max-width: 700px) {
    .chart-period-tabs {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 4px;
    }
}


/* ============================================================
   FIX DEFINITIVO DOS FILTROS DA MONITORIA
   Motivo:
   - #clientes-hidden e #integracoes-hidden estavam ocupando células do grid
   - isso empurrava o Status para a linha de baixo
   ============================================================ */

#clientes-hidden,
#integracoes-hidden {
    display: none !important;
}

/* Desktop largo */
.filters.filters-autocomplete,
.filters-autocomplete {
    display: grid !important;
    grid-template-columns: 180px 180px minmax(220px, 1fr) minmax(220px, 1fr) minmax(360px, 430px) 180px !important;
    gap: 18px !important;
    align-items: end !important;
}

/* Faz o bloco de status ocupar a 5ª coluna e o botão a 6ª */
.filters.filters-autocomplete > div:nth-of-type(5) {
    display: none !important; /* clientes-hidden */
}
.filters.filters-autocomplete > div:nth-of-type(6) {
    display: none !important; /* integracoes-hidden */
}
.filters.filters-autocomplete > div:nth-of-type(7) {
    grid-column: 5 !important; /* Status */
}
.filters.filters-autocomplete > div:nth-of-type(8),
.filters.filters-autocomplete > .filter-action {
    grid-column: 6 !important; /* Botão Pesquisar */
}

/* Status horizontal */
.filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
.filters-autocomplete .status-filter-options {
    min-height: 53px !important;
    height: 53px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
    border: 1px solid #d7e3f4 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
}

.filters.filters-autocomplete > div:nth-of-type(7) .status-check,
.filters-autocomplete .status-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

.filters.filters-autocomplete > div:nth-of-type(7) .status-check input,
.filters-autocomplete .status-check input {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    margin: 0 !important;
}

.filters.filters-autocomplete > div:nth-of-type(7) .badge,
.filters-autocomplete .badge {
    white-space: nowrap !important;
}

/* O botão fica com altura igual aos filtros */
.filters.filters-autocomplete .filter-action .btn,
.filters-autocomplete .filter-action .btn {
    width: 100% !important;
    height: 53px !important;
}

/* Laptop / telas médias */
@media (max-width: 1500px) and (min-width: 1101px) {
    .filters.filters-autocomplete,
    .filters-autocomplete {
        grid-template-columns: 170px 170px minmax(200px, 1fr) minmax(200px, 1fr) minmax(330px, 380px) 160px !important;
        gap: 14px !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        gap: 6px !important;
        padding: 8px !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .badge,
    .filters-autocomplete .badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

/* Tablet grande: ainda tenta manter status ao lado */
@media (max-width: 1100px) and (min-width: 801px) {
    .filters.filters-autocomplete,
    .filters-autocomplete {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 14px !important;
        align-items: start !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) {
        grid-column: 2 / 4 !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(8),
    .filters.filters-autocomplete > .filter-action {
        grid-column: 1 / 2 !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        height: auto !important;
        min-height: 53px !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
}

/* Mobile */
@media (max-width: 800px) {
    .filters.filters-autocomplete,
    .filters-autocomplete {
        grid-template-columns: 1fr !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7),
    .filters.filters-autocomplete > div:nth-of-type(8),
    .filters.filters-autocomplete > .filter-action {
        grid-column: auto !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        height: auto !important;
        min-height: 53px !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
}


/* ============================================================
   Ajuste responsivo do bloco Status
   - Alinha melhor quando a tela reduz
   ============================================================ */

/* Tablet / largura intermediária */
@media (max-width: 1100px) and (min-width: 801px) {
    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(130px, max-content)) !important;
        justify-content: start !important;
        align-items: center !important;
        align-content: start !important;
        gap: 10px 14px !important;
        padding: 12px !important;
        height: auto !important;
        min-height: 53px !important;
        overflow: visible !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-check,
    .filters-autocomplete .status-check {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Mobile */
@media (max-width: 800px) {
    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        justify-content: start !important;
        align-items: center !important;
        align-content: start !important;
        gap: 10px 14px !important;
        padding: 12px !important;
        height: auto !important;
        min-height: 53px !important;
        overflow: visible !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-check,
    .filters-autocomplete .status-check {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .filters.filters-autocomplete > div:nth-of-type(7) .status-check input,
    .filters-autocomplete .status-check input {
        margin-right: 6px !important;
    }
}

/* Mobile bem estreito */
@media (max-width: 520px) {
    .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
    .filters-autocomplete .status-filter-options {
        grid-template-columns: 1fr !important;
    }
}


/* FIX autocomplete filtros */
.filter-chip.status {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #dbe3ef;
}


/* Autocomplete integrações - exibição limpa */
.autocomplete-suggestions .autocomplete-item {
    text-align: left;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
}


/* FIX final filtros Monitoria */
#clientes-hidden,
#integracoes-hidden {
    display: none !important;
}

.filter-chip.status {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #dbe3ef;
}

.status-filter-options input[type="checkbox"] {
    pointer-events: auto !important;
}


/* ============================================================
   Login - erro destacado
   ============================================================ */

.login-error-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 16px 0 20px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
    box-shadow: 0 12px 28px rgba(225, 29, 72, .12);
    font-size: 14px;
    line-height: 1.35;
}

.login-error-alert strong {
    display: block;
    margin-bottom: 3px;
    color: #be123c;
    font-weight: 900;
}

.login-error-alert span {
    display: block;
}

.login-error-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #e11d48;
    color: #ffffff;
    font-weight: 900;
    font-size: 17px;
    line-height: 1;
    margin-top: 1px;
}

.login-card-has-error input[name="usuario"],
.login-card-has-error input[name="senha"] {
    border-color: #fb7185 !important;
    background: #fff7f8 !important;
}

.login-card-has-error input[name="usuario"]:focus,
.login-card-has-error input[name="senha"]:focus {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .14) !important;
}

.login-card-has-error {
    animation: login-error-shake .18s ease-in-out 0s 2;
}

@keyframes login-error-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

@media (max-width: 560px) {
    .login-error-alert {
        padding: 12px 13px;
        font-size: 13px;
    }

    .login-error-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 14px;
    }
}


/* Ações dos logs detalhados */
.log-actions-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-danger {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(225, 29, 72, .18);
}

.btn-danger:hover {
    filter: brightness(.96);
}


/* Menu de ações nos logs detalhados */
.log-action-menu {
    position: relative;
    display: inline-block;
}

.action-menu-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #d9e3f0;
    border-radius: 12px;
    background: #f8fbff;
    color: #173b7a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
    transition: all .18s ease;
}

.action-menu-btn:hover {
    background: #eef4ff;
    border-color: #bfd0ea;
}

.action-menu-btn span {
    font-size: 24px;
    line-height: 1;
    transform: translateY(-2px);
}

.action-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #dfe7f3;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    padding: 8px;
    display: none;
    z-index: 50;
}

.log-action-menu.open .action-menu-dropdown,
.action-menu-dropdown.is-open {
    display: block;
}

.action-menu-dropdown.floating {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 100001;
}

.action-menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.action-menu-item:hover {
    background: #f8fafc;
}

.action-menu-item.success {
    color: #15803d;
}

.action-menu-item.success:hover {
    background: #f0fdf4;
}

.action-menu-item.danger {
    color: #b91c1c;
}

.action-menu-item.danger:hover {
    background: #fef2f2;
}


/* Retenção de dados por cliente */
.retention-help {
    color: #64748b;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}


/* Notificação de novos erros */
.monitoria-toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
}

.monitoria-toast {
    position: relative;
    padding: 16px 44px 15px 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #fecdd3;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
    pointer-events: auto;
    animation: monitoria-toast-in .28s ease-out;
    overflow: hidden;
}

.monitoria-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #e11d48;
}

.monitoria-toast-error {
    background: linear-gradient(180deg, #fff7f8 0%, #ffffff 100%);
}

.monitoria-toast-title {
    color: #be123c;
    font-weight: 900;
    font-size: 15px;
    margin-bottom: 5px;
}

.monitoria-toast-body {
    color: #1f2937;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.monitoria-toast-time {
    color: #64748b;
    font-size: 12px;
    margin-top: 7px;
}

.monitoria-toast-close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #ffe4e6;
    color: #be123c;
    font-weight: 900;
    cursor: pointer;
}

.monitoria-toast.hide {
    opacity: 0;
    transform: translateX(18px);
    transition: all .32s ease;
}

@keyframes monitoria-toast-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .monitoria-toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }
}


/* FIX popup: sempre fixo na viewport, não no final da página */
.monitoria-toast-container {
    position: fixed !important;
    right: 22px !important;
    bottom: 22px !important;
    left: auto !important;
    top: auto !important;
    z-index: 2147483000 !important;
    transform: none !important;
}

body > .monitoria-toast-container {
    position: fixed !important;
}


/* FIX popup Monitoria: sempre acima de tabelas, painéis e menus */
body > .monitoria-toast-container {
    position: fixed !important;
    right: 22px !important;
    bottom: 22px !important;
    left: auto !important;
    top: auto !important;
    z-index: 2147483647 !important;
    width: min(390px, calc(100vw - 32px)) !important;
    pointer-events: none !important;
}

body > .monitoria-toast-container .monitoria-toast {
    pointer-events: auto !important;
}


/* Sininho de notificações no topo */
.notification-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
}

.notification-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #ffffff;
    color: #173b7a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    transition: all .18s ease;
}

.notification-bell-btn:hover {
    background: #f8fbff;
    border-color: #bcd0ef;
    transform: translateY(-1px);
}

.notification-bell-icon {
    font-size: 19px;
    line-height: 1;
}

.notification-bell-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(380px, calc(100vw - 32px));
    max-height: 440px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #dfe7f3;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .18);
    z-index: 2147483000;
    display: none;
}

.notification-bell-wrapper.open .notification-panel {
    display: block;
    animation: notification-panel-in .18s ease-out;
}

.notification-panel-header {
    padding: 15px 16px 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-panel-header strong {
    font-size: 15px;
    color: #0f172a;
}

.notification-panel-header button {
    border: 0;
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.notification-panel-header button:hover {
    background: #e2e8f0;
}

.notification-panel-subtitle {
    padding: 0 16px 12px 16px;
    font-size: 12px;
    color: #64748b;
    border-bottom: 1px solid #edf2f7;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.notification-empty {
    padding: 26px 14px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.notification-history-item {
    border-radius: 14px;
    padding: 11px 12px;
    border: 1px solid transparent;
    background: #ffffff;
}

.notification-history-item + .notification-history-item {
    margin-top: 6px;
}

.notification-history-item:hover {
    background: #fff7f8;
    border-color: #fecdd3;
}

.notification-history-title {
    color: #be123c;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 4px;
}

.notification-history-body {
    color: #1f2937;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

.notification-history-time {
    color: #64748b;
    font-size: 11px;
    margin-top: 6px;
}

@keyframes notification-panel-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .notification-bell-wrapper {
        margin-right: 8px;
    }

    .notification-panel {
        position: fixed;
        top: 76px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}


/* FIX sininho: menor, transparente e painel sempre funcional */
.notification-bell-wrapper {
    margin-right: 8px !important;
}

.notification-bell-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #475569 !important;
    padding: 0 !important;
}

.notification-bell-btn:hover {
    background: rgba(15, 23, 42, .06) !important;
    border: 0 !important;
    transform: none !important;
}

.notification-bell-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.notification-bell-icon svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-bell-count {
    top: -3px !important;
    right: -3px !important;
    min-width: 17px !important;
    height: 17px !important;
    font-size: 10px !important;
    border-width: 1px !important;
}

.notification-panel {
    position: fixed !important;
    top: 68px !important;
    right: 22px !important;
    left: auto !important;
    width: min(380px, calc(100vw - 32px)) !important;
    max-height: min(440px, calc(100vh - 92px)) !important;
    z-index: 2147483647 !important;
    display: none !important;
}

.notification-panel.open {
    display: block !important;
    animation: notification-panel-in .18s ease-out;
}

.notification-bell-wrapper.open .notification-panel {
    display: none !important;
}

@media (max-width: 700px) {
    .notification-panel {
        top: 70px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
    }
}


/* FIX definitivo clique sininho */
.notification-bell-wrapper,
.notification-bell-btn,
.notification-bell-icon,
.notification-bell-icon svg {
    pointer-events: auto !important;
}

.notification-bell-btn {
    cursor: pointer !important;
    position: relative !important;
    z-index: 20 !important;
}

#notification-panel.notification-panel {
    position: fixed !important;
    top: 68px !important;
    right: 22px !important;
    left: auto !important;
    width: min(380px, calc(100vw - 32px)) !important;
    max-height: min(440px, calc(100vh - 92px)) !important;
    z-index: 2147483647 !important;
    display: none !important;
}

#notification-panel.notification-panel.open {
    display: block !important;
}

#notification-panel .notification-list {
    max-height: 360px !important;
    overflow-y: auto !important;
}

@media (max-width: 700px) {
    #notification-panel.notification-panel {
        top: 70px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
    }
}


/* FIX definitivo sininho: cor, clique e contador */
.notification-bell-btn,
#notification-bell-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #173b7a !important;
    padding: 0 !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.notification-bell-btn:hover,
#notification-bell-btn:hover {
    background: rgba(23, 59, 122, .09) !important;
    color: #0f2e63 !important;
}

.notification-bell-icon,
.notification-bell-icon svg {
    pointer-events: none !important;
}

.notification-bell-icon svg {
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.notification-bell-count {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    background: #e11d48 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #ffffff !important;
    line-height: 1 !important;
}

#notification-panel.notification-panel {
    position: fixed !important;
    top: 68px !important;
    right: 22px !important;
    left: auto !important;
    width: min(380px, calc(100vw - 32px)) !important;
    max-height: min(440px, calc(100vh - 92px)) !important;
    z-index: 2147483647 !important;
    display: none !important;
}

#notification-panel.notification-panel.open {
    display: block !important;
    animation: notification-panel-in .18s ease-out;
}

.notification-history-item.unread {
    background: #fff7f8 !important;
    border-color: #fecdd3 !important;
}

@media (max-width: 700px) {
    #notification-panel.notification-panel {
        top: 70px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
    }
}


/* Remover seta usuário */
.user-info .chevron {
    display: none !important;
}


/* Usuários - campos de e-mail e alertas */
.user-form-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr 180px 150px 230px 240px !important;
}

@media (max-width: 1400px) {
    .user-form-grid {
        grid-template-columns: 1fr 1fr 1fr 180px 150px !important;
    }
}

@media (max-width: 900px) {
    .user-form-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Login - loading moderno */
.login-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 24, 48, .72);
    backdrop-filter: blur(8px);
}

.login-loading-overlay.show {
    display: flex;
    animation: loading-fade-in .18s ease-out;
}

.login-loading-card {
    width: min(360px, calc(100vw - 42px));
    padding: 34px 30px 30px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .70);
    text-align: center;
}

.login-loading-card strong {
    display: block;
    color: #0f2e63;
    font-size: 18px;
    font-weight: 900;
    margin-top: 16px;
}

.login-loading-card p {
    color: #64748b;
    margin: 7px 0 0;
    font-size: 14px;
}

.login-loading-orbit {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(23, 59, 122, .08) 0 38%, transparent 39%);
}

.login-loading-orbit::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(23, 59, 122, .12);
    border-top-color: #11d8c5;
    border-right-color: #3b82f6;
    animation: orbit-spin .9s linear infinite;
}

.login-loading-orbit span {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #11d8c5;
    box-shadow: 0 0 14px rgba(17, 216, 197, .8);
}

.login-loading-orbit span:nth-child(1) {
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.login-loading-orbit span:nth-child(2) {
    right: 8px;
    bottom: 16px;
    background: #3b82f6;
    box-shadow: 0 0 14px rgba(59, 130, 246, .8);
}

.login-loading-orbit span:nth-child(3) {
    left: 8px;
    bottom: 16px;
    background: #0f2e63;
    box-shadow: 0 0 14px rgba(15, 46, 99, .55);
}

@keyframes orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes loading-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mensagens animadas */
.animated-message {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dfe7f3;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
    animation: animated-message-in .36s ease-out;
    position: relative;
    overflow: hidden;
}

.animated-message::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.animated-message-success {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.animated-message-success::before {
    background: #16a34a;
}

.animated-message-danger {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
    border-color: #fecdd3;
}

.animated-message-danger::before {
    background: #e11d48;
}

.animated-message-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    line-height: 1;
    margin-top: 1px;
}

.animated-message-success .animated-message-icon {
    background: #16a34a;
    box-shadow: 0 10px 22px rgba(22, 163, 74, .25);
}

.animated-message-danger .animated-message-icon {
    background: #e11d48;
    box-shadow: 0 10px 22px rgba(225, 29, 72, .25);
}

.animated-message strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 3px;
}

.animated-message span {
    color: #475569;
    font-size: 13px;
}

.animated-message-hide {
    opacity: 0;
    transform: translateY(-8px);
    transition: all .32s ease;
}

@keyframes animated-message-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.inline-remove-form {
    display: inline-flex;
    margin: 0;
}


/* Logs detalhados - carregar mais */
.logs-panel-header {
    align-items: flex-start !important;
}

.load-more-logs-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 12px 4px;
}

.load-more-logs-btn {
    min-width: 210px;
    justify-content: center;
}

#logs-detalhados {
    scroll-margin-top: 18px;
}


/* Ocultar filtro coluna Chave */
.th-chave-filter .column-filter-btn,
.th-chave-filter .column-filter-popover,
.column-filter-popover,
#btn-filtro-chave,
#filtro-chave-popover {
    display: none !important;
}


/* Ajuste altura linhas grids -10% */
.table-wrapper table th,
.table-wrapper table td,
table th,
table td {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    line-height: 1.22 !important;
}

.table-wrapper table td .badge,
.table-wrapper table th .badge,
table td .badge {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    line-height: 1.05 !important;
}

.table-wrapper table td .btn.small,
.table-wrapper table td .action-menu-btn,
.table-wrapper table td .btn-details,
.table-wrapper table td .btn-more {
    min-height: 32px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.table-wrapper table tr,
table tr {
    min-height: auto !important;
}

.nested-table th,
.nested-table td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.detalhes-unificados-box,
.cliente-integracoes-box {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}


/* Ajuste altura linhas grids -15% */
.table-wrapper table th,
.table-wrapper table td,
table th,
table td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1.18 !important;
}

.table-wrapper table td .badge,
.table-wrapper table th .badge,
table td .badge {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.02 !important;
}

.table-wrapper table td .btn.small,
.table-wrapper table td .action-menu-btn,
.table-wrapper table td .btn-details,
.table-wrapper table td .btn-more {
    min-height: 30px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.nested-table th,
.nested-table td {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

.detalhes-unificados-box,
.cliente-integracoes-box {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}


/* Modal moderno para motivo da correção */
body.modal-open {
    overflow: hidden;
}

.motivo-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.motivo-modal-card {
    width: min(560px, 100%);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(226, 232, 240, 0.95);
    overflow: hidden;
    animation: motivoModalShow 0.18s ease-out;
}

@keyframes motivoModalShow {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.motivo-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 14px 24px;
}

.motivo-modal-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #16a34a;
    margin-bottom: 6px;
}

.motivo-modal-header h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #0f172a;
}

.motivo-modal-header p {
    margin: 8px 0 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.motivo-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.motivo-modal-close:hover {
    background: #eef2f7;
}

.motivo-modal-body {
    padding: 0 24px 10px 24px;
}

.motivo-modal-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.motivo-modal-textarea {
    width: 100%;
    min-height: 132px;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.motivo-modal-textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.motivo-modal-footer-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.motivo-modal-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
    flex: 1;
}

.motivo-modal-counter {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.motivo-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 24px 24px;
}

@media (max-width: 640px) {
    .motivo-modal-backdrop {
        padding: 14px;
    }

    .motivo-modal-card {
        border-radius: 18px;
    }

    .motivo-modal-header,
    .motivo-modal-body,
    .motivo-modal-actions {
        padding-left: 16px;
        padding-right: 16px;
    }

    .motivo-modal-header {
        padding-top: 18px;
    }

    .motivo-modal-actions {
        flex-direction: column-reverse;
    }

    .motivo-modal-actions .btn {
        width: 100%;
    }
}


/* Login echo Solutions - Modelo 2 */
.login-echo-solutions-body {
    min-height: 100vh;
    margin: 0;
    background: #f8fbff;
    overflow-x: hidden;
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

.login-echo-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(420px, .92fr);
}

.login-echo-left {
    position: relative;
    overflow: hidden;
    padding: 72px 72px 54px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 88%, rgba(12, 210, 220, .26), transparent 28%),
        radial-gradient(circle at 82% 26%, rgba(16, 185, 129, .22), transparent 28%),
        linear-gradient(145deg, #06162c 0%, #071c39 52%, #021025 100%);
}

.login-echo-left::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: .28;
}

.login-echo-left::after {
    content: "";
    position: absolute;
    left: -12%;
    right: -12%;
    bottom: -90px;
    height: 260px;
    background:
        radial-gradient(ellipse at 25% 45%, rgba(0, 255, 210, .40), transparent 34%),
        linear-gradient(170deg, transparent 18%, rgba(8, 205, 215, .18) 24%, transparent 32%),
        repeating-radial-gradient(ellipse at center, rgba(0,255,220,.45) 0 1px, transparent 1px 8px);
    transform: rotate(-3deg);
    opacity: .85;
    filter: blur(.2px);
}

.login-echo-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.echo-symbol {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    position: relative;
    background: linear-gradient(135deg, #11f0d7, #2e86e6);
    box-shadow: 0 0 34px rgba(17, 240, 215, .34);
}

.echo-symbol::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: #06172f;
}

.echo-symbol::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 36px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #11f0d7, #2e86e6);
}

.echo-symbol span {
    position: absolute;
    left: 0;
    right: 0;
    top: 36px;
    height: 10px;
    background: #06172f;
    z-index: 2;
}

.echo-symbol.small {
    width: 68px;
    height: 68px;
    box-shadow: none;
}

.echo-symbol.small::before {
    inset: 12px;
    background: #ffffff;
}

.echo-symbol.small::after {
    left: 13px;
    right: 13px;
    top: 30px;
    height: 8px;
}

.echo-symbol.small span {
    top: 30px;
    height: 8px;
    background: #ffffff;
}

.login-echo-brand strong {
    display: block;
    font-size: 62px;
    line-height: .85;
    letter-spacing: -.04em;
    font-weight: 800;
    color: #17ead2;
}

.login-echo-brand small {
    display: block;
    margin-top: 8px;
    font-size: 46px;
    line-height: .85;
    color: #3b8fe8;
    font-weight: 500;
}

.login-echo-hero {
    position: relative;
    z-index: 1;
    margin-top: 62px;
}

.login-echo-hero h1 {
    margin: 0;
    font-size: 29px;
    line-height: 1.34;
    font-weight: 500;
}

.login-echo-hero h1 span {
    color: #0fe5ce;
    font-weight: 800;
}

.login-echo-linechart {
    position: absolute;
    left: 330px;
    top: 0;
    width: 430px;
    height: 160px;
    opacity: .9;
    background:
        radial-gradient(circle at 78% 22%, #0ff0d6 0 6px, transparent 7px),
        linear-gradient(150deg, transparent 0 18%, rgba(20, 231, 213, .0) 19%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 58px);
}

.login-echo-linechart::before {
    content: "";
    position: absolute;
    inset: 18px 0 22px;
    border-radius: 50%;
    border-top: 4px solid #0de9d2;
    transform: skewX(-18deg) rotate(-5deg);
    filter: drop-shadow(0 0 12px rgba(13,233,210,.55));
}

.login-echo-dashboard {
    position: relative;
    z-index: 1;
    margin-top: 84px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    max-width: 760px;
}

.echo-kpi-card,
.echo-chart-card,
.echo-device-card,
.echo-activity-card {
    border: 1px solid rgba(77, 156, 219, .28);
    background: rgba(8, 30, 62, .52);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter: blur(8px);
}

.echo-kpi-card {
    padding: 22px 24px;
    min-height: 248px;
}

.echo-card-title,
.echo-card-head span {
    color: #d6e7fb;
    font-size: 15px;
    font-weight: 700;
}

.echo-kpi-row {
    padding: 19px 0 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.echo-kpi-row:last-child {
    border-bottom: 0;
}

.echo-kpi-row span {
    display: block;
    color: #7fa6ce;
    font-size: 13px;
}

.echo-kpi-row strong {
    display: inline-block;
    margin-top: 7px;
    color: #ffffff;
    font-size: 25px;
    font-weight: 700;
}

.echo-kpi-row em {
    float: right;
    margin-top: 12px;
    color: #0ff0d6;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.echo-chart-card {
    padding: 22px;
    min-height: 248px;
}

.echo-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.echo-card-head small {
    color: #8ab1d6;
    border: 1px solid rgba(255,255,255,.08);
    padding: 7px 9px;
    border-radius: 8px;
}

.echo-bars {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    height: 132px;
    padding: 26px 20px 8px;
}

.echo-bars i {
    width: 22px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #13ead2, #0d71ca);
    box-shadow: 0 0 20px rgba(19, 234, 210, .22);
}

.echo-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    color: #78a0c8;
    font-size: 12px;
    text-align: center;
}

.echo-device-card,
.echo-activity-card {
    padding: 18px 22px;
    min-height: 178px;
}

.echo-donut {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 20px 18px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
    background:
        radial-gradient(circle at center, #092448 0 47%, transparent 48%),
        conic-gradient(#13ead2 0 62%, #1f87e5 62% 92%, rgba(255,255,255,.12) 92% 100%);
}

.echo-donut span {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.echo-legend {
    display: inline-flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 20px;
    color: #c5ddf7;
    font-size: 13px;
}

.echo-legend span {
    display: flex;
    gap: 9px;
    min-width: 136px;
}

.echo-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    background: #11e7d0;
}

.echo-legend b {
    margin-left: auto;
    color: #ffffff;
}

.echo-activity-card ul {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.echo-activity-card li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.echo-activity-card li:last-child {
    border-bottom: 0;
}

.echo-activity-card li i {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(10, 236, 211, .12);
    border: 1px solid rgba(10,236,211,.16);
}

.echo-activity-card strong {
    display: block;
    color: #e6f2ff;
    font-size: 12px;
}

.echo-activity-card span {
    display: block;
    color: #79a2cc;
    font-size: 12px;
    margin-top: 2px;
}

.login-echo-right {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
        radial-gradient(circle at 95% 10%, rgba(28, 207, 230, .12), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
    overflow: hidden;
}

.login-echo-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 45, 85, .09) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: .5;
}

.login-echo-right::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -40px;
    width: 680px;
    height: 240px;
    border-top: 1px solid rgba(15, 201, 220, .22);
    border-radius: 50%;
    box-shadow:
        0 -14px 0 -13px rgba(15,201,220,.22),
        0 -28px 0 -27px rgba(15,201,220,.18),
        0 -42px 0 -41px rgba(15,201,220,.16),
        0 -56px 0 -55px rgba(15,201,220,.14);
    transform: rotate(-3deg);
}

.login-echo-form-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    padding: 56px 52px 42px;
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    border: 1px solid #dfe8f5;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

.login-echo-mini-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.login-echo-form-card h2 {
    margin: 0;
    text-align: center;
    color: #172033;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}

.login-echo-form-card > p {
    margin: 10px 0 34px;
    text-align: center;
    color: #7b8799;
    font-size: 15px;
}

.login-echo-form {
    display: flex;
    flex-direction: column;
}

.login-echo-form label {
    margin: 0 0 9px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 800;
}

.login-echo-input {
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d4deeb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0 14px;
    margin-bottom: 24px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.login-echo-input:focus-within {
    border-color: #10cfc0;
    box-shadow: 0 0 0 4px rgba(16, 207, 192, .10);
}

.login-echo-input svg {
    width: 20px;
    height: 20px;
    fill: #7b8799;
    flex: none;
}

.login-echo-input input {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    height: 100%;
    color: #111827;
    font-size: 15px;
    background: transparent !important;
}

.login-echo-input input::placeholder {
    color: #9aa6b5;
}

.login-echo-eye {
    width: 32px;
    height: 32px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-echo-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 30px;
    color: #526173;
    font-size: 14px;
}

.login-echo-remember {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    font-weight: 600 !important;
}

.login-echo-remember input {
    width: 16px;
    height: 16px;
    margin: 0 !important;
    accent-color: #11cfc2;
}

.login-echo-link {
    color: #0886ff;
    font-weight: 700;
    white-space: nowrap;
}

.login-echo-submit {
    width: 100% !important;
    height: 58px !important;
    border-radius: 12px !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #14e0cf, #08a9c9) !important;
    border: 0 !important;
    box-shadow: 0 14px 24px rgba(12, 177, 201, .22) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.login-echo-copy {
    margin-top: 34px;
    color: #718096;
    text-align: center;
    font-size: 13px;
}

.login-echo-copy strong {
    color: #0fcdbd;
}

.login-echo-error {
    margin: -12px 0 22px !important;
}

@media (max-width: 1120px) {
    .login-echo-shell {
        grid-template-columns: 1fr;
    }

    .login-echo-left {
        display: none;
    }

    .login-echo-right {
        padding: 24px;
    }

    .login-echo-form-card {
        padding: 42px 28px 32px;
    }
}

@media (max-width: 520px) {
    .login-echo-right {
        padding: 14px;
    }

    .login-echo-form-card {
        padding: 34px 20px 26px;
        border-radius: 20px;
    }

    .login-echo-form-card h2 {
        font-size: 24px;
    }

    .login-echo-options {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Motivo status - ajustes */
.motivo-modal-counter {
    min-width: 64px;
    text-align: right;
}


/* Login ajustes logo e campos */
.login-echo-brand-image {
    gap: 0 !important;
}

.login-echo-brand-image img {
    display: block;
    width: min(360px, 82%);
    max-height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 18px 38px rgba(0, 230, 210, .18));
}

.login-echo-mini-logo-image {
    margin-bottom: 20px !important;
}

.login-echo-mini-logo-image img {
    display: block;
    width: 190px;
    max-height: 92px;
    object-fit: contain;
    margin: 0 auto;
}

.login-echo-form .login-echo-input {
    background: #ffffff !important;
    background-color: #ffffff !important;
    overflow: hidden;
}

.login-echo-form .login-echo-input input,
.login-echo-form .login-echo-input input:-webkit-autofill,
.login-echo-form .login-echo-input input:-webkit-autofill:hover,
.login-echo-form .login-echo-input input:-webkit-autofill:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111827 !important;
    color: #111827 !important;
    border-radius: 0 !important;
}

.login-echo-form .login-echo-input svg,
.login-echo-form .login-echo-eye {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.login-echo-options,
.login-echo-remember,
.login-echo-link {
    display: none !important;
}

.login-echo-submit {
    margin-top: 6px !important;
}

@media (max-width: 1120px) {
    .login-echo-mini-logo-image img {
        width: 168px;
    }
}


/* Sistema de temas por usuário */
.theme-padrao {
    color-scheme: light;
}

body.theme-escuro-ciano,
body.theme-escuro-verde {
    --bg: #071522;
    --surface: #111f2d;
    --border: rgba(125, 211, 252, .20);
    --text: #e7f3ff;
    --muted: #9fb4c8;
    --muted-light: #7890a6;
    --shadow: 0 20px 60px rgba(0, 0, 0, .28);
    color-scheme: dark;
    background:
        radial-gradient(circle at 18% 0%, rgba(12, 216, 204, .13), transparent 26%),
        radial-gradient(circle at 100% 16%, rgba(37, 99, 235, .12), transparent 28%),
        linear-gradient(180deg, #081523 0%, #06111d 100%) !important;
}

body.theme-escuro-ciano {
    --primary: #22d3ee;
    --primary-2: #2563eb;
    --success: #2dd4bf;
    --danger: #fb7185;
    --warning: #fbbf24;
}

body.theme-escuro-verde {
    --primary: #34d399;
    --primary-2: #0f766e;
    --success: #22c55e;
    --danger: #f87171;
    --warning: #f59e0b;
    background:
        radial-gradient(circle at 20% 0%, rgba(52, 211, 153, .13), transparent 28%),
        radial-gradient(circle at 100% 20%, rgba(20, 184, 166, .10), transparent 28%),
        linear-gradient(180deg, #0b161d 0%, #071014 100%) !important;
}

body.theme-escuro-ciano .main,
body.theme-escuro-verde .main {
    background: transparent !important;
}

body.theme-escuro-ciano .panel,
body.theme-escuro-verde .panel,
body.theme-escuro-ciano .card,
body.theme-escuro-verde .card,
body.theme-escuro-ciano .chart-card,
body.theme-escuro-verde .chart-card,
body.theme-escuro-ciano .summary-card,
body.theme-escuro-verde .summary-card,
body.theme-escuro-ciano .login-card,
body.theme-escuro-verde .login-card {
    background: rgba(17, 31, 45, .88) !important;
    border-color: rgba(148, 196, 230, .18) !important;
    color: var(--text) !important;
    box-shadow: 0 20px 55px rgba(0,0,0,.22) !important;
}

body.theme-escuro-ciano .topbar,
body.theme-escuro-verde .topbar {
    background: rgba(9, 20, 32, .78) !important;
    border-color: rgba(148, 196, 230, .16) !important;
    backdrop-filter: blur(12px);
}

body.theme-escuro-ciano .sidebar,
body.theme-escuro-verde .sidebar {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 22%, transparent), transparent 36%),
        linear-gradient(180deg, #06101b 0%, #02070d 100%) !important;
}

body.theme-escuro-ciano table,
body.theme-escuro-verde table,
body.theme-escuro-ciano .table-wrapper,
body.theme-escuro-verde .table-wrapper {
    color: var(--text) !important;
}

body.theme-escuro-ciano table tbody tr,
body.theme-escuro-verde table tbody tr {
    background: rgba(15, 28, 42, .58) !important;
    border-color: rgba(148, 196, 230, .12) !important;
}

body.theme-escuro-ciano table th,
body.theme-escuro-verde table th {
    color: #b9d3ee !important;
}

body.theme-escuro-ciano input,
body.theme-escuro-ciano select,
body.theme-escuro-ciano textarea,
body.theme-escuro-verde input,
body.theme-escuro-verde select,
body.theme-escuro-verde textarea {
    background: rgba(7, 17, 28, .82) !important;
    border-color: rgba(148, 196, 230, .22) !important;
    color: var(--text) !important;
}

body.theme-escuro-ciano input::placeholder,
body.theme-escuro-ciano textarea::placeholder,
body.theme-escuro-verde input::placeholder,
body.theme-escuro-verde textarea::placeholder {
    color: #758ba1 !important;
}

body.theme-claro-teal,
body.theme-claro-roxo {
    color-scheme: light;
    --bg: #f8fbff;
    --surface: #ffffff;
    --border: #e4ebf5;
    --text: #11223c;
    --muted: #55657d;
    --muted-light: #8a99ad;
    --shadow: 0 18px 52px rgba(15, 23, 42, .07);
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .10), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%) !important;
}

body.theme-claro-teal {
    --primary: #0f8f9e;
    --primary-2: #14b8a6;
    --success: #0f8f7a;
    --danger: #f04b23;
    --warning: #f59e0b;
}

body.theme-claro-roxo {
    --primary: #5b35e5;
    --primary-2: #7c3aed;
    --success: #10b981;
    --danger: #ff3d6e;
    --warning: #f59e0b;
    background:
        radial-gradient(circle at 92% 3%, rgba(91, 53, 229, .10), transparent 28%),
        radial-gradient(circle at 10% 100%, rgba(255, 61, 110, .06), transparent 32%),
        linear-gradient(180deg, #fbfbff 0%, #f7f6ff 100%) !important;
}

body.theme-claro-teal .sidebar {
    background: linear-gradient(180deg, #004b5f 0%, #012f3d 100%) !important;
}

body.theme-claro-roxo .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f7f6ff 100%) !important;
    color: #53617e !important;
    border-right: 1px solid #e5e7f4;
}

body.theme-claro-roxo .sidebar a {
    color: #53617e !important;
}

body.theme-claro-roxo .sidebar a.active {
    background: rgba(91, 53, 229, .12) !important;
    color: #4f2de0 !important;
    border-color: rgba(91, 53, 229, .18) !important;
}

body.theme-claro-teal .panel,
body.theme-claro-roxo .panel,
body.theme-claro-teal .card,
body.theme-claro-roxo .card,
body.theme-claro-teal .chart-card,
body.theme-claro-roxo .chart-card,
body.theme-claro-teal .summary-card,
body.theme-claro-roxo .summary-card {
    background: rgba(255,255,255,.94) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow) !important;
}

body.theme-claro-teal .topbar,
body.theme-claro-roxo .topbar {
    background: rgba(255,255,255,.78) !important;
    border-color: var(--border) !important;
    backdrop-filter: blur(10px);
}

body.theme-claro-roxo .btn-primary,
body.theme-claro-roxo .login-echo-submit {
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
}

body.theme-claro-teal .btn-primary,
body.theme-claro-teal .login-echo-submit {
    background: linear-gradient(135deg, #14b8a6, #0f8f9e) !important;
}

body.theme-claro-teal .badge-danger,
body.theme-claro-roxo .badge-danger {
    background: color-mix(in srgb, var(--danger) 14%, #fff) !important;
    color: var(--danger) !important;
}

body.theme-escuro-ciano .badge-light,
body.theme-escuro-verde .badge-light {
    background: rgba(255,255,255,.08) !important;
    color: #dbeafe !important;
}

.theme-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.theme-preview-option {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-preview-swatch {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    flex: none;
    border: 1px solid rgba(0,0,0,.08);
}

.theme-preview-swatch.padrao { background: linear-gradient(135deg, #1164ff, #0097ff); }
.theme-preview-swatch.escuro_ciano { background: linear-gradient(135deg, #06152b, #22d3ee); }
.theme-preview-swatch.escuro_verde { background: linear-gradient(135deg, #071014, #34d399); }
.theme-preview-swatch.claro_teal { background: linear-gradient(135deg, #ffffff, #14b8a6); }
.theme-preview-swatch.claro_roxo { background: linear-gradient(135deg, #ffffff, #7c3aed); }
.theme-preview-swatch.black_blue { background: linear-gradient(135deg, #050f1f, #25d9ff); }

.theme-preview-option strong {
    display: block;
    font-size: 13px;
}

.theme-preview-option small {
    color: var(--muted);
}


/* Seletor discreto de tema na topbar */
.theme-selector-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-selector-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.theme-selector-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
    box-shadow: 0 14px 30px rgba(15, 23, 42, .10);
}

.theme-selector-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-selector-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 278px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    color: var(--text);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    z-index: 2500;
    display: none;
}

.theme-selector-panel.open {
    display: block;
    animation: themeSelectorIn .16s ease-out;
}

@keyframes themeSelectorIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.theme-selector-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 3px;
}

.theme-selector-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.theme-selector-option {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 13px;
    cursor: pointer;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
}

.theme-selector-option:hover {
    background: color-mix(in srgb, var(--primary) 9%, transparent);
}

.theme-selector-option.active {
    background: color-mix(in srgb, var(--primary) 13%, transparent);
    border-color: color-mix(in srgb, var(--primary) 26%, transparent);
}

.theme-selector-option strong {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.theme-selector-swatch {
    width: 26px;
    height: 26px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
}

.theme-selector-swatch.padrao { background: linear-gradient(135deg, #1164ff, #0097ff); }
.theme-selector-swatch.escuro_ciano { background: linear-gradient(135deg, #06152b 0%, #22d3ee 100%); }
.theme-selector-swatch.escuro_verde { background: linear-gradient(135deg, #071014 0%, #34d399 100%); }
.theme-selector-swatch.claro_teal { background: linear-gradient(135deg, #ffffff 0%, #14b8a6 100%); }
.theme-selector-swatch.claro_roxo { background: linear-gradient(135deg, #ffffff 0%, #7c3aed 100%); }
.theme-selector-swatch.black_blue { background: linear-gradient(135deg, #050f1f 0%, #25d9ff 100%); }

body.theme-escuro-ciano .theme-selector-panel,
body.theme-escuro-verde .theme-selector-panel {
    background: rgba(15, 28, 42, .96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
}

@media (max-width: 720px) {
    .theme-selector-panel {
        right: -72px;
        width: min(278px, calc(100vw - 28px));
    }
}


/* FIX seletor tema topbar discreto */
.theme-selector-wrapper {
    margin-left: 4px !important;
}

.theme-selector-btn {
    width: 30px !important;
    height: 30px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    opacity: .72;
}

.theme-selector-btn:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent) !important;
    color: var(--primary) !important;
    opacity: 1;
    transform: none !important;
    box-shadow: none !important;
}

.theme-selector-btn svg {
    width: 17px !important;
    height: 17px !important;
}

.theme-selector-panel {
    right: 0 !important;
    top: calc(100% + 10px) !important;
}

body.theme-escuro-ciano .theme-selector-btn,
body.theme-escuro-verde .theme-selector-btn {
    color: #b6c7d8 !important;
}

body.theme-escuro-ciano .theme-selector-btn:hover,
body.theme-escuro-verde .theme-selector-btn:hover {
    background: rgba(255,255,255,.07) !important;
    color: var(--primary) !important;
}


/* ============================================================
   Temas visuais aprimorados - layouts mais marcantes
   ============================================================ */

/* Base para transição suave */
body[class*="theme-"] .sidebar,
body[class*="theme-"] .topbar,
body[class*="theme-"] .panel,
body[class*="theme-"] .card,
body[class*="theme-"] .table-wrapper,
body[class*="theme-"] .summary-card,
body[class*="theme-"] .chart-card {
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

/* Modelo 1: Dashboard escuro ciano, estilo tech/glass */
body.theme-escuro-ciano {
    --bg: #06111f;
    --surface: #0e1c2c;
    --border: rgba(125, 211, 252, .18);
    --text: #e9f7ff;
    --muted: #a4bdd6;
    --muted-light: #7f9bb5;
    --primary: #22d3ee;
    --primary-2: #0ea5e9;
    --success: #2dd4bf;
    --danger: #fb7185;
    --warning: #fbbf24;
    --shadow: 0 24px 70px rgba(0,0,0,.30);
    background:
        radial-gradient(circle at 16% 0%, rgba(34, 211, 238, .18), transparent 27%),
        radial-gradient(circle at 96% 18%, rgba(59, 130, 246, .16), transparent 25%),
        linear-gradient(180deg, #06111f 0%, #030914 100%) !important;
}

body.theme-escuro-ciano .sidebar {
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, .28), transparent 35%),
        linear-gradient(180deg, #07182a 0%, #020817 100%) !important;
    border-right: 1px solid rgba(125, 211, 252, .12);
}

body.theme-escuro-ciano .topbar {
    background: rgba(7, 18, 32, .72) !important;
    border: 1px solid rgba(125, 211, 252, .15);
    border-radius: 22px;
    margin: 18px 22px 20px;
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 60px rgba(0,0,0,.18);
}

body.theme-escuro-ciano .panel,
body.theme-escuro-ciano .card,
body.theme-escuro-ciano .chart-card,
body.theme-escuro-ciano .summary-card {
    background:
        linear-gradient(180deg, rgba(15, 32, 50, .92), rgba(8, 20, 35, .88)) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

body.theme-escuro-ciano table tbody tr {
    background: rgba(9, 22, 38, .72) !important;
    box-shadow: inset 0 0 0 1px rgba(125,211,252,.08);
}

body.theme-escuro-ciano .btn-primary {
    background: linear-gradient(135deg, #22d3ee, #2563eb) !important;
    border-color: transparent !important;
}

/* Modelo 2: Dashboard escuro verde, estilo operacional */
body.theme-escuro-verde {
    --bg: #07110f;
    --surface: #0f1e19;
    --border: rgba(74, 222, 128, .17);
    --text: #edfdf5;
    --muted: #acc8bb;
    --muted-light: #7e9b8e;
    --primary: #34d399;
    --primary-2: #10b981;
    --success: #22c55e;
    --danger: #f87171;
    --warning: #f59e0b;
    --shadow: 0 24px 70px rgba(0,0,0,.30);
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 211, 153, .16), transparent 28%),
        radial-gradient(circle at 95% 18%, rgba(20, 184, 166, .10), transparent 28%),
        linear-gradient(180deg, #07110f 0%, #030806 100%) !important;
}

body.theme-escuro-verde .sidebar {
    background:
        radial-gradient(circle at 0% 0%, rgba(52, 211, 153, .26), transparent 34%),
        linear-gradient(180deg, #081611 0%, #020604 100%) !important;
}

body.theme-escuro-verde .topbar {
    background: rgba(8, 22, 17, .76) !important;
    border: 1px solid rgba(74, 222, 128, .16);
    border-radius: 22px;
    margin: 18px 22px 20px;
    backdrop-filter: blur(14px);
}

body.theme-escuro-verde .panel,
body.theme-escuro-verde .card,
body.theme-escuro-verde .chart-card,
body.theme-escuro-verde .summary-card {
    background:
        linear-gradient(180deg, rgba(14, 32, 25, .92), rgba(7, 19, 14, .90)) !important;
    border: 1px solid rgba(74, 222, 128, .15) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

body.theme-escuro-verde table tbody tr {
    background: rgba(8, 22, 17, .72) !important;
    box-shadow: inset 0 0 0 1px rgba(74,222,128,.07);
}

body.theme-escuro-verde .btn-primary {
    background: linear-gradient(135deg, #34d399, #0f766e) !important;
    border-color: transparent !important;
}

/* Ajustes comuns dos temas escuros */
body.theme-escuro-ciano .main,
body.theme-escuro-verde .main {
    background: transparent !important;
}

body.theme-escuro-ciano h1,
body.theme-escuro-ciano h2,
body.theme-escuro-ciano h3,
body.theme-escuro-ciano strong,
body.theme-escuro-verde h1,
body.theme-escuro-verde h2,
body.theme-escuro-verde h3,
body.theme-escuro-verde strong {
    color: var(--text) !important;
}

body.theme-escuro-ciano .muted,
body.theme-escuro-ciano small,
body.theme-escuro-ciano p,
body.theme-escuro-verde .muted,
body.theme-escuro-verde small,
body.theme-escuro-verde p {
    color: var(--muted) !important;
}

body.theme-escuro-ciano input,
body.theme-escuro-ciano select,
body.theme-escuro-ciano textarea,
body.theme-escuro-verde input,
body.theme-escuro-verde select,
body.theme-escuro-verde textarea {
    background: rgba(4, 12, 22, .82) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

body.theme-escuro-ciano .table-wrapper,
body.theme-escuro-verde .table-wrapper {
    color: var(--text) !important;
}

body.theme-escuro-ciano table th,
body.theme-escuro-verde table th {
    color: color-mix(in srgb, var(--primary) 56%, #ffffff) !important;
}

/* Modelo 3: Claro Teal, clean/saaS */
body.theme-claro-teal {
    --bg: #f4fbfc;
    --surface: #ffffff;
    --border: #dceef2;
    --text: #0e2533;
    --muted: #587082;
    --muted-light: #8ba0ad;
    --primary: #0f9aa8;
    --primary-2: #14b8a6;
    --success: #0f8f7a;
    --danger: #f04b23;
    --warning: #f59e0b;
    --shadow: 0 18px 55px rgba(15, 93, 110, .08);
    background:
        radial-gradient(circle at 96% 4%, rgba(20, 184, 166, .13), transparent 27%),
        linear-gradient(180deg, #fbffff 0%, #f2fbfd 100%) !important;
}

body.theme-claro-teal .sidebar {
    background:
        radial-gradient(circle at top left, rgba(20,184,166,.32), transparent 36%),
        linear-gradient(180deg, #004e60 0%, #012d38 100%) !important;
}

body.theme-claro-teal .topbar {
    background: rgba(255,255,255,.82) !important;
    border: 1px solid #dceef2;
    border-radius: 22px;
    margin: 18px 22px 20px;
    box-shadow: 0 18px 55px rgba(15, 93, 110, .07);
    backdrop-filter: blur(10px);
}

body.theme-claro-teal .panel,
body.theme-claro-teal .card,
body.theme-claro-teal .chart-card,
body.theme-claro-teal .summary-card {
    background: rgba(255,255,255,.96) !important;
    border: 1px solid #dceef2 !important;
    border-radius: 22px !important;
    box-shadow: var(--shadow) !important;
}

body.theme-claro-teal .btn-primary {
    background: linear-gradient(135deg, #14b8a6, #0f9aa8) !important;
    border-color: transparent !important;
}

/* Modelo 4: Claro Roxo, premium/soft */
body.theme-claro-roxo {
    --bg: #f8f7ff;
    --surface: #ffffff;
    --border: #e6e1fa;
    --text: #1c1833;
    --muted: #615b7a;
    --muted-light: #918ba9;
    --primary: #6d4aff;
    --primary-2: #9f5cff;
    --success: #10b981;
    --danger: #ff3d6e;
    --warning: #f59e0b;
    --shadow: 0 18px 55px rgba(81, 62, 164, .09);
    background:
        radial-gradient(circle at 92% 3%, rgba(109, 74, 255, .13), transparent 28%),
        radial-gradient(circle at 5% 100%, rgba(255, 61, 110, .07), transparent 30%),
        linear-gradient(180deg, #fdfcff 0%, #f7f5ff 100%) !important;
}

body.theme-claro-roxo .sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,245,255,.98) 100%) !important;
    color: #574f73 !important;
    border-right: 1px solid #e6e1fa;
}

body.theme-claro-roxo .sidebar a {
    color: #574f73 !important;
}

body.theme-claro-roxo .sidebar a.active {
    background: rgba(109, 74, 255, .12) !important;
    color: #5b35e5 !important;
    border-color: rgba(109, 74, 255, .18) !important;
}

body.theme-claro-roxo .topbar {
    background: rgba(255,255,255,.82) !important;
    border: 1px solid #e6e1fa;
    border-radius: 22px;
    margin: 18px 22px 20px;
    box-shadow: 0 18px 55px rgba(81, 62, 164, .08);
    backdrop-filter: blur(10px);
}

body.theme-claro-roxo .panel,
body.theme-claro-roxo .card,
body.theme-claro-roxo .chart-card,
body.theme-claro-roxo .summary-card {
    background: rgba(255,255,255,.96) !important;
    border: 1px solid #e6e1fa !important;
    border-radius: 22px !important;
    box-shadow: var(--shadow) !important;
}

body.theme-claro-roxo .btn-primary {
    background: linear-gradient(135deg, #9f5cff, #6d4aff) !important;
    border-color: transparent !important;
}

/* O tema padrão permanece exatamente como o layout atual */
body.theme-padrao {
    color-scheme: light;
}


/* ============================================================
   FIX contraste tabelas/grids por tema
   Garante legibilidade de textos, linhas, cabeçalhos e detalhes
   ============================================================ */

/* Base: todas as tabelas respeitam as variáveis do tema */
body[class*="theme-"] .table-wrapper {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

body[class*="theme-"] table {
    color: var(--text) !important;
    background: transparent !important;
}

body[class*="theme-"] table th,
body[class*="theme-"] table td {
    color: var(--text) !important;
    border-color: var(--border) !important;
}

body[class*="theme-"] table td strong,
body[class*="theme-"] table td b {
    color: var(--text) !important;
}

body[class*="theme-"] table td .muted,
body[class*="theme-"] table td small,
body[class*="theme-"] .muted {
    color: var(--muted) !important;
}

/* Tema padrão: mantém leitura atual */
body.theme-padrao .table-wrapper {
    background: #ffffff !important;
}

body.theme-padrao table th {
    background: #f8fbff !important;
    color: #52617c !important;
}

body.theme-padrao table td {
    background: #ffffff !important;
    color: #08142a !important;
}

/* Temas escuros: contraste forte */
body.theme-escuro-ciano .table-wrapper,
body.theme-escuro-verde .table-wrapper {
    background: rgba(10, 22, 34, .92) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 18px 48px rgba(0,0,0,.22) !important;
}

body.theme-escuro-ciano table thead th,
body.theme-escuro-verde table thead th {
    background: rgba(255,255,255,.055) !important;
    color: #dff6ff !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

body.theme-escuro-ciano table tbody tr,
body.theme-escuro-verde table tbody tr {
    background: rgba(7, 18, 30, .70) !important;
}

body.theme-escuro-ciano table tbody tr:nth-child(even),
body.theme-escuro-verde table tbody tr:nth-child(even) {
    background: rgba(255,255,255,.035) !important;
}

body.theme-escuro-ciano table tbody tr:hover,
body.theme-escuro-verde table tbody tr:hover {
    background: rgba(34, 211, 238, .10) !important;
}

body.theme-escuro-verde table tbody tr:hover {
    background: rgba(52, 211, 153, .10) !important;
}

body.theme-escuro-ciano table td,
body.theme-escuro-verde table td {
    color: #e7f3ff !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    background: transparent !important;
}

body.theme-escuro-ciano table td strong,
body.theme-escuro-ciano table td b,
body.theme-escuro-verde table td strong,
body.theme-escuro-verde table td b {
    color: #ffffff !important;
}

body.theme-escuro-ciano table td .muted,
body.theme-escuro-ciano table td small,
body.theme-escuro-verde table td .muted,
body.theme-escuro-verde table td small {
    color: #a6bbce !important;
}

/* Temas claros: fundo branco e texto escuro */
body.theme-claro-teal .table-wrapper,
body.theme-claro-roxo .table-wrapper {
    background: rgba(255,255,255,.98) !important;
    border: 1px solid var(--border) !important;
}

body.theme-claro-teal table thead th,
body.theme-claro-roxo table thead th {
    background: #f7fbff !important;
    color: #334155 !important;
    border-bottom: 1px solid var(--border) !important;
}

body.theme-claro-roxo table thead th {
    background: #faf8ff !important;
    color: #3b315f !important;
}

body.theme-claro-teal table tbody tr,
body.theme-claro-roxo table tbody tr {
    background: #ffffff !important;
}

body.theme-claro-teal table tbody tr:nth-child(even) {
    background: #f8fcfd !important;
}

body.theme-claro-roxo table tbody tr:nth-child(even) {
    background: #fbfaff !important;
}

body.theme-claro-teal table tbody tr:hover {
    background: #edfafa !important;
}

body.theme-claro-roxo table tbody tr:hover {
    background: #f2edff !important;
}

body.theme-claro-teal table td,
body.theme-claro-roxo table td {
    color: #172033 !important;
    border-bottom: 1px solid var(--border) !important;
    background: transparent !important;
}

body.theme-claro-teal table td strong,
body.theme-claro-teal table td b,
body.theme-claro-roxo table td strong,
body.theme-claro-roxo table td b {
    color: #0f172a !important;
}

body.theme-claro-teal table td .muted,
body.theme-claro-teal table td small,
body.theme-claro-roxo table td .muted,
body.theme-claro-roxo table td small {
    color: #64748b !important;
}

/* Linhas de detalhes, tabelas internas e boxes expandidos */
body[class*="theme-"] .detalhes-unificados-row td,
body[class*="theme-"] .cliente-integracoes-row td {
    background: transparent !important;
}

body.theme-escuro-ciano .detalhes-unificados-box,
body.theme-escuro-ciano .cliente-integracoes-box,
body.theme-escuro-ciano .atributo-card,
body.theme-escuro-verde .detalhes-unificados-box,
body.theme-escuro-verde .cliente-integracoes-box,
body.theme-escuro-verde .atributo-card {
    background: rgba(255,255,255,.045) !important;
    border-color: rgba(255,255,255,.10) !important;
    color: #e7f3ff !important;
}

body.theme-claro-teal .detalhes-unificados-box,
body.theme-claro-teal .cliente-integracoes-box,
body.theme-claro-teal .atributo-card,
body.theme-claro-roxo .detalhes-unificados-box,
body.theme-claro-roxo .cliente-integracoes-box,
body.theme-claro-roxo .atributo-card {
    background: #ffffff !important;
    border-color: var(--border) !important;
    color: #172033 !important;
}

body[class*="theme-"] .nested-table th,
body[class*="theme-"] .nested-table td {
    color: var(--text) !important;
}

body.theme-escuro-ciano .nested-table th,
body.theme-escuro-verde .nested-table th {
    background: rgba(255,255,255,.06) !important;
    color: #dff6ff !important;
}

body.theme-claro-teal .nested-table th,
body.theme-claro-roxo .nested-table th {
    background: #f8fafc !important;
    color: #334155 !important;
}

/* Badges com contraste fixo */
body.theme-escuro-ciano .badge,
body.theme-escuro-verde .badge {
    border: 1px solid rgba(255,255,255,.10) !important;
}

body.theme-escuro-ciano .badge-light,
body.theme-escuro-verde .badge-light {
    background: rgba(255,255,255,.08) !important;
    color: #e7f3ff !important;
}

body.theme-escuro-ciano .badge-info {
    background: rgba(34, 211, 238, .16) !important;
    color: #9eefff !important;
}

body.theme-escuro-verde .badge-info {
    background: rgba(52, 211, 153, .16) !important;
    color: #bbf7d0 !important;
}

body.theme-escuro-ciano .badge-success,
body.theme-escuro-verde .badge-success {
    background: rgba(34, 197, 94, .18) !important;
    color: #bbf7d0 !important;
}

body.theme-escuro-ciano .badge-danger,
body.theme-escuro-verde .badge-danger {
    background: rgba(248, 113, 113, .16) !important;
    color: #fecaca !important;
}

body.theme-escuro-ciano .badge-warning,
body.theme-escuro-verde .badge-warning {
    background: rgba(251, 191, 36, .18) !important;
    color: #fde68a !important;
}

body.theme-claro-teal .badge-light,
body.theme-claro-roxo .badge-light {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

body.theme-claro-teal .badge-info {
    background: #e6fffb !important;
    color: #0f766e !important;
}

body.theme-claro-roxo .badge-info {
    background: #f0e9ff !important;
    color: #5b35e5 !important;
}

body.theme-claro-teal .badge-success,
body.theme-claro-roxo .badge-success {
    background: #dcfce7 !important;
    color: #15803d !important;
}

body.theme-claro-teal .badge-danger,
body.theme-claro-roxo .badge-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* Menus de ação nas tabelas */
body.theme-escuro-ciano .action-menu-dropdown,
body.theme-escuro-verde .action-menu-dropdown {
    background: #101f31 !important;
    border-color: rgba(255,255,255,.12) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.36) !important;
}

body.theme-escuro-ciano .action-menu-item,
body.theme-escuro-verde .action-menu-item {
    color: #e7f3ff !important;
}

body.theme-escuro-ciano .action-menu-item:hover {
    background: rgba(34,211,238,.10) !important;
}

body.theme-escuro-verde .action-menu-item:hover {
    background: rgba(52,211,153,.10) !important;
}

body.theme-claro-teal .action-menu-dropdown,
body.theme-claro-roxo .action-menu-dropdown {
    background: #ffffff !important;
    border-color: var(--border) !important;
}

body.theme-claro-teal .action-menu-item,
body.theme-claro-roxo .action-menu-item {
    color: #172033 !important;
}

/* Inputs dentro das tabelas, checkboxes e botões */
body.theme-escuro-ciano table input,
body.theme-escuro-ciano table select,
body.theme-escuro-ciano table textarea,
body.theme-escuro-verde table input,
body.theme-escuro-verde table select,
body.theme-escuro-verde table textarea {
    background: rgba(4, 12, 22, .90) !important;
    color: #e7f3ff !important;
    border-color: rgba(255,255,255,.14) !important;
}

body.theme-claro-teal table input,
body.theme-claro-teal table select,
body.theme-claro-teal table textarea,
body.theme-claro-roxo table input,
body.theme-claro-roxo table select,
body.theme-claro-roxo table textarea {
    background: #ffffff !important;
    color: #172033 !important;
    border-color: #cbd5e1 !important;
}

/* Correção para cards de resumo/grids que usam texto direto */
body.theme-escuro-ciano .panel *,
body.theme-escuro-verde .panel * {
    border-color: rgba(255,255,255,.10);
}

body.theme-escuro-ciano .panel .btn,
body.theme-escuro-ciano .panel .badge,
body.theme-escuro-verde .panel .btn,
body.theme-escuro-verde .panel .badge {
    color: inherit;
}

body.theme-claro-teal .panel *,
body.theme-claro-roxo .panel * {
    border-color: var(--border);
}


/* ============================================================
   FIX final temas: topo, dropdown acima dos cards e contraste
   ============================================================ */

/* Remove a faixa branca no topo garantindo fundo do viewport inteiro */
html {
    background: var(--bg);
}

body.theme-escuro-ciano,
body.theme-escuro-verde,
body.theme-claro-teal,
body.theme-claro-roxo,
body.theme-padrao {
    min-height: 100vh;
}

body.theme-escuro-ciano::before,
body.theme-escuro-verde::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body.theme-escuro-ciano::before {
    background:
        radial-gradient(circle at 16% 0%, rgba(34, 211, 238, .18), transparent 27%),
        radial-gradient(circle at 96% 18%, rgba(59, 130, 246, .16), transparent 25%),
        linear-gradient(180deg, #06111f 0%, #030914 100%);
}

body.theme-escuro-verde::before {
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 211, 153, .16), transparent 28%),
        radial-gradient(circle at 95% 18%, rgba(20, 184, 166, .10), transparent 28%),
        linear-gradient(180deg, #07110f 0%, #030806 100%);
}

/* Dropdown de tema sempre acima dos cards */
body[class*="theme-"] .topbar {
    position: relative !important;
    z-index: 9000 !important;
    overflow: visible !important;
}

body[class*="theme-"] .topbar-actions {
    position: relative !important;
    z-index: 9100 !important;
    overflow: visible !important;
}

.theme-selector-wrapper {
    position: relative !important;
    z-index: 9200 !important;
}

.theme-selector-panel {
    z-index: 99999 !important;
}

body[class*="theme-"] .main,
body[class*="theme-"] .cards,
body[class*="theme-"] .panel,
body[class*="theme-"] .metric-card,
body[class*="theme-"] .chart-card,
body[class*="theme-"] .table-wrapper {
    position: relative;
}

/* Cards do resumo/index: os nomes reais são metric-card */
body.theme-escuro-ciano .metric-card,
body.theme-escuro-verde .metric-card {
    background:
        linear-gradient(180deg, rgba(15, 32, 50, .94), rgba(8, 20, 35, .92)) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04) !important;
    color: #e7f3ff !important;
}

body.theme-escuro-verde .metric-card {
    background:
        linear-gradient(180deg, rgba(14, 32, 25, .94), rgba(7, 19, 14, .92)) !important;
    border-color: rgba(74, 222, 128, .15) !important;
}

body.theme-escuro-ciano .metric-card *,
body.theme-escuro-verde .metric-card * {
    color: inherit;
}

body.theme-escuro-ciano .metric-card h1,
body.theme-escuro-ciano .metric-card h2,
body.theme-escuro-ciano .metric-card h3,
body.theme-escuro-ciano .metric-card strong,
body.theme-escuro-ciano .metric-card .metric-value,
body.theme-escuro-ciano .metric-card .metric-number,
body.theme-escuro-ciano .metric-card .value,
body.theme-escuro-verde .metric-card h1,
body.theme-escuro-verde .metric-card h2,
body.theme-escuro-verde .metric-card h3,
body.theme-escuro-verde .metric-card strong,
body.theme-escuro-verde .metric-card .metric-value,
body.theme-escuro-verde .metric-card .metric-number,
body.theme-escuro-verde .metric-card .value {
    color: #ffffff !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.12);
}

body.theme-escuro-ciano .metric-card span,
body.theme-escuro-ciano .metric-card small,
body.theme-escuro-ciano .metric-card p,
body.theme-escuro-ciano .metric-card label,
body.theme-escuro-verde .metric-card span,
body.theme-escuro-verde .metric-card small,
body.theme-escuro-verde .metric-card p,
body.theme-escuro-verde .metric-card label {
    color: #b6c7d8 !important;
}

body.theme-escuro-ciano .metric-card.total,
body.theme-escuro-ciano .metric-card.success,
body.theme-escuro-ciano .metric-card.corrected {
    border-color: rgba(34, 211, 238, .24) !important;
}

body.theme-escuro-verde .metric-card.total,
body.theme-escuro-verde .metric-card.success,
body.theme-escuro-verde .metric-card.corrected {
    border-color: rgba(52, 211, 153, .24) !important;
}

body.theme-escuro-ciano .metric-card.danger,
body.theme-escuro-verde .metric-card.danger {
    border-color: rgba(248, 113, 113, .26) !important;
}

body.theme-escuro-ciano .metric-card.pending,
body.theme-escuro-verde .metric-card.pending {
    border-color: rgba(251, 191, 36, .24) !important;
}

/* Cards claros: evita número branco em card branco */
body.theme-claro-teal .metric-card,
body.theme-claro-roxo .metric-card,
body.theme-padrao .metric-card {
    background: rgba(255,255,255,.97) !important;
    color: #172033 !important;
}

body.theme-claro-teal .metric-card *,
body.theme-claro-roxo .metric-card *,
body.theme-padrao .metric-card * {
    color: inherit;
}

body.theme-claro-teal .metric-card h1,
body.theme-claro-teal .metric-card h2,
body.theme-claro-teal .metric-card h3,
body.theme-claro-teal .metric-card strong,
body.theme-claro-teal .metric-card .metric-value,
body.theme-claro-teal .metric-card .metric-number,
body.theme-claro-teal .metric-card .value,
body.theme-claro-roxo .metric-card h1,
body.theme-claro-roxo .metric-card h2,
body.theme-claro-roxo .metric-card h3,
body.theme-claro-roxo .metric-card strong,
body.theme-claro-roxo .metric-card .metric-value,
body.theme-claro-roxo .metric-card .metric-number,
body.theme-claro-roxo .metric-card .value,
body.theme-padrao .metric-card h1,
body.theme-padrao .metric-card h2,
body.theme-padrao .metric-card h3,
body.theme-padrao .metric-card strong,
body.theme-padrao .metric-card .metric-value,
body.theme-padrao .metric-card .metric-number,
body.theme-padrao .metric-card .value {
    color: #101827 !important;
}

body.theme-claro-teal .metric-card span,
body.theme-claro-teal .metric-card small,
body.theme-claro-teal .metric-card p,
body.theme-claro-teal .metric-card label,
body.theme-claro-roxo .metric-card span,
body.theme-claro-roxo .metric-card small,
body.theme-claro-roxo .metric-card p,
body.theme-claro-roxo .metric-card label,
body.theme-padrao .metric-card span,
body.theme-padrao .metric-card small,
body.theme-padrao .metric-card p,
body.theme-padrao .metric-card label {
    color: #53627a !important;
}

/* Ícones dos cards com cor preservada e legível */
body[class*="theme-"] .metric-card .metric-icon,
body[class*="theme-"] .metric-card .card-icon,
body[class*="theme-"] .metric-card .icon {
    color: var(--primary) !important;
}

body.theme-escuro-ciano .metric-card.danger .metric-icon,
body.theme-escuro-ciano .metric-card.danger .card-icon,
body.theme-escuro-ciano .metric-card.danger .icon,
body.theme-escuro-verde .metric-card.danger .metric-icon,
body.theme-escuro-verde .metric-card.danger .card-icon,
body.theme-escuro-verde .metric-card.danger .icon,
body.theme-claro-teal .metric-card.danger .metric-icon,
body.theme-claro-teal .metric-card.danger .card-icon,
body.theme-claro-teal .metric-card.danger .icon,
body.theme-claro-roxo .metric-card.danger .metric-icon,
body.theme-claro-roxo .metric-card.danger .card-icon,
body.theme-claro-roxo .metric-card.danger .icon {
    color: var(--danger) !important;
}

body.theme-escuro-ciano .metric-card.pending .metric-icon,
body.theme-escuro-ciano .metric-card.pending .card-icon,
body.theme-escuro-ciano .metric-card.pending .icon,
body.theme-escuro-verde .metric-card.pending .metric-icon,
body.theme-escuro-verde .metric-card.pending .card-icon,
body.theme-escuro-verde .metric-card.pending .icon,
body.theme-claro-teal .metric-card.pending .metric-icon,
body.theme-claro-teal .metric-card.pending .card-icon,
body.theme-claro-teal .metric-card.pending .icon,
body.theme-claro-roxo .metric-card.pending .metric-icon,
body.theme-claro-roxo .metric-card.pending .card-icon,
body.theme-claro-roxo .metric-card.pending .icon {
    color: var(--warning) !important;
}

/* Títulos dos painéis e cards */
body.theme-escuro-ciano .panel-header h2,
body.theme-escuro-ciano .chart-card-header h2,
body.theme-escuro-ciano .chart-card-header h3,
body.theme-escuro-ciano .panel h2,
body.theme-escuro-ciano .panel h3,
body.theme-escuro-verde .panel-header h2,
body.theme-escuro-verde .chart-card-header h2,
body.theme-escuro-verde .chart-card-header h3,
body.theme-escuro-verde .panel h2,
body.theme-escuro-verde .panel h3 {
    color: #ffffff !important;
}

body.theme-claro-teal .panel-header h2,
body.theme-claro-teal .chart-card-header h2,
body.theme-claro-teal .chart-card-header h3,
body.theme-claro-teal .panel h2,
body.theme-claro-teal .panel h3,
body.theme-claro-roxo .panel-header h2,
body.theme-claro-roxo .chart-card-header h2,
body.theme-claro-roxo .chart-card-header h3,
body.theme-claro-roxo .panel h2,
body.theme-claro-roxo .panel h3 {
    color: #101827 !important;
}

/* Painel do tema: legibilidade independente do tema */
.theme-selector-panel {
    background: #0d1b2a !important;
    color: #eaf6ff !important;
    border-color: rgba(125, 211, 252, .20) !important;
    box-shadow: 0 26px 70px rgba(0,0,0,.36) !important;
}

.theme-selector-title,
.theme-selector-option span,
.theme-selector-option {
    color: #eaf6ff !important;
}

.theme-selector-subtitle {
    color: #a9bfd2 !important;
}

.theme-selector-option:hover,
.theme-selector-option.active {
    background: rgba(34, 211, 238, .12) !important;
}

.theme-selector-option strong {
    color: #7dd3fc !important;
}

/* Ajuste para evitar elementos posteriores cobrirem popups/dropdowns */
.notification-panel,
.action-menu-dropdown,
.theme-selector-panel,
.monitoria-toast-container {
    z-index: 99999 !important;
}


/* ============================================================
   FIX tema Claro Teal + Claro Roxo
   - corrige visibilidade da topbar
   - corrige contraste do menu lateral
   ============================================================ */

body.theme-claro-teal {
    --bg: #eff9f8;
    background:
        radial-gradient(circle at 0% 0%, rgba(20,184,166,.12), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(15,143,158,.08), transparent 26%),
        linear-gradient(180deg, #f7fcfc 0%, #edf8f8 100%) !important;
}

body.theme-claro-teal .topbar {
    background: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(15, 143, 158, .12) !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08) !important;
    color: #0f172a !important;
}

body.theme-claro-teal .topbar h1,
body.theme-claro-teal .topbar .brand-title,
body.theme-claro-teal .topbar-left h1 {
    color: #10233d !important;
}

body.theme-claro-teal .topbar p,
body.theme-claro-teal .topbar .brand-subtitle,
body.theme-claro-teal .topbar-left p {
    color: #6b7b92 !important;
}

body.theme-claro-teal .user-info strong {
    color: #10233d !important;
}

body.theme-claro-teal .user-info small {
    color: #6b7b92 !important;
}

body.theme-claro-teal .notification-bell-btn,
body.theme-claro-teal .theme-selector-btn {
    background: rgba(255,255,255,.98) !important;
    color: #0f8f9e !important;
    border-color: #cfe3e5 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06) !important;
}

body.theme-claro-teal .notification-bell-btn:hover,
body.theme-claro-teal .theme-selector-btn:hover {
    background: #f7ffff !important;
    border-color: #9ad7d7 !important;
}

body.theme-claro-teal .sidebar {
    background: linear-gradient(180deg, #024356 0%, #012a35 100%) !important;
    border-right: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.04) !important;
}

body.theme-claro-teal .sidebar .brand-title,
body.theme-claro-teal .sidebar .brand p,
body.theme-claro-teal .sidebar .brand-subtitle,
body.theme-claro-teal .sidebar a,
body.theme-claro-teal .sidebar .nav-label,
body.theme-claro-teal .sidebar .nav-text {
    color: #eafcff !important;
}

body.theme-claro-teal .sidebar a.active {
    background: rgba(20, 184, 166, .18) !important;
    color: #ffffff !important;
    border-color: rgba(110, 231, 183, .18) !important;
}

body.theme-claro-teal .sidebar a:hover {
    background: rgba(255,255,255,.08) !important;
    color: #ffffff !important;
}

body.theme-claro-roxo {
    --bg: #f8f6ff;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, .10), transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(99, 102, 241, .08), transparent 28%),
        linear-gradient(180deg, #fcfbff 0%, #f5f3ff 100%) !important;
}

body.theme-claro-roxo .topbar {
    background: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(91, 53, 229, .10) !important;
    box-shadow: 0 18px 48px rgba(91, 53, 229, .08) !important;
    color: #1b1534 !important;
}

body.theme-claro-roxo .topbar h1,
body.theme-claro-roxo .topbar .brand-title,
body.theme-claro-roxo .topbar-left h1 {
    color: #241b46 !important;
}

body.theme-claro-roxo .topbar p,
body.theme-claro-roxo .topbar .brand-subtitle,
body.theme-claro-roxo .topbar-left p {
    color: #6e6791 !important;
}

body.theme-claro-roxo .user-info strong {
    color: #241b46 !important;
}

body.theme-claro-roxo .user-info small {
    color: #7c74a0 !important;
}

body.theme-claro-roxo .notification-bell-btn,
body.theme-claro-roxo .theme-selector-btn {
    background: rgba(255,255,255,.98) !important;
    color: #5b35e5 !important;
    border-color: #ddd3fb !important;
    box-shadow: 0 10px 24px rgba(91, 53, 229, .08) !important;
}

body.theme-claro-roxo .notification-bell-btn:hover,
body.theme-claro-roxo .theme-selector-btn:hover {
    background: #faf7ff !important;
    border-color: #c9b6ff !important;
}

body.theme-claro-roxo .sidebar {
    background: linear-gradient(180deg, #32215f 0%, #231742 100%) !important;
    color: #ebe7ff !important;
    border-right: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.04) !important;
}

body.theme-claro-roxo .sidebar .brand-title,
body.theme-claro-roxo .sidebar .brand p,
body.theme-claro-roxo .sidebar .brand-subtitle,
body.theme-claro-roxo .sidebar a,
body.theme-claro-roxo .sidebar .nav-label,
body.theme-claro-roxo .sidebar .nav-text {
    color: #ebe7ff !important;
}

body.theme-claro-roxo .sidebar a.active {
    background: rgba(124, 58, 237, .22) !important;
    color: #ffffff !important;
    border-color: rgba(196, 181, 253, .14) !important;
}

body.theme-claro-roxo .sidebar a:hover {
    background: rgba(255,255,255,.08) !important;
    color: #ffffff !important;
}

body.theme-claro-roxo .metric-card,
body.theme-claro-teal .metric-card {
    background: rgba(255,255,255,.97) !important;
}

body.theme-claro-roxo .topbar .monitor-logo,
body.theme-claro-teal .topbar .monitor-logo {
    filter: none !important;
}


/* ============================================================
   FIX hover tema padrão + faixa superior temas claros
   ============================================================ */

/* Corrige a faixa branca no topo nos temas Claro Teal e Claro Roxo.
   O html não herda variáveis do body, então forçamos o fundo do viewport. */
html:has(body.theme-claro-teal) {
    background:
        radial-gradient(circle at 0% 0%, rgba(20,184,166,.12), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(15,143,158,.08), transparent 26%),
        linear-gradient(180deg, #f7fcfc 0%, #edf8f8 100%) !important;
}

html:has(body.theme-claro-roxo) {
    background:
        radial-gradient(circle at 100% 0%, rgba(124,58,237,.10), transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(99,102,241,.08), transparent 28%),
        linear-gradient(180deg, #fcfbff 0%, #f5f3ff 100%) !important;
}

html:has(body.theme-escuro-ciano) {
    background: #06111f !important;
}

html:has(body.theme-escuro-verde) {
    background: #07110f !important;
}

/* Fallback extra para evitar qualquer filete branco causado por fundo do browser */
body.theme-claro-teal,
body.theme-claro-roxo {
    margin: 0 !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

body.theme-claro-teal::after,
body.theme-claro-roxo::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: -8px;
    height: 14px;
    z-index: -1;
    pointer-events: none;
}

body.theme-claro-teal::after {
    background: #f7fcfc;
}

body.theme-claro-roxo::after {
    background: #fcfbff;
}

/* Hover nas grids/tabelas do tema padrão */
body.theme-padrao table tbody tr {
    transition: background-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

body.theme-padrao table tbody tr:hover {
    background: #eef6ff !important;
    box-shadow: inset 4px 0 0 #1164ff, inset 0 0 0 9999px rgba(17, 100, 255, .035) !important;
}

body.theme-padrao table tbody tr:hover td {
    background: transparent !important;
    color: #07162d !important;
}

body.theme-padrao table tbody tr:hover td strong,
body.theme-padrao table tbody tr:hover td b {
    color: #06152b !important;
}

body.theme-padrao table tbody tr:hover .muted,
body.theme-padrao table tbody tr:hover small {
    color: #41536f !important;
}

/* Também aplica hover em tabelas internas/detalhes no tema padrão */
body.theme-padrao .nested-table tbody tr:hover,
body.theme-padrao .detalhes-unificados-box table tbody tr:hover,
body.theme-padrao .cliente-integracoes-box table tbody tr:hover {
    background: #f1f7ff !important;
    box-shadow: inset 3px 0 0 #0097ff !important;
}

/* Garante que linhas de detalhe abertas não fiquem estranhas no hover */
body.theme-padrao .detalhes-unificados-row:hover,
body.theme-padrao .cliente-integracoes-row:hover {
    background: transparent !important;
    box-shadow: none !important;
}

body.theme-padrao .detalhes-unificados-row:hover td,
body.theme-padrao .cliente-integracoes-row:hover td {
    background: transparent !important;
}


/* ============================================================
   FIX menu lateral expandido acima do topo
   ============================================================ */

/* Estrutura base */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 12000 !important;
    overflow: visible !important;
}

.main-content,
.main,
.content,
.dashboard-content {
    position: relative;
    z-index: 1;
}

/* Topbar fica abaixo do menu lateral expandido */
.topbar {
    position: relative !important;
    z-index: 9000 !important;
}

/* Quando o menu estiver expandido/hover, ele deve sobrepor o topo */
.sidebar:hover,
.sidebar.expanded,
.sidebar.is-expanded,
.sidebar.open {
    z-index: 13000 !important;
    overflow: visible !important;
}

/* Itens/popups internos do menu */
.sidebar .nav,
.sidebar .sidebar-nav,
.sidebar .menu,
.sidebar .menu-list,
.sidebar .brand,
.sidebar .sidebar-footer {
    position: relative;
    z-index: 13010 !important;
}

.sidebar a,
.sidebar .nav-link,
.sidebar .menu-link {
    position: relative;
    z-index: 13020 !important;
}

/* Se existir tooltip/label flutuante no menu */
.sidebar .tooltip,
.sidebar [role="tooltip"],
.sidebar .menu-tooltip,
.sidebar .nav-tooltip {
    z-index: 13050 !important;
}

/* Garante que o conteúdo não corte a sobreposição */
.page-wrapper,
.layout-wrapper,
.app-wrapper,
.dashboard-wrapper {
    overflow: visible !important;
}


/* =========================================================
   TEMA BLACK BLUE
   inspirado no layout dark blue solicitado pelo usuário
   ========================================================= */
body.theme-black-blue {
    --primary: #35d9ff;
    --secondary: #5d76ff;
    --success: #2de1c2;
    --danger: #8a7cff;
    --warning: #35d9ff;
    --text-dark: #f2f8ff;
    --muted: #9eb6cf;
    --shadow: 0 20px 40px rgba(0, 0, 0, .28);
    background:
        radial-gradient(circle at top left, rgba(0, 223, 255, .10), transparent 28%),
        radial-gradient(circle at top right, rgba(93, 118, 255, .08), transparent 22%),
        linear-gradient(180deg, #061326 0%, #07182f 46%, #07162a 100%);
    color: #eef6ff;
}

body.theme-black-blue,
body.theme-black-blue .main,
body.theme-black-blue .app-shell {
    color: #eef6ff;
}

body.theme-black-blue .main {
    background: transparent;
}

body.theme-black-blue .sidebar {
    background: linear-gradient(180deg, rgba(4, 18, 37, .98) 0%, rgba(3, 13, 28, .98) 100%);
    border-right: 1px solid rgba(58, 215, 255, .14);
    box-shadow: inset -1px 0 0 rgba(72, 217, 255, .06), 10px 0 40px rgba(1, 10, 24, .32);
}

body.theme-black-blue .sidebar-brand {
    background: linear-gradient(180deg, rgba(8, 29, 55, .78), rgba(3, 18, 37, .55));
    border: 1px solid rgba(59, 220, 255, .16);
    box-shadow: 0 16px 28px rgba(2, 10, 26, .26);
}

body.theme-black-blue .sidebar .brand-text strong,
body.theme-black-blue .sidebar .brand-text span,
body.theme-black-blue .sidebar nav a,
body.theme-black-blue .sidebar nav a .menu-text,
body.theme-black-blue .sidebar nav a .menu-icon,
body.theme-black-blue .sidebar nav a svg {
    color: #dbeafe;
    fill: none;
    stroke: currentColor;
}

body.theme-black-blue .sidebar nav a {
    color: #cfe4ff;
    border: 1px solid transparent;
}

body.theme-black-blue .sidebar nav a:hover,
body.theme-black-blue .sidebar nav a.active {
    background: linear-gradient(90deg, rgba(11, 111, 170, .35), rgba(20, 211, 255, .15));
    border-color: rgba(54, 219, 255, .32);
    box-shadow: 0 0 0 1px rgba(47, 211, 255, .09) inset, 0 8px 18px rgba(0, 0, 0, .18);
}

body.theme-black-blue .topbar {
    background: linear-gradient(90deg, rgba(4, 20, 42, .96) 0%, rgba(3, 18, 40, .94) 48%, rgba(5, 32, 72, .88) 100%);
    border: 1px solid rgba(55, 220, 255, .16);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

body.theme-black-blue .topbar h1,
body.theme-black-blue .topbar strong,
body.theme-black-blue .panel-header h2,
body.theme-black-blue .chart-card-header h3,
body.theme-black-blue .section-title,
body.theme-black-blue h2,
body.theme-black-blue h3 {
    color: #f3f9ff;
}

body.theme-black-blue .topbar p,
body.theme-black-blue .topbar small,
body.theme-black-blue .muted,
body.theme-black-blue .app-footer,
body.theme-black-blue .axis-label,
body.theme-black-blue .chart-legend-top span,
body.theme-black-blue .legend-row span,
body.theme-black-blue .empty-chart,
body.theme-black-blue .panel-subtitle,
body.theme-black-blue label,
body.theme-black-blue .filters-applied-help,
body.theme-black-blue .auto-refresh-pill {
    color: #a6bdd4;
}

body.theme-black-blue .user-info strong,
body.theme-black-blue .user-info small,
body.theme-black-blue .notification-bell-btn,
body.theme-black-blue .theme-selector-btn {
    color: #ebf7ff;
}

body.theme-black-blue .notification-bell-btn,
body.theme-black-blue .theme-selector-btn {
    background: rgba(10, 27, 53, .65);
    border: 1px solid rgba(65, 218, 255, .18);
}

body.theme-black-blue .notification-bell-btn:hover,
body.theme-black-blue .theme-selector-btn:hover {
    background: rgba(14, 38, 72, .88);
    border-color: rgba(61, 222, 255, .34);
}

body.theme-black-blue .notification-bell-btn svg,
body.theme-black-blue .theme-selector-btn svg {
    stroke: currentColor;
    fill: none;
}

body.theme-black-blue .notification-bell-count {
    background: linear-gradient(135deg, #2fe2ff, #23b7ff);
    color: #05233d;
}

body.theme-black-blue .avatar {
    background: linear-gradient(135deg, #5c6dff 0%, #7c56ff 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(76, 79, 255, .32);
}

body.theme-black-blue .theme-selector-panel,
body.theme-black-blue .notification-panel {
    background: linear-gradient(180deg, rgba(7, 22, 44, .98), rgba(5, 18, 36, .98));
    border: 1px solid rgba(55, 220, 255, .16);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
    color: #eff7ff;
}

body.theme-black-blue .theme-selector-title,
body.theme-black-blue .notification-panel-title {
    color: #f4fbff;
}

body.theme-black-blue .theme-selector-subtitle,
body.theme-black-blue .notification-panel-subtitle {
    color: #9eb6cf;
}

body.theme-black-blue .theme-selector-option {
    color: #e8f4ff;
    border: 1px solid rgba(255,255,255,.04);
}

body.theme-black-blue .theme-selector-option:hover,
body.theme-black-blue .theme-selector-option.active {
    background: linear-gradient(90deg, rgba(23, 91, 150, .34), rgba(35, 217, 255, .14));
    border-color: rgba(65, 218, 255, .18);
}

body.theme-black-blue .metric-card,
body.theme-black-blue .panel,
body.theme-black-blue .chart-card,
body.theme-black-blue .summary-card,
body.theme-black-blue .table-wrapper,
body.theme-black-blue .login-card {
    background: linear-gradient(180deg, rgba(8, 28, 53, .94), rgba(6, 20, 40, .94));
    border: 1px solid rgba(56, 220, 255, .14);
    box-shadow: 0 18px 36px rgba(2, 10, 24, .24);
}

body.theme-black-blue .metric-card {
    min-height: 136px;
    border-radius: 20px;
}

body.theme-black-blue .metric-card span,
body.theme-black-blue .metric-card small {
    color: #b7c9da !important;
}

body.theme-black-blue .metric-card strong {
    color: #f8fbff !important;
}

body.theme-black-blue .metric-card.total::before {
    background: linear-gradient(135deg, rgba(55, 184, 255, .36), rgba(65, 217, 255, .18));
    color: #7ed8ff;
}

body.theme-black-blue .metric-card.success::before {
    background: linear-gradient(135deg, rgba(45, 225, 194, .36), rgba(41, 178, 183, .18));
    color: #6ff5df;
}

body.theme-black-blue .metric-card.danger::before {
    background: linear-gradient(135deg, rgba(138, 124, 255, .36), rgba(86, 82, 235, .20));
    color: #b6abff;
}

body.theme-black-blue .metric-card.pending::before,
body.theme-black-blue .metric-card.pendente::before {
    background: linear-gradient(135deg, rgba(53, 217, 255, .34), rgba(48, 138, 255, .18)) !important;
    color: #80e7ff !important;
    border-color: rgba(53, 217, 255, .16) !important;
}

body.theme-black-blue .metric-card.corrected::before {
    background: linear-gradient(135deg, rgba(81, 153, 255, .36), rgba(56, 104, 255, .18));
    color: #8dc7ff;
}

body.theme-black-blue .panel-header,
body.theme-black-blue .chart-card-header {
    border-bottom-color: rgba(76, 217, 255, .10);
}

body.theme-black-blue .btn,
body.theme-black-blue button,
body.theme-black-blue .btn-light,
body.theme-black-blue .btn-primary,
body.theme-black-blue .login-echo-submit {
    border-radius: 12px;
}

body.theme-black-blue .btn-primary,
body.theme-black-blue .login-echo-submit,
body.theme-black-blue .btn-search {
    background: linear-gradient(90deg, #39dbff 0%, #1cb9ff 100%);
    color: #04253b;
    border: 0;
    box-shadow: 0 14px 28px rgba(40, 191, 255, .18);
}

body.theme-black-blue .btn-primary:hover,
body.theme-black-blue .login-echo-submit:hover,
body.theme-black-blue .btn-search:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body.theme-black-blue .btn-light,
body.theme-black-blue .btn-secondary,
body.theme-black-blue .chart-period-tabs a,
body.theme-black-blue .status-chip {
    background: rgba(9, 31, 59, .88);
    color: #dcecff;
    border: 1px solid rgba(67, 221, 255, .16);
}

body.theme-black-blue .chart-period-tabs a.active {
    background: linear-gradient(90deg, rgba(60, 218, 255, .95), rgba(28, 185, 255, .95));
    color: #06233f;
    border-color: transparent;
}

body.theme-black-blue input,
body.theme-black-blue select,
body.theme-black-blue textarea,
body.theme-black-blue .select2-selection,
body.theme-black-blue .multi-status-filter {
    background: rgba(6, 22, 44, .86) !important;
    color: #eef8ff !important;
    border: 1px solid rgba(66, 223, 255, .18) !important;
}

body.theme-black-blue input::placeholder,
body.theme-black-blue textarea::placeholder {
    color: #7f9bb7;
}

body.theme-black-blue .filters-applied,
body.theme-black-blue .filter-chip,
body.theme-black-blue .applied-chip {
    background: rgba(9, 31, 59, .72);
    border-color: rgba(67, 221, 255, .12);
    color: #dcecff;
}

body.theme-black-blue .table-wrapper,
body.theme-black-blue table {
    background: transparent;
}

body.theme-black-blue table thead tr,
body.theme-black-blue table thead th {
    background: rgba(6, 22, 44, .82);
    color: #dff2ff;
    border-bottom-color: rgba(75, 218, 255, .14);
}

body.theme-black-blue table tbody tr {
    background: rgba(7, 25, 48, .74);
    border-color: rgba(75, 218, 255, .10);
}

body.theme-black-blue table tbody tr:hover,
body.theme-black-blue .nested-table tbody tr:hover,
body.theme-black-blue .detalhes-unificados-row:hover,
body.theme-black-blue .cliente-integracoes-row:hover {
    background: linear-gradient(90deg, rgba(12, 66, 105, .34), rgba(22, 171, 212, .14)) !important;
}

body.theme-black-blue table td,
body.theme-black-blue table td strong,
body.theme-black-blue table td b,
body.theme-black-blue .legend-row strong,
body.theme-black-blue .donut-center strong,
body.theme-black-blue .donut-center span {
    color: #eff8ff;
}

body.theme-black-blue .badge-light,
body.theme-black-blue .badge-info,
body.theme-black-blue .badge-success,
body.theme-black-blue .badge-danger,
body.theme-black-blue .badge-pendente {
    border-color: transparent;
}

body.theme-black-blue .badge-pendente { background: rgba(53, 217, 255, .18); color: #93ebff; }
body.theme-black-blue .badge-success { background: rgba(45, 225, 194, .18); color: #86f6e6; }
body.theme-black-blue .badge-danger { background: rgba(138, 124, 255, .18); color: #d0c9ff; }
body.theme-black-blue .badge-info { background: rgba(65, 126, 255, .18); color: #a8c8ff; }
body.theme-black-blue .badge-light { background: rgba(15, 40, 72, .92); color: #e7f3ff; }

body.theme-black-blue .grid-line {
    stroke: rgba(102, 141, 180, .22);
}
body.theme-black-blue .line-success { stroke: #2ad8ff; }
body.theme-black-blue .line-error { stroke: #8a7cff; }
body.theme-black-blue .line-fixed { stroke: #4ea3ff; }
body.theme-black-blue .line-pending { stroke: #36dbc3; }
body.theme-black-blue .dot-success { fill: #2ad8ff; stroke: #09111f; }
body.theme-black-blue .dot-error { fill: #8a7cff; stroke: #09111f; }
body.theme-black-blue .dot-fixed { fill: #4ea3ff; stroke: #09111f; }
body.theme-black-blue .dot-pending { fill: #36dbc3; stroke: #09111f; }

body.theme-black-blue .donut {
    box-shadow: inset 0 0 0 1px rgba(80, 219, 255, .08), 0 16px 30px rgba(0, 0, 0, .18);
}

body.theme-black-blue .donut-center {
    background: linear-gradient(180deg, rgba(7, 23, 46, 1), rgba(6, 18, 37, 1));
    color: #f1f9ff;
}

body.theme-black-blue .empty-chart {
    background: rgba(7, 25, 48, .78);
    border: 1px dashed rgba(80, 219, 255, .16);
}

body.theme-black-blue .app-footer {
    border-top: 1px solid rgba(80, 219, 255, .12);
}

body.theme-black-blue .auto-refresh-pill {
    background: rgba(9, 31, 59, .85);
    border: 1px solid rgba(67, 221, 255, .12);
}

body.theme-black-blue .auto-refresh-dot {
    background: #36dbc3;
    box-shadow: 0 0 0 4px rgba(54, 219, 195, .16);
}


/* =========================================================
   BLACK BLUE EXATO - layout especial inspirado na imagem
   ========================================================= */
body.theme-black-blue {
    background:
        radial-gradient(circle at top left, rgba(30, 211, 255, .12), transparent 22%),
        radial-gradient(circle at top right, rgba(79, 100, 255, .10), transparent 20%),
        linear-gradient(180deg, #051325 0%, #07172e 55%, #07172d 100%);
    color: #f0f8ff;
}
body.theme-black-blue::before { content:none !important; }
body.theme-black-blue .main { padding-top: 22px; }
body.theme-black-blue .sidebar.sidebar-black-blue { width: 214px; }
body.theme-black-blue .sidebar.sidebar-black-blue .sidebar-brand.blackblue-brand {
    display:flex; align-items:center; justify-content:center; padding:22px 18px 18px;
    background: rgba(9, 24, 46, .65); border:1px solid rgba(58,219,255,.14); border-radius: 18px;
    margin: 14px 12px 20px; box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
body.theme-black-blue .sidebar.sidebar-black-blue .brand-logo-full { width: 164px; max-width:100%; display:block; }
body.theme-black-blue .sidebar.sidebar-black-blue nav { gap: 10px; padding: 0 12px 12px; }
body.theme-black-blue .sidebar.sidebar-black-blue nav a {
    min-height: 56px; border-radius: 16px; padding: 0 18px; font-size: 17px; font-weight: 600;
    background: transparent; color:#d7ebff; border:1px solid transparent; gap:16px;
}
body.theme-black-blue .sidebar.sidebar-black-blue nav a:hover,
body.theme-black-blue .sidebar.sidebar-black-blue nav a.active {
    background: linear-gradient(90deg, rgba(12,95,147,.45), rgba(29,205,255,.12));
    border-color: rgba(60, 220, 255, .24);
    box-shadow: inset 0 0 0 1px rgba(63,220,255,.06), 0 10px 18px rgba(0,0,0,.18);
}
body.theme-black-blue .sidebar.sidebar-black-blue nav a .menu-icon { width: 26px; height: 26px; }
body.theme-black-blue .sidebar.sidebar-black-blue nav a .menu-text { font-size: 16px; }

body.theme-black-blue .topbar.blackblue-topbar {
    align-items: center; border-radius: 22px; padding: 22px 26px; margin-bottom: 22px;
    background: linear-gradient(90deg, rgba(4,18,40,.96) 0%, rgba(3,15,35,.92) 48%, rgba(6,35,76,.88) 100%);
    border: 1px solid rgba(72,219,255,.12);
}
body.theme-black-blue .topbar.blackblue-topbar .monitor-logo { width: 56px; height: 56px; }
body.theme-black-blue .topbar.blackblue-topbar .cloud-shape { transform: scale(1.05); }
body.theme-black-blue .topbar.blackblue-topbar .topbar-eyebrow {
    font-size: 14px; font-weight: 700; color: #36ddff; margin-bottom: 4px; text-transform:none;
}
body.theme-black-blue .topbar.blackblue-topbar h1 { font-size: 34px; line-height:1.08; margin:0; color:#ffffff; }
body.theme-black-blue .topbar.blackblue-topbar p { font-size: 16px; color:#c7d8eb; margin-top:6px; }
body.theme-black-blue .topbar.blackblue-topbar .topbar-extra-actions { margin-right: 10px; }
body.theme-black-blue .blackblue-export-btn {
    background: transparent; color:#36ddff; border:1px solid rgba(56,220,255,.36); padding: 12px 18px;
    border-radius: 12px; box-shadow:none; font-weight:700;
}
body.theme-black-blue .blackblue-export-btn:hover { background: rgba(31, 198, 242, .12); color:#7cecff; }

body.theme-black-blue .blackblue-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
body.theme-black-blue .blackblue-metric-card {
    position: relative; overflow: hidden; display:flex; align-items:center; gap:18px;
    padding: 20px 22px; min-height: 138px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94));
    border: 1px solid rgba(79, 209, 255, .16);
}
body.theme-black-blue .blackblue-metric-card::before { content:none !important; }
body.theme-black-blue .blackblue-card-icon {
    width: 72px; height: 72px; border-radius: 24px; display:flex; align-items:center; justify-content:center;
    font-size: 34px; font-weight: 700; flex: 0 0 72px; border: 1px solid transparent;
}
body.theme-black-blue .blackblue-metric-card.success .blackblue-card-icon { background: rgba(37, 219, 194, .16); color:#45f1d7; }
body.theme-black-blue .blackblue-metric-card.error .blackblue-card-icon { background: rgba(125, 115, 255, .18); color:#9d92ff; }
body.theme-black-blue .blackblue-metric-card.pending .blackblue-card-icon { background: rgba(53, 217, 255, .14); color:#72e5ff; }
body.theme-black-blue .blackblue-metric-card.total .blackblue-card-icon { background: rgba(60, 135, 255, .18); color:#91c6ff; }
body.theme-black-blue .blackblue-card-content { display:flex; flex-direction:column; gap:6px; width:100%; }
body.theme-black-blue .blackblue-card-content > span { color:#eef5ff; font-size: 16px; font-weight: 600; }
body.theme-black-blue .blackblue-card-content > strong { color:#ffffff; font-size: 54px; line-height: 1; letter-spacing: -.03em; }
body.theme-black-blue .blackblue-card-meta-row { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-top: 2px; }
body.theme-black-blue .blackblue-card-content small.variation { font-size: 14px; font-weight:500; color:#9fc3e8 !important; }
body.theme-black-blue .blackblue-card-content small.variation.up { color:#55e7ff !important; }
body.theme-black-blue .blackblue-card-content small.variation.down { color:#9e91ff !important; }
body.theme-black-blue .blackblue-card-spark { width: 60px; height: 26px; display:inline-flex; align-items:flex-end; }
body.theme-black-blue .blackblue-card-spark svg { width:100%; height:100%; fill:none; stroke-width: 2.2; stroke-linecap:round; stroke-linejoin:round; }
body.theme-black-blue .blackblue-card-spark.up svg { stroke: #36ddff; }
body.theme-black-blue .blackblue-card-spark.down svg { stroke: #8c7dff; }
body.theme-black-blue .blackblue-card-spark.flat svg { stroke: #56d9da; }

body.theme-black-blue .blackblue-filters-panel {
    padding: 22px 24px; border-radius: 22px; margin-bottom: 22px;
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94));
}
body.theme-black-blue .blackblue-panel-header { margin-bottom: 18px; }
body.theme-black-blue .blackblue-filter-form { width:100%; }
body.theme-black-blue .blackblue-form-grid {
    display:grid; grid-template-columns: 1.05fr 1.05fr 1.35fr 1.35fr .9fr .9fr; gap: 16px; align-items:end;
}
body.theme-black-blue .blackblue-form-grid .field-group { display:flex; flex-direction:column; gap:8px; }
body.theme-black-blue .blackblue-form-grid .field-group.actions { align-self:end; }
body.theme-black-blue .blackblue-form-grid .field-group label { font-size: 14px; font-weight: 600; color:#dcecff; }
body.theme-black-blue .blackblue-form-grid input,
body.theme-black-blue .blackblue-form-grid select {
    height: 50px; border-radius: 12px; font-size:15px;
    background: rgba(5, 22, 45, .88) !important; color:#f2f8ff !important;
    border: 1px solid rgba(68, 221, 255, .14) !important;
}
body.theme-black-blue .blackblue-form-grid .btn-search { width:100%; height:50px; border-radius: 12px; }

body.theme-black-blue .blackblue-dashboard-grid {
    display:grid; grid-template-columns: 1.18fr 1.05fr 1.18fr; gap: 22px; margin-bottom: 18px;
}
body.theme-black-blue .blackblue-chart-card {
    min-height: 460px; border-radius: 22px; padding: 0; overflow:hidden;
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94));
}
body.theme-black-blue .blackblue-chart-card .chart-card-header {
    padding: 20px 22px 8px; min-height: 66px;
}
body.theme-black-blue .blackblue-chart-card .chart-card-header h3 { font-size: 17px; }
body.theme-black-blue .chart-period-tabs a {
    background: rgba(7, 23, 45, .96); color:#cfe3f7; border-color: rgba(75,219,255,.10);
}
body.theme-black-blue .chart-period-tabs a.active {
    background: linear-gradient(90deg, #2edbff 0%, #19c3ff 100%); color:#05243d;
}
body.theme-black-blue .blackblue-chart-card svg text,
body.theme-black-blue .blackblue-chart-card .axis-label,
body.theme-black-blue .blackblue-chart-card .chart-legend-top span,
body.theme-black-blue .blackblue-chart-card .legend-row span { fill:#cfe0f3; color:#cfe0f3; }
body.theme-black-blue .blackblue-chart-card .grid-line { stroke: rgba(173, 205, 238, .15); }
body.theme-black-blue .blackblue-chart-card .line-success { stroke:#35d9ff; }
body.theme-black-blue .blackblue-chart-card .dot-success { fill:#35d9ff; stroke:#061326; }
body.theme-black-blue .blackblue-chart-card .line-error { stroke:#8b7cff; }
body.theme-black-blue .blackblue-chart-card .dot-error { fill:#8b7cff; stroke:#061326; }
body.theme-black-blue .blackblue-chart-card .line-fixed { stroke:#4b7dff; }
body.theme-black-blue .blackblue-chart-card .dot-fixed { fill:#4b7dff; stroke:#061326; }
body.theme-black-blue .blackblue-chart-card .line-pending { stroke:#2ad3c1; }
body.theme-black-blue .blackblue-chart-card .dot-pending { fill:#2ad3c1; stroke:#061326; }
body.theme-black-blue .blackblue-chart-card .donut-center { background: #0b1e3a; }
body.theme-black-blue .blackblue-chart-card .donut-center strong,
body.theme-black-blue .blackblue-chart-card .donut-center span { color:#ffffff; }

body.theme-black-blue .blackblue-recent-card { min-height: 460px; }
body.theme-black-blue .blackblue-view-all { color:#35ddff; font-weight:600; text-decoration:none; }
body.theme-black-blue .blackblue-view-all:hover { color:#7cecff; }
body.theme-black-blue .blackblue-mini-table-wrap { padding: 0 18px 18px; }
body.theme-black-blue .blackblue-mini-table { width:100%; border-collapse: collapse; }
body.theme-black-blue .blackblue-mini-table thead th {
    background: rgba(4, 18, 38, .88); color:#bfe4ff; font-size: 13px; padding: 12px 14px;
}
body.theme-black-blue .blackblue-mini-table tbody tr { background: rgba(9, 30, 57, .68); }
body.theme-black-blue .blackblue-mini-table tbody tr:hover { background: rgba(18, 54, 97, .76) !important; }
body.theme-black-blue .blackblue-mini-table td { color:#ebf6ff; padding: 12px 14px; font-size: 14px; }
body.theme-black-blue .blackblue-mini-table td:nth-child(3) { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.theme-black-blue .blackblue-mini-table .badge-danger { background: rgba(192, 71, 115, .24); color:#ff90b0; }

@media (max-width: 1450px) {
    body.theme-black-blue .blackblue-dashboard-grid { grid-template-columns: 1fr 1fr; }
    body.theme-black-blue .blackblue-recent-card { grid-column: 1 / -1; min-height: auto; }
    body.theme-black-blue .blackblue-form-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
    body.theme-black-blue .blackblue-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
    body.theme-black-blue .blackblue-dashboard-grid { grid-template-columns: 1fr; }
    body.theme-black-blue .blackblue-chart-card { min-height: auto; }
    body.theme-black-blue .blackblue-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
    body.theme-black-blue .topbar.blackblue-topbar h1 { font-size: 28px; }
    body.theme-black-blue .blackblue-cards { grid-template-columns: 1fr; }
    body.theme-black-blue .blackblue-form-grid { grid-template-columns: 1fr; }
    body.theme-black-blue .blackblue-card-content > strong { font-size: 42px; }
}


/* =========================================================
   BLACK BLUE - correções de contraste e encaixe
   ========================================================= */
body.theme-black-blue .blackblue-metric-card.pending,
body.theme-black-blue .metric-card.blackblue-metric-card.pending,
body.theme-black-blue .blackblue-metric-card.pendente {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    color: #f0f8ff !important;
    border: 1px solid rgba(79, 209, 255, .16) !important;
}
body.theme-black-blue .blackblue-metric-card.pending span,
body.theme-black-blue .blackblue-metric-card.pending strong,
body.theme-black-blue .blackblue-metric-card.pending small,
body.theme-black-blue .blackblue-metric-card.pendente span,
body.theme-black-blue .blackblue-metric-card.pendente strong,
body.theme-black-blue .blackblue-metric-card.pendente small {
    color: inherit !important;
}
body.theme-black-blue .blackblue-metric-card {
    min-height: 118px !important;
    padding: 16px 18px !important;
    gap: 14px !important;
}
body.theme-black-blue .blackblue-card-icon {
    width: 64px !important;
    height: 64px !important;
    flex-basis: 64px !important;
    border-radius: 20px !important;
    font-size: 30px !important;
}
body.theme-black-blue .blackblue-card-content > span {
    font-size: 14px !important;
    line-height: 1.2 !important;
}
body.theme-black-blue .blackblue-card-content > strong {
    font-size: 28px !important;
    line-height: 1.05 !important;
    margin-top: 2px !important;
}
body.theme-black-blue .blackblue-card-content small.variation {
    font-size: 12px !important;
    line-height: 1.2 !important;
}
body.theme-black-blue .blackblue-card-spark {
    width: 42px !important;
    height: 18px !important;
    flex: 0 0 42px !important;
}
body.theme-black-blue .blackblue-cards {
    gap: 14px !important;
}

body.theme-black-blue .blackblue-chart-card .chart-card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
body.theme-black-blue .blackblue-chart-card .chart-card-header h3 {
    max-width: calc(100% - 210px);
}
body.theme-black-blue .blackblue-chart-card .chart-period-tabs {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow: visible !important;
    max-width: 100% !important;
    white-space: normal !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}
body.theme-black-blue .blackblue-chart-card .chart-period-tabs a {
    min-width: 0 !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 999px !important;
}

body.theme-black-blue .blackblue-chart-card .table-wrapper,
body.theme-black-blue .blackblue-chart-card .blackblue-mini-table-wrap {
    background: transparent !important;
}
body.theme-black-blue .blackblue-mini-table,
body.theme-black-blue .blackblue-mini-table thead,
body.theme-black-blue .blackblue-mini-table tbody,
body.theme-black-blue .blackblue-mini-table tr,
body.theme-black-blue .blackblue-mini-table th,
body.theme-black-blue .blackblue-mini-table td {
    background: transparent !important;
}
body.theme-black-blue .blackblue-mini-table thead th {
    background: rgba(4, 18, 38, .92) !important;
    color: #bfe4ff !important;
    border-bottom: 1px solid rgba(102, 182, 255, .16) !important;
}
body.theme-black-blue .blackblue-mini-table tbody tr {
    background: rgba(9, 30, 57, .82) !important;
}
body.theme-black-blue .blackblue-mini-table tbody td {
    color: #ebf6ff !important;
    border-bottom: 1px solid rgba(102, 182, 255, .12) !important;
}
body.theme-black-blue .blackblue-mini-table tbody tr:hover {
    background: rgba(18, 54, 97, .92) !important;
}
body.theme-black-blue .blackblue-mini-table tbody td.empty {
    color: #9ec6ea !important;
    text-align: center !important;
}

body.theme-black-blue .blackblue-chart-card .donut-wrap {
    align-items: center !important;
}
body.theme-black-blue .blackblue-chart-card .donut-legend {
    max-width: 47% !important;
}
body.theme-black-blue .blackblue-chart-card .donut-wrap svg {
    max-width: 52% !important;
}

@media (max-width: 1550px) {
    body.theme-black-blue .blackblue-form-grid {
        grid-template-columns: 1fr 1fr 1.2fr 1.2fr .8fr .9fr !important;
    }
}
@media (max-width: 1320px) {
    body.theme-black-blue .blackblue-card-content > strong {
        font-size: 24px !important;
    }
    body.theme-black-blue .blackblue-card-content > span {
        font-size: 13px !important;
    }
    body.theme-black-blue .blackblue-chart-card .chart-card-header h3 {
        max-width: 100%;
    }
}


/* =========================================================
   BLACK BLUE - Monitoria e troca de tema
   ========================================================= */

/* Monitoria: reforço visual geral */
body.theme-black-blue .filters,
body.theme-black-blue .monitoria-filters,
body.theme-black-blue .filter-panel,
body.theme-black-blue .user-form-grid,
body.theme-black-blue .status-filter-panel,
body.theme-black-blue .applied-filters,
body.theme-black-blue .filtros-aplicados {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    border-color: rgba(79,209,255,.16) !important;
    color: #eef8ff !important;
}

body.theme-black-blue .filters label,
body.theme-black-blue .monitoria-filters label,
body.theme-black-blue .filter-panel label,
body.theme-black-blue .user-form-grid label,
body.theme-black-blue .status-filter-panel label {
    color: #dcecff !important;
}

body.theme-black-blue .filters input,
body.theme-black-blue .filters select,
body.theme-black-blue .filters textarea,
body.theme-black-blue .monitoria-filters input,
body.theme-black-blue .monitoria-filters select,
body.theme-black-blue .monitoria-filters textarea,
body.theme-black-blue .filter-panel input,
body.theme-black-blue .filter-panel select,
body.theme-black-blue .filter-panel textarea,
body.theme-black-blue .user-form-grid input,
body.theme-black-blue .user-form-grid select,
body.theme-black-blue .user-form-grid textarea {
    background: rgba(5, 22, 45, .92) !important;
    color: #f2f8ff !important;
    border-color: rgba(68,221,255,.18) !important;
    box-shadow: none !important;
}

body.theme-black-blue .filters input::placeholder,
body.theme-black-blue .filters textarea::placeholder,
body.theme-black-blue .monitoria-filters input::placeholder,
body.theme-black-blue .monitoria-filters textarea::placeholder,
body.theme-black-blue .filter-panel input::placeholder,
body.theme-black-blue .filter-panel textarea::placeholder {
    color: #88a7c4 !important;
}

/* Cards da Monitoria */
body.theme-black-blue .metric-card:not(.blackblue-metric-card),
body.theme-black-blue .card:not(.blackblue-metric-card),
body.theme-black-blue .summary-card {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    border-color: rgba(79,209,255,.16) !important;
    color: #eef8ff !important;
}

body.theme-black-blue .metric-card:not(.blackblue-metric-card) span,
body.theme-black-blue .metric-card:not(.blackblue-metric-card) small,
body.theme-black-blue .card:not(.blackblue-metric-card) span,
body.theme-black-blue .card:not(.blackblue-metric-card) small,
body.theme-black-blue .summary-card span,
body.theme-black-blue .summary-card small {
    color: #b7c9da !important;
}

body.theme-black-blue .metric-card:not(.blackblue-metric-card) strong,
body.theme-black-blue .card:not(.blackblue-metric-card) strong,
body.theme-black-blue .summary-card strong {
    color: #ffffff !important;
}

body.theme-black-blue .metric-card.pending:not(.blackblue-metric-card),
body.theme-black-blue .metric-card.pendente:not(.blackblue-metric-card),
body.theme-black-blue .card-pendente {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    color: #eef8ff !important;
    border-color: rgba(53,217,255,.20) !important;
}

body.theme-black-blue .metric-card.pending:not(.blackblue-metric-card)::before,
body.theme-black-blue .metric-card.pendente:not(.blackblue-metric-card)::before,
body.theme-black-blue .card-pendente::before {
    background: rgba(53,217,255,.14) !important;
    color: #72e5ff !important;
    border-color: rgba(53,217,255,.18) !important;
}

/* Tabelas e grids na Monitoria */
body.theme-black-blue .table-wrapper,
body.theme-black-blue .logs-table-wrapper,
body.theme-black-blue .monitoria-table-wrapper {
    background: linear-gradient(180deg, rgba(7,24,48,.96), rgba(5,18,38,.94)) !important;
    border-color: rgba(79,209,255,.16) !important;
    color: #eef8ff !important;
}

body.theme-black-blue table,
body.theme-black-blue table thead,
body.theme-black-blue table tbody {
    background: transparent !important;
    color: #eef8ff !important;
}

body.theme-black-blue table thead tr,
body.theme-black-blue table thead th {
    background: rgba(4,18,38,.94) !important;
    color: #bfe4ff !important;
    border-bottom: 1px solid rgba(102,182,255,.16) !important;
}

body.theme-black-blue table tbody tr {
    background: rgba(9,30,57,.78) !important;
    border-color: rgba(102,182,255,.10) !important;
}

body.theme-black-blue table tbody tr:nth-child(even) {
    background: rgba(7,26,52,.86) !important;
}

body.theme-black-blue table tbody tr:hover {
    background: linear-gradient(90deg, rgba(12,66,105,.42), rgba(22,171,212,.16)) !important;
}

body.theme-black-blue table td {
    background: transparent !important;
    color: #ebf6ff !important;
    border-bottom: 1px solid rgba(102,182,255,.10) !important;
}

body.theme-black-blue table td strong,
body.theme-black-blue table td b {
    color: #ffffff !important;
}

body.theme-black-blue table td small,
body.theme-black-blue table td .muted {
    color: #9ec6ea !important;
}

body.theme-black-blue .row-error,
body.theme-black-blue tr.row-error {
    background: rgba(80, 37, 88, .40) !important;
}

body.theme-black-blue .row-error:hover,
body.theme-black-blue tr.row-error:hover {
    background: rgba(94, 46, 106, .58) !important;
}

/* Detalhes expandidos */
body.theme-black-blue .detalhes-unificados-row td,
body.theme-black-blue .cliente-integracoes-row td {
    background: rgba(5,18,38,.96) !important;
    border-color: rgba(79,209,255,.12) !important;
}

body.theme-black-blue .detalhes-unificados-box,
body.theme-black-blue .cliente-integracoes-box,
body.theme-black-blue .atributo-card,
body.theme-black-blue .detalhes-section,
body.theme-black-blue .log-comunicacao-card {
    background: rgba(7,24,48,.94) !important;
    border-color: rgba(79,209,255,.14) !important;
    color: #eef8ff !important;
}

body.theme-black-blue .detalhes-section-title {
    color: #35d9ff !important;
}

/* Autocomplete/multiselect/sugestões */
body.theme-black-blue .autocomplete-box,
body.theme-black-blue .autocomplete-list,
body.theme-black-blue .suggestions,
body.theme-black-blue .dropdown-list,
body.theme-black-blue .selected-list,
body.theme-black-blue .multi-select-panel {
    background: #071a34 !important;
    border-color: rgba(79,209,255,.18) !important;
    color: #eef8ff !important;
    box-shadow: 0 22px 54px rgba(0,0,0,.34) !important;
}

body.theme-black-blue .autocomplete-box *,
body.theme-black-blue .autocomplete-list *,
body.theme-black-blue .suggestions *,
body.theme-black-blue .dropdown-list *,
body.theme-black-blue .selected-list *,
body.theme-black-blue .multi-select-panel * {
    color: #eef8ff !important;
}

body.theme-black-blue .autocomplete-item:hover,
body.theme-black-blue .suggestion-item:hover,
body.theme-black-blue .dropdown-item:hover {
    background: rgba(35,190,240,.14) !important;
}

/* Badges e status */
body.theme-black-blue .badge,
body.theme-black-blue .status-badge {
    border-color: transparent !important;
    font-weight: 800 !important;
}

body.theme-black-blue .badge-pendente,
body.theme-black-blue .badge-warning {
    background: rgba(53,217,255,.18) !important;
    color: #93ebff !important;
}

body.theme-black-blue .badge-success {
    background: rgba(45,225,194,.18) !important;
    color: #86f6e6 !important;
}

body.theme-black-blue .badge-danger {
    background: rgba(138,124,255,.20) !important;
    color: #d0c9ff !important;
}

body.theme-black-blue .badge-info {
    background: rgba(65,126,255,.18) !important;
    color: #a8c8ff !important;
}

body.theme-black-blue .badge-light {
    background: rgba(15,40,72,.92) !important;
    color: #e7f3ff !important;
}

/* Menus de ação da grid */
body.theme-black-blue .log-action-menu,
body.theme-black-blue .action-menu-dropdown {
    background: #071a34 !important;
    border-color: rgba(79,209,255,.18) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.40) !important;
}

body.theme-black-blue .action-menu-btn,
body.theme-black-blue .action-menu-item {
    color: #eef8ff !important;
}

body.theme-black-blue .action-menu-item:hover {
    background: rgba(35,190,240,.14) !important;
}

/* Modal motivo */
body.theme-black-blue .motivo-modal-card {
    background: linear-gradient(180deg, rgba(10,30,57,.98), rgba(7,22,45,.98)) !important;
    color: #eef8ff !important;
    border: 1px solid rgba(79,209,255,.18) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.48) !important;
}

body.theme-black-blue .motivo-modal-card h2,
body.theme-black-blue .motivo-modal-card label,
body.theme-black-blue .motivo-modal-card strong {
    color: #ffffff !important;
}

body.theme-black-blue .motivo-modal-card p,
body.theme-black-blue .motivo-modal-counter {
    color: #b7c9da !important;
}

body.theme-black-blue .motivo-modal-card textarea {
    background: rgba(5,22,45,.92) !important;
    color: #f2f8ff !important;
    border-color: rgba(68,221,255,.22) !important;
}

/* Alertas */
body.theme-black-blue .alert,
body.theme-black-blue .alert-success,
body.theme-black-blue .alert-danger {
    background: rgba(9,31,59,.88) !important;
    border-color: rgba(79,209,255,.16) !important;
    color: #eef8ff !important;
}

/* Troca de tema: evita resquício visual em layouts diferentes enquanto recarrega */
body.theme-black-blue.theme-changing,
body.theme-changing {
    cursor: progress !important;
}


/* =========================================================
   BLACK BLUE - Monitoria hotfix visual v2
   ========================================================= */
body.theme-black-blue .panel,
body.theme-black-blue .selected-filters-panel,
body.theme-black-blue .selected-filters,
body.theme-black-blue .selected-filters-panel .muted,
body.theme-black-blue #selected-filters,
body.theme-black-blue .filter-chip,
body.theme-black-blue .filter-chip.status,
body.theme-black-blue .filter-chip.integration {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    border-color: rgba(79,209,255,.16) !important;
    color: #eef8ff !important;
}

body.theme-black-blue .selected-filters-panel strong,
body.theme-black-blue .selected-filters-panel .muted,
body.theme-black-blue .filter-chip,
body.theme-black-blue .filter-chip *,
body.theme-black-blue .panel-header h2,
body.theme-black-blue .panel-header .btn,
body.theme-black-blue .filters .muted {
    color: #eef8ff !important;
}

body.theme-black-blue .selected-filters-panel {
    box-shadow: inset 0 0 0 1px rgba(79,209,255,.10) !important;
}

body.theme-black-blue .status-filter-options,
body.theme-black-blue .multi-status-filter,
body.theme-black-blue .status-check,
body.theme-black-blue .status-check .badge {
    background: transparent !important;
    color: #eef8ff !important;
    border-color: rgba(79,209,255,.16) !important;
}

body.theme-black-blue .status-filter-options {
    background: linear-gradient(180deg, rgba(10,30,57,.96), rgba(7,22,45,.94)) !important;
    border: 1px solid rgba(79,209,255,.16) !important;
    border-radius: 14px !important;
}

body.theme-black-blue .status-check {
    padding: 2px 0 !important;
}

body.theme-black-blue .status-check input[type="checkbox"] {
    accent-color: #35d9ff !important;
    filter: brightness(1.05);
}

body.theme-black-blue .autocomplete-suggestions,
body.theme-black-blue .autocomplete-suggestions .autocomplete-item,
body.theme-black-blue .autocomplete-suggestions .autocomplete-item * {
    background: #071a34 !important;
    color: #eef8ff !important;
    border-color: rgba(79,209,255,.14) !important;
}

body.theme-black-blue .autocomplete-suggestions .autocomplete-item:hover,
body.theme-black-blue .autocomplete-suggestions .autocomplete-item.active {
    background: rgba(35,190,240,.14) !important;
}

body.theme-black-blue .detalhes-unificados-box,
body.theme-black-blue .detalhes-unificados-box *,
body.theme-black-blue .cliente-integracoes-box,
body.theme-black-blue .cliente-integracoes-box *,
body.theme-black-blue .detalhes-section,
body.theme-black-blue .detalhes-section *,
body.theme-black-blue .log-comunicacao-card,
body.theme-black-blue .log-comunicacao-card * {
    color: #eef8ff !important;
}

body.theme-black-blue .detalhes-unificados-box .muted,
body.theme-black-blue .cliente-integracoes-box .muted,
body.theme-black-blue .detalhes-section .muted,
body.theme-black-blue .log-comunicacao-card .muted,
body.theme-black-blue .detalhes-unificados-box small,
body.theme-black-blue .cliente-integracoes-box small,
body.theme-black-blue .detalhes-section small,
body.theme-black-blue .log-comunicacao-card small {
    color: #b7c9da !important;
}

body.theme-black-blue .detalhes-unificados-box a,
body.theme-black-blue .cliente-integracoes-box a,
body.theme-black-blue .detalhes-section a,
body.theme-black-blue .log-comunicacao-card a {
    color: #74e3ff !important;
}

body.theme-black-blue .detalhes-unificados-box .btn,
body.theme-black-blue .cliente-integracoes-box .btn,
body.theme-black-blue .log-comunicacao-card .btn {
    color: inherit !important;
}


/* ============================================================
   LOGIN MONITORAMENTO DE INTEGRACOES V1
   ============================================================ */
.login-monitoring-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #f7fbff;
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

.login-monitoring-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(760px, 1.18fr) minmax(500px, .82fr);
}

.login-monitoring-left {
    position: relative;
    overflow: hidden;
    padding: 36px 42px 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 34%, rgba(12, 221, 214, .12), transparent 28%),
        radial-gradient(circle at 0% 90%, rgba(2, 209, 255, .13), transparent 25%),
        linear-gradient(145deg, #05162d 0%, #06172d 48%, #020b19 100%);
}

.login-monitoring-left::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 58px 58px;
    opacity: .28;
}

.login-monitoring-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 20%, rgba(25, 232, 222, .13), transparent 30%),
        radial-gradient(circle at 42% 70%, rgba(36, 116, 255, .09), transparent 30%);
    pointer-events: none;
}

.login-monitoring-dots.top {
    position: absolute;
    left: 20px;
    top: 18px;
    width: 86px;
    height: 86px;
    background-image: radial-gradient(rgba(112, 161, 212, .38) 2px, transparent 2px);
    background-size: 18px 18px;
    opacity: .55;
}

.login-monitoring-wave {
    position: absolute;
    left: -8%;
    right: -6%;
    bottom: -22px;
    height: 175px;
    background:
        radial-gradient(ellipse at 40% 40%, rgba(27, 239, 226, .55), transparent 30%),
        repeating-radial-gradient(ellipse at center, rgba(0,230,220,.48) 0 1px, transparent 1px 8px);
    transform: rotate(-3deg);
    opacity: .52;
    filter: blur(.1px);
}

.login-monitoring-brand {
    position: relative;
    z-index: 2;
}

.login-monitoring-brand img {
    width: 205px;
    max-height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 16px 26px rgba(19, 235, 217, .12));
}

.login-monitoring-content {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 96px);
    display: grid;
    grid-template-columns: 310px 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 34px;
    row-gap: 28px;
    align-items: start;
    margin-top: 48px;
}

.login-monitoring-headline {
    grid-column: 1;
    margin-top: 58px;
}

.login-monitoring-headline h1 {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: clamp(34px, 3.2vw, 52px);
    line-height: .98;
    font-weight: 850;
    letter-spacing: -.04em;
}

.login-monitoring-headline p {
    margin: 0;
    color: #e4eefc;
    font-size: clamp(19px, 1.45vw, 28px);
    line-height: 1.4;
    font-weight: 400;
}

.login-monitoring-headline strong {
    color: #22f3df;
    font-weight: 850;
}

.integration-map {
    grid-column: 2;
    position: relative;
    height: 372px;
    min-width: 600px;
}

.integration-center {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 116px;
    height: 116px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(5, 30, 55, .84);
    border: 1px solid rgba(30, 235, 220, .72);
    box-shadow: 0 0 0 9px rgba(30, 235, 220, .05), 0 0 44px rgba(30, 235, 220, .28);
}

.integration-center::before,
.integration-center::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 280px;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(30,235,220,.85) 0 8px, transparent 8px 14px);
    transform-origin: left center;
    opacity: .74;
}

.integration-center::before { transform: rotate(0deg); }
.integration-center::after { transform: rotate(90deg); }

.integration-center-logo {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.integration-center-logo::before {
    content: "";
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 8px solid #21eee0;
    box-shadow: inset 0 0 0 12px rgba(5, 30, 55, 1);
}

.integration-center-logo::after {
    content: "";
    position: absolute;
    width: 54px;
    height: 9px;
    background: #21eee0;
    border-radius: 999px;
}

.integration-node {
    position: absolute;
    width: 178px;
    min-height: 70px;
    border-radius: 14px;
    border: 1px solid rgba(85, 169, 232, .25);
    background: rgba(8, 31, 59, .66);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 15px 28px rgba(0,0,0,.16);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 15px;
}

.integration-node::after {
    content: "";
    position: absolute;
    width: 44px;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(30,235,220,.9) 0 7px, transparent 7px 13px);
    top: 50%;
}

.integration-node strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
}

.integration-node small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d7e7f7;
    font-size: 12px;
    margin-top: 5px;
}

.integration-node small b,
.overview-mini-card small b {
    width: 8px;
    height: 8px;
    background: #21e39d;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(33, 227, 157, .68);
}

.node-api { left: 50%; top: 0; transform: translateX(-50%); }
.node-erp { left: 54px; top: 54px; }
.node-crm { right: 54px; top: 54px; }
.node-ecommerce { left: 22px; top: 172px; }
.node-db { right: 14px; top: 172px; }
.node-queue { left: 52px; bottom: 16px; }
.node-webhook { right: 54px; bottom: 16px; }
.node-marketplace { left: 50%; bottom: -28px; transform: translateX(-50%); }

.node-erp::after,
.node-ecommerce::after,
.node-queue::after { right: -48px; }
.node-crm::after,
.node-db::after,
.node-webhook::after { left: -48px; }
.node-api::after,
.node-marketplace::after { display: none; }

.node-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 150, 255, .14);
    color: #34d9ff;
    position: relative;
}

.node-icon::before,
.node-icon::after {
    content: "";
    position: absolute;
}

.node-icon.server::before {
    width: 26px;
    height: 20px;
    border-radius: 5px;
    background: linear-gradient(#39c9ff 0 0) top 3px left 4px/18px 3px no-repeat,
                linear-gradient(#39c9ff 0 0) center left 4px/18px 3px no-repeat,
                linear-gradient(#39c9ff 0 0) bottom 3px left 4px/18px 3px no-repeat;
    border: 2px solid #39c9ff;
}

.node-icon.code::before { content: "</>"; font-size: 22px; font-weight: 850; color: #25e9ff; }
.node-icon.users::before {
    width: 28px; height: 20px; border-radius: 50% 50% 7px 7px;
    background: radial-gradient(circle at 8px 6px, #35a3ff 0 5px, transparent 6px),
                radial-gradient(circle at 20px 6px, #35a3ff 0 5px, transparent 6px),
                linear-gradient(#35a3ff, #35a3ff) bottom/28px 10px no-repeat;
}
.node-icon.cart::before { content: "▰"; font-size: 33px; color: #22e49d; transform: rotate(-7deg); }
.node-icon.database::before {
    width: 28px; height: 30px;
    background: radial-gradient(ellipse at center top, #41bfff 0 52%, transparent 54%),
                linear-gradient(#41bfff, #41bfff) center/100% 22px no-repeat,
                radial-gradient(ellipse at center bottom, #41bfff 0 52%, transparent 54%);
    border-radius: 50%;
}
.node-icon.queue::before { content: "☷"; font-size: 31px; color: #38a7ff; line-height: 1; }
.node-icon.webhook::before { content: "⌘"; font-size: 30px; color: #20e9d7; }
.node-icon.shop::before { content: "▣"; font-size: 30px; color: #25d8ff; }

.monitoring-overview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.35fr .75fr;
    gap: 14px;
    max-width: 1060px;
}

.overview-card {
    border-radius: 18px;
    border: 1px solid rgba(85, 169, 232, .20);
    background: rgba(7, 28, 54, .70);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 35px rgba(0,0,0,.16);
    padding: 18px 20px;
    backdrop-filter: blur(8px);
}

.overview-card h3 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 850;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.overview-mini-card {
    min-height: 122px;
    border-radius: 12px;
    border: 1px solid rgba(85, 169, 232, .16);
    background: rgba(6, 26, 51, .70);
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.overview-mini-card span {
    color: #e5f0ff;
    font-size: 12px;
    font-weight: 700;
}

.overview-mini-card strong {
    margin-top: 14px;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
}

.overview-mini-card small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #b5c9dc;
}

.overview-mini-card small.up { color: #28e99d; }
.overview-mini-card small.down { color: #ff4d5d; }
.overview-mini-card small.queue { color: #ffd155; }

.mini-line {
    height: 24px;
    margin-top: auto;
    border-radius: 6px;
    opacity: .9;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.mini-line.success {
    background-image: linear-gradient(160deg, transparent 10%, rgba(35,230,151,.05) 12%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 19 L20 25 L38 16 L55 21 L72 10 L88 15 L108 6 L120 4' fill='none' stroke='%2323e697' stroke-width='3'/%3E%3C/svg%3E");
}

.mini-line.info {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 11 L18 19 L36 22 L54 14 L70 20 L92 14 L110 5 L120 4' fill='none' stroke='%2325d9ff' stroke-width='3'/%3E%3C/svg%3E");
}

.mini-line.error {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 8 L18 16 L34 22 L50 18 L68 21 L84 7 L104 16 L120 10' fill='none' stroke='%23ff4257' stroke-width='3'/%3E%3C/svg%3E");
}

.mini-line.warning {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 8 L18 19 L36 25 L54 12 L70 21 L88 10 L106 20 L120 13' fill='none' stroke='%23ffcf40' stroke-width='3'/%3E%3C/svg%3E");
}

.overview-card.status ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overview-card.status li {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(8, 37, 70, .56);
    border: 1px solid rgba(85,169,232,.10);
    margin-bottom: 8px;
}

.overview-card.status li strong {
    color: #eaf4ff;
    font-size: 13px;
}

.overview-card.status li em {
    color: #23e6bd;
    font-style: normal;
    font-size: 13px;
}

.check,
.event-log-list span,
.alert-row span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 850;
    font-size: 13px;
}

.check,
.log-ok {
    color: #06192f;
    background: #24e4a8;
}

.log-warn,
.alert-row.warning span {
    color: #06192f;
    background: #ffd151;
}

.log-error,
.alert-row.danger span {
    color: #ffffff;
    background: #ff4e5d;
}

.log-info,
.alert-row.info span {
    color: #ffffff;
    background: #2f9cff;
}

.overview-card.logs,
.overview-card.alerts {
    min-height: 260px;
}

.event-log-list {
    display: flex;
    flex-direction: column;
}

.event-log-list > div {
    display: grid;
    grid-template-columns: 62px 24px 128px 1fr 72px;
    gap: 10px;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.event-log-list time,
.alert-row time {
    color: #9bb3ca;
    font-size: 12px;
}

.event-log-list strong {
    color: #eef7ff;
    font-size: 13px;
}

.event-log-list small {
    color: #a9bed1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-log-list em {
    justify-self: end;
    color: #28d7ff;
    border: 1px solid rgba(40, 215, 255, .24);
    background: rgba(40, 215, 255, .08);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 12px;
    font-style: normal;
}

.alert-row {
    display: grid;
    grid-template-columns: 28px 1fr 64px;
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.alert-row strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
}

.alert-row small {
    display: block;
    margin-top: 3px;
    color: #a9bed1;
    font-size: 12px;
}

.overview-card.alerts a {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: #22f3df;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.login-monitoring-right {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px;
    background:
        radial-gradient(circle at 100% 0%, rgba(32, 222, 225, .14), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    overflow: hidden;
}

.login-monitoring-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(17, 30, 62, .10) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: .45;
}

.login-monitoring-right-curve {
    position: absolute;
    right: -210px;
    bottom: -110px;
    width: 760px;
    height: 280px;
    border-top: 4px solid rgba(31, 212, 224, .36);
    border-radius: 50%;
    transform: rotate(-6deg);
    opacity: .55;
}

.login-monitoring-form-card {
    position: relative;
    z-index: 2;
    width: min(540px, 100%);
    padding: 58px 58px 48px;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    border: 1px solid #e0e8f5;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .11);
}

.login-monitoring-form-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
}

.login-monitoring-form-logo img {
    width: 170px;
    max-height: 86px;
    object-fit: contain;
}

.login-monitoring-form-card h2 {
    margin: 0;
    text-align: center;
    color: #091a36;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.03em;
}

.login-monitoring-form-card > p {
    margin: 12px 0 38px;
    color: #7e8ba4;
    text-align: center;
    font-size: 15px;
}

.login-monitoring-form {
    display: flex;
    flex-direction: column;
}

.login-monitoring-form label {
    margin: 0 0 10px;
    color: #071832;
    font-weight: 850;
    font-size: 14px;
}

.login-monitoring-input {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 16px;
    border: 1px solid #d6e0ef;
    border-radius: 12px;
    background: #ffffff;
    margin-bottom: 25px;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.login-monitoring-input:focus-within {
    border-color: #20d7d0;
    box-shadow: 0 0 0 4px rgba(32, 215, 208, .12);
}

.login-monitoring-input svg {
    width: 20px;
    height: 20px;
    fill: #8090a8;
    flex: none;
}

.login-monitoring-input input,
.login-monitoring-input input:-webkit-autofill,
.login-monitoring-input input:-webkit-autofill:hover,
.login-monitoring-input input:-webkit-autofill:focus {
    flex: 1;
    height: 100%;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-text-fill-color: #0f172a !important;
    background: transparent !important;
    color: #0f172a !important;
    font-size: 15px;
    padding: 0 !important;
    margin: 0 !important;
    appearance: none;
    border-radius: 0 !important;
}

.login-monitoring-input input::placeholder {
    color: #9ca9bc;
}

.login-monitoring-eye {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #8090a8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.login-monitoring-eye svg {
    fill: currentColor;
}

.login-monitoring-submit {
    height: 60px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #18d7cc, #0aa6c8);
    color: #ffffff;
    font-size: 19px;
    font-weight: 900;
    box-shadow: 0 18px 32px rgba(14, 180, 199, .25);
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease;
}

.login-monitoring-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.login-monitoring-submit:disabled {
    opacity: .72;
    cursor: progress;
}

.login-monitoring-copy {
    margin-top: 34px;
    text-align: center;
    color: #8491a8;
    font-size: 13px;
}

.login-monitoring-copy strong {
    color: #13cfc3;
}

@media (max-width: 1480px) {
    .login-monitoring-shell {
        grid-template-columns: minmax(660px, 1.08fr) minmax(460px, .92fr);
    }

    .login-monitoring-left {
        padding: 30px 32px;
    }

    .login-monitoring-content {
        grid-template-columns: 270px 1fr;
        column-gap: 22px;
    }

    .integration-map {
        min-width: 500px;
        transform: scale(.88);
        transform-origin: top center;
    }

    .monitoring-overview {
        grid-template-columns: 1fr 1fr;
    }

    .overview-card.integrations {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1180px) {
    .login-monitoring-shell {
        grid-template-columns: 1fr;
    }

    .login-monitoring-left {
        display: none;
    }

    .login-monitoring-right {
        padding: 26px;
    }

    .login-monitoring-form-card {
        padding: 44px 32px 36px;
    }
}

@media (max-width: 560px) {
    .login-monitoring-right {
        padding: 14px;
    }

    .login-monitoring-form-card {
        padding: 34px 22px 28px;
        border-radius: 20px;
    }

    .login-monitoring-form-card h2 {
        font-size: 26px;
    }

    .login-monitoring-form-logo img {
        width: 142px;
    }
}

/* ============================================================
   LOGIN - AJUSTE PARA EVITAR SCROLL NA TELA
   ============================================================ */
.login-monitoring-body,
.login-monitoring-shell {
    height: 100vh;
}

.login-monitoring-body {
    overflow: hidden;
}

@media (min-width: 1181px) {
    .login-monitoring-left,
    .login-monitoring-right {
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
    }

    .login-monitoring-left {
        padding: 24px 30px 20px;
    }

    .login-monitoring-brand img {
        width: 176px;
        max-height: 74px;
    }

    .login-monitoring-content {
        min-height: auto;
        margin-top: 26px;
        grid-template-columns: 270px 1fr;
        column-gap: 22px;
        row-gap: 18px;
    }

    .login-monitoring-headline {
        margin-top: 22px;
    }

    .login-monitoring-headline h1 {
        margin: 0 0 14px;
        font-size: clamp(32px, 2.7vw, 44px);
    }

    .login-monitoring-headline p {
        font-size: clamp(17px, 1.15vw, 22px);
        line-height: 1.32;
    }

    .integration-map {
        height: 300px;
        min-width: 520px;
        transform: scale(.88);
        transform-origin: top center;
    }

    .monitoring-overview {
        max-width: 980px;
        gap: 10px;
    }

    .overview-card {
        padding: 14px 16px;
        border-radius: 16px;
    }

    .overview-card h3 {
        margin-bottom: 12px;
        font-size: 14px;
    }

    .overview-metrics {
        gap: 10px;
    }

    .overview-mini-card {
        min-height: 100px;
        padding: 12px;
    }

    .overview-mini-card strong {
        margin-top: 10px;
        font-size: 24px;
    }

    .overview-mini-card small {
        margin-top: 8px;
        font-size: 11px;
    }

    .mini-line {
        height: 18px;
    }

    .overview-card.status li {
        padding: 8px 10px;
        margin-bottom: 6px;
    }

    .overview-card.logs,
    .overview-card.alerts {
        min-height: 0;
    }

    .event-log-list > div {
        min-height: 34px;
        grid-template-columns: 56px 22px 112px 1fr 68px;
        gap: 8px;
    }

    .alert-row {
        padding: 9px 0;
    }

    .overview-card.alerts a {
        margin-top: 12px;
    }

    .login-monitoring-right {
        padding: 28px 34px;
    }

    .login-monitoring-right-curve {
        right: -240px;
        bottom: -136px;
        width: 700px;
        height: 240px;
    }

    .login-monitoring-form-card {
        width: min(490px, 100%);
        padding: 40px 42px 30px;
        border-radius: 22px;
    }

    .login-monitoring-form-logo {
        margin-bottom: 18px;
    }

    .login-monitoring-form-logo img {
        width: 148px;
        max-height: 70px;
    }

    .login-monitoring-form-card h2 {
        font-size: 26px;
    }

    .login-monitoring-form-card > p {
        margin: 8px 0 24px;
        font-size: 14px;
    }

    .login-monitoring-form label {
        margin-bottom: 8px;
    }

    .login-monitoring-input {
        height: 52px;
        margin-bottom: 18px;
    }

    .login-monitoring-submit {
        height: 54px;
        font-size: 18px;
    }

    .login-monitoring-copy {
        margin-top: 22px;
    }
}

@media (min-width: 1181px) and (max-height: 860px) {
    .login-monitoring-left {
        padding: 18px 24px 14px;
    }

    .login-monitoring-brand img {
        width: 160px;
        max-height: 66px;
    }

    .login-monitoring-content {
        margin-top: 18px;
        grid-template-columns: 246px 1fr;
        column-gap: 16px;
        row-gap: 12px;
    }

    .login-monitoring-headline {
        margin-top: 10px;
    }

    .login-monitoring-headline h1 {
        font-size: 42px;
        margin-bottom: 10px;
    }

    .login-monitoring-headline p {
        font-size: 18px;
    }

    .integration-map {
        height: 264px;
        transform: scale(.79);
    }

    .monitoring-overview {
        max-width: 920px;
        gap: 8px;
    }

    .overview-card {
        padding: 12px 14px;
    }

    .overview-mini-card {
        min-height: 90px;
        padding: 10px;
    }

    .overview-mini-card strong {
        font-size: 22px;
    }

    .event-log-list > div {
        min-height: 30px;
    }

    .login-monitoring-right {
        padding: 18px 26px;
    }

    .login-monitoring-form-card {
        width: min(460px, 100%);
        padding: 32px 34px 24px;
    }

    .login-monitoring-form-logo img {
        width: 136px;
    }

    .login-monitoring-form-card h2 {
        font-size: 24px;
    }

    .login-monitoring-form-card > p {
        margin: 6px 0 18px;
    }

    .login-monitoring-input {
        height: 48px;
        margin-bottom: 14px;
    }

    .login-monitoring-submit {
        height: 50px;
        margin-top: 4px;
    }

    .login-monitoring-copy {
        margin-top: 16px;
        font-size: 12px;
    }
}


/* ============================================================
   3 MODELOS DE DASHBOARD - DARK OPS / LIGHT OPS / NEON OPS
   ============================================================ */
.theme-preview-swatch.modelo_dark_ops,
.theme-selector-swatch.modelo_dark_ops { background: linear-gradient(135deg, #061528, #0ea5e9); }

.theme-preview-swatch.modelo_light_ops,
.theme-selector-swatch.modelo_light_ops { background: linear-gradient(135deg, #ffffff, #0ea5a6); }

.theme-preview-swatch.modelo_neon_ops,
.theme-selector-swatch.modelo_neon_ops { background: linear-gradient(135deg, #030712, #2563eb 55%, #06b6d4); }

body.theme-modelo-dark-ops,
body.theme-modelo-neon-ops {
    --model-bg: #07172d;
    --model-surface: rgba(10, 30, 57, .92);
    --model-surface-2: rgba(5, 20, 42, .96);
    --model-border: rgba(64, 178, 255, .18);
    --model-text: #eef8ff;
    --model-muted: #9fb5ce;
    --model-blue: #35b8ff;
    --model-cyan: #22d3ee;
    --model-green: #22c55e;
    --model-red: #f05266;
    --model-yellow: #facc15;
    background:
        radial-gradient(circle at 88% 0%, rgba(28, 122, 255, .16), transparent 28%),
        radial-gradient(circle at 0% 18%, rgba(14, 165, 233, .12), transparent 30%),
        linear-gradient(180deg, #06152a 0%, #07172d 100%) !important;
    color: var(--model-text) !important;
}

body.theme-modelo-neon-ops {
    --model-bg: #030712;
    --model-surface: rgba(7, 18, 39, .90);
    --model-surface-2: rgba(3, 9, 24, .96);
    --model-border: rgba(47, 140, 255, .20);
    --model-blue: #1d4ed8;
    --model-cyan: #22d3ee;
    --model-green: #22c55e;
    --model-red: #ff4d5f;
    --model-yellow: #facc15;
    background:
        radial-gradient(circle at 48% 42%, rgba(37, 99, 235, .20), transparent 30%),
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .12), transparent 28%),
        linear-gradient(180deg, #030712 0%, #06111f 100%) !important;
}

body.theme-modelo-light-ops {
    --model-bg: #f7fafc;
    --model-surface: #ffffff;
    --model-surface-2: #ffffff;
    --model-border: #e2e8f0;
    --model-text: #0f172a;
    --model-muted: #64748b;
    --model-blue: #0ea5e9;
    --model-cyan: #0f9aa8;
    --model-green: #16a34a;
    --model-red: #ef4444;
    --model-yellow: #f59e0b;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%) !important;
    color: var(--model-text) !important;
}

body.theme-modelo-dark-ops .main,
body.theme-modelo-neon-ops .main,
body.theme-modelo-light-ops .main {
    background: transparent !important;
}

body.theme-modelo-dark-ops .sidebar,
body.theme-modelo-neon-ops .sidebar {
    background: linear-gradient(180deg, rgba(4, 17, 36, .98), rgba(2, 10, 22, .98)) !important;
    border-color: rgba(88, 166, 255, .14) !important;
}

body.theme-modelo-light-ops .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 12px 0 34px rgba(15, 23, 42, .04) !important;
}

body.theme-modelo-light-ops .sidebar a {
    color: #334155 !important;
}

body.theme-modelo-light-ops .sidebar a.active {
    background: #eaf9fb !important;
    color: #0f8f9e !important;
}

body.theme-modelo-dark-ops .topbar,
body.theme-modelo-neon-ops .topbar,
body.theme-modelo-light-ops .topbar {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

body.theme-modelo-dark-ops .topbar h1,
body.theme-modelo-neon-ops .topbar h1 {
    color: #ffffff !important;
}

body.theme-modelo-light-ops .topbar h1 {
    color: #0f172a !important;
}

body.theme-modelo-dark-ops .topbar p,
body.theme-modelo-neon-ops .topbar p {
    color: #cbd5e1 !important;
}

body.theme-modelo-light-ops .topbar p {
    color: #64748b !important;
}

body.theme-modelo-dark-ops .user-info strong,
body.theme-modelo-dark-ops .user-info small,
body.theme-modelo-neon-ops .user-info strong,
body.theme-modelo-neon-ops .user-info small {
    color: #eef8ff !important;
}

.dashboard-model-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-model-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-model-card,
.dashboard-model-panel {
    background: var(--model-surface) !important;
    border: 1px solid var(--model-border) !important;
    color: var(--model-text) !important;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .12);
}

body.theme-modelo-light-ops .dashboard-model-card,
body.theme-modelo-light-ops .dashboard-model-panel {
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}

.dashboard-model-card {
    min-height: 112px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 58px 1fr 78px;
    gap: 14px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.dashboard-model-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
}

.dashboard-model-card.blue .dashboard-model-card-icon,
.dashboard-model-card.cyan .dashboard-model-card-icon {
    background: rgba(14, 165, 233, .18);
    color: var(--model-blue);
}

.dashboard-model-card.green .dashboard-model-card-icon {
    background: rgba(34, 197, 94, .16);
    color: var(--model-green);
}

.dashboard-model-card.red .dashboard-model-card-icon {
    background: rgba(239, 68, 68, .17);
    color: var(--model-red);
}

.dashboard-model-card.yellow .dashboard-model-card-icon {
    background: rgba(245, 158, 11, .18);
    color: var(--model-yellow);
}

.dashboard-model-card-main span {
    display: block;
    color: var(--model-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 900;
}

.dashboard-model-card-main strong {
    display: block;
    margin-top: 6px;
    color: var(--model-text);
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.03em;
}

.dashboard-model-card-main small {
    display: block;
    margin-top: 7px;
    color: var(--model-green);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-model-spark svg {
    width: 76px;
    height: 26px;
    fill: none;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-model-spark.blue svg,
.dashboard-model-spark.cyan svg { stroke: var(--model-blue); }

.dashboard-model-spark.green svg { stroke: var(--model-green); }
.dashboard-model-spark.red svg { stroke: var(--model-red); }
.dashboard-model-spark.yellow svg { stroke: var(--model-yellow); }

.dashboard-model-grid-main {
    display: grid;
    grid-template-columns: 1.05fr 1.65fr 1.05fr;
    grid-auto-rows: minmax(220px, auto);
    gap: 14px;
}

.dashboard-model-panel {
    padding: 16px 18px;
    overflow: hidden;
}

.dashboard-model-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-model-panel-header h2 {
    margin: 0;
    color: var(--model-text) !important;
    font-size: 17px;
    font-weight: 900;
}

.dashboard-model-panel-header a,
.dashboard-model-panel-header .mini-status {
    color: var(--model-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-model-status-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dashboard-model-status-list div {
    display: grid;
    grid-template-columns: 18px 1fr auto auto;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border-bottom: 1px solid var(--model-border);
}

.status-dot,
.mini-status i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--model-green);
    box-shadow: 0 0 14px rgba(34, 197, 94, .5);
}

.dashboard-model-status-list strong,
.dashboard-model-log-list strong,
.dashboard-model-alert-list strong {
    color: var(--model-text);
    font-size: 13px;
}

.dashboard-model-status-list em {
    color: var(--model-green);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.dashboard-model-status-list small {
    color: var(--model-muted);
    font-size: 12px;
}

.map-panel {
    grid-row: span 2;
}

.dashboard-model-map {
    position: relative;
    min-height: 362px;
}

.map-center {
    position: absolute;
    left: 50%;
    top: 51%;
    width: 150px;
    height: 150px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(14, 165, 233, .5);
    background: var(--model-surface-2);
    box-shadow: 0 0 0 10px rgba(14, 165, 233, .06), 0 0 50px rgba(14, 165, 233, .17);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-center::before {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    border: 1px dashed rgba(14, 165, 233, .22);
}

.map-center img {
    width: 92px;
    max-height: 70px;
    object-fit: contain;
}

.map-node {
    position: absolute;
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--model-surface-2);
    border: 1px solid var(--model-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-node strong {
    color: var(--model-text);
    font-size: 13px;
}

.map-node small {
    color: var(--model-muted);
    font-size: 12px;
}

.map-node small i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--model-green);
}

.map-node.node-0 { left: 5%; top: 4%; }
.map-node.node-1 { right: 5%; top: 4%; }
.map-node.node-2 { left: 0; top: 32%; }
.map-node.node-3 { right: 0; top: 32%; }
.map-node.node-4 { left: 4%; bottom: 12%; }
.map-node.node-5 { right: 4%; bottom: 12%; }
.map-node.node-6 { left: 31%; bottom: 0; }
.map-node.node-7 { right: 31%; bottom: 0; }

.logs-panel,
.alerts-panel,
.chart-panel,
.donut-panel {
    min-height: 250px;
}

.dashboard-model-log-list {
    display: flex;
    flex-direction: column;
}

.dashboard-model-log-list div {
    display: grid;
    grid-template-columns: 72px 78px 1fr 1.2fr;
    gap: 10px;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px solid var(--model-border);
}

.dashboard-model-log-list time,
.dashboard-model-log-list small {
    color: var(--model-muted);
    font-size: 12px;
}

.log-level {
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 900;
}

.log-level.badge-success {
    background: rgba(34, 197, 94, .16);
    color: var(--model-green);
}

.log-level.badge-danger {
    background: rgba(239, 68, 68, .16);
    color: var(--model-red);
}

.log-level.badge-pendente {
    background: rgba(245, 158, 11, .18);
    color: var(--model-yellow);
}

.dashboard-model-alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-row-model {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 11px;
    align-items: center;
    padding: 12px;
    border-radius: 13px;
    background: var(--model-surface-2);
    border: 1px solid var(--model-border);
}

.alert-row-model > span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(239, 68, 68, .16);
    color: var(--model-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.alert-row-model.info > span {
    background: rgba(34, 197, 94, .16);
    color: var(--model-green);
}

.alert-row-model small {
    display: block;
    margin-top: 4px;
    color: var(--model-muted);
    font-size: 12px;
}

.alert-row-model em {
    padding: 6px 9px;
    border-radius: 9px;
    background: rgba(239, 68, 68, .15);
    color: var(--model-red);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.chart-panel {
    grid-column: span 2;
}

body.theme-modelo-light-ops .chart-panel {
    grid-column: span 1;
}

.donut-panel .donut-wrap {
    min-height: 250px;
}

.dashboard-model-panel .chart-period-tabs {
    flex-wrap: wrap;
}

.dashboard-model-panel .chart-period-tabs a {
    border-color: var(--model-border) !important;
    background: var(--model-surface-2) !important;
    color: var(--model-muted) !important;
}

.dashboard-model-panel .chart-period-tabs a.active {
    background: var(--model-blue) !important;
    color: #fff !important;
}

body.theme-modelo-light-ops .dashboard-model-grid-main {
    grid-template-columns: 1.35fr .8fr .95fr;
}

body.theme-modelo-light-ops .map-panel {
    grid-row: span 1;
}

body.theme-modelo-light-ops .chart-panel {
    grid-column: span 1;
}

body.theme-modelo-light-ops .dashboard-model-map {
    min-height: 250px;
}

body.theme-modelo-light-ops .map-center {
    width: 92px;
    height: 92px;
}

body.theme-modelo-light-ops .map-center::before {
    width: 220px;
    height: 220px;
}

body.theme-modelo-light-ops .map-node {
    min-width: 120px;
    padding: 9px 10px;
}

body.theme-modelo-light-ops .map-node:nth-of-type(n+6) {
    display: none;
}

body.theme-modelo-neon-ops .dashboard-model-grid-main {
    grid-template-columns: 1fr 1.25fr 1fr;
}

body.theme-modelo-neon-ops .map-panel {
    grid-column: 2;
    grid-row: span 2;
}

body.theme-modelo-neon-ops .status-panel {
    grid-column: 1;
}

body.theme-modelo-neon-ops .alerts-panel {
    grid-column: 3;
}

body.theme-modelo-neon-ops .logs-panel {
    grid-column: 1;
}

body.theme-modelo-neon-ops .chart-panel {
    grid-column: 2;
}

body.theme-modelo-neon-ops .donut-panel {
    grid-column: 3;
}

body.theme-modelo-neon-ops .dashboard-model-panel,
body.theme-modelo-neon-ops .dashboard-model-card {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(37,99,235,.08), 0 20px 45px rgba(0,0,0,.28);
}

body.theme-modelo-neon-ops .dashboard-model-card-icon {
    box-shadow: 0 0 26px rgba(34, 211, 238, .15);
}

body.theme-modelo-dark-ops .dashboard-model-panel svg text,
body.theme-modelo-neon-ops .dashboard-model-panel svg text {
    fill: #cbd5e1 !important;
}

body.theme-modelo-dark-ops .grid-line,
body.theme-modelo-neon-ops .grid-line {
    stroke: rgba(203, 213, 225, .15) !important;
}

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

    .dashboard-model-grid-main,
    body.theme-modelo-light-ops .dashboard-model-grid-main,
    body.theme-modelo-neon-ops .dashboard-model-grid-main {
        grid-template-columns: 1fr 1fr;
    }

    .map-panel,
    body.theme-modelo-neon-ops .map-panel {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .chart-panel,
    body.theme-modelo-neon-ops .chart-panel {
        grid-column: 1 / -1;
    }

    body.theme-modelo-neon-ops .status-panel,
    body.theme-modelo-neon-ops .alerts-panel,
    body.theme-modelo-neon-ops .logs-panel,
    body.theme-modelo-neon-ops .donut-panel {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .dashboard-model-metrics,
    .dashboard-model-grid-main {
        grid-template-columns: 1fr !important;
    }

    .dashboard-model-card {
        grid-template-columns: 54px 1fr;
    }

    .dashboard-model-spark {
        display: none;
    }

    .dashboard-model-log-list div {
        grid-template-columns: 70px 70px 1fr;
    }

    .dashboard-model-log-list small {
        display: none;
    }
}


/* ============================================================
   FIX clique menu ações flutuante
   ============================================================ */
.log-action-menu .action-menu-dropdown {
    display: none !important;
}

#floating-action-menu,
.floating-action-menu {
    position: fixed !important;
    display: block !important;
    min-width: 220px !important;
    background: #ffffff !important;
    border: 1px solid #dfe7f3 !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .22) !important;
    padding: 8px !important;
    z-index: 100002 !important;
}

#floating-action-menu .action-menu-item,
.floating-action-menu .action-menu-item {
    display: block !important;
    width: 100% !important;
}

body.theme-black-blue #floating-action-menu,
body.theme-black-blue .floating-action-menu,
body.theme-modelo-dark-ops #floating-action-menu,
body.theme-modelo-dark-ops .floating-action-menu,
body.theme-modelo-neon-ops #floating-action-menu,
body.theme-modelo-neon-ops .floating-action-menu {
    background: #071a34 !important;
    border-color: rgba(79,209,255,.18) !important;
    box-shadow: 0 20px 48px rgba(0,0,0,.42) !important;
}

body.theme-black-blue #floating-action-menu .action-menu-item,
body.theme-modelo-dark-ops #floating-action-menu .action-menu-item,
body.theme-modelo-neon-ops #floating-action-menu .action-menu-item {
    color: #eef8ff !important;
}

body.theme-black-blue #floating-action-menu .action-menu-item:hover,
body.theme-modelo-dark-ops #floating-action-menu .action-menu-item:hover,
body.theme-modelo-neon-ops #floating-action-menu .action-menu-item:hover {
    background: rgba(35,190,240,.14) !important;
}


/* ============================================================
   AJUSTES MODELOS OPS
   - remove status do grid visualmente
   - mapa usa origem/destino das integrações
   - corrige fonte do donut/erros por integração
   ============================================================ */

/* Sem o card Status do Sistema, os grids dos modelos ficam melhor distribuídos */
body.theme-modelo-dark-ops .dashboard-model-grid-main,
body.theme-modelo-light-ops .dashboard-model-grid-main,
body.theme-modelo-neon-ops .dashboard-model-grid-main {
    grid-template-columns: 1.15fr 1.45fr 1.15fr;
}

/* Cards superiores: mesmo padrão estrutural nos 3 modelos */
body.theme-modelo-dark-ops .dashboard-model-metrics,
body.theme-modelo-light-ops .dashboard-model-metrics,
body.theme-modelo-neon-ops .dashboard-model-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.theme-modelo-light-ops .dashboard-model-card,
body.theme-modelo-neon-ops .dashboard-model-card,
body.theme-modelo-dark-ops .dashboard-model-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 58px 1fr 78px;
}

/* Mapa de integrações: nomes Origem / Destino com integração abaixo */
.dashboard-model-map .map-node strong {
    line-height: 1.15;
    font-size: 12.5px;
}

.dashboard-model-map .map-node small {
    line-height: 1.15;
    max-width: 142px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-model-map .map-node-status-dots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.dashboard-model-map .map-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 0 0 2px rgba(255,255,255,.02);
}

.dashboard-model-map .map-status-dot.is-ok {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,.10), 0 0 12px rgba(34,197,94,.28);
}

.dashboard-model-map .map-status-dot.is-error {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239,68,68,.10), 0 0 12px rgba(239,68,68,.28);
}

/* Erros por integração / Donut: corrige fonte invisível nos temas escuros */
body.theme-modelo-dark-ops .donut-panel,
body.theme-modelo-neon-ops .donut-panel {
    color: #eef8ff !important;
}

body.theme-modelo-dark-ops .donut-panel *,
body.theme-modelo-neon-ops .donut-panel * {
    color: #eef8ff !important;
}

body.theme-modelo-dark-ops .donut-panel .muted,
body.theme-modelo-dark-ops .donut-panel small,
body.theme-modelo-dark-ops .donut-panel .legend-row span,
body.theme-modelo-neon-ops .donut-panel .muted,
body.theme-modelo-neon-ops .donut-panel small,
body.theme-modelo-neon-ops .donut-panel .legend-row span {
    color: #b8c7da !important;
}

body.theme-modelo-dark-ops .donut-panel .legend-row strong,
body.theme-modelo-dark-ops .donut-panel .donut-center strong,
body.theme-modelo-dark-ops .donut-panel .donut-center span,
body.theme-modelo-neon-ops .donut-panel .legend-row strong,
body.theme-modelo-neon-ops .donut-panel .donut-center strong,
body.theme-modelo-neon-ops .donut-panel .donut-center span {
    color: #ffffff !important;
}

body.theme-modelo-dark-ops .donut-panel svg text,
body.theme-modelo-neon-ops .donut-panel svg text {
    fill: #eef8ff !important;
}

body.theme-modelo-dark-ops .donut-center,
body.theme-modelo-neon-ops .donut-center {
    background: rgba(4, 18, 38, .96) !important;
    color: #ffffff !important;
}

/* Light Ops: mantém contraste correto no donut */
body.theme-modelo-light-ops .donut-panel,
body.theme-modelo-light-ops .donut-panel * {
    color: #0f172a !important;
}

body.theme-modelo-light-ops .donut-panel .muted,
body.theme-modelo-light-ops .donut-panel small,
body.theme-modelo-light-ops .donut-panel .legend-row span {
    color: #64748b !important;
}

/* Ajuste específico do Neon depois de remover status */
body.theme-modelo-neon-ops .logs-panel {
    grid-column: 1;
}

body.theme-modelo-neon-ops .map-panel {
    grid-column: 2;
    grid-row: span 2;
}

body.theme-modelo-neon-ops .alerts-panel {
    grid-column: 3;
}

body.theme-modelo-neon-ops .chart-panel {
    grid-column: 1 / span 2;
}

body.theme-modelo-neon-ops .donut-panel {
    grid-column: 3;
}

/* Ajuste específico do Light depois de remover status */
body.theme-modelo-light-ops .logs-panel {
    grid-column: 1;
}

body.theme-modelo-light-ops .alerts-panel {
    grid-column: 3;
}

body.theme-modelo-light-ops .map-panel {
    grid-column: 2;
}

body.theme-modelo-light-ops .chart-panel {
    grid-column: 1 / span 2;
}

body.theme-modelo-light-ops .donut-panel {
    grid-column: 3;
}

@media (max-width: 1440px) {
    body.theme-modelo-dark-ops .dashboard-model-grid-main,
    body.theme-modelo-light-ops .dashboard-model-grid-main,
    body.theme-modelo-neon-ops .dashboard-model-grid-main {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-modelo-light-ops .logs-panel,
    body.theme-modelo-light-ops .alerts-panel,
    body.theme-modelo-light-ops .map-panel,
    body.theme-modelo-light-ops .chart-panel,
    body.theme-modelo-light-ops .donut-panel,
    body.theme-modelo-neon-ops .logs-panel,
    body.theme-modelo-neon-ops .alerts-panel,
    body.theme-modelo-neon-ops .map-panel,
    body.theme-modelo-neon-ops .chart-panel,
    body.theme-modelo-neon-ops .donut-panel {
        grid-column: auto;
        grid-row: auto;
    }

    body.theme-modelo-light-ops .map-panel,
    body.theme-modelo-neon-ops .map-panel,
    body.theme-modelo-dark-ops .map-panel,
    body.theme-modelo-light-ops .chart-panel,
    body.theme-modelo-neon-ops .chart-panel,
    body.theme-modelo-dark-ops .chart-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    body.theme-modelo-dark-ops .dashboard-model-metrics,
    body.theme-modelo-light-ops .dashboard-model-metrics,
    body.theme-modelo-neon-ops .dashboard-model-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ============================================================
   AJUSTES DARK OPS - layout mais compacto / sem scroll vertical
   - donut ao lado do histórico
   - mapa reorganizado sem sobreposição
   ============================================================ */
body.theme-modelo-dark-ops .dashboard-model-page {
    gap: 12px;
}

body.theme-modelo-dark-ops .topbar.dashboard-model-topbar {
    padding: 16px 20px;
}

body.theme-modelo-dark-ops .dashboard-model-metrics {
    gap: 12px;
}

body.theme-modelo-dark-ops .dashboard-model-card {
    min-height: 96px;
    padding: 12px 14px;
    grid-template-columns: 54px 1fr 66px;
    gap: 10px;
}

body.theme-modelo-dark-ops .dashboard-model-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 24px;
}

body.theme-modelo-dark-ops .dashboard-model-card-main strong {
    font-size: 24px;
}

body.theme-modelo-dark-ops .dashboard-model-card-main small,
body.theme-modelo-dark-ops .dashboard-model-card-main span {
    font-size: 11px;
}

body.theme-modelo-dark-ops .dashboard-model-panel {
    padding: 14px 16px;
}

body.theme-modelo-dark-ops .dashboard-model-panel-header {
    margin-bottom: 10px;
}

body.theme-modelo-dark-ops .dashboard-model-panel-header h2 {
    font-size: 16px;
}

body.theme-modelo-dark-ops .dashboard-model-grid-main {
    grid-template-columns: 1.05fr 1.05fr 1.12fr;
    grid-auto-rows: minmax(196px, auto);
    gap: 12px;
}

body.theme-modelo-dark-ops .logs-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-dark-ops .map-panel {
    grid-column: 2;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-dark-ops .alerts-panel {
    grid-column: 3;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-dark-ops .chart-panel {
    grid-column: 1 / span 2;
    grid-row: 2;
    min-height: 248px;
}

body.theme-modelo-dark-ops .donut-panel {
    grid-column: 3;
    grid-row: 2;
    min-height: 248px;
}

/* Mapa das integrações em grid para evitar sobreposição */
body.theme-modelo-dark-ops .dashboard-model-map {
    position: relative;
    min-height: 168px;
    display: grid;
    grid-template-columns: minmax(118px, 1fr) 116px minmax(118px, 1fr);
    grid-template-rows: repeat(4, minmax(32px, auto));
    gap: 8px 10px;
    align-items: center;
}

body.theme-modelo-dark-ops .map-center {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 2;
    grid-row: 2 / span 2;
    width: 116px;
    height: 116px;
    margin: 0 auto;
    box-shadow: 0 0 0 8px rgba(14, 165, 233, .05), 0 0 34px rgba(14, 165, 233, .14);
}

body.theme-modelo-dark-ops .map-center::before {
    width: 180px;
    height: 180px;
}

body.theme-modelo-dark-ops .map-center img {
    width: 72px;
    max-height: 54px;
}

body.theme-modelo-dark-ops .map-node {
    position: relative;
    min-width: 0;
    width: auto;
    padding: 8px 10px;
    border-radius: 12px;
    gap: 2px;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node strong {
    font-size: 11px;
    line-height: 1.2;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node small {
    font-size: 10px;
    line-height: 1.2;
    max-width: none;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node-status-dots,
body.theme-modelo-light-ops .dashboard-model-map .map-node-status-dots,
body.theme-modelo-neon-ops .dashboard-model-map .map-node-status-dots {
    gap: 5px;
    margin-top: 5px;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-status-dot,
body.theme-modelo-light-ops .dashboard-model-map .map-status-dot,
body.theme-modelo-neon-ops .dashboard-model-map .map-status-dot {
    width: 9px;
    height: 9px;
}

body.theme-modelo-dark-ops .map-node.node-0 { grid-column: 1; grid-row: 1; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-1 { grid-column: 3; grid-row: 1; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-2 { grid-column: 1; grid-row: 2; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-3 { grid-column: 3; grid-row: 2; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-4 { grid-column: 1; grid-row: 3; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-5 { grid-column: 3; grid-row: 3; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-6 { grid-column: 1; grid-row: 4; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-dark-ops .map-node.node-7 { grid-column: 3; grid-row: 4; left: auto; right: auto; top: auto; bottom: auto; }

/* Conteúdo interno mais compacto para caber na primeira tela */
body.theme-modelo-dark-ops .dashboard-model-log-list div {
    min-height: 30px;
    gap: 8px;
}

body.theme-modelo-dark-ops .dashboard-model-alert-list {
    gap: 8px;
}

body.theme-modelo-dark-ops .alert-row-model {
    padding: 10px;
}

body.theme-modelo-dark-ops .donut-panel .donut-wrap {
    gap: 12px;
}

body.theme-modelo-dark-ops .donut-panel .legend-row {
    gap: 8px;
}

@media (max-height: 900px) and (min-width: 1101px) {
    body.theme-modelo-dark-ops .main {
        padding-bottom: 12px;
    }

    body.theme-modelo-dark-ops .dashboard-model-page {
        gap: 10px;
    }

    body.theme-modelo-dark-ops .dashboard-model-metrics {
        gap: 10px;
    }

    body.theme-modelo-dark-ops .dashboard-model-grid-main {
        grid-auto-rows: minmax(184px, auto);
        gap: 10px;
    }

    body.theme-modelo-dark-ops .logs-panel,
    body.theme-modelo-dark-ops .map-panel,
    body.theme-modelo-dark-ops .alerts-panel {
        min-height: 192px;
    }

    body.theme-modelo-dark-ops .chart-panel,
    body.theme-modelo-dark-ops .donut-panel {
        min-height: 228px;
    }

    body.theme-modelo-dark-ops .dashboard-model-map {
        min-height: 156px;
    }
}

@media (max-width: 1440px) {
    body.theme-modelo-dark-ops .logs-panel,
    body.theme-modelo-dark-ops .map-panel,
    body.theme-modelo-dark-ops .alerts-panel,
    body.theme-modelo-dark-ops .chart-panel,
    body.theme-modelo-dark-ops .donut-panel {
        grid-column: auto;
        grid-row: auto;
        min-height: auto;
    }

    body.theme-modelo-dark-ops .chart-panel,
    body.theme-modelo-dark-ops .map-panel {
        grid-column: 1 / -1;
    }
}


/* ============================================================
   AJUSTES COMPLEMENTARES LIGHT OPS / NEON OPS
   - layout compacto dos cards
   - histórico ao lado de erros por integração
   - mapa reorganizado sem sobreposição
   ============================================================ */
body.theme-modelo-light-ops .dashboard-model-page,
body.theme-modelo-neon-ops .dashboard-model-page {
    gap: 12px;
}

body.theme-modelo-light-ops .topbar.dashboard-model-topbar,
body.theme-modelo-neon-ops .topbar.dashboard-model-topbar {
    padding: 16px 20px;
}

body.theme-modelo-light-ops .dashboard-model-metrics,
body.theme-modelo-neon-ops .dashboard-model-metrics {
    gap: 12px;
}

body.theme-modelo-light-ops .dashboard-model-card,
body.theme-modelo-neon-ops .dashboard-model-card {
    min-height: 96px;
    padding: 12px 14px;
    grid-template-columns: 54px 1fr 66px;
    gap: 10px;
}

body.theme-modelo-light-ops .dashboard-model-card-icon,
body.theme-modelo-neon-ops .dashboard-model-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 24px;
}

body.theme-modelo-light-ops .dashboard-model-card-main strong,
body.theme-modelo-neon-ops .dashboard-model-card-main strong {
    font-size: 24px;
}

body.theme-modelo-light-ops .dashboard-model-card-main small,
body.theme-modelo-light-ops .dashboard-model-card-main span,
body.theme-modelo-neon-ops .dashboard-model-card-main small,
body.theme-modelo-neon-ops .dashboard-model-card-main span {
    font-size: 11px;
}

body.theme-modelo-light-ops .dashboard-model-panel,
body.theme-modelo-neon-ops .dashboard-model-panel {
    padding: 14px 16px;
}

body.theme-modelo-light-ops .dashboard-model-panel-header,
body.theme-modelo-neon-ops .dashboard-model-panel-header {
    margin-bottom: 10px;
}

body.theme-modelo-light-ops .dashboard-model-panel-header h2,
body.theme-modelo-neon-ops .dashboard-model-panel-header h2 {
    font-size: 16px;
}

body.theme-modelo-light-ops .dashboard-model-grid-main,
body.theme-modelo-neon-ops .dashboard-model-grid-main {
    grid-template-columns: 1.05fr 1.05fr 1.12fr;
    grid-auto-rows: minmax(196px, auto);
    gap: 12px;
}

body.theme-modelo-light-ops .logs-panel,
body.theme-modelo-neon-ops .logs-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-light-ops .map-panel,
body.theme-modelo-neon-ops .map-panel {
    grid-column: 2;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-light-ops .alerts-panel,
body.theme-modelo-neon-ops .alerts-panel {
    grid-column: 3;
    grid-row: 1;
    min-height: 205px;
}

body.theme-modelo-light-ops .chart-panel,
body.theme-modelo-neon-ops .chart-panel {
    grid-column: 1 / span 2;
    grid-row: 2;
    min-height: 248px;
}

body.theme-modelo-light-ops .donut-panel,
body.theme-modelo-neon-ops .donut-panel {
    grid-column: 3;
    grid-row: 2;
    min-height: 248px;
}

body.theme-modelo-light-ops .dashboard-model-map,
body.theme-modelo-neon-ops .dashboard-model-map {
    position: relative;
    min-height: 168px;
    display: grid;
    grid-template-columns: minmax(118px, 1fr) 116px minmax(118px, 1fr);
    grid-template-rows: repeat(4, minmax(32px, auto));
    gap: 8px 10px;
    align-items: center;
}

body.theme-modelo-light-ops .map-center,
body.theme-modelo-neon-ops .map-center {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 2;
    grid-row: 2 / span 2;
    width: 116px;
    height: 116px;
    margin: 0 auto;
}

body.theme-modelo-light-ops .map-center::before,
body.theme-modelo-neon-ops .map-center::before {
    width: 180px;
    height: 180px;
}

body.theme-modelo-light-ops .map-center img,
body.theme-modelo-neon-ops .map-center img {
    width: 72px;
    max-height: 54px;
}

body.theme-modelo-light-ops .map-node,
body.theme-modelo-neon-ops .map-node {
    position: relative;
    min-width: 0;
    width: auto;
    padding: 8px 10px;
    border-radius: 12px;
    gap: 2px;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node strong,
body.theme-modelo-neon-ops .dashboard-model-map .map-node strong {
    font-size: 11px;
    line-height: 1.2;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node small,
body.theme-modelo-neon-ops .dashboard-model-map .map-node small {
    font-size: 10px;
    line-height: 1.2;
    max-width: none;
}

body.theme-modelo-light-ops .map-node:nth-of-type(n+6) {
    display: block;
}

body.theme-modelo-light-ops .map-node.node-0,
body.theme-modelo-neon-ops .map-node.node-0 { grid-column: 1; grid-row: 1; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-1,
body.theme-modelo-neon-ops .map-node.node-1 { grid-column: 3; grid-row: 1; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-2,
body.theme-modelo-neon-ops .map-node.node-2 { grid-column: 1; grid-row: 2; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-3,
body.theme-modelo-neon-ops .map-node.node-3 { grid-column: 3; grid-row: 2; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-4,
body.theme-modelo-neon-ops .map-node.node-4 { grid-column: 1; grid-row: 3; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-5,
body.theme-modelo-neon-ops .map-node.node-5 { grid-column: 3; grid-row: 3; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-6,
body.theme-modelo-neon-ops .map-node.node-6 { grid-column: 1; grid-row: 4; left: auto; right: auto; top: auto; bottom: auto; }
body.theme-modelo-light-ops .map-node.node-7,
body.theme-modelo-neon-ops .map-node.node-7 { grid-column: 3; grid-row: 4; left: auto; right: auto; top: auto; bottom: auto; }

body.theme-modelo-light-ops .dashboard-model-log-list div,
body.theme-modelo-neon-ops .dashboard-model-log-list div {
    min-height: 30px;
    gap: 8px;
}

body.theme-modelo-light-ops .dashboard-model-alert-list,
body.theme-modelo-neon-ops .dashboard-model-alert-list {
    gap: 8px;
}

body.theme-modelo-light-ops .alert-row-model,
body.theme-modelo-neon-ops .alert-row-model {
    padding: 10px;
}

body.theme-modelo-light-ops .donut-panel .donut-wrap,
body.theme-modelo-neon-ops .donut-panel .donut-wrap {
    gap: 12px;
}

body.theme-modelo-light-ops .donut-panel .legend-row,
body.theme-modelo-neon-ops .donut-panel .legend-row {
    gap: 8px;
}

/* Legibilidade extra no Neon */
body.theme-modelo-neon-ops .donut-panel *,
body.theme-modelo-neon-ops .legend-row span,
body.theme-modelo-neon-ops .legend-row strong,
body.theme-modelo-neon-ops .donut-center strong,
body.theme-modelo-neon-ops .donut-center span {
    color: #e5eefc !important;
}

body.theme-modelo-neon-ops .dashboard-model-panel svg text {
    fill: #e5eefc !important;
}

@media (max-height: 900px) and (min-width: 1101px) {
    body.theme-modelo-light-ops .main,
    body.theme-modelo-neon-ops .main {
        padding-bottom: 12px;
    }

    body.theme-modelo-light-ops .dashboard-model-page,
    body.theme-modelo-neon-ops .dashboard-model-page {
        gap: 10px;
    }

    body.theme-modelo-light-ops .dashboard-model-grid-main,
    body.theme-modelo-neon-ops .dashboard-model-grid-main {
        grid-auto-rows: minmax(184px, auto);
        gap: 10px;
    }

    body.theme-modelo-light-ops .logs-panel,
    body.theme-modelo-light-ops .map-panel,
    body.theme-modelo-light-ops .alerts-panel,
    body.theme-modelo-neon-ops .logs-panel,
    body.theme-modelo-neon-ops .map-panel,
    body.theme-modelo-neon-ops .alerts-panel {
        min-height: 192px;
    }

    body.theme-modelo-light-ops .chart-panel,
    body.theme-modelo-light-ops .donut-panel,
    body.theme-modelo-neon-ops .chart-panel,
    body.theme-modelo-neon-ops .donut-panel {
        min-height: 228px;
    }

    body.theme-modelo-light-ops .dashboard-model-map,
    body.theme-modelo-neon-ops .dashboard-model-map {
        min-height: 156px;
    }
}

/* ============================================================
   HOTFIX LIGHT OPS - contraste do menu lateral e topo
   ============================================================ */
body.theme-modelo-light-ops {
    background: linear-gradient(180deg, #f8fbfd 0%, #eef5f8 100%) !important;
}

body.theme-modelo-light-ops .sidebar {
    background: rgba(255,255,255,.96) !important;
    border-right: 1px solid #d9e5ec !important;
    box-shadow: 12px 0 34px rgba(15, 23, 42, .06) !important;
}

body.theme-modelo-light-ops .sidebar-brand h1,
body.theme-modelo-light-ops .sidebar-brand p,
body.theme-modelo-light-ops .sidebar-brand,
body.theme-modelo-light-ops .sidebar .nav-label,
body.theme-modelo-light-ops .sidebar nav a,
body.theme-modelo-light-ops .sidebar .menu-icon,
body.theme-modelo-light-ops .sidebar .nav-svg {
    color: #18324b !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .sidebar nav a {
    background: transparent !important;
    border: 1px solid transparent !important;
}

body.theme-modelo-light-ops .sidebar nav a:hover {
    background: #eef7fb !important;
    color: #0f8f9e !important;
    border-color: #d5edf1 !important;
}

body.theme-modelo-light-ops .sidebar nav a.active {
    background: linear-gradient(135deg, #e6fbff 0%, #d9f8fb 100%) !important;
    color: #0d7f8c !important;
    border-color: #bfeef3 !important;
    box-shadow: 0 10px 22px rgba(20, 184, 166, .10) !important;
}

body.theme-modelo-light-ops .sidebar nav a.active .nav-label,
body.theme-modelo-light-ops .sidebar nav a.active .menu-icon,
body.theme-modelo-light-ops .sidebar nav a.active .nav-svg,
body.theme-modelo-light-ops .sidebar nav a:hover .nav-label,
body.theme-modelo-light-ops .sidebar nav a:hover .menu-icon,
body.theme-modelo-light-ops .sidebar nav a:hover .nav-svg {
    color: inherit !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .topbar,
body.theme-modelo-light-ops .topbar.dashboard-model-topbar {
    background: linear-gradient(135deg, rgba(255,255,255,.96) 0%, rgba(246,250,252,.98) 100%) !important;
    border: 1px solid #dbe8ee !important;
    border-radius: 22px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06) !important;
}

body.theme-modelo-light-ops .topbar h1,
body.theme-modelo-light-ops .user-info strong,
body.theme-modelo-light-ops .notification-bell-btn,
body.theme-modelo-light-ops #notification-bell-btn,
body.theme-modelo-light-ops .theme-selector-btn {
    color: #0f172a !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .topbar p,
body.theme-modelo-light-ops .user-info small {
    color: #64748b !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .notification-bell-btn:hover,
body.theme-modelo-light-ops #notification-bell-btn:hover,
body.theme-modelo-light-ops .theme-selector-btn:hover {
    background: rgba(15, 23, 42, .06) !important;
    color: #0f8f9e !important;
}

body.theme-modelo-light-ops .user-info,
body.theme-modelo-light-ops .topbar-actions {
    position: relative;
    z-index: 2;
}


/* ============================================================
   HOTFIX LIGHT OPS V2 - ícones/menu lateral visíveis
   ============================================================ */
body.theme-modelo-light-ops .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #d1dde8 !important;
}

body.theme-modelo-light-ops .sidebar nav a,
body.theme-modelo-light-ops .sidebar nav a *,
body.theme-modelo-light-ops .sidebar .menu-icon,
body.theme-modelo-light-ops .sidebar .nav-label,
body.theme-modelo-light-ops .sidebar .nav-svg,
body.theme-modelo-light-ops .sidebar svg,
body.theme-modelo-light-ops .sidebar svg *,
body.theme-modelo-light-ops .sidebar path,
body.theme-modelo-light-ops .sidebar circle,
body.theme-modelo-light-ops .sidebar rect,
body.theme-modelo-light-ops .sidebar line,
body.theme-modelo-light-ops .sidebar polyline,
body.theme-modelo-light-ops .sidebar polygon {
    color: #1e3a5f !important;
    stroke: #1e3a5f !important;
    fill: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.theme-modelo-light-ops .sidebar nav a.active,
body.theme-modelo-light-ops .sidebar nav a.active *,
body.theme-modelo-light-ops .sidebar nav a:hover,
body.theme-modelo-light-ops .sidebar nav a:hover *,
body.theme-modelo-light-ops .sidebar nav a.active .nav-svg,
body.theme-modelo-light-ops .sidebar nav a:hover .nav-svg,
body.theme-modelo-light-ops .sidebar nav a.active svg,
body.theme-modelo-light-ops .sidebar nav a:hover svg,
body.theme-modelo-light-ops .sidebar nav a.active svg *,
body.theme-modelo-light-ops .sidebar nav a:hover svg * {
    color: #087f8c !important;
    stroke: #087f8c !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .sidebar nav a.active {
    background: #dff8fb !important;
    border: 1px solid #afeaf0 !important;
}

body.theme-modelo-light-ops .sidebar nav a:hover {
    background: #edf9fb !important;
}

body.theme-modelo-light-ops .sidebar-brand,
body.theme-modelo-light-ops .sidebar-brand *,
body.theme-modelo-light-ops .sidebar-brand h1,
body.theme-modelo-light-ops .sidebar-brand p {
    color: #0f172a !important;
    opacity: 1 !important;
}

body.theme-modelo-light-ops .sidebar .brand-icon {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9) !important;
    color: #ffffff !important;
}

/* topo / usuário no Light Ops */
body.theme-modelo-light-ops .topbar-actions,
body.theme-modelo-light-ops .topbar-actions *,
body.theme-modelo-light-ops .user-info,
body.theme-modelo-light-ops .user-info *,
body.theme-modelo-light-ops .theme-selector-btn,
body.theme-modelo-light-ops .theme-selector-btn *,
body.theme-modelo-light-ops .notification-bell-btn,
body.theme-modelo-light-ops .notification-bell-btn * {
    opacity: 1 !important;
    visibility: visible !important;
}

body.theme-modelo-light-ops .user-info strong {
    color: #0f172a !important;
}

body.theme-modelo-light-ops .user-info small {
    color: #475569 !important;
}

body.theme-modelo-light-ops .theme-selector-btn,
body.theme-modelo-light-ops .notification-bell-btn,
body.theme-modelo-light-ops #notification-bell-btn {
    color: #1e3a5f !important;
    background: rgba(15, 23, 42, .04) !important;
}

body.theme-modelo-light-ops .theme-selector-btn svg,
body.theme-modelo-light-ops .notification-bell-btn svg,
body.theme-modelo-light-ops #notification-bell-btn svg,
body.theme-modelo-light-ops .theme-selector-btn svg *,
body.theme-modelo-light-ops .notification-bell-btn svg *,
body.theme-modelo-light-ops #notification-bell-btn svg * {
    stroke: currentColor !important;
    color: currentColor !important;
    opacity: 1 !important;
}

/* ============================================================
   TRANSIÇÃO MODERNA DE TEMA
   ============================================================ */
.theme-change-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at var(--theme-x, 92%) var(--theme-y, 8%), rgba(34, 211, 238, .34), transparent 0),
        rgba(2, 6, 23, .10);
    backdrop-filter: blur(0);
    transition: opacity .18s ease;
}

.theme-change-overlay.active {
    opacity: 1;
    animation: themeChangeSweep .72s cubic-bezier(.22, 1, .36, 1) forwards;
}

.theme-change-overlay.reloading::after {
    content: "Aplicando tema...";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(8, 20, 40, .86);
    color: #ffffff;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .02em;
    box-shadow: 0 20px 50px rgba(0,0,0,.26);
}

@keyframes themeChangeSweep {
    0% {
        clip-path: circle(0% at var(--theme-x, 92%) var(--theme-y, 8%));
        backdrop-filter: blur(0);
    }
    45% {
        clip-path: circle(145% at var(--theme-x, 92%) var(--theme-y, 8%));
        backdrop-filter: blur(4px);
    }
    100% {
        clip-path: circle(145% at var(--theme-x, 92%) var(--theme-y, 8%));
        backdrop-filter: blur(0);
        opacity: 0;
    }
}

body.theme-is-changing .main,
body.theme-is-changing .sidebar,
body.theme-is-changing .topbar,
body.theme-is-changing .panel,
body.theme-is-changing .dashboard-model-card,
body.theme-is-changing .dashboard-model-panel,
body.theme-is-changing .metric-card {
    transition:
        background-color .38s ease,
        background .38s ease,
        color .38s ease,
        border-color .38s ease,
        box-shadow .38s ease,
        transform .38s ease,
        opacity .38s ease !important;
}

body.theme-is-changing .main {
    transform: translateY(2px);
}


/* ============================================================
   AJUSTES DASHBOARD COMPACTO + TEMAS OPS GLOBAIS
   ============================================================ */

/* Reduz altura dos cards de gráfico para caber melhor na página */
body.theme-modelo-dark-ops .chart-panel,
body.theme-modelo-light-ops .chart-panel,
body.theme-modelo-neon-ops .chart-panel,
body.theme-modelo-dark-ops .donut-panel,
body.theme-modelo-light-ops .donut-panel,
body.theme-modelo-neon-ops .donut-panel {
    min-height: 205px !important;
    max-height: 230px !important;
}

body.theme-modelo-dark-ops .chart-panel svg,
body.theme-modelo-light-ops .chart-panel svg,
body.theme-modelo-neon-ops .chart-panel svg {
    max-height: 160px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-wrap,
body.theme-modelo-light-ops .donut-panel .donut-wrap,
body.theme-modelo-neon-ops .donut-panel .donut-wrap {
    min-height: 150px !important;
    max-height: 162px !important;
    align-items: center !important;
}

body.theme-modelo-dark-ops .donut-panel .donut,
body.theme-modelo-light-ops .donut-panel .donut,
body.theme-modelo-neon-ops .donut-panel .donut {
    width: 145px !important;
    height: 145px !important;
    min-width: 145px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-center,
body.theme-modelo-light-ops .donut-panel .donut-center,
body.theme-modelo-neon-ops .donut-panel .donut-center {
    inset: 39px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-center strong,
body.theme-modelo-light-ops .donut-panel .donut-center strong,
body.theme-modelo-neon-ops .donut-panel .donut-center strong {
    font-size: 22px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-center span,
body.theme-modelo-light-ops .donut-panel .donut-center span,
body.theme-modelo-neon-ops .donut-panel .donut-center span {
    font-size: 11px !important;
}

body.theme-modelo-dark-ops .donut-panel .legend-row,
body.theme-modelo-light-ops .donut-panel .legend-row,
body.theme-modelo-neon-ops .donut-panel .legend-row {
    padding: 5px 0 !important;
    font-size: 11px !important;
}

/* Alertas ativos mais baixo */
body.theme-modelo-dark-ops .alerts-panel,
body.theme-modelo-light-ops .alerts-panel,
body.theme-modelo-neon-ops .alerts-panel {
    min-height: 178px !important;
    max-height: 205px !important;
}

body.theme-modelo-dark-ops .dashboard-model-alert-list,
body.theme-modelo-light-ops .dashboard-model-alert-list,
body.theme-modelo-neon-ops .dashboard-model-alert-list {
    gap: 6px !important;
}

body.theme-modelo-dark-ops .alert-row-model,
body.theme-modelo-light-ops .alert-row-model,
body.theme-modelo-neon-ops .alert-row-model {
    padding: 8px 9px !important;
    grid-template-columns: 28px 1fr auto !important;
}

body.theme-modelo-dark-ops .alert-row-model > span,
body.theme-modelo-light-ops .alert-row-model > span,
body.theme-modelo-neon-ops .alert-row-model > span {
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
}

body.theme-modelo-dark-ops .alert-row-model strong,
body.theme-modelo-light-ops .alert-row-model strong,
body.theme-modelo-neon-ops .alert-row-model strong {
    font-size: 12px !important;
}

body.theme-modelo-dark-ops .alert-row-model small,
body.theme-modelo-light-ops .alert-row-model small,
body.theme-modelo-neon-ops .alert-row-model small {
    font-size: 10.5px !important;
    margin-top: 2px !important;
}

/* Logs: aumentar área da chave e reduzir fonte para ficar em uma linha */
body.theme-modelo-dark-ops .dashboard-model-log-list div,
body.theme-modelo-light-ops .dashboard-model-log-list div,
body.theme-modelo-neon-ops .dashboard-model-log-list div {
    grid-template-columns: 60px 68px minmax(120px, .75fr) minmax(220px, 1.65fr) !important;
    min-height: 28px !important;
    gap: 7px !important;
}

body.theme-modelo-dark-ops .dashboard-model-log-list time,
body.theme-modelo-light-ops .dashboard-model-log-list time,
body.theme-modelo-neon-ops .dashboard-model-log-list time,
body.theme-modelo-dark-ops .dashboard-model-log-list strong,
body.theme-modelo-light-ops .dashboard-model-log-list strong,
body.theme-modelo-neon-ops .dashboard-model-log-list strong,
body.theme-modelo-dark-ops .dashboard-model-log-list small,
body.theme-modelo-light-ops .dashboard-model-log-list small,
body.theme-modelo-neon-ops .dashboard-model-log-list small {
    font-size: 10.8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-modelo-dark-ops .dashboard-model-log-list small,
body.theme-modelo-light-ops .dashboard-model-log-list small,
body.theme-modelo-neon-ops .dashboard-model-log-list small {
    max-width: none !important;
}

body.theme-modelo-dark-ops .log-level,
body.theme-modelo-light-ops .log-level,
body.theme-modelo-neon-ops .log-level {
    padding: 3px 5px !important;
    font-size: 9px !important;
}

/* Compactação geral para caber melhor no dashboard */
body.theme-modelo-dark-ops .dashboard-model-grid-main,
body.theme-modelo-light-ops .dashboard-model-grid-main,
body.theme-modelo-neon-ops .dashboard-model-grid-main {
    grid-auto-rows: minmax(176px, auto) !important;
    gap: 9px !important;
}

body.theme-modelo-dark-ops .dashboard-model-panel,
body.theme-modelo-light-ops .dashboard-model-panel,
body.theme-modelo-neon-ops .dashboard-model-panel {
    padding: 11px 13px !important;
}

body.theme-modelo-dark-ops .dashboard-model-panel-header,
body.theme-modelo-light-ops .dashboard-model-panel-header,
body.theme-modelo-neon-ops .dashboard-model-panel-header {
    margin-bottom: 7px !important;
}

body.theme-modelo-dark-ops .dashboard-model-panel-header h2,
body.theme-modelo-light-ops .dashboard-model-panel-header h2,
body.theme-modelo-neon-ops .dashboard-model-panel-header h2 {
    font-size: 14px !important;
}

body.theme-modelo-dark-ops .dashboard-model-metrics,
body.theme-modelo-light-ops .dashboard-model-metrics,
body.theme-modelo-neon-ops .dashboard-model-metrics {
    gap: 9px !important;
}

body.theme-modelo-dark-ops .dashboard-model-card,
body.theme-modelo-light-ops .dashboard-model-card,
body.theme-modelo-neon-ops .dashboard-model-card {
    min-height: 86px !important;
    padding: 10px 12px !important;
    grid-template-columns: 46px 1fr 56px !important;
}

body.theme-modelo-dark-ops .dashboard-model-card-icon,
body.theme-modelo-light-ops .dashboard-model-card-icon,
body.theme-modelo-neon-ops .dashboard-model-card-icon {
    width: 46px !important;
    height: 46px !important;
    font-size: 20px !important;
}

body.theme-modelo-dark-ops .dashboard-model-card-main strong,
body.theme-modelo-light-ops .dashboard-model-card-main strong,
body.theme-modelo-neon-ops .dashboard-model-card-main strong {
    font-size: 21px !important;
}

/* ============================================================
   TEMAS OPS NAS DEMAIS PÁGINAS
   ============================================================ */

/* Base global para páginas de cadastro, monitoria, usuários, tokens etc */
body.theme-modelo-dark-ops,
body.theme-modelo-neon-ops {
    --ops-page-bg: #07172d;
    --ops-card-bg: rgba(10, 30, 57, .92);
    --ops-card-bg-2: rgba(5, 20, 42, .96);
    --ops-border: rgba(64, 178, 255, .18);
    --ops-text: #eef8ff;
    --ops-muted: #9fb5ce;
    --ops-primary: #35b8ff;
}

body.theme-modelo-neon-ops {
    --ops-page-bg: #030712;
    --ops-card-bg: rgba(7, 18, 39, .92);
    --ops-card-bg-2: rgba(3, 9, 24, .96);
    --ops-border: rgba(47, 140, 255, .22);
    --ops-primary: #22d3ee;
}

body.theme-modelo-light-ops {
    --ops-page-bg: #f7fafc;
    --ops-card-bg: #ffffff;
    --ops-card-bg-2: #f8fafc;
    --ops-border: #dbe8ee;
    --ops-text: #0f172a;
    --ops-muted: #64748b;
    --ops-primary: #0f8f9e;
}

body.theme-modelo-dark-ops .panel,
body.theme-modelo-dark-ops .table-wrapper,
body.theme-modelo-dark-ops .chart-card,
body.theme-modelo-dark-ops .summary-card,
body.theme-modelo-dark-ops .metric-card,
body.theme-modelo-dark-ops .card,
body.theme-modelo-dark-ops .filter-card,
body.theme-modelo-dark-ops .form-card,
body.theme-modelo-dark-ops .modal-card,
body.theme-modelo-neon-ops .panel,
body.theme-modelo-neon-ops .table-wrapper,
body.theme-modelo-neon-ops .chart-card,
body.theme-modelo-neon-ops .summary-card,
body.theme-modelo-neon-ops .metric-card,
body.theme-modelo-neon-ops .card,
body.theme-modelo-neon-ops .filter-card,
body.theme-modelo-neon-ops .form-card,
body.theme-modelo-neon-ops .modal-card,
body.theme-modelo-light-ops .panel,
body.theme-modelo-light-ops .table-wrapper,
body.theme-modelo-light-ops .chart-card,
body.theme-modelo-light-ops .summary-card,
body.theme-modelo-light-ops .metric-card,
body.theme-modelo-light-ops .card,
body.theme-modelo-light-ops .filter-card,
body.theme-modelo-light-ops .form-card,
body.theme-modelo-light-ops .modal-card {
    background: var(--ops-card-bg) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08) !important;
}

body.theme-modelo-dark-ops .panel-header h2,
body.theme-modelo-dark-ops h1,
body.theme-modelo-dark-ops h2,
body.theme-modelo-dark-ops h3,
body.theme-modelo-dark-ops table th,
body.theme-modelo-dark-ops table td,
body.theme-modelo-dark-ops label,
body.theme-modelo-neon-ops .panel-header h2,
body.theme-modelo-neon-ops h1,
body.theme-modelo-neon-ops h2,
body.theme-modelo-neon-ops h3,
body.theme-modelo-neon-ops table th,
body.theme-modelo-neon-ops table td,
body.theme-modelo-neon-ops label,
body.theme-modelo-light-ops .panel-header h2,
body.theme-modelo-light-ops h1,
body.theme-modelo-light-ops h2,
body.theme-modelo-light-ops h3,
body.theme-modelo-light-ops table th,
body.theme-modelo-light-ops table td,
body.theme-modelo-light-ops label {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops p,
body.theme-modelo-dark-ops small,
body.theme-modelo-dark-ops .muted,
body.theme-modelo-dark-ops .empty,
body.theme-modelo-neon-ops p,
body.theme-modelo-neon-ops small,
body.theme-modelo-neon-ops .muted,
body.theme-modelo-neon-ops .empty,
body.theme-modelo-light-ops p,
body.theme-modelo-light-ops small,
body.theme-modelo-light-ops .muted,
body.theme-modelo-light-ops .empty {
    color: var(--ops-muted) !important;
}

body.theme-modelo-dark-ops table thead,
body.theme-modelo-neon-ops table thead {
    background: rgba(13, 38, 70, .96) !important;
}

body.theme-modelo-light-ops table thead {
    background: #f1f7fa !important;
}

body.theme-modelo-dark-ops table tbody tr,
body.theme-modelo-neon-ops table tbody tr,
body.theme-modelo-light-ops table tbody tr {
    border-color: var(--ops-border) !important;
}

body.theme-modelo-dark-ops table tbody tr:hover,
body.theme-modelo-neon-ops table tbody tr:hover {
    background: rgba(35, 190, 240, .08) !important;
}

body.theme-modelo-light-ops table tbody tr:hover {
    background: #f2fbfc !important;
}

body.theme-modelo-dark-ops input,
body.theme-modelo-dark-ops select,
body.theme-modelo-dark-ops textarea,
body.theme-modelo-neon-ops input,
body.theme-modelo-neon-ops select,
body.theme-modelo-neon-ops textarea {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops input,
body.theme-modelo-light-ops select,
body.theme-modelo-light-ops textarea {
    background: #ffffff !important;
    border-color: #cfdde7 !important;
    color: #0f172a !important;
}

body.theme-modelo-dark-ops input::placeholder,
body.theme-modelo-dark-ops textarea::placeholder,
body.theme-modelo-neon-ops input::placeholder,
body.theme-modelo-neon-ops textarea::placeholder {
    color: #7890ad !important;
}

body.theme-modelo-light-ops input::placeholder,
body.theme-modelo-light-ops textarea::placeholder {
    color: #94a3b8 !important;
}

body.theme-modelo-dark-ops .btn-light,
body.theme-modelo-neon-ops .btn-light {
    background: rgba(15, 40, 72, .92) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .btn-light {
    background: #eef7fb !important;
    border-color: #d5edf1 !important;
    color: #0f8f9e !important;
}

body.theme-modelo-dark-ops .btn-primary,
body.theme-modelo-neon-ops .btn-primary,
body.theme-modelo-light-ops .btn-primary {
    background: linear-gradient(135deg, var(--ops-primary), #1164ff) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* Badges e detalhes da monitoria */
body.theme-modelo-dark-ops .detalhes-unificados-box,
body.theme-modelo-dark-ops .log-comunicacao-card,
body.theme-modelo-neon-ops .detalhes-unificados-box,
body.theme-modelo-neon-ops .log-comunicacao-card {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .detalhes-unificados-box,
body.theme-modelo-light-ops .log-comunicacao-card {
    background: #ffffff !important;
    border-color: #dbe8ee !important;
    color: #0f172a !important;
}


/* ============================================================
   AJUSTE MAPA INTEGRAÇÕES + LOGIN BRANCO
   ============================================================ */

.dashboard-model-map .map-node strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}

.dashboard-model-map .map-node-origin,
.dashboard-model-map .map-node-destination {
    display: inline-block;
}

.dashboard-model-map .map-node-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    color: #7dd3fc;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(125, 211, 252, .18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.dashboard-model-map .map-node small {
    color: #94a3b8 !important;
    font-weight: 700;
    letter-spacing: .02em;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node-arrow {
    color: #0f8f9e;
    background: rgba(15, 143, 158, .10);
    border-color: rgba(15, 143, 158, .16);
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node strong,
body.theme-modelo-neon-ops .dashboard-model-map .map-node strong,
body.theme-black-blue .dashboard-model-map .map-node strong {
    color: #eff8ff;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node strong {
    color: #0f172a;
}

body.theme-black-blue .dashboard-model-map .map-node small,
body.theme-modelo-dark-ops .dashboard-model-map .map-node small,
body.theme-modelo-neon-ops .dashboard-model-map .map-node small {
    color: #8ca3bf !important;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node small {
    color: #6b7280 !important;
}

/* Login: manter fundo branco limpo e remover faixa/camada cinza nos campos */
.login-monitoring-right {
    background: #ffffff !important;
}

.login-monitoring-right::before {
    opacity: .28;
}

.login-monitoring-form-card {
    background: #ffffff !important;
}

.login-monitoring-input {
    position: relative;
    background: #ffffff !important;
    border: 1px solid #d5e2ef !important;
    box-shadow: inset 0 0 0 9999px #ffffff !important;
}

.login-monitoring-input:focus-within {
    background: #ffffff !important;
    border-color: #20d7d0 !important;
    box-shadow: 0 0 0 4px rgba(32, 215, 208, .12), inset 0 0 0 9999px #ffffff !important;
}

.login-monitoring-input input,
.login-monitoring-input input:-webkit-autofill,
.login-monitoring-input input:-webkit-autofill:hover,
.login-monitoring-input input:-webkit-autofill:focus {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    background-image: none !important;
}

.login-monitoring-eye {
    background: transparent !important;
}


/* Ajuste contador à direita no mapa */
.map-node-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.dashboard-model-map .map-node-head strong {
    flex: 1 1 auto;
    justify-content: flex-start;
}

.dashboard-model-map .map-node-head small {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    align-self: flex-start;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node-head,
body.theme-modelo-light-ops .dashboard-model-map .map-node-head,
body.theme-modelo-neon-ops .dashboard-model-map .map-node-head,
body.theme-black-blue .dashboard-model-map .map-node-head {
    align-items: center;
}


/* ============================================================
   AJUSTES OPS - MONITORIA + LIGHT LOGO
   ============================================================ */
body.theme-modelo-light-ops .sidebar .brand-icon.brand-icon-image,
body.theme-modelo-light-ops .sidebar .brand-icon.brand-icon-image img {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

body.theme-modelo-light-ops .sidebar .brand-icon.brand-icon-image {
    padding: 0 !important;
}

body.theme-modelo-light-ops .sidebar .brand-icon.brand-icon-image img {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

body.theme-modelo-dark-ops .monitoria-ops-metrics,
body.theme-modelo-light-ops .monitoria-ops-metrics,
body.theme-modelo-neon-ops .monitoria-ops-metrics {
    margin-bottom: 18px;
}

body.theme-modelo-dark-ops .panel,
body.theme-modelo-neon-ops .panel,
body.theme-modelo-light-ops .panel {
    overflow: visible;
}

body.theme-modelo-dark-ops .selected-filters-panel,
body.theme-modelo-neon-ops .selected-filters-panel,
body.theme-modelo-light-ops .selected-filters-panel,
body.theme-modelo-dark-ops .status-filter-options,
body.theme-modelo-neon-ops .status-filter-options,
body.theme-modelo-light-ops .status-filter-options,
body.theme-modelo-dark-ops .autocomplete-suggestions,
body.theme-modelo-neon-ops .autocomplete-suggestions,
body.theme-modelo-light-ops .autocomplete-suggestions,
body.theme-modelo-dark-ops .cliente-integracoes-box,
body.theme-modelo-neon-ops .cliente-integracoes-box,
body.theme-modelo-light-ops .cliente-integracoes-box,
body.theme-modelo-dark-ops .detalhes-unificados-box,
body.theme-modelo-neon-ops .detalhes-unificados-box,
body.theme-modelo-light-ops .detalhes-unificados-box,
body.theme-modelo-dark-ops .atributo-card,
body.theme-modelo-neon-ops .atributo-card,
body.theme-modelo-light-ops .atributo-card,
body.theme-modelo-dark-ops .comunicacao-item,
body.theme-modelo-neon-ops .comunicacao-item,
body.theme-modelo-light-ops .comunicacao-item {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .selected-filters-panel,
body.theme-modelo-light-ops .status-filter-options,
body.theme-modelo-light-ops .autocomplete-suggestions,
body.theme-modelo-light-ops .cliente-integracoes-box,
body.theme-modelo-light-ops .detalhes-unificados-box,
body.theme-modelo-light-ops .atributo-card,
body.theme-modelo-light-ops .comunicacao-item {
    background: #ffffff !important;
}

body.theme-modelo-dark-ops .filter-chip,
body.theme-modelo-neon-ops .filter-chip {
    background: rgba(24, 48, 84, .92) !important;
    color: #dff5ff !important;
}

body.theme-modelo-light-ops .filter-chip {
    background: #eef8ff !important;
    color: #0f517a !important;
}

body.theme-modelo-dark-ops .filter-chip strong,
body.theme-modelo-neon-ops .filter-chip strong {
    color: #8fb4d9 !important;
}

body.theme-modelo-light-ops .filter-chip strong {
    color: #4b6380 !important;
}

body.theme-modelo-dark-ops .autocomplete-suggestion,
body.theme-modelo-neon-ops .autocomplete-suggestion,
body.theme-modelo-light-ops .autocomplete-suggestion {
    color: var(--ops-text) !important;
    background: transparent !important;
}

body.theme-modelo-dark-ops .autocomplete-suggestion:hover,
body.theme-modelo-dark-ops .autocomplete-suggestion.active,
body.theme-modelo-neon-ops .autocomplete-suggestion:hover,
body.theme-modelo-neon-ops .autocomplete-suggestion.active {
    background: rgba(34, 211, 238, .10) !important;
}

body.theme-modelo-light-ops .autocomplete-suggestion:hover,
body.theme-modelo-light-ops .autocomplete-suggestion.active {
    background: #f2fbfc !important;
}

body.theme-modelo-dark-ops .selected-filters-panel strong,
body.theme-modelo-dark-ops .selected-filters-panel .muted,
body.theme-modelo-neon-ops .selected-filters-panel strong,
body.theme-modelo-neon-ops .selected-filters-panel .muted,
body.theme-modelo-light-ops .selected-filters-panel strong,
body.theme-modelo-light-ops .selected-filters-panel .muted,
body.theme-modelo-dark-ops .detalhes-section-title,
body.theme-modelo-neon-ops .detalhes-section-title,
body.theme-modelo-light-ops .detalhes-section-title,
body.theme-modelo-dark-ops .atributo-card strong,
body.theme-modelo-dark-ops .atributo-card span,
body.theme-modelo-neon-ops .atributo-card strong,
body.theme-modelo-neon-ops .atributo-card span,
body.theme-modelo-light-ops .atributo-card strong,
body.theme-modelo-light-ops .atributo-card span,
body.theme-modelo-dark-ops .comunicacao-item *,
body.theme-modelo-neon-ops .comunicacao-item *,
body.theme-modelo-light-ops .comunicacao-item * {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops table,
body.theme-modelo-neon-ops table,
body.theme-modelo-light-ops table {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops table th,
body.theme-modelo-dark-ops table td,
body.theme-modelo-neon-ops table th,
body.theme-modelo-neon-ops table td,
body.theme-modelo-light-ops table th,
body.theme-modelo-light-ops table td,
body.theme-modelo-dark-ops .nested-table th,
body.theme-modelo-dark-ops .nested-table td,
body.theme-modelo-neon-ops .nested-table th,
body.theme-modelo-neon-ops .nested-table td,
body.theme-modelo-light-ops .nested-table th,
body.theme-modelo-light-ops .nested-table td {
    color: var(--ops-text) !important;
    border-color: var(--ops-border) !important;
}

body.theme-modelo-dark-ops .table-wrapper table thead,
body.theme-modelo-neon-ops .table-wrapper table thead {
    background: rgba(10, 28, 56, .98) !important;
}

body.theme-modelo-light-ops .table-wrapper table thead {
    background: #f0f8fb !important;
}

body.theme-modelo-dark-ops .table-wrapper tbody tr,
body.theme-modelo-neon-ops .table-wrapper tbody tr,
body.theme-modelo-light-ops .table-wrapper tbody tr {
    background: transparent !important;
}

body.theme-modelo-dark-ops .table-wrapper tbody tr.row-error,
body.theme-modelo-neon-ops .table-wrapper tbody tr.row-error {
    background: rgba(127, 29, 29, .12) !important;
}

body.theme-modelo-light-ops .table-wrapper tbody tr.row-error {
    background: rgba(239, 68, 68, .05) !important;
}

body.theme-modelo-dark-ops .status-check,
body.theme-modelo-neon-ops .status-check,
body.theme-modelo-light-ops .status-check {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .more-actions .muted,
body.theme-modelo-neon-ops .more-actions .muted,
body.theme-modelo-light-ops .more-actions .muted,
body.theme-modelo-dark-ops .select-column .muted,
body.theme-modelo-neon-ops .select-column .muted,
body.theme-modelo-light-ops .select-column .muted {
    color: var(--ops-muted) !important;
}

body.theme-modelo-dark-ops .btn-details,
body.theme-modelo-dark-ops .action-menu-btn,
body.theme-modelo-neon-ops .btn-details,
body.theme-modelo-neon-ops .action-menu-btn {
    background: rgba(15, 40, 72, .92) !important;
    border-color: var(--ops-border) !important;
    color: #eff8ff !important;
}

body.theme-modelo-light-ops .btn-details,
body.theme-modelo-light-ops .action-menu-btn {
    background: #eef7fb !important;
    border-color: #d5edf1 !important;
    color: #0f8f9e !important;
}


/* ============================================================
   HOTFIX MONITORIA OPS
   - corrige alinhamento dos cards superiores
   - corrige contraste/visibilidade dos dados nas tabelas
   - corrige fundo do bloco de status/filtros nos temas ops
   ============================================================ */
body.theme-modelo-dark-ops .monitoria-ops-metrics,
body.theme-modelo-light-ops .monitoria-ops-metrics,
body.theme-modelo-neon-ops .monitoria-ops-metrics {
    padding-inline: 16px;
    box-sizing: border-box;
    align-items: stretch;
}

body.theme-modelo-dark-ops .monitoria-ops-metrics .dashboard-model-card,
body.theme-modelo-light-ops .monitoria-ops-metrics .dashboard-model-card,
body.theme-modelo-neon-ops .monitoria-ops-metrics .dashboard-model-card {
    width: 100%;
}

body.theme-modelo-dark-ops .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
body.theme-modelo-dark-ops .filters-autocomplete .status-filter-options,
body.theme-modelo-neon-ops .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
body.theme-modelo-neon-ops .filters-autocomplete .status-filter-options {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .filters.filters-autocomplete > div:nth-of-type(7) .status-filter-options,
body.theme-modelo-light-ops .filters-autocomplete .status-filter-options {
    background: #ffffff !important;
    border-color: #dbe8ee !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .status-check,
body.theme-modelo-dark-ops .status-check .badge,
body.theme-modelo-neon-ops .status-check,
body.theme-modelo-neon-ops .status-check .badge,
body.theme-modelo-light-ops .status-check,
body.theme-modelo-light-ops .status-check .badge {
    color: inherit !important;
}

body.theme-modelo-dark-ops .selected-filters-panel,
body.theme-modelo-neon-ops .selected-filters-panel {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .selected-filters-panel {
    background: #ffffff !important;
    border-color: #dbe8ee !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .selected-filters-panel strong,
body.theme-modelo-dark-ops .selected-filters-panel .muted,
body.theme-modelo-neon-ops .selected-filters-panel strong,
body.theme-modelo-neon-ops .selected-filters-panel .muted,
body.theme-modelo-light-ops .selected-filters-panel strong,
body.theme-modelo-light-ops .selected-filters-panel .muted {
    color: inherit !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody td,
body.theme-modelo-neon-ops .table-wrapper table tbody td {
    background: var(--ops-card-bg-2) !important;
    color: var(--ops-text) !important;
    border-color: var(--ops-border) !important;
}

body.theme-modelo-light-ops .table-wrapper table tbody td {
    background: #ffffff !important;
    color: var(--ops-text) !important;
    border-color: var(--ops-border) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody tr:nth-child(even) td {
    background: rgba(9, 26, 49, .98) !important;
}

body.theme-modelo-neon-ops .table-wrapper table tbody tr:nth-child(even) td {
    background: rgba(5, 15, 32, .98) !important;
}

body.theme-modelo-light-ops .table-wrapper table tbody tr:nth-child(even) td {
    background: #fbfdff !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody tr:hover td {
    background: rgba(35, 184, 255, .12) !important;
}

body.theme-modelo-neon-ops .table-wrapper table tbody tr:hover td {
    background: rgba(34, 211, 238, .10) !important;
}

body.theme-modelo-light-ops .table-wrapper table tbody tr:hover td {
    background: #f2fbfc !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody tr.row-error td {
    background: rgba(127, 29, 29, .18) !important;
    border-color: rgba(248, 113, 113, .25) !important;
}

body.theme-modelo-neon-ops .table-wrapper table tbody tr.row-error td {
    background: rgba(127, 29, 29, .16) !important;
    border-color: rgba(248, 113, 113, .22) !important;
}

body.theme-modelo-light-ops .table-wrapper table tbody tr.row-error td {
    background: rgba(254, 242, 242, .98) !important;
    border-color: rgba(248, 113, 113, .22) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody tr td .muted,
body.theme-modelo-dark-ops .table-wrapper table tbody tr td small,
body.theme-modelo-neon-ops .table-wrapper table tbody tr td .muted,
body.theme-modelo-neon-ops .table-wrapper table tbody tr td small {
    color: var(--ops-muted) !important;
}

body.theme-modelo-light-ops .table-wrapper table tbody tr td .muted,
body.theme-modelo-light-ops .table-wrapper table tbody tr td small {
    color: #64748b !important;
}

@media (max-width: 900px) {
    body.theme-modelo-dark-ops .monitoria-ops-metrics,
    body.theme-modelo-light-ops .monitoria-ops-metrics,
    body.theme-modelo-neon-ops .monitoria-ops-metrics {
        padding-inline: 0;
    }
}


/* ============================================================
   HOTFIX MONITORIA OPS V3
   - alinha cards superiores com os painéis abaixo
   - melhora contraste do status/filtros
   - força visibilidade do conteúdo nas grids/tabelas
   ============================================================ */
body.theme-modelo-dark-ops .monitoria-ops-metrics,
body.theme-modelo-light-ops .monitoria-ops-metrics,
body.theme-modelo-neon-ops .monitoria-ops-metrics {
    margin: 0 34px 20px !important;
    padding: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    body.theme-modelo-dark-ops .monitoria-ops-metrics,
    body.theme-modelo-light-ops .monitoria-ops-metrics,
    body.theme-modelo-neon-ops .monitoria-ops-metrics {
        margin: 0 16px 16px !important;
    }
}

body.theme-modelo-dark-ops .status-filter-options,
body.theme-modelo-neon-ops .status-filter-options {
    background: rgba(7, 22, 42, .98) !important;
    border: 1px solid rgba(64, 178, 255, .22) !important;
}

body.theme-modelo-light-ops .status-filter-options {
    background: #ffffff !important;
    border: 1px solid #dbe8ee !important;
}

body.theme-modelo-dark-ops .status-check,
body.theme-modelo-neon-ops .status-check,
body.theme-modelo-light-ops .status-check {
    opacity: 1 !important;
}

body.theme-modelo-dark-ops .status-check input[type="checkbox"],
body.theme-modelo-neon-ops .status-check input[type="checkbox"],
body.theme-modelo-light-ops .status-check input[type="checkbox"] {
    accent-color: #35b8ff !important;
    filter: none !important;
}

body.theme-modelo-dark-ops .status-check .badge.badge-pendente,
body.theme-modelo-neon-ops .status-check .badge.badge-pendente {
    background: rgba(255,255,255,.96) !important;
    color: #243b63 !important;
}
body.theme-modelo-dark-ops .status-check .badge.badge-success,
body.theme-modelo-neon-ops .status-check .badge.badge-success {
    background: rgba(220, 252, 231, .96) !important;
    color: #0f6a3f !important;
}
body.theme-modelo-dark-ops .status-check .badge.badge-danger,
body.theme-modelo-neon-ops .status-check .badge.badge-danger {
    background: rgba(254, 226, 226, .96) !important;
    color: #b42318 !important;
}
body.theme-modelo-dark-ops .status-check .badge.badge-info,
body.theme-modelo-neon-ops .status-check .badge.badge-info {
    background: rgba(224, 242, 254, .96) !important;
    color: #0f5f8f !important;
}

body.theme-modelo-light-ops .status-check .badge.badge-pendente {
    background: #ffffff !important; color: #243b63 !important; border: 1px solid #d9e2ee !important;
}
body.theme-modelo-light-ops .status-check .badge.badge-success {
    background: #dcfce7 !important; color: #0f6a3f !important;
}
body.theme-modelo-light-ops .status-check .badge.badge-danger {
    background: #fee2e2 !important; color: #b42318 !important;
}
body.theme-modelo-light-ops .status-check .badge.badge-info {
    background: #e0f2fe !important; color: #0f5f8f !important;
}

body.theme-modelo-dark-ops .selected-filters-panel,
body.theme-modelo-neon-ops .selected-filters-panel {
    background: rgba(4, 18, 38, .98) !important;
}

body.theme-modelo-dark-ops .selected-filters-panel,
body.theme-modelo-dark-ops .selected-filters-panel *,
body.theme-modelo-neon-ops .selected-filters-panel,
body.theme-modelo-neon-ops .selected-filters-panel *,
body.theme-modelo-light-ops .selected-filters-panel,
body.theme-modelo-light-ops .selected-filters-panel * {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody td,
body.theme-modelo-dark-ops .table-wrapper table tbody td strong,
body.theme-modelo-dark-ops .table-wrapper table tbody td a,
body.theme-modelo-dark-ops .table-wrapper table tbody td button,
body.theme-modelo-neon-ops .table-wrapper table tbody td,
body.theme-modelo-neon-ops .table-wrapper table tbody td strong,
body.theme-modelo-neon-ops .table-wrapper table tbody td a,
body.theme-modelo-neon-ops .table-wrapper table tbody td button,
body.theme-modelo-light-ops .table-wrapper table tbody td,
body.theme-modelo-light-ops .table-wrapper table tbody td strong,
body.theme-modelo-light-ops .table-wrapper table tbody td a,
body.theme-modelo-light-ops .table-wrapper table tbody td button {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody td .muted,
body.theme-modelo-dark-ops .table-wrapper table tbody td small,
body.theme-modelo-neon-ops .table-wrapper table tbody td .muted,
body.theme-modelo-neon-ops .table-wrapper table tbody td small,
body.theme-modelo-light-ops .table-wrapper table tbody td .muted,
body.theme-modelo-light-ops .table-wrapper table tbody td small {
    color: var(--ops-muted) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody tr.row-error td strong,
body.theme-modelo-dark-ops .table-wrapper table tbody tr.row-error td,
body.theme-modelo-neon-ops .table-wrapper table tbody tr.row-error td strong,
body.theme-modelo-neon-ops .table-wrapper table tbody tr.row-error td,
body.theme-modelo-light-ops .table-wrapper table tbody tr.row-error td strong,
body.theme-modelo-light-ops .table-wrapper table tbody tr.row-error td {
    color: var(--ops-text) !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody td .badge,
body.theme-modelo-neon-ops .table-wrapper table tbody td .badge,
body.theme-modelo-light-ops .table-wrapper table tbody td .badge {
    font-weight: 800 !important;
}

body.theme-modelo-dark-ops .table-wrapper table tbody td .badge.badge-pendente,
body.theme-modelo-neon-ops .table-wrapper table tbody td .badge.badge-pendente,
body.theme-modelo-light-ops .table-wrapper table tbody td .badge.badge-pendente {
    color: #243b63 !important;
}
body.theme-modelo-dark-ops .table-wrapper table tbody td .badge.badge-success,
body.theme-modelo-neon-ops .table-wrapper table tbody td .badge.badge-success,
body.theme-modelo-light-ops .table-wrapper table tbody td .badge.badge-success {
    color: #0f6a3f !important;
}
body.theme-modelo-dark-ops .table-wrapper table tbody td .badge.badge-danger,
body.theme-modelo-neon-ops .table-wrapper table tbody td .badge.badge-danger,
body.theme-modelo-light-ops .table-wrapper table tbody td .badge.badge-danger {
    color: #b42318 !important;
}
body.theme-modelo-dark-ops .table-wrapper table tbody td .badge.badge-info,
body.theme-modelo-neon-ops .table-wrapper table tbody td .badge.badge-info,
body.theme-modelo-light-ops .table-wrapper table tbody td .badge.badge-info {
    color: #0f5f8f !important;
}

body.theme-modelo-dark-ops .btn-details,
body.theme-modelo-dark-ops .btn-detalhes-agrupado,
body.theme-modelo-dark-ops .action-menu-btn,
body.theme-modelo-neon-ops .btn-details,
body.theme-modelo-neon-ops .btn-detalhes-agrupado,
body.theme-modelo-neon-ops .action-menu-btn {
    color: #eef8ff !important;
}


/* ============================================================
   HOTFIX MODAL MOTIVO - respeitar tema selecionado
   ============================================================ */

/* Backdrop mais coerente nos temas escuros */
body.theme-modelo-dark-ops .motivo-modal-backdrop,
body.theme-modelo-neon-ops .motivo-modal-backdrop,
body.theme-black-blue .motivo-modal-backdrop,
body.theme-escuro-ciano .motivo-modal-backdrop,
body.theme-escuro-verde .motivo-modal-backdrop {
    background: rgba(1, 8, 20, .72) !important;
    backdrop-filter: blur(8px) !important;
}

/* Modal escuro */
body.theme-modelo-dark-ops .motivo-modal-card,
body.theme-black-blue .motivo-modal-card,
body.theme-escuro-ciano .motivo-modal-card,
body.theme-escuro-verde .motivo-modal-card {
    background: linear-gradient(180deg, #081a33 0%, #061529 100%) !important;
    border: 1px solid rgba(80, 170, 255, .22) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255,255,255,.04) !important;
    color: #eef8ff !important;
}

body.theme-modelo-neon-ops .motivo-modal-card {
    background: linear-gradient(180deg, #071327 0%, #030712 100%) !important;
    border: 1px solid rgba(34, 211, 238, .28) !important;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .68), 0 0 42px rgba(34, 211, 238, .08), inset 0 1px 0 rgba(255,255,255,.04) !important;
    color: #e5eefc !important;
}

/* Textos do modal nos temas escuros */
body.theme-modelo-dark-ops .motivo-modal-eyebrow,
body.theme-black-blue .motivo-modal-eyebrow,
body.theme-escuro-ciano .motivo-modal-eyebrow,
body.theme-escuro-verde .motivo-modal-eyebrow {
    color: #22c55e !important;
}

body.theme-modelo-neon-ops .motivo-modal-eyebrow {
    color: #22d3ee !important;
}

body.theme-modelo-dark-ops .motivo-modal-header h3,
body.theme-modelo-dark-ops .motivo-modal-label,
body.theme-modelo-dark-ops .motivo-modal-counter,
body.theme-modelo-dark-ops .motivo-modal-card,
body.theme-modelo-dark-ops .motivo-modal-card *,
body.theme-modelo-neon-ops .motivo-modal-header h3,
body.theme-modelo-neon-ops .motivo-modal-label,
body.theme-modelo-neon-ops .motivo-modal-counter,
body.theme-modelo-neon-ops .motivo-modal-card,
body.theme-modelo-neon-ops .motivo-modal-card *,
body.theme-black-blue .motivo-modal-header h3,
body.theme-black-blue .motivo-modal-label,
body.theme-black-blue .motivo-modal-counter,
body.theme-black-blue .motivo-modal-card,
body.theme-black-blue .motivo-modal-card *,
body.theme-escuro-ciano .motivo-modal-header h3,
body.theme-escuro-ciano .motivo-modal-label,
body.theme-escuro-ciano .motivo-modal-counter,
body.theme-escuro-ciano .motivo-modal-card,
body.theme-escuro-ciano .motivo-modal-card *,
body.theme-escuro-verde .motivo-modal-header h3,
body.theme-escuro-verde .motivo-modal-label,
body.theme-escuro-verde .motivo-modal-counter,
body.theme-escuro-verde .motivo-modal-card,
body.theme-escuro-verde .motivo-modal-card * {
    color: #eef8ff !important;
}

body.theme-modelo-neon-ops .motivo-modal-card *,
body.theme-modelo-neon-ops .motivo-modal-header h3,
body.theme-modelo-neon-ops .motivo-modal-label {
    color: #e5eefc !important;
}

body.theme-modelo-dark-ops .motivo-modal-header p,
body.theme-modelo-neon-ops .motivo-modal-header p,
body.theme-black-blue .motivo-modal-header p,
body.theme-escuro-ciano .motivo-modal-header p,
body.theme-escuro-verde .motivo-modal-header p {
    color: #9fb5ce !important;
}

/* Textarea coerente com o tema */
body.theme-modelo-dark-ops .motivo-modal-textarea,
body.theme-black-blue .motivo-modal-textarea,
body.theme-escuro-ciano .motivo-modal-textarea,
body.theme-escuro-verde .motivo-modal-textarea {
    background: #061124 !important;
    border: 1px solid rgba(80, 170, 255, .30) !important;
    color: #eef8ff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03) !important;
}

body.theme-modelo-neon-ops .motivo-modal-textarea {
    background: #030916 !important;
    border: 1px solid rgba(34, 211, 238, .34) !important;
    color: #e5eefc !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 0 24px rgba(34,211,238,.06) !important;
}

body.theme-modelo-dark-ops .motivo-modal-textarea::placeholder,
body.theme-modelo-neon-ops .motivo-modal-textarea::placeholder,
body.theme-black-blue .motivo-modal-textarea::placeholder,
body.theme-escuro-ciano .motivo-modal-textarea::placeholder,
body.theme-escuro-verde .motivo-modal-textarea::placeholder {
    color: #8aa5c2 !important;
}

body.theme-modelo-dark-ops .motivo-modal-textarea:focus,
body.theme-black-blue .motivo-modal-textarea:focus,
body.theme-escuro-ciano .motivo-modal-textarea:focus,
body.theme-escuro-verde .motivo-modal-textarea:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .12), inset 0 1px 0 rgba(255,255,255,.03) !important;
}

body.theme-modelo-neon-ops .motivo-modal-textarea:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .14), inset 0 1px 0 rgba(255,255,255,.03) !important;
}

/* Botão fechar/cancelar coerentes */
body.theme-modelo-dark-ops .motivo-modal-close,
body.theme-modelo-neon-ops .motivo-modal-close,
body.theme-black-blue .motivo-modal-close,
body.theme-escuro-ciano .motivo-modal-close,
body.theme-escuro-verde .motivo-modal-close {
    background: rgba(15, 40, 72, .92) !important;
    border-color: rgba(80, 170, 255, .24) !important;
    color: #dbeafe !important;
}

body.theme-modelo-dark-ops .motivo-modal-close:hover,
body.theme-modelo-neon-ops .motivo-modal-close:hover,
body.theme-black-blue .motivo-modal-close:hover,
body.theme-escuro-ciano .motivo-modal-close:hover,
body.theme-escuro-verde .motivo-modal-close:hover {
    background: rgba(35, 184, 255, .14) !important;
}

body.theme-modelo-dark-ops .motivo-modal-actions .btn-light,
body.theme-modelo-neon-ops .motivo-modal-actions .btn-light,
body.theme-black-blue .motivo-modal-actions .btn-light,
body.theme-escuro-ciano .motivo-modal-actions .btn-light,
body.theme-escuro-verde .motivo-modal-actions .btn-light {
    background: rgba(15, 40, 72, .92) !important;
    border-color: rgba(80, 170, 255, .24) !important;
    color: #eef8ff !important;
}

/* Light Ops também harmonizado, sem mudar para escuro */
body.theme-modelo-light-ops .motivo-modal-card {
    background: #ffffff !important;
    border-color: #dbe8ee !important;
    color: #0f172a !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .18) !important;
}

body.theme-modelo-light-ops .motivo-modal-header h3,
body.theme-modelo-light-ops .motivo-modal-label {
    color: #0f172a !important;
}

body.theme-modelo-light-ops .motivo-modal-header p,
body.theme-modelo-light-ops .motivo-modal-counter {
    color: #64748b !important;
}

body.theme-modelo-light-ops .motivo-modal-textarea {
    background: #ffffff !important;
    border-color: #bfe8e7 !important;
    color: #0f172a !important;
}

body.theme-modelo-light-ops .motivo-modal-textarea:focus {
    border-color: #0f9aa8 !important;
    box-shadow: 0 0 0 4px rgba(15, 154, 168, .12) !important;
}


/* ============================================================
   HOTFIX MENU LATERAL REDUZIDO - ícones centralizados
   ============================================================ */

/* Quando o menu está recolhido, força o eixo central exato */
.sidebar:not(:hover) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar:not(:hover) .sidebar-brand {
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.sidebar:not(:hover) .brand-icon,
.sidebar:not(:hover) .brand-icon.brand-icon-image {
    margin-left: auto !important;
    margin-right: auto !important;
}

.sidebar:not(:hover) nav {
    width: 100% !important;
    align-items: center !important;
    padding: 0 !important;
}

.sidebar:not(:hover) nav a {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0 !important;
}

.sidebar:not(:hover) nav a .menu-icon {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.sidebar:not(:hover) nav a .nav-svg,
.sidebar:not(:hover) nav a .menu-icon svg {
    position: static !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin: 0 !important;
    transform: none !important;
}

.sidebar:not(:hover) nav a .menu-text,
.sidebar:not(:hover) .brand-text {
    display: none !important;
}

/* Ao expandir, volta o comportamento normal com texto */
.sidebar:hover {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.sidebar:hover .sidebar-brand {
    justify-content: flex-start !important;
}

.sidebar:hover nav {
    align-items: stretch !important;
}

.sidebar:hover nav a .menu-icon {
    position: static !important;
    transform: none !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
}

.sidebar:hover nav a .menu-text,
.sidebar:hover .brand-text {
    display: block !important;
}


/* ============================================================
   FILTRO EM TEMPO REAL - LOGS DETALHADOS / CHAVE
   ============================================================ */
.th-chave-filtro {
    min-width: 280px;
}

.logs-chave-filter-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logs-chave-filter-head span {
    flex: 0 0 auto;
}

.logs-chave-filter-input {
    height: 34px !important;
    min-height: 34px !important;
    width: min(210px, 100%) !important;
    padding: 0 11px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 34px !important;
}

.logs-chave-filter-info {
    font-weight: 800;
}

body.theme-modelo-dark-ops .logs-chave-filter-input,
body.theme-modelo-neon-ops .logs-chave-filter-input {
    background: rgba(4, 18, 38, .98) !important;
    color: #eef8ff !important;
    border: 1px solid rgba(64, 178, 255, .24) !important;
}

body.theme-modelo-dark-ops .logs-chave-filter-input::placeholder,
body.theme-modelo-neon-ops .logs-chave-filter-input::placeholder {
    color: #8aa5c2 !important;
}

body.theme-modelo-dark-ops .logs-chave-filter-input:focus,
body.theme-modelo-neon-ops .logs-chave-filter-input:focus {
    border-color: #35b8ff !important;
    box-shadow: 0 0 0 3px rgba(53, 184, 255, .14) !important;
}

body.theme-modelo-light-ops .logs-chave-filter-input {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cfdde7 !important;
}

body.theme-modelo-light-ops .logs-chave-filter-input::placeholder {
    color: #94a3b8 !important;
}

body.theme-modelo-light-ops .logs-chave-filter-input:focus {
    border-color: #0f9aa8 !important;
    box-shadow: 0 0 0 3px rgba(15, 154, 168, .12) !important;
}

@media (max-width: 900px) {
    .logs-chave-filter-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .logs-chave-filter-input {
        width: 180px !important;
    }
}


/* ============================================================
   FILTRO EXCEL - LOGS DETALHADOS / CHAVE
   ============================================================ */
.th-chave-filtro {
    min-width: 255px;
    position: relative;
}

.excel-filter-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.excel-filter-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, .35);
    background: rgba(255, 255, 255, .08);
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.excel-filter-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.excel-filter-btn:hover,
.excel-filter-btn.active {
    color: #22c55e;
    border-color: rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .12);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .08);
}

.excel-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 330px;
    max-width: calc(100vw - 32px);
    z-index: 10030;
    display: none;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .25);
    color: #0f172a;
    text-transform: none;
    letter-spacing: normal;
}

.excel-filter-panel.open {
    display: block;
}

.excel-filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.excel-filter-title strong {
    font-size: 13px;
    font-weight: 900;
    color: inherit;
}

.excel-filter-title button {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.excel-filter-search {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 10px !important;
    padding: 0 11px !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
}

.excel-filter-select-all,
.excel-filter-chave-item {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.excel-filter-select-all {
    padding: 8px 6px 10px;
    border-bottom: 1px solid #e5edf6;
    margin-bottom: 6px;
}

.excel-filter-list {
    max-height: 250px;
    overflow: auto;
    padding: 4px 2px;
}

.excel-filter-chave-item {
    min-height: 31px;
    padding: 5px 6px;
    border-radius: 8px;
}

.excel-filter-chave-item:hover {
    background: #f1f5f9;
}

.excel-filter-chave-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.excel-filter-select-all input,
.excel-filter-chave-item input {
    width: 15px !important;
    min-width: 15px !important;
    height: 15px !important;
    min-height: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #16a34a;
}

.excel-filter-empty {
    padding: 14px 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.excel-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #e5edf6;
}

.excel-filter-footer .btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
}

/* Temas escuros */
body.theme-modelo-dark-ops .excel-filter-panel,
body.theme-modelo-neon-ops .excel-filter-panel {
    background: #061124;
    border-color: rgba(64, 178, 255, .26);
    color: #eef8ff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .58);
}

body.theme-modelo-neon-ops .excel-filter-panel {
    background: #030916;
    border-color: rgba(34, 211, 238, .30);
    color: #e5eefc;
}

body.theme-modelo-dark-ops .excel-filter-title button,
body.theme-modelo-neon-ops .excel-filter-title button {
    background: rgba(15, 40, 72, .92);
    border-color: rgba(64, 178, 255, .22);
    color: #dbeafe;
}

body.theme-modelo-dark-ops .excel-filter-search,
body.theme-modelo-neon-ops .excel-filter-search {
    background: rgba(4, 18, 38, .98) !important;
    border-color: rgba(64, 178, 255, .24) !important;
    color: #eef8ff !important;
}

body.theme-modelo-neon-ops .excel-filter-search {
    border-color: rgba(34, 211, 238, .28) !important;
}

body.theme-modelo-dark-ops .excel-filter-search::placeholder,
body.theme-modelo-neon-ops .excel-filter-search::placeholder {
    color: #8aa5c2 !important;
}

body.theme-modelo-dark-ops .excel-filter-select-all,
body.theme-modelo-neon-ops .excel-filter-select-all,
body.theme-modelo-dark-ops .excel-filter-footer,
body.theme-modelo-neon-ops .excel-filter-footer {
    border-color: rgba(64, 178, 255, .18);
}

body.theme-modelo-dark-ops .excel-filter-chave-item:hover,
body.theme-modelo-neon-ops .excel-filter-chave-item:hover {
    background: rgba(34, 211, 238, .10);
}

/* Light Ops */
body.theme-modelo-light-ops .excel-filter-panel {
    background: #ffffff;
    border-color: #dbe8ee;
    color: #0f172a;
}

body.theme-modelo-light-ops .excel-filter-search {
    background: #ffffff !important;
    border-color: #cfdde7 !important;
    color: #0f172a !important;
}

body.theme-modelo-light-ops .excel-filter-btn.active,
body.theme-modelo-light-ops .excel-filter-btn:hover {
    color: #0f8f9e;
    border-color: rgba(15, 143, 158, .35);
    background: rgba(15, 143, 158, .10);
}

@media (max-width: 900px) {
    .excel-filter-panel {
        left: 0;
        right: auto;
        width: 300px;
    }
}


/* ============================================================
   HOTFIX FILTRO EXCEL - painel fora da grid/tabela
   ============================================================ */
.excel-filter-panel {
    position: fixed !important;
    top: auto;
    right: auto;
    left: 12px;
    z-index: 2147483000 !important;
    max-height: calc(100vh - 24px);
}

.excel-filter-panel.open {
    display: block !important;
}

.excel-filter-panel .excel-filter-list {
    max-height: min(250px, calc(100vh - 235px));
}

@media (max-width: 900px) {
    .excel-filter-panel {
        left: 12px !important;
        right: auto !important;
        width: calc(100vw - 24px) !important;
    }
}


/* ============================================================
   AJUSTES DASHBOARD OPS - LOGS 9 / ALERTAS / MODOS DE GRÁFICO
   ============================================================ */

/* 1) Logs em tempo real: comporta 9 registros */
body.theme-modelo-dark-ops .logs-panel,
body.theme-modelo-light-ops .logs-panel,
body.theme-modelo-neon-ops .logs-panel {
    min-height: 248px !important;
}

body.theme-modelo-dark-ops .dashboard-model-log-list div,
body.theme-modelo-light-ops .dashboard-model-log-list div,
body.theme-modelo-neon-ops .dashboard-model-log-list div {
    min-height: 26px !important;
}

/* 2) Alertas ativos com a mesma presença visual do Mapa */
body.theme-modelo-dark-ops .alerts-panel,
body.theme-modelo-light-ops .alerts-panel,
body.theme-modelo-neon-ops .alerts-panel,
body.theme-modelo-dark-ops .map-panel,
body.theme-modelo-light-ops .map-panel,
body.theme-modelo-neon-ops .map-panel {
    min-height: 248px !important;
    max-height: none !important;
}

body.theme-modelo-dark-ops .dashboard-model-alert-list,
body.theme-modelo-light-ops .dashboard-model-alert-list,
body.theme-modelo-neon-ops .dashboard-model-alert-list {
    min-height: 184px !important;
}

/* 3) Modos de gráfico em Erros por integração */
.erros-integracao-header {
    align-items: flex-start;
}

.erros-integracao-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chart-mode-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.chart-mode-tabs a {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .24);
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    background: rgba(255,255,255,.04);
}

.chart-mode-tabs a:hover,
.chart-mode-tabs a.active {
    color: #35b8ff;
    border-color: rgba(53, 184, 255, .36);
    background: rgba(53, 184, 255, .12);
}

body.theme-modelo-light-ops .chart-mode-tabs a {
    background: #f8fafc;
    border-color: #dbe8ee;
    color: #334155;
}

body.theme-modelo-light-ops .chart-mode-tabs a:hover,
body.theme-modelo-light-ops .chart-mode-tabs a.active {
    color: #0f8f9e;
    background: #eaf9fb;
    border-color: #bfeef3;
}

.erro-chart {
    min-height: 150px;
}

.erro-chart-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.erro-chart-total strong {
    font-size: 25px;
    line-height: 1;
}

.erro-chart-total span {
    color: var(--ops-muted, #9fb5ce);
    font-size: 12px;
    font-weight: 800;
}

.erro-bars-list {
    display: grid;
    gap: 8px;
}

.erro-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(110px, 1fr) 68px;
    align-items: center;
    gap: 10px;
}

.erro-bar-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.erro-bar-label strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.erro-bar-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, .16);
}

.erro-bar-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    box-shadow: 0 0 14px currentColor;
}

.erro-bar-value {
    text-align: right;
}

.erro-bar-value strong {
    display: block;
    font-size: 12px;
}

.erro-bar-value small {
    display: block;
    font-size: 10px;
    color: var(--ops-muted, #9fb5ce);
}

.erro-chart-waffle {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.waffle-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    width: 150px;
}

.waffle-grid span {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.waffle-legend {
    max-height: 150px;
    overflow: auto;
}

.erro-chart-pizza-moderna {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.pizza-moderna-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pizza-moderna {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    position: relative;
    box-shadow:
        inset -18px -18px 30px rgba(0,0,0,.26),
        inset 10px 10px 18px rgba(255,255,255,.12),
        0 18px 44px rgba(0,0,0,.26);
    overflow: hidden;
}

.pizza-moderna::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: inset 0 0 30px rgba(255,255,255,.10);
}

.pizza-moderna-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.22), transparent 32%);
    pointer-events: none;
}

.pizza-moderna-total {
    position: absolute;
    inset: 52px;
    border-radius: 50%;
    background: rgba(4, 18, 38, .88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
}

.pizza-moderna-total strong {
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
}

.pizza-moderna-total span {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 800;
}

body.theme-modelo-light-ops .pizza-moderna-total {
    background: rgba(255,255,255,.88);
}

body.theme-modelo-light-ops .pizza-moderna-total strong {
    color: #0f172a;
}

body.theme-modelo-light-ops .pizza-moderna-total span {
    color: #64748b;
}

@media (max-width: 1100px) {
    .erro-chart-waffle,
    .erro-chart-pizza-moderna {
        grid-template-columns: 1fr;
    }

    .waffle-grid {
        width: 100%;
        max-width: 180px;
        margin: 0 auto;
    }

    .erro-bar-row {
        grid-template-columns: minmax(120px, 1fr) 1fr 58px;
    }
}


/* ============================================================
   HOTFIX DASHBOARD OPS - alertas compactos / gráficos maiores
   ============================================================ */

/* Alertas ativos: conteúdo mais compacto para caber mais registros */
body.theme-modelo-dark-ops .alerts-panel,
body.theme-modelo-light-ops .alerts-panel,
body.theme-modelo-neon-ops .alerts-panel {
    min-height: 248px !important;
}

body.theme-modelo-dark-ops .dashboard-model-alert-list,
body.theme-modelo-light-ops .dashboard-model-alert-list,
body.theme-modelo-neon-ops .dashboard-model-alert-list {
    gap: 5px !important;
    min-height: 0 !important;
}

body.theme-modelo-dark-ops .alert-row-model,
body.theme-modelo-light-ops .alert-row-model,
body.theme-modelo-neon-ops .alert-row-model {
    padding: 6px 8px !important;
    min-height: 40px !important;
    grid-template-columns: 24px minmax(0, 1fr) auto !important;
    gap: 8px !important;
    border-radius: 12px !important;
}

body.theme-modelo-dark-ops .alert-row-model > span,
body.theme-modelo-light-ops .alert-row-model > span,
body.theme-modelo-neon-ops .alert-row-model > span {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
}

body.theme-modelo-dark-ops .alert-row-model strong,
body.theme-modelo-light-ops .alert-row-model strong,
body.theme-modelo-neon-ops .alert-row-model strong {
    font-size: 11.5px !important;
    line-height: 1.18 !important;
}

body.theme-modelo-dark-ops .alert-row-model small,
body.theme-modelo-light-ops .alert-row-model small,
body.theme-modelo-neon-ops .alert-row-model small {
    font-size: 10px !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
}

body.theme-modelo-dark-ops .alert-row-model em,
body.theme-modelo-light-ops .alert-row-model em,
body.theme-modelo-neon-ops .alert-row-model em {
    font-size: 10px !important;
    padding: 4px 7px !important;
    border-radius: 9px !important;
}

/* Erros por integração e Histórico: aumentar juntos para manter alinhamento */
body.theme-modelo-dark-ops .chart-panel,
body.theme-modelo-light-ops .chart-panel,
body.theme-modelo-neon-ops .chart-panel,
body.theme-modelo-dark-ops .donut-panel,
body.theme-modelo-light-ops .donut-panel,
body.theme-modelo-neon-ops .donut-panel {
    min-height: 315px !important;
    max-height: none !important;
}

body.theme-modelo-dark-ops .chart-panel svg,
body.theme-modelo-light-ops .chart-panel svg,
body.theme-modelo-neon-ops .chart-panel svg {
    max-height: 230px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-wrap,
body.theme-modelo-light-ops .donut-panel .donut-wrap,
body.theme-modelo-neon-ops .donut-panel .donut-wrap {
    min-height: 215px !important;
    max-height: none !important;
}

body.theme-modelo-dark-ops .donut-panel .donut,
body.theme-modelo-light-ops .donut-panel .donut,
body.theme-modelo-neon-ops .donut-panel .donut {
    width: 168px !important;
    height: 168px !important;
    min-width: 168px !important;
}

body.theme-modelo-dark-ops .donut-panel .donut-center,
body.theme-modelo-light-ops .donut-panel .donut-center,
body.theme-modelo-neon-ops .donut-panel .donut-center {
    inset: 47px !important;
}

/* Tabs dos modos de gráfico mais compactas para não cortar */
.erros-integracao-mode-tabs {
    margin-bottom: 8px !important;
    gap: 5px !important;
}

.erros-integracao-mode-tabs a {
    min-height: 26px !important;
    padding: 0 9px !important;
    font-size: 10.5px !important;
}

/* Pizza Gradient: aparência mais moderna com brilho/gradiente */
.pizza-moderna {
    transform: perspective(650px) rotateX(8deg);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow:
        inset -22px -22px 36px rgba(0,0,0,.30),
        inset 16px 14px 24px rgba(255,255,255,.14),
        0 22px 46px rgba(0,0,0,.28),
        0 0 44px rgba(53,184,255,.10) !important;
}

.pizza-moderna::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255,255,255,.34), transparent 28%),
        radial-gradient(circle at 70% 76%, rgba(0,0,0,.24), transparent 38%),
        conic-gradient(from 18deg, rgba(255,255,255,.24), rgba(255,255,255,0) 18%, rgba(0,0,0,.16) 34%, rgba(255,255,255,.18) 52%, rgba(255,255,255,0) 70%, rgba(0,0,0,.18) 88%, rgba(255,255,255,.24));
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.pizza-moderna::after {
    z-index: 2;
}

.pizza-moderna-glow {
    z-index: 3;
    background:
        radial-gradient(circle at 30% 22%, rgba(255,255,255,.34), transparent 30%),
        linear-gradient(145deg, rgba(255,255,255,.14), transparent 42%, rgba(0,0,0,.14)) !important;
}

.pizza-moderna-total {
    z-index: 4 !important;
}

.erro-chart-pizza-moderna {
    min-height: 225px !important;
}

.erro-chart-pizza-moderna .legend {
    max-height: 215px;
    overflow: auto;
}

/* Barra/Waffle também aproveitam melhor o novo espaço */
.erro-bars-list,
.waffle-legend {
    max-height: 220px;
    overflow: auto;
}

@media (max-width: 1100px) {
    body.theme-modelo-dark-ops .chart-panel,
    body.theme-modelo-light-ops .chart-panel,
    body.theme-modelo-neon-ops .chart-panel,
    body.theme-modelo-dark-ops .donut-panel,
    body.theme-modelo-light-ops .donut-panel,
    body.theme-modelo-neon-ops .donut-panel {
        min-height: 340px !important;
    }
}


/* ============================================================
   HOTFIX MONITORIA BACKEND - filtros e rodapé dos logs
   ============================================================ */

/* A tela nova da monitoria usa classes estáveis, sem depender de nth-of-type */
.monitoria-selected-filters-panel {
    margin-bottom: 16px !important;
}

.filters.monitoria-api-filters,
.monitoria-api-filters {
    display: grid !important;
    grid-template-columns: 170px 170px minmax(220px, 1fr) minmax(260px, 1.15fr) minmax(350px, 430px) 170px !important;
    gap: 16px !important;
    align-items: end !important;
}

.monitoria-api-filters .filter-data-inicial {
    grid-column: 1 !important;
}

.monitoria-api-filters .filter-data-final {
    grid-column: 2 !important;
}

.monitoria-api-filters .filter-clientes {
    grid-column: 3 !important;
}

.monitoria-api-filters .filter-integracoes {
    grid-column: 4 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.monitoria-api-filters .filter-status {
    grid-column: 5 !important;
}

.monitoria-api-filters .filter-action {
    grid-column: 6 !important;
}

.monitoria-api-filters #clientes-hidden,
.monitoria-api-filters #integracoes-hidden {
    display: none !important;
    grid-column: auto !important;
}

.monitoria-api-filters .autocomplete-filter {
    position: relative !important;
    min-width: 0 !important;
}

.monitoria-api-filters .autocomplete-suggestions {
    z-index: 100050 !important;
    max-height: 320px !important;
    overflow: auto !important;
}

.monitoria-api-filters .status-filter-options {
    min-height: 53px !important;
    height: 53px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 8px 9px !important;
    overflow: hidden !important;
}

.monitoria-api-filters .status-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

.monitoria-api-filters .status-check input {
    width: 15px !important;
    min-width: 15px !important;
    height: 15px !important;
    min-height: 15px !important;
    margin: 0 !important;
}

.monitoria-api-filters .badge {
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 4px 7px !important;
}

.monitoria-api-filters .filter-action .btn {
    width: 100% !important;
    height: 53px !important;
}

/* Rodapé da grid de logs */
.logs-detalhados-footer {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.logs-detalhados-footer .bulk-actions-bar {
    flex: 1 1 auto;
    margin: 0 !important;
}

.logs-detalhados-footer #btn-carregar-mais-logs {
    flex: 0 0 auto;
    min-width: 210px;
}

/* Evita que regras antigas de filtros baseadas em nth-of-type deformem a nova tela */
.monitoria-api-filters > div:nth-of-type(5),
.monitoria-api-filters > div:nth-of-type(6),
.monitoria-api-filters > div:nth-of-type(7),
.monitoria-api-filters > div:nth-of-type(8) {
    display: block;
}

.monitoria-api-filters > div:nth-of-type(7),
.monitoria-api-filters > div:nth-of-type(8) {
    display: none !important;
}

body.theme-modelo-dark-ops .monitoria-api-filters .autocomplete-suggestions,
body.theme-modelo-neon-ops .monitoria-api-filters .autocomplete-suggestions {
    background: var(--ops-card-bg-2) !important;
    border-color: var(--ops-border) !important;
    color: var(--ops-text) !important;
}

body.theme-modelo-light-ops .monitoria-api-filters .autocomplete-suggestions {
    background: #ffffff !important;
    border-color: #dbe8ee !important;
    color: #0f172a !important;
}

@media (max-width: 1500px) and (min-width: 1101px) {
    .filters.monitoria-api-filters,
    .monitoria-api-filters {
        grid-template-columns: 160px 160px minmax(200px, 1fr) minmax(230px, 1.1fr) minmax(320px, 390px) 150px !important;
        gap: 13px !important;
    }
}

@media (max-width: 1100px) and (min-width: 801px) {
    .filters.monitoria-api-filters,
    .monitoria-api-filters {
        grid-template-columns: 1fr 1fr 1fr !important;
        align-items: start !important;
    }

    .monitoria-api-filters .filter-data-inicial,
    .monitoria-api-filters .filter-data-final,
    .monitoria-api-filters .filter-clientes,
    .monitoria-api-filters .filter-integracoes,
    .monitoria-api-filters .filter-status,
    .monitoria-api-filters .filter-action {
        grid-column: auto !important;
    }

    .monitoria-api-filters .filter-status {
        grid-column: 1 / 3 !important;
    }

    .monitoria-api-filters .filter-action {
        grid-column: 3 / 4 !important;
    }

    .monitoria-api-filters .status-filter-options {
        height: auto !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
}

@media (max-width: 800px) {
    .filters.monitoria-api-filters,
    .monitoria-api-filters {
        grid-template-columns: 1fr !important;
    }

    .monitoria-api-filters .filter-data-inicial,
    .monitoria-api-filters .filter-data-final,
    .monitoria-api-filters .filter-clientes,
    .monitoria-api-filters .filter-integracoes,
    .monitoria-api-filters .filter-status,
    .monitoria-api-filters .filter-action {
        grid-column: auto !important;
    }

    .monitoria-api-filters .status-filter-options {
        height: auto !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    .logs-detalhados-footer {
        flex-direction: column;
    }

    .logs-detalhados-footer #btn-carregar-mais-logs {
        width: 100%;
        min-width: 0;
    }
}


/* ============================================================
   HOTFIX MONITORIA BACKEND - botão pesquisar visível
   ============================================================ */

/*
   Corrige conflito com regras antigas de filtros que usavam nth-of-type.
   Na tela nova:
   1 data inicial
   2 data final
   3 clientes
   4 integrações
   5 status
   6 botão pesquisar
   7/8 campos hidden
*/
form.filters.filters-autocomplete.monitoria-api-filters > .filter-status,
form.filters.filters-autocomplete.monitoria-api-filters > div.filter-status {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-column: 5 !important;
}

form.filters.filters-autocomplete.monitoria-api-filters > .filter-action,
form.filters.filters-autocomplete.monitoria-api-filters > div.filter-action {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-column: 6 !important;
    align-self: end !important;
}

form.filters.filters-autocomplete.monitoria-api-filters > .filter-action .btn,
form.filters.filters-autocomplete.monitoria-api-filters > div.filter-action .btn {
    display: inline-flex !important;
    width: 100% !important;
    height: 53px !important;
    min-height: 53px !important;
}

form.filters.filters-autocomplete.monitoria-api-filters > #clientes-hidden,
form.filters.filters-autocomplete.monitoria-api-filters > #integracoes-hidden {
    display: none !important;
}

@media (max-width: 1100px) and (min-width: 801px) {
    form.filters.filters-autocomplete.monitoria-api-filters > .filter-status,
    form.filters.filters-autocomplete.monitoria-api-filters > div.filter-status {
        grid-column: 1 / 3 !important;
    }

    form.filters.filters-autocomplete.monitoria-api-filters > .filter-action,
    form.filters.filters-autocomplete.monitoria-api-filters > div.filter-action {
        grid-column: 3 / 4 !important;
    }
}

@media (max-width: 800px) {
    form.filters.filters-autocomplete.monitoria-api-filters > .filter-status,
    form.filters.filters-autocomplete.monitoria-api-filters > div.filter-status,
    form.filters.filters-autocomplete.monitoria-api-filters > .filter-action,
    form.filters.filters-autocomplete.monitoria-api-filters > div.filter-action {
        grid-column: auto !important;
    }
}


/* ============================================================
   HOTFIX MENU LATERAL - redução aproximada de 10%
   ============================================================ */

:root {
    --sidebar-closed: 68px !important;
    --sidebar-open: 214px !important;
}

.sidebar {
    width: 68px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.sidebar:hover {
    width: 214px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.main {
    margin-left: 68px !important;
}

.sidebar .brand-icon,
.sidebar .brand-icon.brand-icon-image {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
}

.sidebar nav {
    gap: 11px !important;
}

.sidebar nav a {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 12px !important;
}

.sidebar:hover nav a {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 11px !important;
}

.menu-icon,
.sidebar nav a .menu-icon,
.sidebar:hover nav a .menu-icon {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
}

.nav-svg,
.sidebar nav a .nav-svg,
.sidebar nav a .menu-icon svg {
    width: 21px !important;
    min-width: 21px !important;
    height: 21px !important;
}

.sidebar:not(:hover) nav a {
    width: 47px !important;
    min-width: 47px !important;
    max-width: 47px !important;
    height: 47px !important;
    min-height: 47px !important;
}

.sidebar:not(:hover) nav a .menu-icon {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
}

.sidebar:not(:hover) nav a .nav-svg,
.sidebar:not(:hover) nav a .menu-icon svg {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
}

.sidebar:hover .brand-text strong {
    font-size: 15px !important;
}

.sidebar:hover .brand-text span,
.sidebar:hover .menu-text {
    font-size: 12px !important;
}

@media (max-width: 800px) {
    .sidebar,
    .sidebar:hover {
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .sidebar nav a,
    .sidebar:hover nav a {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 46px !important;
        min-height: 46px !important;
    }
}


/* ============================================================
   HOTFIX SWAGGER - layout compacto sem espaço gigante
   ============================================================ */

.swagger-docs-page .main {
    min-height: 100vh !important;
}

.swagger-docs-page .swagger-panel {
    overflow: visible !important;
    padding: 22px 24px !important;
    min-height: auto !important;
}

.swagger-docs-page .swagger-panel .panel-header {
    margin-bottom: 12px !important;
}

.swagger-docs-page #swagger-ui {
    margin-top: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
}

.swagger-docs-page #swagger-ui .swagger-ui {
    margin: 0 !important;
    padding: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .wrapper,
.swagger-docs-page #swagger-ui .swagger-ui .information-container.wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info .title {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info .base-url,
.swagger-docs-page #swagger-ui .swagger-ui .info .link {
    margin: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .scheme-container {
    margin: 0 0 14px 0 !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    border: 1px solid #dfe7f2 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .opblock-tag-section {
    display: block !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .opblock-tag {
    margin: 0 0 8px 0 !important;
    padding: 8px 0 !important;
    min-height: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .opblock {
    margin: 0 0 8px 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .opblock-summary {
    min-height: 46px !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .models {
    margin: 12px 0 0 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .filter-container {
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .filter-container input {
    height: 40px !important;
    min-height: 40px !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .topbar {
    display: none !important;
}

/* Tema claro Ops: evita que o Swagger fique com fontes claras ou espaçamento estranho */
body.theme-modelo-light-ops.swagger-docs-page #swagger-ui,
body.theme-modelo-light-ops.swagger-docs-page #swagger-ui .swagger-ui,
body.theme-modelo-light-ops.swagger-docs-page #swagger-ui .swagger-ui * {
    color-scheme: light !important;
}

body.theme-modelo-light-ops.swagger-docs-page #swagger-ui .swagger-ui .info .title,
body.theme-modelo-light-ops.swagger-docs-page #swagger-ui .swagger-ui .opblock-tag {
    color: #0f172a !important;
}

@media (max-width: 800px) {
    .swagger-docs-page .swagger-panel {
        padding: 16px !important;
    }

    .swagger-docs-page #swagger-ui .swagger-ui .info .title {
        font-size: 23px !important;
    }
}


/* ============================================================
   HOTFIX SWAGGER - conflito da classe .main
   ============================================================ */

/*
   O Swagger UI usa internamente hgroup.main.
   O sistema também usa .main para o conteúdo principal com min-height:100vh.
   Isso causava o espaço gigante em branco antes da descrição/Authorize.
*/
.swagger-docs-page #swagger-ui .swagger-ui .info .main,
.swagger-docs-page #swagger-ui .swagger-ui hgroup.main,
.swagger-docs-page #swagger-ui .swagger-ui .main {
    margin-left: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    display: block !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info .main {
    margin-bottom: 8px !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info .description {
    margin: 6px 0 10px 0 !important;
    padding: 0 !important;
}

.swagger-docs-page #swagger-ui .swagger-ui .info .title {
    display: block !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

.swagger-docs-page #swagger-ui .swagger-ui section,
.swagger-docs-page #swagger-ui .swagger-ui .information-container,
.swagger-docs-page #swagger-ui .swagger-ui .scheme-container,
.swagger-docs-page #swagger-ui .swagger-ui .opblock-tag-section {
    min-height: 0 !important;
}


/* ============================================================
   HOTFIX MAPA DE INTEGRAÇÕES - modelo visual 2
   ============================================================ */

/* Remove o visual antigo do "→" e usa fluxo pontilhado com ícone de origem */
.dashboard-model-map .map-node-flow-head {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.dashboard-model-map .map-system-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9.5px !important;
    font-weight: 950 !important;
    letter-spacing: -.02em !important;
    text-transform: uppercase !important;
    color: #1264e9 !important;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,.95), rgba(255,255,255,.40) 48%, transparent 49%),
        linear-gradient(145deg, rgba(239, 247, 255, .98), rgba(226, 241, 255, .86)) !important;
    border: 1px solid rgba(96, 165, 250, .34) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .10), inset 0 1px 0 rgba(255,255,255,.72) !important;
    overflow: hidden !important;
}

.dashboard-model-map .map-flow-label {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(32px, max-content) minmax(30px, 1fr) minmax(32px, max-content) !important;
    align-items: center !important;
    gap: 7px !important;
    color: var(--model-text) !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

.dashboard-model-map .map-node-origin,
.dashboard-model-map .map-node-destination {
    display: inline-block !important;
    min-width: 0 !important;
    max-width: 70px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.dashboard-model-map .map-flow-connector {
    position: relative !important;
    display: block !important;
    height: 16px !important;
    min-width: 28px !important;
}

.dashboard-model-map .map-flow-connector::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 7px !important;
    top: 50% !important;
    border-top: 2px dashed rgba(96, 165, 250, .62) !important;
    transform: translateY(-50%) !important;
}

.dashboard-model-map .map-flow-connector::after {
    content: "" !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-top: 2px solid rgba(37, 99, 235, .74) !important;
    border-right: 2px solid rgba(37, 99, 235, .74) !important;
    transform: translateY(-50%) rotate(45deg) !important;
    border-radius: 1px !important;
}

.dashboard-model-map .map-node-count {
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #334155 !important;
    background: rgba(226, 232, 240, .70) !important;
    border: 1px solid rgba(203, 213, 225, .72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.68) !important;
}

/* Cards do mapa um pouco mais largos para o novo conector respirar */
body.theme-modelo-dark-ops .dashboard-model-map,
body.theme-modelo-light-ops .dashboard-model-map,
body.theme-modelo-neon-ops .dashboard-model-map {
    grid-template-columns: minmax(150px, 1fr) 106px minmax(150px, 1fr) !important;
    gap: 8px 10px !important;
}

body.theme-modelo-dark-ops .map-center,
body.theme-modelo-light-ops .map-center,
body.theme-modelo-neon-ops .map-center {
    width: 106px !important;
    height: 106px !important;
}

body.theme-modelo-dark-ops .map-center::before,
body.theme-modelo-light-ops .map-center::before,
body.theme-modelo-neon-ops .map-center::before {
    width: 168px !important;
    height: 168px !important;
}

body.theme-modelo-dark-ops .map-center img,
body.theme-modelo-light-ops .map-center img,
body.theme-modelo-neon-ops .map-center img {
    width: 68px !important;
    max-height: 50px !important;
}

body.theme-modelo-dark-ops .map-node,
body.theme-modelo-light-ops .map-node,
body.theme-modelo-neon-ops .map-node {
    padding: 8px 9px !important;
    min-width: 0 !important;
}

/* Tema escuro/neon */
body.theme-modelo-dark-ops .dashboard-model-map .map-system-avatar,
body.theme-modelo-neon-ops .dashboard-model-map .map-system-avatar {
    color: #8fd6ff !important;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,.18), rgba(255,255,255,.04) 48%, transparent 49%),
        linear-gradient(145deg, rgba(13, 35, 66, .96), rgba(9, 24, 45, .92)) !important;
    border-color: rgba(96, 165, 250, .34) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-flow-label,
body.theme-modelo-neon-ops .dashboard-model-map .map-flow-label {
    color: #eff8ff !important;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-flow-connector::before,
body.theme-modelo-neon-ops .dashboard-model-map .map-flow-connector::before {
    border-top-color: rgba(125, 211, 252, .55) !important;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-flow-connector::after,
body.theme-modelo-neon-ops .dashboard-model-map .map-flow-connector::after {
    border-top-color: rgba(125, 211, 252, .78) !important;
    border-right-color: rgba(125, 211, 252, .78) !important;
}

body.theme-modelo-dark-ops .dashboard-model-map .map-node-count,
body.theme-modelo-neon-ops .dashboard-model-map .map-node-count {
    color: #dbeafe !important;
    background: rgba(30, 41, 59, .86) !important;
    border-color: rgba(148, 163, 184, .18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}

/* Tema claro */
body.theme-modelo-light-ops .dashboard-model-map .map-system-avatar {
    color: #155bd5 !important;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,.98), rgba(255,255,255,.42) 48%, transparent 49%),
        linear-gradient(145deg, #f7fbff, #eaf4ff) !important;
    border-color: rgba(96, 165, 250, .30) !important;
}

body.theme-modelo-light-ops .dashboard-model-map .map-flow-label {
    color: #0f172a !important;
}

body.theme-modelo-light-ops .dashboard-model-map .map-node-count {
    color: #334155 !important;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/* Em telas menores, preserva leitura sem quebrar o card */
@media (max-width: 1280px) and (min-width: 1101px) {
    body.theme-modelo-dark-ops .dashboard-model-map,
    body.theme-modelo-light-ops .dashboard-model-map,
    body.theme-modelo-neon-ops .dashboard-model-map {
        grid-template-columns: minmax(132px, 1fr) 92px minmax(132px, 1fr) !important;
    }

    .dashboard-model-map .map-system-avatar {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 8.5px !important;
    }

    .dashboard-model-map .map-node-flow-head {
        grid-template-columns: 28px minmax(0, 1fr) auto !important;
        gap: 6px !important;
    }

    .dashboard-model-map .map-flow-label {
        gap: 5px !important;
        font-size: 11px !important;
    }

    .dashboard-model-map .map-node-origin,
    .dashboard-model-map .map-node-destination {
        max-width: 56px !important;
    }

    .dashboard-model-map .map-node-count {
        min-width: 24px !important;
        height: 24px !important;
        padding: 0 6px !important;
    }
}


/* Ajuste visual: erros por integração mais compacto e com percentual em destaque */
.erro-bars-list {
    gap: 5px;
}

.erro-bar-row {
    grid-template-columns: minmax(130px, 1.08fr) minmax(120px, 1fr) 78px;
    gap: 8px;
}

.erro-bar-label {
    gap: 6px;
}

.erro-bar-label strong {
    font-size: 11px;
}

.erro-bar-track {
    height: 9px;
}

.erro-bar-value strong {
    display: block;
    font-size: 12px;
    line-height: 1.05;
}

.erro-bar-value small {
    display: block;
    font-size: 9px;
    line-height: 1.05;
    opacity: .88;
}

.erro-chart .legend,
.erro-chart .waffle-legend,
.erro-chart-pizza-moderna .legend,
.donut-layout .legend {
    display: grid;
    gap: 4px;
}

.erro-chart .legend-row,
.donut-layout .legend-row {
    gap: 8px;
    padding: 3px 0;
    font-size: 11px;
    align-items: center;
}

.erro-chart .legend-row > span:nth-child(2),
.donut-layout .legend-row > span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erro-chart .legend-row strong,
.donut-layout .legend-row strong {
    font-size: 11px;
    line-height: 1.05;
    white-space: nowrap;
}

.erro-chart .legend-row strong small,
.donut-layout .legend-row strong small {
    font-size: 9px;
    font-weight: 700;
    opacity: .86;
}

body.theme-modelo-dark-ops .erro-chart .legend-row,
body.theme-modelo-light-ops .erro-chart .legend-row,
body.theme-modelo-neon-ops .erro-chart .legend-row,
body.theme-modelo-dark-ops .donut-layout .legend-row,
body.theme-modelo-light-ops .donut-layout .legend-row,
body.theme-modelo-neon-ops .donut-layout .legend-row {
    padding: 2px 0 !important;
    font-size: 10.5px !important;
}

body.theme-modelo-dark-ops .erro-bars-list,
body.theme-modelo-light-ops .erro-bars-list,
body.theme-modelo-neon-ops .erro-bars-list {
    gap: 4px !important;
}

body.theme-modelo-dark-ops .erro-bar-row,
body.theme-modelo-light-ops .erro-bar-row,
body.theme-modelo-neon-ops .erro-bar-row {
    grid-template-columns: minmax(125px, 1.05fr) minmax(110px, 1fr) 74px !important;
    gap: 7px !important;
}

@media (max-width: 1100px) {
    .erro-bar-row {
        grid-template-columns: minmax(110px, 1fr) 1fr 64px;
        gap: 6px;
    }
}

/* Ajuste adicional: Erros por integração com linhas ainda mais compactas e sempre em uma única linha */
.erro-chart .legend,
.donut-layout .legend,
.erro-chart .waffle-legend,
.erro-chart-pizza-moderna .legend {
    gap: 2px !important;
}

.erro-chart .legend-row,
.donut-layout .legend-row {
    grid-template-columns: 10px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding: 2px 0 !important;
    min-height: 20px;
    line-height: 1 !important;
}

.erro-chart .legend-row .legend-dot,
.donut-layout .legend-row .legend-dot,
.erro-bar-label .legend-dot {
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
}

.erro-chart .legend-row > span:nth-child(2),
.donut-layout .legend-row > span:nth-child(2) {
    font-size: 10.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.erro-chart .legend-row strong,
.donut-layout .legend-row strong {
    display: inline-flex !important;
    align-items: baseline;
    gap: 3px;
    font-size: 10.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.erro-chart .legend-row strong small,
.donut-layout .legend-row strong small {
    font-size: 9px !important;
    line-height: 1 !important;
    opacity: .82;
}

.erro-bars-list {
    gap: 3px !important;
}

.erro-bar-row {
    grid-template-columns: minmax(118px, 1.02fr) minmax(110px, 1fr) 68px !important;
    gap: 6px !important;
    min-height: 20px;
}

.erro-bar-label strong {
    font-size: 10.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.erro-bar-track {
    height: 8px !important;
}

.erro-bar-value {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

.erro-bar-value strong {
    font-size: 10.5px !important;
    line-height: 1 !important;
}

.erro-bar-value small {
    font-size: 9px !important;
    line-height: 1 !important;
}

.erro-chart-waffle,
.erro-chart-pizza-moderna,
.donut-layout {
    gap: 12px !important;
    align-items: start !important;
}

.waffle-legend,
.erro-chart-pizza-moderna .legend,
.donut-layout .legend,
.erro-bars-list {
    max-height: 205px !important;
    overflow: auto;
}

body.theme-modelo-dark-ops .erro-chart .legend-row,
body.theme-modelo-light-ops .erro-chart .legend-row,
body.theme-modelo-neon-ops .erro-chart .legend-row,
body.theme-modelo-dark-ops .donut-layout .legend-row,
body.theme-modelo-light-ops .donut-layout .legend-row,
body.theme-modelo-neon-ops .donut-layout .legend-row {
    color: inherit;
}


/* ============================================================
   FIX: estado vazio do gráfico em temas escuros + menu de ações
   ============================================================ */
body.theme-modelo-dark-ops .empty-chart,
body.theme-modelo-neon-ops .empty-chart {
    background: rgba(6, 21, 42, .88) !important;
    border: 1px dashed rgba(80, 219, 255, .18) !important;
    color: #9ec0dc !important;
}

body.theme-modelo-dark-ops .chart-panel .empty-chart,
body.theme-modelo-neon-ops .chart-panel .empty-chart,
body.theme-modelo-dark-ops .erro-chart .empty-chart,
body.theme-modelo-neon-ops .erro-chart .empty-chart {
    box-shadow: inset 0 0 0 1px rgba(80, 219, 255, .04);
}

#floating-action-menu,
.floating-action-menu {
    pointer-events: auto !important;
}

#floating-action-menu .action-menu-item,
.floating-action-menu .action-menu-item {
    position: relative;
    z-index: 1;
    pointer-events: auto !important;
}


/* ============================================================
   FIX JSON GRANDE - Detalhes / Comunicação sem quebrar página
   ============================================================ */

.detalhes-unificados-row,
.detalhes-unificados-row td,
.detalhes-unificados-box,
.detalhes-section,
.log-comunicacao-grid,
.log-comunicacao-card,
.atributos-grid,
.atributo-card {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.detalhes-unificados-box,
.detalhes-section,
.log-comunicacao-grid,
.log-comunicacao-card {
    overflow: hidden !important;
}

.log-comunicacao-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
}

.log-comunicacao-card pre,
.detalhes-unificados-box pre,
.detalhes-section pre {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 260px !important;
    overflow: auto !important;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

.atributo-card span,
.detalhes-unificados-box span,
.detalhes-unificados-box small {
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

body.theme-modelo-light-ops .log-comunicacao-card pre,
body.theme-modelo-light-ops .detalhes-unificados-box pre,
body.theme-modelo-light-ops .detalhes-section pre {
    background: #f8fafc !important;
    border: 1px solid #dbe8ee !important;
    color: #0f172a !important;
}

body.theme-modelo-dark-ops .log-comunicacao-card pre,
body.theme-modelo-dark-ops .detalhes-unificados-box pre,
body.theme-modelo-dark-ops .detalhes-section pre,
body.theme-modelo-neon-ops .log-comunicacao-card pre,
body.theme-modelo-neon-ops .detalhes-unificados-box pre,
body.theme-modelo-neon-ops .detalhes-section pre,
body.theme-black-blue .log-comunicacao-card pre,
body.theme-black-blue .detalhes-unificados-box pre,
body.theme-black-blue .detalhes-section pre {
    background: rgba(3, 12, 27, .78) !important;
    border: 1px solid rgba(80, 219, 255, .16) !important;
    color: #d9ecff !important;
}

.log-comunicacao-card pre::-webkit-scrollbar,
.detalhes-unificados-box pre::-webkit-scrollbar,
.detalhes-section pre::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.log-comunicacao-card pre::-webkit-scrollbar-thumb,
.detalhes-unificados-box pre::-webkit-scrollbar-thumb,
.detalhes-section pre::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, .45);
    border-radius: 999px;
}

.log-comunicacao-card pre::-webkit-scrollbar-track,
.detalhes-unificados-box pre::-webkit-scrollbar-track,
.detalhes-section pre::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, .12);
    border-radius: 999px;
}

@media (max-width: 900px) {
    .log-comunicacao-card pre,
    .detalhes-unificados-box pre,
    .detalhes-section pre {
        max-height: 210px !important;
        font-size: 10.5px !important;
    }
}


/* ============================================================
   EXPORTAÇÃO EXCEL - Logs detalhados
   ============================================================ */
.logs-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

#btn-exportar-excel-logs {
    min-width: 150px;
    white-space: nowrap;
}

body.theme-modelo-dark-ops #btn-exportar-excel-logs,
body.theme-modelo-neon-ops #btn-exportar-excel-logs,
body.theme-black-blue #btn-exportar-excel-logs {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
    border-color: rgba(34, 197, 94, .42) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(34, 197, 94, .20) !important;
}

@media (max-width: 800px) {
    .logs-footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .logs-footer-actions .btn,
    #btn-exportar-excel-logs,
    .logs-footer-actions #btn-carregar-mais-logs {
        width: 100%;
    }
}

/* === Exportação Logs Detalhados === */
.logs-detalhados-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logs-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.logs-export-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.logs-export-badge svg,
.btn-export-logs svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.btn-export-logs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.btn-export-logs.is-loading {
    opacity: .72;
    pointer-events: none;
}

.export-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 14, 30, 0.54);
    backdrop-filter: blur(8px);
}

.export-modal-card {
    width: min(520px, calc(100vw - 32px));
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(2, 8, 23, 0.30);
    padding: 26px 26px 22px;
}

.export-modal-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.export-modal-spinner span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    animation: export-bounce 1s infinite ease-in-out;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 12%, transparent);
}

.export-modal-spinner span:nth-child(2) { animation-delay: .12s; }
.export-modal-spinner span:nth-child(3) { animation-delay: .24s; }

.export-modal-eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    font-weight: 800;
    font-size: .78rem;
    margin-bottom: 8px;
}

.export-modal-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.export-modal-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.export-modal-progress {
    margin-top: 18px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
}

.export-modal-progress-bar {
    height: 100%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    animation: export-progress-slide 1.3s infinite ease-in-out;
}

.export-modal-tip {
    margin-top: 14px;
    color: var(--muted);
    font-size: .92rem;
}

.export-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

@keyframes export-bounce {
    0%, 80%, 100% { transform: scale(.75); opacity: .45; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes export-progress-slide {
    0% { margin-left: -40%; }
    100% { margin-left: 100%; }
}

@media (max-width: 900px) {
    .logs-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}


/* ============================================================
   EXPORTAÇÃO MODERNA - botão único com opções
   ============================================================ */
.logs-export-badge {
    display: none !important;
}

.logs-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.export-dropdown {
    position: relative;
}

.export-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, var(--card)), color-mix(in srgb, var(--primary-2) 8%, var(--card)));
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.export-dropdown-toggle:hover,
.export-dropdown.open .export-dropdown-toggle {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.export-dropdown-toggle:disabled,
.export-dropdown-option:disabled {
    opacity: .72;
    cursor: wait;
}

.export-dropdown-toggle-icon,
.export-dropdown-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.export-dropdown-toggle-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 36%, transparent);
}

.export-dropdown-toggle-icon svg,
.export-dropdown-toggle-chevron svg,
.export-dropdown-option-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.export-dropdown-toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.1;
}

.export-dropdown-toggle-text strong {
    font-size: .98rem;
}

.export-dropdown-toggle-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
}

.export-dropdown-toggle-chevron {
    color: var(--muted);
    transition: transform .18s ease;
}

.export-dropdown.open .export-dropdown-toggle-chevron {
    transform: rotate(180deg);
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 310px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 92%, #ffffff 8%);
    box-shadow: 0 26px 56px rgba(2, 8, 23, 0.22);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.98);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 1300;
}

.export-dropdown.open .export-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.export-dropdown-option {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.export-dropdown-option:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    transform: translateX(1px);
}

.export-dropdown-option-icon.excel {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 10px 24px rgba(34, 197, 94, .22);
}

.export-dropdown-option-icon.pdf {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #fff;
    box-shadow: 0 10px 24px rgba(14, 165, 233, .22);
}

.export-dropdown-option-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.12;
}

.export-dropdown-option-text strong {
    font-size: .95rem;
}

.export-dropdown-option-text small {
    margin-top: 5px;
    color: var(--muted);
    font-size: .78rem;
}

body.theme-modelo-dark-ops .export-dropdown-menu,
body.theme-modelo-neon-ops .export-dropdown-menu,
body.theme-black-blue .export-dropdown-menu {
    background: color-mix(in srgb, var(--card) 88%, #0b1220 12%);
    border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
}

@media (max-width: 900px) {
    .logs-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .export-dropdown,
    .export-dropdown-toggle {
        width: 100%;
    }

    .export-dropdown-menu {
        left: 0;
        right: 0;
        min-width: 0;
    }
}


/* ============================================================
   AJUSTE FINO - exportação mais discreta, moderna e opaca
   ============================================================ */
.export-modal-backdrop {
    background: rgba(7, 13, 24, 0.72);
    backdrop-filter: none;
}

.export-modal-card {
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    box-shadow: 0 28px 70px rgba(2, 8, 23, 0.34);
}

.export-modal-progress {
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.export-dropdown-toggle {
    min-height: 48px;
    padding: 8px 14px;
    border-radius: 16px;
    gap: 10px;
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.export-dropdown-toggle:hover,
.export-dropdown.open .export-dropdown-toggle {
    background: color-mix(in srgb, var(--primary) 6%, var(--card));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.export-dropdown-toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 28%, transparent);
}

.export-dropdown-toggle-text strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.export-dropdown-toggle-text small {
    font-size: 0.75rem;
    margin-top: 3px;
}

.export-dropdown-toggle-chevron {
    opacity: 0.8;
}

.export-dropdown-menu {
    top: calc(100% + 8px);
    padding: 8px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    box-shadow: 0 24px 50px rgba(2, 8, 23, 0.22);
    backdrop-filter: none;
}

.export-dropdown-option {
    padding: 11px;
    border-radius: 14px;
}

.export-dropdown-option:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    transform: none;
}

.export-dropdown-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.export-dropdown-option-text strong {
    font-size: 0.92rem;
}

.export-dropdown-option-text small {
    font-size: 0.75rem;
    margin-top: 4px;
}

body.theme-modelo-light-ops .export-dropdown-toggle,
body.theme-modelo-light-ops .export-dropdown-menu {
    background: #ffffff;
    border-color: color-mix(in srgb, var(--primary) 18%, #d8e3f0);
}

body.theme-modelo-light-ops .export-modal-card {
    background: #ffffff;
}

body.theme-modelo-dark-ops .export-dropdown-toggle,
body.theme-modelo-neon-ops .export-dropdown-toggle,
body.theme-black-blue .export-dropdown-toggle {
    background: color-mix(in srgb, var(--card) 92%, #0a1220 8%);
}

body.theme-modelo-dark-ops .export-dropdown-menu,
body.theme-modelo-neon-ops .export-dropdown-menu,
body.theme-black-blue .export-dropdown-menu {
    background: color-mix(in srgb, var(--card) 96%, #0a1220 4%);
}

body.theme-modelo-dark-ops .export-modal-backdrop,
body.theme-modelo-neon-ops .export-modal-backdrop,
body.theme-black-blue .export-modal-backdrop {
    background: rgba(3, 9, 18, 0.76);
}

body.theme-modelo-dark-ops .export-modal-card,
body.theme-modelo-neon-ops .export-modal-card,
body.theme-black-blue .export-modal-card {
    background: color-mix(in srgb, var(--card) 95%, #09111f 5%);
}


/* ============================================================
   FIX FINAL - exportação visível em temas escuros
   ============================================================ */
body.theme-modelo-dark-ops .export-dropdown,
body.theme-modelo-neon-ops .export-dropdown,
body.theme-black-blue .export-dropdown {
    z-index: 4500;
}

body.theme-modelo-dark-ops .export-dropdown-toggle,
body.theme-modelo-neon-ops .export-dropdown-toggle,
body.theme-black-blue .export-dropdown-toggle {
    background: #07182b !important;
    color: #eef6ff !important;
    border-color: rgba(93, 175, 255, 0.38) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34) !important;
}

body.theme-modelo-dark-ops .export-dropdown-toggle:hover,
body.theme-modelo-dark-ops .export-dropdown.open .export-dropdown-toggle,
body.theme-modelo-neon-ops .export-dropdown-toggle:hover,
body.theme-modelo-neon-ops .export-dropdown.open .export-dropdown-toggle,
body.theme-black-blue .export-dropdown-toggle:hover,
body.theme-black-blue .export-dropdown.open .export-dropdown-toggle {
    background: #0a2038 !important;
}

body.theme-modelo-dark-ops .export-dropdown-toggle-text strong,
body.theme-modelo-dark-ops .export-dropdown-toggle-text small,
body.theme-modelo-dark-ops .export-dropdown-toggle-chevron,
body.theme-modelo-neon-ops .export-dropdown-toggle-text strong,
body.theme-modelo-neon-ops .export-dropdown-toggle-text small,
body.theme-modelo-neon-ops .export-dropdown-toggle-chevron,
body.theme-black-blue .export-dropdown-toggle-text strong,
body.theme-black-blue .export-dropdown-toggle-text small,
body.theme-black-blue .export-dropdown-toggle-chevron {
    color: #eef6ff !important;
    opacity: 1 !important;
}

body.theme-modelo-dark-ops .export-dropdown-menu,
body.theme-modelo-neon-ops .export-dropdown-menu,
body.theme-black-blue .export-dropdown-menu {
    background: #081a2d !important;
    border: 1px solid rgba(93, 175, 255, 0.28) !important;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.42) !important;
    backdrop-filter: none !important;
    z-index: 4600 !important;
}

body.theme-modelo-dark-ops .export-dropdown-option,
body.theme-modelo-neon-ops .export-dropdown-option,
body.theme-black-blue .export-dropdown-option {
    background: #0b2037 !important;
    color: #f4f9ff !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-modelo-dark-ops .export-dropdown-option + .export-dropdown-option,
body.theme-modelo-neon-ops .export-dropdown-option + .export-dropdown-option,
body.theme-black-blue .export-dropdown-option + .export-dropdown-option {
    margin-top: 8px;
}

body.theme-modelo-dark-ops .export-dropdown-option:hover,
body.theme-modelo-neon-ops .export-dropdown-option:hover,
body.theme-black-blue .export-dropdown-option:hover {
    background: #102b49 !important;
}

body.theme-modelo-dark-ops .export-dropdown-option-text strong,
body.theme-modelo-dark-ops .export-dropdown-option-text small,
body.theme-modelo-neon-ops .export-dropdown-option-text strong,
body.theme-modelo-neon-ops .export-dropdown-option-text small,
body.theme-black-blue .export-dropdown-option-text strong,
body.theme-black-blue .export-dropdown-option-text small {
    color: #f4f9ff !important;
}

body.theme-modelo-dark-ops .export-modal-backdrop,
body.theme-modelo-neon-ops .export-modal-backdrop,
body.theme-black-blue .export-modal-backdrop {
    background: rgba(2, 10, 18, 0.86) !important;
    backdrop-filter: none !important;
    z-index: 7000 !important;
}

body.theme-modelo-dark-ops .export-modal-card,
body.theme-modelo-neon-ops .export-modal-card,
body.theme-black-blue .export-modal-card {
    background: #07182b !important;
    color: #f4f9ff !important;
    border: 1px solid rgba(93, 175, 255, 0.26) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48) !important;
}

body.theme-modelo-dark-ops .export-modal-card h3,
body.theme-modelo-dark-ops .export-modal-card p,
body.theme-modelo-dark-ops .export-modal-tip,
body.theme-modelo-dark-ops .export-modal-eyebrow,
body.theme-modelo-neon-ops .export-modal-card h3,
body.theme-modelo-neon-ops .export-modal-card p,
body.theme-modelo-neon-ops .export-modal-tip,
body.theme-modelo-neon-ops .export-modal-eyebrow,
body.theme-black-blue .export-modal-card h3,
body.theme-black-blue .export-modal-card p,
body.theme-black-blue .export-modal-tip,
body.theme-black-blue .export-modal-eyebrow {
    color: #f4f9ff !important;
}

body.theme-modelo-dark-ops .export-modal-progress,
body.theme-modelo-neon-ops .export-modal-progress,
body.theme-black-blue .export-modal-progress {
    background: #10263f !important;
    border-color: rgba(93, 175, 255, 0.20) !important;
}


/* ============================================================
   FILTRO EXCEL MULTICOLUNAS - Logs Detalhados
   ============================================================ */
.th-excel-filtro {
    white-space: nowrap;
}

.th-excel-filtro .logs-chave-filter-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.th-excel-filtro .excel-filter-btn {
    width: 25px;
    height: 25px;
    min-width: 25px;
}

.th-excel-filtro .excel-filter-btn svg {
    width: 13px;
    height: 13px;
}

.logs-chave-filter-info {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

body.theme-modelo-dark-ops .th-excel-filtro .excel-filter-btn,
body.theme-modelo-neon-ops .th-excel-filtro .excel-filter-btn,
body.theme-black-blue .th-excel-filtro .excel-filter-btn {
    background: rgba(10, 32, 56, .88);
    color: #bfe8ff;
    border-color: rgba(93, 175, 255, .25);
}

body.theme-modelo-dark-ops .th-excel-filtro .excel-filter-btn:hover,
body.theme-modelo-dark-ops .th-excel-filtro .excel-filter-btn.active,
body.theme-modelo-neon-ops .th-excel-filtro .excel-filter-btn:hover,
body.theme-modelo-neon-ops .th-excel-filtro .excel-filter-btn.active,
body.theme-black-blue .th-excel-filtro .excel-filter-btn:hover,
body.theme-black-blue .th-excel-filtro .excel-filter-btn.active {
    background: rgba(37, 99, 235, .34);
    color: #ffffff;
    border-color: rgba(125, 211, 252, .48);
}

body.theme-modelo-dark-ops #excel-filter-chave-title,
body.theme-modelo-neon-ops #excel-filter-chave-title,
body.theme-black-blue #excel-filter-chave-title {
    color: #f4f9ff;
}

@media (max-width: 1200px) {
    .th-excel-filtro .logs-chave-filter-head {
        gap: 3px;
    }

    .th-excel-filtro .excel-filter-btn {
        width: 23px;
        height: 23px;
        min-width: 23px;
    }
}


/* ============================================================
   ALERTAS ATIVOS - data/hora dos últimos erros
   ============================================================ */
.alert-row-model small time {
    font-weight: 800;
    color: inherit;
    opacity: .92;
    white-space: nowrap;
}

.alert-row-model small b {
    display: inline-block;
    margin: 0 4px;
    opacity: .55;
    font-weight: 900;
}

body.theme-modelo-dark-ops .alert-row-model small time,
body.theme-modelo-neon-ops .alert-row-model small time,
body.theme-black-blue .alert-row-model small time {
    color: #d9f2ff !important;
    opacity: .95;
}

body.theme-modelo-light-ops .alert-row-model small time {
    color: #334155 !important;
}


/* ============================================================
   FILTRO EXCEL - Status em Logs Detalhados
   ============================================================ */
.th-status-filtro .logs-chave-filter-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.th-status-filtro .excel-filter-btn {
    width: 25px;
    height: 25px;
    min-width: 25px;
}

.th-status-filtro .excel-filter-btn svg {
    width: 13px;
    height: 13px;
}

body.theme-modelo-dark-ops .th-status-filtro .excel-filter-btn,
body.theme-modelo-neon-ops .th-status-filtro .excel-filter-btn,
body.theme-black-blue .th-status-filtro .excel-filter-btn {
    background: rgba(10, 32, 56, .88);
    color: #bfe8ff;
    border-color: rgba(93, 175, 255, .25);
}

body.theme-modelo-dark-ops .th-status-filtro .excel-filter-btn:hover,
body.theme-modelo-dark-ops .th-status-filtro .excel-filter-btn.active,
body.theme-modelo-neon-ops .th-status-filtro .excel-filter-btn:hover,
body.theme-modelo-neon-ops .th-status-filtro .excel-filter-btn.active,
body.theme-black-blue .th-status-filtro .excel-filter-btn:hover,
body.theme-black-blue .th-status-filtro .excel-filter-btn.active {
    background: rgba(37, 99, 235, .34);
    color: #ffffff;
    border-color: rgba(125, 211, 252, .48);
}


/* ============================================================
   DASHBOARD - Alertas/Logs com cliente + filtro fora da sidebar
   ============================================================ */

/* O painel de filtro é fixo e precisa ficar acima da sidebar e dentro da área útil */
.excel-filter-panel {
    z-index: 2147483600 !important;
}

.alert-row-model small .alert-client,
.dashboard-model-log-list small .dashboard-model-log-client {
    font-weight: 900;
    color: inherit;
    opacity: .95;
}

.dashboard-model-log-list small b,
.alert-row-model small b {
    display: inline-block;
    margin: 0 4px;
    opacity: .55;
    font-weight: 900;
}

/* Logs em tempo real: reduz a coluna de status e dá mais espaço para integração/chave */
.dashboard-model-log-list div {
    grid-template-columns: 56px 52px minmax(120px, .9fr) minmax(230px, 1.75fr) !important;
    gap: 7px !important;
}

.log-level {
    justify-self: start;
    max-width: 52px;
    text-align: center;
    padding: 3px 5px !important;
    font-size: 8.6px !important;
    line-height: 1.1 !important;
}

.dashboard-model-log-list small {
    min-width: 0;
}

body.theme-modelo-dark-ops .dashboard-model-log-list small .dashboard-model-log-client,
body.theme-modelo-neon-ops .dashboard-model-log-list small .dashboard-model-log-client,
body.theme-black-blue .dashboard-model-log-list small .dashboard-model-log-client,
body.theme-modelo-dark-ops .alert-row-model small .alert-client,
body.theme-modelo-neon-ops .alert-row-model small .alert-client,
body.theme-black-blue .alert-row-model small .alert-client {
    color: #d9f2ff !important;
}

body.theme-modelo-light-ops .dashboard-model-log-list small .dashboard-model-log-client,
body.theme-modelo-light-ops .alert-row-model small .alert-client {
    color: #334155 !important;
}

/* Alertas ativos: limite visual para 6 registros sem estourar o card */
.dashboard-model-alert-list {
    gap: 5px !important;
}

.alert-row-model {
    min-height: 38px;
}

@media (max-width: 1200px) {
    .dashboard-model-log-list div {
        grid-template-columns: 52px 48px minmax(105px, .85fr) minmax(180px, 1.6fr) !important;
    }

    .log-level {
        max-width: 48px;
        font-size: 8px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}


/* ============================================================
   LOGS EM TEMPO REAL - status como sinalizador moderno
   ============================================================ */

.dashboard-model-log-list .dashboard-model-log-row {
    display: grid !important;
    align-items: center !important;
    border-bottom: 1px solid var(--model-border) !important;
    min-height: 28px !important;
    gap: 7px !important;
}

.dashboard-model-log-list .dashboard-model-log-row.has-client {
    grid-template-columns: 56px 22px minmax(78px, .72fr) minmax(120px, .95fr) minmax(170px, 1.55fr) !important;
}

.dashboard-model-log-list .dashboard-model-log-row.no-client {
    grid-template-columns: 56px 22px minmax(150px, 1fr) minmax(220px, 1.65fr) !important;
}

.log-status-signal {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    position: relative;
    background: rgba(148, 163, 184, .14);
    border: 1px solid rgba(148, 163, 184, .34);
}

.log-status-signal i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: block;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.log-status-signal.badge-success {
    background: rgba(34, 197, 94, .13);
    border-color: rgba(34, 197, 94, .34);
}

.log-status-signal.badge-success i {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .15), 0 0 14px rgba(34, 197, 94, .48);
}

.log-status-signal.badge-danger {
    background: rgba(239, 68, 68, .13);
    border-color: rgba(239, 68, 68, .34);
}

.log-status-signal.badge-danger i {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .15), 0 0 14px rgba(239, 68, 68, .48);
}

.log-status-signal.badge-pendente {
    background: rgba(245, 158, 11, .13);
    border-color: rgba(245, 158, 11, .36);
}

.log-status-signal.badge-pendente i {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .15), 0 0 14px rgba(245, 158, 11, .48);
}

.log-status-signal.badge-info {
    background: rgba(14, 165, 233, .13);
    border-color: rgba(14, 165, 233, .34);
}

.log-status-signal.badge-info i {
    background: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, .15), 0 0 14px rgba(14, 165, 233, .42);
}

.dashboard-model-log-client-name {
    font-weight: 900;
    color: var(--model-text);
}

.dashboard-model-log-integracao {
    font-weight: 850;
}

.dashboard-model-log-list .dashboard-model-log-row time,
.dashboard-model-log-list .dashboard-model-log-row strong,
.dashboard-model-log-list .dashboard-model-log-row small {
    min-width: 0;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-modelo-dark-ops .dashboard-model-log-client-name,
body.theme-modelo-neon-ops .dashboard-model-log-client-name,
body.theme-black-blue .dashboard-model-log-client-name {
    color: #f4f9ff !important;
}

body.theme-modelo-dark-ops .dashboard-model-log-integracao,
body.theme-modelo-neon-ops .dashboard-model-log-integracao,
body.theme-black-blue .dashboard-model-log-integracao {
    color: #d9f2ff !important;
}

body.theme-modelo-light-ops .dashboard-model-log-client-name {
    color: #0f172a !important;
}

body.theme-modelo-light-ops .dashboard-model-log-integracao {
    color: #334155 !important;
}

/* Neutraliza a regra antiga da coluna de status textual */
.dashboard-model-log-list .dashboard-model-log-row .log-level {
    display: none !important;
}

@media (max-width: 1200px) {
    .dashboard-model-log-list .dashboard-model-log-row.has-client {
        grid-template-columns: 52px 20px minmax(70px, .7fr) minmax(100px, .9fr) minmax(150px, 1.5fr) !important;
    }

    .dashboard-model-log-list .dashboard-model-log-row.no-client {
        grid-template-columns: 52px 20px minmax(130px, 1fr) minmax(180px, 1.55fr) !important;
    }

    .log-status-signal {
        width: 16px;
        height: 16px;
    }

    .log-status-signal i {
        width: 7px;
        height: 7px;
    }
}


/* ============================================================
   HALO PULSANTE - sinalizadores de status
   Modelo B: centro fixo + halo externo discreto
   ============================================================ */

@keyframes echoHaloPulseSuccess {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .34;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .28);
    }
    65% {
        transform: translate(-50%, -50%) scale(1.65);
        opacity: .08;
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes echoHaloPulseWarning {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .34;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, .30);
    }
    65% {
        transform: translate(-50%, -50%) scale(1.65);
        opacity: .08;
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes echoHaloPulseDanger {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .32;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .30);
    }
    65% {
        transform: translate(-50%, -50%) scale(1.7);
        opacity: .08;
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes echoHaloPulseInfo {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .30;
        box-shadow: 0 0 0 0 rgba(14, 165, 233, .28);
    }
    65% {
        transform: translate(-50%, -50%) scale(1.65);
        opacity: .08;
        box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

/* Logs em tempo real: mantém o centro fixo e pulsa só o halo externo */
.log-status-signal {
    position: relative !important;
    overflow: visible !important;
    isolation: isolate;
}

.log-status-signal::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(.72);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    background: rgba(148, 163, 184, .18);
    animation: echoHaloPulseInfo 2.4s ease-out infinite;
}

.log-status-signal i {
    position: relative;
    z-index: 1;
    animation: none !important;
}

.log-status-signal.badge-success::before {
    background: rgba(34, 197, 94, .18);
    animation-name: echoHaloPulseSuccess;
}

.log-status-signal.badge-danger::before {
    background: rgba(239, 68, 68, .18);
    animation-name: echoHaloPulseDanger;
    animation-duration: 1.9s;
}

.log-status-signal.badge-pendente::before {
    background: rgba(245, 158, 11, .18);
    animation-name: echoHaloPulseWarning;
    animation-duration: 2.15s;
}

.log-status-signal.badge-info::before {
    background: rgba(14, 165, 233, .18);
    animation-name: echoHaloPulseInfo;
}

/* Mapa de integrações: pontos com halo discreto */
.dashboard-model-map .map-status-dot,
.status-dot,
.mini-status i {
    position: relative !important;
    overflow: visible !important;
}

.dashboard-model-map .map-status-dot::after,
.status-dot::after,
.mini-status i::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(.70);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    background: rgba(34, 197, 94, .18);
    animation: echoHaloPulseSuccess 2.45s ease-out infinite;
}

/* Cores por status no mapa */
.dashboard-model-map .map-status-dot.is-ok::after,
.status-dot::after,
.mini-status i::after {
    background: rgba(34, 197, 94, .18);
    animation-name: echoHaloPulseSuccess;
}

.dashboard-model-map .map-status-dot.is-error::after {
    background: rgba(239, 68, 68, .18);
    animation-name: echoHaloPulseDanger;
    animation-duration: 1.9s;
}

/* Pontos usados em legendas/gráficos também recebem halo bem sutil */
.legend-dot {
    position: relative !important;
    overflow: visible !important;
    isolation: isolate;
}

.legend-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(.70);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    background: currentColor;
    animation: echoHaloPulseInfo 2.8s ease-out infinite;
}

/* Evita que a animação atrapalhe performance/acessibilidade quando o navegador pedir menos movimento */
@media (prefers-reduced-motion: reduce) {
    .log-status-signal::before,
    .dashboard-model-map .map-status-dot::after,
    .status-dot::after,
    .mini-status i::after,
    .legend-dot::after {
        animation: none !important;
        opacity: 0 !important;
    }
}

/* Tema escuro/neon: halo um pouco mais vivo, mas sem exagero */
body.theme-modelo-dark-ops .log-status-signal::before,
body.theme-modelo-neon-ops .log-status-signal::before,
body.theme-black-blue .log-status-signal::before,
body.theme-modelo-dark-ops .dashboard-model-map .map-status-dot::after,
body.theme-modelo-neon-ops .dashboard-model-map .map-status-dot::after,
body.theme-black-blue .dashboard-model-map .map-status-dot::after,
body.theme-modelo-dark-ops .status-dot::after,
body.theme-modelo-neon-ops .status-dot::after,
body.theme-black-blue .status-dot::after {
    filter: saturate(1.15);
}

/* Tema claro: reduz um pouco o glow para ficar elegante */
body.theme-modelo-light-ops .log-status-signal::before,
body.theme-modelo-light-ops .dashboard-model-map .map-status-dot::after,
body.theme-modelo-light-ops .status-dot::after,
body.theme-modelo-light-ops .mini-status i::after,
body.theme-modelo-light-ops .legend-dot::after {
    opacity: .85;
    filter: saturate(.95);
}


/* ============================================================
   FIX HALO PULSANTE - Logs em tempo real realmente animado
   ============================================================ */

/*
   Ajuste específico para o sinalizador dos Logs em tempo real.
   O modelo anterior podia ficar visualmente "fixo" porque o halo estava
   muito discreto e com camada atrás do próprio componente.
*/
@keyframes echoLogHaloPulseGreen {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .50;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.95);
        opacity: .10;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.25);
        opacity: 0;
    }
}

@keyframes echoLogHaloPulseRed {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .50;
    }
    60% {
        transform: translate(-50%, -50%) scale(2.00);
        opacity: .12;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.35);
        opacity: 0;
    }
}

@keyframes echoLogHaloPulseYellow {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .48;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.95);
        opacity: .12;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.25);
        opacity: 0;
    }
}

@keyframes echoLogHaloPulseBlue {
    0% {
        transform: translate(-50%, -50%) scale(.72);
        opacity: .44;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.95);
        opacity: .10;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.25);
        opacity: 0;
    }
}

.dashboard-model-log-list .log-status-signal {
    position: relative !important;
    overflow: visible !important;
    isolation: auto !important;
    z-index: 2 !important;
}

/* Halo externo animado */
.dashboard-model-log-list .log-status-signal::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 999px !important;
    transform: translate(-50%, -50%) scale(.72);
    pointer-events: none !important;
    z-index: 0 !important;
    opacity: .45;
    background: rgba(14, 165, 233, .30);
    animation: echoLogHaloPulseBlue 1.85s ease-out infinite !important;
}

/* Anel interno fixo, sem animação */
.dashboard-model-log-list .log-status-signal::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 17px !important;
    height: 17px !important;
    border-radius: 999px !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.14) !important;
}

/* Centro fixo */
.dashboard-model-log-list .log-status-signal i {
    position: relative !important;
    z-index: 3 !important;
    animation: none !important;
}

/* Sucesso */
.dashboard-model-log-list .log-status-signal.badge-success::before {
    background: rgba(34, 197, 94, .38) !important;
    animation-name: echoLogHaloPulseGreen !important;
}

.dashboard-model-log-list .log-status-signal.badge-success::after {
    border-color: rgba(34, 197, 94, .42) !important;
}

/* Erro */
.dashboard-model-log-list .log-status-signal.badge-danger::before {
    background: rgba(239, 68, 68, .40) !important;
    animation-name: echoLogHaloPulseRed !important;
    animation-duration: 1.55s !important;
}

.dashboard-model-log-list .log-status-signal.badge-danger::after {
    border-color: rgba(239, 68, 68, .46) !important;
}

/* Pendente */
.dashboard-model-log-list .log-status-signal.badge-pendente::before {
    background: rgba(245, 158, 11, .42) !important;
    animation-name: echoLogHaloPulseYellow !important;
    animation-duration: 1.75s !important;
}

.dashboard-model-log-list .log-status-signal.badge-pendente::after {
    border-color: rgba(245, 158, 11, .46) !important;
}

/* Corrigido / Info */
.dashboard-model-log-list .log-status-signal.badge-info::before {
    background: rgba(14, 165, 233, .36) !important;
    animation-name: echoLogHaloPulseBlue !important;
}

.dashboard-model-log-list .log-status-signal.badge-info::after {
    border-color: rgba(14, 165, 233, .42) !important;
}

/* Tema claro: anima um pouco mais suave */
body.theme-modelo-light-ops .dashboard-model-log-list .log-status-signal::before {
    opacity: .36;
}

/* Tema escuro/neon: anima mais perceptível */
body.theme-modelo-dark-ops .dashboard-model-log-list .log-status-signal::before,
body.theme-modelo-neon-ops .dashboard-model-log-list .log-status-signal::before,
body.theme-black-blue .dashboard-model-log-list .log-status-signal::before {
    filter: saturate(1.2) brightness(1.08);
}

/* Caso o usuário/navegador peça redução de animação */
@media (prefers-reduced-motion: reduce) {
    .dashboard-model-log-list .log-status-signal::before {
        animation: none !important;
        opacity: .20 !important;
        transform: translate(-50%, -50%) scale(1.35) !important;
    }
}
