/* ==========================================================================
   COTIZADOR INTELIGENTE MI COCTEL - ESTILOS VISUALES PREMIUM (DARK MODE)
   ========================================================================== */

:root {
  --bg-main: #0c0e12;
  --bg-card: #141820;
  --bg-card-hover: #19202a;
  --bg-input: #12151c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #eab308;
  
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --gold-500: #eab308;
  --gold-400: #facc15;
  --gold-600: #ca8a04;
  --gold-glow: rgba(234, 179, 8, 0.12);
  
  --emerald-500: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.12);
  
  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 4px 16px rgba(234, 179, 8, 0.18);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 120px; /* Espacio para barra flotante */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER SUPERIOR SLIM & MINIMALISTA
   ========================================================================== */
.header-container {
  background-color: rgba(18, 22, 29, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.header-content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  box-sizing: border-box;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: 62px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  transition: transform var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.04);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.brand-badge {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  line-height: 1.2;
  display: inline-block;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.1px;
  margin: 0;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  transition: var(--transition);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .header-container {
    padding: 6px 10px;
    min-height: 50px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .header-content {
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .brand-logo-img {
    height: 34px;
  }
  .brand-subtitle {
    display: none;
  }
  .brand-wrapper {
    gap: 8px;
    flex-shrink: 0;
  }
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .header-actions .btn-text,
  .header-actions .status-text {
    display: none;
  }
  .status-pill {
    padding: 6px;
  }
  .header-actions .btn-sm {
    padding: 6px;
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
  }
}

/* ==========================================================================
   BOTONES Y ACCIONES GENERALES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #000;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--gold-500);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.main-wrapper {
  max-width: 1400px;
  width: 100%;
  margin: 18px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  box-sizing: border-box;
}

@media (max-width: 1080px) {
  .main-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 0 12px;
    margin: 12px auto;
  }
  .main-left {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* ==========================================================================
   TARJETAS Y SECCIONES
   ========================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .card {
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .catalog-live-subtitle {
    display: none;
  }
  .menu-collapse-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.card-title i {
  color: var(--gold-500);
}

/* ==========================================================================
   ANALIZADOR MÁGICO DE BRIEFING (TEXTO Y PDF)
   ========================================================================== */
.briefing-box {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.04) 0%, rgba(21, 25, 33, 0) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  background-color: rgba(27, 32, 42, 0.4);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--gold-500);
  background-color: rgba(234, 179, 8, 0.05);
}

.drop-zone i {
  font-size: 32px;
  color: var(--gold-500);
  margin-bottom: 8px;
}

.briefing-textarea {
  width: 100%;
  min-height: 100px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 12px;
}

.briefing-textarea:focus {
  outline: none;
  border-color: var(--gold-500);
}

.briefing-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ==========================================================================
   BANNER DE PRODUCTOS FALTANTES & ALTERNATIVAS
   ========================================================================== */
.alert-container {
  margin-bottom: 20px;
}

.alert-missing {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.alternative-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.alternative-info {
  font-size: 13px;
}

.alternative-title {
  font-weight: 600;
  color: var(--text-main);
}

.alternative-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   FORMULARIO DEL EVENTO
   ========================================================================== */
.grid-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .grid-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-500);
}

/* ==========================================================================
   PESTAÑAS DE MENÚS (OPCIÓN 1, OPCIÓN 2, OPCIÓN 3)
   ========================================================================== */
.tabs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.menu-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.menu-tab-btn:hover {
  color: var(--text-main);
}

.menu-tab-btn.active {
  color: var(--gold-500);
  border-bottom-color: var(--gold-500);
}

.recommended-tag {
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-400);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ==========================================================================
   CATEGORÍAS Y FILAS DE PRODUCTOS
   ========================================================================== */
.category-block {
  margin-bottom: 20px;
  background-color: rgba(27, 32, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-block:hover {
  border-color: rgba(234, 179, 8, 0.25);
}

.category-block.is-expanded {
  border-color: rgba(234, 179, 8, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.category-block.is-collapsed {
  margin-bottom: 10px;
}

.category-block.is-collapsed.is-mobile-closed .category-header {
  border-bottom: none;
}

.category-block.is-collapsed:not(.is-mobile-closed) .category-header {
  border-bottom: 1px solid var(--border-color);
}

.menu-collapse-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle-all {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-all:hover {
  background: rgba(234, 179, 8, 0.12);
  border-color: var(--gold-400);
  color: var(--gold-300);
  transform: translateY(-1px);
}

.category-header {
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(39, 48, 63, 0.5) 0%, rgba(27, 32, 42, 0.5) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.category-header:hover {
  background: linear-gradient(90deg, rgba(39, 48, 63, 0.75) 0%, rgba(27, 32, 42, 0.75) 100%);
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cat-header-icon {
  width: 17px;
  height: 17px;
  color: var(--gold-400);
}

.category-selected-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.category-selected-badge.has-items {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.category-selected-badge.empty {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.cat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-category-toggle {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-category-toggle:hover {
  background: rgba(234, 179, 8, 0.12);
  border-color: var(--gold-400);
  color: var(--gold-400);
}

.btn-category-toggle.active {
  background: rgba(234, 179, 8, 0.18);
  border-color: var(--gold-500);
  color: var(--gold-300);
}

.category-empty-state {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(15, 23, 42, 0.25);
}

.category-empty-state i {
  width: 17px;
  height: 17px;
  color: var(--text-dim);
}

.btn-expand-shortcut {
  background: none;
  border: none;
  color: var(--gold-400);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-expand-shortcut:hover {
  color: var(--gold-300);
}

/* ==========================================================================
   SUBCATEGORÍAS (CHIPS DE FILTRO Y SEPARADORES DE SECCIÓN)
   ========================================================================== */
.subcat-chips-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.subcat-chips-bar::-webkit-scrollbar {
  height: 4px;
}

.subcat-chips-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.subcat-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.subcat-chip:hover {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.4);
  color: var(--text-main);
}

.subcat-chip.active {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--gold-500);
  color: var(--gold-300);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.15);
}

.subcat-chip-icon {
  width: 12px;
  height: 12px;
  color: var(--gold-400);
}

.subcat-chip-count {
  font-size: 10px;
  color: var(--text-dim);
}

.subcat-chip-selected-badge {
  background: #10b981;
  color: #022c22;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
}

.subcategory-section {
  position: relative;
}

.subcategory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.75) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.subcat-header-collapsed {
  padding: 6px 14px;
  background: rgba(30, 41, 59, 0.45);
}

.subcat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subcat-header-icon {
  width: 14px;
  height: 14px;
  color: var(--gold-400);
}

.subcat-header-title {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.subcat-header-count {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.subcat-header-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
}

.subcat-header-badge.has-selected {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  transition: all 0.2s ease;
  background-color: transparent;
}

.item-row:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.item-row.is-active-item {
  background-color: rgba(234, 179, 8, 0.05);
  border-left: 3px solid var(--gold-500);
}

.item-info {
  flex: 1;
  padding-right: 16px;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 11px;
}

.unit-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

.unit-price-badge.cost-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.item-manual-cost-box {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 4px;
  padding: 1px 6px;
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
}

.cost-badge-lbl {
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
}

.item-cost-input {
  width: 75px;
  height: 22px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 4px;
  text-align: right;
  outline: none;
  transition: all 0.2s;
  -moz-appearance: textfield;
}

.item-cost-input::-webkit-outer-spin-button,
.item-cost-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-cost-input:focus {
  border-color: var(--gold-400);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.3);
}

.cost-badge-neto {
  font-size: 10px;
  color: #a7f3d0;
  font-weight: 600;
}

.unit-price-badge.sale-badge {
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold-300);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.unit-type-tag {
  color: var(--text-dim);
  font-size: 11px;
}

/* ==========================================================================
   CONMUTADOR DE UNIDAD (PP vs UN)
   ========================================================================== */
.unit-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 5px;
  padding: 1px;
  gap: 1px;
}

.unit-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: lowercase;
  line-height: 1.2;
}

.unit-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.unit-toggle-btn.active {
  background: #FFB22C;
  color: #111827;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.counter-unit-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: lowercase;
  min-width: 18px;
  text-align: left;
}

.counter-unit-tag.pp {
  color: #FFB22C;
}

.counter-unit-tag.un {
  color: #94a3b8;
}

/* ==========================================================================
   WIDGET DE CANTIDAD POR PERSONA EN HEADER DE CATEGORÍA
   ========================================================================== */
.cat-pp-badge-widget {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(96, 61, 1, 0.28);
  border: 1px solid rgba(255, 178, 44, 0.4);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: #fef08a;
  user-select: none;
  margin-left: 6px;
}

.cat-pp-badge-label {
  font-weight: 600;
  color: #fde047;
  font-size: 10.5px;
  text-transform: none;
}

.cat-pp-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 178, 44, 0.5);
  border-radius: 4px;
  padding: 1px 5px;
}

.cat-pp-header-input {
  width: 36px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.cat-pp-header-input::-webkit-outer-spin-button,
.cat-pp-header-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cat-pp-header-input:focus {
  color: #FFB22C;
}

.cat-pp-badge-suffix {
  font-size: 11px;
  font-weight: 700;
  color: #FFB22C;
}

.btn-reset-cat-pp,
.btn-distribute-cat-pp {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-cat-pp:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-distribute-cat-pp {
  background: rgba(255, 178, 44, 0.2);
  border-color: rgba(255, 178, 44, 0.5);
  color: #fde047;
}

.btn-distribute-cat-pp:hover {
  background: #FFB22C;
  color: #111827;
}

.item-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.counter-input {
  width: 48px;
  text-align: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
  padding: 4px 2px;
  font-weight: 700;
  font-size: 14px;
}

.counter-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.2s ease;
}

.counter-btn:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--gold-500);
  color: var(--gold-400);
}

.item-subtotal-block {
  width: 135px;
  text-align: right;
  margin-left: 14px;
  flex-shrink: 0;
}

.subtotal-cost {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-400);
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.subtotal-neto-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 2px;
}

.subtotal-sale {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   CONTROL DE COSTO NETO UNITARIO PERSONALIZADO POR ÍTEM
   ========================================================================== */
.item-custom-cost-control {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 6px;
  padding: 3px 8px;
  margin-left: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.item-custom-cost-control.has-custom-cost {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.55);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
}

.item-custom-cost-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-custom-cost-control.has-custom-cost .item-custom-cost-lbl {
  color: #fde047;
}

.item-custom-cost-inp-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.item-custom-cost-prefix {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.item-custom-cost-control.has-custom-cost .item-custom-cost-prefix {
  color: #facc15;
}

.item-custom-cost-input {
  width: 62px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(71, 85, 105, 0.4);
  border-radius: 5px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 2px 4px;
  outline: none;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}

.item-custom-cost-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.item-custom-cost-control.has-custom-cost .item-custom-cost-input {
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.7);
  background: rgba(0, 0, 0, 0.75);
}

.item-custom-cost-input:focus {
  border-color: #facc15;
  background: rgba(234, 179, 8, 0.15);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.item-custom-cost-input::-webkit-outer-spin-button,
.item-custom-cost-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cost-manual-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cost-manual-tag:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-reset-custom-cost {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 3px;
  flex-shrink: 0;
}

.btn-reset-custom-cost.visible {
  display: inline-flex;
}

.btn-reset-custom-cost:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
  border-color: #f87171;
  transform: scale(1.08);
}

.btn-reset-custom-cost i,
.btn-reset-custom-cost svg {
  width: 12px;
  height: 12px;
}

.unit-price-badge.cost-badge.is-customized-badge {
  border-color: rgba(234, 179, 8, 0.5);
  color: #fde047;
}

@media (max-width: 720px) {
  .item-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .item-info {
    order: 1;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    padding-right: 0;
  }
  .item-counter {
    order: 2;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .counter-btn {
    width: 30px;
    height: 30px;
  }
  .counter-input {
    width: 44px;
    height: 30px;
  }
  .item-custom-cost-control {
    order: 3;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    flex-shrink: 0;
  }
  .item-custom-cost-lbl {
    font-size: 10px;
  }
  .item-custom-cost-input {
    width: 54px;
    height: 26px;
    font-size: 12px;
  }
  .item-subtotal-block {
    order: 4;
    margin-left: 0;
    width: auto;
    min-width: 75px;
    text-align: right;
    flex-shrink: 0;
  }
  .subtotal-cost {
    font-size: 14px;
  }
  .subtotal-sale {
    font-size: 10.5px;
  }
  .btn-delete-special {
    order: 5;
    margin-left: 4px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   PANEL LATERAL: SIMULADOR FINANCIERO
   ========================================================================== */
.sidebar-panel {
  position: sticky;
  top: 90px;
}

.financial-summary-card {
  background: linear-gradient(145deg, #181d26 0%, #13161c 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.metric-group {
  margin-bottom: 20px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
}

.metric-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.metric-highlight {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-400);
  letter-spacing: -0.5px;
}

.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 16px 0;
}

/* Bloques destacados de Balance: Costo vs Ganancia */
.finance-block {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  position: relative;
  transition: var(--transition);
}

.finance-cost-block {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.finance-profit-block {
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.3) 0%, rgba(6, 95, 70, 0.15) 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.finance-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.finance-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.finance-block-title svg {
  width: 14px;
  height: 14px;
}

.finance-profit-block .finance-block-title {
  color: #34d399;
}

.finance-block-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tag-cost {
  background-color: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.tag-profit {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.finance-block-label {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.finance-block-amount {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.finance-block-amount.amount-profit {
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.3);
}

.finance-block-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.finance-block-sub strong {
  color: var(--text-main);
}

.finance-profit-block .finance-block-sub strong {
  color: #6ee7b7;
}

#disp-ganancia-margin-badge {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Slider de margen */
.margin-slider-container {
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.08) 0%, rgba(17, 24, 39, 0.85) 60%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(234, 179, 8, 0.45);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(234, 179, 8, 0.1), inset 0 1px 0 rgba(254, 240, 138, 0.2);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.slider-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-header-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.slider-header-icon {
  width: 15px;
  height: 15px;
  color: #facc15;
  stroke-width: 2.5;
}

.slider-header-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fde047;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.slider-val {
  color: #fde047;
  font-size: 14px;
  font-weight: 800;
}

/* Stepper punto a punto */
.margin-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-margin-step {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde047;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.btn-margin-step:hover {
  background: #facc15;
  border-color: #fde047;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.45);
  transform: translateY(-1px);
}

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

.margin-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 26, 0.95);
  border: 2px solid #facc15;
  border-radius: 8px;
  height: 38px;
  padding: 0 8px;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.28), inset 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.margin-input-wrapper:focus-within {
  border-color: #fef08a;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.55), inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.margin-number-input {
  width: 58px;
  background: transparent;
  border: none;
  color: #fde047;
  font-size: 22px;
  font-weight: 900;
  text-align: right;
  outline: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
  -moz-appearance: textfield;
}

.margin-number-input::-webkit-outer-spin-button,
.margin-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.margin-symbol {
  font-size: 16px;
  font-weight: 900;
  color: #facc15;
  margin-left: 3px;
  margin-right: 2px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}

.slider-input {
  width: 100%;
  accent-color: #facc15;
  cursor: pointer;
  height: 6px;
  border-radius: 4px;
}

.slider-presets {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.preset-chip {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background-color: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.preset-chip.active {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  border-color: #fde047;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.35);
}

/* ==========================================================================
   BARRA FLOTANTE DE ACCIONES
   ========================================================================== */
.floating-actions-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background-color: rgba(18, 22, 30, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 10px 24px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.actions-inner {
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.actions-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-info-cluster {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.summary-pax {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-sep {
  color: var(--text-dim);
}

.summary-total {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-400);
}

.summary-iva-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.mobile-only {
  display: none !important;
}

.actions-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn-compact {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn-compact:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .floating-actions-bar {
    padding: 8px 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .actions-inner {
    flex-direction: column;
    gap: 8px;
  }

  .actions-summary {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .btn-balance-pill {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.25));
    border: 1px solid var(--gold-500);
    color: var(--gold-400);
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
  }

  .btn-balance-pill:hover {
    background: rgba(234, 179, 8, 0.3);
    transform: translateY(-1px);
  }

  .actions-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .action-btn-compact {
    padding: 8px 2px;
    font-size: 11px;
    font-weight: 600;
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    border-radius: var(--radius-sm);
    justify-content: center;
  }

  body {
    padding-bottom: 145px;
  }
}

/* ==========================================================================
   DRAWER DESLIZABLE: BALANCE FINANCIERO MÓVIL
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-box {
  background: #141820;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 10px 16px 28px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer-overlay.open .drawer-box {
  transform: translateY(0);
}

.drawer-handle-bar {
  display: flex;
  justify-content: center;
  padding: 6px 0 10px;
  cursor: pointer;
}

.drawer-drag-pill {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-400);
}

.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
  border-radius: 4px;
}

.drawer-close:hover {
  color: var(--text-main);
}

/* ==========================================================================
   MODAL PARA VISTAS PREVIAS (WHATSAPP, FICHA COCINA, HISTORIAL)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.whatsapp-preview-box {
  background-color: #0b141a;
  border: 1px solid #202c33;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  white-space: pre-wrap;
  color: #e9edef;
  line-height: 1.6;
  user-select: all;
  margin-bottom: 16px;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN (PDF COMERCIAL Y FICHA COCINA)
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }

  .header-container,
  .floating-actions-bar,
  .briefing-box,
  .btn,
  .modal-close,
  .btn-secondary,
  .btn-primary,
  .tabs-header,
  .margin-slider-container,
  .counter-btn,
  .menu-collapse-controls {
    display: none !important;
  }

  /* Si un modal está abierto, ocultar todo el fondo del cotizador */
  body:has(.modal-overlay.open) .main-wrapper,
  body:has(.modal-overlay.open) .sidebar-panel {
    display: none !important;
  }

  .modal-overlay.open {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
  }

  .modal-overlay.open:not(#modal-commercial-quote) .modal-box {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    transform: none !important;
  }

  .modal-overlay.open:not(#modal-commercial-quote) .modal-header {
    border-bottom: 2px solid #000 !important;
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
  }

  .modal-overlay.open:not(#modal-commercial-quote) .modal-title {
    color: #000 !important;
    font-size: 18px !important;
  }

  .modal-overlay.open:not(#modal-commercial-quote) table,
  .modal-overlay.open:not(#modal-commercial-quote) td,
  .modal-overlay.open:not(#modal-commercial-quote) th {
    color: #000 !important;
    border-color: #ddd !important;
  }

  .modal-overlay.open:not(#modal-commercial-quote) strong,
  .modal-overlay.open:not(#modal-commercial-quote) span,
  .modal-overlay.open:not(#modal-commercial-quote) div {
    color: #000 !important;
  }

  .main-wrapper {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .item-name {
    color: #000 !important;
  }

  .metric-value, .metric-highlight {
    color: #000 !important;
  }
}

/* ==========================================================================
   PESTAÑA DESPLEGABLE: QUÉ INCLUYE EL MENÚ BASE
   ========================================================================== */
.menu-base-breakdown-card {
  margin-bottom: 20px;
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.05) 0%, rgba(21, 25, 33, 0.8) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.menu-base-toggle-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-main);
  text-align: left;
  transition: var(--transition);
}

.menu-base-toggle-btn:hover {
  background-color: rgba(234, 179, 8, 0.08);
}

.toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-included-count {
  background-color: var(--gold-glow);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.toggle-chevron {
  color: var(--gold-500);
  transition: transform 0.3s ease;
}

.menu-base-toggle-btn.open .toggle-chevron {
  transform: rotate(180deg);
}

.menu-base-drawer {
  padding: 0 18px 18px 18px;
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.menu-base-drawer.open {
  display: block;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.breakdown-section {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.breakdown-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.breakdown-item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-item-li {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breakdown-item-li span.qty {
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.base-insumos-box {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(234, 179, 8, 0.04);
  border: 1px dashed rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-sm);
}

.base-insumos-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.base-insumos-list {
  list-style: none;
  padding-left: 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.base-insumos-list li {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
  padding-left: 14px;
}

.base-insumos-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--gold-500);
  font-weight: 700;
}

/* Selector de vista de catálogo */
.catalog-view-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

/* Card Arriendo de Vasos */
.card-addon-arriendo {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.07) 0%, rgba(20, 24, 33, 0.7) 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  transition: all 0.25s ease;
}

.card-addon-arriendo:hover {
  border-color: var(--gold-500);
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.1);
}

.addon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.addon-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 260px;
}

.addon-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--gold-500);
  cursor: pointer;
}

.addon-text {
  flex: 1;
}

.addon-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.addon-icon {
  width: 17px;
  height: 17px;
  color: var(--gold-400);
}

.addon-price-tag {
  background-color: var(--gold-glow);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.addon-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.addon-qty-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.2s ease-in-out;
}

.addon-qty-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.counter-input {
  width: 58px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  outline: none;
}

.counter-input:focus {
  border-color: var(--gold-500);
}

.addon-subtotal-text {
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Selector de Montaje Base Coffee Break */
.base-setup-selector-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.05) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.base-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.base-setup-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.base-setup-tag {
  font-size: 11px;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.base-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.base-setup-btn {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.base-setup-btn:hover {
  border-color: rgba(234, 179, 8, 0.5);
  background-color: rgba(234, 179, 8, 0.04);
}

.base-setup-btn.active {
  border-color: var(--gold-500);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(20, 24, 33, 0.8) 100%);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.15);
}

.setup-btn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.setup-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.setup-price {
  font-size: 11px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.setup-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.badge-tag {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background-color: var(--gold-glow);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-tag.premium {
  background-color: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

/* ==========================================================================
   BADGE DE RUTA Y LOGÍSTICA DE VIAJE DESDE LA FLORIDA
   ========================================================================== */
/* ==========================================================================
   TARJETA DETALLADA DE RUTA, VEHÍCULO Y LOGÍSTICA DE VIAJE DESDE LA FLORIDA
   ========================================================================== */
.location-route-card {
  margin-top: 10px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: block;
  width: 100%;
}

.logistics-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.logistics-info-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logistics-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-main);
}

.logistics-title strong {
  color: #fff;
}

.logistics-title span#logistics-route-dest {
  color: var(--gold-400);
  font-weight: 700;
}

.waze-route-via {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.waze-eta-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: var(--gold-400);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.logistics-vehicle-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.logistics-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-logistics-config {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-logistics-config:hover {
  background: var(--gold-glow);
  border-color: var(--gold-400);
  color: #fff;
}



.btn-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-nav-link.gmaps {
  background: rgba(66, 133, 244, 0.15);
  color: #93c5fd;
  border-color: rgba(66, 133, 244, 0.35);
}

.btn-nav-link.gmaps:hover {
  background: rgba(66, 133, 244, 0.3);
  color: #fff;
  border-color: #60a5fa;
}

.btn-nav-link.waze {
  background: rgba(51, 204, 255, 0.15);
  color: #67e8f9;
  border-color: rgba(51, 204, 255, 0.35);
}

.btn-nav-link.waze:hover {
  background: rgba(51, 204, 255, 0.3);
  color: #fff;
  border-color: #38bdf8;
}

.btn-nav-link.map-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-nav-link.map-toggle:hover {
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-400);
  border-color: var(--gold-400);
}

/* ==========================================================================
   CONTENEDOR DE MAPA INTERACTIVO LEAFLET
   ========================================================================== */
.route-map-wrapper {
  position: relative;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.route-live-map {
  width: 100%;
  height: 220px;
  background: #111827;
  z-index: 1;
}

.map-overlay-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  color: #e2e8f0;
  font-weight: 600;
  z-index: 1000;
  pointer-events: none;
}

.logistics-grid-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 860px) {
  .logistics-grid-breakdown {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Ocultar en responsive: Ajustes */
  #btn-open-logistics-config {
    display: none !important;
  }

  /* Compactar el input y contenedor de ubicación */
  #places-engine-badge {
    display: none !important;
  }

  .location-input-field {
    padding-left: 34px !important;
    padding-right: 30px !important;
    font-size: 12px !important;
    height: 38px !important;
  }

  .location-input-icon {
    left: 10px;
    width: 14px;
    height: 14px;
  }

  /* Compactar la tarjeta de ruta y logística */
  .location-route-card {
    padding: 8px 10px;
    margin-top: 6px;
    border-radius: var(--radius-sm);
  }

  .logistics-card-top {
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .logistics-info-group {
    gap: 4px 6px;
  }

  .logistics-title {
    font-size: 11.5px;
    line-height: 1.25;
  }

  .waze-route-via {
    font-size: 10px;
    padding: 2px 6px;
  }

  .waze-eta-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .logistics-vehicle-tag {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  /* Grupo de acciones con solo Google Maps y Waze lado a lado */
  .logistics-actions-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
  }

  .logistics-actions-group .btn-nav-link {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 6px 4px;
    font-size: 11px;
    height: 30px;
  }

  /* Rejilla de métricas compacta 2x2 */
  .logistics-grid-breakdown {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .log-stat-col {
    padding: 4px 8px;
    min-width: 0;
    gap: 1px;
    border-radius: 4px;
  }

  .log-stat-lbl {
    font-size: 9px;
    letter-spacing: 0.2px;
  }

  .log-stat-val {
    font-size: 12.5px;
    word-break: break-all;
  }

  .log-stat-val.text-gold {
    font-size: 13px;
  }

  .log-stat-sub {
    font-size: 9px;
  }

  .tag-numeric-input {
    font-size: 12px;
  }

  .btn-tag-pill {
    font-size: 8.5px;
    padding: 0 4px;
  }

  .cat-header-left {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cat-pp-badge-widget {
    margin-left: 0;
    margin-top: 2px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .unit-toggle-btn {
    padding: 1px 5px;
    font-size: 10px;
  }
}

.log-stat-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-stat-col.log-stat-total {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.3);
}

.log-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.log-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.log-stat-val.text-gold {
  color: var(--gold-400);
  font-size: 15px;
}

.log-stat-sub {
  font-size: 10px;
  color: var(--text-dim);
}

.log-stat-tag-col {
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.log-stat-tag-col:focus-within {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.log-stat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.tag-quick-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-tag-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.15s ease;
}

.btn-tag-pill:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.5);
  color: var(--gold-400);
}

.btn-tag-pill.active {
  background: var(--gold-500);
  border-color: var(--gold-400);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.4);
}

.tag-input-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tag-input-prefix {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-400);
}

.tag-numeric-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  width: 100%;
  padding: 1px 0;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tag-numeric-input:hover {
  border-bottom-color: rgba(234, 179, 8, 0.6);
}

.tag-numeric-input:focus {
  border-bottom: 1px solid var(--gold-400);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  padding: 1px 4px;
}

.tag-numeric-input::-webkit-outer-spin-button,
.tag-numeric-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tag-numeric-input {
  -moz-appearance: textfield;
}

/* ==========================================================================
   INPUT NUMÉRICO DIRECTO EN CONTADORES DE PRODUCTOS
   ========================================================================== */
.counter-input {
  width: 48px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}

.counter-input::-webkit-outer-spin-button,
.counter-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.counter-input:focus {
  border-color: var(--gold-400);
  background: rgba(234, 179, 8, 0.1);
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.25);
}

/* ==========================================================================
   SECCIÓN RESUMEN AUDITABLE DE COSTOS AL PIE
   ========================================================================== */
.cost-summary-card {
  margin-top: 28px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cost-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cost-summary-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.cost-summary-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.cost-summary-badge {
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.cost-summary-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 600px) {
  .cost-summary-card {
    padding: 12px 10px;
    margin-top: 16px;
  }
}

.cost-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cost-summary-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.cost-summary-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.cost-summary-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.cost-summary-table .col-right {
  text-align: right;
}

.cost-summary-table .col-center {
  text-align: center;
}

.cost-summary-table tfoot td {
  padding: 10px 10px;
  border-bottom: none;
  font-weight: 700;
}

.cost-summary-table tfoot .total-prod-row {
  border-top: 2px solid rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.04);
  font-size: 13px;
  color: #fff;
}

.cost-summary-table tfoot .total-bruto-row {
  border-top: 1px dashed rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.08);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-400);
}

/* ==========================================================================
   AUTOCOMPLETADO DE LUGARES Y DIRECCIONES ESTILO GOOGLE MAPS
   ========================================================================== */
.location-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.location-input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--gold-400);
  pointer-events: none;
  z-index: 2;
}

.location-input-field {
  padding-left: 40px !important;
  padding-right: 36px !important;
  font-size: 13px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
}

.location-input-field:focus {
  border-color: var(--gold-400) !important;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25) !important;
}

.btn-clear-loc {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.btn-clear-loc:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.places-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #151922;
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 2px rgba(255, 255, 255, 0.2);
  z-index: 9999;
  max-height: 320px;
  overflow-y: auto;
}

.place-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.place-item:last-child {
  border-bottom: none;
}

.place-item:hover, .place-item.active {
  background: rgba(234, 179, 8, 0.14);
}

.place-item-icon {
  width: 20px;
  height: 20px;
  color: var(--gold-400);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.place-item-body {
  flex: 1;
  min-width: 0;
}

.place-item-main {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-item-main mark {
  background: transparent;
  color: var(--gold-400);
  font-weight: 800;
}

.place-item-sub {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.place-item-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.places-dropdown-footer {
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Estilo para el contenedor nativo de Google Places en caso de cargar API Key */
.pac-container {
  background-color: #151922 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7) !important;
  font-family: inherit !important;
  z-index: 10000 !important;
  margin-top: 4px !important;
}

.pac-item {
  color: var(--text-muted) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 9px 12px !important;
  cursor: pointer !important;
  font-size: 12px !important;
}

.pac-item:hover, .pac-item-selected {
  background-color: rgba(234, 179, 8, 0.12) !important;
}

.pac-item-query {
  color: #fff !important;
  font-size: 13px !important;
}

.pac-matched {
  color: var(--gold-400) !important;
  font-weight: 700 !important;
}

.pac-icon {
  filter: invert(1) brightness(1.6) sepia(1) hue-rotate(10deg) saturate(3) !important;
}

/* ==========================================================================
   MÓDULO DE PRODUCTOS ESPECIALES (CREACIÓN MANUAL)
   ========================================================================== */
.special-creator-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(20, 26, 38, 0.8) 100%);
  border: 1.5px dashed rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 12px 14px;
  transition: all 0.25s ease;
}

.special-creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.special-creator-title {
  font-size: 13px;
  font-weight: 700;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 6px;
}

.special-creator-toggle-btn {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde047;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.special-creator-toggle-btn:hover {
  background: #facc15;
  color: #0f172a;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.35);
}

.special-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr auto;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 900px) {
  .special-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .special-form-grid .btn-submit-special {
    grid-column: span 2;
  }
}

@media (max-width: 580px) {
  .special-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .special-form-grid .btn-submit-special {
    grid-column: span 1;
  }
}

.special-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.special-field-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.special-field-input {
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.special-field-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
}

.special-field-select {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.btn-submit-special {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  border: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 35px;
  transition: all 0.2s ease;
}

.btn-submit-special:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.btn-delete-special {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-delete-special:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.special-badge-tag {
  font-size: 10px;
  font-weight: 700;
  color: #fde047;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ==========================================================================
   COTIZACIÓN FORMAL BGM CATERING & CATÁLOGO VISUAL MULTI-PÁGINA (A4)
   ESTÉTICA EDITORIAL PARA PRODUCTORAS DE EVENTOS & PRESENTACIÓN CLIENTES
   ========================================================================== */
.modal-box-proposal {
  max-width: 900px !important;
  width: 96vw !important;
  background: #0b0c10 !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95) !important;
  padding: 16px 20px !important;
  max-height: 94vh !important;
  display: flex !important;
  flex-direction: column !important;
  transition: all 0.3s ease;
}

.modal-box-proposal.fullscreen-mode {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 12px 18px !important;
}

#commercial-quote-content-view {
  overflow-y: auto;
  max-height: calc(94vh - 160px);
  padding: 14px 8px 24px 8px;
  background: #07080a;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.modal-box-proposal.fullscreen-mode #commercial-quote-content-view {
  max-height: calc(100vh - 145px) !important;
}

/* Master Toolbar Editorial de la Propuesta */
.proposal-master-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.proposal-toolbar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.proposal-packs-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.proposal-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.proposal-counter-chip {
  font-size: 11px;
  color: #d1d5db;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.proposal-counter-chip strong {
  color: #f5d77f;
}

.proposal-btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.proposal-btn-icon:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #f5d77f;
  border-color: #d4af37;
}

.proposal-packs-label {
  font-size: 11px;
  font-weight: 700;
  color: #f5d77f;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}

.proposal-pack-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.proposal-pack-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: #d4af37;
  color: #fff;
}

.proposal-pack-btn.active {
  background: linear-gradient(135deg, #FFB22C 0%, #AA833F 100%);
  border-color: #AA833F;
  color: #000000;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(170, 131, 63, 0.35);
}

/* Barra editorial superior para cada página en la vista de documento continuo */
.bgm-page-container {
  margin: 0 auto 36px auto;
  max-width: 794px;
  position: relative;
}

.page-editorial-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #12141c;
  border: 1px solid rgba(170, 131, 63, 0.3);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  box-sizing: border-box;
}

.page-editorial-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-num-chip {
  background: linear-gradient(135deg, #FFB22C 0%, #AA833F 100%);
  color: #000000;
  font-weight: 800;
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.4px;
}

.page-title-text {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.page-subtitle-text {
  font-size: 10.5px;
  color: #9ca3af;
}

.page-include-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
}

.page-include-toggle input[type="checkbox"] {
  accent-color: #d4af37;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Hoja A4 Digital BGM (Página 1: Cotización Formal) */
.bgm-a4-sheet {
  position: relative;
  width: 100%;
  max-width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #111827;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Decoraciones geométricas doradas BGM idénticas a Páginas 2 a 9 */
.bgm-decor-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  pointer-events: none;
  z-index: 1;
}

.bgm-decor-corner-br {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 16%;
  width: auto;
  pointer-events: none;
  z-index: 1;
}

.bgm-sheet-content {
  position: relative;
  z-index: 2;
  padding: 18px 24px 14px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 1040px;
  box-sizing: border-box;
}

/* Tablas y elementos de Página 1 */
.proposal-table-main {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  box-sizing: border-box !important;
  margin-top: 8px;
  font-size: 11.5px;
}

.proposal-table-main th {
  background: #FFB22C;
  color: #111827;
  font-weight: 800;
  padding: 5px 8px;
  text-align: left;
  letter-spacing: 0.4px;
  font-size: 11px;
  overflow: hidden;
  box-sizing: border-box;
}

.proposal-table-main td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  vertical-align: middle;
  overflow: hidden;
  box-sizing: border-box;
}

.proposal-tax-tag {
  font-size: 8.5px;
  font-weight: 600;
  background: rgba(170, 131, 63, 0.12);
  color: #603D01;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 2px;
  vertical-align: middle;
}

/* Tarjeta de invitación al Dossier en Página 1 */
.dossier-invite-card {
  margin-top: 6px;
  background: #ffffff;
  border: 1px dashed #AA833F;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dossier-invite-icon {
  font-size: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dossier-invite-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.3px;
}

.dossier-invite-desc {
  font-size: 9px;
  color: #4b5563;
  line-height: 1.3;
  margin-top: 1px;
  font-weight: 400;
}

/* Pie de página de la propuesta BGM (Idéntico a Páginas 2 a 9) */
.bgm-page-footer {
  border-top: 1.5px solid #854836;
  padding-top: 6px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
}

.bgm-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bgm-footer-icon {
  width: 14px;
  height: 14px;
  color: #374151;
  flex-shrink: 0;
}

.bgm-footer-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.bgm-footer-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #111827;
}

.bgm-footer-val {
  font-size: 9.5px;
  font-weight: 400;
  color: #4b5563;
}

.bgm-footer-divider {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
}

/* Páginas de Galerías Fotográficas BGM */
.bgm-photo-sheet {
  position: relative;
  width: 100%;
  max-width: 794px;
  min-height: 1123px;
  background: #ffffff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-sizing: border-box;
  overflow: hidden;
}

.bgm-photo-sheet img {
  width: 100%;
  height: auto;
  display: block;
}

/* Ocultar páginas desmarcadas */
.bgm-page-container.is-excluded {
  display: none !important;
}



/* ==========================================================================
   REGLAS ESPECÍFICAS DE IMPRESIÓN / GUARDAR COMO PDF PARA BGM (A4 PROFESIONAL)
   ========================================================================== */
@media print {
  @page {
    size: 210mm 297mm;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ocultar cualquier elemento fuera del modal abierto de propuesta */
  body > *:not(#modal-commercial-quote) {
    display: none !important;
  }

  /* Ocultar elementos de la interfaz de la aplicación en la impresión */
  .header-container,
  .main-wrapper,
  .sidebar-panel,
  .floating-actions-bar,
  .drawer-overlay,
  #modal-kitchen,
  #modal-history,
  #modal-logistics-config,
  #commercial-quote-toolbar-view,
  #modal-commercial-quote .modal-header,
  #modal-commercial-quote .proposal-master-toolbar,
  #modal-commercial-quote .page-editorial-bar,
  #modal-commercial-quote .modal-footer,
  #modal-commercial-quote .btn,
  #modal-commercial-quote .modal-close {
    display: none !important;
  }

  #modal-commercial-quote.open {
    position: static !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 210mm !important;
    max-width: 210mm !important;
    overflow: visible !important;
  }

  #modal-commercial-quote.open .modal-box {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #commercial-quote-content-view {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: none !important;
    max-height: none !important;
  }

  /* Contenedor A4 Maestro para cada página: 296mm para dar 1mm de holgura y prevenir falsos desbordes */
  .bgm-page-container {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    height: 296mm !important;
    max-height: 296mm !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: always !important;
    break-after: page !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* La última página visible NUNCA debe forzar un salto de página adicional */
  .bgm-page-container:last-child,
  .bgm-page-container.is-last-visible-page {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .bgm-page-container.is-excluded {
    display: none !important;
  }

  /* Hoja A4 digital: Cotización Formal Página 1 */
  .bgm-a4-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    height: 296mm !important;
    max-height: 296mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  .bgm-sheet-content {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    height: 296mm !important;
    max-height: 296mm !important;
    /* Márgenes de seguridad profesionales A4: Top 10mm, Right 20mm, Bottom 10mm, Left 18mm */
    padding: 10mm 20mm 10mm 18mm !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #111827 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .proposal-table-main {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .proposal-table-main th {
    background: #FFB22C !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .proposal-table-main td {
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .bgm-page-footer {
    border-top: 1.5px solid #854836 !important;
    padding-top: 6px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .bgm-decor-ribbon {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 296mm !important;
    width: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  .bgm-decor-corner-br {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    height: 38mm !important;
    width: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  /* Catálogo de Páginas Fotográficas 2 a 9 (Sin saltos internos que dupliquen planas) */
  .bgm-photo-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    min-width: 210mm !important;
    height: 296mm !important;
    max-height: 296mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  .bgm-photo-sheet img {
    width: 210mm !important;
    height: 296mm !important;
    max-width: 210mm !important;
    max-height: 296mm !important;
    object-fit: fill !important;
    display: block !important;
  }
}

/* ==========================================================================
   TIEMPOS DEL SERVICIO / JORNADA MULTI-SERVICIO
   ========================================================================== */
.service-times-wrapper {
  margin: 12px 0 16px 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(234, 179, 8, 0.22);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-times-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.service-times-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.service-times-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-time-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.service-time-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fff;
}

.service-time-tab.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--gold-400);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.25);
}

.time-tab-time-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.service-time-tab.active .time-tab-time-badge {
  background: rgba(234, 179, 8, 0.25);
  color: #fff;
  border-color: var(--gold-400);
}

.service-time-tab-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.btn-tab-action {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-tab-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.btn-tab-action.edit:hover {
  color: var(--gold-400);
}

.btn-tab-action.delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
}

.btn-add-service-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px dashed rgba(52, 211, 153, 0.5);
  color: #34d399;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-service-time:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #6ee7b7;
  transform: translateY(-1px);
}

/* Pastillas de plantillas rápidas para el modal */
.service-time-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.btn-time-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-time-preset:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--gold-400);
  color: #fff;
}

/* Multi-servicio resumen en sidebar */
.multi-service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  color: #d1d5db;
  transition: background 0.15s ease;
  font-size: 11.5px;
  cursor: pointer;
}

.multi-service-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.multi-service-row.is-active-tab {
  background: rgba(234, 179, 8, 0.18);
  color: #fff;
  font-weight: 700;
}

/* PDF multi-service timeline styling */
.proposal-timeline-grid {
  display: grid;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.proposal-timeline-col {
  background: #fdfdfd;
  border: 1.5px solid #e5e7eb;
  border-top: 2.5px solid #AA833F;
  border-radius: 6px;
  padding: 6px 9px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.proposal-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 3.5px;
  margin-bottom: 4px;
}

.proposal-timeline-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.proposal-timeline-time {
  font-size: 9px;
  font-weight: 700;
  color: #854836;
}

/* ==========================================================================
   AUTH GATE CORPORATIVO - PANTALLA DE BLOQUEO GOOGLE
   ========================================================================== */
.auth-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(12, 14, 18, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-gate-card {
  background: #141820;
  border: 1.5px solid rgba(234, 179, 8, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(234, 179, 8, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 34px 28px;
  text-align: center;
  box-sizing: border-box;
  animation: gateCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gateCardPop {
  0% { transform: scale(0.93); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.auth-gate-logo {
  height: 48px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.auth-gate-title {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.auth-gate-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 3px 10px;
  border-radius: 20px;
}

.auth-gate-notice {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.auth-gate-icon {
  color: #facc15;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.auth-gate-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.auth-gate-error.hidden {
  display: none !important;
}

.auth-gate-actions {
  margin-bottom: 18px;
}

.auth-gate-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.auth-gate-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.google-icon-svg {
  flex-shrink: 0;
}

.auth-gate-footer {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.auth-gate-footer strong {
  color: #94a3b8;
}

/* User Profile Badge en Header */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
}

.user-profile-header.hidden {
  display: none !important;
}

.user-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eab308;
  color: #0c0e12;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.user-email-mini {
  font-size: 11.5px;
  color: #e2e8f0;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-logout-icon:hover {
  color: #f87171;
}




