/* Produccion - Requerimiento Compras */
#sub-produccion-requerimiento-compras {
    padding: 20px;
}

.reqc-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reqc-toolbar {
    margin-bottom: 0;
}

.reqc-toolbar-note {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
}

.reqc-filter {
    height: 40px;
    min-width: 150px;
    padding: 0 12px;
    color: #cbd5e1;
    background: #0f172a;
    border: 1px solid rgba(51, 65, 85, 0.75);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
}

.reqc-filter:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.16);
}

.reqc-refresh-btn {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.1);
}

.reqc-refresh-btn:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.18);
}

.reqc-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.reqc-section-tabs {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
}

.reqc-section-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    color: #94a3b8;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.reqc-section-tab.active {
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.16);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.reqc-section-tab .material-symbols-outlined {
    font-size: 17px;
}

.reqc-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(51, 65, 85, 0.38);
    border-radius: 8px;
}

.reqc-summary-item span {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reqc-summary-item strong {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 800;
}

.reqc-summary-danger {
    border-color: rgba(239, 68, 68, 0.24);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(15, 23, 42, 0.48));
}

.reqc-summary-danger strong {
    color: #f87171;
}

.reqc-summary-warn {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.48));
}

.reqc-summary-warn strong {
    color: #fbbf24;
}

.reqc-table-wrap {
    max-height: calc(100vh - 220px);
}

.reqc-table {
    min-width: 1120px;
}

.reqc-row:nth-child(4n + 1) .ho-td {
    background: rgba(30, 41, 59, 0.25);
}

.reqc-row:hover .ho-td {
    background: rgba(245, 158, 11, 0.06);
}

.reqc-material {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.reqc-code {
    width: fit-content;
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

.reqc-material strong {
    max-width: 320px;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reqc-material small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
}

.reqc-buy-cell strong {
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
}

.reqc-buy-cell span,
.reqc-value-negative span,
.reqc-value-neutral span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
}

.reqc-min-note {
    display: block;
    margin-top: 3px;
    color: #fcd34d;
    font-size: 0.62rem;
    font-weight: 700;
}

.reqc-value-negative {
    color: #f87171;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

.reqc-value-neutral {
    color: #60a5fa;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

.reqc-provider {
    display: grid;
    gap: 2px;
    max-width: 230px;
}

.reqc-provider strong {
    overflow: hidden;
    color: #d1fae5;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reqc-provider span {
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
}

.reqc-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.reqc-status-missing {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.reqc-status-low {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.reqc-plan-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.reqc-plan-tag {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.14);
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
}

.reqc-plan-more {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(96, 165, 250, 0.24);
}

.reqc-coverage {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

.reqc-coverage-negative {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.24);
}

.reqc-row-actions {
    display: inline-flex;
    justify-content: center;
    gap: 5px;
}

.reqc-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 7px;
    cursor: pointer;
}

.reqc-icon-btn:hover {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.18);
}

.reqc-icon-btn .material-symbols-outlined {
    font-size: 17px;
}

.reqc-detail-row > td {
    padding: 0;
    background: #111827;
    border-top: 1px solid rgba(245, 158, 11, 0.14);
}

.reqc-detail {
    padding: 12px 14px 14px;
}

.reqc-detail-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.reqc-detail-header span {
    padding: 3px 8px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

.reqc-detail table {
    width: 100%;
    border-collapse: collapse;
}

.reqc-detail th {
    padding: 8px 10px;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.62);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.reqc-detail td {
    padding: 9px 10px;
    color: #cbd5e1;
    border-top: 1px solid rgba(51, 65, 85, 0.58);
    font-size: 0.76rem;
}

.reqc-detail-product {
    display: grid;
    gap: 2px;
}

.reqc-detail-product strong {
    color: #e2e8f0;
    font-size: 0.76rem;
}

.reqc-detail-product span,
.reqc-mono {
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
}

.reqc-detail-num {
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    text-align: right;
}

.reqc-muted {
    color: #64748b;
}

.reqc-empty {
    padding: 34px 16px;
    color: #64748b;
    text-align: center;
}

.reqc-error {
    color: #fca5a5;
}

@media (max-width: 1100px) {
    .reqc-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .reqc-summary-strip {
        grid-template-columns: 1fr;
    }

    .reqc-filter,
    .reqc-section-tabs,
    #sub-produccion-requerimiento-compras .ho-search-input {
        width: 100%;
    }

    .reqc-section-tab {
        justify-content: center;
        flex: 1;
    }
}
