/* Manpower Std vs Actual + Master Excel Upload */

.mv-context {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.mv-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mv-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

.mv-kpi.success { border-left-color: #16a34a; }
.mv-kpi.warning { border-left-color: #d97706; }
.mv-kpi.danger { border-left-color: #dc2626; }
.mv-kpi.info { border-left-color: #0891b2; }

.mv-kpi-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; }
.mv-kpi-value { font-size: 1.5rem; font-weight: 700; color: #0f2744; line-height: 1.3; }
.mv-kpi-sub { font-size: 0.72rem; color: #64748b; }

.mv-over { color: #dc2626; font-weight: 600; }
.mv-under { color: #0891b2; font-weight: 600; }
.mv-ok { color: #16a34a; font-weight: 600; }
.mv-warn { color: #d97706; font-weight: 600; }
.mv-total td { background: #f1f5f9; font-weight: 600; }

.mv-tabs { border-bottom: 0; padding: 0.4rem 0.75rem 0; }
.mv-tabs .nav-link { font-size: 0.85rem; color: #475569; }
.mv-tabs .nav-link.active { font-weight: 600; color: #1d4ed8; }

.mv-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #475569; margin: 0.25rem 0 0.6rem; }
.mv-scroll { max-height: 420px; overflow-y: auto; }

.mv-shift-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; margin-bottom: 0.75rem; }
.mv-shift { border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.6rem 0.8rem; background: #fff; border-top: 4px solid #94a3b8; }
.mv-shift.completed { border-top-color: #16a34a; }
.mv-shift.running { border-top-color: #2563eb; background: #f8fbff; }
.mv-shift.missing { border-top-color: #dc2626; background: #fef2f2; }
.mv-shift-head { display: flex; justify-content: space-between; font-weight: 700; color: #0f2744; }
.mv-shift-state { font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; background: #f1f5f9; color: #475569; }
.mv-shift-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: #475569; }

.mv-dod { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.5rem; }
.mv-dod-item { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 0.45rem 0.7rem; }
.mv-dod-label { font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 600; }
.mv-dod-value { font-size: 1.1rem; font-weight: 700; color: #0f2744; }
.mv-dod-delta { font-size: 0.72rem; font-weight: 600; }
.mv-dod-delta.good { color: #16a34a; }
.mv-dod-delta.bad { color: #dc2626; }

.mv-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.mv-chip { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; font-size: 0.72rem; padding: 0.15rem 0.6rem; cursor: pointer; color: #334155; }
.mv-chip.active { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.mv-heat td, .mv-heat th { text-align: center; font-size: 0.75rem; }
.mv-heat td.mv-heat-cell { min-width: 70px; font-weight: 600; }
.mv-heat .mv-heat-sub { display: block; font-size: 0.65rem; font-weight: 500; opacity: 0.8; }

.rp-pack {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
    background: linear-gradient(90deg, #0f2744, #1d4ed8); color: #e0e7ff; border-radius: 12px; padding: 1rem 1.25rem;
}
.rp-pack-title { font-weight: 700; font-size: 1.05rem; color: #fff; }

.mu-drop {
    border: 2px dashed #93c5fd;
    border-radius: 12px;
    background: #f8fbff;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.mu-drop > i { font-size: 2.2rem; color: #2563eb; margin-bottom: 0.5rem; }
.mu-drop-title { font-weight: 600; color: #0f2744; }
.mu-drop:hover, .mu-drop.drag { background: #eff6ff; border-color: #2563eb; }

.mu-source { display: inline-block; font-weight: 700; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.85rem; }
.mu-source.demo { background: #fef3c7; color: #92400e; }
.mu-source.uploaded { background: #dcfce7; color: #166534; }

.mu-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.mu-stat { border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.5rem 0.75rem; background: #fff; }
.mu-stat.warn { border-color: #fcd34d; background: #fffbeb; }
.mu-stat-value { font-size: 1.15rem; font-weight: 700; color: #0f2744; }
.mu-stat-label { font-size: 0.72rem; color: #64748b; }

.mu-file { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 0.5rem 0.9rem; margin-bottom: 0.75rem; font-size: 0.85rem; }
.mu-file i { color: #15803d; }

.mu-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.8rem; }
.mu-flow span { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 6px; padding: 0.25rem 0.55rem; font-weight: 600; }
.mu-flow i { color: #94a3b8; font-size: 0.7rem; }

/* Coil & material readiness */
.mat-cell-short { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.mat-cell-low { background: #fef3c7; color: #92400e; }
.mat-proj td, .mat-proj th { white-space: nowrap; font-size: 0.78rem; }

/* Day-wise 360 plan vs actual */
.dw-flow { display: flex; align-items: stretch; gap: 0.4rem; flex-wrap: wrap; }
.dw-step { flex: 1 1 130px; background: #f8fafc; border: 1px solid #e2e8f0; border-top: 3px solid #94a3b8; border-radius: 8px; padding: 0.5rem 0.7rem; }
.dw-step.good { border-top-color: #16a34a; }
.dw-step.warn { border-top-color: #d97706; }
.dw-step.bad { border-top-color: #dc2626; }
.dw-step-label { font-size: 0.7rem; text-transform: uppercase; color: #64748b; letter-spacing: 0.03em; }
.dw-step-value { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.dw-step-sub { font-size: 0.72rem; color: #64748b; }
.dw-arrow { align-self: center; color: #94a3b8; font-size: 0.8rem; }
.dw-table td, .dw-table th, .dw-matrix td, .dw-matrix th { white-space: nowrap; font-size: 0.76rem; }
.dw-table td.small { white-space: normal; min-width: 220px; }
.dw-table td.small:last-child { min-width: 340px; }
.dw-table th:first-child, .dw-table td:first-child, .dw-matrix th:first-child, .dw-matrix td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
