/* bodega/static/bodega/css/custom.css - TEMA CLARO ÚNICO */

/* --- Colores y Fuentes --- */
:root {
    --rmc-azul-oscuro: #1d437a;
    --rmc-rojo: #ed1c24;
    --rmc-gris-claro: #f8f9fa;
    --rmc-borde: #dee2e6;
    --rmc-dark-text: #212529;
}

body {
    font-size: 0.9rem;
    background-color: #00000013;
    font-family: 'Roboto', sans-serif;
    color:#004991;
    padding-top: 65px;
}

h1 {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

/* --- Componentes --- */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    border-radius: .5rem;
}
.card-header {
    background: #043d88;
    border-bottom: 1px solid var(--rmc-borde);
    font-weight: 600;
    color:#f8f9fa
}
.table thead th {
    border-bottom: 1px solid var(--rmc-borde);
    font-weight: 600;
}
.table td, .table th { vertical-align: middle; }

/* --- Layout y Navbar --- */

.rmc-navbar {
    background-color: #ffffff;
    color: #000000; /* Texto negro */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* Sombra suave */
    padding: 0.75rem 1.5rem; /* Espaciado interno */
    font-size: 1rem;
    font-weight: 500;
}



.dropdown-item i {
    width: 25px;
}



.navbar-brand .navbar-logo {
    height: 40px;
    width: auto;
    vertical-align: middle;
}


/* ====================================================================== */
/* === ESTILOS DE TEXTO PARA LA BARRA DE NAVEGACIÓN (Navbar)         === */
/* ====================================================================== */

/* 1. Color para TODOS los enlaces del menú y el texto del usuario */


.rmc-navbar .navbar-nav .nav-link,
.rmc-navbar .dropdown-toggle {
    color: #000000; /* Negro */
    font-weight: 500;
    position: relative;
    padding-bottom: 8px;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}



/* 2. (Opcional) Color del texto al pasar el mouse por encima */


/* Hover con fondo gris claro */
.rmc-navbar .navbar-nav .nav-link:hover,
.rmc-navbar .dropdown-toggle:hover {
    color: #555555;
    background-color: #f0f0f0;
    border-radius: 4px;
}




/* Enlace activo */
.rmc-navbar .navbar-nav .nav-link.active {
    color: #000000 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}




/* === ANIMACIÓN FUTURISTA NAVBAR === */
.rmc-navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #1d437a, #004991); /* degradado azul marino */
    transition: width 0.4s ease;
}



/* Esta es la regla clave: aplica la línea roja al pasar el mouse, al estar activo, o al abrir un dropdown */
.rmc-navbar .navbar-nav > .nav-item > .nav-link:hover::after,
.rmc-navbar .navbar-nav > .nav-item > .nav-link.active::after,
.rmc-navbar .navbar-nav > .nav-item > .nav-link.show::after {
    transform: scaleX(1);
    transform-origin: bottom left;
    transition: none;
}



/* ====================================================================== */
/* === CORRECCIONES PARA PLUGINS (Select2, etc.)                    === */
/* ====================================================================== */

.input-group > .select2-container--bootstrap-5 {
    flex: 1 1 auto;
    width: 1% !important;
}
.input-group > .select2-container--bootstrap-5 .select2-selection {
    height: 100%;
}
.input-group .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.input-group .select2-container--bootstrap-5.select2-container--open .select2-selection,
.input-group .select2-container--bootstrap-5 .select2-selection {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ====================================================================== */
/* === EFECTOS DE INTERFAZ Y MEJORAS DE UX                          === */
/* ====================================================================== */

.card:hover, .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Botón "Volver Arriba" */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: var(--rmc-rojo);
    width: 40px;
    height: 40px;
    border-radius: 50px;
    transition: all 0.4s;
}
.back-to-top i { font-size: 28px; color: #fff; line-height: 0; }
.back-to-top:hover { background: #c91a21; }
.back-to-top.active { visibility: visible; opacity: 1; }

/* Notificaciones */
#notifications-dropdown .notification-item {
    white-space: normal;
    word-wrap: break-word;
    padding-top: 10px;
    padding-bottom: 15px;
    line-height: 1.4;
}

/* Animación de feedback visual */
.flash-success {
    animation: flash-green 1.5s ease-out;
}
@keyframes flash-green {
    0% { background-color: #d1e7dd; }
    100% { background-color: transparent; }
}
/*===================================================================
/* --- Estilos para la Página de Login --- */
/*===================================================================*/

.login-background {
    background-image: url('../img/Fondo2.png');
    background-size: cover; /* Cubre todo el espacio */
    background-position: center center; /* Centra la imagen */
    background-repeat: no-repeat;
    background-attachment: fixed; /* Mantiene la imagen fija al hacer scroll */
}

/* Ocultamos la navbar y el main padding solo en la página de login */
.login-background .rmc-navbar-light {
    display: none;
}
.login-background main.container-fluid {
    padding-top: 0 !important;
}

/* Estilo para la tarjeta de login semitransparente */
.login-card {
    background-color: rgba(255, 255, 255, 0.9); /* Fondo blanco con 90% de opacidad */
    backdrop-filter: blur(5px); /* Efecto de desenfoque del fondo (opcional) */
    -webkit-backdrop-filter: blur(5px); /* Para compatibilidad */
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Para que los campos del formulario se vean bien en el login */
.login-card .form-control {
    background-color: #fff;
}

/* Estilo para filas de tabla clicables */
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background-color: #f1f1f1;
}

/* ====================================================================== */
/* === ESTILOS CENTRALIZADOS (Añadidos ahora)                       === */
/* ====================================================================== */

/* Animación de feedback visual */
.flash-success {
    animation: flash-green 1.5s ease-out;
}
@keyframes flash-green {
    0% { background-color: #d1e7dd; }
    100% { background-color: transparent; }
}

/* Estilos para la etiqueta QR */
.etiqueta-qr {
    width: 400px;
    padding: 20px;
    border: 2px solid #333;
    margin: 20px auto;
    text-align: center;
    background-color: #fff;
}
.etiqueta-qr h2 { margin-top: 0; }
.etiqueta-qr p { font-size: 1.2em; font-weight: bold; margin: 10px 0; }
.etiqueta-qr img { width: 80%; height: auto; margin-top: 15px; }

/* --- Estilos solo para la impresión --- */
@media print {
    /* Oculta todo lo que no sea el contenido principal */
    body > .d-flex > .sidebar,
    body > .d-flex > .main-content > .container-fluid > :not(.printable-area) {
        display: none !important;
    }
    /* Expande el área de contenido principal para que ocupe todo */
    .main-content {
        width: 100% !important;
        padding: 0 !important;
    }
    .printable-area {
        margin: 0;
    }
}
/* =================================================
   --- Estilos para la Lista Híbrida (lista_stock.html) ---
   =================================================
*/
.list-group-item {
    display: flex;
    flex-wrap: wrap; /* Permite que se apile en pantallas pequeñas */
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
}
.product-info {
    flex-basis: 35%;
    min-width: 200px;
}
.product-location {
    flex-basis: 15%;
    min-width: 120px;
    font-size: 0.9rem;
    color: #6c757d;
}
.product-stock {
    flex-basis: 15%;
    min-width: 100px;
    text-align: center;
}
.product-actions {
    flex-basis: 25%;
    min-width: 200px;
    text-align: end;
}
.product-info h6 {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--rmc-azul-oscuro, #043d88);
}

/* Esta clase manejará el truncado del nombre del producto */
.product-name-truncate {
    white-space: nowrap;      /* 1. Evita que el texto salte a la siguiente línea */
    overflow: hidden;         /* 2. Oculta el texto que se desborda */
    text-overflow: ellipsis;  /* 3. Añade los "..." al final */
    max-width: 100%;          /* 4. Asegura que respete el ancho de su contenedor (.product-info) */
    display: block;           /* 5. Asegura que se comporte como un bloque */
}

.product-info .text-muted {
    font-size: 0.85rem;
}
.product-stock .stock-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
}
.product-stock .stock-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
}
.list-group-item-warning { background-color: #fff9e6; }
.list-group-item-danger { background-color: #fdeeee; }

.list-group-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}