* {
    box-sizing: border-box;
}
:root {
    --bg: #07101d;
    --panel: #0d1929;
    --panel2: #111f33;
    --border: #21334d;
    --text: #edf4ff;
    --muted: #8293aa;
    --blue: #4b9cff;
    --green: #38db8b;
    --red: #ff5c69;
    --orange: #ffae4d;
}
html,
body {
    margin: 0;
    padding: 0;
}
body {
    min-height: 100vh;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
    background:
        radial-gradient(
            circle at top right,
            rgba(30, 91, 170, .15),
            transparent 35%
        ),
        var(--bg);
    color: var(--text);
}
.app {
    min-height: 100vh;
}
/* HEADER */
.header {
    min-height: 90px;
    padding: 20px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 21, 36, .95);
    border-bottom:
        1px solid var(--border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-box {
    width: 250px;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.logo-esintec {
    display: block;
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
}
.brand h1 {
    margin: 0;
    font-size: 21px;
    letter-spacing: 1px;
}
.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.server-info {
    text-align: right;
}
.server-info span {
    display: block;
    font-family:
        Consolas,
        monospace;
    color: #b6c9e3;
}
.server-info small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}
/* MAIN */
main {
    max-width: 1550px;
    margin: auto;
    padding: 28px;
}
/* SERVICES */
.services {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}
.service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: var(--panel);
    border:
        1px solid var(--border);
    border-radius: 9px;
    font-size: 12px;
}
.service-name {
    color: #9fb0c8;
    font-weight: 600;
}
.status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.online {
    color: var(--green);
}
.online .dot {
    background: var(--green);
    box-shadow:
        0 0 8px var(--green);
}
.offline {
    color: var(--red);
}
.offline .dot {
    background: var(--red);
}
/* CARDS */
.cards {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(205px, 1fr)
        );
    gap: 15px;
    margin-bottom: 25px;
}
.card {
    min-height: 135px;
    min-width: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    background:
        linear-gradient(
            145deg,
            var(--panel2),
            var(--panel)
        );
    border:
        1px solid var(--border);
    border-radius: 14px;
    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, .15);
    transition:
        transform .15s,
        border .15s;
}
.card:hover {
    transform: translateY(-2px);
    border-color: #38577e;
}
.card > div:last-child {
    min-width: 0;
}
.card-icon {
    min-width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: bold;
}
.card span {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    color: #91a2ba;
    letter-spacing: .7px;
}
.card strong {
    display: block;
    font-size: 30px;
    line-height: 1.1;
}
.card small {
    display: block;
    margin-top: 6px;
    color: #72849d;
    font-size: 11px;
}
.attack .card-icon {
    color: var(--orange);
    background:
        rgba(255, 174, 77, .12);
}
.attack strong {
    color: var(--orange);
}
.danger .card-icon {
    color: var(--red);
    background:
        rgba(255, 92, 105, .12);
}
.danger strong {
    color: var(--red);
}
.secure .card-icon {
    color: var(--green);
    background:
        rgba(56, 219, 139, .12);
}
.secure strong {
    color: var(--green);
}
.info .card-icon {
    color: var(--blue);
    background:
        rgba(75, 156, 255, .12);
}
.info strong {
    color: var(--blue);
}
/* TRAFICO DROP */
.traffic-card {
    min-width: 0;
}
.traffic-card > div:last-child {
    min-width: 0;
}
.traffic-card strong {
    white-space: nowrap;
    font-size:
        clamp(
            22px,
            2vw,
            30px
        );
    line-height: 1.1;
}
/* GRAFICA */
.chart-panel {
    margin-bottom: 30px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, .16);
}
.chart-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom:
        1px solid var(--border);
}
.chart-header h2 {
    margin: 0;
    font-size: 18px;
    color: #edf4ff;
}
.chart-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.chart-total {
    min-width: 120px;
    text-align: right;
}
.chart-total span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .7px;
}
.chart-total strong {
    display: block;
    margin-top: 5px;
    color: var(--blue);
    font-size: 27px;
}
.chart-container {
    position: relative;
    width: 100%;
    height: 310px;
    padding:
        22px 25px 20px;
}
/* MAPA */
.map-panel {
    position: relative;
    margin-bottom: 30px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, .16);
}
.map-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom:
        1px solid var(--border);
}
.map-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}
.map-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.map-stats {
    min-width: 140px;
    text-align: right;
}
.map-stats span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .7px;
}
.map-stats strong {
    display: block;
    margin-top: 4px;
    color: var(--green);
    font-size: 26px;
}
#attackMap {
    position: relative;
    width: 100%;
    height: 460px;
    min-height: 460px;
    z-index: 1;
    background:
        #091523;
}
.map-empty {
    display: none;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    background:
        #091523;
}
.map-note {
    padding:
        10px 20px;
    color: #61738d;
    font-size: 10px;
    border-top:
        1px solid var(--border);
}
/* LEAFLET */
.leaflet-container {
    background:
        #07101d;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}
.leaflet-control-container {
    z-index: 500;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background:
        #0d1929;
    color:
        #dce8f9;
}
.leaflet-popup-content-wrapper {
    border:
        1px solid #29405f;
    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, .45);
}
.soc-popup {
    min-width: 190px;
    font-size: 12px;
}
.soc-popup > strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-family:
        Consolas,
        monospace;
    font-size: 14px;
}
.soc-popup div {
    display: flex;
    justify-content:
        space-between;
    gap: 15px;
    margin:
        4px 0;
}
.soc-popup span {
    color:
        #8293aa;
}
.leaflet-control-zoom a {
    background:
        #101e31 !important;
    color:
        #d7e5f7 !important;
    border-color:
        #29405f !important;
}
/* PANEL */
.panel {
    overflow: hidden;
    background: var(--panel);
    border:
        1px solid var(--border);
    border-radius: 14px;
    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, .16);
}
.panel-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom:
        1px solid var(--border);
}
.panel-header h2 {
    margin: 0;
    font-size: 18px;
}
.panel-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.live {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
    font-size: 10px;
    font-weight: bold;
}
.live span {
    width: 8px;
    height: 8px;
    display: inline-block;
    background: var(--green);
    border-radius: 50%;
    box-shadow:
        0 0 8px var(--green);
    animation:
        pulse 1.5s infinite;
}
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: .35;
    }
    100% {
        opacity: 1;
    }
}
/* TABLE */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    background: #091523;
}
th {
    padding:
        14px 15px;
    text-align: left;
    color: #7f92ac;
    font-size: 10px;
    letter-spacing: .6px;
}
td {
    padding:
        14px 15px;
    border-top:
        1px solid #1d3048;
    font-size: 12px;
    color: #c2cede;
}
tbody tr {
    transition:
        background .15s;
}
tbody tr:hover {
    background:
        rgba(64, 117, 180, .08);
}
.ip-address {
    font-family:
        Consolas,
        "Courier New",
        monospace;
    color: #f0f5ff;
    font-weight: bold;
}
.location-cell {
    min-width: 130px;
    color:
        #d9e6f6;
    font-weight: 600;
}
.location-city {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: normal;
}
.badge {
    display: inline-block;
    padding:
        5px 8px;
    border-radius: 15px;
    font-size: 9px;
    font-weight: 700;
}
.blocked {
    color: #ff7883;
    background:
        rgba(255, 92, 105, .13);
    border:
        1px solid
        rgba(255, 92, 105, .22);
}
.detected {
    color: #ffba62;
    background:
        rgba(255, 174, 77, .12);
}
.contained {
    color: #4be69a;
    background:
        rgba(56, 219, 139, .12);
    border:
        1px solid
        rgba(56, 219, 139, .18);
}
.pending {
    color: #70adff;
    background:
        rgba(75, 156, 255, .12);
}
.user-tag {
    display: inline-block;
    margin:
        2px 3px 2px 0;
    padding:
        4px 7px;
    background: #182942;
    border-radius: 6px;
    color: #aebcd0;
    font-family:
        Consolas,
        monospace;
    font-size: 10px;
}
.user-tag b {
    color: var(--orange);
}
.empty {
    padding: 45px;
    text-align: center;
    color: var(--muted);
}
/* DATATABLES */
div.dt-container {
    color: #8293aa;
    font-size: 12px;
    padding:
        18px 20px;
}
div.dt-container .dt-layout-row {
    margin:
        0 0 14px 0;
}
div.dt-container .dt-layout-row:last-child {
    margin-top: 16px;
    margin-bottom: 0;
}
div.dt-container .dt-search label,
div.dt-container .dt-length label,
div.dt-container .dt-info {
    color: #8293aa !important;
}
div.dt-container .dt-search input,
div.dt-container .dt-length select {
    background:
        #101e31 !important;
    color:
        #d7e5f7 !important;
    border:
        1px solid #29405f !important;
    border-radius:
        7px !important;
    padding:
        7px 10px !important;
    outline:
        none !important;
}
div.dt-container .dt-search input:focus,
div.dt-container .dt-length select:focus {
    border-color:
        #4b9cff !important;
    box-shadow:
        0 0 0 2px
        rgba(75, 156, 255, .12) !important;
}
div.dt-container .dt-paging .dt-paging-button {
    background:
        #101e31 !important;
    color:
        #a9bad0 !important;
    border:
        1px solid #29405f !important;
    border-radius:
        7px !important;
    margin:
        0 3px !important;
    min-width: 34px;
}
div.dt-container .dt-paging .dt-paging-button:hover {
    background:
        #182b45 !important;
    color:
        #ffffff !important;
    border-color:
        #3d628e !important;
}
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    background:
        #176cff !important;
    color:
        #ffffff !important;
    border-color:
        #176cff !important;
    box-shadow:
        0 0 12px
        rgba(23, 108, 255, .25);
}
div.dt-container .dt-paging .dt-paging-button.disabled {
    opacity: .35;
    cursor:
        not-allowed !important;
}
table.dataTable thead th {
    color:
        #8fa9cf !important;
}
table.dataTable tbody tr {
    background:
        transparent !important;
}
table.dataTable tbody tr:hover {
    background:
        rgba(64, 117, 180, .08) !important;
}
table.dataTable.no-footer {
    border-bottom:
        1px solid var(--border) !important;
}
/* SUMMARY */
.summary {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.summary div {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    background: var(--panel);
    border:
        1px solid var(--border);
    border-radius: 10px;
}
.summary span {
    color: var(--muted);
    font-size: 12px;
}
.summary strong {
    color: #dce8f9;
}
/* FOOTER */
footer {
    padding:
        20px 30px;
    display: flex;
    justify-content: space-between;
    border-top:
        1px solid var(--border);
    color: #596d87;
    font-size: 11px;
}
/* MOBILE */
@media(max-width: 800px) {
    .header {
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }
    .logo-box {
        width: 190px;
        min-width: 190px;
    }
    .logo-esintec {
        max-width: 190px;
    }
    .server-info {
        text-align: left;
    }
    main {
        padding: 16px;
    }
    .chart-header,
    .map-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .chart-total,
    .map-stats {
        text-align: left;
    }
    .chart-container {
        height: 350px;
        padding: 15px;
    }
    #attackMap {
        height: 360px;
        min-height: 360px;
    }
    div.dt-container .dt-layout-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items:
            stretch !important;
    }
    .summary {
        grid-template-columns: 1fr;
    }
    footer {
        flex-direction: column;
        gap: 5px;
    }
}