/* ═══════════════════════════════════════════════════════════
   ND STUDIO · CITAS — Sistema de diseño unificado
   Paleta y tipografía alineadas con nd-studio.es
   ═══════════════════════════════════════════════════════════ */

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface2:  #1a1a1a;
  --surface3:  #222222;
  --glass:     rgba(17,17,17,.65);
  --glass2:    rgba(26,26,26,.55);

  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.12);
  --border3:   rgba(255,255,255,.18);

  --oro:       #c8a96e;
  --oro-soft:  #d4b87d;
  --oro-dark:  #8a6835;
  --oro-bg:    rgba(200,169,110,.08);
  --oro-bg2:   rgba(200,169,110,.15);
  --violeta:   #9b7fd4;
  --rosa:      #d47f9b;
  --rojo:      #e85d5d;
  --verde:     #5ec269;

  --text:      #f0ede8;
  --text2:     #ccc8c0;
  --text3:     #888580;
  --text4:     #555350;

  --radio:     10px;
  --radio-lg:  14px;
  --radio-xl:  18px;

  --font-heading: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── RESET Y BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-font-smoothing: antialiased; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  padding: 0 16px 60px;
}

::selection { background: var(--oro-bg2); color: var(--oro-soft); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text4); }

/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
h1, h2, h3, .heading {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.15;
  color: var(--text);
}
h1, .h1 { font-size: 28px; }
h2, .h2 { font-size: 22px; }
h3, .h3 { font-size: 18px; }

.text-oro  { color: var(--oro) !important; }
.text-muted { color: var(--text3); }
.text-xs   { font-size: 12px; }
.text-sm   { font-size: 13px; }

.label-upper {
  font-size: 11px;
  color: var(--text4);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 520px;
  padding-top: 24px;
}

/* ── HEADER ──────────────────────────────────────────────── */
.nd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(10,10,10,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nd-header-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nd-header img {
  height: 34px;
  width: auto;
  object-fit: contain;
}
.paso-badge {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border2);
}

/* ── STEPPER / PROGRESO ──────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stepper-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text4);
  transition: color var(--transition);
}
.stepper-step.active { color: var(--oro); }
.stepper-step.done   { color: var(--verde); }
.stepper-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid var(--border2);
  color: var(--text4);
  transition: all var(--transition);
}
.stepper-step.active .stepper-icon {
  border-color: var(--oro);
  color: var(--oro);
  background: var(--oro-bg);
}
.stepper-step.done .stepper-icon {
  border-color: var(--verde);
  color: var(--verde);
  background: rgba(94,194,105,.1);
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 32px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--oro-dark), var(--oro));
  border-radius: 3px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* ── SECCIONES ───────────────────────────────────────────── */
.section { margin-bottom: 28px; }
.section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.section-sub {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 16px;
}

/* ── TARJETAS DE PROFESIONAL ─────────────────────────────── */
.pro-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pro-scroll::-webkit-scrollbar { display: none; }

.pro-card {
  flex-shrink: 0;
  width: 110px;
  padding: 16px 10px;
  border-radius: var(--radio-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border2);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  scroll-snap-align: start;
  user-select: none;
}
.pro-card:hover {
  border-color: var(--border3);
  background: var(--glass2);
}
.pro-card.selected {
  border-color: var(--oro);
  background: var(--oro-bg);
  box-shadow: 0 0 20px rgba(200,169,110,.08);
}

.pro-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  transition: transform var(--transition);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.pro-card:hover .pro-avatar { transform: scale(1.06); }
.pro-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pro-avatar-star {
  background: linear-gradient(135deg, var(--oro), var(--oro-dark));
  box-shadow: 0 4px 12px rgba(200,169,110,.15);
}

.pro-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pro-card.selected .pro-name { color: var(--oro-soft); }
.pro-role {
  font-size: 10px;
  color: var(--text4);
  margin-top: 2px;
}

/* ── TARJETAS DE PERSONA ─────────────────────────────────── */
.personas-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }

.persona-card {
  padding: 18px;
  border-radius: var(--radio-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border2);
  position: relative;
  transition: all var(--transition);
  animation: fadeSlideIn .3s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.persona-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.persona-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--oro);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.persona-remove {
  background: none;
  border: none;
  color: var(--text4);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.persona-remove:hover {
  color: var(--rojo);
  background: rgba(232,93,93,.1);
}

.persona-fields { display: flex; flex-direction: column; gap: 10px; }

/* ── BOTÓN AÑADIR PERSONA ────────────────────────────────── */
.btn-add-persona {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border2);
  border-radius: var(--radio-lg);
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: .03em;
}
.btn-add-persona:hover {
  border-color: rgba(200,169,110,.35);
  color: var(--oro);
  background: var(--oro-bg);
}

/* ── RESUMEN FLOTANTE ────────────────────────────────────── */
.resumen-float {
  padding: 14px 18px;
  border-radius: var(--radio-lg);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  animation: fadeSlideIn .3s ease;
}
.resumen-float-info {
  font-size: 12px;
  color: var(--text3);
}
.resumen-float-info strong {
  color: var(--text);
  font-weight: 700;
}
.resumen-float-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--oro);
}

/* ── RESUMEN BOX (fecha & datos) ─────────────────────────── */
.resumen-box {
  padding: 18px;
  border-radius: var(--radio-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border2);
  margin-bottom: 24px;
}
.resumen-label {
  font-size: 11px;
  color: var(--text4);
  letter-spacing: .12em;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.resumen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.resumen-item + .resumen-item { border-top: 1px solid var(--border); }
.resumen-item-name { color: var(--text2); font-size: 14px; font-weight: 600; }
.resumen-item-srv  { color: var(--text3); font-size: 12px; margin-top: 1px; }

.desglose-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.desglose-item:last-of-type { border-bottom: none; }
.desglose-nombre { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.desglose-srv    { font-size: 12px; color: var(--text3); }
.desglose-hora   { font-size: 12px; color: var(--oro); font-weight: 600; margin-top: 2px; }

.resumen-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1.5px solid var(--border2);
}
.resumen-footer-info  { font-size: 12px; color: var(--text3); }
.resumen-footer-price { font-size: 22px; font-weight: 800; color: var(--oro); }

.resumen-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.resumen-row:last-child { margin-bottom: 0; }
.resumen-k { font-size: 13px; color: var(--text3); }
.resumen-v { font-size: 13px; font-weight: 600; }

/* ── INPUTS Y FORMULARIOS ────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: var(--radio);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text4); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border3); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--oro);
  box-shadow: 0 0 0 3px var(--oro-bg);
}
.textarea { resize: vertical; min-height: 80px; }

.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text4);
  pointer-events: none;
}
.select { padding-right: 36px; cursor: pointer; }

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 11px;
  color: var(--text4);
  letter-spacing: .1em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── BOTONES ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radio);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.3;
}
.btn:active { transform: scale(.98); }

.btn-oro {
  background: linear-gradient(135deg, var(--oro-dark), var(--oro));
  color: #0a0a0a;
  box-shadow: 0 4px 16px rgba(200,169,110,.12);
}
.btn-oro:hover {
  background: linear-gradient(135deg, var(--oro), var(--oro-soft));
  box-shadow: 0 6px 24px rgba(200,169,110,.18);
}
.btn-oro:disabled {
  background: var(--surface2);
  color: var(--text4);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .6;
}

.btn-ghost {
  background: transparent;
  color: var(--text3);
  border: 1.5px solid var(--border2);
}
.btn-ghost:hover {
  border-color: var(--border3);
  color: var(--text);
  background: var(--surface);
}

.btn-full { width: 100%; }
.btn-lg   { padding: 15px 28px; font-size: 15px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text3);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 20px;
  font-family: var(--font-body);
  transition: color var(--transition);
}
.back-btn:hover { color: var(--text); }

/* ── CALENDARIO STRIP ────────────────────────────────────── */
.dias-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.dias-strip::-webkit-scrollbar { display: none; }

.dia-btn {
  min-width: 60px;
  padding: 10px 8px;
  border-radius: var(--radio);
  border: 1.5px solid var(--border2);
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  flex-shrink: 0;
  scroll-snap-align: start;
  font-family: var(--font-body);
  color: var(--text);
}
.dia-btn:hover { border-color: var(--border3); }
.dia-btn.selected {
  border-color: var(--oro);
  background: var(--oro-bg);
  box-shadow: 0 0 16px rgba(200,169,110,.06);
}

.dia-dow { font-size: 10px; color: var(--text4); letter-spacing: .06em; font-weight: 600; }
.dia-num { font-size: 20px; font-weight: 800; line-height: 1.3; }
.dia-btn.selected .dia-num { color: var(--oro); }
.dia-mes { font-size: 10px; color: var(--text4); }

/* ── HORAS GRID ──────────────────────────────────────────── */
.horas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.hora-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border2);
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.hora-btn:hover { border-color: var(--border3); color: var(--text); }
.hora-btn.selected {
  border-color: var(--oro);
  background: var(--oro-bg);
  color: var(--oro);
}

/* ── ALERTAS ─────────────────────────────────────────────── */
.error {
  padding: 12px 16px;
  border-radius: var(--radio);
  background: rgba(232,93,93,.08);
  color: var(--rojo);
  border: 1px solid rgba(232,93,93,.2);
  margin-bottom: 16px;
  font-size: 13px;
}

.empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text3);
  font-size: 13px;
}

/* ── CONFIRMACIÓN ÉXITO ──────────────────────────────────── */
.exito-wrap { text-align: center; padding-top: 40px; }

.exito-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--oro), var(--oro-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  color: #0a0a0a;
  box-shadow: 0 8px 32px rgba(200,169,110,.15);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.nd-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 16px 0;
  margin-top: auto;
  text-align: center;
  font-size: 10px;
  color: var(--text4);
  letter-spacing: .08em;
  font-weight: 500;
}

/* ── UTILIDADES ──────────────────────────────────────────── */
.gap-sm  { gap: 8px; }
.gap-md  { gap: 12px; }
.mt-sm   { margin-top: 8px; }
.mt-md   { margin-top: 16px; }
.mb-sm   { margin-bottom: 8px; }
.mb-md   { margin-bottom: 16px; }
.mb-lg   { margin-bottom: 28px; }
.hidden  { display: none; }

/* ── ANIMACIONES GLOBALES ────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 400px) {
  .pro-card { width: 96px; padding: 12px 8px; }
  .pro-avatar { width: 44px; height: 44px; }
  .section-title { font-size: 20px; }
  .stepper-step span { font-size: 10px; }
}
