/* === Estilos globales === */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(120deg, #ffe066, #ff6b6b);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-attachment: fixed;
}

/* Contenedor principal */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

/* Tarjetas */
.card {
    background: #fff3f3;
    border-radius: 15px;
    padding: 10px 15px 15px 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Cabecera */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ff6b81;
    color: #fff;
    padding: 10px 15px;
    border-radius: 0 0 10px 10px;
}
.header .logo {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.header .logout a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Caja festero */
.festero-box {
    margin-top: 15px;
    margin-bottom: 15px;
    background: #fff3f3;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.festero-title {
    font-size: 12px;
    letter-spacing: 2px;
    color: #ff3b59;
    font-weight: bold;
}
.festero-name {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
    color: #333;
    word-wrap: break-word;
}

/* Títulos de cada tarjeta */
h3 {
    margin: 5px 0 10px 0;
    color: #ff4757;
}

h4 {
    margin: 15px 0 10px 0;
    color: #ff4757;
}

/* Inputs y selects */
input, select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

/* Select mejorado */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 35px 10px 12px;
  border: 1px solid #ff6b81;
  border-radius: 8px;
  background-color: #fff3f3;
  color: #333;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ff6b81' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select:focus {
  outline: none;
  border-color: #ff4757;
  box-shadow: 0 0 5px rgba(255, 107, 129, 0.5);
}
select option[disabled]{color:#999;}

/* Botones */
button{
    background: #ff6b81;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
button:hover{background:#ff4757;}

/* Textareas (alineados con inputs/select) */
textarea{
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  font-size: 1em;
  min-height: 60px;
  margin-top: 4px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

/* 🔧 Ajuste del campo dirección fiscal */
textarea[name="direccion_fiscal"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 70px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* 🔧 Asegurar salto correcto después del textarea */
textarea[name="direccion_fiscal"] + label {
  display: block;
  margin-top: 10px;
}

/* 🔧 Tamaño más pequeño del texto placeholder */
input::placeholder,
textarea::placeholder {
  font-size: 0.9em;
  color: #777;
}

/* Ajustes móviles */
@media(max-width:600px){
  button{font-size:14px;padding:10px 14px;}
  input, textarea{font-size:18px;}

  /* 🔧 Corrección extra para móviles */
  textarea[name="direccion_fiscal"] {
    width: 100%;
    min-height: 80px;
    font-size: 16px;
  }

  input::placeholder,
  textarea::placeholder {
    font-size: 0.85em;
  }
}

/* === Tablas estilizadas === */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  border: 1px solid #ff6b81;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

th {
  background: linear-gradient(120deg, #ff6b81, #ff4757);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.95em;
}

td {
  padding: 9px 8px;
  text-align: center;
  border-top: 1px solid #ffd6d6;
  font-size: 0.93em;
  color: #333;
}

tr:nth-child(even) td {
  background: #fff9f9;
}

tr:hover td {
  background: #ffeaea;
  transition: background 0.2s ease;
}

/* Bordes redondeados superiores en cabecera */
table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

/* === Colores de fondo por estado === */
tr.Pedido { background: #fff8b3; }        /* Amarillo suave */
tr.Preparado { background: #cfe9ff; }     /* Azul pastel */
tr.Cobrado { background: #caffd1; }       /* Verde pastel */


/* Toast */
#toast {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  padding: 22px 30px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  z-index: 9999;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
#toast.error {background:linear-gradient(120deg,#ffe066,#ff6b6b);}
#toast.success{background:linear-gradient(120deg,#7adf8a,#2ecc71);}

/* Contraseña ojo */
.pass-wrapper{position:relative;}
.eye-btn{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  background:transparent !important;
  color:#666;
  border:none;
  padding:0;
  cursor:pointer;
  font-size:16px;
}
.eye-btn:hover{color:#333;}

.password-hint {
  display: block;
  font-size: 0.8em;
  color: #555;
  margin-bottom: 10px;
}

/* === CABECERA LOGIN === */
.header-login {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ff6b81;
  color: #fff;
  padding: 10px 15px;
  border-radius: 0 0 10px 10px;
  max-width: 600px;
  margin: 0 auto 15px auto;
}
.header-login .logo {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Etiquetas rojas */
label {
  color: #ff4757;
  font-weight: 600;
}

/* Textos pequeños */
.small-text {
  font-size: 0.85em;
  color: #555;
}

/* Nueva tarjeta recuperar contraseña */
.recover-card {
  text-align: center;
}

/* Enlaces legales */
.legal-links {
  text-align: center;
  margin-top: 15px;
}
.legal-links a {
  color: #ff4757;
  text-decoration: none;
  margin: 0 5px;
  font-size: 0.8em;
}
.legal-links a:hover {
  text-decoration: underline;
}

/* Banner cookies */
.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff3f3;
  border-top: 1px solid #ff6b81;
  padding: 10px 15px;
  text-align: center;
  font-size: 0.8em;
  z-index: 9999;
}
.cookies-banner button {
  margin-left: 10px;
  background: #ff6b81;
  color: #fff;
  border: none;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.8em;
  cursor: pointer;
}
.cookies-banner button:hover {background:#ff4757;}

/* Ajustes específicos login */
.login-small { 
  font-size: 0.9em; 
  color: #666; 
  text-align: center; 
  margin-top: 8px; 
}
.centered { 
  text-align: center; 
}

/* === Detalle de pedidos === */
.pedido-detalle {
  margin-top: 20px;

}

button.small {
  padding: 8px 14px;
  font-size: 0.9em;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
}

button.preparado-btn {
  background: #0288d1;
}
button.preparado-btn:hover {
  background: #0277bd;
}
button.cobrado-btn {
  background: #2e7d32;
}
button.cobrado-btn:hover {
  background: #1b5e20;
}

/* === Botones dentro de las tarjetas de pedidos === */
.pedido-actions button.small {
  background: #ff6b81;           /* color principal Gesfesta */
  color: #fff;
  border: none;
  font-size: 0.95em;             /* un poco más grande */
  padding: 8px 14px;
  margin: 5px 8px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* === Tarjeta Pedidos === */
.pedido-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pedido-selector .main-btn {
  background: #ff6b81;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pedido-selector .main-btn:hover {
  background: #ff4757;
}

/* Etiqueta de listado (🟡 Pedidos Pendientes / 🔵 Pedidos Preparados) */
.etiqueta-listado {
  text-align: center;
  font-weight: 600;
  margin: 10px 0 12px 0;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.etiqueta-listado.pendientes {
  background: #fff8b3;
  border: 1px solid #e0c200;
}

.etiqueta-listado.preparados {
  background: #b3e5ff;
  border: 1px solid #0093c4;
}

/* Centrar y espaciar botones “Pasar a…” */
.pedido-botones {
  text-align: center;
  margin-top: 18px;
}

.pedido-botones button {
  background: #ff6b81;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95em;
  margin: 0 6px;
  transition: background 0.2s ease;
}

.pedido-botones button:hover {
  background: #ff4757;
}

/* En pantallas pequeñas, que no se monten */
@media (max-width:600px) {
  .pedido-botones {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
  }
}

/* Versión móvil: botones compactos pero alineados en una línea */
.pedido-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;              /* ocupa todo el ancho disponible */
  text-align: center;
  margin-top: 20px;         /* separación desde la tabla */
  margin-bottom: 8px;
  gap: 12px;                /* espacio entre botones */
  flex-wrap: wrap;
  box-sizing: border-box;
}
.pedido-actions button.small {
  background: #ff6b81;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.pedido-actions button.small:hover {
  background: #ff4757;           /* tono hover estándar */
}
/* En pantallas pequeñas siguen centrados */
@media (max-width:600px) {
  .pedido-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;             /* menos espacio entre ellos */
    flex-wrap: nowrap;    /* evita que pasen a dos líneas */
    margin-top: 14px;
  }
  .pedido-actions button.small {
    font-size: 0.8em;     /* texto un poco más pequeño */
    padding: 6px 10px;    /* botones más compactos */
    border-radius: 6px;
    white-space: nowrap;  /* evita que se parta el texto */
  }
}
/* === Colores de fondo para los listados de pedidos === */
tr.Pedido td {
  background-color: #fff8b3 !important;   /* amarillo suave */
}
tr.Preparado td {
  background-color: #b3e5ff !important;   /* azul claro */
}
tr.Cobrado td {
  background-color: #b9f6ca !important;   /* verde suave */
}

/* Bordes visibles y coherentes */
table tr td {
  border: 1px solid #ff6b81;
  color: #333;
}

/* === Tabla de pedidos === */
.tabla-pedidos {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #ff6b81;
}

.tabla-pedidos th, 
.tabla-pedidos td {
  border: 1px solid #ff6b81;
  padding: 6px;
  text-align: center;
  font-size: 0.9em;
}

.tabla-pedidos th {
  background: #ff6b81;
  color: #fff;
}

/* Colores según estado */
.tabla-pedidos tr.Pedido td {
  background-color: #fff8b3 !important;   /* amarillo suave */
}
.tabla-pedidos tr.Preparado td {
  background-color: #b3e5ff !important;   /* azul suave */
}
.tabla-pedidos tr.Cobrado td {
  background-color: #b9f6ca !important;   /* verde suave */
}

/* Asegura borde inferior visible */
.tabla-pedidos tr:last-child td {
  border-bottom: 1px solid #ff6b81;
}

/* === PESTAÑAS (FICHAS) EN TARJETA PEDIDOS === */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;               /* 🔹 deja espacio respecto al borde de la tarjeta */
  margin-bottom: 12px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  background: #ffeaea;           /* 🔹 tono rosado claro */
  border: 1px solid #ffb3b3;
  border-radius: 8px;
  color: #ff6b81;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
}

.tab:hover {
  background: #ffd6d6;           /* 🔹 más claro, no rojo */
  color: #ff4757;                /* 🔹 texto un poco más oscuro */
}

.tab.active {
  background: #ff6b81;           /* 🔹 color principal Gesfesta */
  color: #fff;
  border-color: #ff6b81;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tab:focus { outline: none; }

/* === Contenido de las pestañas === */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Centrar y espaciar botones de acción */
.pedido-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

/* === LISTADO ARTICULOS === */
table.tabla-articulos {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border: none; /* borde exterior más fino y suave */
  background: #E1F3E7;
}

table.tabla-articulos th,
table.tabla-articulos td {
  padding: 5px 6px;
  font-size: 0.83em;
  line-height: 1.2em;
  border-top: 0.5px solid #ffd6d6; /* solo línea horizontal */
  border-left: none;
  border-right: none;
  text-align: center;
}

/* Fondo liso (color por defecto de la app), NO degradado */
table.tabla-articulos th {
  background: #ff6b81;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
}

/* Celdas específicas */
table.tabla-articulos td.precio {
  text-align: right;
  white-space: nowrap;
}
table.tabla-articulos td.activo,
table.tabla-articulos td.acciones {
  text-align: center;
  white-space: nowrap;
}

/* Botón/icono de acciones sin fondo */
a.icon-btn {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;          /* tamaño del icono */
  color: #ff6b81;
  text-decoration: none;
  cursor: pointer;
}
a.icon-btn:hover {
  color: #ff4757;
}

@media (max-width: 600px) {
  table.tabla-articulos th,
  table.tabla-articulos td {
    font-size: 0.78em;
    padding: 4px 4px;
  }
  a.icon-btn { font-size: 17px; }
}

/* Alinear cabecera de precio a la derecha */
table.tabla-articulos th.precio {
  text-align: right;
  padding-right: 12px;
}

/* === Paginación === */
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.page-btn {
  background: #ff6b81;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  transition: background 0.2s ease;
}

.page-btn:hover {
  background: #ff4757;
}

.page-info {
  font-size: 0.85em;
  color: #444;
}

/* ======== ORDENACIÓN TABLA ARTÍCULOS ======== */
table.tabla-articulos th[data-col] {
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: background 0.2s ease;
}

table.tabla-articulos th[data-col]:hover {
  background: #ff7b90; /* tono más claro al pasar */
}

table.tabla-articulos th[data-col]::after {
  content: '';
  position: absolute;
  right: 8px;
  font-size: 0.8em;
  color: #fff;
}

/* === ORDENACIÓN TABLA SERVIDOR === */
/* === Enlaces de ordenación en cabecera de tabla de artículos === */
table.tabla-articulos th a {
  color: #fff !important;               /* blanco puro, sin azul */
  text-decoration: none !important;     /* sin subrayado */
  display: inline-block;
  width: 100%;
  height: 100%;
  font-weight: 600;
  transition: color 0.2s ease;
}

table.tabla-articulos th a:hover {
  color: #ffeaea !important;            /* tono rosado claro al pasar el ratón */
  text-decoration: none !important;
}

/* === Ajustes específicos para formularios de artículos === */

/* Margen entre cabecera y tarjeta */
.container > .header {
  margin-bottom: 15px;  /* 🔹 deja espacio visual entre el header y el contenido */
}

/* Etiqueta con checkbox "Activo" */
label.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;                /* 🔹 separa el checkbox del texto */
  font-weight: 500;
  color: #ff4757;
  margin-top: 10px;
}

/* Checkbox tamaño coherente con el diseño */
label.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff6b81;   /* 🔹 color principal Gesfesta */
  cursor: pointer;
}

/* === Tabla de Fiestas (idéntica a la de Artículos) === */
table.tabla-fiestas {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border: none;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-top: 10px;
}

table.tabla-fiestas th,
table.tabla-fiestas td {
  padding: 5px 6px;
  font-size: 0.83em;
  line-height: 1.2em;
  border-top: 0.5px solid #ffd6d6; /* solo líneas horizontales */
  border-left: none;
  border-right: none;
  text-align: center;
  background: #E1F3E7; /* fondo sutil igual al de artículos */
}

/* Cabecera igual que artículos */
table.tabla-fiestas th {
  background: #ff6b81;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
}

/* Celdas alternas y hover */
table.tabla-fiestas tr:nth-child(even) td {
  background: #fff9f9;
}
table.tabla-fiestas tr:hover td {
  background: #ffeaea;
  transition: background 0.2s ease;
}

/* Columna de acciones */
table.tabla-fiestas td.acciones {
  text-align: center;
  white-space: nowrap;
}

/* Icono de acción (editar) */
a.icon-btn {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ff6b81;
  text-decoration: none;
  cursor: pointer;
}
a.icon-btn:hover {
  color: #ff4757;
}

/* Compacto también en móviles */
@media (max-width: 600px) {
  table.tabla-fiestas th,
  table.tabla-fiestas td {
    font-size: 0.78em;
    padding: 4px 4px;
  }
  a.icon-btn { font-size: 17px; }
}

/* === Fiesta activa (sin borde, ancho completo, fondo rosa claro) === */
.fiesta-activa {
  background: #ffe6ea; /* igual que botón Preparados */
  border-radius: 12px;
  padding: 16px 14px;
  margin-bottom: 18px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  width: 100%;
  box-sizing: border-box;
}

/* Etiqueta superior */
.fiesta-etiqueta {
  font-size: 0.8em;
  letter-spacing: 1px;
  font-weight: 600;
  color: #ff4757;
  margin-bottom: 5px;
}

/* Nombre de la fiesta */
.fiesta-nombre {
  font-size: 1.05em;
  font-weight: 700;
  color: #333;
  margin-bottom: 18px; /* 🔹 más separación respecto a los botones */
  word-break: break-word;
}

/* Botones */
.fiesta-botones {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff6b81;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-icon:hover { background: #ff4757; }

.btn-icon.danger { background: #888; }
.btn-icon.danger:hover { background: #555; }

/* Compacto en móvil */
@media (max-width: 600px) {
  .fiesta-activa {
    padding: 14px 10px;
  }
  .fiesta-nombre {
    font-size: 1em;
    margin-bottom: 14px;
  }
  .btn-icon {
    font-size: 0.85em;
    padding: 6px 10px;
  }
}

/* === Tabla de fiestas cerradas === */
table.tabla-fiestas {
  border: none;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
table.tabla-fiestas th,
table.tabla-fiestas td {
  padding: 5px 6px;
  font-size: 0.83em;
  line-height: 1.2em;
  border-top: 0.5px solid #ffd6d6;
  border-left: none;
  border-right: none;
  text-align: center;
  background: #E1F3E7;
}
table.tabla-fiestas th {
  background: #ff6b81;
  color: #fff;
  font-weight: 600;
}
table.tabla-fiestas tr:nth-child(even) td {
  background: #fff9f9;
}
table.tabla-fiestas tr:hover td {
  background: #ffeaea;
  transition: background 0.2s ease;
}
table.tabla-fiestas td.acciones {
  text-align: center;
  white-space: nowrap;
}

/* === Bloque de datos de cierre de fiesta === */
.fiesta-datos {
  background: #fff9f9;
  border: 1px solid #ffd5d5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.9em;
  color: #333;
  line-height: 1.4em;
}

.fiesta-datos p {
  margin: 4px 0;
}

.advertencia {
  background: #fff0f0;
  border-left: 4px solid #ff4757;
  padding: 10px 12px;
  color: #a00000;
  font-size: 0.88em;
  border-radius: 6px;
  line-height: 1.4em;
}

button.danger {
  background: #888;
}

button.danger:hover {
  background: #555;
}

/* === Cierre de fiesta === */
.cierre-fiesta {
  background: #E1F8E4;
  border: 1px solid #B5E6BB;
  border-radius: 6px;
  padding: 6px;
  font-weight: 600;
  color: #155724;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 18px;
}

.advertencia {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 10px;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 0.9em;
  text-align: center;
}

/* === Resumen Totales === */
.resumen-totales p {
  margin: 4px 0;
  font-size: 0.9em;
  color: #333;
}

.resumen-totales .label {
  color: #FF4757;
  font-weight: 600;
}

/* ✅ Colores verdes para importes y unidades */
.resumen-totales p.total-unidades,
.resumen-totales p.ingresos,
.resumen-totales p.gastos {
  color: #155724;
  font-weight: 600;
  margin-top: 20px;
}

/* 🔹 Total vendido destacado */
.resumen-totales p.total-vendido {
  background: #E1F8E4;
  border: 1px solid #B5E6BB;
  border-radius: 6px;
  padding: 6px;
  font-weight: 600;
  color: #155724;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 18px;
}

/* 🔹 Separadores visuales */
.espacio-bloque {
  margin-top: 18px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #ffb3b9;
  height: 1px;
}

/* === Tarjeta final === */
.tarjeta-final {
  text-align: center;
  border-radius: 10px;
  padding: 14px 10px;
  font-size: 0.95em;
  font-weight: 600;
  line-height: 1.4em;
  margin-top: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #e1f8e4;
  border: 1px solid #b5e6bb;
  color: #155724 !important; /* ✅ fuerza color verde para todo el contenido */
}

/* 🔹 Asegura que también el texto en negrita sea verde */
.tarjeta-final p,
.tarjeta-final strong {
  color: #155724 !important;
}

/* Para IMPORTE: Y CONCEPTO: */
/* 🔸 Forzar color rojo en etiquetas de la tarjeta final */
.tarjeta-final p strong.resaltado {
  color: #FF4757 !important;
}

/* Línea destacada: etiqueta + valor en el color corporativo */
.linea-resaltada {
  color: #FF4757;
  margin: 4px 0;
  font-size: 0.95em;
}
.linea-resaltada strong { 
  color: inherit;
}
.titulo-ventas {
  margin-top: 12px;
  margin-bottom: 8px;
  color:#ff4757;
}

/* === Resumen Fechas === */
.cierre-fechas p {
  margin: 4px 0;
  font-size: 0.9em;
  color: #333;
}

.cierre-fechas .label {
  color: #FF4757;
  font-weight: 600;
}

/* ✅ Colores verdes para importes y unidades */
.cierre-fechas p.fecha_apertura {
  color: #155724;
  font-weight: 600;
  margin-top: 30px;
}
.cierre-fechas p.fecha_cierre {
  color: #155724;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 20px;
}

.tarjeta-final .label-roja,
.tarjeta-final .label-roja * { color:#FF4757 !important; }


/* === TABLA PEDIDOS  === */
table.tabla-pedidos-agrupacion {
  border: none;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

table.tabla-pedidos-agrupacion th,
table.tabla-pedidos-agrupacion td {
  padding: 5px 6px;
  font-size: 0.83em;
  line-height: 1.2em;
  border-top: 0.5px solid #ffd6d6;
  border-left: none;
  border-right: none;
  text-align: center;
  background: #E1F3E7;
}

table.tabla-pedidos-agrupacion th {
  background: #ff6b81;
  color: #fff;
  font-weight: 600;
}
table.tabla-pedidos-agrupacion tr:nth-child(even) td {
  background: #fff9f9;
}
table.tabla-pedidos-agrupacion tr:hover td {
  background: #ffeaea;
  transition: background 0.2s ease;
}
table.tabla-pedidos-agrupacion td.acciones {
  text-align: center;
  white-space: nowrap;
}

/* ==== Corrección: botón papelera sin fondo ==== */
button.icon-btn {
  background: transparent !important;
  border: none !important;
  color: #ff6b81 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}

button.icon-btn:hover {
  color: #ff4757 !important;
  transform: scale(1.1);
  transition: color 0.2s ease, transform 0.2s ease;
}

/* En móviles, asegurar buena visibilidad */
@media (max-width:600px) {
  button.icon-btn {
    font-size: 20px !important;
  }
}

/* === ID del festero en la cabecera === */
.festero-name {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.festero-id {
  font-size: 0.85em;
  font-weight: 600;
  color: #ff6b81;
  background: #fff;
  border: 1px solid #ff6b81;
  border-radius: 8px;
  padding: 2px 8px;
  line-height: 1.2;
}

/* === Teclado numérico táctil adaptable === */
.teclado-numerico {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: #fff3f3;
  border: 1px solid #ffb3b3;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  box-sizing: border-box;
}

.teclado-numerico .fila {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.num-btn {
  flex: 1;
  background: #ff6b81;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  height: 64px;
  font-size: 1.4em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.num-btn:hover {
  background: #ff4757;
  transform: scale(1.03);
}

.num-btn.borrar {
  background: #ffa502;
}

.num-btn.resetear {
  background: #888;
}

.num-btn.borrar:hover,
.num-btn.resetear:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* En pantallas pequeñas, botones grandes y bien espaciados */
@media (max-width: 480px) {
  .num-btn {
    height: 48px;
    font-size: 1.6em;
  }
}


/* === Bloque de búsqueda de número de pedido === */
.busqueda-numero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.busqueda-numero input {
  width: 110px;
  height: 56px;
  border: 1px solid #ff6b81;  /* borde más fino */
  border-radius: 10px;
  font-size: 1.3em;
  font-weight: 600;
  padding: 0;
  color: #333;
  box-sizing: border-box;
}

.busqueda-numero input:focus {
  outline: none;
  border-color: #ff4757;
  box-shadow: 0 0 4px rgba(255, 71, 87, 0.4);
}

.btn-buscar {
  height: 56px;
  padding: 0 28px;
  font-size: 1.1em;
  background: #ff6b81;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-buscar:hover {
  background: #ff4757;
  transform: scale(1.03);
}

/* En pantallas pequeñas, centrado y mismo alto */
@media (max-width: 480px) {
  .busqueda-numero {
    flex-direction: row;
    justify-content: center;
  }
  .busqueda-numero input {
    width: 100px;
    height: 56px;
  }
  .btn-buscar {
    height: 56px;
  }
}

/* === Tabla de pedidos por número (agrupaciones) === */
.tabla-pedidos-agrupacion.pedidos-simplificada {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.95em;  /* texto más grande */
}

.tabla-pedidos-agrupacion.pedidos-simplificada th,
.tabla-pedidos-agrupacion.pedidos-simplificada td {
  border-bottom: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.tabla-pedidos-agrupacion.pedidos-simplificada th {
  background-color: #f8f8f8;
  color: #ff4757;
  font-weight: 600;
}

@media (max-width: 600px) {
  .tabla-pedidos-agrupacion.pedidos-simplificada th,
  .tabla-pedidos-agrupacion.pedidos-simplificada td {
    font-size: 1em;   /* aún más grande en móvil */
    padding: 7px 8px;
  }
}

/* === Mensaje centrado de "no se ha encontrado pedido" (forzado) === */
.mensaje-no-pedido {
  display: block;
  width: 100%;
  text-align: center;
  color: #333;
  margin-top: 40px;
  margin-bottom: 30px;
  font-size: 1.1em;
  font-weight: 700;
}


/* === Botón "Pasar a Cobrado" más alto === */
#btnPasarCobrado {
  padding: 14px 24px;   /* más alto */
  font-size: 1rem;
  border-radius: 8px;
  margin-bottom: 0px;
}

.busqueda-articulos {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  margin-bottom: 12px !important;
}

.campo-buscar {
  padding: 6px 8px !important;
  flex: 1 1 auto !important;
  min-width: 120px !important;
  max-width: 220px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
}

.btn-buscar,
.btn-reset {
  padding: 6px 10px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  border: none !important;
  border-radius: 4px !important;
}

.btn-reset {
  background: #ccc !important;
  color: #000 !important;
}

/* En pantallas pequeñas: mantener todo en una línea y reducir un poco el ancho */
@media (max-width: 480px) {
  .busqueda-articulos {
    gap: 4px !important;
  }
  .campo-buscar {
    max-width: 140px !important;
  }
  .btn-buscar,
  .btn-reset {
    font-size: 14px !important;
    padding: 5px 8px !important;
  }
}
/* === Buscador de artículos === */
.busqueda-articulos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
}

.busqueda-articulos .campo-buscar {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  width: 220px;
  transition: width 0.2s ease;
}

.busqueda-articulos .btn-buscar,
.busqueda-articulos .btn-reset {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px !important;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.busqueda-articulos .btn-buscar {
  background-color: #FF6B81;
  color: white;
}

.busqueda-articulos .btn-buscar:hover {
  background-color: #FF4757;
}

.busqueda-articulos .btn-reset {
  background-color: #757575 !important;
  color: white !important;
}

.busqueda-articulos .btn-reset:hover {
  background-color: #bbb !important;
}

/* === Responsive === */
@media (max-width: 600px) {
  .busqueda-articulos {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .busqueda-articulos .campo-buscar {
    width: 140px;
    flex-shrink: 1;
  }

  .busqueda-articulos .btn-buscar,
  .busqueda-articulos .btn-reset {
    padding: 6px 10px;
    font-size: 14px;
    height: auto;
  }
}

/* === CARGA DE SALDO === */
.form-linea {
  display: flex;
  align-items: center;   /* los alinea por la parte inferior */
  justify-content: flex-start; /* los deja seguidos */
  gap: 10px;               /* espacio entre campo y botón */
  margin-bottom: 12px;
}

.form-linea label {
  margin-right: 6px;
}

.etiqueta-roja {
  font-weight: 600;
  color: #ff4757;
  min-width: 120px;
  text-align: left;
}

.etiqueta-normal {
  font-weight: 600;
  color: #333;
  display: block;
  text-align: left;
  margin-bottom: 4px;
}

.campo-numero {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  height: 36px;
}

/* 🔴 Botón rojo coherente con Gesfesta */
.btn-buscar-roja {
  background-color: #FF6B81;   /* mismo rojo que Bootstrap o botones Gesfesta */
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  height: 38px;
  flex-shrink: 0;
}

.btn-buscar-roja:hover {
  background-color: #FF4757;
}

.bloque-festero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
}

.campo-simulacion {
  display: flex;
  align-items: center;
  width: 100%;              /* ocupa todo el ancho del contenedor */
  min-height: 38px;         /* misma altura que el input y el botón */
  padding: 6px 10px;        /* mismo padding que .campo-numero */
  font-size: 15px;
  color: #333;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.bloque-carga {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 10px;
}

/* ✅ Botón verde principal unificado */
.btn-principal {
  background-color: #20c997;          /* verde más brillante, estilo Gesfesta */
  color: #fff;
  border: none;
  padding: 10px 22px;                /* más alto y ancho: coincide con los demás */
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: inline-block;
  height: 42px;                      /* altura coherente con inputs */
  line-height: 1;                    /* centra el texto verticalmente */
  margin-top: 10px;
}

.btn-principal:hover {
  background-color: #17a589;         /* tono más oscuro al pasar el ratón */
  transform: translateY(-1px);       /* pequeño efecto hover */
}

.btn-principal:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
  .form-linea {
    flex-direction: column;
    align-items: flex-start;
  }
  .campo-numero, .btn-buscar-roja {
    width: 100%;
  }
  .campo-simulacion {
    width: 100%;
  }
}

/* 🔧 Ocultar flechas de los campos numéricos */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield; /* para Firefox */
}

