:root {
  --bg: #f8fafc;
  --white: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
   --primary-dark: #1d4ed8;
    --primary-white: #aabbe9;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* Reset para consistencia cross-browser */
html {
  font-size: 16px;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #5b85df -90%, #647be0 100%);
  margin: 0;
  padding: 20px;
  color: #334155;
  min-height: 100vh;
}

img,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.page,
.sheet-header,
.sheet-body,
.sheet-footer {
  max-width: 100%;
}

pre {
  max-width: 100%;
  overflow: auto;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Header Styles */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.sheet-header .left h1 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 30px;
  font-weight: 700;
}

.subtitle {
  color: #475569;
  font-size: 20px;
  margin: 0;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.3px;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Patient Info Styles ACTUALIZADO */
.patient-info {
  background: #eaeef1;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.patient-info h3 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 16px;
}

.patient-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.patient-field {
  display: flex;
  flex-direction: column;
}

.patient-field label {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--secondary);
  font-size: 14px;
}

.patient-field input {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
}

.patient-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== NUEVO DISEÑO PARA LA BARRA DE BÚSQUEDA ===== */
.search-container {
  margin-bottom: 24px;
  position: relative;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.btn-preview {
  background: #43a8d6a8;
  color: white;
  border: 2px solid #43a8d6a8;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-preview:hover {
  background: #43a8d6a8;
  border-color: #43a8d6a8;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.search-box {
  position: relative;
  width: 100%;
}

#search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 20px center;
  background-size: 20px 20px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #334155;
  font-weight: 500;
}

#search-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

#search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

#search-input:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
}

/* Indicador de búsqueda activa */
.search-box::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.search-box:focus-within::after {
  width: 80%;
}

/* ===== NUEVO CONTADOR DE RESULTADOS DE BÚSQUEDA ===== */
.search-results-counter {
  position: absolute;
  top: -40px;
  right: 0;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  z-index: 101;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: slideDown 0.3s ease;
  display: none;
}

.search-results-counter.show {
  display: block;
}

.search-results-counter .counter-number {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
  font-weight: 700;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Resultados de búsqueda con nuevo diseño */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-top: none;
  border-radius: 0 0 20px 20px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  margin-top: -2px;
  padding: 8px 0;
}

.search-results.hidden {
  display: none;
}

.search-result-item {
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.search-result-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
  transition: width 0.3s ease;
}

.search-result-item:hover::before {
  width: 100%;
}

.search-result-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.search-result-item.selected {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-weight: 600;
  transform: translateX(4px);
}

.search-result-item.selected::before {
  display: none;
}

.search-result-item.selected .search-result-section {
  background: rgba(255, 255, 255, 0.9);
  color: #3b82f6;
  font-weight: 600;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-section {
  font-size: 11px;
  color: #6b7280;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.search-result-item:hover .search-result-section {
  background: #e2e8f0;
}

/* Scrollbar personalizado para los resultados */
.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 0 0 20px 0;
}

.search-results::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* Animación de entrada para resultados */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results:not(.hidden) {
  animation: slideIn 0.3s ease;
}

/* ===== ESTILOS PARA LA VISTA PREVIA ===== */
.preview-content {
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.preview-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.preview-section {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.preview-section-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 16px;
}

.preview-analysis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.preview-analysis:hover {
  background: #f8fafc;
}

.preview-analysis:last-child {
  border-bottom: none;
}

.preview-analysis-name {
  flex: 1;
  font-weight: 500;
}

.preview-analysis-price {
  font-weight: 600;
  color: var(--success);
  min-width: 80px;
  text-align: right;
}

.preview-total {
  background: #f8fafc;
  padding: 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  margin-top: auto;
}

.preview-subtotal,
.preview-discount,
.preview-total-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 16px;
}

.preview-subtotal {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.preview-discount {
  color: var(--warning);
  border-bottom: 1px solid var(--border);
}

.preview-total-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
}

/* Button Styles */
button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

button.primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

button.primary:hover {
  background: var(--primary-dark);
}

button.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

button.btn-warning {
  background: var(--warning);
  color: var(--white);
  border-color: var(--warning);
}

button.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

button.btn-info {
  background: #0ea5e9;
  color: var(--white);
  border-color: #0ea5e9;
}

/* Top Buttons - Nueva estructura de dos filas */
.top-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Filas de botones */
.button-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

/* Primera fila - distribución uniforme */
.first-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}

/* Segunda fila - distribución con espacios */
.second-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  align-items: start;
}

/* Columnas específicas para alineación */
.discount-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reset-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.print-column {
  display: flex;
  justify-content: flex-start;
}

.print-column button {
  margin-left: 8px;
  margin-right: 8px;
}

.calc-column {
  display: flex;
  justify-content: flex-end;
  grid-column: 3;
}

.calc-column button {
  margin-right: 5px;
  margin-left: 10px;
}

/* Discount Dropdown - CON VERDE MÁS CLARO */
.discount-container {
  position: relative;
  display: block;
}

.discount-btn {
  background: #10b981;
  color: white;
  border: 2px solid #10b981;
  width: 100%;
  justify-content: center;
  font-weight: 600;
  transition: var(--transition);
}

.discount-btn:hover {
  background: #059669;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.discount-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 2px solid #10b981;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
  margin-top: 4px;
  display: none;
  overflow: hidden;
}

.discount-dropdown.show {
  display: block;
}

.discount-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.discount-option:hover {
  background: #ecfdf5;
  color: #10b981;
}

.discount-option:last-child {
  border-bottom: none;
}

.discount-option.active {
  background: #10b981;
  color: var(--white);
  font-weight: 600;
}

.discount-option.active:hover {
  background: #059669;
  color: var(--white);
}

/* ===== SLIDER CORREGIDO - SOLUCIÓN 1 ===== */
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #f8fafc;
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 52px; /* Fijo en píxeles */
  height: 26px; /* Fijo en píxeles */
  background: var(--border);
  border-radius: 26px; /* Mismo que height */
  transition: var(--transition);
  flex-shrink: 0; /* Evita que se reduzca */
  border: 1px solid #cbd5e1;
}

.slider:before {
  content: "";
  position: absolute;
  width: 20px; /* Fijo */
  height: 20px; /* Fijo */
  background: var(--white);
  border-radius: 50%;
  top: 3px; /* (26px - 20px) / 2 = 3px */
  left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background: var(--success);
  border-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(25px); /* 52px - 20px - 3px*2 = 26px */
}

.switch-label {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* Estados de hover y focus para el slider */
.slider:hover {
  border-color: var(--primary-white);
}

input:focus + .slider {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  border-color: var(--primary-white  );
}

/* Asegurar que todos los botones tengan el mismo ancho */
.first-row > *,
.second-row > * {
  min-width: 0;
}

/* Total Area */
#total-area {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  font-size: 20px;
}

.total-label {
  font-size: 14px;
  opacity: 0.9;
  display: block;
  margin-bottom: 4px;
}

.analysis-count {
  font-size: 14px;
  opacity: 0.9;
  font-weight: normal;
  margin-left: 8px;
}

.discount-info {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
  font-style: italic;
}

/* Sheet Body Grid - SOLUCIÓN DEFINITIVA */
.sheet-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  align-items: start;
}

/* Section Cards */
.section {
  border: 2px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  max-height: 500px;
  overflow: auto;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  height: fit-content;
  display: inline-block;
}

.section:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.section .title {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Item Styles */
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: var(--transition);
  border-radius: 6px;
  margin-bottom: 4px;
}

.item:hover {
  background: #f1f5f9;
}

.item label {
  flex: 1;
  cursor: pointer;
  font-weight: 500;
}

/* Custom Checkbox */
.item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  appearance: none;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
}

/* Modal Styles */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--white);
  width: 95%;
  max-width: 1000px;
  border-radius: var(--radius);
  padding: 0;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.modal-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 12px;
}

.modal-close-btn:hover {
  color: var(--danger);
  transform: none;
}

.modal-list {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 16px;
  align-items: center;
}

.modal-list .m-title {
  font-weight: 700;
  padding: 12px 0;
  color: var(--primary);
  font-size: 16px;
}

.modal-list input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.modal-list input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border-top: 2px solid var(--border);
  background: #f8fafc;
}

.modal-result {
  margin-left: auto;
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
}

/* Estilos para el modal de contraseña */
.password-field {
  margin: 20px 0;
}

.password-field input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: var(--transition);
}

.password-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-message {
  margin-top: 8px;
  font-size: 14px;
  min-height: 20px;
}

.password-message.error {
  color: var(--danger);
  font-weight: 600;
}

.password-message.success {
  color: var(--success);
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin-bottom: 15px;
  color: var(--secondary);
  line-height: 1.5;
}

/* Footer */
.sheet-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* MEJORAS PARA DISTRIBUCIÓN DE BOTONES EN MÓVIL */
@media (max-width: 1024px) {
  .first-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .second-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .calc-column {
    grid-column: 2;
    justify-content: flex-end;
  }
  
  .print-column {
    grid-column: 1;
    justify-content: flex-start;
  }
  
  .print-column button,
  .calc-column button {
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 16px;
  }
  
  .sheet-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .sheet-body {
    grid-template-columns: 1fr;
  }
  
  .patient-fields {
    grid-template-columns: 1fr;
  }
  
  .search-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn-preview {
    width: 100%;
    justify-content: center;
  }
  
  .first-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .second-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .calc-column {
    grid-column: 2;
    justify-content: flex-end;
  }
  
  .print-column {
    grid-column: 1;
    justify-content: flex-start;
  }
  
  .print-column button,
  .calc-column button {
    margin: 0;
    width: 100%;
  }
  
  .button-row {
    gap: 8px;
  }
  
  .switch {
    width: 100%;
    justify-content: center;
  }
  
  .modal-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-list .m-title {
    grid-column: 1 / -1;
    margin-top: 16px;
  }
  
  /* Responsive para nueva barra de búsqueda */
  .search-box {
    max-width: 100%;
  }
  
  #search-input {
    padding: 14px 16px 14px 48px;
    font-size: 15px;
  }
  
  .search-results {
    border-radius: 0 0 16px 16px;
  }
  
  .search-result-item {
    padding: 12px 16px;
  }
  
  /* Ajuste del contador en móvil */
  .search-results-counter {
    top: -35px;
    right: 10px;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* Vista previa en móvil */
  .preview-content {
    margin: 10px;
    max-height: 90vh;
  }
  
  .preview-analysis {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .preview-analysis-price {
    text-align: left;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  
  .sheet-header .left h1 {
    font-size: 24px;
  }
  
  button {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .first-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .second-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .calc-column {
    grid-column: 2;
    justify-content: flex-end;
  }
  
  .print-column {
    grid-column: 1;
    justify-content: flex-start;
  }
  
  .print-column button,
  .calc-column button {
    margin: 0;
    width: 100%;
    justify-content: center;
  }
  
  .analysis-count {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
  
  /* SLIDER CORREGIDO PARA MÓVIL - MISMAS MEDIDAS */
  .slider {
    width: 52px !important; /* Forzar mismo tamaño */
    height: 26px !important;
  }
  
  input:checked + .slider:before {
    transform: translateX(25px) !important; /* Mismo desplazamiento */
  }
  
  /* Ajuste adicional del contador en móvil pequeño */
  .search-results-counter {
    top: -30px;
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* AGREGAR ESTOS ESTILOS AL FINAL DEL ARCHIVO style.css */

/* Estilos para la información adicional del paciente */
#patient-additional-info {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ajustes responsivos para la nueva funcionalidad */
@media (max-width: 768px) {
  #patient-additional-info div {
    grid-template-columns: 1fr !important;
  }
}

/* ESTILOS MEJORADOS PARA NOTIFICACIONES MODERNAS */
@keyframes slideInRight {
  from {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
}

#custom-notification {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#custom-notification:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Efecto de pulso sutil en el icono */
@keyframes pulseIcon {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

#custom-notification div:first-child {
  animation: pulseIcon 2s ease-in-out infinite;
}

/* Botón de cerrar con efecto hover */
#custom-notification div[onclick]:hover {
  background: rgba(255,255,255,0.3) !important;
  transform: scale(1.1);
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
  #custom-notification {
    right: 10px;
    left: 10px;
    max-width: none;
    top: 10px;
    font-size: 13px;
    padding: 14px 16px;
    border-radius: 10px;
  }
  
  #custom-notification div:first-child {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}

/* Efecto de desvanecimiento para múltiples notificaciones */
.notification-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  .notification-stack {
    right: 10px;
    left: 10px;
    top: 10px;
  }
}
/* ESTILOS PARA PREVENIR SCROLL DEL FONDO CUANDO LOS MODALES ESTÁN ABIERTOS */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Asegurar que los modales tengan su propio scroll */
.modal-content {
  overflow-y: auto;
  max-height: 90vh;
}

/* Estilos específicos para el modal de vista previa */
.preview-content {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.preview-body {
  flex: 1;
  overflow-y: auto;
}

/* Estilos específicos para el modal de precios */
.modal-list {
  max-height: 60vh;
  overflow-y: auto;
}

/* Mejorar el scroll de los modales */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* ESTILOS PARA EL BOTÓN GUARDAR PACIENTE */
.patient-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-save {
  background: #10b981;
  color: white;
  border: 2px solid #10b981;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-save:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-save:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.save-patient-result {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}

.save-patient-result.success {
  color: #10b981;
}

.save-patient-result.error {
  color: #ef4444;
}

.save-patient-result.info {
  color: #3b82f6;
}

/* Mejoras responsivas para el botón guardar */
@media (max-width: 768px) {
  .patient-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .save-patient-result {
    margin-left: 0;
    text-align: center;
  }
}
.btn-purple {
    background: #6f42c1;
    color: var(--white);
    border-color: #6f42c1;
    font-size: 12px;
    padding: 10px 12px;
}

.btn-purple:hover {
    background: #5a2d91;
    border-color: #5a2d91;
}

.btn-purple:disabled,
.btn-purple.disabled {
    background: var(--secondary);
    border-color: var(--secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-purple:disabled:hover,
.btn-purple.disabled:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: none;
    box-shadow: none;
}

.btn-success:disabled,
.btn-success.disabled {
    background: var(--secondary);
    border-color: var(--secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-success:disabled:hover,
.btn-success.disabled:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: none;
    box-shadow: none;
}
/* ESTILOS PARA BOTONES DE ACCIÓN DEL PACIENTE */
.patient-actions {
  animation: fadeIn 0.3s ease-in;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.patient-action-result {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
  padding: 8px;
  border-radius: 6px;
}

.patient-action-result.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.patient-action-result.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.patient-action-result.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons button {
    width: 100%;
  }
}
.management-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 15px auto;
  min-height: calc(100vh - 30px);
}

/* Responsive para gestión compacta */
@media (max-width: 768px) {
  .sections-container {
    grid-template-columns: 1fr;
  }
  
  .item-card {
    grid-template-columns: 1fr auto;
    grid-template-areas: 
      "label actions"
      "normal referido";
    gap: 6px;
  }
  
  .item-card .item-input {
    grid-area: label;
  }
  
  .item-card .price-input:nth-of-type(1) {
    grid-area: normal;
  }
  
  .item-card .price-input:nth-of-type(2) {
    grid-area: referido;
  }
  
  .item-card .actions-column {
    grid-area: actions;
  }
  
  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .section-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .section-title-input,
  .section-key-input {
    width: 100%;
    margin-right: 0;
    margin-bottom: 5px;
  }
  
  .management-actions {
    flex-direction: column;
  }
  
  .management-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .management-container {
    padding: 10px;
    margin: 10px;
  }
  
  .management-header h1 {
    font-size: 20px !important;
  }
  
  .subtitle {
    font-size: 12px !important;
  }
}

/* Mejoras visuales para inputs compactos */
.section-title-input:focus,
.section-key-input:focus,
.item-input:focus,
.price-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Estados de hover para las tarjetas compactas */
.section-card:hover {
  border-color: var(--primary);
}

.item-card:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* Botones de acción compactos */
.btn-icon {
  transition: all 0.2s ease;
}

.btn-icon:hover {
  transform: scale(1.05);
}

/* Mejor scroll para items */
.items-container {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
} 
/* Estilos para pestañas */
.tabs-container {
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary);
    background: #f8fafc;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #f0f7ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Estilos para análisis en perfiles */
.profile-analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.profile-analysis-item:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.profile-analysis-info {
    flex: 1;
}

.profile-analysis-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.profile-analysis-group {
    font-size: 12px;
    color: var(--muted);
}

.profile-analysis-price {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

.profile-analysis-actions {
    display: flex;
    gap: 8px;
}

.profile-analysis-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Estilos para perfiles seleccionados */
.profile-item {
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
    margin-bottom: 8px;
}

.profile-item:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}

.profile-item.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.profile-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.profile-info {
    font-size: 12px;
    opacity: 0.8;
}

.profile-price {
    font-weight: 600;
    color: var(--success);
}

.profile-item.active .profile-price {
    color: #bbf7d0;
}

/* Indicador de perfil en vista previa */
.profile-indicator {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-indicator .profile-name {
    font-size: 16px;
    margin: 0;
}

.profile-indicator .profile-price {
    font-size: 18px;
}
/* ========== ESTILOS PARA PERFILES - AGREGAR AL FINAL DE style.css ========== */

/* Selector de perfiles en página principal */
#profile-selector {
    transition: all 0.3s ease;
}

#profile-selector select {
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#profile-selector select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Indicador de perfil en vista previa */
.profile-indicator {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.profile-indicator .profile-name {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

.profile-indicator .profile-price {
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Información del perfil seleccionado */
#profile-info {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos para el total cuando hay perfil seleccionado */
.discount-info {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    font-style: italic;
    color: #6b7280;
}

/* Responsive para selector de perfiles */
@media (max-width: 768px) {
    #profile-selector {
        margin-top: 10px;
        padding: 12px;
    }
    
    .profile-indicator {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .profile-indicator .profile-price {
        font-size: 16px;
    }
}
/* Estilo para el mensaje de análisis adicionales */
.discount-info {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    font-style: italic;
}

/* Mejora visual para el selector de perfiles */
#profile-selector {
    transition: all 0.3s ease;
}

#profile-selector select {
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#profile-selector select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Estilo para el mensaje de análisis adicionales */
.discount-info {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    font-style: italic;
}

/* Mejora visual para el selector de perfiles */
#profile-selector {
    transition: all 0.3s ease;
}

#profile-selector select {
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#profile-selector select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Estilos para la vista previa con perfiles */
.profile-analyses-count {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.preview-section-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 16px;
}

/* Estilo especial para la sección del perfil */  
.preview-section-header:first-child {
  background: linear-gradient(135deg, #3dbefa, #058bc9);
}

/* ===== ESTILOS PARA LA BÚSQUEDA EN EL MODAL DE PERFILES ===== */

/* Asegurar que la barra de búsqueda en el modal tenga el mismo estilo */
#profiles-search {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 20px 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #334155;
    font-weight: 500;
}

#profiles-search::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

#profiles-search:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

#profiles-search:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
}

/* Contador de resultados para perfiles en el modal */
#profiles-search-results-counter {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Ajustes específicos para el modal */
#profiles-modal .search-container {
    margin-bottom: 0;
}

#profiles-modal .search-header {
    max-width: none;
    margin: 0;
}

#profiles-modal-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#profiles-modal-list::-webkit-scrollbar {
    width: 6px;
}

#profiles-modal-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#profiles-modal-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#profiles-modal-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* ===== ESTILOS PARA LA BÚSQUEDA EN GESTIÓN DE PERFILES ===== */

/* Asegurar que la barra de búsqueda en gestión tenga el mismo estilo */
#profile-search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 20px center;
  background-size: 20px 20px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #334155;
  font-weight: 500;
}

#profile-search-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

#profile-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

#profile-search-input:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
}

/* Contador de resultados para búsqueda en perfiles */
#profile-search-results-counter {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Ajustes específicos para la búsqueda en gestión */
#profiles-tab .search-container {
  margin-bottom: 15px;
}

#profiles-tab .search-header {
  max-width: none;
  margin: 0;
}

/* Efecto de highlight para análisis seleccionados desde búsqueda */
.profile-analysis-item.highlight {
  animation: highlightPulse 2s ease-in-out;
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
}

@keyframes highlightPulse {
  0% {
    background: #dbeafe;
    border-color: #3b82f6;
    transform: scale(1);
  }
  50% {
    background: #bfdbfe;
    border-color: #2563eb;
    transform: scale(1.02);
  }
  100% {
    background: #f8fafc;
    border-color: var(--border);
    transform: scale(1);
  }
}
/* Estilos para análisis seleccionados en perfiles */
.selected-analysis-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: move;
}

.selected-analysis-item:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.selected-analysis-item.dragging {
  opacity: 0.5;
  background: #e2e8f0;
}

.selected-analysis-item.drag-over {
  border-color: var(--primary);
  background: #dbeafe;
}

.selected-analysis-info {
  flex: 1;
}

.selected-analysis-name {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 4px;
}

.selected-analysis-section {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.selected-analysis-actions {
  display: flex;
  gap: 8px;
}

/* Estados de drag and drop */
.drop-indicator {
  height: 3px;
  background: var(--primary);
  margin: 4px 0;
  border-radius: 2px;
}

.discount-input-wrapper input {
  width: 100%;
  padding: 25px 60px 25px 30px;
  border: 3px solid #fbbf24;
  border-radius: 16px;
  font-size: 36px;
  font-weight: 700;
  color: #d97706;
  text-align: center;
  background: #fef3c7;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}
