/* =========================================================
   Synexa Reservas — Capa visual específica
   Archivo: /app/reservas/estilo.css
   Versión: sx-reservas-ui-1.0.1
   ========================================================= */

/* =========================================================
   Marca Synexa
   ========================================================= */

:root {
  --sx-brand-ink: #10172f;
  --sx-brand-charcoal: #1b2338;
  --sx-brand-blue: #2563eb;

  --panel-soft-blue: #eff6ff;
  --panel-soft-green: #ecfdf5;
  --panel-soft-amber: #fffbeb;
  --panel-soft-red: #fef2f2;

  --panel-line: rgba(148, 163, 184, 0.24);
  --panel-card-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --panel-card-shadow-hover: 0 22px 70px rgba(15, 23, 42, 0.12);
}

/* =========================================================
   Branding general
   ========================================================= */

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.brand-inline {
  gap: 12px;
}

.brand-kicker {
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sx-muted);
  font-size: 11px;
}

.brand-title-small {
  font-weight: 950;
  color: var(--sx-text);
  line-height: 1.1;
}

.site-header {
  backdrop-filter: blur(18px);
}

.navbar {
  max-width: 1520px;
}

.dashboard-shell {
  max-width: 1500px;
}

.dashboard-hero {
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.btn-primary,
.btn-accent {
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover,
.btn-accent:hover {
  transform: translateY(-1px);
}

.btn-secondary:hover {
  border-color: rgba(37, 99, 235, 0.32);
  background: #f8fbff;
  transform: translateY(-1px);
}

/* =========================================================
   Panel layout profesional
   ========================================================= */

.panel-hero {
  min-height: 210px;
}

.panel-tabs-card {
  padding: 26px 30px;
}

.panel-tabs {
  gap: 12px;
  flex-wrap: wrap;
}

.panel-tabs .tabBtn {
  min-width: 120px;
  justify-content: center;
}

.panel-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.panel-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--sx-blue);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-toolbar {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

.panel-toolbar-grid {
  align-items: end;
}

.panel-form {
  display: grid;
  gap: 12px;
}

.form-section {
  display: grid;
  gap: 14px;
}

.form-section h3 {
  margin-bottom: 2px;
}

.settings-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-help-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  border: 1px solid rgba(37, 99, 235, 0.12);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(37, 99, 235, 0.015)),
    #ffffff;
  border-radius: 24px;
  padding: 18px 20px;
  color: var(--sx-text);
}

.panel-help-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 950;
}

.panel-help-card p {
  margin: 0;
  color: var(--sx-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* =========================================================
   Cards/listados más profesionales
   ========================================================= */

.panel-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.list-card {
  border: 1px solid var(--panel-line);
  border-radius: 26px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.92));
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.list-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--panel-card-shadow);
}

.list-title {
  font-size: 18px;
  font-weight: 950;
  color: var(--sx-text);
  letter-spacing: -0.02em;
}

.list-subtitle {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--sx-muted);
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 16px;
}

.list-actions .btn-primary,
.list-actions .btn-secondary,
.list-actions a.btn-secondary {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: #f8fafc;
  color: var(--sx-text);
  font-size: 13px;
  font-weight: 900;
}

.status-pending {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fffbeb;
  color: #92400e;
}

.status-confirmed {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.status-attended {
  border-color: rgba(16, 185, 129, 0.35);
  background: #ecfdf5;
  color: #047857;
}

.status-no-show,
.status-cancelled,
.status-voided {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fef2f2;
  color: #b91c1c;
}

.note {
  border: 1px solid rgba(37, 99, 235, 0.10);
  background: #f8fbff;
  border-radius: 18px;
}

/* =========================================================
   Agenda diaria
   ========================================================= */

.agenda-list {
  display: grid;
  gap: 14px;
}

.agenda-list .list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
}

.agenda-list .list-title {
  font-size: 17px;
}

.agenda-list .list-subtitle {
  color: var(--sx-text);
  font-weight: 650;
}

.agenda-list .list-actions {
  justify-content: flex-end;
  margin-top: 0;
  max-width: 460px;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: #f8fafc;
}

.view-switch-btn {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sx-muted);
  font-weight: 950;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.view-switch-btn.active {
  background: var(--sx-brand-ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

/* =========================================================
   Calendario semanal
   ========================================================= */

.week-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.week-title {
  margin: 0;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.week-calendar-grid {
  overflow: auto;
  border: 1px solid var(--panel-line);
  border-radius: 26px;
  background: #ffffff;
}

.week-grid-inner {
  min-width: 980px;
  display: grid;
  grid-template-columns: 82px repeat(7, minmax(130px, 1fr));
}

.week-cell {
  min-height: 58px;
  border-right: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  padding: 8px;
  position: relative;
}

.week-cell:nth-child(8n) {
  border-right: 0;
}

.week-head-cell {
  min-height: 78px;
  background: #f8fafc;
  font-size: 13px;
  color: var(--sx-muted);
  font-weight: 900;
}

.week-head-cell strong {
  display: block;
  margin-top: 4px;
  color: var(--sx-text);
  font-size: 15px;
}

.week-head-cell.today {
  background: #eff6ff;
  color: #1d4ed8;
}

.week-time-cell {
  background: #f8fafc;
  color: var(--sx-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  padding-top: 10px;
}

.week-day-cell.today {
  background: rgba(239, 246, 255, 0.55);
}

.week-event {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  border-radius: 14px;
  padding: 8px 9px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 850;
  text-align: left;
}

.week-event span {
  display: block;
  opacity: 0.82;
  font-weight: 750;
}

.week-event.pending {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffbeb;
  color: #92400e;
}

.week-event.confirmed {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: #1d4ed8;
}

.week-event.attended {
  border-color: rgba(16, 185, 129, 0.28);
  background: #ecfdf5;
  color: #047857;
}

.week-event.block {
  border-color: rgba(100, 116, 139, 0.24);
  background: #f1f5f9;
  color: #475569;
}

/* =========================================================
   Profesionales y servicios
   ========================================================= */

.professional-card,
.service-card,
.client-card {
  position: relative;
  overflow: hidden;
}

.professional-card::before,
.service-card::before,
.client-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--sx-brand-blue), #93c5fd);
  opacity: 0.9;
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--panel-line);
  color: var(--sx-muted);
  font-size: 12px;
  font-weight: 850;
}

.service-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-check-grid .pill {
  margin: 0 !important;
}

.schedule-rows {
  display: grid;
  gap: 10px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--panel-line);
  background: #ffffff;
  border-radius: 20px;
}

.schedule-row .btn-secondary {
  min-height: 42px;
}

/* =========================================================
   Modales
   ========================================================= */

.modal-card-wide {
  width: min(920px, calc(100vw - 28px));
}

.modal-header {
  border-bottom: 1px solid var(--panel-line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.action-modal .modal-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-body {
  padding-bottom: 4px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-item {
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: 14px;
  background: #f8fafc;
}

.info-item span {
  display: block;
  color: var(--sx-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-item strong {
  display: block;
  margin-top: 5px;
  color: var(--sx-text);
  font-size: 15px;
  font-weight: 950;
}

.mini-card {
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
}

/* =========================================================
   Página pública de reserva
   ========================================================= */

body:has(#stepAttention) .dashboard-shell,
body:has(#stepPatient) .dashboard-shell {
  max-width: 760px;
}

body:has(#stepAttention) .dashboard-hero-right {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.times-grid {
  gap: 10px;
}

.timeBtn.selected {
  background: var(--sx-brand-blue);
  color: #fff;
  border-color: var(--sx-brand-blue);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1080px) {
  .panel-section-header,
  .week-calendar-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header-actions {
    justify-content: flex-start;
  }

  .panel-card-grid {
    grid-template-columns: 1fr;
  }

  .agenda-list .list-card {
    grid-template-columns: 1fr;
  }

  .agenda-list .list-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .navbar {
    align-items: flex-start;
  }

  .nav-cta {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-cta .btn-primary,
  .nav-cta .btn-secondary {
    flex: 1 1 auto;
  }

  .panel-tabs .tabBtn {
    flex: 1 1 130px;
  }

  .panel-toolbar-grid {
    grid-template-columns: 1fr;
  }

  .section-actions {
    width: 100%;
  }

  .section-actions .btn-primary,
  .section-actions .btn-secondary,
  .section-actions a.btn-secondary {
    flex: 1 1 auto;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .service-check-grid {
    grid-template-columns: 1fr;
  }

  .modal-card-wide {
    width: calc(100vw - 18px);
  }

  .week-calendar-head .section-actions {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .dashboard-page {
    padding-inline: 10px;
  }

  .card {
    border-radius: 24px;
  }

  .panel-tabs-card {
    padding: 18px;
  }

  .list-card {
    padding: 16px;
    border-radius: 22px;
  }

  .hero-title {
    font-size: clamp(30px, 11vw, 44px);
  }
}