/* Fase 9.2 — CSS verbatim de los <style> de Pages/Inventarios/Productos/Main/ModalStockVerificacion.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el <style>. Cambios: @@ → @ y capas D-51. */
.msv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.40);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal); /* D-51 (era 1060) */
}

.msv-modal {
    background: #fff;
    border-radius: 10px;
    width: 660px;
    max-width: 97vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0.5px solid #CFE3F7;
    box-shadow: 0 8px 32px rgba(5,150,105,.15);
}

/* Header */
.msv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 0.5px solid #CFE3F7;
    flex-shrink: 0;
    background: #F0FDF4;
}

.msv-header-left { display: flex; align-items: center; gap: 10px; }

.msv-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #D1FAE5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.msv-title { font-size: 13px; font-weight: 600; color: #065F46; }
.msv-sub   { font-size: 10px; color: #6B7280; margin-top: 1px; }

.msv-close {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: none;
    background: #D1FAE5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #065F46;
    flex-shrink: 0;
}
.msv-close:hover { background: #FEE2E2; color: #DC2626; }

/* Body */
.msv-body { flex: 1; overflow-y: auto; padding: 20px; }

/* Intro */
.msv-intro { text-align: center; }
.msv-intro-icon {
    font-size: 48px;
    color: #BBDEFB;
    display: block;
    margin-bottom: 12px;
}
.msv-intro-title { font-size: 14px; font-weight: 500; color: #0D47A1; margin-bottom: 8px; }
.msv-intro-desc  { font-size: 11px; color: #6B7280; line-height: 1.6; max-width: 440px; margin: 0 auto 16px; }

.msv-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}
.msv-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #374151;
    cursor: pointer;
}

/* Progress */
.msv-progress { text-align: center; padding: 20px 0; }
.msv-prog-icon { font-size: 40px; color: #1565C0; margin-bottom: 10px; }
.msv-spinner { animation: msv-spin 1s linear infinite; display: inline-block; }
@keyframes msv-spin { 100% { transform: rotate(360deg); } }
.msv-prog-title { font-size: 14px; font-weight: 500; color: #0D47A1; margin-bottom: 4px; }
.msv-prog-sub   { font-size: 10.5px; color: #6B7280; margin-bottom: 14px; }
.msv-prog-bar-wrap {
    background: #E3F2FD;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin: 0 40px 6px;
}
.msv-prog-bar {
    background: linear-gradient(90deg, #1565C0, #1E88E5);
    height: 100%;
    border-radius: 6px;
    transition: width .3s ease;
}
.msv-prog-pct { font-size: 10px; color: #6B7280; }

/* KPI row */
.msv-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.msv-kpi {
    background: #E3F2FD;
    border-radius: 7px;
    padding: 10px 12px;
    text-align: center;
}
.msv-kpi-val { font-size: 20px; font-weight: 600; color: #0D47A1; line-height: 1.1; }
.msv-kpi-lbl { font-size: 9.5px; color: #6B7280; margin-top: 2px; }
.msv-kpi-ok  { background: #D1FAE5; } .msv-kpi-ok .msv-kpi-val  { color: #065F46; }
.msv-kpi-bad { background: #FEE2E2; } .msv-kpi-bad .msv-kpi-val { color: #991B1B; }

/* Insights */
.msv-insight {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-radius: 0 7px 7px 0;
    padding: 10px 12px;
    font-size: 11px;
    margin-bottom: 14px;
}
.msv-insight i { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.msv-ok   { background: #F0FDF4; border-left: 3px solid #22C55E; color: #166534; }
.msv-warn { background: #FFFBEB; border-left: 3px solid #F59E0B; color: #78350F; }

.msv-table-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: #0D47A1;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.msv-table-wrap { overflow-x: auto; }

.msv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}
.msv-table thead th {
    background: #0D47A1;
    color: #fff;
    padding: 4px 6px;
    text-align: center;
    font-weight: 500;
    border-right: 0.5px solid rgba(255,255,255,.18);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.msv-table thead th:last-child { border-right: none; }
.msv-table thead th.thl { text-align: left; }
.msv-table tbody td {
    padding: 3px 6px;
    border-bottom: 0.5px solid #CFE3F7;
    border-right: 0.5px solid #CFE3F7;
    color: #374151;
}
.msv-table tbody td:last-child { border-right: none; }
.msv-table tbody tr:nth-child(even) td { background: #DBEAFE; }

.td-r   { text-align: right; }
.td-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.txt-ok { color: #059669; font-weight: 600; }
.txt-bad{ color: #DC2626; font-weight: 600; }

/* Footer */
.msv-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 0.5px solid #CFE3F7;
    background: #FAFCFF;
    flex-shrink: 0;
    gap: 8px;
    flex-wrap: wrap;
}
.msv-footer-info { font-size: 10px; color: #6B7280; }

.msv-btn-primary {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 14px; height: 28px; border-radius: 6px;
    background: #059669; color: #fff; border: none;
    font-size: 11px; cursor: pointer; font-family: inherit;
    transition: background .1s;
}
.msv-btn-primary:hover { background: #047857; }

.msv-btn-sec {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 12px; height: 28px; border-radius: 6px;
    border: 0.5px solid #BBDEFB; background: #fff;
    font-size: 11px; color: #0D47A1; cursor: pointer; font-family: inherit;
    transition: background .1s;
}
.msv-btn-sec:hover:not(:disabled) { background: #E3F2FD; }
.msv-btn-sec:disabled { opacity: .5; cursor: default; }

.msv-btn-warn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 12px; height: 28px; border-radius: 6px;
    background: #D97706; color: #fff; border: none;
    font-size: 11px; cursor: pointer; font-family: inherit;
}
.msv-btn-warn:hover { background: #B45309; }
