/* Professional UI/UX Responsive CSS - Optimized for 1024x768 */

/* Variables mejoradas para diseño profesional */
:root {
  /* Espaciado profesional */
  --space-xs: 0.25rem;     /* 4px */
  --space-sm: 0.5rem;      /* 8px */
  --space-md: 0.75rem;     /* 12px */
  --space-lg: 1rem;        /* 16px */
  --space-xl: 1.25rem;     /* 20px */
  --space-2xl: 1.5rem;     /* 24px */
  
  /* Tipografía legible */
  --font-xs: 0.75rem;      /* 12px */
  --font-sm: 0.875rem;     /* 14px */
  --font-base: 1rem;       /* 16px */
  --font-lg: 1.125rem;     /* 18px */
  --font-xl: 1.25rem;      /* 20px */
  
  /* Alturas estándar */
  --input-height: 40px;
  --button-height: 44px;
  --header-height: 70px;
  
  /* Bordes y sombras */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Reset y configuración base */
html, body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-size: var(--font-sm);
  line-height: 1.5;
}

/* Layout principal del POS */
.pos-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--dark-navy);
}

/* Header profesional */
.pos-header {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 var(--space-2xl);
  flex-shrink: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.header-left h1 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-left h1 i {
  color: var(--accent-teal);
  font-size: 1.375rem;
}

.header-subtitle {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.user-info {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.logout-btn {
  height: var(--input-height);
  padding: 0 var(--space-lg);
  background: var(--danger);
  border: none;
  border-radius: var(--border-radius);
  color: white;
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logout-btn:hover {
  background: #c53030;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

/* Contenido principal */
.pos-main {
  flex: 1;
  height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-xl);
  padding: var(--space-xl);
  overflow: hidden;
}

/* Panel de formulario */
.pos-form-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  overflow-y: auto;
  height: 100%;
  padding-right: var(--space-sm);
}

/* Scrollbar elegante */
.pos-form-panel::-webkit-scrollbar {
  width: 6px;
}

.pos-form-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.pos-form-panel::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 3px;
}

.pos-form-panel::-webkit-scrollbar-thumb:hover {
  background: var(--light-teal);
}

/* Secciones del formulario */
.form-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.form-section:hover {
  box-shadow: var(--shadow-hover);
}

.form-section h3 {
  font-size: var(--font-base);
  font-weight: 600;
  margin: 0 0 var(--space-xl) 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid rgba(79, 209, 199, 0.1);
}

.form-section h3 i {
  color: var(--accent-teal);
  font-size: 1.25rem;
}

/* ===== INFORMACIÓN DEL PASAJERO - 4 COLUMNAS ===== */
.passenger-form {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 2fr;
  gap: var(--space-lg);
  align-items: end;
}

/* ===== DETALLES DEL VIAJE ===== */
.trip-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Fecha, Adultos y Niños en una línea */
.trip-date-passenger-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: end;
}

/* Precio y Vendedor en una línea */
.price-vendor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: end;
}

/* Labels profesionales */
.trip-date label,
.count-group label,
.price-group label,
.vendor-group label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.5px;
}

/* Controles de contador mejorados */
.count-group {
  display: flex;
  flex-direction: column;
}

.count-controls {
  height: var(--input-height);
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: all 0.2s ease;
}

.count-controls:hover {
  border-color: var(--accent-teal);
}

.count-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.count-btn:hover {
  background: var(--accent-teal);
  color: var(--dark-navy);
}

.count-btn:active {
  transform: scale(0.95);
}

.count-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  font-size: var(--font-base);
  background: rgba(255, 255, 255, 0.05);
  min-width: 60px;
}

/* ===== SELECTOR DE EMBARCACIÓN - 6 COLUMNAS ===== */
.boat-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
}

.boat-option {
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  height: 95px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.boat-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(79, 209, 199, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.boat-option:hover::before {
  opacity: 1;
}

.boat-option:hover {
  border-color: var(--accent-teal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.boat-option.selected {
  border-color: var(--accent-teal);
  background: rgba(79, 209, 199, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79, 209, 199, 0.25);
}

.boat-option.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent-teal);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
  from {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.boat-option i {
  font-size: 1.5rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-sm);
  z-index: 1;
}

.boat-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-sm);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
  z-index: 1;
}

.boat-price {
  font-weight: 700;
  color: var(--accent-teal);
  font-size: var(--font-sm);
  line-height: 1;
  z-index: 1;
}

/* Inputs del formulario */
.form-input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-lg);
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 4px rgba(79, 209, 199, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Botones de acción */
.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.action-btn {
  height: var(--button-height);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.action-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;
}

.action-btn:hover::before {
  left: 100%;
}

.clear-btn {
  background: var(--input-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.clear-btn:hover {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--dark-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.sell-btn {
  background: var(--gradient-accent);
  color: var(--text-primary);
  border: 2px solid transparent;
}

.sell-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 209, 199, 0.4);
}

.sell-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== PANEL DEL TICKET ===== */
.pos-ticket-panel {
  height: 100%;
  overflow: hidden;
}

.virtual-ticket {
  background: var(--text-primary);
  color: var(--dark-navy);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.virtual-ticket:hover {
  transform: perspective(1000px) rotateX(2deg);
}

.virtual-ticket::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

.ticket-header {
  background: var(--gradient-primary);
  color: var(--text-primary);
  padding: var(--space-xl);
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.ticket-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 20px;
  background-image: radial-gradient(circle at 10px 0, transparent 10px, var(--primary-blue) 10px);
  background-size: 20px 20px;
}

.ticket-header h2 {
  font-size: var(--font-xl);
  font-weight: 700;
  margin: 0 0 var(--space-sm) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.ticket-header h2 i {
  color: var(--light-teal);
  font-size: 1.5rem;
}

.ticket-header p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

.ticket-number {
  background: rgba(255, 255, 255, 0.15);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: var(--font-sm);
  display: inline-block;
  backdrop-filter: blur(10px);
}

.ticket-content {
  padding: var(--space-xl);
  flex: 1;
  overflow-y: auto;
}

.ticket-content::-webkit-scrollbar {
  width: 4px;
}

.ticket-content::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 2px;
}

.ticket-section {
  margin-bottom: 2px;
  padding-bottom: 2px;
  border-bottom: 2px dashed #e2e8f0;
}

.ticket-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.ticket-section h4 {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--primary-blue);
  margin: 0 0 var(--space-lg) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ticket-section h4::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-teal);
  border-radius: 50%;
}

.ticket-section p {
  font-size: var(--font-sm);
  line-height: 1.6;
  margin: 0 0 var(--space-sm) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-section p:last-child {
  margin-bottom: 0;
}

.ticket-section strong {
  color: var(--secondary-blue);
  font-weight: 600;
}

.ticket-section span {
  font-weight: 600;
  color: var(--dark-navy);
  text-align: right;
  max-width: 180px;
  word-wrap: break-word;
}

.ticket-total {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  margin: var(--space-lg) calc(-1 * var(--space-xl)) 0;
  padding: var(--space-xl);
  border-top: 3px dashed #e2e8f0;
  text-align: center;
  flex-shrink: 0;
}

.ticket-total h3 {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--primary-blue);
  margin: 0;
}

.ticket-total span {
  color: var(--accent-teal);
  font-weight: 900;
}

.ticket-footer {
  background: var(--dark-navy);
  color: var(--text-primary);
  padding: var(--space-lg);
  text-align: center;
  flex-shrink: 0;
}

.ticket-footer p {
  font-size: var(--font-xs);
  margin: 0 0 var(--space-xs) 0;
  opacity: 0.9;
  line-height: 1.4;
}

.ticket-footer p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet landscape */
@media (max-width: 1200px) {
  .pos-main {
    grid-template-columns: 1fr 350px;
  }
}





/* Small screens */
@media (max-height: 700px) {
  :root {
    --header-height: 60px;
    --space-lg: 0.75rem;
    --space-xl: 1rem;
    --space-2xl: 1.125rem;
  }
  
  .form-section {
    padding: var(--space-lg);
  }
  
  .boat-option {
    height: 70px;
    padding: var(--space-md);
  }
  
  .virtual-ticket:hover {
    transform: none;
  }
}

/* Login optimizations */
.login-screen {
  height: 100vh;
  overflow: hidden;
}

.login-container {
  max-width: 420px;
  padding: var(--space-2xl);
}

.login-header h1 {
  font-size: var(--font-xl);
}

.login-form .form-input {
  height: var(--button-height);
  font-size: var(--font-base);
}

/* Force no scroll globally */
.pos-screen,
.pos-main,
.login-screen {
  overflow: hidden !important;
}

/* Prevent layout shifts */
.form-input:focus {
  box-shadow: 0 0 0 4px rgba(79, 209, 199, 0.1);
  transform: translateY(-1px) !important;
}