﻿.inventory-history {
    max-width: 1550px;
    margin: 0 auto;
    padding: 18px 8px 50px;
    color: #122342;
    font-family: 'Segoe UI',sans-serif
}

.ih-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 26px 30px;
    border-radius: 20px;
    background: linear-gradient(125deg,#102a73,#2563eb);
    color: #fff;
    margin-bottom: 18px
}

    .ih-hero small {
        font-size: 10px;
        letter-spacing: .15em;
        color: #bed5ff;
        font-weight: 800
    }

    .ih-hero h1 {
        margin: 6px 0;
        font-size: 26px
    }

    .ih-hero p {
        margin: 0;
        color: #dbeafe;
        font-size: 12px
    }

.ih-back {
    padding: 11px 14px;
    border-radius: 10px;
    background: #ffffff24;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700
}

.ih-panel {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 22px;
    border-radius: 17px;
    margin-bottom: 17px;
    box-shadow: 0 4px 16px #10244908
}

.ih-form {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px
}

    .ih-form label {
        display: flex;
        flex-direction: column;
        gap: 7px;
        font-size: 11px;
        font-weight: 700;
        color: #64748b
    }

    .ih-form select, .ih-input {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 10px;
        background: #fff;
        border: 1px solid #cfdbeb;
        color: #1e293b;
        font-size: 12px;
        width: 100%
    }

.ih-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px
}

    .ih-actions button, .ih-export, .ih-pager button {
        border-radius: 10px;
        border: 1px solid #2563eb;
        background: #2563eb;
        color: #fff;
        padding: 10px 16px;
        font-weight: 700;
        font-size: 12px;
        text-decoration: none;
        cursor: pointer
    }

.ih-export {
    background: #eff6ff;
    color: #1d4ed8
}

.ih-actions button:disabled, .ih-pager button:disabled {
    opacity: .5;
    cursor: not-allowed
}

.ih-error {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    padding: 12px;
    border-radius: 10px;
    font-size: 12px
}

.ih-metrics {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 12px
}

    .ih-metrics div {
        border: 1px solid #e2e8f0;
        background: white;
        border-radius: 15px;
        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 7px
    }

    .ih-metrics span {
        font-size: 11px;
        color: #64748b
    }

    .ih-metrics strong {
        font-size: 23px;
        color: #153286
    }

.ih-note {
    font-size: 11px;
    color: #64748b;
    margin: 0 0 18px;
    line-height: 1.6
}

.ih-table-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px
}

    .ih-table-head h2 {
        font-size: 16px;
        margin: 0
    }

    .ih-table-head span {
        color: #64748b;
        font-size: 12px
    }

.ih-scroll {
    max-width: 100%;
    overflow-x: auto
}

    .ih-scroll table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11px;
        min-width: 730px
    }

    .ih-scroll th {
        background: #eff6ff;
        color: #153286;
        text-transform: uppercase;
        font-size: 9px;
        letter-spacing: .04em;
        text-align: left;
        padding: 13px;
        white-space: nowrap
    }

    .ih-scroll td {
        padding: 12px 13px;
        border-bottom: 1px solid #edf2f7
    }

    .ih-scroll tbody tr:hover {
        background: #f8fbff
    }

.ih-negative {
    color: #dc2626;
    font-weight: 800
}

.ih-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 28px
}

.ih-pager {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
    font-size: 12px;
    color: #64748b
}

    .ih-pager button {
        padding: 7px 12px
    }

@media(max-width:950px) {
    .ih-form {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .ih-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:600px) {
    .ih-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px
    }

    .ih-form {
        grid-template-columns: 1fr
    }

    .ih-metrics {
        grid-template-columns: 1fr 1fr
    }

        .ih-metrics strong {
            font-size: 18px
        }
}


/* =====================================================================
   PANEL DE AUDITORÍA DEL CORTE DIARIO
   (InventorySnapshotAuditPanel.razor)
   ===================================================================== */

/* Botones alineados a la derecha del encabezado del panel. */
.ih-actions-inline {
    margin-top: 0
}

/* Botón secundario (Evaluar). */
.ih-actions button.ih-button-secondary {
    background: #eff6ff;
    color: #1d4ed8
}

/* Rejilla de tarjetas de estado. */
.ih-audit-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 14px
}

.ih-audit-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fbfdff
}

    .ih-audit-card span {
        font-size: 11px;
        color: #64748b
    }

    .ih-audit-card strong {
        font-size: 18px;
        color: #153286
    }

    .ih-audit-card small {
        font-size: 11px;
        color: #94a3b8
    }

/* Colores de estado en las tarjetas. */
.ih-audit-card strong.ih-text-ok {
    color: #047857
}

.ih-audit-card strong.ih-text-warn {
    color: #b45309
}

.ih-audit-card strong.ih-text-error {
    color: #be123c
}

/* Mensaje "todo en orden". */
.ih-ok {
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #047857;
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    margin: 0 0 14px
}

/* Lista de advertencias del diagnóstico. */
.ih-warnings {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    padding: 12px 12px 12px 30px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 14px
}

/* Explicación de la generación manual. */
.ih-manual {
    border: 1px dashed #cfdbeb;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 12px;
    color: #334155;
    line-height: 1.6
}

    .ih-manual p {
        margin: 0
    }

.ih-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: 700;
    color: #b45309
}

/* Separación del encabezado de la bitácora. */
.ih-runs-head {
    margin-top: 6px
}

/* Etiquetas de resultado de la bitácora. */
.ih-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap
}

.ih-badge-ok {
    background: #d1fae5;
    color: #047857
}

.ih-badge-info {
    background: #dbeafe;
    color: #1d4ed8
}

.ih-badge-warn {
    background: #fef3c7;
    color: #b45309
}

.ih-badge-error {
    background: #ffe4e6;
    color: #be123c
}

/* Enlace a la ejecución de MasterSync. */
.ih-link {
    margin-left: 6px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none
}

/* Mensaje largo de la bitácora. */
.ih-message {
    min-width: 260px;
    color: #475569
}

@media(max-width:950px) {
    .ih-audit-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:600px) {
    .ih-audit-grid {
        grid-template-columns: 1fr
    }
}
