@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-glass: #ffffff;
    --border-glass: #e2e8f0;
    --border-glass-active: #818cf8;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    
    --status-online: #10b981;
    --status-offline: #94a3b8;
    --status-busy: #f59e0b;
    --status-tx: #ef4444;
    --status-rx: #0ea5e9;
    --status-emergency: #dc2626;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
}

/* Glassmorphism / Slate Panels */
.glass-panel {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.glass-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dispatch Layout Grid */
.dispatch-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: #f8fafc;
}

.dispatch-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.dispatch-main {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
    height: calc(100vh - 56px - 36px);
    transition: grid-template-columns 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dispatch-main.map-maximized {
    grid-template-columns: 1fr;
}

.dispatch-dock, .dispatch-footer {
    height: 36px;
    background: #ffffff;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Tree & List Elements */
.user-tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: 1px solid transparent;
}

.user-tree-item:hover {
    background: #f1f5f9;
    border-color: var(--border-glass);
}

.user-tree-item.active {
    background: #eef2ff;
    border-color: #c7d2fe;
}

/* Buttons */
.btn-ptt {
    width: 100%;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
}

.btn-ptt:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-ptt:active, .btn-ptt.transmitting {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.6) !important;
    transform: scale(0.98);
}

.btn-sos {
    background: #dc2626;
    color: white;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
    animation: pulse-sos 2s infinite;
}

@keyframes pulse-sos {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Status Indicators */
.status-dot, .badge-status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online, .badge-online { background-color: var(--status-online); box-shadow: 0 0 6px var(--status-online); }
.status-dot.offline, .badge-offline { background-color: var(--status-offline); }
.status-dot.busy, .badge-busy { background-color: var(--status-busy); }
.status-dot.tx, .badge-tx { background-color: var(--status-tx); box-shadow: 0 0 8px var(--status-tx); }

.fleet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    transition: all 0.15s ease;
}
.fleet-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.fleet-item.active {
    background: #eef2ff;
    border-color: #818cf8;
}

.btn-tactical {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    font-size: 11px;
    font-weight: 500;
}
.btn-tactical:hover, .btn-tactical.active {
    background: #eef2ff;
    color: var(--primary);
    border-color: #c7d2fe;
}

/* Audio Waveform Canvas */
#audio-waveform-canvas {
    width: 100%;
    height: 48px;
    background: #f8fafc;
    border: 1px solid var(--border-glass);
    border-radius: 6px;
}

/* Tactical Map Area */
#tactical-map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #e2e8f0;
}
