/* css/stock-disponible.css - Stock Disponible Module */

/* ===== PANEL GLOBAL DE STOCK ===== */
.stock-panel-global {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #10b981;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.stock-panel-global .panel-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d1fae5;
}

.stock-panel-global .panel-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    color: #065f46;
}

.stock-panel-global .panel-header small {
    color: #047857;
}

.stock-global-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.stock-global-item {
    background: white;
    border: 2px solid #d1fae5;
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.stock-global-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #10b981;
}

.stock-global-item.sin-stock {
    background: #fef2f2;
    border-color: #fecaca;
}

.stock-global-item.sin-stock .stock-num {
    color: #991b1b;
}

.stock-global-item h5 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.stock-global-item .stock-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: #065f46;
    font-family: 'SF Mono', Monaco, monospace;
    line-height: 1;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.stock-global-item small {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}

.stock-panel-global .empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* ===== LISTA DE PRODUCCIONES ===== */
.stock-producciones-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stock-producciones-lista h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    color: var(--text);
}

.stock-produccion-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stock-produccion-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border);
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    gap: 16px;
    flex-wrap: wrap;
}

.stock-card-header h4 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    color: var(--text);
}

.stock-card-header small {
    color: var(--text-muted);
}

.stock-progreso {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 220px;
}

.stock-progreso span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.stock-progreso-bar {
    width: 220px;
    height: 10px;
    background: var(--gray-100);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.stock-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* ===== TABLA DE PRODUCTOS POR PRODUCCION ===== */
.stock-productos-tabla {
    overflow-x: auto;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.stock-productos-tabla table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.stock-productos-tabla thead {
    background: var(--gray-50);
}

.stock-productos-tabla th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--text);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.stock-productos-tabla td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.stock-productos-tabla tbody tr:hover {
    background: var(--gray-50);
}

.stock-productos-tabla tbody tr:last-child td {
    border-bottom: none;
}

.stock-productos-tabla td.stock-ok {
    color: #065f46;
    font-weight: 700;
}

.stock-productos-tabla td.stock-cero {
    color: var(--text-muted);
    font-weight: 700;
}

.stock-productos-tabla td.stock-pendiente {
    color: #d97706;
    font-weight: 600;
}

.stock-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stock-card-actions button {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* ===== MODAL REGISTRAR BATCH ===== */
.batch-productos-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    max-height: 45vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    background: var(--gray-50);
}

.batch-producto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    gap: 12px;
}

.batch-producto-info {
    flex: 1;
}

.batch-producto-info strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
}

.batch-producto-info small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.batch-producto-row input[type="number"] {
    border: 2px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    font-family: 'SF Mono', Monaco, monospace;
}

.batch-producto-row input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .stock-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stock-progreso {
        width: 100%;
        align-items: flex-start;
    }
    .stock-progreso-bar {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .stock-global-item .stock-num {
        font-size: 1.8rem;
    }
    .batch-producto-row {
        flex-direction: column;
        align-items: stretch;
    }
    .batch-producto-row input[type="number"] {
        width: 100% !important;
    }
}
