/* ═══════════════════════════════════════════
   ERP DEMO — DASHBOARD
   ═══════════════════════════════════════════ */

/* ─── STAT CARDS ─── */
.dash-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:24px}
.dash-stat{animation:fadeInUp .5s var(--ease) both}
.dash-stat:nth-child(1){animation-delay:0s}
.dash-stat:nth-child(2){animation-delay:.06s}
.dash-stat:nth-child(3){animation-delay:.12s}
.dash-stat:nth-child(4){animation-delay:.18s}
.dash-stat:nth-child(5){animation-delay:.24s}

/* ─── GRID ─── */
.dash-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:14px;margin-bottom:14px}
.dash-panel{animation:fadeInUp .5s var(--ease) .3s both}
.dash-panel-head{
  padding:18px 20px 14px;display:flex;justify-content:space-between;align-items:center;
  border-bottom:1px solid var(--border);
}
.dash-panel-head h3{
  font-size:.88rem;font-weight:700;display:flex;align-items:center;gap:8px;
}
.dash-panel-head h3 i{color:var(--muted);font-size:.82rem}
.dash-panel-body{padding:0}

/* ─── MOVEMENT TABLE ─── */
.dash-movement td{font-size:.8rem}
.dash-movement .time{color:var(--dim);font-family:var(--en);font-size:.75rem}

/* ─── TYPE SUMMARY ─── */
.type-bars{padding:20px}
.type-bar-item{margin-bottom:14px}
.type-bar-item:last-child{margin-bottom:0}
.type-bar-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.type-bar-label{font-size:.8rem;font-weight:500;display:flex;align-items:center;gap:8px}
.type-bar-count{font-size:.82rem;font-weight:700;font-family:var(--en)}
.type-bar-track{
  height:6px;border-radius:3px;background:var(--surface2);overflow:hidden;
}
.type-bar-fill{
  height:100%;border-radius:3px;
  transition:width .8s var(--ease);
}
.type-bar-fill.raw{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.type-bar-fill.semi{background:linear-gradient(90deg,#a855f7,#c084fc)}
.type-bar-fill.fin{background:linear-gradient(90deg,#22c55e,#4ade80)}

/* ─── ALERT LIST ─── */
.alert-list{padding:12px 16px}
.alert-item{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:12px 14px;border-radius:var(--radius);
  transition:background .15s;margin-bottom:6px;
  background:rgba(255,255,255,.015);
  border:1px solid rgba(255,255,255,.03);
}
.alert-item:hover{background:rgba(239,68,68,.03);border-color:rgba(239,68,68,.08)}
.alert-item:last-child{margin-bottom:0}

.alert-left{display:flex;align-items:center;gap:10px;min-width:0}
.alert-dot{
  width:8px;height:8px;border-radius:50%;flex-shrink:0;
}
.alert-dot.critical{background:#ef4444;box-shadow:0 0 8px rgba(239,68,68,.4);animation:pulse 1.5s infinite}
.alert-dot.warning{background:#f59e0b;box-shadow:0 0 6px rgba(245,158,11,.3);animation:pulse 2s infinite}
.alert-dot.caution{background:#fbbf24;box-shadow:0 0 4px rgba(251,191,36,.2)}
.alert-info{min-width:0}
.alert-name{font-size:.84rem;font-weight:600;margin-bottom:1px}
.alert-code{font-size:.68rem;color:var(--dim);font-family:var(--en);letter-spacing:.3px}

.alert-right{display:flex;align-items:center;gap:12px;flex-shrink:0}
.alert-nums{
  display:flex;align-items:baseline;gap:3px;
  font-family:var(--en);font-size:.82rem;white-space:nowrap;
}
.alert-current{font-weight:700}
.alert-current{color:#ef4444}
.alert-sep{color:var(--dim);font-size:.7rem}
.alert-safety{color:var(--dim);font-weight:500}

.alert-bar{
  width:60px;height:5px;border-radius:3px;
  background:rgba(255,255,255,.06);overflow:hidden;
}
.alert-bar-fill{
  height:100%;border-radius:3px;
  transition:width .6s var(--ease);
}
.alert-bar-fill.critical{background:linear-gradient(90deg,#ef4444,#f87171)}
.alert-bar-fill.warning{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.alert-bar-fill.caution{background:linear-gradient(90deg,#fbbf24,#fde68a)}

.alert-pct{
  font-family:var(--en);font-size:.7rem;font-weight:700;
  min-width:32px;text-align:right;
}
.alert-pct.critical{color:#ef4444}
.alert-pct.warning{color:#f59e0b}
.alert-pct.caution{color:#fbbf24}

/* ─── PRICE CHANGES ─── */
.price-change-list{padding:8px 16px}
.price-item{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;border-radius:var(--radius);
  border-bottom:1px solid rgba(255,255,255,.03);
  transition:background .15s;
}
.price-item:last-child{border-bottom:none}
.price-item:hover{background:rgba(255,255,255,.02)}
.price-item-name{font-size:.84rem;font-weight:600}
.price-item-vendor{font-size:.7rem;color:var(--dim);margin-top:2px}
.price-item-right{display:flex;align-items:center;gap:10px}
.price-type{
  font-size:.62rem;font-weight:600;padding:3px 8px;border-radius:4px;
  letter-spacing:.3px;
}
.price-type.contract{background:rgba(59,130,246,.1);color:#60a5fa}
.price-type.basic{background:rgba(100,116,139,.1);color:#94a3b8}
.price-value{
  font-family:var(--en);font-size:.88rem;font-weight:700;
  color:var(--text);min-width:80px;text-align:right;
}

/* ─── RESPONSIVE ─── */
@media(max-width:1280px){
  .dash-stats{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:1024px){
  .dash-stats{grid-template-columns:repeat(2,1fr)}
  .dash-grid{grid-template-columns:1fr}
}
@media(max-width:768px){
  .dash-stats{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:18px}
  .dash-grid{gap:12px;margin-bottom:12px}
  .dash-panel-head{padding:14px 14px 10px}
  .dash-panel-head h3{font-size:.82rem}
  .type-bars{padding:14px}
  .alert-list{padding:8px 12px}
  .alert-item{padding:10px 12px;gap:10px}
}
@media(max-width:420px){
  .dash-stats{grid-template-columns:1fr}
}
