@import url("/assets/css/ui-shell.css?v=2400");
* {
    box-sizing: border-box;
}

:root {
    --bg: #090e14;
    --sidebar: #0d141d;
    --panel: #111a25;
    --panel-2: #0e1721;
    --border: #202c3a;

    --text: #edf3f9;
    --muted: #8292a6;

    --primary: #ff7a18;
    --primary-hover: #ff8f3d;

    --green: #27d17f;
    --red: #ff5757;
    --yellow: #ffca4b;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 18px;

    padding: 38px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 28px;
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: var(--primary);

    color: #111;
    font-weight: 900;
}

.brand-title {
    font-size: 20px;
    font-weight: 750;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.login-card .intro {
    margin: 0 0 28px;

    color: var(--muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 650;
}

.input {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    color: var(--text);
    background: var(--panel-2);

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;
}

.input:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(255, 122, 24, .12);
}

.btn {
    min-height: 42px;

    padding: 0 18px;

    border: 0;
    border-radius: 9px;

    cursor: pointer;

    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #15100c;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}

.alert {
    margin-bottom: 20px;

    padding: 12px 14px;

    border-radius: 9px;

    font-size: 13px;
}

.alert-error {
    color: #ffb6b6;
    background: rgba(255, 87, 87, .1);

    border: 1px solid rgba(255, 87, 87, .25);
}

.app {
    min-height: 100vh;

    display: grid;

    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: fixed;

    width: 250px;
    height: 100vh;

    padding: 18px 14px;

    background: var(--sidebar);

    border-right: 1px solid var(--border);
}

.sidebar .brand {
    margin: 4px 7px 26px;
}

.menu-title {
    margin: 18px 10px 8px;

    color: #596a7f;

    font-size: 11px;
    font-weight: 750;

    text-transform: uppercase;
    letter-spacing: .09em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 4px;
    padding: 10px 12px;

    color: #aab7c7;

    border-radius: 9px;

    font-size: 14px;

    transition: .15s;
}

.nav-link:hover {
    color: #fff;
    background: #131e2b;
}

.nav-link.active {
    color: #fff;

    background: rgba(255, 122, 24, .12);

    border: 1px solid rgba(255, 122, 24, .2);
}

.nav-icon {
    width: 20px;

    text-align: center;
}

.sidebar-user {
    position: absolute;

    left: 14px;
    right: 14px;
    bottom: 15px;

    padding: 12px;

    background: #101923;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.sidebar-user strong {
    display: block;
    font-size: 13px;
}

.sidebar-user small {
    display: block;

    margin-top: 3px;

    color: var(--muted);
}

.logout-form {
    margin-top: 11px;
}

.logout-button {
    padding: 0;

    color: #ff8f8f;
    background: transparent;

    border: 0;

    cursor: pointer;

    font-size: 12px;
}

.main {
    grid-column: 2;

    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.page-title {
    margin: 0;

    font-size: 25px;
}

.page-subtitle {
    margin-top: 5px;

    color: var(--muted);

    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 10px;

    border-radius: 999px;

    background: #101923;
    border: 1px solid var(--border);

    color: #aebaca;

    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--green);

    box-shadow: 0 0 10px rgba(39, 209, 127, .6);
}

.cards {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 22px;
}

.card {
    min-height: 120px;

    padding: 19px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 13px;
}

.card-label {
    color: var(--muted);

    font-size: 12px;
}

.card-number {
    margin-top: 11px;

    font-size: 30px;
    font-weight: 750;
}

.panel {
    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 13px;
}

.panel h2 {
    margin: 0 0 8px;

    font-size: 16px;
}

.panel p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}

@media (max-width: 900px) {
    .app {
        display: block;
    }

    .sidebar {
        position: relative;

        width: 100%;
        height: auto;
    }

    .sidebar-user {
        position: static;

        margin-top: 20px;
    }

    .main {
        padding: 18px;
    }

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


/* ==========================================================
   EMPRESAS
========================================================== */

.alert-success {
    color: #9af0c3;
    background: rgba(39, 209, 127, .08);
    border: 1px solid rgba(39, 209, 127, .2);
}

.companies-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid var(--border);
}

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

.data-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

.data-table th {
    padding: 13px 18px;

    color: #718399;

    background: #0d151f;

    border-bottom: 1px solid var(--border);

    text-align: left;
    text-transform: uppercase;

    font-size: 10px;
    letter-spacing: .06em;
}

.data-table td {
    padding: 15px 18px;

    border-bottom: 1px solid rgba(32, 44, 58, .7);

    color: #c7d2df;
}

.data-table tbody tr {
    transition: background .15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, .018);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-avatar {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    flex: 0 0 38px;

    background: rgba(255, 122, 24, .12);

    border: 1px solid rgba(255, 122, 24, .22);
    border-radius: 9px;

    color: var(--primary);

    font-weight: 800;
}

.company-cell strong {
    display: block;

    color: var(--text);

    font-size: 13px;
}

.company-cell small {
    display: block;

    margin-top: 3px;

    color: var(--muted);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 650;
}

.status span {
    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.status-active {
    color: #84eeb6;

    background: rgba(39, 209, 127, .08);

    border: 1px solid rgba(39, 209, 127, .16);
}

.status-active span {
    background: var(--green);
}

.status-inactive {
    color: #9aa7b6;

    background: rgba(130, 146, 166, .08);

    border: 1px solid rgba(130, 146, 166, .15);
}

.status-inactive span {
    background: #687789;
}

.actions-column {
    width: 150px;
}

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

.actions form {
    margin: 0;
}

.icon-btn {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    padding: 0;

    color: #9baabc;
    background: #0e1721;

    border: 1px solid var(--border);
    border-radius: 8px;

    cursor: pointer;

    transition: .15s;
}

.icon-btn:hover {
    color: #fff;

    border-color: #3a4b5f;

    transform: translateY(-1px);
}

.icon-btn-danger:hover {
    color: #ff8b8b;

    border-color: rgba(255, 87, 87, .35);

    background: rgba(255, 87, 87, .07);
}

.empty-state {
    min-height: 320px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 35px;

    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 16px;

    border-radius: 14px;

    background: #0e1721;
    border: 1px solid var(--border);

    color: var(--primary);

    font-size: 25px;
}

.empty-state strong {
    margin-bottom: 6px;
}

.empty-state span {
    margin-bottom: 20px;

    color: var(--muted);

    font-size: 13px;
}


/* ==========================================================
   MODAIS
========================================================== */

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .65);

    backdrop-filter: blur(4px);
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 520px;

    padding: 22px;

    background: #111a25;

    border: 1px solid #263545;
    border-radius: 14px;

    box-shadow: 0 35px 100px rgba(0, 0, 0, .55);

    animation: modalIn .15s ease-out;
}

.modal-small {
    max-width: 440px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;

    font-size: 19px;
}

.modal-header p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.modal-close {
    width: 32px;
    height: 32px;

    padding: 0;

    color: var(--muted);
    background: transparent;

    border: 0;
    border-radius: 7px;

    cursor: pointer;

    font-size: 24px;
}

.modal-close:hover {
    color: #fff;
    background: #172331;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;

    gap: 9px;

    margin-top: 24px;
}

.btn-secondary {
    color: #c8d2df;
    background: #182330;

    border: 1px solid #2a3949;
}

.btn-secondary:hover {
    background: #202d3c;
}

.btn-danger {
    color: white;
    background: #d94444;
}

.btn-danger:hover {
    background: #ed5151;
}

.delete-question {
    color: #c4ced9;

    font-size: 14px;
    line-height: 1.6;
}

.delete-question strong {
    color: #fff;
}


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

    .topbar {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }
}


/* ==========================================================
   ZABBIX
========================================================== */

.alert-warning {
    color: #ffd783;
    background: rgba(255, 202, 75, .08);
    border: 1px solid rgba(255, 202, 75, .22);
}

.inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:disabled,
.btn:disabled {
    opacity: .55;
    cursor: wait;
}

.zabbix-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}

.zabbix-card {
    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 13px;
}

.zabbix-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.zabbix-card h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.zabbix-company {
    color: var(--primary);

    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.zabbix-url {
    margin-top: 14px;

    padding: 10px 12px;

    overflow: hidden;

    color: #8da1b8;
    background: #0c141d;

    border: 1px solid var(--border);
    border-radius: 8px;

    font-family: monospace;
    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.zabbix-info-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 8px;

    margin-top: 14px;
}

.zabbix-info-grid > div {
    padding: 10px;

    background: #0d1620;

    border: 1px solid rgba(32, 44, 58, .8);
    border-radius: 8px;
}

.zabbix-info-grid small {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 10px;
}

.zabbix-info-grid strong {
    font-size: 13px;
}

.zabbix-test-status {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 15px;

    color: #a9b6c6;

    font-size: 12px;
}

.zabbix-test-status small {
    margin-left: auto;

    color: #627387;
}

.zbx-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
}

.zbx-ok {
    background: var(--green);

    box-shadow:
        0 0 8px rgba(39, 209, 127, .55);
}

.zbx-error {
    background: var(--red);

    box-shadow:
        0 0 8px rgba(255, 87, 87, .5);
}

.zbx-unknown {
    background: #718096;
}

.zabbix-error-box {
    margin-top: 12px;

    padding: 10px 12px;

    color: #ff9e9e;
    background: rgba(255, 87, 87, .06);

    border: 1px solid rgba(255, 87, 87, .16);
    border-radius: 8px;

    font-size: 11px;
    line-height: 1.5;
}

.zabbix-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;
}

.zabbix-actions form {
    margin: 0;
}

.zabbix-actions .btn {
    min-height: 36px;

    padding: 0 12px;

    font-size: 11px;
}

.form-row {
    display: grid;

    grid-template-columns: 140px 1fr;

    gap: 16px;
}

.field-help {
    margin-top: 6px;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.45;
}

.check-label {
    display: flex !important;
    align-items: center;

    gap: 8px;

    min-height: 44px;

    cursor: pointer;
}

.check-label input {
    width: 16px;
    height: 16px;

    accent-color: var(--primary);
}

.back-link {
    display: inline-block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 12px;
}

.back-link:hover {
    color: #fff;
}

.host-search {
    width: 280px;
}

.host-name strong {
    display: block;

    color: var(--text);
}

.host-name small {
    display: block;

    margin-top: 3px;

    color: var(--muted);
}

.groups-cell {
    max-width: 350px;
}

.host-status {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    font-size: 11px;
}

.host-status > span {
    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.host-status-ok {
    color: #83eab3;
}

.host-status-ok > span {
    background: var(--green);
}

.host-status-error {
    color: #ff9393;
}

.host-status-error > span {
    background: var(--red);
}

.host-status-unknown {
    color: #8796a8;
}

.host-status-unknown > span {
    background: #6d7b8c;
}

.mono {
    font-family: monospace;
}


@media (max-width: 800px) {

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

    .zabbix-info-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .host-search {
        width: 100%;
        margin-top: 15px;
    }

    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

}


/* ==========================================================
   MAPAS
========================================================== */

.maps-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(330px, 1fr)
        );

    gap: 16px;
}

.map-card {
    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 13px;
}

.map-card-top {
    display: flex;
    align-items: center;

    gap: 13px;
}

.map-card-icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    flex: 0 0 46px;

    color: var(--primary);

    background:
        rgba(255, 122, 24, .08);

    border:
        1px solid
        rgba(255, 122, 24, .2);

    border-radius: 11px;

    font-size: 20px;
}

.map-card h2 {
    margin: 3px 0;

    font-size: 17px;
}

.map-card small {
    color: var(--muted);
}

.map-company {
    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .07em;
}

.map-stats {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 8px;

    margin-top: 18px;
}

.map-stats > div {
    padding: 11px 12px;

    background: #0d1620;

    border: 1px solid var(--border);
    border-radius: 8px;
}

.map-stats strong {
    display: block;

    font-size: 18px;
}

.map-stats span {
    color: var(--muted);

    font-size: 10px;
}

.map-card-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 16px;
}

.map-card-actions .btn {
    min-height: 36px;

    padding: 0 12px;

    font-size: 11px;
}


/* ==========================================================
   EDITOR DE MAPA
========================================================== */

.map-main {
    padding: 16px;

    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    flex: 0 0 auto;

    padding: 4px 4px 14px;
}

.map-title-row {
    display: flex;
    align-items: center;

    gap: 15px;
}

.map-toolbar-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}

.map-sync-status {
    display: flex;
    align-items: center;

    gap: 7px;

    padding: 8px 11px;

    color: var(--muted);

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 999px;

    font-size: 11px;
}

.map-sync-dot {
    width: 7px;
    height: 7px;

    background: var(--green);

    border-radius: 50%;

    box-shadow:
        0 0 8px
        rgba(39, 209, 127, .5);
}

.submap-select {
    width: 170px;

    height: 38px;
}

.map-workspace {
    min-height: 0;

    flex: 1;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        260px;

    overflow: hidden;

    background: #070c11;

    border: 1px solid var(--border);
    border-radius: 14px;
}

.map-canvas {
    width: 100%;
    height: 100%;

    min-height: 500px;

    background-color: #080e14;

    background-image:
        linear-gradient(
            rgba(255,255,255,.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.025) 1px,
            transparent 1px
        );

    background-size:
        25px 25px;
}

.node-inspector {
    padding: 16px;

    overflow-y: auto;

    background: #0d151f;

    border-left:
        1px solid var(--border);
}

.inspector-empty {
    min-height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--muted);

    text-align: center;
}

.inspector-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    margin-bottom: 13px;

    color: var(--primary);

    background:
        rgba(255,122,24,.08);

    border:
        1px solid
        rgba(255,122,24,.18);

    border-radius: 12px;

    font-size: 21px;
}

.inspector-empty strong {
    color: var(--text);

    font-size: 13px;
}

.inspector-empty span {
    margin-top: 6px;

    font-size: 11px;
    line-height: 1.5;
}

.inspector-content {
    display: flex;
    flex-direction: column;

    gap: 17px;
}

.inspector-node-header {
    display: flex;
    align-items: center;

    gap: 11px;

    padding-bottom: 15px;

    border-bottom:
        1px solid var(--border);
}

.inspector-node-header strong {
    display: block;

    font-size: 14px;
}

.inspector-node-header span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}

.inspector-node-dot,
.picker-host-dot {
    width: 13px;
    height: 13px;

    flex: 0 0 13px;

    border-radius: 50%;
}

.node-dot-up {
    background: var(--green);

    box-shadow:
        0 0 10px
        rgba(39,209,127,.55);
}

.node-dot-down {
    background: var(--red);

    box-shadow:
        0 0 10px
        rgba(255,87,87,.5);
}

.node-dot-maintenance {
    background: var(--yellow);
}

.node-dot-disabled {
    background: #687789;
}

.node-dot-unknown {
    background: #687789;
}

.inspector-data {
    display: grid;

    gap: 8px;
}

.inspector-data > div {
    padding: 10px;

    background: #0a1119;

    border: 1px solid var(--border);
    border-radius: 8px;
}

.inspector-data small {
    display: block;

    margin-bottom: 4px;

    color: var(--muted);

    font-size: 9px;

    text-transform: uppercase;
}

.inspector-data strong {
    word-break: break-word;

    font-size: 11px;
}


/* ==========================================================
   SELETOR DE HOST
========================================================== */

.host-modal {
    max-width: 700px;
}

.host-picker-state {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 42px;

    color: var(--muted);

    font-size: 12px;
}

.picker-spinner {
    width: 15px;
    height: 15px;

    border: 2px solid
        rgba(255,255,255,.14);

    border-top-color:
        var(--primary);

    border-radius: 50%;

    animation:
        pickerSpin .7s linear infinite;
}

@keyframes pickerSpin {
    to {
        transform:
            rotate(360deg);
    }
}

.host-picker-list {
    max-height: 420px;

    overflow-y: auto;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.host-picker-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 13px;

    color: var(--text);
    background: #0d1620;

    border: 0;
    border-bottom:
        1px solid var(--border);

    cursor: pointer;

    text-align: left;
}

.host-picker-item:last-child {
    border-bottom: 0;
}

.host-picker-item:hover {
    background: #14202d;
}

.picker-host-info {
    min-width: 0;

    flex: 1;
}

.picker-host-info strong {
    display: block;

    overflow: hidden;

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.picker-host-info span {
    display: block;

    margin-top: 3px;

    color: #91a2b5;

    font-family: monospace;
    font-size: 10px;
}

.picker-host-info small {
    display: block;

    margin-top: 3px;

    overflow: hidden;

    color: #68798c;

    font-size: 9px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.picker-add {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    flex: 0 0 28px;

    color: #18100b;

    background: var(--primary);

    border-radius: 7px;

    font-size: 17px;
    font-weight: bold;
}

.host-picker-empty {
    padding: 35px;

    color: var(--muted);

    text-align: center;

    font-size: 12px;
}


@media (max-width: 1000px) {

    .map-workspace {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .node-inspector {
        display: none;
    }

    .map-toolbar {
        align-items: flex-start;

        flex-direction: column;
    }

    .map-toolbar-actions {
        width: 100%;

        flex-wrap: wrap;
    }

}


/* ==========================================================
   ENLACES DO MAPA
========================================================== */

.link-mode-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;

    background: var(--primary);

    box-shadow:
        0 0 9px
        rgba(255, 122, 24, .65);
}

.link-mode-cancel {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    margin-left: 3px;
    padding: 0;

    color: #9aa9ba;
    background: transparent;

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    font-size: 16px;
}

.link-mode-cancel:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}


/* MODAL */

.link-endpoints {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        40px
        minmax(0, 1fr);

    align-items: center;

    gap: 10px;

    margin-bottom: 22px;
}

.link-endpoints > div:not(
    .link-arrow
) {
    min-width: 0;

    padding: 12px;

    background: #0d1620;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.link-endpoints small {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: .06em;
}

.link-endpoints strong {
    display: block;

    overflow: hidden;

    color: var(--text);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-arrow {
    color: var(--primary);

    text-align: center;

    font-size: 21px;
    font-weight: 700;
}


/* INSPECTOR DO LINK */

.inspector-link-header {
    display: flex;
    align-items: center;

    gap: 11px;

    padding-bottom: 15px;

    border-bottom:
        1px solid var(--border);
}

.inspector-link-header strong {
    display: block;

    font-size: 14px;
}

.inspector-link-header span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}

.link-status-line {
    width: 7px;
    height: 38px;

    flex: 0 0 7px;

    border-radius: 999px;

    background: #687789;
}

.link-status-up {
    background: var(--green);

    box-shadow:
        0 0 8px
        rgba(39, 209, 127, .45);
}

.link-status-down {
    background: var(--red);

    box-shadow:
        0 0 8px
        rgba(255, 87, 87, .45);
}

.link-status-maintenance {
    background: var(--yellow);
}

.link-status-disabled,
.link-status-unknown {
    background: #687789;
}


@media (max-width: 700px) {

    .link-endpoints {
        grid-template-columns: 1fr;
    }

    .link-arrow {
        transform: rotate(90deg);
    }

}


/* ==========================================================
   TRÁFEGO DOS ENLACES
========================================================== */

.link-traffic-config {
    margin-top: 5px;
    margin-bottom: 18px;

    overflow: hidden;

    background: #0b131c;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.traffic-config-head {
    padding: 13px 14px;
}

.traffic-toggle {
    display: flex;
    align-items: center;

    gap: 11px;

    cursor: pointer;
}

.traffic-toggle > input {
    display: none;
}

.traffic-toggle-ui {
    position: relative;

    width: 38px;
    height: 22px;

    flex: 0 0 38px;

    background: #293746;

    border-radius: 999px;

    transition: .15s;
}

.traffic-toggle-ui::after {
    content: '';

    position: absolute;

    width: 16px;
    height: 16px;

    left: 3px;
    top: 3px;

    background: #94a3b4;

    border-radius: 50%;

    transition: .15s;
}

.traffic-toggle input:checked +
.traffic-toggle-ui {
    background:
        rgba(255, 122, 24, .32);
}

.traffic-toggle input:checked +
.traffic-toggle-ui::after {
    left: 19px;

    background: var(--primary);
}

.traffic-toggle strong {
    display: block;

    font-size: 12px;
}

.traffic-toggle small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 10px;
}

.link-traffic-fields {
    padding: 14px;

    border-top:
        1px solid var(--border);
}

.traffic-loading {
    min-height: 35px;

    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 13px;

    color: var(--muted);

    font-size: 10px;
}


/* INSPECTOR */

.inspector-section-title {
    margin-top: 3px;

    color: #6f8196;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .08em;
}

.traffic-inspector {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;
}

.traffic-value {
    padding: 11px;

    background: #0a1119;

    border: 1px solid var(--border);
    border-radius: 8px;
}

.traffic-value small {
    display: block;

    margin-bottom: 5px;

    font-size: 9px;
    font-weight: 800;
}

.traffic-value strong {
    font-size: 13px;
}

.traffic-rx small {
    color: #4bd798;
}

.traffic-tx small {
    color: #64aaff;
}


/* UTILIZAÇÃO */

.link-utilization {
    padding: 11px;

    background: #0a1119;

    border: 1px solid var(--border);
    border-radius: 8px;
}

.link-utilization-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 10px;
}

.link-utilization-head strong {
    color: var(--text);

    font-size: 11px;
}

.link-utilization-bar {
    height: 6px;

    overflow: hidden;

    background: #202c38;

    border-radius: 999px;
}

.link-utilization-bar span {
    display: block;

    height: 100%;

    max-width: 100%;

    background: var(--green);

    border-radius: inherit;

    transition:
        width .3s ease;
}


/* STATUS DE UTILIZAÇÃO */

.link-status-warn {
    background: var(--yellow);

    box-shadow:
        0 0 8px
        rgba(255, 202, 75, .4);
}

.link-status-high {
    background: var(--red);

    box-shadow:
        0 0 8px
        rgba(255, 87, 87, .5);
}


/* ==========================================================
   RX POWER / SINAL ÓPTICO
========================================================== */

.optical-thresholds {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 12px;
}

.input-unit {
    position: relative;
}

.input-unit .input {
    padding-right: 50px;
}

.input-unit span {
    position: absolute;

    right: 12px;
    top: 50%;

    transform:
        translateY(-50%);

    color: var(--muted);

    font-size: 10px;
}


/* INSPECTOR */

.optical-inspector-block {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.optical-value-card {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 12px;

    background: #0a1119;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.optical-icon {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex: 0 0 34px;

    border-radius: 8px;

    background:
        rgba(100, 170, 255, .08);

    color: #64aaff;

    font-size: 17px;
}

.optical-value-card small {
    display: block;

    color: var(--muted);

    font-size: 9px;
}

.optical-value-card strong {
    display: block;

    margin-top: 2px;

    font-size: 15px;
}

.optical-value-card span {
    display: block;

    margin-top: 2px;

    font-size: 9px;
}


/* NORMAL */

.optical-state-normal {
    border-color:
        rgba(39, 209, 127, .28);
}

.optical-state-normal .optical-icon {
    color: var(--green);

    background:
        rgba(39, 209, 127, .08);
}

.optical-state-normal span {
    color: #84eeb6;
}


/* ATENÇÃO */

.optical-state-warning {
    border-color:
        rgba(255, 202, 75, .32);
}

.optical-state-warning .optical-icon {
    color: var(--yellow);

    background:
        rgba(255, 202, 75, .08);
}

.optical-state-warning span {
    color: #ffd783;
}


/* CRÍTICO */

.optical-state-critical {
    border-color:
        rgba(255, 87, 87, .35);
}

.optical-state-critical .optical-icon {
    color: var(--red);

    background:
        rgba(255, 87, 87, .08);
}

.optical-state-critical span {
    color: #ff9696;
}


/* SEM LIMITES */

.optical-state-monitoring,
.optical-state-unknown {
    border-color:
        rgba(100, 170, 255, .20);
}

.optical-state-monitoring span,
.optical-state-unknown span {
    color: #8db8eb;
}

.optical-disabled {
    padding: 10px 12px;

    color: var(--muted);

    background: #0a1119;

    border: 1px dashed var(--border);
    border-radius: 8px;

    font-size: 10px;

    text-align: center;
}


@media (max-width: 700px) {

    .optical-thresholds {
        grid-template-columns:
            1fr;
    }

}


/* ==========================================================
   GRÁFICOS DOS ENLACES
========================================================== */

.link-graph-hover {
    position: fixed;

    z-index: 15000;

    width: 360px;

    display: none;

    padding: 12px;

    pointer-events: none;

    background:
        rgba(13, 21, 31, .97);

    border:
        1px solid #2a3949;

    border-radius: 11px;

    box-shadow:
        0 20px 55px
        rgba(0, 0, 0, .55);

    backdrop-filter:
        blur(8px);
}

.link-graph-hover.show {
    display: block;
}

.link-graph-hover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 8px;
}

.link-graph-hover-head strong {
    overflow: hidden;

    color: var(--text);

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-graph-hover-head span {
    color: var(--muted);

    font-size: 9px;

    white-space: nowrap;
}

.link-graph-mini-loading {
    height: 120px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: var(--muted);

    font-size: 10px;
}

.link-graph-mini-canvas {
    height: 125px;
}

.link-graph-hover-values {
    display: flex;

    gap: 15px;

    margin-top: 8px;

    color: #b8c5d3;

    font-size: 10px;
    font-weight: 700;
}


/* ==========================================================
   MODAL GRANDE
========================================================== */

.link-graph-modal {
    width:
        min(1050px, calc(100vw - 40px));

    max-width: 1050px;
}

.link-graph-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}

.link-graph-tabs,
.link-graph-periods {
    display: flex;

    gap: 5px;

    padding: 4px;

    background: #0b131c;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.graph-tab,
.graph-period {
    min-height: 31px;

    padding: 0 11px;

    color: #8292a6;
    background: transparent;

    border: 0;
    border-radius: 6px;

    cursor: pointer;

    font-size: 10px;
    font-weight: 700;
}

.graph-tab:hover,
.graph-period:hover {
    color: #fff;
}

.graph-tab.active,
.graph-period.active {
    color: #fff;

    background: #1a2735;
}

.graph-tab:disabled {
    opacity: .32;
    cursor: not-allowed;
}

.link-graph-source {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 28px;

    margin-bottom: 8px;

    color: #617287;

    font-size: 9px;
}

.link-graph-big-canvas {
    height: 410px;

    padding: 10px;

    background: #090f16;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.link-graph-loading {
    height: 410px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    color: var(--muted);

    background: #090f16;

    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 11px;
}


/* ==========================================================
   ESTATÍSTICAS
========================================================== */

.link-graph-stats {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 10px;

    margin-top: 12px;
}

.link-graph-stat {
    display: grid;

    grid-template-columns:
        75px
        repeat(3, 1fr);

    gap: 8px;

    align-items: center;

    padding: 11px 13px;

    background: #0b131c;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.link-graph-stat-title {
    font-size: 11px;
    font-weight: 800;
}

.graph-stat-rx
.link-graph-stat-title {
    color: #27d17f;
}

.graph-stat-tx
.link-graph-stat-title {
    color: #64aaff;
}

.graph-stat-optical
.link-graph-stat-title {
    color: #ff9b4a;
}

.link-graph-stat small {
    display: block;

    margin-bottom: 3px;

    color: #617287;

    font-size: 8px;

    text-transform: uppercase;
}

.link-graph-stat strong {
    display: block;

    color: #dbe5ef;

    font-size: 11px;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 760px) {

    .link-graph-hover {
        display: none !important;
    }

    .link-graph-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .link-graph-periods {
        overflow-x: auto;
    }

    .link-graph-big-canvas,
    .link-graph-loading {
        height: 320px;
    }

    .link-graph-stat {
        grid-template-columns:
            1fr 1fr;
    }

}


/* ==========================================================
   INTERAÇÃO DO MAPA
========================================================== */

.map-canvas {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.map-canvas canvas {
    user-select: none;
    -webkit-user-select: none;
}

.hover-optical-value {
    color: #ffb36f;
}


/* ==========================================================
   MAPA - EVITAR SELEÇÃO ACIDENTAL
========================================================== */

.map-workspace,
.map-canvas,
.map-canvas canvas {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
}


/* ==========================================================
   BOTÃO DE GRÁFICOS
========================================================== */

.noc-open-graphs {
    margin-top: 4px;

    font-weight: 800;

    box-shadow:
        0 5px 18px
        rgba(255, 122, 24, .13);
}
