:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --transition-smooth: all 0.2s ease-in-out;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #080c14;
    --bs-body-color: #f1f5f9;
    --card-bg: rgba(15, 23, 42, 0.8);
    --card-border: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(30, 41, 59, 0.7);
    --glass-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.45);
    --table-hover-bg: rgba(30, 41, 59, 0.4);
    --text-muted-custom: #94a3b8;
    --control-bg: rgba(30, 41, 59, 0.6);
}

[data-bs-theme="light"] {
    --bs-body-bg: #f1f5f9;
    --bs-body-color: #0f172a;
    --card-bg: #ffffff;
    --card-border: #cbd5e1;
    --input-bg: #ffffff;
    --glass-shadow: 0 4px 15px -2px rgba(15, 23, 42, 0.08);
    --table-hover-bg: #f8fafc;
    --text-muted-custom: #64748b;
    --control-bg: #ffffff;
}

body {
    font-family: var(--font-main);
    transition: var(--transition-smooth);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 40%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 40%);
    background-repeat: no-repeat;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.brand-title-main {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
}

.brand-title-sub {
    text-transform: uppercase;
    font-weight: 800;
    color: #6366f1;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-top: 4px;
}

.radar-hero-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(34, 197, 94, 0.12);
    border: 1.5px solid rgba(34, 197, 94, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.radar-hero-dot {
    width: 14px;
    height: 14px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 12px #22c55e;
}

.radar-hero-ring {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid #22c55e;
    border-radius: 50%;
    animation: pulse-ring 2s infinite ease-out;
    opacity: 0;
}

@keyframes pulse-ring {
    0% { transform: scale(0.4); opacity: 0.9; }
    80% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

.header-control-pill {
    background-color: var(--control-bg);
    border: 1px solid var(--card-border);
    padding: 0.55rem 1.25rem;
    border-radius: 50px;
    box-shadow: var(--glass-shadow);
}

.stat-card-compact {
    padding: 0.9rem 1.2rem;
    transition: var(--transition-smooth);
}
.stat-card-compact:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.35);
}

.command-bar {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
}

.custom-input, .custom-select {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--bs-body-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.55rem 0.9rem !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.2rem !important;
}

.custom-input:focus, .custom-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.timer-badge-fixed {
    min-width: 44px;
    display: inline-block;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    margin-left: 0.5rem;
}

.table-glass {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}
.table { margin-bottom: 0; --bs-table-bg: transparent; }
.table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.1px;
    font-weight: 700;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-muted-custom);
    background: rgba(15, 23, 42, 0.2);
}
.table tbody tr { transition: var(--transition-smooth); }
.table tbody tr:hover { background-color: var(--table-hover-bg); }
.table td { padding: 0.9rem 1rem; vertical-align: middle; border-color: var(--card-border); }

.btn-filter-pill {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.5rem 1.4rem !important;
    font-size: 0.85rem;
    margin-right: 0.65rem !important;
    transition: var(--transition-smooth);
}

.btn-export-csv {
    border-radius: 50px;
    padding: 0.5rem 1.4rem;
    font-size: 0.88rem;
    background-color: rgba(34, 197, 94, 0.18) !important;
    border: 1.5px solid rgba(34, 197, 94, 0.4) !important;
    color: #4ade80 !important;
    font-weight: 700;
}
[data-bs-theme="light"] .btn-export-csv {
    background-color: #dcfce7 !important;
    border: 1.5px solid #16a34a !important;
    color: #15803d !important;
    font-weight: 800;
}

.badge-soft { padding: 0.4em 0.8em; border-radius: 6px; font-weight: 600; font-size: 0.75rem; }
.kw-badge { border-radius: 5px; }

.icon-box-sm {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}