/* ═══════════════════════════════════════════════════════════════════
   site.css  –  Happy House Monitor de Precios
   Mantiene todo lo anterior + tokens visuales globales
   ═══════════════════════════════════════════════════════════════════ */

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

.btn:focus, .btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html { position: relative; min-height: 100%; }
body { margin-bottom: 60px; }

/* ── Popups (sin cambios) ───────────────────────────────────────── */
.popup {
    position: fixed; z-index: 1; padding-top: 100px;
    left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    display: none;
}

.popup-contenido {
    position: relative;
    background-color: #fefefe;
    margin: auto; padding: 20px;
    border: 1px solid #888; width: 80%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.19);
    animation: animatetop 0.4s;
}

@keyframes animatetop {
    from { top: -300px; opacity: 0; }
    to   { top: 0;      opacity: 1; }
}

.cerrar {
    color: #aaa; float: right; font-size: 28px; font-weight: bold;
    position: relative; top: -25px; left: 10px; cursor: pointer;
}
.cerrar:hover, .cerrar:focus { color: black; text-decoration: none; }

/* ── Spinner ────────────────────────────────────────────────────── */
.spin { animation: spin 1s linear infinite; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
   MEJORAS GLOBALES DE DISEÑO
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fondo de página ────────────────────────────────────────────── */
body { background-color: #f4f5f7; }

/* ── Tablas Bootstrap: filas con hover suave ────────────────────── */
.table > tbody > tr {
    transition: background-color 0.1s;
}
.table > tbody > tr:hover {
    background-color: #f8fafc !important;
}

/* ── Grillas existentes (Publicaciones, Productos, Lotes) ───────── */

/* Header de grilla mejorado */
.cabecera,
div.row.cabecera {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-top: none !important;
    border-bottom: 2px solid #334155 !important;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    letter-spacing: 0.03em;
}

/* Filas de grilla con separador más sutil */
.divTableRow {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.1s;
}
.divTableRow:hover { background-color: #f8fafc; }

/* ── Badges de porcentaje más redondeados ───────────────────────── */
.badge {
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Colores semánticos alineados con el nuevo sistema */
.bg-danger  { background-color: #dc2626 !important; }
.bg-warning { background-color: #d97706 !important; color: #fff !important; }
.bg-success { background-color: #16a34a !important; }
.bg-info    { background-color: #2563eb !important; }

/* ── Cards de Bootstrap ─────────────────────────────────────────── */
.card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    transition: box-shadow 0.15s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

/* ── Botones más modernos ───────────────────────────────────────── */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background-color: #1e293b; border-color: #1e293b; }
.btn-primary:hover { background-color: #334155; border-color: #334155; }

.btn-outline-dark {
    border-color: #d1d5db;
    color: #374151;
}
.btn-outline-dark:hover {
    background-color: #f3f4f6;
    color: #111827;
    border-color: #9ca3af;
}

/* ── Inputs de búsqueda ─────────────────────────────────────────── */
.form-control {
    border-radius: 8px;
    border-color: #e5e7eb;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ── Selects ────────────────────────────────────────────────────── */
select.form-select, select {
    border-radius: 8px;
    border-color: #e5e7eb;
    font-size: 13px;
}

/* ── Barra de estado inferior (Publicaciones / Productos) ───────── */
div[style*="position: fixed"][style*="bottom"] {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-top: 1px solid #334155 !important;
    border-bottom: none !important;
}

/* ── Scrollbar sutil (Webkit) ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Ajuste padding global con nueva navbar de 68px ────────────── */
body { padding-top: 68px !important; }

/* ── Página de Login (sin cambios de fondo) ─────────────────────── */
.bgAuto {
    background-color: #EDEDED;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    min-width: 100vw;
}

.card-header.bg-primary {
    background-color: #c01a2e !important;
    color: white !important;
    font-weight: bold !important;
    min-width: 300px;
    border-radius: 10px 10px 0 0 !important;
}

.btn.btn-primary.login-btn {
    background-color: #c01a2e;
    border-color: #c01a2e;
    color: white;
    font-weight: bold;
}
