:root {
    --bg-dark: #000000;
    --bg-panel: #0a0a0b;
    --bg-card: #121214;
    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.15);
    --text: #ffffff;
    --text-dim: #88888b;
    --border: #1f1f22;
    --green: #10b981;
    --red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Utilitarios */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Login */
.login-box {
    width: 90%;
    max-width: 380px;
    background: var(--bg-panel);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 30px;
    justify-content: center;
}

form input,
form select {
    width: 100%;
    padding: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    margin-bottom: 12px;
    font-size: 1rem;
}

.btn-main {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

/* Dashboard Layout */
#dashboard-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.mobile-header {
    display: none;
}

/* Solo Mobile */

.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar (Web) */
.sidebar-web {
    width: 240px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    font-weight: 600;
}

.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.sidebar-user {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Panels */
.units-panel {
    width: 340px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.section-title {
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.units-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.unit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.unit-card.active {
    border-color: var(--accent);
    background: #1a1a1d;
}

.content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}

.unit-bar {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.map-wrapper {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
}

/* Chat */
.chat-container {
    width: 95%;
    max-width: 450px;
    height: 80vh;
    background: var(--bg-panel);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-header {
    padding: 15px 20px;
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-actions i {
    margin-left: 15px;
    cursor: pointer;
    color: var(--text-dim);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #080808;
}

.message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    font-size: 0.9rem;
}

.message.sent {
    align-self: flex-end;
    background: var(--accent);
}

.message.received {
    align-self: flex-start;
    background: #2a2a2d;
}

.chat-footer {
    padding: 15px;
    background: var(--bg-card);
    display: flex;
    gap: 10px;
}

/* Call Interface (Professional) */
.call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1b263b 0%, #000 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-content {
    width: 100%;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 80px 20px;
}

.call-avatar {
    position: relative;
    width: 160px;
    height: 160px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.call-controls {
    display: flex;
    gap: 20px;
}

.ctrl-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ctrl-btn.hangup {
    background: var(--red);
}

.ctrl-btn.answer {
    background: var(--green);
}

.ctrl-btn.active {
    background: var(--accent);
}

/* Responsive Mobile */
@media (max-width: 900px) {
    .sidebar-web {
        display: none;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: var(--bg-panel);
        border-bottom: 1px solid var(--border);
    }

    .main-container {
        flex-direction: column;
    }

    .units-panel {
        width: 100%;
        height: 130px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .units-scroll {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding: 10px;
        overflow-x: auto;
    }

    .unit-card {
        min-width: 140px;
        margin-bottom: 0;
        padding: 12px;
        flex-shrink: 0;
        text-align: center;
    }

    .section-title {
        display: none;
    }

    .content-panel {
        flex: 1;
    }

    .chat-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}