/* Agregados del Radar sobre crm.css (misma estética del CRM). */
.radar-brand {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 0.9rem;
}

/* Bootstrap no trae "orange" como color temático */
.text-orange { color: #ea580c !important; }
.bg-orange { background-color: #ea580c !important; }
.badge-state { font-weight: 600; font-size: 0.74rem; padding: 0.35em 0.6em; border-radius: 8px; }
.badge-state.s-agotado { background: #fee2e2; color: #b91c1c; }
.badge-state.s-reapareciendo { background: #e0e7ff; color: #4338ca; }
.badge-state.s-escaso { background: #fef3c7; color: #b45309; }
.badge-state.s-contrayendo { background: #ffedd5; color: #c2410c; }
.badge-state.s-disponible { background: #dcfce7; color: #15803d; }
.badge-state.s-sin_historia { background: #f1f5f9; color: #64748b; }

.badge-level { font-weight: 700; font-size: 0.72rem; border-radius: 8px; }
.badge-level.l-Alta { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.badge-level.l-Media { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }
.badge-level.l-Baja { background: #e2e8f0; color: #475569; }

/* Tarjetas de estado clickeables */
.state-card { text-decoration: none; color: inherit; display: block; }
.state-card .kpi-number { font-size: 1.9rem; }
.state-card .kpi-icon { font-size: 1.35rem; }

/* Barra de puntaje */
.score-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6rem; height: 1.9rem; border-radius: 10px;
    font-weight: 700; font-size: 0.9rem; color: #1e293b; background: #f1f5f9;
}
.score-pill.hi { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.score-pill.mid { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }

.meter { height: 6px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6366f1, #8b5cf6); }

.why li { margin-bottom: 0.45rem; }
.why .bi { margin-right: 0.4rem; }

.product-title { font-weight: 700; color: #0f172a; }
.muted-xs { font-size: 0.75rem; color: #64748b; }
.table td, .table th { vertical-align: middle; }
.table a.prod { color: #0f172a; font-weight: 500; text-decoration: none; }
.table a.prod:hover { color: #4f46e5; }
.chart-box { position: relative; height: 260px; }
.notice-early {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 12px;
    color: #3730a3;
}
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-logo { background: rgba(15,23,42,0.97); border-radius: 14px; padding: 14px 20px; display: inline-block; }
/* bg-opacity de Bootstrap no aplica a colores propios: el naranja se define translúcido a mano */
.kpi-icon.bg-orange { background-color: rgba(234,88,12,0.10) !important; }

/* Fotos de producto (mlstatic) */
.thumb { border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid rgba(0,0,0,0.06); flex-shrink: 0; }
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: #cbd5e1; background: #f8fafc; }
.product-photo { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 14px; border: 1px solid rgba(0,0,0,0.06); }
@media (max-width: 575.98px) { .product-photo { width: 80px; height: 80px; } }
.ml-link { color: #94a3b8; font-size: 0.8rem; }
.ml-link:hover { color: #4f46e5; }

/* ── Celular: lista de tarjetas en lugar de tabla ── */
.m-item {
    display: flex; gap: 0.75rem; padding: 0.85rem 0.9rem; text-decoration: none; color: inherit;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.m-item:last-child { border-bottom: none; }
.m-item:active { background: rgba(99,102,241,0.06); }
.m-body { flex: 1; min-width: 0; }
.m-name {
    font-weight: 600; color: #0f172a; font-size: 0.92rem; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; margin-top: 0.5rem; }
.m-stats > div { background: rgba(241,245,249,0.9); border-radius: 8px; padding: 0.3rem 0.35rem; text-align: center; }
.m-stats span { display: block; font-size: 0.62rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; }
.m-stats strong { font-size: 0.82rem; color: #0f172a; white-space: nowrap; }
.m-stats small { color: #94a3b8; font-weight: 500; }
@media (max-width: 575.98px) {
    .chart-box-sm { height: 200px; }
    .product-title { font-size: 1.05rem; }
    .crm-content h4 { font-size: 1.15rem; }
    .state-card .kpi-number { font-size: 1.6rem; }
}
