/* =========================================================
   MarketView - Alerte
   ========================================================= */
.al-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.al-kpi {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-align: left; min-width: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); color: var(--text);
    text-decoration: none !important; transition: border-color .15s;
}
.al-kpi:hover { border-color: #b8c7dd; }
.al-kpi.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: #f5f9ff; }
.al-kpi > div { min-width: 0; }
.al-kpi b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.al-kpi strong { display: block; font-size: 13px; font-weight: 500; margin-top: 2px; }
.al-kpi small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-ic { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; }
.al-ic.red { background: #ef4444; } .al-ic.orange { background: #f5b400; } .al-ic.blue { background: #1d6cf2; }
.al-ic.gray { background: #94a3b8; } .al-ic.green { background: #22c55e; }

.al-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 360px; gap: 10px; align-items: start; }
.al-center { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.al-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; position: sticky; top: 64px; }
.al-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.al-sev-legend { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12px; }
.al-sev-legend span { display: flex; align-items: center; gap: 8px; }
.al-sev-legend .dot { margin: 0; }

/* Hartă */
.al-map-card { position: relative; padding: 0; overflow: hidden; height: 420px; }
#alMap { position: absolute; inset: 0; background: #e9eef4; font-family: Inter, sans-serif; }
.al-map-title {
    position: absolute; top: 10px; left: 10px; z-index: 600; background: #fff; border-radius: 8px; padding: 7px 14px;
    font-weight: 700; font-size: 15px; box-shadow: 0 2px 10px rgba(16,24,40,.15);
}
.al-map-legend {
    position: absolute; left: 10px; bottom: 12px; z-index: 600; background: rgba(255,255,255,.95); border-radius: 8px;
    padding: 7px 10px; font-size: 11.5px; box-shadow: 0 2px 10px rgba(16,24,40,.15);
}
.al-map-legend div { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; }
.al-map-legend i { width: 11px; height: 11px; border-radius: 2px; }
.al-controls { right: 10px; bottom: 12px; }
.al-pin {
    position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 800;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
}
.al-pin.danger { background: #e5383b; } .al-pin.warning { background: #f59e0b; } .al-pin.info, .al-pin.success { background: #1d6cf2; }
.al-pin:hover { transform: translate(-50%, -50%) scale(1.25); }
.al-county-label { position: absolute; transform: translate(-50%, -50%); font: 700 10px Inter, sans-serif; color: #3a4658; pointer-events: none; white-space: nowrap; }
.al-country { position: absolute; transform: translate(-50%, -50%); font: 700 14px Inter, sans-serif; letter-spacing: 1.5px; color: #7d8aa0; pointer-events: none; text-align: center; white-space: nowrap; }

/* Tabel */
.al-table td { white-space: nowrap; }
.al-table .al-details { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.al-table .al-store { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.al-table tr.unread td { font-weight: 600; }
.al-table tr.unread td:nth-child(2)::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-right: 5px; vertical-align: 1px; }
.al-table .badge { font-size: 10.5px; }
.al-table .sev::before { content: '●'; margin-right: 4px; font-size: 9px; }
.al-table .bb { width: 20px; height: 20px; font-size: 10px; }
.al-table .al-view { font-weight: 600; }

/* Coloana dreaptă */
.al-dist { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center; }
.al-dist .donut-wrap { height: 130px; }
.al-type-list { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.al-type-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.al-type-list li:hover { color: var(--primary); }
.al-type-list .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-type-list i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.al-sev-row { display: grid; grid-template-columns: 85px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.al-sev-row .track { height: 14px; background: #eef2f7; border-radius: 3px; overflow: hidden; }
.al-sev-row .fill { height: 100%; border-radius: 3px; transition: width .4s; }
.al-sev-row b { text-align: right; }
.al-latest { list-style: none; margin: 0; padding: 0; }
.al-latest li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.al-latest li:last-child { border-bottom: 0; }
.al-latest .ic { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.al-latest .ic.danger { background: #fdecec; color: #e5383b; } .al-latest .ic.warning { background: #fff4e0; color: #f59e0b; }
.al-latest .ic.info, .al-latest .ic.success { background: #e8f0fe; color: #1d6cf2; }
.al-latest .txt { flex: 1; min-width: 0; font-size: 12px; color: #4b5669; }
.al-latest .txt b { display: block; font-size: 12.5px; color: var(--text); }
.al-latest .ago { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Modal */
.al-modal { width: 540px; }
.al-modal-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.al-dl { grid-template-columns: 120px minmax(0, 1fr); }
.al-dl a { float: none; }
.al-status-btns { display: flex; gap: 6px; }
.al-status-btns .btn.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.al-delete { margin-right: auto; color: var(--red); }

@media (max-width: 1500px) {
    .al-grid { grid-template-columns: 200px minmax(0, 1fr) 320px; }
    .al-kpis .al-ic { width: 40px; height: 40px; font-size: 18px; }
}
@media (max-width: 1250px) {
    .al-grid { grid-template-columns: 200px minmax(0, 1fr); }
    .al-right { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .al-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .al-grid { grid-template-columns: minmax(0, 1fr); }
    .al-right { grid-template-columns: minmax(0, 1fr); }
    .al-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tabel compact */
.al-table td.al-type { white-space: normal; max-width: 78px; line-height: 1.2; }
.al-table .al-store { max-width: 112px; }
.al-table td.al-city { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.al-table .al-details { max-width: 118px; }
@media (max-width: 1700px) { .al-grid { grid-template-columns: 195px minmax(0, 1fr) 320px; } .al-dist { grid-template-columns: 110px minmax(0, 1fr); } .al-dist .donut-wrap { height: 110px; } }
