/* =========================
   LIQUIDADOR DE CARGA
   ========================= */

.std-liq-wrap {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.std-liq-hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #14213d 55%, #1e293b 100%);
    color: #ffffff;
    margin-bottom: 20px;
}

.std-liq-hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.std-liq-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    margin-bottom: 8px;
}

.std-liq-hero h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
    color: #ffffff;
}

.std-liq-hero p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 720px;
}

.std-liq-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.std-liq-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.std-liq-hero-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.std-liq-mini-kpi {
    min-height: 88px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.std-liq-mini-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.76);
}

.std-liq-mini-kpi strong {
    font-size: 17px;
    line-height: 1.2;
    color: #ffffff;
    word-break: break-word;
}

.std-liq-message {
    display: none;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.std-liq-message.is-success {
    display: block;
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.std-liq-message.is-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.std-liq-layout {
    display: block;
}

.std-liq-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px 20px;
}

.std-liq-card-header {
    margin-bottom: 16px;
}

.std-liq-card-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a;
}

.std-liq-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.std-liq-subsection-header {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.std-liq-form {
    margin: 0;
}

.std-liq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.std-liq-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.std-liq-field-full {
    grid-column: 1 / -1;
}

.std-liq-field label {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.std-liq-field input,
.std-liq-field select,
.std-liq-field textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
    padding: 11px 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.std-liq-field textarea {
    min-height: 110px;
    resize: vertical;
}

.std-liq-field input:focus,
.std-liq-field select:focus,
.std-liq-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.std-liq-field input[readonly],
.std-liq-field textarea[readonly] {
    background: #f1f5f9;
    color: #334155;
    cursor: default;
}

.std-liq-field select:disabled,
.std-liq-field input:disabled,
.std-liq-field textarea:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.std-liq-autocomplete-wrap {
    position: relative;
}

.std-liq-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
}

.std-liq-suggestion-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
}

.std-liq-suggestion-item:hover {
    background: #eff6ff;
}

.std-liq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.std-liq-actions button,
.std-liq-actions a {
    appearance: none;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.std-liq-actions button:hover,
.std-liq-actions a:hover {
    transform: translateY(-1px);
}

#liq_btn_calcular,
#liq_btn_guardar {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

#liq_btn_calcular:hover,
#liq_btn_guardar:hover {
    background: #1d4ed8;
}

.std-liq-btn-secondary,
#liq_btn_limpiar {
    background: #e2e8f0;
    color: #0f172a;
}

.std-liq-btn-secondary:hover,
#liq_btn_limpiar:hover {
    background: #cbd5e1;
}

.std-liq-btn-outline,
#liq_btn_pdf {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.std-liq-btn-outline:hover,
#liq_btn_pdf:hover {
    background: #eff6ff;
}

.std-liq-result-strong input[readonly] {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0f172a;
    font-weight: 700;
}

.std-liq-money input[readonly] {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .std-liq-hero {
        grid-template-columns: 1fr;
    }

    .std-liq-hero-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .std-liq-wrap {
        padding: 16px;
        border-radius: 14px;
    }

    .std-liq-card {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .std-liq-grid {
        grid-template-columns: 1fr;
    }

    .std-liq-field-full {
        grid-column: auto;
    }

    .std-liq-hero {
        padding: 16px;
        border-radius: 16px;
    }

    .std-liq-hero h2 {
        font-size: 22px;
    }

    .std-liq-hero-kpis {
        grid-template-columns: 1fr;
    }

    .std-liq-actions {
        flex-direction: column;
    }

.std-liq-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.std-liq-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.std-liq-table thead th {
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}

.std-liq-table tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #0f172a;
    vertical-align: middle;
}

.std-liq-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.std-liq-table-empty {
    text-align: center;
    color: #64748b;
    padding: 18px 10px !important;
}

.std-liq-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.std-liq-status.emitida {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.std-liq-status.anulada {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.std-liq-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.std-liq-table-actions a,
.std-liq-table-actions button {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.std-liq-table-actions a:hover,
.std-liq-table-actions button:hover {
    background: #f8fafc;
}

.std-liq-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

    .std-liq-actions button,
    .std-liq-actions a {
        width: 100%;
    }
}

.std-liq-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.std-liq-modal {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.std-liq-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.std-liq-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.std-liq-modal-close {
    appearance: none;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.std-liq-modal-body {
    padding: 20px;
}

.std-liq-modal-body p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}