/* Component Styles */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--surface-hover);
  color: var(--foreground);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--border-light);
}

.btn-danger {
  background-color: var(--error);
  color: white;
}

.btn-danger:hover {
  background-color: hsl(0, 84%, 50%);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input.form-control[type="password"],
input.form-control[type="number"],
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: var(--surface);
  color: var(--foreground);
  transition: var(--transition-smooth);
}

.form-input:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(217, 91%, 60%, 0.1);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Lucide Icons */
[data-lucide] {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
}

[data-lucide="more-horizontal"] {
  width: 16px;
  height: 16px;
}

[data-lucide="edit"],
[data-lucide="eye"],
[data-lucide="trash-2"],
[data-lucide="settings"] {
  width: 16px;
  height: 16px;
}

/* Action buttons fallback */
.btn-ghost.btn-sm {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost.btn-sm:empty::before {
  content: "⋮";
  font-size: 18px;
  line-height: 1;
}

/* Search Box */
.search-box {
  position: relative;
  max-width: 400px;
}

.search-box input {
  padding-left: 2.5rem;
  width: 100%;
}

.search-box svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* Filters Section */
.filters-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.filter-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.filter-controls .form-input {
  min-width: 140px;
  font-size: 0.875rem;
}

.export-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.date-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.results-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Tables */
.table-container {
  background-color: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background-color: var(--surface-hover);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--foreground);
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--foreground);
  vertical-align: middle;
}

.data-table td:last-child {
  text-align: left;
}

.data-table tr:hover {
  background-color: var(--surface-hover);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Botón de ver hoteles en tabla de servicios */
.btn-view-hotels {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-view-hotels:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.btn-view-hotels:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

.btn-view-hotels span {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-secondary {
  background-color: var(--surface-hover);
  color: var(--text-muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--surface);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-hover);
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.modal-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-bottom: 0;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background-color: var(--surface);
  min-width: 160px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown.active .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
  z-index: 1001;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: none;
  background: none;
  color: var(--foreground);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown-item:hover {
  background-color: var(--surface-hover);
}

.dropdown-item.danger {
  color: var(--error);
}

/* Reports */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.report-card {
  background-color: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.report-card h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Fix report chart canvas sizing to prevent overflow and giant heights */
.report-card {
  position: relative;
}

.report-card canvas {
  display: block;
  width: 100% !important;
  height: 320px !important;
}

/* Responsive Tables */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
  }
  
  .data-table {
    min-width: 600px;
  }
  
  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .date-filters {
    flex-direction: column;
  }
  
  .reports-grid {
    grid-template-columns: 1fr;
  }
}

.channel-badge {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background-color: var(--primary);
  color: white;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Service Action Buttons */
.service-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.service-action-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.service-action-btn.edit {
  background-color: var(--primary);
  color: white;
}

.service-action-btn.edit:hover {
  background-color: var(--primary-dark);
}

.service-action-btn.remove {
  background-color: var(--error);
  color: white;
}

.service-action-btn.remove:hover {
  background-color: var(--error-dark);
}

.hotel-info {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-hover) 100%);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.hotel-info h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hotel-info h4::before {
  content: "🏨";
  font-size: 1.5rem;
}

.hotel-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.hotel-info-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hotel-info-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 0.375rem;
  border: 1px solid var(--border-light);
}

.hotel-info-detail strong {
  color: var(--foreground);
  font-weight: 500;
}

/* Lista de servicios mejorada */
.hotel-services-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.service-item:hover::before {
  opacity: 1;
}

.service-item-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-name::before {
  content: "⚙️";
  font-size: 1.2rem;
}

.service-code {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Monaco', 'Menlo', monospace;
  background: var(--surface-hover);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-block;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-light);
}

.service-channels {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Texto "Canales:" ahora se maneja con traducción en JS */
.service-channels-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
  font-weight: 500;
  display: inline-block;
}

/* Channel badges mejorados */
.channel-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.channel-badge:contains("Email") {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.channel-badge:contains("WhatsApp") {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Fallback para navegadores que no soportan :contains */
.channel-badge {
  background: var(--primary);
  color: white;
}


/* StatusIN Section Styling */
#self-in-status-section .checkbox-group {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

#self-in-status-section .checkbox-label {
  flex: 0 0 auto;
  min-width: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#self-in-status-section .checkbox-label p {
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* URL Input Field for SELF_IN Service */
#self-in-url {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    transition: all 0.2s ease;
    width: 100%;
}

#self-in-url:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--background);
}

#self-in-url:invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

#self-in-url:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

#self-in-url::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* StatusIN badge for SELF_IN service */
.service-status-in {
  margin-top: 0.75rem;
}

.status-in-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-in-badge.status-in-active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 1px solid #10b981;
}

.status-in-badge.status-in-inactive {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: 1px solid #ef4444;
}

/* URL Badge for SELF_IN service */
.service-url {
  margin-top: 0.5rem;
}

.url-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: 1px solid #3b82f6;
  text-transform: none;
  letter-spacing: normal;
}

.url-badge a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-badge a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .url-badge a {
    max-width: 150px;
  }
}

/* Evolution connection state panel for SELF_IN service */
.evolution-connection-panel {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
}

.evolution-panel-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Reutiliza .status-in-badge como base; solo se agregan los estados sin equivalente */
.status-in-badge.status-in-connecting {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: 1px solid #f59e0b;
}

.status-in-badge.status-in-unknown {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Communication Channels Section Styling */
.checkbox-group .checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.checkbox-group .checkbox-label p {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive: En pantallas pequeñas mantener en línea pero con menos gap */
@media (max-width: 480px) {
  #self-in-status-section .checkbox-group {
    gap: 1rem;
  }
}


/* Form help text */
.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}



/* Service Form Improvements */
#add-service-form {
  padding: 1.5rem;
  background: var(--background);
}

#add-service-form .form-group {
  margin-bottom: 1.5rem;
}

#add-service-form .form-group:last-of-type {
  margin-bottom: 0;
}

#add-service-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
  letter-spacing: 0.025em;
}

/* Service Select Styling */
#service-select {
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

#service-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: var(--background);
}

#service-select:hover:not(:disabled) {
  border-color: var(--primary);
}

#service-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--surface-hover);
}

/* Checkbox Group Styling */
.checkbox-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 0.5rem;
  background: var(--surface);
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-label:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-light);
  border-radius: 0.25rem;
  background: var(--background);
  position: relative;
  transition: all 0.2s ease;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.875rem;
  font-weight: bold;
}

/* Radio Button Styling (same as checkbox but for radio inputs) */
.checkbox-label input[type="radio"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  background: var(--background);
  position: relative;
  transition: all 0.2s ease;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-label input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem;
  height: 0.5rem;
  background: white;
  border-radius: 50%;
}

.checkbox-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

/* Hide the old checkmark span */
.checkbox-label .checkmark {
  display: none;
}

/* Modal Footer Improvements - Consolidated */
.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 0.75rem 0.75rem;
  padding: 1.5rem;
}

/* Service Form Header */
.modal-header {
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0;
}

.modal-header h3 {
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h3::before {
  content: '⚙️';
  font-size: 1.25rem;
}

/* Service Form Responsive Design */
@media (max-width: 768px) {
  #add-service-form {
    padding: 1rem;
  }
  
  .checkbox-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .checkbox-label {
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  
  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  
  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Form Section Dividers */
.form-section {
  position: relative;
  margin: 2rem 0;
}

.form-section::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

.form-section:first-child::before {
  display: none;
}

/* Enhanced Form Labels */
#add-service-form label[for] {
  position: relative;
}

#add-service-form label[for]::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 2rem;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  opacity: 0.3;
}

/* Form Group Focus Effects */
.form-group:focus-within label {
  color: var(--primary);
}

.form-group:focus-within label::after {
  opacity: 1;
  width: 3rem;
  transition: all 0.3s ease;
}

/* Status y acciones */
.service-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.active {
  color: var(--success);
  border: 1px solid var(--success);
}

/* Service actions mejoradas */
.service-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.service-action-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  position: relative;
  overflow: hidden;
}

.service-action-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.service-action-btn:hover::before {
  left: 100%;
}

.service-action-btn.edit {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.service-action-btn.edit:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.service-action-btn.remove {
  background: linear-gradient(135deg, var(--error), hsl(0, 84%, 50%));
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.service-action-btn.remove:hover {
  background: linear-gradient(135deg, hsl(0, 84%, 50%), var(--error));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

/* Empty state mejorado */
.services-empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 0.75rem;
  border: 2px dashed var(--border-light);
}

.services-empty-state::before {
  content: "📋";
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.services-empty-state p:first-of-type {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .hotel-info-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hotel-info-details {
    grid-template-columns: 1fr;
  }
  
  .service-item-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .service-status {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  
  .service-actions {
    gap: 0.75rem;
  }
}

/* Loading spinner para servicios */
.services-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

.services-loading::before {
  content: "⚙️";
  font-size: 2rem;
  animation: spin 2s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tooltips mejorados para los botones */
.service-action-btn[title] {
  position: relative;
}

.service-action-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(0.25rem); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Login Styles */
#login-modal {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

#login-modal .modal-content {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#login-form input[type="password"] {
  transition: all 0.2s ease;
}

#login-form input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

#toggle-password:hover {
  color: var(--primary);
}

#login-error {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logout button styles */
#logout-btn {
  transition: all 0.2s ease;
}

#logout-btn:hover {
  background-color: var(--surface-hover);
  color: var(--error);
}

/* Loading animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   LOGIN MODAL STYLES - PROFESSIONAL DESIGN
   ======================================== */

.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    hsl(217, 91%, 60%) 0%, 
    hsl(217, 91%, 45%) 50%, 
    hsl(215, 25%, 27%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

.login-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.login-pattern {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    transparent);
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  z-index: 2;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.logo-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6rem;
  height: 6rem;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* Login Form */
.login-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.label-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.input-container {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  padding-right: 3rem;
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--foreground);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.toggle-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Login Button */
.login-button {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 1rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 
    0 4px 15px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-button:active {
  transform: translateY(0);
}

.button-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.button-text {
  font-weight: 600;
}

.button-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  transition: left 0.6s ease;
}

.login-button:hover .button-shine {
  left: 100%;
}

/* Error Message */
.login-error {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 1rem;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.login-error.show {
  display: flex;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.error-text {
  flex: 1;
}

/* Login Footer */
.login-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.footer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.footer-icon {
  width: 1rem;
  height: 1rem;
  color: var(--success);
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-card {
    margin: 1rem;
    padding: 2rem;
    border-radius: 1.5rem;
  }
  
  .login-title {
    font-size: 1.75rem;
  }
  
  .logo-icon {
    width: 4rem;
    height: 4rem;
  }
  
  .logo-icon svg {
    width: 2rem;
    height: 2rem;
  }
}

/* =============================================
   Cache Info Modal Styles
   ============================================= */

.cache-info-modal-content {
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  margin: auto;
  background: var(--background);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

.cache-info-body {
  padding: 1.5rem;
}

.cache-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.cache-info-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.cache-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary-light);
}

.cache-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cache-info-card:hover::before {
  opacity: 1;
}

.cache-info-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.cache-info-details h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cache-info-details p {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
  line-height: 1.2;
}

.cache-info-details small {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

.cache-items-list {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

.cache-items-list h4 {
  margin: 0 0 1rem 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
}

.cache-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cache-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.cache-item:hover {
  border-color: var(--primary-light);
  background: var(--surface-hover);
}

.cache-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cache-item-icon {
  font-size: 1.25rem;
}

.cache-item-details h5 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.cache-item-details p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cache-item-stats {
  text-align: right;
}

.cache-item-count {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
}

.cache-item-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cache-release-notes {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-hover) 100%);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: none;
}

.cache-release-notes.show {
  display: block;
}

/* Version sections styling */
.version-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  position: relative;
}

.version-section.current-version {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-hover) 100%);
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.version-section.previous-version {
  background: var(--surface);
  border-color: var(--border-light);
  opacity: 0.9;
}

.version-section h5 {
  margin: 0 0 1rem 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.version-section.current-version h5 {
  color: var(--primary);
}

.version-section.previous-version h5 {
  color: var(--text-muted);
}

.version-section .cache-release-date {
  font-size: 0.75rem;
  font-weight: normal;
  background: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.version-section.current-version .cache-release-date {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Responsive version sections */
@media (max-width: 768px) {
  .version-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .version-section h5 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.cache-release-notes h4 {
  margin: 0 0 1rem 0;
  color: var(--foreground);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cache-release-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
}

.cache-release-highlights {
  margin-bottom: 1rem;
}

.cache-release-highlights ul {
  margin: 0.5rem 0;
  padding-left: 1rem;
  list-style: none;
}

.cache-release-highlights li {
  margin: 0.5rem 0;
  color: var(--foreground);
  font-size: 0.875rem;
  position: relative;
}

.cache-release-highlights li::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.5rem;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

.cache-release-technical {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

.cache-release-technical summary {
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

.cache-release-technical summary:hover {
  color: var(--foreground);
}

.cache-release-technical ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1rem;
  list-style: none;
}

.cache-release-technical li {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.cache-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.cache-actions .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.cache-actions .btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.cache-actions .btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.cache-actions .btn-outline-danger {
  color: #ef4444;
  border-color: #ef4444;
  background: transparent;
}

.cache-actions .btn-outline-danger:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Empty state */
.cache-empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.cache-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive design */
@media (max-width: 768px) {
  .cache-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .cache-info-card {
    padding: 1rem;
  }
  
  .cache-info-icon {
    font-size: 1.5rem;
  }
  
  .cache-info-details p {
    font-size: 1rem;
  }
  
  .cache-actions {
    flex-direction: column;
  }
  
  .cache-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cache-info-grid {
    grid-template-columns: 1fr;
  }
  
  .cache-info-modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 1rem;
  }
}

/* Modal animations */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.cache-info-modal-content.closing {
  animation: modalSlideOut 0.2s ease-in forwards;
}

/* =============================================
   Tutorial Menu Modal Styles
   ============================================= */

.tutorial-menu-content {
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.tutorial-menu-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.tutorial-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tutorial-option-btn {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.tutorial-option-btn:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.tutorial-option-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 1rem;
  color: white;
}

.tutorial-option-content {
  flex: 1;
}

.tutorial-option-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foreground);
}

.tutorial-option-content p {
  margin: 0 0 0.75rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tutorial-duration {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .tutorial-menu-content {
    width: 95%;
    margin: 1rem;
  }
  
  .tutorial-option-btn {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .tutorial-option-icon {
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
  }
}

/* =============================================
   Welcome Tutorial Modal Styles
   ============================================= */

.welcome-modal-content {
  max-width: 600px;
  width: 90%;
  margin: auto;
  background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  border-radius: 2rem;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: welcomeSlideIn 0.6s ease-out;
  position: relative;
}

@keyframes welcomeSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.welcome-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.6), 
    transparent);
}

/* Welcome Header */
.welcome-modal-header {
  text-align: center;
  padding: 3rem 2rem 2rem 2rem;
  position: relative;
}

.welcome-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.welcome-icon {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  z-index: 2;
  box-shadow: 
    0 10px 25px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.welcome-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.welcome-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6rem;
  height: 6rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: welcomePulse 3s ease-in-out infinite;
}

@keyframes welcomePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* Welcome Body */
.welcome-modal-body {
  padding: 0 2rem 2rem 2rem;
}

.welcome-main-text {
  font-size: 1.1rem;
  color: var(--foreground);
  text-align: center;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

.welcome-main-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* Features Grid */
.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.welcome-feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.welcome-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
}

.feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--foreground);
  font-weight: 500;
}

/* Info Items */
.welcome-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface-hover);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.info-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* Welcome Footer */
.welcome-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
}

.welcome-modal-footer .btn {
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  justify-content: center;
}

.welcome-modal-footer .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.welcome-modal-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.welcome-modal-footer .btn-secondary {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.welcome-modal-footer .btn-secondary:hover {
  background: var(--border-light);
  color: var(--foreground);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-modal-content {
    width: 95%;
    margin: 1rem;
    border-radius: 1.5rem;
  }
  
  .welcome-modal-header {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
  }
  
  .welcome-modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }
  
  .welcome-title {
    font-size: 1.75rem;
  }
  
  .welcome-features {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .welcome-feature {
    padding: 0.75rem;
  }
  
  .welcome-modal-footer {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
  }
  
  .welcome-modal-footer .btn {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .welcome-icon {
    width: 4rem;
    height: 4rem;
  }
  
  .welcome-icon svg {
    width: 2rem;
    height: 2rem;
  }
  
  .welcome-glow {
    width: 5rem;
    height: 5rem;
  }
  
  .welcome-title {
    font-size: 1.5rem;
  }
}

/* =============================================
   Tutorial System Styles (Intro.js customization)
   ============================================= */

/* Tutorial button styling */
#tutorial-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

#tutorial-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Intro.js custom styling */
.introjs-tooltip {
  background: var(--background) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 1rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  color: var(--foreground) !important;
  font-size: 0.875rem !important;
  max-width: 400px !important;
  min-width: 300px !important;
}

.introjs-tooltip-header {
  background: transparent !important;
  border: none !important;
  padding: 1.5rem 1.5rem 0 1.5rem !important;
}

.introjs-tooltiptext {
  padding: 0 1.5rem 1rem 1.5rem !important;
  line-height: 1.6 !important;
  color: var(--foreground) !important;
}

.introjs-tooltiptext strong {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

/* Botones del tutorial */
.introjs-button {
  background: var(--primary) !important;
  border: none !important;
  border-radius: 0.5rem !important;
  color: white !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
}

.introjs-button:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px) !important;
}

.introjs-skipbutton {
  background: var(--surface-hover) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-light) !important;
}

.introjs-skipbutton:hover {
  background: var(--border-light) !important;
  color: var(--foreground) !important;
}

/* Highlight personalizado */
.introjs-helperLayer {
  background: rgba(0, 0, 0, 0.7) !important;
  border: 3px solid var(--primary) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5) !important;
}

/* Progress bar */
.introjs-progress {
  background: var(--surface-hover) !important;
  border-radius: 1rem !important;
  height: 6px !important;
}

.introjs-progressbar {
  background: linear-gradient(90deg, var(--primary), var(--primary-light)) !important;
  border-radius: 1rem !important;
}

/* Bullets (si se habilitan) */
.introjs-bullets ul li a {
  background: var(--border-light) !important;
  border-radius: 50% !important;
}

.introjs-bullets ul li a.active {
  background: var(--primary) !important;
}

/* Overlay personalizado */
.introjs-overlay {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(2px) !important;
}

/* Animaciones suaves para los tooltips */
.introjs-tooltip {
  animation: tutorialSlideIn 0.3s ease-out !important;
}

@keyframes tutorialSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive tutorial */
@media (max-width: 768px) {
  .introjs-tooltip {
    max-width: 300px !important;
    min-width: 250px !important;
    font-size: 0.8rem !important;
  }
  
  .introjs-tooltiptext {
    padding: 0 1rem 1rem 1rem !important;
  }
  
  .introjs-tooltip-header {
    padding: 1rem 1rem 0 1rem !important;
  }
  
  #tutorial-btn span:last-child {
    display: none;
  }
}

@media (max-width: 480px) {
  .introjs-tooltip {
    max-width: 280px !important;
    min-width: 220px !important;
  }
}

/* Message Templates Styles */
.templates-container {
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--surface);
}

.template-tabs {
  display: flex;
  background-color: var(--surface-hover);
  border-bottom: 1px solid var(--border-light);
}

.template-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background-color: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.875rem;
  font-weight: 500;
}

.template-tab:hover {
  background-color: var(--border-light);
  color: var(--foreground);
}

.template-tab.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.template-content {
  position: relative;
}

.template-panel {
  display: none;
  padding: 1rem;
}

.template-panel.active {
  display: block;
}

.template-panel label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.template-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  background-color: var(--surface);
  color: var(--foreground);
  transition: var(--transition-smooth);
}

.template-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

.template-textarea::placeholder {
  color: var(--text-muted);
}

.template-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  background-color: var(--surface-hover);
}

.template-actions .btn {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

/* Preview Modal Styles */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.preview-modal-content {
  background-color: var(--surface);
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.preview-modal-header h3 {
  margin: 0;
  color: var(--foreground);
}

.preview-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: var(--transition-smooth);
}

.preview-modal-close:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.preview-content {
  background-color: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 1rem;
  white-space: pre-wrap;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
}

.preview-variables {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 0.375rem;
}

.preview-variables h4 {
  margin: 0 0 0.5rem 0;
  color: var(--info-text);
  font-size: 0.875rem;
}

.preview-variables ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--info-text);
  font-size: 0.75rem;
}

/* Language Management Styles */
.management-section {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.section-header h3 {
  margin: 0;
  color: var(--foreground);
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.language-panel {
  background-color: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 1.5rem;
}

.language-panel h4 {
  margin: 0 0 1rem 0;
  color: var(--foreground);
  font-size: 1rem;
}

.languages-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.language-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.25rem;
  transition: var(--transition-smooth);
}

.language-item:hover {
  background-color: var(--border-light);
}

.language-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-flag {
  font-size: 1.25rem;
}

.language-name {
  font-weight: 500;
  color: var(--foreground);
}

.language-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--surface-hover);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

.language-actions {
  display: flex;
  gap: 0.25rem;
}

.language-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.presets-section {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.presets-section h4 {
  margin: 0 0 1rem 0;
  color: var(--foreground);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .language-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .presets-grid {
    grid-template-columns: 1fr;
  }
  
  .language-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .language-actions {
    align-self: flex-end;
  }
}

/* Variables Helper Styles */
.variables-helper {
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1rem;
}

.variables-helper h4 {
  margin: 0 0 0.5rem 0;
  color: var(--info-text);
  font-size: 1rem;
}

.helper-description {
  margin: 0 0 1rem 0;
  color: var(--info-text);
  font-size: 0.875rem;
}

.variables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.variable-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.variable-btn:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.variable-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.variable-btn:hover::before {
  left: 100%;
}

.variable-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.variable-name {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.variable-btn:hover .variable-name {
  color: var(--primary-foreground);
}

.variable-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.variable-btn:hover .variable-desc {
  color: var(--primary-foreground);
  opacity: 0.9;
}

.helper-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Variables Examples Modal Styles */
#variables-examples-modal {
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#variables-examples-modal[style*="display: none"] {
  display: none !important;
}

#variables-examples-modal .modal-content {
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  margin: 0;
  position: relative;
  z-index: 100000 !important;
  animation: modalFadeIn 0.3s ease-out;
  background-color: var(--surface) !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force all children to have high z-index */
#variables-examples-modal * {
  z-index: inherit !important;
}

#variables-examples-modal .modal-header,
#variables-examples-modal .modal-body,
#variables-examples-modal .modal-close,
#variables-examples-modal .examples-grid,
#variables-examples-modal .example-card {
  z-index: 100001 !important;
  position: relative !important;
}

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

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.example-card {
  background-color: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 1rem;
  transition: var(--transition-smooth);
}

.example-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.example-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.example-header .variable-icon {
  font-size: 1.25rem;
}

.example-header code {
  background-color: var(--primary-alpha);
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 600;
}

.example-content p {
  margin: 0 0 0.5rem 0;
  color: var(--foreground);
  font-size: 0.875rem;
}

.example-before,
.example-after {
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  margin: 0.25rem 0;
}

.example-before {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.example-after {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.usage-tips {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 0.5rem;
  padding: 1rem;
}

.usage-tips h4 {
  margin: 0 0 0.75rem 0;
  color: var(--warning-text);
  font-size: 1rem;
}

.usage-tips ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--warning-text);
}

.usage-tips li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Variable insertion animation */
.variable-inserted {
  background-color: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  animation: variableInserted 0.6s ease-out;
}

@keyframes variableInserted {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--success);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Responsive adjustments for variables */
@media (max-width: 768px) {
  .variables-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
  }
  
  .variable-btn {
    padding: 0.75rem 0.5rem;
  }
  
  .variable-icon {
    font-size: 1.25rem;
  }
  
  .variable-name {
    font-size: 0.75rem;
  }
  
  .variable-desc {
    font-size: 0.7rem;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .helper-actions {
    flex-direction: column;
  }
}

/* Default Template Modal Styles */
.default-template-modal {
  max-width: 700px;
  max-height: 80vh;
  z-index: 10000 !important;
}

.default-template-modal .modal-overlay {
  z-index: 10000 !important;
}

.template-info {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.template-info p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--foreground);
}

.template-content {
  margin-bottom: 1rem;
}

.template-content label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--foreground);
}

.template-content textarea {
  width: 100%;
  min-height: 300px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0.25rem;
  padding: 0.75rem;
  resize: vertical;
  color: var(--foreground);
}

/* Default indicator in language list */
.default-indicator {
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.7rem;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* No languages message */
.no-languages-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-light);
  border-radius: 0.5rem;
}

.no-languages-message p {
  margin: 0.5rem 0;
}

.no-languages-message .text-muted {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Language Management Layout */
.language-management-content {
  padding: 1rem 0;
}

.active-languages-section {
  margin-bottom: 2rem;
}

.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.section-header-with-action h4 {
  margin: 0;
  color: var(--foreground);
}

/* Add Language Modal */
.add-language-modal {
  max-width: 60%;
  max-height: 90vh;
  z-index: 10001 !important;
}

#add-language-modal,
#edit-language-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001 !important;
}

.add-language-modal .modal-body,
.edit-language-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Language display in edit modal */
.language-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
}

/* Enhanced Language Info Card for Edit Modal */
.language-info-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-info-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-flag-large {
  font-size: 2rem;
  line-height: 1;
}

.language-info-details {
  flex: 1;
}

.language-name-large {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.language-code-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #3b82f6;
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Template Editor Section */
.template-editor-section {
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-description {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.4;
}

.template-editor-wrapper {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.template-editor-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.template-textarea {
  width: 100%;
  border: none;
  padding: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  background: white;
  color: #1e293b;
}

.template-textarea:focus {
  outline: none;
}

.template-textarea::placeholder {
  color: #94a3b8;
}

.template-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.character-count {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.language-display span {
  display: inline-block;
}

#edit-lang-flag {
  font-size: 1.2em;
}

#edit-lang-name {
  color: var(--text-primary);
}

#edit-lang-code {
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Variables section in modals */
.variables-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--bg-secondary, #f8fafc) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.variables-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color, #3b82f6), #6366f1);
  border-radius: 12px 12px 0 0;
}

.variables-section h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variables-section h4::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color, #e2e8f0), transparent);
}

.variables-section p {
  margin: 0 0 1.25rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.variables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.variable-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.variable-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(148, 163, 184, 0.1), 
    transparent
  );
  transition: left 0.4s ease;
  z-index: 1;
}

.variable-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 50%, 
    rgba(0, 0, 0, 0.05) 100%
  );
  border-radius: 12px;
  pointer-events: none;
}

.variable-btn:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.variable-btn:hover::before {
  left: 100%;
}

.variable-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.variable-icon {
  font-size: 1.4em;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  color: #475569;
  position: relative;
  z-index: 2;
}

.variable-code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95em;
  flex-shrink: 0;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  position: relative;
  z-index: 2;
}

.variable-desc {
  color: #64748b;
  font-size: 0.9em;
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

.variables-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  margin-top: 0.5rem;
}

.variables-actions .btn {
  font-size: 0.85rem;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.variables-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.variables-actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.variables-actions .btn:hover::before {
  left: 100%;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .variables-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .variable-btn {
    padding: 14px 18px;
    gap: 10px;
  }
  
  .variable-icon {
    font-size: 1.3em;
    width: 26px;
  }
  
  .variable-code {
    font-size: 0.9em;
    padding: 3px 7px;
  }
  
  .variable-desc {
    font-size: 0.85em;
  }
  
  .variables-section {
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .variables-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .variables-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .variable-btn {
    padding: 12px 16px;
    gap: 8px;
    flex-direction: column;
    text-align: center;
  }
  
  .variable-icon {
    font-size: 1.5em;
    width: auto;
    margin-bottom: 4px;
  }
  
  .variable-code {
    margin-bottom: 2px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

#country-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 2.75rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
  appearance: none;
}

#country-select:hover {
  border-color: var(--primary);
  background-color: var(--surface-hover);
}

#country-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: var(--surface);
}

#country-select option {
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--border-light);
}

#country-select option:hover {
  background: var(--surface-hover);
}

#country-select option:first-child {
  color: var(--text-muted);
  font-style: italic;
}

/* Danger button for delete actions */
.btn-danger {
  color: #dc2626 !important;
}

.btn-danger:hover {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

/* Custom select styling for better country display */
.country-select-wrapper {
  position: relative;
}

.country-select-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text-muted);
  pointer-events: none;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .section-header-with-action {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .presets-grid-modal {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  /* Variables Examples Modal Responsive */
  #variables-examples-modal .modal-content {
    width: 95% !important;
    max-height: 90vh !important;
    margin: 1rem !important;
  }
  
  .examples-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .example-card {
    padding: 0.75rem !important;
  }
  
  /* Edit Modal Responsive */
  .language-info-card {
    padding: 16px !important;
    margin-bottom: 16px !important;
  }
  
  .language-info-header {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }
  
  .language-info-icon {
    width: 48px !important;
    height: 48px !important;
  }
  
  .language-flag-large {
    font-size: 1.5rem !important;
  }
  
  .language-name-large {
    font-size: 1.25rem !important;
  }
  
  .template-editor-wrapper {
    border-radius: 8px !important;
  }
  
  .template-textarea {
    padding: 12px !important;
    font-size: 0.8rem !important;
    min-height: 150px !important;
  }
}

/* =============================================
   Self Check-In Form Information Panel
   ============================================= */

.info-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
}

.info-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.info-panel-header .info-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.info-panel-header h4 {
  margin: 0;
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.info-panel-body {
  padding: 1.5rem;
}

.info-description {
  color: #475569;
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.fields-section {
  margin-bottom: 1.5rem;
}

.fields-section:last-child {
  margin-bottom: 0;
}

.fields-section-header {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.field-note {
  color: #64748b;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: normal;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Badges usados como ayuda dentro de labels de formulario (ej: email/teléfono múltiples) */
.form-group label .badge {
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  border-radius: 999px;
  margin-left: 0.5rem;
  background: var(--surface-hover);
  color: var(--text-muted);
}

.form-group label .badge.badge-info {
  border: 1px dashed var(--border-light);
}

.badge-required {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid #059669;
}

.badge-optional {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: 1px solid #d97706;
}

.badge-locked {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  border: 1px solid #475569;
}

.badge-configurable {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: 1px solid #7c3aed;
}

.fields-list {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.locked-fields {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #cbd5e1;
}

.configurable-fields {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0;
}

.field-category {
  margin-bottom: 1.25rem;
}

.field-category:last-child {
  margin-bottom: 0;
}

.field-category strong {
  display: block;
  color: #1e293b;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.field-category ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}

.field-category ul li {
  position: relative;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.8;
  padding-left: 0.5rem;
}

.field-category ul li::before {
  content: '•';
  position: absolute;
  left: -1rem;
  color: #64748b;
  font-weight: bold;
  font-size: 1.2em;
}

/* Configurable Fields Items */
.field-item-configurable {
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

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

.field-item-configurable:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.field-checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
  height: 100%;
  align-self: stretch;
}

.field-checkbox-label:hover .field-checkbox-custom {
  border-color: #3b82f6;
  transform: scale(1.05);
}

.field-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.field-checkbox-custom {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.field-checkbox-custom::after {
  content: '';
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.field-checkbox:checked ~ .field-checkbox-custom {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.field-checkbox:checked ~ .field-checkbox-custom::after {
  display: block;
}

.field-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
}

.field-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-name {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.field-checkbox:checked ~ .field-info::after {
  content: attr(data-required-text);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  height: 1.75rem;
  box-sizing: border-box;
}

.field-checkbox:not(:checked) ~ .field-info::after {
  content: attr(data-optional-text);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  height: 1.75rem;
  box-sizing: border-box;
}

/* Field Controls Wrapper */
.field-controls-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  min-height: 2.5rem;
}

.field-controls-wrapper > * {
  display: flex;
  align-items: center;
  height: 100%;
}

.field-controls-wrapper .field-checkbox-label {
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 1.5rem;
}

.field-controls-wrapper .field-info {
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 1.5rem;
}

.field-controls-wrapper .field-info::after {
  margin: 0;
  height: auto;
  min-height: 1.5rem;
}


/* Field Hide Toggle Button */
.field-hide-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
  position: relative;
  white-space: nowrap;
  margin-left: auto;
  height: 1.75rem;
  box-sizing: border-box;
  vertical-align: middle;
}

.field-hide-toggle:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.field-hide-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

.field-hide-toggle.hidden {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
}

.field-hide-toggle.hidden:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.field-hide-toggle .hide-icon,
.field-hide-toggle .show-icon {
  font-size: 0.75rem;
  line-height: 1.2;
  display: inline-block;
  vertical-align: middle;
}

.field-hide-toggle .hide-text,
.field-hide-toggle .show-text {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: middle;
}

.field-hide-toggle .hide-icon {
  display: inline-block;
}

.field-hide-toggle .hide-text {
  display: inline-block;
}

.field-hide-toggle .show-icon {
  display: none;
}

.field-hide-toggle .show-text {
  display: none;
}

.field-hide-toggle.hidden .hide-icon {
  display: none;
}

.field-hide-toggle.hidden .hide-text {
  display: none;
}

.field-hide-toggle.hidden .show-icon {
  display: inline-block !important;
}

.field-hide-toggle.hidden .show-text {
  display: inline-block !important;
}


.info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  border-radius: 8px;
  margin-top: 1.5rem;
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.2);
}

.info-note .note-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.info-note span {
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.5;
}

.info-note strong {
  font-weight: 600;
  color: #92400e;
}

.info-note code {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: #92400e;
  border: 1px solid #fbbf24;
}

/* Responsive adjustments for info panel */
@media (max-width: 768px) {
  .info-panel-header {
    padding: 1rem;
  }
  
  .info-panel-header h4 {
    font-size: 1rem;
  }
  
  .info-panel-body {
    padding: 1rem;
  }
  
  .fields-list {
    padding: 1rem;
  }
  
  .field-category ul {
    padding-left: 1.25rem;
  }
  
  .field-checkbox-label {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }
}

/* Service Hotels Modal Styles */
.service-hotels-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.service-hotel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  transition: all 0.2s ease;
}

.service-hotel-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-hotel-info {
  flex: 1;
  min-width: 0;
}

.service-hotel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.service-hotel-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.hotel-code-badge {
  font-family: monospace;
  font-size: 0.75rem;
  background-color: var(--surface-hover);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.service-hotel-details {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.service-hotel-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
}

.detail-value.enabled {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.detail-value.disabled {
  background-color: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.service-hotel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.service-hotel-actions .btn {
  white-space: nowrap;
}

/* Botón de quitar servicio mejorado */
.btn-remove-service {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid #ef4444;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.btn-remove-service:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #dc2626;
  color: #b91c1c;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}

.btn-remove-service:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.btn-remove-service .remove-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.btn-remove-service .remove-text {
  font-weight: 600;
  letter-spacing: 0.025em;
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state p,
.error-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Search container for service hotels */
#service-hotels-content .search-container {
  position: relative;
  margin-bottom: 1.5rem;
}

#service-hotels-content .search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--foreground);
  transition: all 0.2s ease;
}

#service-hotels-content .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#service-hotels-content .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}
  
  .field-icon {
    font-size: 1.25rem;
    width: 28px;
  }
  
  .field-name {
    font-size: 0.85rem;
  }
  
  .field-status::after {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.6rem !important;
  }
  
  .info-note {
    padding: 0.875rem 1rem;
    flex-direction: column;
    text-align: center;
  }
  
  .info-note .note-icon {
    font-size: 1.5rem;
  }
  
  .fields-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }


@media (max-width: 480px) {
  .field-info {
    flex-wrap: wrap;
  }
  
  .field-status {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .field-checkbox-custom {
    width: 20px;
    height: 20px;
  }
  
  .field-checkbox-custom::after {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
  }
}