/* ==========================================================================
   DR. EUGENIO ABREU — CIRUGÍA GENERAL & LAPAROSCOPIA
   SISTEMA DE DISEÑO MONOCROMÁTICO DE ALTA GAMA (HAUTE CHIRURGIE)
   Inspirado en Impeccable (Neo-Kinpaku), Bugatti Luxury y Swiss Modernism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Albert+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Lienzo & Superficies (Obsidian Lacquer) */
  --bg-color: #060608;
  --bg-surface: #0e0e12;
  --card-bg: rgba(14, 14, 18, 0.85);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-hover-border: rgba(255, 255, 255, 0.35);
  
  /* Botón Principal: Blanco Puro con Texto Ink Black */
  --primary: #ffffff;
  --primary-text: #060608;
  --primary-hover: #e4e4e7;
  --primary-glow: rgba(255, 255, 255, 0.2);
  
  /* Tipografía y Jerarquía */
  --text-main: #ffffff;
  --text-muted: #94949e;
  --text-faint: #60606a;
  
  /* Inputs de Alta Precisión */
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus: #ffffff;
  
  /* Acentos de Estado Quirúrgico */
  --accent-emerald: #10b981;
  --accent-gold: #d4af37;
  --danger: #ef4444;
  
  /* Tipografías Instaladas y Curadas */
  --font-brand: 'Cinzel', Georgia, serif;
  --font-body: 'Albert Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 20px 48px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-button: 0 4px 20px rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 55%),
    linear-gradient(to bottom, #060608 0%, #000000 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 80px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-family: var(--font-brand);
  font-size: 2.2rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

h2, .section-title, .doctor-hero-title {
  font-family: var(--font-brand);
  font-size: 1.65rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

h3, .clinic-title, .service-name {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

h4 {
  font-family: var(--font-brand);
  font-size: 1.05rem;
}

p, .section-subtitle, .clinic-desc, .service-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

label, input, select, textarea {
  font-family: var(--font-body);
}

small, .caption-text {
  font-family: var(--font-body);
  font-size: 0.76rem;
}

code, pre, .mono, .step-circle, .step-label, .badge, .clinic-room, .service-meta, .btn-primary, .btn-secondary, .nav-link-btn, .ticket-label, .date-pill-day, .date-pill-num, .slot-pill {
  font-family: var(--font-mono);
}

/* Header de Lujo con Estilo Editorial */
.app-header {
  background: rgba(8, 8, 10, 0.88);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
  background: #111115;
}

.brand-info h1 {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-info span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-link-btn {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.nav-link-btn:hover {
  background: #ffffff;
  color: #060608;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

/* Electrocardiograma Filamentoso */
.ekg-banner-wrapper {
  width: 100%;
  height: 24px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.ekg-svg {
  width: 200%;
  height: 100%;
  animation: ekg-scroll 5s linear infinite;
  opacity: 0.35;
}

.ekg-svg path {
  stroke: #ffffff !important;
}

@keyframes ekg-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* PWA Install Banner */
.pwa-banner {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  backdrop-filter: blur(14px);
}

.pwa-banner button {
  background: #ffffff;
  color: #060608;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.72rem;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.pwa-banner button:hover {
  background: #e4e4e7;
}

/* Container */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* Doctor Hero Card de Prestigio Quirúrgico */
.doctor-hero-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}

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

.doctor-hero-title {
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  line-height: 1.25;
}

.doctor-hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 6px;
  line-height: 1.5;
}

.doctor-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.08);
  color: #f1d77a;
  border-color: rgba(212, 175, 55, 0.25);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.25);
}

/* Stepper de Precisión Matemática */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 34px;
  position: relative;
  background: rgba(14, 14, 18, 0.75);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.step-item.active .step-circle {
  background: #ffffff;
  border-color: #ffffff;
  color: #060608;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}

.step-item.active .step-label {
  color: #ffffff;
  font-weight: 700;
}

.step-item.completed .step-circle {
  background: #1f1f25;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.step-item.completed .step-label {
  color: #a1a1aa;
}

/* Títulos de Sección Editorial */
.section-title {
  font-family: var(--font-brand);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Grid de Clínicas / Sedes */
.clinics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

@media(min-width: 640px) {
  .clinics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.clinic-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  position: relative;
}

.clinic-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 255, 255, 0.06);
}

.clinic-card.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px #ffffff, 0 16px 36px rgba(255, 255, 255, 0.08);
}

.clinic-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.clinic-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.clinic-title {
  font-family: var(--font-brand);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.clinic-room {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #060608;
  background: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  margin-top: 6px;
}

.clinic-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.clinic-schedule {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #d4d4d8;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--card-border);
}

/* Lista de Servicios Quirúrgicos */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.service-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
}

.service-card.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px #ffffff, 0 12px 30px rgba(255, 255, 255, 0.08);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.service-name {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.service-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.service-meta {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.service-prep {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #f4d068;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  line-height: 1.45;
}

/* Selector de Fechas */
.date-selector-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.date-pill {
  flex: 0 0 82px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xs);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(14px);
}

.date-pill:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.date-pill.selected {
  background: #ffffff;
  color: #060608;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.date-pill-day {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.date-pill-num {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Grid de Horarios */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.slot-pill {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xs);
  padding: 12px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s ease;
  backdrop-filter: blur(14px);
}

.slot-pill:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.slot-pill.selected {
  background: #ffffff;
  color: #060608;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

/* Formularios Monocromáticos de Precisión */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #e4e4e7;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xs);
  background: var(--input-bg);
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  backdrop-filter: blur(10px);
}

.form-control:focus {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.form-control option {
  background: #111115;
  color: #ffffff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media(min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.appointment-form, .card-glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.hero-ratings {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* Botón Maestro Haute-Horlogerie (Blanco Nieve con Tipografía Monospaced Robusta) */
.btn-primary {
  width: 100%;
  background: #ffffff;
  color: #060608;
  border: none;
  padding: 16px 26px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background: #f4f4f5;
  box-shadow: 0 6px 30px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #52525b;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border: 1px solid var(--card-border);
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* Pase Oficial Digital / Ticket */
.ticket-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  margin-top: 10px;
}

.ticket-header {
  background: linear-gradient(135deg, #121216 0%, #060608 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 32px 24px;
  text-align: center;
  position: relative;
}

.ticket-header h2 {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

.ticket-body {
  padding: 28px 24px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.ticket-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticket-value {
  font-weight: 600;
  color: #ffffff;
  text-align: right;
}

.ticket-value.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

/* Iconos Vectoriales Minimalistas */
.icon-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
