/* ========================================
   PALETA DE COLORES PROFESIONAL
   ======================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding-bottom: 80px; 
}

@media (min-width: 768px) {
    body { padding-bottom: 2rem; }
}

/* === COMPONENTES GENERALES === */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.btn-primary-modern {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.table-dark { --bs-table-bg: transparent; --bs-table-border-color: var(--border-color); }

/* Fix inputs búsqueda (Ocultar X nativa) */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }

/* ========================================
   VISTA DE STOCK (INVENTARIO)
   ======================================== */

/* Buscador Flotante (Sticky) */
.sticky-search-container {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--bg-dark);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- FIX DE ALINEACIÓN EN BOTONES --- */
/* Esto asegura que el icono y el texto estén perfectamente centrados en PC y Móvil */
.mobile-actions-wrapper .btn {
    display: inline-flex;    /* Usar flexbox dentro del botón */
    align-items: center;     /* Centrado vertical perfecto */
    justify-content: center; /* Centrado horizontal */
}

/* Tarjeta de Producto */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover { 
    border-color: var(--primary-light); 
}

.product-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-body {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    flex-grow: 1;
}

.price-box {
    text-align: center;
    padding: 0.5rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
}
.price-label { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); display: block; }
.price-value { font-weight: 800; font-size: 1.1rem; color: #fff; }

.product-footer {
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.action-btn-group { display: flex; gap: 0.5rem; }
.action-btn-group .btn { flex: 1; }

/* Modal Reporte */
.report-summary-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}
.report-summary-value { font-size: 1.4rem; font-weight: bold; }
.report-summary-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }


/* ========================================
   RESPONSIVE: ESTILOS ESPECÍFICOS MÓVIL (< 768px)
   ======================================== */
@media (max-width: 768px) {
    .container { padding-left: 10px; padding-right: 10px; }
    
    /* Ajuste de botones en móvil */
    .mobile-actions-wrapper .btn {
        padding: 0.7rem; /* Más grandes para el dedo */
        font-size: 1rem;
    }
    
    /* El botón "Nuevo" ocupa ancho completo en la primera fila en móvil */
    .mobile-actions-wrapper .btn:first-child {
        grid-column: span 2;
    }

    /* Buscador más alto en móvil */
    .sticky-search-container .form-control { height: 50px; font-size: 1.1rem; }
    .sticky-search-container .btn { width: 50px; }

    .modal-dialog { margin: 0.5rem; }
}