/* =========================================================
   MarketView - stiluri aplicație
   ========================================================= */
:root {
    --navy: #0c1a2e;
    --navy-2: #13243d;
    --navy-3: #1b3050;
    --primary: #1565e8;
    --primary-2: #0f53c7;
    --primary-soft: #e8f0fe;
    --bg: #edf1f6;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #172233;
    --muted: #6b778a;
    --green: #16a34a;
    --green-soft: #e7f7ec;
    --red: #e5383b;
    --red-soft: #fdecec;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --yellow: #fbbf24;
    --cov-1: #ef4f45;
    --cov-2: #f7953b;
    --cov-3: #f8d24f;
    --cov-4: #b4dc5a;
    --cov-5: #3cb65a;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
    --sidebar-w: 215px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------------- Layout ---------------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 14px; flex: 1; }

/* ---------------- Sidebar ---------------- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--navy);
    color: #cdd6e4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; height: 60px;
    color: #fff; text-decoration: none !important;
}
.brand-logo { width: 40px; height: 40px; }
.brand strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.brand small { display: block; font-size: 11px; color: #9fb0c8; margin-top: 1px; }

.nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.nav-link {
    display: flex; align-items: center; gap: 13px;
    padding: 10px 12px; border-radius: 8px;
    color: #d6deea; font-size: 13.5px; font-weight: 500;
    text-decoration: none !important;
    transition: background .15s;
}
.nav-link i { width: 20px; text-align: center; font-size: 16px; color: #aebcd0; }
.nav-link:hover { background: var(--navy-2); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link.active i { color: #fff; }
.nav-badge {
    margin-left: auto; background: var(--red); color: #fff;
    font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 7px;
}

.progress-card {
    margin: auto 10px 12px; padding: 14px 12px;
    background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 10px;
}
.progress-card h4 { color: #fff; font-size: 14px; font-weight: 700; }
.ring { position: relative; width: 104px; height: 104px; margin: 12px auto 14px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: #24395a; }
.ring-fg { stroke: #22d3ee; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label b { color: #fff; font-size: 21px; }
.ring-label small { font-size: 9.5px; color: #b8c5d8; }
.progress-card dl { margin: 0; }
.progress-card dl div { display: flex; justify-content: space-between; padding: 6px 2px; font-size: 12px; }
.progress-card dt { color: #c3cedf; }
.progress-card dd { margin: 0; color: #fff; font-weight: 600; }
.sidebar-backdrop { display: none; }

/* ---------------- Topbar ---------------- */
.topbar {
    height: 54px; background: var(--navy);
    display: flex; align-items: center; gap: 14px; padding: 0 16px 0 8px;
    position: sticky; top: 0; z-index: 40;
}
.menu-btn { display: none; }
.search { position: relative; width: 262px; }
.search > i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9fb0c8; }
.search input {
    width: 100%; height: 34px; border-radius: 7px;
    border: 1px solid #2a3f5f; background: #1c2e48; color: #fff;
    padding: 0 12px 0 34px; outline: none; font-size: 12.5px;
}
.search input::placeholder { color: #93a4bd; }
.search input:focus { border-color: var(--primary); }
.search-results {
    display: none; position: absolute; top: 40px; left: 0; right: -80px;
    background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
    overflow: hidden; z-index: 100;
}
.search-results.open { display: block; }
.search-results a {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    color: var(--text); text-decoration: none !important; border-bottom: 1px solid #f1f4f8;
}
.search-results a:hover, .search-results a.focused { background: var(--primary-soft); }
.search-results a i { width: 18px; color: var(--primary); text-align: center; }
.search-results small { display: block; color: var(--muted); font-size: 11px; }
.search-results .empty { padding: 12px; color: var(--muted); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.period-btn {
    display: flex; align-items: center; gap: 9px;
    height: 34px; padding: 0 12px; border-radius: 7px;
    border: 1px solid #2a3f5f; background: #14253e; color: #fff; font-size: 12.5px;
}
.segmented { display: flex; background: #14253e; border: 1px solid #2a3f5f; border-radius: 7px; padding: 3px; }
.segmented button {
    border: 0; background: transparent; color: #c9d4e4;
    padding: 5px 12px; border-radius: 5px; font-size: 12.5px;
}
.segmented button.active { background: #2c4468; color: #fff; }
.icon-btn { border: 0; background: transparent; color: #fff; font-size: 18px; padding: 6px; position: relative; }
.bell-badge {
    position: absolute; top: -1px; right: -3px;
    background: var(--red); color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 5px;
}
.user { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none !important; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
}
.user-info b { display: block; font-size: 12px; }
.user-info small { display: block; font-size: 10.5px; color: #aebcd0; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px;
    background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; z-index: 120;
}
.dropdown-right .dropdown-menu { left: auto; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-title {
    display: flex; justify-content: space-between; padding: 6px 8px;
    font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px;
}
.dropdown-title a { text-transform: none; }
.dropdown-item {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    padding: 7px 10px; border-radius: 6px; color: var(--text);
}
.dropdown-item:hover, .dropdown-item.active { background: var(--primary-soft); color: var(--primary); }
.notif-menu { width: 340px; }
.notif {
    display: flex; gap: 10px; padding: 8px; border-radius: 6px;
    color: var(--text); text-decoration: none !important; font-size: 12px;
}
.notif:hover { background: #f5f7fb; }
.notif.unread { font-weight: 600; }
.notif small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }

.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; border: 2px solid; background: #fff; }
.dot-danger { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 2px #fff; }
.dot-warning { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 2px #fff; }
.dot-info { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 2px #fff; }
.dot-success { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 2px #fff; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 12px 14px; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { font-size: 14px; font-weight: 700; }
.card-head a { font-size: 12px; font-weight: 500; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 800; }
.page-head p { margin: 3px 0 0; color: var(--muted); }

/* ---------------- KPI ---------------- */
.kpi-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.kpi { display: flex; align-items: center; gap: 10px; padding: 11px 10px; }
.kpi-icon {
    width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff;
}
.kpi-icon.blue { background: #e9f0fd; color: #1c5fd6; }
.kpi-icon.green { background: #e7f7ec; color: #16a34a; }
.kpi-icon.navy { background: #e6eefc; color: #1557d0; }
.kpi-icon.green-solid { background: #1fa855; color: #fff; }
.kpi-icon.purple { background: #8b5cf6; color: #fff; }
.kpi-icon.orange { background: #fff1e0; color: #f08a0c; }
.kpi-icon.yellow { background: #fbbf24; color: #fff; }
.kpi-body { min-width: 0; }
.kpi-label { font-size: 11px; color: #4b5669; line-height: 1.25; }
.kpi-value { font-size: 19px; font-weight: 700; margin: 3px 0 2px; white-space: nowrap; letter-spacing: -.4px; }
.kpi-value small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.change { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.change.up { color: var(--green); }
.change.down { color: var(--red); }
.change.flat { color: var(--muted); }

/* ---------------- Dashboard grid ---------------- */
.dash-grid {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr) 350px;
    gap: 10px; margin-bottom: 10px;
    height: 560px;
}
.bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(0, .95fr) minmax(0, .85fr);
    gap: 10px;
}
.span-2 { grid-column: span 2; }
.row-span-2 { grid-row: span 2; }

/* Filtre */
.filters { display: flex; flex-direction: column; overflow-y: auto; }
.filters .card-head { margin-bottom: 4px; }
.filters .card-head a { cursor: pointer; }
.field { margin-bottom: 8px; }
.field label { display: block; font-size: 12px; color: #3a4658; margin-bottom: 4px; }
.select, .input {
    width: 100%; height: 32px; border: 1px solid #d5dce6; border-radius: 6px;
    background: #fff; padding: 0 8px; font-size: 12.5px; outline: none;
}
.select:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,232,.12); }
textarea.input { height: auto; padding: 8px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid transparent;
    font-weight: 600; font-size: 13px; text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-light { background: #fff; color: var(--text); border-color: #d5dce6; }
.btn-light:hover { background: #f5f7fb; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.filters .btn-block { margin-top: auto; }

/* Hartă */
.map-card { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #e9eef4; }
.map-toolbar {
    position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5;
    display: flex; justify-content: space-between; gap: 10px; pointer-events: none;
}
.map-toolbar > * { pointer-events: auto; }
.tabs-pill { display: flex; gap: 4px; background: #fff; border-radius: 20px; padding: 3px; box-shadow: var(--shadow); flex-wrap: wrap; }
.tabs-pill button {
    border: 0; background: transparent; padding: 5px 13px; border-radius: 16px;
    font-size: 12.5px; color: #3a4658; font-weight: 500;
}
.tabs-pill button.active { background: var(--primary); color: #fff; }
.map-view-switch { display: flex; background: #fff; border-radius: 8px; padding: 3px; box-shadow: var(--shadow); align-self: flex-start; }
.map-view-switch button { border: 0; background: transparent; padding: 5px 16px; border-radius: 6px; font-size: 12.5px; }
.map-view-switch button.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.map-canvas { flex: 1; position: relative; min-height: 0; }
#mapSvg { width: 100%; height: 100%; display: block; cursor: grab; }
#mapSvg:active { cursor: grabbing; }
#satMap { position: absolute; inset: 0; display: none; z-index: 1; isolation: isolate; }
#satMap .leaflet-top { top: 48px; }
.map-card.satellite #satMap { display: block; }
.map-card.satellite #mapSvg, .map-card.satellite .map-zoom { display: none; }

.county-cell { stroke: #fff; stroke-width: 1.4; transition: filter .15s; cursor: pointer; }
.county-cell:hover { filter: brightness(1.07) saturate(1.1); }
.county-cell.selected { stroke: var(--navy); stroke-width: 3; }
.county-label { pointer-events: none; text-anchor: middle; font-family: Inter, sans-serif; }
.county-label .code { font-weight: 800; font-size: 13px; }
.county-label .l { font-size: 10.5px; }
.county-label .pct { font-weight: 700; font-size: 10.5px; }
.county-label .hl { font-weight: 800; }
.country-outline { fill: none; stroke: #6b7a8f; stroke-width: 1.2; pointer-events: none; }
.neighbor-label { font-size: 13px; font-weight: 600; letter-spacing: 1.2px; fill: #7d8aa0; text-anchor: middle; pointer-events: none; }
.capital-box { cursor: pointer; stroke: #fff; stroke-width: 2; }
.capital-box.selected { stroke: var(--navy); stroke-width: 3; }

.map-legend {
    position: absolute; top: 52px; right: 10px; z-index: 5;
    background: rgba(255,255,255,.96); border-radius: 8px; padding: 9px 12px; box-shadow: var(--shadow);
    font-size: 12px;
}
.map-legend h5 { margin: 0 0 6px; font-size: 12px; font-weight: 700; }
.map-legend div { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.map-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.map-legend .grad { width: 120px; height: 9px; border-radius: 5px; }
.map-legend .grad-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.map-zoom { position: absolute; right: 10px; bottom: 12px; z-index: 5; display: flex; flex-direction: column; background: #fff; border-radius: 6px; box-shadow: var(--shadow); }
.map-zoom button { width: 30px; height: 30px; border: 0; background: none; font-size: 16px; }
.map-zoom button + button { border-top: 1px solid var(--border); }
.map-tooltip {
    position: absolute; z-index: 20; pointer-events: none; display: none;
    background: var(--navy); color: #fff; border-radius: 8px; padding: 9px 12px; font-size: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); min-width: 180px;
}
.map-tooltip b { font-size: 13px; display: block; margin-bottom: 5px; }
.map-tooltip div { display: flex; justify-content: space-between; gap: 14px; padding: 1px 0; color: #d3dcea; }
.map-tooltip div span:last-child { color: #fff; font-weight: 600; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }

/* Panou județ */
.county-panel { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.county-panel .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; }
.county-panel .panel-head h2 { font-size: 21px; font-weight: 800; }
.county-panel .close { border: 0; background: none; font-size: 18px; color: #3a4658; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 12px; }
.tabs button {
    border: 0; background: none; padding: 9px 10px; font-size: 12.5px; color: #3a4658;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: var(--primary-soft); border-radius: 6px 6px 0 0; }
.panel-body { padding: 12px 16px; overflow-y: auto; overflow-x: hidden; flex: 1; }
.panel-tab { display: none; }
.panel-tab.active { display: block; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.mini-kpi { border: 1px solid var(--border); border-radius: 7px; padding: 7px; min-width: 0; }
.mini-kpi small { display: block; font-size: 10.5px; color: #4b5669; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-kpi b { display: block; font-size: 19px; font-weight: 700; margin-top: 4px; }
.mini-kpi.accent-green b { color: var(--green); }
.mini-kpi.accent-orange small, .mini-kpi.accent-orange b { color: #f08a0c; }
.mini-kpi.accent-navy b { color: #1f3b66; }
.section-title { font-size: 13px; font-weight: 700; margin: 4px 0 10px; }
.dist { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 8px; align-items: center; }
.dist-list { list-style: none; margin: 0; padding: 0; }
.dist-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.dist-list .sw { width: 13px; height: 13px; border-radius: 3px; flex-shrink: 0; }
.dist-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-list .val { white-space: nowrap; }
.donut-wrap { position: relative; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-size: 19px; font-weight: 800; }
.donut-center small { font-size: 10.5px; color: #3a4658; }
.potential-box {
    background: #f1f5fa; border-radius: 8px; padding: 12px; margin-top: 14px; font-size: 12.5px;
}
.potential-box p { margin: 0 0 3px; }
.potential-box .btn { margin-top: 8px; float: right; }
.potential-box::after { content: ''; display: block; clear: both; }

/* Tabele */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th {
    text-align: left; font-weight: 600; color: #4b5669; background: #f5f7fa;
    padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 7px 8px; border-bottom: 1px solid #eef1f5; }
.table tbody tr:hover { background: #f8fafc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.chain-name { font-weight: 600; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: #eef1f5; color: #4b5669; }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-orange { background: #fff3e0; color: #d97706; }

/* Grafice bottom */
.chain-card .dist { grid-template-columns: 125px minmax(0, 1fr); gap: 10px; }
.chain-legend td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 100%; }
.chain-legend { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.chain-legend td { padding: 3px 2px; }
.chain-legend td:nth-child(2), .chain-legend td:nth-child(3) { text-align: right; }
.chain-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.chart-box { position: relative; height: 180px; }
.segmented-light { display: flex; background: #eef2f7; border-radius: 6px; padding: 2px; }
.segmented-light button { border: 0; background: none; padding: 4px 12px; font-size: 12px; border-radius: 5px; color: #3a4658; }
.segmented-light button.active { background: var(--primary); color: #fff; }

.hbar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 50px; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.hbar-track { height: 15px; background: #eef2f7; border-radius: 3px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, #1fa855, #3cc56d); border-radius: 3px; transition: width .5s; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }

.opp-list { list-style: none; margin: 0; padding: 0; }
.opp-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef1f5; }
.opp-list li:last-child { border-bottom: 0; }
.opp-pin { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.opp-info { flex: 1; min-width: 0; font-size: 11.5px; color: #4b5669; }
.opp-info b { display: block; font-size: 12.5px; color: var(--text); }
.opp-pill {
    align-self: center; border: 0; background: var(--primary-soft); color: var(--primary);
    font-size: 11px; padding: 5px 10px; border-radius: 6px; white-space: nowrap; font-weight: 500;
}

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 12px; border-bottom: 1px solid #f1f4f8; }
.alert-list li:last-child { border-bottom: 0; }
.alert-list .msg { flex: 1; min-width: 0; }
.alert-list .msg a { color: var(--text); }
.alert-list .ago { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* Pagini secundare */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.toolbar .field { margin: 0; min-width: 150px; }
.pagination { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); text-decoration: none !important; font-size: 12px;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .info { border: 0; background: none; color: var(--muted); margin-right: auto; }
.progress { height: 8px; background: #eef2f7; border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; border-radius: 4px; }
.alert-box { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.alert-box.success { background: var(--green-soft); color: #11662f; }
.alert-box.error { background: var(--red-soft); color: #9b1c1c; }
.info-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 500; }
.empty-state { text-align: center; padding: 40px; color: var(--muted); }
.empty-state i { font-size: 34px; color: #b6c2d3; margin-bottom: 10px; }
.sort-link { color: inherit; }
.sort-link i { font-size: 10px; color: var(--muted); }

.cov-1 { background: var(--cov-1); } .cov-2 { background: var(--cov-2); } .cov-3 { background: var(--cov-3); }
.cov-4 { background: var(--cov-4); } .cov-5 { background: var(--cov-5); }

/* Leaflet */
.sat-label { background: rgba(12,26,46,.85); color: #fff; border: 0; border-radius: 4px; font-weight: 700; font-size: 11px; padding: 1px 5px; box-shadow: none; }
.sat-label::before { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1500px) {
    .kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: 175px minmax(0, 1fr) 320px; }
    .bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row-span-2 { grid-row: auto; }
}
@media (max-width: 1200px) {
    .dash-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
    .dash-grid .filters { order: 3; }
    .map-card { height: 560px; }
    .county-panel { height: 560px; }
    .filters form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 10px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; }
    .sidebar.open { transform: none; }
    .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; }
    .menu-btn { display: block; }
    .user-info, #granularity { display: none; }
}
@media (max-width: 760px) {
    .content { padding: 10px; }
    .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bottom-grid, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .span-2 { grid-column: auto; }
    .search { width: auto; flex: 1; }
    .period-btn span { display: none; }
    .map-card { height: 460px; }
    .map-legend { display: none; }
    .mini-kpis { grid-template-columns: repeat(2, 1fr); }
    .info-list { grid-template-columns: 1fr; }
}

/* Pagina hartă */
.dash-grid.map-page { height: calc(100vh - 82px); min-height: 560px; margin-bottom: 0; }
@media (max-width: 1200px) { .dash-grid.map-page { height: auto; } }


/* ---------------- Componente comune (ecusoane lanțuri, căutare, paginare, controale hartă) ---------------- */
/* ---------------- Ecusoane lanțuri ---------------- */
.bb {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 800;
    color: #fff; line-height: 1; font-style: normal; letter-spacing: -.3px;
}
.bb i { font-size: .95em; }
.bb-total { background: #eaf1fb; color: #1f3b66; }
.bb-indep { background: #e3f7e8; color: #16a34a; }
.bb-kaufland { background: #e11d2e; border: 2px solid #fff; box-shadow: 0 0 0 1px #e11d2e; }
.bb-lidl { background: #1d4ed8; position: relative; }
.bb-lidl b { display: inline-flex; align-items: center; justify-content: center; width: 72%; height: 72%; border-radius: 50%; background: #ffd400; color: #1d4ed8; font-size: .85em; }
.bb-aro { background: #1565c0; font-size: .72em; text-transform: lowercase; }
.bb-profi { background: #e8412c; }
.bb-mega { background: #fff; color: #b91c1c; border: 2px solid #b91c1c; }
.bb-penny { background: #d91f26; font-style: italic; }
.bb-altele, .bb-other { background: #e9edf3; color: #3a4658; }
.bb-sm { width: 15px; height: 15px; font-size: 8.5px; border-radius: 3px; }
.bb-lg { width: 30px; height: 30px; font-size: 14px; border-radius: 6px; }
.bb-xl { width: 44px; height: 44px; font-size: 21px; border-radius: 8px; }
.bb-lg.bb-kaufland, .bb-xl.bb-kaufland { border-width: 3px; }


.mp-controls {
    position: absolute; right: 12px; bottom: 16px; z-index: 600;
    display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.mp-controls button { width: 34px; height: 34px; border: 0; background: #fff; color: #1f2d44; font-size: 14px; }
.mp-controls button:hover { background: #eef3fa; }
.mp-controls button + button { border-top: 1px solid #e3e8ef; }

.mp-search { position: relative; margin-bottom: 8px; }
.mp-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #7b879a; font-size: 13px; }
.mp-search input { width: 100%; height: 36px; border: 1px solid #d5dce6; border-radius: 7px; padding: 0 10px 0 32px; outline: none; }
.mp-search input:focus { border-color: var(--primary); }
.mp-table { font-size: 12px; }
.mp-table th { padding: 7px 5px; }
.mp-table td { padding: 7px 5px; }
.mp-table .c-k { color: var(--red); }
.mp-table .c-l { color: var(--primary); }
.mp-table tr.clickable { cursor: pointer; }
.mp-pager { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; font-size: 12px; color: #4b5669; }
.mp-pager .pages { display: flex; gap: 4px; }
.mp-pager button {
    min-width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; border-radius: 6px; font-size: 12px;
}
.mp-pager button.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.mp-pager button:disabled { opacity: .4; cursor: default; }


.search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 500 10.5px Inter, sans-serif; color: #9fb0c8; border: 1px solid #2a3f5f; border-radius: 4px; padding: 2px 5px; pointer-events: none; }
.search input:focus + .search-kbd, .search input:not(:placeholder-shown) + .search-kbd { display: none; }
@media (max-width: 760px) { .search-kbd { display: none; } }


.btn[hidden] { display: none !important; }

