@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');
/* Variables de Color (de la paleta anterior) */
:root {
  --color-primary-blue: #A2D9D9;
  --color-secondary-green: #BEE3DB;
  --color-accent-dark-green: #3D857A;
  --color-background-light: #F4F8FB;
  --color-surface-white: #e9e9e9;
  --color-text-dark: #333333;
  --color-text-light: #7A7A7A;
  --color-border-subtle: #E0E0E0;
  --color-status-error: #F44336;
  --fuente-principal: 'Mulish', sans-serif;
  --color-negro: #000000;
  --color-blanco: #FFFFFF;
   --nav-height: 70px;
   --pistache:#92CCA4;
}
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: 
    border-box; 
    font-family: var(--fuente-principal) 
}


/* Estilos Generales y Fondo */
body {
    font-family:var(--fuente-principal);
    background-color: var(--color-background-light); /* Fondo suave */
    display: flex;
   flex-direction: column;
    min-height: 100vh; /* Ocupa toda la altura de la vista */
    margin: 0;
}
.separador {
    /* 1. Dimensiones y Adaptación */
    width: 80%;               /* Se adapta a cualquier espacio al 80% */
    max-width: 100%;          /* Garantiza que no se desborde nunca */
    height: 1px;              /* Grosor de la línea delgada */
    
    /* 2. Centrado Automático */
    margin: 25px auto;        /* Margen arriba/abajo y centrado horizontal */
    
    /* 3. Estilo Visual */
    border: none;             /* Quitamos el borde por defecto del navegador */
    background-color: #e5e7eb; /* Color gris suave (estilo Tailwind/Moderno) */
    
    /* 4. Limpieza de flujo */
    clear: both;              /* Evita que elementos flotantes se encimen */
    display: block;
}

/* Navbar */
.navbar {
 background: var(--pistache);
 height: var(--nav-height);
 display: flex;
 justify-content: center;
 align-items: center;
 position: sticky;
 top: 0;
 z-index: 999;
 flex-shrink: 0;
 box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-container {
 display: flex;
 justify-content: space-between;
 align-items: center;
 width: 100%;
 max-width: 1200px;
 padding: 0 25px;
}

.logo-image { 
    height: 4.5rem; 
}
/* Menú Desktop (Estilos aplicados a los LI y SPAN) */
/* --- Menú Desktop --- */
.nav-menu { 
    display: flex; 
    list-style: none; 
    align-items: center; 
    height: 100%; /* FUNDAMENTAL: Ocupa todo el alto de la barra */
}

.nav-item { 
    position: relative; 
    height: 100%; /* FUNDAMENTAL para no perder el hover */
    display: flex;
    align-items: center;
}

.nav-item[data-view], .submenu-toggle {
    color: var(--color-text-dark);
    padding: 0 1.2rem;
    height: 100%; /* Botón de altura completa */
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer; 
    user-select: none; 
}

.nav-item[data-view]:hover, .submenu-toggle:hover { 
    background: rgba(255,255,255,0.1); 
    color: var(--color-blanco); 
}

/* Submenús Verticales */
.submenu {
    display: none;
    position: absolute;
    top: 100%; /* Se pega exactamente debajo del nav-item */
    left: 0;
    background: var(--pistache);
    list-style: none;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.submenu li[data-view] {
    padding: 15px 20px;
    color: var(--color-text-dark);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.3s;
}

.submenu li[data-view]:last-child { 
    border-bottom: none; 
}
.submenu li[data-view]:hover { 
    background: rgba(0,0,0,0.2); 
    color: var(--color-blanco); 
}

/* En desktop mantenemos el hover */
.nav-item:hover .submenu { display: block; animation: slideIn 0.3s ease; }
@keyframes slideIn {
 from { opacity: 0; transform: translateY(10px); }
 to { opacity: 1; transform: translateY(0); }
}
.content-area {
    flex: 1;
    width: 100%;    
    position: relative;
    display: flex;
    background-color: #fff;
}


#main-frame {
    width: 100%;
    max-height: 90vh;
    border: none;
    opacity: 1;        
    justify-content: center;
    align-items: center;
    
    transition: opacity 0.3s ease-in-out;
}

#main-frame.is-loading { opacity: 0; }

/* tabla dinamica */
.tabla-dinamica {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Cabecera fija */
#deudas-container {
    height: 80vh;              /* 90% de la pantalla vertical */
    overflow-y: auto;          /* Scroll vertical */
    border: 1px solid #ddd;
    border-radius: 8px;
}


.tabla-dinamica thead th {
    position: sticky;
    top: 0;
    background: #ADF2C3;
    color: #597D64;
    font-size: 18px;
    padding: 12px;
    z-index: 2;
    text-align: start;
}

/* Filas */
.tabla-dinamica tbody td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* Filas impares */
.tabla-dinamica tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* Filas pares */
.tabla-dinamica tbody tr:nth-child(even) {
    background: #e9ecef;
}

/* Contenedor del Formulario */
.login-container {
    background-color: var(--color-surface-white); /* Fondo de la tarjeta */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 90%; /* Responsive: 90% del ancho en móviles */
    max-width: 400px; /* Ancho máximo para pantallas grandes */
    box-sizing: border-box;
    text-align: center;
     text-align: center; /* Asegura que el logo también se centre */
     justify-content: center; /* Centra el contenido verticalmente */
     align-items: center; /* Centra el contenido verticalmente */
     margin: 8rem auto; /* Centrado horizontal con margen superior */     
}
/* Estilos para el Logo */
.logo-container {
    margin-bottom: 25px; /* Espacio debajo del logo */
    display: flex; /* Para centrar la imagen */
    justify-content: center; /* Centrar horizontalmente */
}

.login-logo {
    max-width: 150px; /* Tamaño máximo del logo, ajústalo si es necesario */
    height: auto; /* Mantiene la proporción */
}
h2 {
    color: var(--color-accent-dark-green); /* Título con el color de acción */
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-primary-blue);
    padding-bottom: 10px;
}
.form-container {
    width: 100%;
    max-width: 420px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.form-group {
    margin-bottom: 18px;
    display: block;
    
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.form-group input {
    width: 90%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.25s ease;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 6px rgba(0,123,255,0.25);
}

.btn-guardar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-accent-dark-green), var(--color-background-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-guardar:hover {
    background: linear-gradient(135deg, var(--color-background-light), var(--color-accent-dark-green));
    transform: translateY(-2px);
}

.btn-guardar:active {
    transform: scale(0.97);
}


/* Grupo de Input */
.input-group {
    position: relative; /* Necesario para posicionar la etiqueta dentro */
    margin-bottom: 25px; /* Un poco más de espacio para la etiqueta flotante */
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-text-dark);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 12px 12px 6px 12px; /* Más espacio arriba para que el texto no choque con la etiqueta */
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px; /* Bordes un poco más redondeados (tendencia actual) */
    background-color: var(--color-surface-white);
    font-size: 16px; /* Evita que el iPhone haga zoom al escribir */
    color: var(--color-text-dark);
    font-family: 'Mulish', sans-serif;
    outline: none;
    
    /* La transición suave para el borde y la sombra */
    transition: all 0.3s ease-in-out;
}
/* Estilo Base de la Etiqueta (Label) */
.input-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%); /* Centrado vertical perfecto */
    color: var(--color-text-light);
    pointer-events: none; /* Permite hacer clic en el input "a través" del texto */
    font-weight: 500;
    transition: all 0.3s ease; /* Esta es la magia de la animación suave */
    transform-origin: left top; /* Para que se encoja hacia la esquina */
}

/* --- ESTADOS ACTIVOS Y ANIMACIÓN --- */

/* Cuando el input tiene el foco O cuando no está vacío (gracias al placeholder trick) */
input:focus,
input:not(:placeholder-shown) {
    border-color: var(--color-primary-blue);
    background-color: #FAFEFE; /* Un fondo mínimamente tintado de azul */
    
    /* Efecto Glow (Resplandor) Suave */
    box-shadow: 0 4px 12px rgba(162, 217, 217, 0.4); 
}

/* Mover la etiqueta arriba cuando el input tiene foco o texto */
input:focus + label,
input:not(:placeholder-shown) + label {
    top: 1px; /* Sube hacia arriba */
    transform: translateY(0) scale(0.75); /* Se hace más pequeña (75% del tamaño) */
    font-weight: 700;
    color: var(--color-accent-dark-green); /* Cambia al color de acento elegante */
}

input:focus {
    border-color: var(--color-primary-blue); /* Foco con el color azul pastel */
    outline: none;
}

/* Botón de Inicio de Sesión */
button {
    background-color: var(--color-accent-dark-green); /* Color de Acción/Accent */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: var(--color-primary-blue); /* Un tono un poco más oscuro al pasar el ratón */
}


/* 1. Ajuste del contenedor del grupo */
.grupo-radios {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}
.grupo-radios-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
    grid-template-rows: repeat(2, auto);    /* 2 filas automáticas */
    gap: 1.5rem;
    margin-top: 1rem;
}

/* 2. El Label: Forzamos la horizontalidad */
.form-group label.radio-moderno {
  display: flex !important; /* Usamos flex para control total */
  flex-direction: row;      /* Siempre en horizontal */
  flex-wrap: nowrap;        /* PROHIBIDO bajar a la siguiente línea */
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  margin-bottom: 0;
  font-weight: 400;
  transition: transform 0.2s ease; /* Pequeño feedback al tocar */
}

/* Efecto de escala al presionar (muy móvil-friendly) */
.radio-moderno:active {
  transform: scale(0.98);
}

/* 3. El Círculo: Evitamos que se aplaste */
.radio-personalizado {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0; /* CLAVE: El círculo nunca se deforma ni se achica */
  background: #fff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efecto elástico */
}

/* 4. Animación del punto central */
.radio-personalizado::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: white;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 5. Estado Seleccionado con Sombra de Pulso */
.radio-moderno input[type="radio"]:checked + .radio-personalizado {
  background-color: var(--color-accent-dark-green);
  border-color: var(--color-primary-blue);
  /* Animación de pulso compatible con móviles */
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); 
}

.radio-moderno input[type="radio"]:checked + .radio-personalizado::after {
  transform: translate(-50%, -50%) scale(1);
}

/* 6. El Texto: Controlamos el desborde */
.texto-etiqueta {
  font-size: 15px;
  color: #475569;
  line-height: 1.2;
  /* Si el texto es demasiado largo, se mantiene ordenado a la derecha */
  padding-left: 4px; 
}

/* Ocultar input nativo */
.radio-moderno input[type="radio"] {
  display: none;
}

/* Estilo para mensajes de error/éxito */

#avisos{    
    width: 100%;
    text-align: center;   
}
.alerta{        
    font-weight: bold;
    text-align: center;
    font-size: 1rem;
    padding: 1rem .5rem;
    border-radius: 1rem;
    margin: .5rem auto ;
    width: 90%;
}
.bg_red{
    background-color: red;
    text-shadow: 1px 1px 1px var(--color-negro);
    color: var(--color-blanco);
}
.bg_green{
    background-color: green;
    text-shadow: 1px 1px 1px var(--color-negro);
    color: var(--color-blanco);
}
.welcome-message {
    position: fixed;
    bottom: 20px;
    left: 20px;

    background: #ffffff;
    padding: 14px 20px;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 600;
    color: #333;

    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;

    max-width: 260px;
    line-height: 1.4;

    z-index: 9999;

    /* Animación suave */
    animation: fadeInUp 0.4s ease-out;
}

/* Forma de globo (punta) */
.welcome-message::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid #ffffff;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.btn-exit {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    background: linear-gradient(135deg, #ff4d4d, #d93636);
    color: #fff;
    border: none;
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;

    box-shadow: 0 6px 18px rgba(217, 54, 54, 0.35);
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    z-index: 9999;
}

.btn-exit:hover {
    background: linear-gradient(135deg, #ff5f5f, #c62828);
    box-shadow: 0 8px 22px rgba(217, 54, 54, 0.45);
    transform: translateY(-2px);
}

.btn-exit:active {
    transform: scale(0.95);
}
/* layout ventas */
.grid-pos {
  display: grid;
  /* Definimos 5 filas: auto, auto, la que sobra (1fr), y auto */
  grid-template-rows: auto auto auto 1fr auto;
  grid-template-columns: 1fr; /* Por defecto una columna (móvil) */
  height: calc(100vh - 90px); /* Ajustado a tu menú superior */
  
  width: 100%;
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
  scrollbar-gutter: stable; /* Evita que el scrollbar cambie el layout al aparecer */
}
.grid-full-input {
  grid-column: 1 / -1;
  background: white;
  padding: 8px 12px; /* Reducimos el padding vertical */
  border-radius: 10px;
  height: 45px;      /* Forzamos una altura pequeña y constante */
  display: flex;     /* Usamos flex para centrar el contenido internamente */
  align-items: center;
  box-sizing: border-box;
}

.input-container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 90%;      /* Que ocupe el alto del padre (45px) */
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 10px;
}

.input-pos-full {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;        /* Quitamos padding interno que infla el input */
  height: 100%;
  font-size: 16px;   /* Mínimo 16px para evitar zoom automático en iOS */
  outline: none;
}
/* Personalizar el campo de ingreso de pagos */
.fila-pago-horizontal {
    display: flex;
    align-items: center; /* Centrado vertical entre etiqueta e input */
    gap: 15px;           /* Espacio entre etiqueta e input */
    margin: 15px 0;
    width: 100%;
}

.etiqueta-horizontal {
    flex: 0 0 140px;     /* Ancho fijo para la etiqueta (ajusta según necesites) */
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    text-align: right;   /* Alineado a la derecha para que pegue al input */
}
.input-moneda-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 200px;
   
}

.simbolo {
    position: absolute;
    left: 12px;
    font-weight: bold;
    color: #64748b;
    pointer-events: none; /* Para que al hacer clic en el $ se active el input */
}

.input-pos-entero {
    width: 100%;
    padding: 10px 10px 10px 30px; /* Padding izquierdo extra para el $ */
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent-dark-green);
    outline: none;
    transition: all 0.2s ease;
    /* Quitar flechas */
    appearance: none;
    margin: 0;
    -moz-appearance: textfield;
}
/* personalizar el checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-family: 'Segoe UI', sans-serif;
    gap: 12px;
}

/* Ocultar el checkbox original */
.modern-checkbox input {
    display: none;
}

/* El cuadro personalizado */
.checkmark {
    position: relative;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 6px; /* Bordes redondeados modernos */
    transition: all 0.2s ease-in-out;
}

/* Efecto Hover */
.modern-checkbox:hover input ~ .checkmark {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

/* Estilo cuando está Marcado (Checked) */
.modern-checkbox input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Crear el símbolo de "visto" (L invertida rotada) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Mostrar el "visto" al marcar */
.modern-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Texto de la etiqueta */
.label-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

/* Ocultar flechas en Chrome/Safari */
.input-pos-entero::-webkit-outer-spin-button,
.input-pos-entero::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-pos-entero:focus {
    border-color: #3b82f6;
    background-color: #f8fafc;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Fila 1: Título */
.grid-header {
  grid-column: 1 / -1; /* Ocupa todo el ancho */  
  color: var(--color-text-dark);
  padding: 15px;
  border-radius: 8px;  
}

/* Fila 2: 3 Columnas */
.grid-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
  gap: 10px;
}

.tool-item {
  background: #f1f5f9;
  padding: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

/* Fila 3: Columna Única de Lista */
.grid-list {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow-y: auto; /* Scroll si la lista crece */
}


/* Fila 4: 2 Columnas */
.grid-footer {
  display: grid;
  grid-template-columns: 3fr 1fr; /* 2 columnas iguales */
  gap: 10px;
}

.footer-col {
  background: var(--color-secondary-green);
  color: white;
  padding: 2px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2rem;
}

/* Contenedor relativo para posicionar la flecha */
.select-wrapper {
    position: relative;
    width: 100%; 
    max-width: 400px;
    margin: auto;
}

/* Estilo del Select */
select {
    appearance: none;       /* Elimina el estilo nativo de Chrome/Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    width: 100%;
    padding: 12px 40px 12px 16px; /* Espacio extra a la derecha para la flecha */
    font-size: 16px; /* Evita el auto-zoom en iPhone (mínimo 16px) */
    color: #334155;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

/* Estados: Hover y Focus */
select:hover {
    border-color: #cbd5e1;
}

select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Flecha personalizada hecha con CSS puro */
.select-arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: #64748b;
    /* Dibujamos un triángulo moderno */
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    pointer-events: none; /* Permite hacer clic a través de la flecha */
    transition: transform 0.3s ease;
}

/* Rotación de flecha al abrir (solo funciona si el select tiene foco) */
.select-wrapper:focus-within .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    background-color: #6366f1;
}

/* Ajuste para móviles: Texto largo */
select option {
    padding: 10px;
    background-color: white;
}

.flash-success {
    animation: flash-green 0.4s ease-out;
}

@keyframes flash-green {
    0% { border-color: #6366f1; }
    50% { border-color: #10b981; background-color: #ecfdf5; }
    100% { border-color: #6366f1; }
}
/* POS table */
.pos-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    padding: 12px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.pos-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

/* Estilo del Precio Editable */
.precio-editable {
    display: block;
    background: #fdfdfd;
    border: 1px dashed #cbd5e1;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #059669; /* Verde esmeralda */
    cursor: text;
}

.precio-editable:focus {
    background: #fff;
    border: 1px solid #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Botón Eliminar */
.btn-eliminar {
    display: flex;
     justify-content: center;
     align-items: center;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 28px;
    height: 28px;    
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}

.btn-eliminar:hover {
    background: #dc2626;
    color: white;
}

.badge-codigo {
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
/* Modal */
/* El fondo oscuro y difuminado */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4); /* Azul muy oscuro casi transparente */
    backdrop-filter: blur(8px); /* MAGIA: Difumina lo que está detrás */
    -webkit-backdrop-filter: blur(8px); /* Para Safari */
    
    /* Centrado flexbox */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Asegura que esté por encima de todo */
    
    /* Animación de entrada suave */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Clase para ocultar el modal sin borrarlo del DOM */
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Evita clics cuando está invisible */
}

/* La caja blanca de diálogo */
.modal-box {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 30px 20px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Pequeño salto al aparecer */
    transform: translateY(0) scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-box {
    transform: translateY(20px) scale(0.95);
}

/* Estilos internos de la caja */
.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.icono-exito {
    font-size: 48px;
    color: #10b981; /* Verde esmeralda */
    margin-bottom: 15px;
}

.modal-header h2 { margin: 0 0 5px 0; color: #1e293b; font-size: 24px; }
.modal-header p { margin: 0; color: #64748b; font-size: 14px; }

/* El botón 'X' de cerrar */
.btn-cerrar {    
    background: var(--primary-blue);   
    color: var(--color-accent-dark-green);
    cursor: pointer;
    line-height: 1;
}

.btn-cerrar:hover { color: #ef4444; }

/* Contenedor de los 3 botones */
.modal-opciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botones de acción */
.btn-accion {
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

/* Colores personalizados para cada botón */
.btn-imprimir { background: #eff6ff; color: #3b82f6; }
.btn-imprimir:hover { background: #3b82f6; color: white; }

.btn-pdf { background: #fef2f2; color: #ef4444; }
.btn-pdf:hover { background: #ef4444; color: white; }

.btn-correo { background: transparent; color: #25d366; border: 1px solid #e2e8f0;}
.btn-correo:hover { background: #e2e8f0; }
.btn-enviar-confirmar {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-enviar-confirmar:hover {
    background: #4f46e5;
}
/* pantalla transparente para procesos largos */
/* Contenedor de Pantalla Completa (Overlay) */
.pago-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* Fondo blanco semi-transparente */
    backdrop-filter: blur(10px); /* EFECTO TENDENCIA: Desenfoque de fondo */
    -webkit-backdrop-filter: blur(10px); /* Soporte para Safari */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Asegura que esté por encima de TODO */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out; /* Animación de aparición suave */
}

/* Clase para mostrar el Loader (activada por JS) */
.pago-overlay.mostrar {
    opacity: 1;
    visibility: visible;
}

/* Contenido Central del Modal */
.pago-modal-content {
    background: #ffffff;
    padding: 40px 60px;
    border-radius: 24px; /* Bordes muy redondeados (moderno) */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1); /* Sombra suave y profunda */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* El Spinner Moderno (CSS Puro) */
.spinner-moderno {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0; /* Color de fondo del anillo */
    border-top: 5px solid #3b82f6; /* Color de la animación (Azul POS) */
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: girarSpinner 1s linear infinite; /* Animación continua */
}

/* Etiquetas de Texto */
.etiqueta-procesando {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.sub-etiqueta {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #64748b;
    margin: 8px 0 0 0;
}

/* Animación del Spinner */
@keyframes girarSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Clase auxiliar para ocultar inicialmente */
.oculto {
    display: none !important;
}


/* Para animar la aparición del formulario */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.show-form {
    display: block !important;
    animation: slideDown 0.3s ease forwards;
}

.input-group {
  position: relative;  
  margin-bottom: 25px;
  width: 100%;
}
.input-field {
  width: 100%;
  padding: 12px 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
  background: transparent;
}

/* Estilo de la etiqueta (el placeholder falso) */
.input-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none; /* Permite hacer clic a través del label */
  transition: all 0.3s ease;
  background-color: var(--color-surface-white); /* Para tapar la línea del borde al subir */
  padding: 0 4px;
}

/* --- LA MAGIA --- */

/* Cuando el input tiene el foco O cuando no está vacío */
.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
  top: -14px;
  font-size: 14px;
  color: #3b82f6; /* Color azul profesional */
  font-weight: bold;
  background-color: var(--white); /* Para tapar la línea del borde al subir */

}

/* Cambiar color de borde cuando está activo */
.input-field:focus {
  border-color: #3b82f6;
}

.texto{
    padding: .5rem;
    color: var(--color-accent-dark-green);
}
/* Card Cambio y consulta de precios */


.product-manager {
    max-width: 1000px; /* Ancho aumentado para acomodar 2 columnas */
    margin: 1rem auto;    
}

.section-title {
    color: var(--color-accent-dark-green);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Nuevo Layout de la Tarjeta */
.card-container {
    background: var(--color-surface-white);
    border-radius: 20px;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    border: 1px solid var(--color-border-subtle);
    
    /* Grid Layout */
    display: grid;
    grid-template-columns: 1.6fr 1fr; /* Formulario más ancho que imagen */
    gap: 3rem; /* Espacio entre columnas */
    align-items: start; /* Alinea contenido arriba */
}

/* --- ESTILOS COLUMNA FORMULARIO (Anteriores mejorados) --- */

.search-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed var(--color-border-subtle);
}

.search-group label { 
    font-weight: 700; 
    color: var(--color-text-dark); 
    min-width: 70px; 
}
.search-controls { 
    display: flex; 
    flex: 1; 
    gap: 10px; 
}
.search-controls input { 
    flex: 1; 
    padding: 11px 15px; 
    border: 2px solid var(--color-border-subtle); 
    border-radius: 8px; 
    font-size: 1rem; 
}
.btn-search { 
    background: var(--color-accent-dark-green); 
    color: white; 
    border: none; 
    padding: 11px 20px; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    width: 50%; 
}

.product-details { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
}

.read-only { 
    background: var(--color-surface-white); 
    border: 1px solid transparent; 
}
.read-only .label { 
    font-weight: 600; 
    color: var(--color-accent-dark-green); 
}
.read-only .value { 
    font-weight: 700; 
    color: var(--color-text-dark); 
}
.read-onlyhighlight { 
    border-left: 4px solid var(--color-accent-dark-green); 
}

.editable-field { 
    background: var(--color-surface-white); 
    border: 1px solid var(--color-border-subtle); 
}
.editable-field label { 
    font-weight: 700; 
    color: var(--color-accent-dark-green); 
    font-size: 0.95rem; 
}
.editable-field input { 
    width: 140px; 
    padding: 9px; 
    border: 1px solid var(--color-border-subtle); 
    border-radius: 6px; text-align: right; 
    font-weight: 700; 
    font-size: 1rem; 
    color: var(--color-accent-dark-green); 
}

.action-footer { 
    margin-top: 2.5rem; 
}
.btn-update { 
    width: 100%; 
    padding: 16px; 
    background: var(--color-accent-dark-green); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 1.1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: background 0.2s; 
}
.btn-update:hover { background: #047857; }

/* --- NUEVOS ESTILOS COLUMNA IMAGEN --- */


.image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: sticky; /* Se mantiene visible al hacer scroll si el form es largo */
    top: 20px;
}

.image-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.image-viewer-panel {
    width: 100%;
    max-width: 320px; /* Limita tamaño máximo */
    aspect-ratio: 1 / 1; /* Panel siempre cuadrado */
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Corta si la imagen se sale */
    padding: 15px;
}

.image-viewer-panel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Muestra la imagen completa dentro del panel sin deformar */
    border-radius: 8px;
}

.btn-change-image {
    background: white;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change-image:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 6px;
    white-space: nowrap; /* Evita que los botones se pongan uno abajo del otro */
    justify-content: flex-end;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-action:hover {
    transform: scale(1.1);
}

/* Colores suaves (Soft UI) */
.btn-dinero  { background: #e0f2fe; color: #0369a1; }
.btn-add   { background: #fef3c7; color: #92400e; }
.btn-rem  { background: #dcfce7; color: #166534; }
.btn-delete { background: #fee2e2; color: #991b1b; }

/* --- RESPONSIVE PARA MÓVILES (Crucial) --- */

@media (max-width: 850px) {
    .card-container {
        grid-template-columns: 1fr; /* Pasa a una sola columna */
        gap: 2.5rem;
        padding: 1.5rem;
    }

    .image-column {
        position: static;        
        border-bottom: 2px dashed var(--border);
        padding-bottom: 2rem;
    }

    .search-group { flex-direction: column; align-items: flex-start; }
    .search-controls { width: 100%; }
    .detail-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .editable-field input { width: 100%; box-sizing: border-box; }
}

.image-loader-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Ajusta según tu diseño */
    aspect-ratio: 1 / 1;
    background-color: #f8fafc; /* Color pastel de fondo */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Capa del Spinner */
.spinner-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6; /* Azul moderno */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo para la imagen cargada */
#product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}


.image-display-container {
    /* Define explicit, unchanging dimensions */
    width: 350px;             /* Fills its grid column */
    height: 350px;           /* DEFINES THE FIXED HEIGHT */
    
    /* Aesthetics matching the panel in the image */
    background-color: var(--color-surface-white); /* Light pastel background used as filler space */
    border: 2px solid var(--color-primary-blue);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    
    /* Centering Mechanics */
    display: flex;
    justify-content: center; /* Centers horizontally in potential empty space */
    align-items: center;     /* Centers vertically in potential empty space */
    overflow: hidden;        /* Prevents anything from spilling out, just in case */
}

/* 3. THE MAGIC IMAGE BEHAVIOR */
#product-img {
    /* Step 1: Tell image to occupy full space of its parent */
    width: 100%;
    height: 100%;

    /* Step 2: The Magic - prevents stretching, maintains aspect ratio, fits inside */
    object-fit:contain; /* Ensures the entire image fits within the container without distortion */

    /* Optional: Fine-tune centering if needed */
    object-position: center center;
}

/* Modal para preguntar si continua con el proceso */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px); /* Tendencia Glassmorphism */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.show { opacity: 1; }

.confirm-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.confirm-overlay.show .confirm-card { transform: translateY(0); }

.confirm-icon {
    font-size: 50px;
    color: #ffb0b0; /* Rojo pastel */
    margin-bottom: 15px;
}

#confirm-title { margin: 0; color: #1e293b; font-size: 1.4rem; }
#confirm-message { color: #64748b; margin: 15px 0 25px; line-height: 1.5; }

.confirm-buttons { display: flex; gap: 10px; }

.confirm-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel { background: #f1f5f9; color: #64748b; }
.btn-cancel:hover { background: #e2e8f0; }

.btn-ok { background: #3b82f6; color: white; } /* Azul profesional */
.btn-ok:hover { background: #2563eb; transform: scale(1.02); }

.hidden { display: none; }

/* Privacidad */
/* Clase para el precio sensible */
.precio-privado {
    filter: blur(6px); /* Intensidad del desenfoque */
    transition: filter 0.3s ease, color 0.3s ease;
    cursor: pointer;
    user-select: none; /* Evita que se seleccione el texto mientras está oculto */
    display: inline-block;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Efecto al pasar el mouse (Hover) */
.precio-privado:hover {
    filter: blur(0);
    user-select: auto; /* Permite seleccionar una vez visible */
    background-color: #f0fdf4; /* Un toque verde pastel muy sutil al revelar */
}
/* para movil */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
        margin: 4rem auto;
    }
    .btn-exit {
        width: auto;
        padding: 16px 28px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
        border-radius: 14px;
    }
   .welcome-message {
        top: 5px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);

        padding: 12px 18px;
        font-size: 15px;
        max-width: 220px;
        text-align: center;
    }

    .welcome-message::after {
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
    }
    .tabla-dinamica  {
        font-size: .65rem;
        padding: 10px;
        height: 55vh;
    }   
    .nav-menu {
        position: absolute;
        top: var(--nav-height);
        left: -100%;
        flex-direction: column;
        background: var(--color-primary-blue);
        width: 100%;
        height: auto;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: 20px;
    }

    .nav-menu.active { left: 0; }
    
    .nav-item { height: auto; flex-direction: column; width: 100%;}
    .nav-item[data-view], .submenu-toggle { padding: 15px; width: 100%; justify-content: center; }
    
    .submenu { position: relative; top: 0; background: var(--color-secondary-green); box-shadow: none; width: 100%;}
    .submenu li[data-view] { padding: 15px; background: rgba(0,0,0,0.1); }
    
    /* Quitamos el hover en móvil para evitar bugs táctiles */
    .nav-item:hover .submenu { display: none; } 
    
    /* Esta clase la añadiremos con JavaScript al tocar "Servicios" */
    .has-submenu.open .submenu { display: block; }
 /* Hamburguesa Animada a X */
    .menu-toggle { 
        cursor: pointer; 
        display: block; 
        z-index: 1000;}
 .bar {
    display: block; 
    width: 28px; 
    height: 3px; 
    margin: 6px auto;
    transition: all 0.4s ease-in-out; 
    background: var(--color-blanco); 
    border-radius: 2px;
    }
 #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
 #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; transform: translateX(-20px); }
 #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
 /* layout ventas */
 /* En móviles, convertimos las filas de columnas en una sola fila vertical */
  .grid-tools, .grid-footer {
    grid-template-columns: 1fr;
  }
  
  .grid-pos {
    /* Permitimos que el contenido crezca si es necesario en móviles */
    grid-template-rows: auto auto auto 400px auto; 
    height: auto;
    overflow-y: visible;
  }
  #main-frame {
    max-height: 75vh; /* Limitamos la altura del iframe en móviles */
  }
}



.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px); /* Efecto de cristal esmerilado */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Siempre por encima de todo */
    transition: opacity 0.3s ease;
}

.loader-content {
    text-align: center;
    background: white;
    padding: 30px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* El Anillo del Spinner */
.spinner-ring {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #3b82f6; /* Azul profesional */
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader {
    to { transform: rotate(360deg); }
}

#loader-text {
    color: #1e293b;
    font-weight: 600;
    margin: 0;
    font-family: sans-serif;
}

/* Utilidad para ocultar */
.hidden {
    display: none !important;
    opacity: 0;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.modal-body { padding: 20px 0; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding-top: 15px; }

/* Botones dentro del modal */
.btn-primary { background: #3b82f6; color: white; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; }
.btn-secondary { background: #e2e8f0; color: #475569; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; }
.hidden { display: none !important; }
.table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table-mini th {
    text-align: left;
    padding: 10px;
    background: #f8fafc;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

.table-mini td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* Botón de quitar pago redondo y sutil */
.btn-del-pago {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-del-pago:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg); /* Efecto visual moderno */
}
.btn-close {
    padding: 14px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
     width: 28px;
    height: 28px;
    
}
.search-box {
    position: relative;
    margin-bottom: 20px;
}

#buscar-prenda {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    outline: none;
    transition: border-color 0.3s;
}

#buscar-prenda:focus {
    border-color: #3b82f6;
}

.resultados-flotantes {
    position: absolute;
    top: 50px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
}

.item-resultado {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
}

.item-resultado:hover {
    background-color: #f1f5f9;
}

/* Estilo para los badges de cantidad dentro del modal */
.qty-badge {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: bold;
}
/* Contenedor que limita la altura de la lista de prendas */
.table-scroll-container {
    max-height: 350px; /* Altura máxima antes de activar el scroll */
    overflow-y: auto;  /* Scroll vertical automático */
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    margin-top: 10px;
}

/* Estilo para que el encabezado se quede arriba (Sticky Header) */
.table-mini thead th {
    position: sticky;
    top: 0;
    background-color: #f8fafc; /* Fondo para que no se trasluzca el texto al scrollear */
    z-index: 10;
    box-shadow: inset 0 -1px 0 #e2e8f0; /* Línea divisoria fija */
}

/* Personalización del scrollbar (estilo moderno/fino) */
.table-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dropdown-results {
    position: absolute;
    width: 450px;
    /* Altura máxima para mostrar unos 4 o 5 resultados a la vez */
    max-height: 220px; 
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 110; /* Un poco más alto para que flote sobre todo */
    overflow-y: auto; /* Activa el scroll vertical */
    margin-top: 5px;
    animation: fadeIn 0.2s ease-out;
    padding: 10px;
}

/* Scrollbar personalizado para la búsqueda */
.dropdown-results::-webkit-scrollbar {
    width: 5px;
}

.dropdown-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Animación de entrada sutil */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Botón de eliminar prenda dentro de la tabla del modal */
.btn-del-item {
    background-color: #fee2e2; /* Rojo muy claro */
    color: #ef4444;           /* Rojo intenso */
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-del-item:hover {
    background-color: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Ajuste para que la columna de acciones no ocupe demasiado espacio */
.table-mini td.text-center {
    width: 50px;
}

/* Estilo del enlace en la tabla */
.nota-link {
    color: var(--color-accent-dark-green);
    font-weight: 700;
    cursor: pointer;       
}

/* Fila de botones PDF y WhatsApp */
.acciones-documento {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-doc {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.btn-doc:hover { transform: translateY(-2px); }
.btn-doc.pdf { background: #fee2e2; color: #dc2626; } /* Rojo */
.btn-doc.wsp { background: #dcfce7; color: #16a34a; } /* Verde */

/* Contenedor de tabla con scroll */
.table-scroll-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
}

/* Estilo de la tabla interna */
.table-mini { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table-mini thead th { position: sticky; top: 0; background: #f8fafc; padding: 10px; z-index: 5; }
.table-mini td { padding: 10px; border-bottom: 1px solid #f1f5f9; }

/* Botón de eliminar (X) */
.btn-del-item {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    width: 25px; height: 25px;
    border-radius: 50%;
    cursor: pointer;
}
.btn-del-item:hover { background: #ef4444; color: white; }
.custom-file-upload {
    display: block;
    padding: 15px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
}

.custom-file-upload:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.custom-file-upload input[type="file"] {
    display: none;
}

.image-preview-box img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border-radius: 10px;
    margin-top: 15px;
    border: 2px solid #e2e8f0;
}
/* CheckBox */
/* 1. Ajuste al contenedor para evitar desbordamiento */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 90%; /* Alineado con tus otros inputs */
    margin: 0; 
    padding: 5px 0;
    box-sizing: border-box; /* Fundamental para evitar scroll */
}

/* 2. Ocultar el checkbox real */
.checkbox-container input[type="checkbox"] {
    display: none;
}

/* 3. El cuadro personalizado (Sobrescribimos el display:block general) */
.checkbox-container .checkmark {
    display: inline-block !important; /* Forza a que no sea block */
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    position: relative;
    cursor: pointer;
    flex-shrink: 0; /* Evita que se aplaste si el texto es largo */
    margin-bottom: 0 !important; /* Quita el margen inferior de tu label general */
    transition: all 0.2s ease;
}

/* 4. Estilo del texto (Sobrescribimos el display:block general) */
.checkbox-container .checkbox-label {
    display: inline-block !important;
    cursor: pointer;
    font-weight: 500 !important; /* Un poco menos pesado que el 600 general */
    margin-bottom: 0 !important;
    color: #444;
    line-height: 1.2;
    white-space: normal; /* Permite saltos de línea si el texto es muy largo */
}

/* --- Lógica de Interacción --- */

/* Hover */
.checkbox-container:hover .checkmark {
    border-color: #3b82f6;
}

/* Cuando está marcado */
.checkbox-container input:checked + .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* La palomita (check) */
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked + .checkmark::after {
    display: block;
}

/* imagen de codigo */
.img_codigo {
    margin-top: 20px;
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center;
}
.img_codigo img {   
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

/* slider */
.swiper{
    width: 100%;    
}
.swiper-slide{
   background-position: center;
   background-size: cover;
   width: 800px;
   margin: 15px auto;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
}
.swiper-slide p {
    position: absolute;
    bottom: 45px;
    left: 15px;
    color: var(--color-surface-dark);
    font-size: 25px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 10;
}
.swiper-pagination-bullets {
    margin-top: 10px;    
    opacity: 0.7;
}

.swiper-button-next, .swiper-button-prev {
    color: #3b82f6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}
/* drop zone */
.drop-zone {
    border: 2px dashed #3b82f6;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.drop-zone.drag-over {
    background: #eff6ff;
    border-color: #2563eb;
}

.drop-zone p {
    font-size: 14px;
    color: #64748b;
}

.drop-zone span {
    color: #3b82f6;
    font-weight: 600;
}