/* ============================
   RESET & BASE
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --topbar-h: 58px;
    --bg-app: #0F172A;
    --bg-topbar: #1E293B;
    --bg-card: #263248;
    --bg-input: #2D3D55;
    --border: rgba(255,255,255,0.08);
    --text-1: #F1F5F9;
    --text-2: #94A3B8;
    --text-3: #64748B;
    --accent: #0D6EFF;
    --accent-hover: #0B5ED7;
    --accent-light: #E4EDFE;
    --accent-bg: rgba(13,110,255,0.12);
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: all 0.2s ease;
}

html, body { height: 100%; overflow: hidden; font-family: 'Outfit', sans-serif; background: var(--bg-app); color: var(--text-1); }
.hidden { display: none !important; }

/* ============================
   TOP BAR
   ============================ */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.25rem; z-index: 2000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.topbar-brand {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.1rem; font-weight: 700; color: var(--text-1);
    white-space: nowrap;
}
.brand-text {
    background: linear-gradient(135deg, #0D6EFF, #60A5FA);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-icon { -webkit-text-fill-color: #60A5FA; font-size: 1.4rem; }
.version-tag {
    font-size: 0.65rem; font-weight: 600; color: var(--text-3);
    margin-left: 0.35rem; padding-top: 0.2rem;
}
.topbar-center { flex: 1; display: flex; justify-content: center; }
/* ── FILTERS BAR (PREMIUM MODERN) ── */
.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    padding: 0 20px;
}

.filters-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
    height: 42px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 34px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-secondary.active {
    background-color: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(13, 110, 255, 0.3);
}

/* Iconos de Mapa */
.custom-map-icon-container {
    background: transparent;
    border: none;
}
.marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    width: 26px;
    height: 26px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.marker-pin:hover {
    transform: scale(1.3);
    z-index: 9999;
}
.marker-pin i {
    font-size: 14px;
}
.drone-pin {
    border-radius: 6px;
    background: #FFD300;
}

.filter-group:hover {
    background: rgba(255, 255, 255, 0.05);
}
.filter-group:focus-within {
    background: rgba(13, 110, 255, 0.1);
}

.filter-group i {
    color: var(--accent);
    font-size: 1.1rem;
    margin-right: 8px;
    filter: drop-shadow(0 0 5px rgba(13, 110, 255, 0.4));
}

.filter-group select {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding-right: 4px;
    max-width: 120px;
    text-overflow: ellipsis;
}
.filter-group select option { background: #1E293B; color: white; }
.filter-group select:hover { color: white; }

/* ── CUSTOM MULTI-SELECT ── */
.custom-multiselect {
    position: relative;
    user-select: none;
}
.ms-trigger {
    display: flex; align-items: center; gap: 8px;
    color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; font-weight: 500;
    cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: var(--transition);
}
.ms-trigger:hover { color: white; background: rgba(255,255,255,0.05); }
.ms-trigger i { color: var(--accent); font-size: 1rem; }

.ms-dropdown {
    position: absolute; top: calc(100% + 10px); left: 0;
    background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
    padding: 8px; min-width: 200px; max-height: 300px; overflow-y: auto;
    box-shadow: var(--shadow-lg); z-index: 3000;
    display: flex; flex-direction: column; gap: 2px;
}
.ms-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: var(--transition);
}
.ms-item:hover { background: rgba(255,255,255,0.08); }
.ms-item.selected { background: var(--accent-bg); color: var(--accent); }
.ms-item input { pointer-events: none; accent-color: var(--accent); }
.ms-item span { font-size: 0.85rem; white-space: nowrap; }

.date-filter-container {
    position: relative;
}

.btn-date-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 0 12px;
    height: 34px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-date-trigger:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.btn-date-trigger i { color: var(--accent); font-size: 1.1rem; filter: drop-shadow(0 0 5px rgba(13, 110, 255, 0.4)); }

.date-popover {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(23, 28, 41, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 2000;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

.btn-clear-filters {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
}
.btn-clear-filters:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* ── DOWNLOAD DROPDOWN (CORREGIDO) ── */
.download-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.download-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 2100;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: popIn 0.2s ease-out;
}
.download-popover.hidden { display: none; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}
.dropdown-item i {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.1));
}

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ============================
   BUTTONS
   ============================ */
.btn-icon-ghost {
    background: transparent; border: none; color: var(--text-2);
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.btn-icon-ghost:hover { background: rgba(255,255,255,0.08); color: var(--text-1); }

.btn-primary {
    background: var(--accent); color: white; border: none;
    padding: 0.7rem 1.4rem; border-radius: var(--radius-md);
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
    transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,110,255,0.35); }

.btn-secondary {
    background: var(--bg-card); color: var(--text-2);
    border: 1px solid var(--border); padding: 0.7rem 1.2rem;
    border-radius: var(--radius-md); font-family: inherit; font-size: 0.9rem;
    cursor: pointer; transition: var(--transition);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: var(--text-1); }

.btn-danger-outline {
    width: 100%; background: transparent; color: var(--danger);
    border: 1px solid rgba(239,68,68,0.4); padding: 0.65rem 1rem;
    border-radius: var(--radius-md); font-family: inherit; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
    justify-content: center; transition: var(--transition);
}
.btn-danger-outline:hover { background: rgba(239,68,68,0.1); border-color: var(--danger); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-add {
    background: var(--accent); color: white; border: none;
    padding: 0.55rem 1rem; border-radius: var(--radius-md);
    font-family: inherit; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.35rem;
    transition: var(--transition); white-space: nowrap;
}
.btn-add:hover { background: var(--accent-hover); }

/* ============================
   FILTER BAR
   ============================ */
.filter-bar {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.filter-chip {
    display: flex; align-items: center; gap: 0.4rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 100px; padding: 0.3rem 0.75rem;
    font-size: 0.82rem; color: var(--text-2);
    transition: var(--transition); cursor: pointer; position: relative;
}
.filter-chip:hover { border-color: var(--accent); color: var(--text-1); background: var(--accent-bg); }
.filter-chip > i { color: var(--text-3); font-size: 1rem; }
.filter-chip select {
    appearance: none; background: transparent; border: none; outline: none;
    color: inherit; font-family: inherit; font-size: inherit; cursor: pointer;
    max-width: 140px;
}
.filter-chip select option { background: #1E293B; color: var(--text-1); }
.chip-caret { font-size: 0.75rem; }

.date-input-sm {
    padding: 0.35rem 0.6rem; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-1); font-family: inherit; font-size: 0.8rem;
    outline: none; transition: var(--transition); width: 130px;
}
.date-input-sm:focus { border-color: var(--accent); }
.date-input-sm::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }

/* ============================
   MAIN LAYOUT
   ============================ */
.app-body {
    position: fixed; top: var(--topbar-h);
    left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; overflow: hidden;
}
.main-content {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

/* ============================
   MAP + KPI ROW
   ============================ */
.map-kpi-row {
    display: flex; flex: 1; min-height: 0; position: relative;
}
#map-wrap { flex: 1; position: relative; overflow: hidden; }
#map { width: 100%; height: 100%; }

.kpi-sidebar {
    width: 170px; display: flex; flex-direction: column;
    gap: 0.5rem; padding: 0.75rem; background: var(--bg-topbar);
    border-left: 1px solid var(--border); flex-shrink: 0;
}
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 0.75rem;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 0.15rem; transition: var(--transition);
}
.kpi-card:hover { border-color: rgba(13,110,255,0.3); transform: translateY(-1px); }
.kpi-val {
    font-size: 1.65rem; font-weight: 800; color: var(--accent);
    line-height: 1; font-variant-numeric: tabular-nums;
}
.kpi-label {
    font-size: 0.72rem; color: var(--text-3); text-transform: uppercase;
    letter-spacing: 0.05em; font-weight: 600;
}
.kpi-icon { font-size: 1.2rem; color: var(--accent); opacity: 0.6; margin-bottom: 0.15rem; }

/* ============================
   TABLE SECTION
   ============================ */
.table-section {
    background: var(--bg-topbar); border-top: 1px solid var(--border);
    display: flex; flex-direction: column; height: 340px;
    flex-shrink: 0; position: relative;
}
.table-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 1rem; border-bottom: 1px solid var(--border);
}
.table-title {
    font-size: 0.9rem; font-weight: 700; color: var(--accent);
    display: flex; align-items: center; gap: 0.5rem;
}
.table-title i { font-size: 1rem; }
.table-count {
    background: var(--accent-bg); color: var(--accent);
    border-radius: 100px; padding: 0.1rem 0.6rem;
    font-size: 0.75rem; font-weight: 700;
}
.table-resize-handle {
    position: absolute; top: -3px; left: 0; right: 0; height: 6px;
    cursor: ns-resize; z-index: 10;
}
.table-resize-handle:hover { background: var(--accent); opacity: 0.3; }

.table-scroll { flex: 1; overflow: auto; }
.data-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
    white-space: nowrap;
}
.data-table thead { position: sticky; top: 0; z-index: 5; }
.data-table th {
    background: var(--accent-light); color: var(--accent);
    padding: 0.55rem 0.7rem; text-align: left;
    font-weight: 700; font-size: 0.78rem;
    border-bottom: 2px solid rgba(13,110,255,0.2);
    cursor: pointer; user-select: none; transition: var(--transition);
}
.data-table th:hover { background: #d0dffc; }
.data-table th .sort-icon { font-size: 0.65rem; margin-left: 0.3rem; opacity: 0.4; }
.data-table th.sorted .sort-icon { opacity: 1; }

.data-table td {
    padding: 0.5rem 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-2); transition: var(--transition);
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(13,110,255,0.06); }
.data-table tbody tr:hover td { color: var(--text-1); }
.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }

.col-meta { color: var(--text-3); font-size: 0.78rem; }
.col-accent { color: var(--accent); font-weight: 600; }

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.mgmt-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin: 1.2rem 0 0.8rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(13,110,255,0.1);
}
@media (max-width: 600px) {
    .form-grid-3 { grid-template-columns: 1fr; }
}

/* ============================
   MODALS
   ============================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); z-index: 5000;
}
.modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 6000;
    background: #1E293B; border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg); width: 480px;
    max-width: calc(100vw - 2rem); max-height: 90vh;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column;
}
.modal.wide { width: 680px; }
@keyframes modalIn {
    from { transform: translate(-50%, -48%) scale(0.95); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.15rem 1.5rem 0.9rem; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 600; }
.modal-body {
    padding: 1.25rem 1.5rem; display: flex; flex-direction: column;
    gap: 1rem; overflow-y: auto; flex: 1;
}
.modal-footer {
    display: flex; gap: 0.75rem; justify-content: flex-end;
    padding: 1rem 1.5rem; border-top: 1px solid var(--border); flex-shrink: 0;
}

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
    font-size: 0.8rem; color: var(--text-2); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.form-row { display: flex; gap: 0.75rem; }
.form-row > .form-group { flex: 1; min-width: 0; }

.form-input, .form-select, .form-textarea {
    padding: 0.65rem 0.9rem; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-1); font-family: inherit; font-size: 0.9rem;
    outline: none; transition: var(--transition); width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); background: rgba(13,110,255,0.06); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-textarea { resize: vertical; min-height: 60px; }
.form-select { cursor: pointer; appearance: auto; }
.form-select option { background: #1e293b; color: white; }
.form-input::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }

/* ============================
   MANAGEMENT LISTS (inside modals)
   ============================ */
.mgmt-list {
    display: flex; flex-direction: column; gap: 0.4rem;
    max-height: 250px; overflow-y: auto;
}
.mgmt-item {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.75rem; background: var(--bg-card);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    transition: var(--transition); cursor: default;
}
.mgmt-item:hover { border-color: rgba(255,255,255,0.15); }
.mgmt-item-info { flex: 1; min-width: 0; }
.mgmt-item-name { font-weight: 600; font-size: 0.9rem; color: var(--text-1); }
.mgmt-item-meta { font-size: 0.75rem; color: var(--text-3); }
.mgmt-item-actions { display: flex; gap: 0.25rem; }
.mgmt-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}
.mgmt-empty {
    text-align: center; color: var(--text-3); font-size: 0.85rem;
    padding: 1.5rem; border: 1px dashed var(--border); border-radius: var(--radius-md);
}

.mgmt-divider {
    height: 1px; background: var(--border); margin: 0.5rem 0;
}

/* ============================
   MAP MARKERS
   ============================ */
.custom-marker {
    width: 0 !important; height: 0 !important;
}
.marker-bubble {
    position: absolute; bottom: 0; left: 0;
    transform: translateX(-50%);
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 8px;
    background: var(--accent); color: white;
    border-radius: 100px; border: 3px solid white;
    font-weight: 800; font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer; transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: markerDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.marker-bubble:hover { transform: translateX(-50%) scale(1.15); z-index: 1000 !important; }

@keyframes markerDrop {
    from { transform: translateX(-50%) translateY(-30px) scale(0); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* Map click popup */
.map-add-popup { text-align: center; }
.map-add-popup h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.map-add-popup p { font-size: 0.8rem; color: #64748B; margin-bottom: 0.75rem; }
.map-add-popup .coords { font-family: monospace; font-size: 0.75rem; color: #94A3B8; }

/* ============================
   LEAFLET OVERRIDES
   ============================ */
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-md) !important; }
.leaflet-control-zoom a {
    background: #1E293B !important; color: var(--text-1) !important;
    border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-card) !important; }
.leaflet-popup-content-wrapper {
    background: #1A2740 !important; color: var(--text-1) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px !important; box-shadow: var(--shadow-md) !important;
}
.leaflet-popup-content { margin: 12px 16px !important; }
.leaflet-popup-tip { background: #1A2740 !important; }
.leaflet-popup-close-button { color: var(--text-2) !important; }
.leaflet-control-attribution {
    background: rgba(15,23,42,0.7) !important; color: var(--text-3) !important;
    backdrop-filter: blur(4px); border-radius: 8px 0 0 0 !important;
}

/* ============================
   MAP FLOATING STATS
   ============================ */
.map-stats {
    position: absolute; top: 0.75rem; left: 0.75rem;
    z-index: 500; display: flex; gap: 0.4rem; pointer-events: none;
}
.stat-chip {
    display: flex; align-items: center; gap: 0.35rem;
    background: rgba(15,23,42,0.85); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px; padding: 0.3rem 0.75rem;
    font-size: 0.8rem; color: var(--text-1); font-weight: 500;
}
.stat-chip i { color: var(--accent); font-size: 0.9rem; }

/* ============================
   COLOR PALETTE
   ============================ */
.color-palette { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.color-swatch {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    border: 3px solid transparent; transition: var(--transition);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: white; box-shadow: 0 0 0 2px var(--accent); }

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .topbar-center { display: none; }
    .kpi-sidebar { width: 130px; }
    .kpi-val { font-size: 1.3rem; }
}
@media (max-width: 768px) {
    .topbar-brand .brand-text { display: none; }
    .kpi-sidebar { display: none; }
    .table-section { height: 250px; }
}
