/* ============================================================
   Smart Inventory — Logistics Cost Intelligence styles
   ============================================================ */

.lc-page { padding: 0; }

.lc-mute { color: var(--text-muted); font-size: 12px; font-weight: 500; }

/* ---------- Badges ---------- */
.lc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.4;
    white-space: nowrap;
}
.lc-badge-slate  { background: rgba(100,116,139,.10); color: #475569; border: 1px solid rgba(100,116,139,.18); }
.lc-badge-green  { background: rgba(16,185,129,.10); color: #059669; border: 1px solid rgba(16,185,129,.18); }
.lc-badge-orange { background: rgba(245,158,11,.10); color: #d97706; border: 1px solid rgba(245,158,11,.18); }
.lc-badge-red    { background: rgba(220,38,38,.10);  color: #dc2626; border: 1px solid rgba(220,38,38,.18); }
.lc-badge-blue   { background: rgba(59,130,246,.10); color: #2563eb; border: 1px solid rgba(59,130,246,.18); }
.lc-badge-cyan   { background: rgba(6,182,212,.10);  color: #0891b2; border: 1px solid rgba(6,182,212,.18); }

/* ---------- Empty state ---------- */
.lc-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-soft, rgba(0,0,0,.02));
    border-radius: 12px;
    border: 1px dashed var(--border-color, rgba(0,0,0,.08));
}

/* ---------- Cost type breakdown (overview) ---------- */
.lc-by-type { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.lc-type-row { display: grid; grid-template-columns: 160px 1fr 100px; align-items: center; gap: 14px; font-size: 13px; }
.lc-type-label { font-weight: 600; color: var(--text-primary); }
.lc-type-bar { height: 8px; background: rgba(100,116,139,.08); border-radius: 999px; overflow: hidden; }
.lc-type-bar-fill { height: 100%; background: linear-gradient(90deg, #06b6d4, #0891b2); border-radius: 999px; transition: width .4s ease; }
.lc-type-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-primary); }

/* ---------- Tables ---------- */
.lc-table-wrap { overflow-x: auto; margin-top: 8px; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lc-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-soft, rgba(0,0,0,.02));
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,.06));
}
.lc-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,.04));
    vertical-align: middle;
}
.lc-table tbody tr:hover { background: rgba(124,58,237,.04); }
.lc-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Cost detail grid ---------- */
.lc-cost-grid { display: flex; flex-direction: column; gap: 10px; }
.lc-cost-row {
    display: grid;
    grid-template-columns: 200px 1fr 130px auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-soft, rgba(0,0,0,.02));
    border: 1px solid var(--border-color, rgba(0,0,0,.05));
    border-radius: 14px;
    transition: all .2s ease;
}
.lc-cost-row:hover { border-color: rgba(6,182,212,.25); background: rgba(6,182,212,.04); }
.lc-cost-icon { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.lc-cost-amounts { display: flex; flex-direction: column; gap: 4px; }
.lc-cost-est, .lc-cost-act { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.lc-cost-est .lc-mute, .lc-cost-act .lc-mute { margin-right: 8px; min-width: 50px; display: inline-block; }
.lc-cost-var { text-align: center; }

/* ---------- Complexity gauge ---------- */
.lc-complex { padding: 8px 4px; text-align: center; }
.lc-complex-gauge {
    --cx-color: #94a3b8;
    --cx-pct: 0%;
    width: 160px;
    height: 160px;
    margin: 14px auto 8px;
    border-radius: 50%;
    background: conic-gradient(var(--cx-color) var(--cx-pct), rgba(100,116,139,.10) 0);
    display: grid;
    place-items: center;
    position: relative;
}
.lc-complex-fill {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: var(--card-bg, #fff);
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.lc-complex-value { position: relative; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); }
.lc-complex-value small { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.lc-complex-band { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.lc-complex-factors {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-soft, rgba(0,0,0,.02));
    border-radius: 10px;
    margin-top: 8px;
}
.lc-factor {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}
.lc-factor span { color: var(--text-muted); }
.lc-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.lc-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(124,58,237,.10);
    color: #7c3aed;
    border: 1px solid rgba(124,58,237,.18);
    font-weight: 600;
}

/* ---------- Capacity ---------- */
.lc-capacity { padding: 6px 0; }
.lc-cap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
    font-size: 13px;
}
.lc-cap-grid > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border-color, rgba(0,0,0,.05)); }
.lc-cap-grid > div span { color: var(--text-muted); }
.lc-cap-grid > div strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.lc-cap-bar { margin-top: 14px; height: 10px; background: rgba(100,116,139,.08); border-radius: 999px; overflow: hidden; }
.lc-cap-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); border-radius: 999px; transition: width .4s ease; }

/* ---------- Incidents ---------- */
.lc-incidents { display: flex; flex-direction: column; gap: 8px; }
.lc-incident-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: var(--bg-soft, rgba(0,0,0,.02));
    border: 1px solid var(--border-color, rgba(0,0,0,.05));
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
}
.lc-incident-row:hover { border-color: rgba(220,38,38,.20); background: rgba(220,38,38,.03); }
.lc-incident-row.resolved { opacity: 0.6; }
.lc-sev-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px currentColor; opacity: .9; }
.lc-incident-main { min-width: 0; }
.lc-incident-title { font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.lc-incident-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lc-incident-res { font-size: 11.5px; color: #059669; margin-top: 4px; }
.lc-incident-meta { text-align: right; font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* ---------- Similar cases ---------- */
.lc-sim-bar { display: inline-block; width: 80px; height: 6px; background: rgba(100,116,139,.10); border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.lc-sim-bar-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #f97316); border-radius: 999px; }

/* ---------- Toggles ---------- */
.lc-toggles { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px; background: var(--bg-soft, rgba(0,0,0,.02)); border-radius: 10px; }
.lc-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
.lc-toggle input { width: 16px; height: 16px; accent-color: #7c3aed; }

/* ---------- Range sliders ---------- */
.lc-range { width: 100%; accent-color: #7c3aed; height: 28px; }

/* ---------- Sidebar group separators ---------- */
.nav-group-label {
    padding: 14px 18px 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #94a3b8);
    border-top: 1px solid var(--border-color, rgba(255,255,255,.04));
    margin-top: 6px;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .lc-type-row { grid-template-columns: 110px 1fr 80px; gap: 8px; font-size: 12px; }
    .lc-cost-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
    .lc-cap-grid { grid-template-columns: 1fr; }
}
