/* ============================================================
   BARBERÍA ALE — ESTILOS PRINCIPALES
   Mobile First · Premium Dark Theme · Gold Accent
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0A0A0A;
  --surface:      #111111;
  --surface2:     #1A1A1A;
  --border:       #2A2A2A;
  --gold:         #D4AF37;
  --gold-light:   #F0D060;
  --gold-dim:     #8B7020;
  --white:        #FFFFFF;
  --text:         #EEEEEE;
  --text-muted:   #777777;
  --green:        #2ECC71;
  --red:          #E74C3C;
  --orange:       #E67E22;
  --blue:         #3498DB;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow:       0 4px 24px rgba(0,0,0,0.6);
  --shadow-gold:  0 0 20px rgba(212,175,55,0.25);
  --transition:   0.2s ease;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --header-h:     56px;
  --bottom-nav-h: 58px;
}

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
img { max-width: 100%; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ---------- LOADING SCREEN ---------- */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  transition: opacity 0.4s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader-logo {
  font-family: var(--font-serif);
  font-size: 3rem; font-weight: 700;
  color: var(--gold);
  letter-spacing: 4px;
  animation: pulse-gold 1.5s ease-in-out infinite;
}
.loader-bar {
  width: 120px; height: 2px;
  background: var(--border);
  border-radius: 2px; overflow: hidden;
}
.loader-bar::after {
  content: '';
  display: block; width: 40%;
  height: 100%; background: var(--gold);
  border-radius: 2px;
  animation: loading-slide 1s ease-in-out infinite;
}
@keyframes loading-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
@keyframes pulse-gold {
  0%,100% { text-shadow: 0 0 10px rgba(212,175,55,0.3); }
  50%      { text-shadow: 0 0 30px rgba(212,175,55,0.8); }
}

/* ---------- APP SHELL ---------- */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: var(--bottom-nav-h);
}

/* ---------- HEADER ---------- */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 16px;
  justify-content: space-between;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
}
.logo-badge {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 700;
  color: var(--bg);
  letter-spacing: 1px;
  box-shadow: var(--shadow-gold);
}
.header-title {
  display: flex; flex-direction: column;
}
.header-title span:first-child {
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.header-title span:last-child {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.header-actions {
  display: flex; align-items: center; gap: 8px;
}
.btn-whatsapp-header {
  display: flex; align-items: center; gap: 6px;
  background: #25D366;
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600;
  transition: opacity var(--transition);
}
.btn-whatsapp-header:active { opacity: 0.8; }
.btn-whatsapp-header svg { width: 16px; height: 16px; }
.btn-admin-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.btn-admin-toggle:active { background: var(--border); color: var(--gold); }
.btn-admin-toggle.active { color: var(--gold); background: rgba(212,175,55,0.1); }

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--bottom-nav-h);
  background: rgba(17,17,17,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex; z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--gold); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(212,175,55,0.5)); }

/* ---------- PAGES ---------- */
.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- SECTION HEADER ---------- */
.section-header {
  padding: 20px 16px 12px;
  display: flex; align-items: center;
  justify-content: space-between;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 700;
  color: var(--white);
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- CALENDAR ---------- */
.calendar-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin: 0 16px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.calendar-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.calendar-month-year {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 700;
  color: var(--white);
}
.calendar-nav-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  border: 1px solid var(--border);
}
.calendar-nav-btn:active { background: var(--border); }
.calendar-nav-btn svg { width: 18px; height: 18px; }

.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 8px 8px 0;
}
.calendar-weekday {
  text-align: center;
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 4px 8px 12px;
  gap: 3px;
}
.calendar-day {
  aspect-ratio: 1;
  max-height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.calendar-day.empty { pointer-events: none; }
.calendar-day.past { color: var(--text-muted); opacity: 0.35; pointer-events: none; }
.calendar-day.off-day { color: var(--text-muted); opacity: 0.5; pointer-events: none; }
.calendar-day.available { color: var(--text); }
.calendar-day.available:active { transform: scale(0.92); }
.calendar-day.available::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green);
}
.calendar-day.partial::after { background: var(--orange); }
.calendar-day.full { color: var(--text-muted); }
.calendar-day.full::after { background: var(--red); }
.calendar-day.blocked { color: var(--text-muted); opacity: 0.4; pointer-events: none; }
.calendar-day.blocked::after { background: var(--red); }
.calendar-day.today {
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
}
.calendar-day.selected {
  background: var(--gold);
  color: var(--bg) !important;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}
.calendar-day.selected::after { display: none; }

/* Leyenda */
.calendar-legend {
  display: flex; gap: 12px;
  padding: 8px 16px 16px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.7rem; color: var(--text-muted);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.legend-dot.green  { background: var(--green); }
.legend-dot.orange { background: var(--orange); }
.legend-dot.red    { background: var(--red); }
.legend-dot.gray   { background: var(--text-muted); }

/* ---------- TIME SLOTS ---------- */
.slots-container {
  margin: 0 16px 16px;
  animation: fadeIn 0.2s ease;
}
.slots-date-label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.slots-date-label::before {
  content: '';
  display: block; width: 3px; height: 16px;
  background: var(--gold); border-radius: 2px;
}
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.time-slot {
  padding: 10px 4px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.time-slot.available:active { transform: scale(0.95); }
.time-slot.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  box-shadow: var(--shadow-gold);
}
.time-slot.occupied {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.5;
  pointer-events: none;
}
.time-slot.break {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  opacity: 0.3;
  pointer-events: none;
  font-size: 0.65rem;
}

/* ---------- SERVICES GRID ---------- */
.services-container {
  padding: 0 16px 16px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.service-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.service-card:active { transform: scale(0.97); }
.service-card.selected {
  border-color: var(--gold);
  background: rgba(212,175,55,0.08);
}
.service-card.selected::before {
  content: '✓';
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.65rem; font-weight: 700;
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  text-align: center;
  padding-top: 1px;
}
.service-icon { font-size: 1.6rem; margin-bottom: 6px; }
.service-name {
  font-size: 0.85rem; font-weight: 600;
  color: var(--white); margin-bottom: 4px;
}
.service-price {
  font-size: 0.8rem;
  color: var(--gold); font-weight: 700;
}
.service-duration {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- BOOKING FORM ---------- */
.booking-form-container {
  padding: 0 16px 16px;
}
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* ---------- BOOKING SUMMARY ---------- */
.booking-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 16px 16px;
  overflow: hidden;
}
.summary-header {
  background: var(--surface2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.summary-header-title {
  font-size: 0.85rem; font-weight: 700;
  color: var(--gold);
  text-transform: uppercase; letter-spacing: 1px;
}
.summary-body { padding: 14px 16px; }
.summary-row {
  display: flex; justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row-label { color: var(--text-muted); }
.summary-row-value { color: var(--text); font-weight: 500; text-align: right; max-width: 60%; }
.summary-total {
  display: flex; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(212,175,55,0.06);
  border-top: 1px solid var(--border);
}
.summary-total-label { font-weight: 700; color: var(--white); }
.summary-total-value { font-weight: 700; color: var(--gold); font-size: 1.1rem; }

/* ---------- BUTTONS ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #B8962E);
  color: var(--bg);
  box-shadow: var(--shadow-gold);
}
.btn-gold:active { opacity: 0.85; transform: scale(0.98); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:active { background: var(--surface2); }
.btn-danger {
  background: rgba(231,76,60,0.12);
  border: 1.5px solid var(--red);
  color: var(--red);
}
.btn-success {
  background: rgba(46,204,113,0.12);
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  width: auto;
}
.btn-icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.btn-actions { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- WHATSAPP FLOAT ---------- */
.whatsapp-float {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  right: 16px;
  z-index: 200;
  width: 54px; height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.whatsapp-float:active { transform: scale(0.92); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ---------- TOAST ---------- */
.toast-container {
  position: fixed; top: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 9000; width: calc(100% - 32px);
  max-width: 440px;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
  pointer-events: all;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--gold); }
.toast-icon { font-size: 1.2rem; }
.toast-msg  { font-size: 0.9rem; color: var(--text); flex: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 480px;
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
}
.modal-header {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 700;
  color: var(--white);
}
.modal-close {
  width: 32px; height: 32px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
}

/* ---------- ADMIN LOGIN ---------- */
.login-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px;
  min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
  justify-content: center;
  gap: 24px;
}
.login-logo-big {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 700;
  color: var(--bg);
  box-shadow: var(--shadow-gold);
}
.login-title {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700;
  color: var(--white);
  text-align: center;
}
.login-subtitle { font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.login-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 14px; }
.login-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem; color: var(--red);
  text-align: center;
  display: none;
}
.login-error.show { display: block; }

/* ---------- ADMIN DASHBOARD ---------- */
.dashboard-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-label {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 1.8rem; font-weight: 700;
  color: var(--white); line-height: 1;
  margin-bottom: 4px;
}
.stat-sub { font-size: 0.75rem; color: var(--text-muted); }
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.green .stat-value { color: var(--green); }

/* ---------- AGENDA TABS ---------- */
.agenda-tabs {
  display: flex; gap: 8px;
  margin: 0 16px 12px;
}
.agenda-tab {
  flex: 1; padding: 10px 0;
  background: var(--surface); color: var(--text-muted);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.agenda-tab.active {
  background: rgba(212,175,55,0.12);
  border-color: var(--gold); color: var(--gold);
}

/* ---------- PRÓXIMAS ---------- */
.proximas-grupo { margin-bottom: 20px; }
.proximas-grupo-fecha {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
  padding: 6px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.proximas-grupo-fecha.hoy { color: var(--gold); border-color: var(--gold); }
.proxima-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 6px;
  border-left: 3px solid var(--border);
  position: relative;
}
.proxima-card.pendiente  { border-left-color: var(--gold); }
.proxima-card.confirmada { border-left-color: var(--green); }
.proxima-card.cancelada  { border-left-color: var(--red); opacity: 0.6; }
.proxima-card.finalizada { border-left-color: var(--text-muted); opacity: 0.7; }
.proxima-hora {
  font-size: 1rem; font-weight: 700; color: var(--white);
  min-width: 44px; text-align: center;
}
.proxima-info { flex: 1; min-width: 0; }
.proxima-nombre { font-weight: 600; font-size: 0.9rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proxima-svc { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proxima-precio { font-size: 0.75rem; font-weight: 600; color: var(--gold); white-space: nowrap; }
.proxima-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ---------- AGENDA VIEW ---------- */
.agenda-date-nav {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin: 0 16px 12px;
  border-radius: var(--radius);
}
.agenda-date-display {
  text-align: center;
}
.agenda-date-day {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 700;
  color: var(--white);
}
.agenda-date-full {
  font-size: 0.75rem; color: var(--text-muted);
}

/* Timeline */
.timeline-container {
  padding: 0 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.timeline-slot {
  display: flex; gap: 12px; align-items: flex-start;
}
.timeline-time {
  font-size: 0.72rem; color: var(--text-muted);
  width: 44px; text-align: right;
  padding-top: 10px; flex-shrink: 0;
  font-weight: 500;
}
.timeline-line {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; width: 20px;
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
  margin-top: 13px;
}
.timeline-connector {
  width: 2px; flex: 1; min-height: 20px;
  background: var(--border);
  margin-top: 2px;
}
.timeline-dot.active     { background: var(--gold); box-shadow: var(--shadow-gold); }
.timeline-dot.confirmed  { background: var(--green); }
.timeline-dot.pending    { background: var(--orange); }
.timeline-dot.cancelled  { background: var(--red); }
.timeline-dot.blocked    { background: var(--text-muted); }

.booking-card-admin {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.booking-card-admin.confirmed { border-left: 3px solid var(--green); }
.booking-card-admin.pending   { border-left: 3px solid var(--orange); }
.booking-card-admin.cancelled { border-left: 3px solid var(--red); opacity: 0.6; }
.booking-card-admin.finalizada{ border-left: 3px solid var(--blue); }
.booking-card-admin.blocked   { border-left: 3px solid var(--text-muted); }
.booking-card-inner { padding: 12px 14px; }
.booking-card-name  { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.booking-card-services { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.booking-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
}

/* Status badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending   { background: rgba(230,126,34,0.15); color: var(--orange); border: 1px solid rgba(230,126,34,0.3); }
.badge-confirmed { background: rgba(46,204,113,0.15); color: var(--green);  border: 1px solid rgba(46,204,113,0.3); }
.badge-cancelled { background: rgba(231,76,60,0.15);  color: var(--red);    border: 1px solid rgba(231,76,60,0.3); }
.badge-finalizada{ background: rgba(52,152,219,0.15); color: var(--blue);   border: 1px solid rgba(52,152,219,0.3); }
.badge-blocked   { background: rgba(119,119,119,0.15);color: var(--text-muted); border: 1px solid rgba(119,119,119,0.3); }

/* ---------- CLIENTS LIST ---------- */
.list-container { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.client-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 700;
  color: var(--bg); flex-shrink: 0;
}
.client-info { flex: 1; min-width: 0; }
.client-name  { font-size: 0.9rem; font-weight: 700; color: var(--white); }
.client-meta  { font-size: 0.75rem; color: var(--text-muted); }
.client-action { flex-shrink: 0; }

/* ---------- BUSCADOR CLIENTES ---------- */
.client-search {
  position: relative;
  padding: 0 16px 12px;
}
.client-search-icon {
  position: absolute;
  left: 28px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem; opacity: 0.6;
  pointer-events: none;
}
.client-search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.client-search-input::placeholder { color: var(--text-muted); }
.client-search-input:focus { border-color: var(--gold); }
.client-filter { padding: 0 16px 12px; }
.client-filter-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.client-filter-select:focus { border-color: var(--gold); }
.client-last {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 3px;
}
.client-services {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 7px;
}
.svc-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 0.68rem; font-weight: 600;
  color: var(--gold);
  background: rgba(212,175,55,0.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}
.empty-state-icon { font-size: 3rem; opacity: 0.5; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.empty-state-text  { font-size: 0.85rem; }

/* ---------- SUCCESS SCREEN ---------- */
.success-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px;
  text-align: center; gap: 16px;
}
.success-icon {
  width: 72px; height: 72px;
  background: rgba(46,204,113,0.15);
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--white); }
.success-sub   { font-size: 0.9rem; color: var(--text-muted); max-width: 280px; }

/* ---------- ADMIN HEADER BAR ---------- */
.admin-top-bar {
  background: rgba(212,175,55,0.08);
  border-bottom: 1px solid rgba(212,175,55,0.2);
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-mode-label {
  font-size: 0.7rem; font-weight: 700;
  color: var(--gold); text-transform: uppercase; letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 6px;
}
.admin-mode-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.btn-switch-view {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

/* ---------- BLOCK FORM ---------- */
.block-form {
  display: flex; flex-direction: column; gap: 12px;
}

/* ---------- HORIZONTAL SCROLL TABS ---------- */
.scroll-tabs {
  display: flex; gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.scroll-tabs::-webkit-scrollbar { display: none; }
.tab-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tab-chip.active {
  background: rgba(212,175,55,0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), #B8962E);
  color: var(--bg);
  border-radius: 28px;
  padding: 14px 24px;
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-gold);
  z-index: 150;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition);
}
.fab:active { transform: translateX(-50%) scale(0.97); }
.fab.hidden { opacity: 0; pointer-events: none; }

/* ---------- PIXEL MARKET FOOTER ---------- */
.pixel-footer {
  display: block;
  text-align: center;
  padding: 20px 16px 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  transition: color var(--transition);
  text-decoration: none;
}
.pixel-footer:hover { color: var(--gold); }
.pixel-footer strong { color: var(--gold-dim); letter-spacing: 1px; }

/* ---------- DIVIDER ---------- */
.divider {
  height: 1px; background: var(--border);
  margin: 8px 0;
}
.section-divider {
  height: 8px; background: var(--bg);
}

/* ---------- INFO ROW ---------- */
.info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.info-row-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.info-row-text { font-size: 0.85rem; color: var(--text-muted); }
.info-row-value { font-size: 0.85rem; color: var(--text); font-weight: 500; margin-left: auto; }

/* ---------- RESPONSIVE TWEAKS ---------- */
@media (min-width: 480px) {
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .whatsapp-float { right: calc(50% - 240px + 16px); }
  .fab { max-width: 480px; }
}

/* ---------- STEP INDICATOR ---------- */
.step-indicator {
  display: flex; align-items: center;
  padding: 12px 16px;
  gap: 0;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex: 1;
}
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  transition: all var(--transition);
}
.step-label { font-size: 0.6rem; color: var(--text-muted); text-align: center; }
.step.done .step-circle   { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.step.active .step-circle { border-color: var(--gold); color: var(--gold); }
.step-line {
  flex: 1; height: 2px;
  background: var(--border);
  margin-bottom: 20px;
  transition: background var(--transition);
}
.step-line.done { background: var(--gold); }

/* ---------- PULL TO REFRESH HINT ---------- */
.ptr-hint {
  text-align: center;
  padding: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
