:root {
    --bg-base: #06090e;
    --bg-panel: #0f151c;
    --bg-widget: #161c24;
    --border-color: #232c38;
    --accent-cyan: #00ffcc;
    --accent-red: #ff3b3b;
    --text-main: #f0f4f8;
    --text-muted: #6b7a90;
    --font-ui: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-ui);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-wrapper {
    width: 98vw;
    height: 96vh;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- HEADER --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pulse-ring {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--accent-cyan);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse-ring 2s infinite;
}
.center-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 204, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 204, 0); }
}

.brand-text h1 {
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: var(--accent-cyan);
    font-weight: 700;
}
.brand-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.status-container { display: flex; gap: 15px; }

.conn-pill, .live-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}
.conn-pill { color: var(--accent-red); border-color: rgba(255,59,59,0.3); }
.conn-pill.connected { color: var(--accent-cyan); border-color: rgba(0,255,204,0.3); }

.red-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: var(--accent-red);
}
.cyan-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: dot-flicker 1s infinite alternate;
}
@keyframes dot-flicker { from { opacity: 0.5; } to { opacity: 1; } }


/* --- GRID LAYOUT --- */
.grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* WIDGETS */
.widget {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.widget-header h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    font-weight: 500;
}
.badge {
    background-color: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.data-block {
    background-color: var(--bg-widget);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent-cyan);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.data-block:nth-child(3) { border-left-color: #a855f7; } /* Purple accent */

.label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.value { font-size: 1.25rem; font-weight: 700; }
.monospace { font-family: var(--font-mono); }
.cyan-text { color: var(--accent-cyan); }
.text-red { color: var(--accent-red); font-size: 1.5rem;}

.lock-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}
.lock-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 2px dashed var(--accent-cyan);
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    background-color: rgba(0, 255, 204, 0.05);
}
.lock-info { display: flex; flex-direction: column; gap: 4px; }
.sub-status { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.circle-row {
    display: flex; align-items: center; gap: 15px;
    padding: 15px; background: var(--bg-widget); border-radius: 8px;
}
.mt-3 { margin-top: 15px; }
.icon-circle {
    width: 50px; height: 50px;
    border-radius: 50%; border: 2px solid #334155;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem;
}
.border-red { border-color: rgba(255,59,59,0.3); }
.data-col { display: flex; flex-direction: column; }

/* --- MAPA CENTRAL --- */
.map-section {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#map { width: 100%; height: 100%; z-index: 1; background: #0b0f16; }

.map-overlay-top {
    position: absolute; top: 20px; left: 20px; z-index: 1000;
}
.map-overlay-bottom {
    position: absolute; bottom: 20px; left: 20px; z-index: 1000;
}

.custom-select-wrapper { position: relative; width: 150px; }
.custom-select-wrapper select {
    appearance: none;
    background-color: var(--bg-panel);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}
.select-arrow {
    position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 4px solid var(--accent-cyan);
    pointer-events: none;
}

.coords-pill {
    background-color: rgba(15, 21, 28, 0.9);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
