/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* HEADER */
header {
    background: #1e293b;
    padding: 20px;
    border-bottom: 1px solid #334155;
}

header h1 {
    font-size: 22px;
    color: #38bdf8;
}

/* GRID */
.grid {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

/* CARD */
.card {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* TITLES */
h2 {
    margin-bottom: 10px;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background: #334155;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 10px;
    border-bottom: 1px solid #334155;
}

/* ZEBRA */
tr:nth-child(even) {
    background: #0f172a;
}

/* HOVER */
tr:hover {
    background: #1d4ed8;
}

/* INPUT */
input {
    padding: 10px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
}

/* ?? MAPA */
#map {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

/* ?? LIVE EFFECT */
.new-row {
    background: #16a34a !important;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    from { background: #16a34a; }
    to { background: transparent; }
}

/* BADGES */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.badge-blue { background: #2563eb; }
.badge-green { background: #16a34a; }
.badge-orange { background: #f59e0b; }

/* RESPONSIVE */
@media (max-width: 768px) {
    table {
        font-size: 12px;
    }

    header h1 {
        font-size: 18px;
    }
}


/* base tipo */
.type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
}

/* SVG */
.type svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* COLORES POR TIPO */
.type.handheld { color: #22c55e; }  /* verde */
.type.base     { color: #e5e7eb; }  /* blanco */
.type.mobile   { color: #38bdf8; }  /* azul */
.type.hotspot  { color: #f59e0b; }  /* naranja */
.type.data     { color: #eab308; }  /* amarillo */
.type.app      { color: #a855f7; }  /* morado */

/* glow suave SDR */
.type.handheld svg {
    filter: drop-shadow(0 0 4px #22c55e);
}

.protocol {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.protocol svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
}

/* colores */
.protocol-DExtra { color: #38bdf8; }
.protocol-DCS    { color: #22c55e; }
.protocol-XLX    { color: #f59e0b; }
.protocol-REF    { color: #a855f7; }
.protocol-TERMINAL {
    color: #06b6d4; /* azul-cyan PRO */
}


.users-container {
    max-height: 300px;
    overflow-y: auto;
}

/* scrollbar pro */
.users-container::-webkit-scrollbar {
    width: 8px;
}

.users-container::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}



/* GRID PRINCIPAL */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
}

/* POSICIONES */
.users-card {
    grid-column: 1;
}

.heard-card {
    grid-column: 2;
}

.peers-card {
    grid-column: 3;
}

.map-card {
    grid-column: 1 / 4; /* ocupa todo abajo */
}


.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 5fr 1fr;
    gap: 10px;
}