/* =========================================
   GEDAT / GENEOS APP UI - NEUTRAL CLASSES
   Diseño base reutilizable para sistema de turnos
========================================= */

:root {
  --app-primary: #9e4694;
  --app-primary-dark: #451444;
  --app-primary-mid: #6a1f63;
  --app-secondary: #fab515;

  --app-bg: #f8f1f8;
  --app-bg-soft: #fbf6fb;
  --app-surface: #ffffff;
  --app-surface-soft: #f6edf6;
  --app-surface-soft-2: #f1e4f1;

  --app-text: #1f1f24;
  --app-muted: #6f6471;
  --app-white: #ffffff;
  --app-border: rgba(158, 70, 148, .16);

  --app-success-bg: #eef8f1;
  --app-success-text: #246b43;
  --app-warning-bg: #fff4e5;
  --app-warning-text: #c56a00;
  --app-error-bg: #fff2f2;
  --app-error-text: #b44141;
  --app-danger-bg: #f7e8ee;
  --app-danger-border: #d7a8b8;
  --app-danger-text: #8b3d5a;

  /* Rojo de alerta: avisos sin leer y otros indicadores que piden atención. */
  --app-alert: #e03131;
  --app-alert-dark: #b02020;

  --app-shadow-lg: 0 22px 60px rgba(69, 20, 68, .12);
  --app-shadow-md: 0 16px 40px rgba(69, 20, 68, .10);
  --app-shadow-sm: 0 8px 24px rgba(69, 20, 68, .07);

  --app-gradient: linear-gradient(90deg, var(--app-primary) 0%, var(--app-secondary) 100%);
  --app-radius-lg: 28px;
  --app-radius-md: 22px;
  --app-radius-sm: 16px;
}

/* BASE */
* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: "Encode Sans", Arial, sans-serif;
  color: var(--app-text);
  background: var(--app-bg);
  overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
  font-family: "Encode Sans", Arial, sans-serif
}

body.app-modal-open,
body.app-sidebar-open {
  overflow: hidden
}

main {
  min-height: 100vh
}

a,
a:hover,
a:focus {
  text-decoration: none
}

img {
  max-width: 100%;
  height: auto
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

/* LAYOUT */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  background: radial-gradient(circle at top right, rgba(158, 70, 148, .10), transparent 35%), var(--app-bg);
}

.app-main {
  min-width: 0
}

.app-public {
  min-height: 100vh
}

.app-page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
  max-width: 1080px;
}

.app-page-header {
  margin-bottom: 26px
}

.app-page-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  font-weight: 650;
  color: var(--app-text);
  letter-spacing: -.7px;
}

.app-page-subtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--app-primary-dark);
}

.app-section-header {
  margin: 28px 0 16px;
}

.app-section-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 650;
  color: var(--app-text);
}

.app-section-subtitle,
.app-card-text {
  margin: 0;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

.app-muted-text {
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 600;
}

/* GRID */
.app-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px
}

.app-grid-main {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr)
}

.app-grid-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr)
}

.app-grid-secondary-clean {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr)
}

.app-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

/* CARDS */
.app-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow-sm);
  padding: 26px;
}

.app-card-featured {
  min-height: 260px
}

.app-card-soft {
  background: linear-gradient(135deg, #fff 0%, #fbf2fb 100%)
}

.app-card-modern {
  padding: 34px
}

.app-card-narrow {
  max-width: 760px;
  margin-inline: auto
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.app-card-header-centered {
  display: block;
  text-align: center;
  margin-bottom: 26px;
}

.app-card-title,
.app-card-header h2,
.app-card-header h3 {
  margin: 0;
  color: var(--app-text);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 650;
}

.app-card-header p {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.45;
}

.app-eyebrow {
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
}

/* BOTONES */
.app-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 650;
  font-size: 15px;
  transition: all .22s ease;
  cursor: pointer;
  border: 0;
}

.app-btn-primary {
  min-height: 50px;
  background: var(--app-gradient);
  color: var(--app-white) !important;
  box-shadow: 0 14px 30px rgba(158, 70, 148, .22);
}

.app-btn-primary:hover {
  transform: translateY(-2px);
  color: var(--app-white) !important;
  box-shadow: 0 18px 40px rgba(158, 70, 148, .28);
}

.app-btn-outline {
  border: 1.5px solid var(--app-primary);
  background: var(--app-white);
  color: var(--app-primary-dark) !important;
}

.app-btn-outline:hover {
  background: var(--app-primary);
  color: var(--app-white) !important;
  transform: translateY(-1px);
}

.app-btn-danger-soft {
  border: 1px solid var(--app-danger-border);
  background: var(--app-danger-bg);
  color: var(--app-danger-text) !important;
}

.app-btn-danger-soft:hover {
  background: var(--app-danger-text);
  color: #fff !important;
}

.app-btn-full {
  width: 100%
}

.app-btn-fixed {
  min-width: 180px
}

.app-btn-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px
}

.app-link {
  color: var(--app-primary);
  font-weight: 650
}

.app-link:hover {
  color: var(--app-primary-dark)
}

/* BADGES / TAGS */
.app-badge {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-badge-success,
.app-badge-confirmed {
  background: var(--app-success-bg);
  color: var(--app-success-text);
}

.app-badge-danger,
.app-badge-cancelled {
  background: var(--app-danger-bg);
  color: var(--app-danger-text);
}

.app-badge-warning,
.app-badge-missed,
.app-badge-absent {
  background: var(--app-warning-bg);
  color: var(--app-warning-text);
}

.app-badge-overbook,
.st-overbook-appointment {
  background: #e5f4f2;
  color: #17675e;
}

.st-overbook-appointment {
  border-left: 3px solid #2b8a7e;
  padding-left: 8px;
}

.app-tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.app-tag {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
}

/* FORMS */
.app-form-group {
  margin-bottom: 18px
}

.app-label,
.app-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--app-text);
  margin-bottom: 8px;
}

.app-input,
.app-form-group input[type="text"],
.app-form-group input[type="email"],
.app-form-group input[type="password"],
.app-form-group input[type="date"],
.app-form-group input[type="tel"],
.app-form-group select {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(158, 70, 148, .18);
  border-radius: 999px;
  padding: 0 22px;
  background: rgba(255, 255, 255, .94);
  color: var(--app-text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
  transition: all .22s ease;
}

.app-input:focus,
.app-form-group input:focus,
.app-form-group select:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 4px rgba(158, 70, 148, .12);
}

.app-input::placeholder {
  color: #8c8c8c
}

.app-help-text {
  display: block;
  margin-top: 7px;
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.4;
}

.app-password-wrap {
  position: relative
}

.app-password-wrap .app-input {
  padding-right: 58px
}

.app-toggle-password {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--app-primary);
  font-size: 18px;
  padding: 0;
}

.app-form-row {
  display: flex;
  align-items: center;
  gap: 12px
}

.app-form-row-between {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px
}

.app-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--app-muted);
  font-size: 14px
}

.app-check input {
  min-height: auto
}

.app-form-grid {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -10px
}

.app-form-grid>.app-form-group {
  padding-inline: 10px
}

.app-col-12 {
  width: 100%
}

.app-col-6 {
  width: 50%
}

.app-inline-fields {
  display: flex;
  gap: 10px
}

.app-input-prefix {
  max-width: 100px;
  flex: 0 0 100px
}

.app-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap
}

.app-actions-center {
  justify-content: center
}

.app-actions-inside {
  margin-top: 24px
}

/* ALERTS / INFO */
.app-alert {
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 22px;
  border: 1px solid transparent;
}

.app-alert-error {
  background: var(--app-error-bg);
  color: var(--app-error-text);
  border-color: rgba(180, 65, 65, .18);
}

.app-alert strong {
  display: block;
  margin-bottom: 8px
}

.app-alert ul {
  margin: 0;
  padding-left: 18px
}

.app-info-note {
  min-height: 52px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.app-info-note-success {
  background: var(--app-success-bg);
  color: var(--app-success-text)
}

.app-divider {
  height: 1px;
  background: rgba(158, 70, 148, .12);
  margin: 28px 0
}

/* SHELL: SIDEBAR / TOPBAR */
.app-topbar {
  height: 78px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(69, 20, 68, .06);
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 150;
}

.app-menu-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--app-primary);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-menu-button:hover {
  background: var(--app-surface-soft)
}

.app-topbar-logo {
  display: flex;
  justify-content: center;
  align-items: center
}

.app-topbar-logo img {
  height: 44px;
  width: auto
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px
}

/* Sin avisos pendientes queda en violeta, con la paleta del resto del topbar. */
.app-topbar-notification {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 999px;
  background: rgba(158, 70, 148, .12);
  color: var(--app-primary-dark) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--app-shadow-sm);
  transition: all .22s ease;
}

.app-topbar-notification i {
  font-size: 1.4rem;
  color: var(--app-primary)
}

.app-topbar-notification:hover {
  background: rgba(158, 70, 148, .22);
  transform: translateY(-1px)
}

/* Con avisos sin leer la campana se tiñe y late, para que no pase inadvertida. */
.app-topbar-notification.has-unread {
  background: rgba(224, 49, 49, .14);
  box-shadow: 0 8px 22px rgba(224, 49, 49, .35);
}

.app-topbar-notification.has-unread i {
  color: var(--app-alert-dark);
  animation: appBellRing 3s ease-in-out infinite;
  transform-origin: top center;
}

.app-topbar-notification.has-unread:hover {
  background: rgba(224, 49, 49, .24);
}

.app-topbar-notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--app-alert);
  color: var(--app-white);
  border: 2px solid var(--app-white);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(224, 49, 49, .55);
  animation: appBellPulse 3s ease-in-out infinite;
}

@keyframes appBellPulse {
  0%, 22%, 100% { transform: scale(1); }
  8%, 15% { transform: scale(1.18); }
}

@keyframes appBellRing {
  0%, 18%, 100% { transform: rotate(0); }
  4%, 12% { transform: rotate(12deg); }
  8% { transform: rotate(-12deg); }
}

@media (prefers-reduced-motion: reduce) {
  .app-topbar-notification.has-unread i,
  .app-topbar-notification-count {
    animation: none;
  }
}

.app-user-pill {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--app-white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--app-text) !important;
  font-weight: 600;
  box-shadow: var(--app-shadow-sm);
  cursor: pointer;
}

.app-user-pill i {
  color: var(--app-primary)
}

.app-account-menu {
  position: relative;
  display: inline-flex
}

.app-account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(158, 70, 148, .14);
  box-shadow: 0 18px 45px rgba(69, 20, 68, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s ease;
  z-index: 500;
}

.app-account-menu.is-open .app-account-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-account-dropdown a {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-text) !important;
  font-weight: 600;
}

.app-account-dropdown a i {
  width: 20px;
  color: var(--app-primary);
  text-align: center
}

.app-account-dropdown a:hover {
  background: var(--app-surface-soft);
  color: var(--app-primary-dark) !important
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 86px;
  background: linear-gradient(180deg, #451444 0%, #5b1857 55%, #451444 100%);
  padding: 20px 14px;
  color: #fff;
  overflow: hidden;
  transition: width .25s ease, transform .25s ease;
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.app-sidebar:hover {
  width: 280px
}

.app-sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex: 0 0 auto;
}

.app-sidebar-brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%
}

.app-sidebar-brand img {
  width: 24px !important;
  max-width: 24px !important;
  height: auto;
  display: block;
}

.app-sidebar:hover .app-sidebar-brand img,
body.app-sidebar-open .app-sidebar .app-sidebar-brand img {
  width: 38px !important;
  max-width: 38px !important
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}

.app-sidebar-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  border-radius: 16px;
  padding: 0 15px;
  white-space: nowrap;
  font-weight: 600;
  opacity: .92;
}

.app-sidebar-nav a i {
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-size: 22px;
}

.app-sidebar-nav a span {
  opacity: 0;
  transform: translateX(-8px);
  transition: all .18s ease;
}

.app-sidebar:hover .app-sidebar-nav a span,
body.app-sidebar-open .app-sidebar .app-sidebar-nav a span {
  opacity: 1;
  transform: translateX(0);
}

.app-sidebar-nav a:hover,
.app-sidebar-nav a.is-active {
  background: rgba(255, 255, 255, .14);
  color: #fff
}

.app-sidebar-help {
  margin-top: auto;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff !important;
  text-align: center;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
}

.app-sidebar:hover .app-sidebar-help,
body.app-sidebar-open .app-sidebar .app-sidebar-help {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-sidebar-help i {
  display: block;
  margin: 0 auto 8px;
  color: var(--app-secondary);
  font-size: 34px;
  line-height: 1;
}

.app-sidebar-help strong {
  display: block;
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
  margin-bottom: 6px
}

.app-sidebar-help p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  line-height: 1.28
}

.app-sidebar-help span {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .72);
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.app-sidebar-help:hover span {
  background: var(--app-secondary);
  border-color: var(--app-secondary);
  color: var(--app-primary-dark) !important
}

.app-sidebar-overlay {
  display: none
}

/* DASHBOARD / LISTS */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.app-list-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(158, 70, 148, .10);
}

.app-list-row:last-child {
  padding-bottom: 0;
  border-bottom: 0
}

.app-date-badge {
  width: 58px;
  height: 64px;
  border-radius: 16px;
  background: var(--app-surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-date-badge strong {
  font-size: 24px;
  line-height: 1;
  color: var(--app-text);
  font-weight: 650
}

.app-date-badge span {
  margin-top: 4px;
  color: var(--app-primary-dark);
  font-weight: 650;
  font-size: 12px;
  text-transform: uppercase
}

.app-list-info strong,
.app-list-info span,
.app-list-info small {
  display: block
}

.app-list-info strong {
  color: var(--app-text);
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 650
}

.app-list-info span {
  color: var(--app-primary);
  font-weight: 600;
  margin-bottom: 4px
}

.app-list-info small {
  color: var(--app-muted)
}

/* Reserva en pasos: profesional -> día -> horario. */
.app-steps {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}

.app-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  color: var(--app-muted);
  text-decoration: none;
}

a.app-step:hover {
  border-color: var(--app-primary);
  color: var(--app-primary-dark);
}

.app-step.is-current {
  background: rgba(158, 70, 148, .10);
  border-color: var(--app-primary);
  color: var(--app-primary-dark);
}

.app-step-number {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.app-step.is-current .app-step-number {
  background: var(--app-primary);
  color: var(--app-white);
}

.app-step-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 13px;
}

.app-step-label strong {
  color: var(--app-text);
  font-size: 14px;
}

.app-empty-state-lg {
  padding: 48px 28px;
}

/* Paso 1: tarjetas de profesional */
.app-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.app-pick-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 20px;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}

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

.app-pick-info h3 {
  margin: 0 0 2px;
  font-size: 17px;
  color: var(--app-text);
}

.app-pick-info p {
  margin: 0 0 4px;
  color: var(--app-primary);
  font-weight: 600;
  font-size: 14px;
}

.app-pick-info small {
  color: var(--app-muted);
}

.app-pick-arrow {
  color: var(--app-primary);
  font-size: 1.1rem;
}

/* Paso 2: tarjetas de día */
.app-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.app-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 12px;
  text-decoration: none;
  text-align: center;
  transition: border-color .18s ease, transform .18s ease;
}

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

.app-day-weekday {
  color: var(--app-primary);
  font-weight: 700;
  font-size: 13px;
  text-transform: capitalize;
}

.app-day-number {
  color: var(--app-text);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 650;
}

.app-day-month {
  color: var(--app-muted);
  font-size: 13px;
  text-transform: capitalize;
}

.app-day-card small {
  margin-top: 6px;
  color: var(--app-primary-dark);
  font-weight: 650;
  font-size: 12px;
}

/* Paso 3: los horarios muestran también la modalidad */
.app-time-btn small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  opacity: .75;
}

@media (max-width:575px) {
  .app-pick-grid {
    grid-template-columns: 1fr;
  }

  .app-day-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Elegir centro para sacar turno, dentro del panel del paciente. */
.app-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.app-center-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  /* La primera fila crece: así los botones quedan al ras abajo en todas las
     tarjetas aunque la dirección de una ocupe más líneas que la de otra. */
  grid-template-rows: 1fr auto;
  gap: 18px;
  align-items: start;
}

.app-center-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(158, 70, 148, .12);
  color: var(--app-primary);
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-center-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-center-info h2 {
  margin: 6px 0 4px;
  font-size: 19px;
  color: var(--app-text);
}

.app-center-info p {
  margin: 0;
  color: var(--app-muted);
  font-size: 14px;
}

.app-center-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 4px;
}

@media (max-width:575px) {
  .app-center-grid {
    grid-template-columns: 1fr;
  }

  .app-center-card {
    grid-template-columns: 1fr;
  }

  .app-center-actions {
    grid-column: 1 / -1;
  }
}

/* Canales de notificación: fila con el canal y el dato de contacto que pide. */
.app-channel-row {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  padding: 20px;
}

.app-channel-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.app-channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(158, 70, 148, .12);
  color: var(--app-primary);
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-channel-head strong {
  display: block;
  color: var(--app-text);
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 2px;
}

.app-channel-head > div > span {
  display: block;
  color: var(--app-muted);
  font-size: 14px;
}

.app-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--app-primary-dark);
  white-space: nowrap;
  cursor: pointer;
}

.app-switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--app-primary);
  cursor: pointer;
}

.app-channel-field {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--app-border);
}

.app-channel-field label {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}

.app-channel-field.is-hidden {
  display: none;
}

@media (max-width:575px) {
  .app-channel-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .app-switch {
    grid-column: 1 / -1;
  }
}

/* Pares etiqueta/valor en dos columnas, para fichas de datos de sólo lectura. */
.app-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}

.app-data-grid > div {
  padding: 14px 0;
  border-bottom: 1px solid rgba(158, 70, 148, .10);
  min-width: 0;
}

.app-data-grid > div:nth-last-child(-n+2) {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-data-grid strong {
  display: block;
  color: var(--app-text);
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 4px;
}

.app-data-grid span {
  display: block;
  color: var(--app-primary);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.app-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.app-summary-grid div {
  background: rgba(158, 70, 148, .08);
  border-radius: 18px;
  padding: 14px;
}

.app-summary-grid span {
  display: block;
  color: var(--app-muted);
  font-size: 13px;
  margin-bottom: 4px
}

.app-summary-grid strong {
  display: block;
  color: var(--app-primary-dark);
  font-size: 24px;
  font-weight: 600
}

.app-action-card {
  min-height: 132px;
  padding: 22px;
  display: grid;
  grid-template-columns: 64px 1fr 22px;
  gap: 16px;
  align-items: center;
  color: var(--app-text) !important;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow-sm);
  transition: all .22s ease;
}

.app-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--app-shadow-md)
}

.app-action-icon,
.app-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--app-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-primary);
}

.app-action-icon i,
.app-icon-box i {
  font-size: 28px
}

.app-action-arrow {
  color: var(--app-primary);
  font-size: 22px
}

.app-shortcut-list {
  display: flex;
  flex-direction: column
}

.app-shortcut-list a {
  min-height: 48px;
  display: grid;
  grid-template-columns: 26px 1fr 16px;
  align-items: center;
  gap: 12px;
  color: var(--app-text) !important;
  font-weight: 600;
  border-bottom: 1px solid rgba(158, 70, 148, .10);
}

.app-shortcut-list a:last-child {
  border-bottom: 0
}

.app-shortcut-list i {
  color: var(--app-primary)
}

.app-help-card {
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #fbf1fb 100%)
}

.app-help-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: var(--app-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-primary);
}

.app-help-icon i {
  font-size: 38px
}

/* EMPTY */
.app-empty-state {
  padding: 28px 20px;
  border: 1px dashed rgba(15, 23, 42, .14);
  border-radius: 20px;
  background: rgba(248, 250, 252, .85);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.app-empty-state i,
.app-empty-icon {
  font-size: 2rem;
  color: var(--app-primary);
  margin-bottom: 4px;
}

.app-empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--app-surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-empty-state strong {
  color: #0f172a;
  font-size: .98rem
}

.app-empty-state span {
  font-size: .9rem
}

/* LOGIN */
.app-login-shell {
  min-height: 100vh;
  padding: 56px 20px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--app-white);
}

.app-login-logo {
  text-align: center;
  margin-bottom: 34px
}

.app-login-logo img {
  width: min(250px, 88vw);
  height: auto
}

.app-login-card {
  width: 100%;
  max-width: 520px;
  padding: 44px 42px
}

.app-login-register {
  margin-top: 28px;
  text-align: center
}

.app-login-register p {
  margin-bottom: 14px;
  color: var(--app-muted)
}

/* REGISTER */
.app-register-shell {
  min-height: 100vh;
  padding: 70px 0;
  background: var(--app-bg)
}

.app-register-clean {
  padding: 42px 0 70px;
  background: #fbf6fb
}

.app-register-container {
  max-width: 980px;
  margin: 0 auto
}

.app-container-narrow {
  max-width: 760px
}

.app-register-brand {
  text-align: center;
  margin-bottom: 24px
}

.app-register-brand img {
  max-height: 76px
}

.app-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 24px;
}

.app-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: rgba(158, 70, 148, .15);
}

.app-stepper div {
  position: relative;
  z-index: 1;
  text-align: center
}

.app-stepper span {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(158, 70, 148, .18);
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.app-stepper small {
  display: block;
  color: var(--app-muted);
  font-weight: 600;
  font-size: 13px
}

.app-stepper .is-active span,
.app-stepper .is-done span {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
  color: #fff
}

.app-stepper .is-active small,
.app-stepper .is-done small {
  color: var(--app-primary-dark)
}

.app-chip-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.app-chip-option {
  margin: 0;
  cursor: pointer
}

.app-chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.app-chip-option span {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(158, 70, 148, .20);
  background: #fff;
  color: var(--app-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  transition: all .2s ease;
}

.app-chip-option input:checked+span {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
  color: #fff
}

.app-responsible-section {
  display: none
}

.app-responsible-section.is-visible {
  display: block
}

/* Botón de Google y separador "o" en el ingreso. */
.app-or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--app-muted);
  font-size: 13px;
}

.app-or-divider::before,
.app-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--app-border);
}

.app-btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--app-white);
  color: var(--app-text) !important;
  border: 1px solid var(--app-border);
  font-weight: 650;
}

.app-btn-google:hover {
  background: var(--app-surface-soft);
  border-color: var(--app-primary);
}

/* Presentación del bloque de responsable que aparece al cargar un menor. */
.app-responsible-intro {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 4px 0 22px;
  padding: 20px 22px;
  border-radius: var(--app-radius-md);
  background: rgba(158, 70, 148, .07);
  border: 1px solid var(--app-border);
}

.app-responsible-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--app-white);
  color: var(--app-primary);
  font-size: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--app-shadow-sm);
}

.app-responsible-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--app-secondary);
  color: var(--app-primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.app-responsible-copy h2 {
  margin: 10px 0 4px;
  font-size: 20px;
  color: var(--app-text);
}

.app-responsible-copy p {
  margin: 0;
  color: var(--app-muted);
  font-size: 14px;
}

.app-responsible-points {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.app-responsible-points li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--app-text);
  font-size: 13.5px;
}

.app-responsible-points i {
  color: var(--app-primary);
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width:575px) {
  .app-responsible-intro {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

/* PROFILE / FAMILY */
.app-profile-layout {
  display: block
}

.app-profile-card-main {
  padding: 28px
}

.app-profile-top {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start
}

.app-profile-photo {
  text-align: center
}

.app-photo-preview {
  width: 112px;
  height: 112px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--app-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--app-primary);
  font-size: 52px;
}

.app-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.app-photo-upload-label {
  cursor: pointer;
  color: var(--app-primary);
  font-weight: 650;
  font-size: 14px;
}

.app-photo-input {
  display: none
}

.app-readonly-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.app-readonly-grid div {
  padding: 14px;
  border-radius: 16px;
  background: var(--app-surface-soft);
}

.app-readonly-grid span {
  display: block;
  color: var(--app-muted);
  font-size: 12px;
  margin-bottom: 4px
}

.app-readonly-grid strong {
  font-size: 15px;
  color: var(--app-text)
}

.app-two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px
}

.app-family-module {
  margin-top: 24px
}

.app-family-module-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px
}

.app-family-count {
  font-weight: 650;
  color: var(--app-primary-dark)
}

.app-contact-summary-grid,
.app-family-list {
  display: grid;
  gap: 14px
}

.app-contact-summary-card,
.app-family-member {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--app-bg-soft);
  border: 1px solid rgba(158, 70, 148, .10);
}

.app-contact-avatar,
.app-family-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--app-surface-soft);
  color: var(--app-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
}

.app-contact-info strong,
.app-family-info strong {
  display: block;
  color: var(--app-text)
}

.app-contact-info span,
.app-family-info span,
.app-contact-phone,
.app-family-phone {
  color: var(--app-muted);
  font-size: 14px
}

.app-family-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px
}

.app-family-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px
}

.app-family-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: #fff;
  color: var(--app-primary-dark);
  font-weight: 650
}

.app-family-tab.is-active {
  background: var(--app-primary-dark);
  color: #fff
}

.app-family-tab-panel {
  display: none
}

.app-family-tab-panel.is-active {
  display: block
}

.app-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px
}

.app-permission-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: var(--app-bg-soft)
}

/* APPOINTMENTS */
.app-panel-section {
  background: var(--app-bg);
  min-height: 100vh;
  padding-bottom: 72px
}

.app-tabs {
  display: inline-flex;
  gap: 8px;
  background: var(--app-surface);
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--app-shadow-sm);
  margin-bottom: 20px;
}

.app-tabs a {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--app-muted);
}

.app-tabs a.is-active {
  background: var(--app-surface-soft);
  color: var(--app-primary-dark)
}

.app-appointments-list {
  display: flex;
  flex-direction: column;
  gap: 18px
}

.app-appointment-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  padding: 26px;
  box-shadow: var(--app-shadow-sm);
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
}

.app-appointment-date {
  border-radius: 18px;
  background: var(--app-surface-soft);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--app-primary-dark);
}

.app-date-day {
  font-size: 34px;
  font-weight: 650;
  line-height: 1
}

.app-date-month {
  margin-top: 6px;
  font-weight: 650;
  text-transform: uppercase
}

.app-appointment-body {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center
}

.app-appointment-main h3 {
  font-size: 22px;
  font-weight: 650;
  margin: 0 0 6px
}

.app-appointment-professional {
  color: var(--app-primary);
  font-weight: 650;
  margin-bottom: 12px
}

.app-appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin: 0;
  padding: 0;
  list-style: none
}

.app-appointment-meta li {
  color: var(--app-muted);
  font-weight: 600
}

.app-appointment-meta i {
  color: var(--app-primary);
  margin-right: 6px
}

.app-appointment-actions {
  display: flex;
  flex-direction: column;
  gap: 10px
}

/* NOTIFICATIONS */
.app-notifications-card {
  padding: 0;
  overflow: hidden
}

.app-notification-list {
  display: flex;
  flex-direction: column
}

.app-notification-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid rgba(158, 70, 148, .10);
}

.app-notification-item:last-child {
  border-bottom: 0
}

.app-notification-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--app-surface-soft);
  color: var(--app-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.app-notification-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between
}

.app-notification-title-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  color: var(--app-text)
}

.app-notification-body p {
  margin: 8px 0 10px;
  color: var(--app-muted);
  line-height: 1.45
}

.app-unread-dot {
  border-radius: 999px;
  background: var(--app-secondary);
  color: var(--app-primary-dark);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700
}

.app-notification-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--app-muted);
  font-size: 13px
}

/* BOOKING */
.app-filter-card {
  padding: 24px
}

.app-filter-toggle {
  display: none
}

.app-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
}

.app-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.app-radio-group label {
  margin: 0;
  cursor: pointer
}

.app-radio-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.app-radio-group span {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(158, 70, 148, .20);
  background: #fff;
  color: var(--app-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
}

.app-radio-group input:checked+span {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
  color: #fff
}

.app-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 18px
}

.app-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 22px
}

.app-schedule-day-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.app-schedule-day-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  color: var(--app-text)
}

.app-schedule-card {
  padding: 0;
  overflow: hidden
}

.app-schedule-row {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(300px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid rgba(158, 70, 148, .10);
}

.app-schedule-row:last-child {
  border-bottom: 0
}

.app-professional {
  display: flex;
  align-items: center;
  gap: 14px
}

.app-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.app-professional-info h4 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 650;
  color: var(--app-text)
}

.app-professional-info p {
  margin: 0 0 8px;
  color: var(--app-muted);
  font-size: 14px
}

.app-time-picker-label {
  display: block;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px
}

.app-time-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.app-schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px
}

.app-calendar-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 86px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(158, 70, 148, .18);
  background: linear-gradient(180deg, #fff 0%, #faf6fb 100%);
  color: var(--app-primary-dark);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  user-select: none;
  cursor: default;
  pointer-events: none;
}

.app-calendar-day {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
  font-weight: 700
}

.app-calendar-slot strong {
  font-size: 1.05rem;
  line-height: 1.2
}

.app-calendar-slot small {
  font-size: .86rem;
  font-weight: 700;
  opacity: .9
}

.app-time-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(158, 70, 148, .20);
  background: #fff;
  color: var(--app-primary-dark);
  font-weight: 650;
  cursor: pointer;
  transition: all .2s ease;
}

.app-time-btn:hover,
.app-time-btn.is-selected {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
  color: #fff
}

.app-reserve-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none
}

.app-help-row {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 16px;
  align-items: center;
}

/* CONFIRM */
.app-confirm-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.app-confirm-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--app-success-bg);
  color: var(--app-success-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.app-confirm-card h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650
}

.app-confirm-text {
  margin-bottom: 24px
}

.app-confirm-summary {
  background: var(--app-surface-soft);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-confirm-summary strong {
  font-size: 20px;
  font-weight: 650
}

.app-confirm-summary span {
  color: var(--app-muted);
  font-weight: 600
}

/* MODAL */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none
}

.app-modal.is-open {
  display: block
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 16, 28, .55);
  backdrop-filter: blur(2px)
}

.app-modal-dialog {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  max-width: 560px;
  margin: 8vh auto 0;
  background: #fff;
  border-radius: var(--app-radius-lg);
  padding: 30px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .20);
}

.app-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-modal-head {
  margin-bottom: 20px;
  padding-right: 34px
}

.app-modal-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--app-primary);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.app-modal-head h3 {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.12;
  margin: 0 0 10px
}

.app-modal-head p {
  margin: 0;
  color: var(--app-muted)
}

.app-modal-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px
}

.app-modal-row {
  min-height: 52px;
  border-radius: var(--app-radius-sm);
  background: var(--app-surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

.app-modal-row strong {
  color: var(--app-primary-dark);
  font-size: 13px
}

.app-modal-row span {
  color: var(--app-text);
  font-weight: 500;
  text-align: right
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap
}

/* FOOTER */
.app-footer {
  margin-top: 0;
  background: var(--app-primary-dark);
}

.app-footer-simple {
  padding: 18px 0;
  color: rgba(255, 255, 255, .82)
}

.app-footer-inner {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 48px;
}

.app-footer-inner strong {
  display: block;
  color: #fff
}

.app-footer-inner span {
  display: block;
  font-size: 12px;
}

.app-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center
}

.app-footer a {
  color: #fff !important;
  font-weight: 600;
}

.app-footer i {
  margin-right: 6px
}

/* TOASTS */
.app-toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
}

.app-toast {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  border: 1px solid rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
  animation: appToastIn .28s ease both;
}

.app-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: #0ea5e9
}

.app-toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, .10);
  color: #0284c7;
  font-size: 1rem
}

.app-toast-text {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35
}

.app-toast-close {
  border: 0;
  background: transparent;
  color: #64748b;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer
}

.app-toast-success::before {
  background: #16a34a
}

.app-toast-success .app-toast-icon {
  background: rgba(22, 163, 74, .10);
  color: #15803d
}

.app-toast-error::before {
  background: #ef4444
}

.app-toast-error .app-toast-icon {
  background: rgba(239, 68, 68, .10);
  color: #dc2626
}

.app-toast-warning::before {
  background: #f59e0b
}

.app-toast-warning .app-toast-icon {
  background: rgba(245, 158, 11, .12);
  color: #d97706
}

.app-toast.is-hiding {
  animation: appToastOut .25s ease both
}

@keyframes appToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) translateX(18px) scale(.98)
  }

  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1)
  }
}

@keyframes appToastOut {
  from {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1)
  }

  to {
    opacity: 0;
    transform: translateY(-6px) translateX(18px) scale(.98)
  }
}

/* RESPONSIVE */
@media (min-width:992px) {
  .app-menu-button {
    display: none !important
  }

  .app-topbar {
    grid-template-columns: 1fr auto
  }
}

@media (max-width:1199px) {

  .app-grid-main,
  .app-grid-secondary,
  .app-grid-secondary-clean {
    grid-template-columns: 1fr
  }

  .app-actions-grid {
    grid-template-columns: 1fr
  }

  .app-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .app-filter-actions {
    justify-content: flex-start
  }
}

@media (max-width:991px) {
  .app-shell {
    grid-template-columns: 1fr
  }

  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 84vw !important;
    max-width: 330px !important;
    height: 100vh !important;
    padding: 24px 18px;
    transform: translateX(-105%) !important;
    z-index: 9999 !important;
    box-shadow: 24px 0 70px rgba(0, 0, 0, .20);
  }

  body.app-sidebar-open .app-sidebar {
    transform: translateX(0) !important
  }

  body.app-sidebar-open .app-sidebar-overlay {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9990 !important;
    background: rgba(24, 12, 24, .46) !important;
    border: 0 !important;
  }

  .app-sidebar:hover {
    width: 84vw;
    max-width: 330px
  }

  .app-sidebar-brand {
    justify-content: flex-start;
    padding-left: 12px
  }

  .app-sidebar-nav a span {
    opacity: 1;
    transform: none
  }

  .app-sidebar-help {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none
  }

  .app-topbar {
    grid-template-columns: 44px 1fr auto;
    height: 68px;
    padding: 0 12px;
    gap: 10px
  }

  .app-topbar-logo img {
    height: 36px
  }

  .app-topbar-action span,
  .app-user-pill span {
    display: none
  }

  .app-topbar-action,
  .app-user-pill {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center
  }

  .app-topbar-notification {
    width: 44px;
    height: 44px;
    min-width: 44px
  }

  .app-topbar-notification i {
    font-size: 1.25rem
  }

  .app-page {
    width: calc(100% - 24px);
    padding: 22px 0 44px
  }

  .app-page-title {
    font-size: 30px;
    letter-spacing: -.5px
  }

  .app-page-subtitle {
    font-size: 15px
  }

  .app-card {
    padding: 22px;
    border-radius: 22px
  }

  .app-list-row {
    grid-template-columns: 54px 1fr
  }

  .app-list-row .app-badge {
    grid-column: 2
  }

  .app-action-card {
    grid-template-columns: 58px 1fr 18px;
    min-height: 112px;
    padding: 20px;
    border-radius: 20px
  }

  .app-action-icon,
  .app-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 18px
  }

  .app-action-icon i,
  .app-icon-box i {
    font-size: 28px
  }

  .app-schedule-row {
    grid-template-columns: 1fr;
    align-items: start
  }

  .app-help-row {
    grid-template-columns: 54px 1fr
  }

  .app-help-row .app-btn {
    grid-column: 1 / -1;
    width: 100%
  }

  .app-footer-inner {
    grid-template-columns: 1fr;
    text-align: center
  }
}

@media (max-width:767px) {
  .container {
    width: calc(100% - 24px)
  }

  .app-data-grid {
    grid-template-columns: 1fr;
  }

  .app-data-grid > div:nth-last-child(-n+2) {
    border-bottom: 1px solid rgba(158, 70, 148, .10);
    padding-bottom: 14px;
  }

  .app-data-grid > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .app-page {
    width: calc(100% - 20px);
    padding-top: 18px
  }

  .app-page-header {
    margin-bottom: 18px
  }

  .app-page-title {
    font-size: 26px;
    line-height: 1.08
  }

  .app-card {
    padding: 18px;
    border-radius: 20px
  }

  .app-actions-grid,
  .app-grid {
    gap: 18px
  }

  .app-col-6,
  .app-col-12 {
    width: 100%
  }

  .app-actions {
    flex-direction: column
  }

  .app-actions .app-btn {
    width: 100%
  }

  .app-login-shell {
    padding: 36px 16px 50px
  }

  .app-login-logo img {
    width: min(300px, 86vw)
  }

  .app-login-card {
    padding: 28px 20px;
    border-radius: 24px
  }

  .app-register-clean {
    padding: 28px 0 44px
  }

  .app-card-modern {
    padding: 22px;
    border-radius: 22px
  }

  .app-stepper {
    gap: 6px
  }

  .app-stepper small {
    font-size: 11px
  }

  .app-profile-top {
    grid-template-columns: 1fr
  }

  .app-readonly-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .app-two-columns {
    grid-template-columns: 1fr
  }

  .app-appointment-card {
    grid-template-columns: 1fr
  }

  .app-appointment-body,
  .app-appointment-actions {
    flex-direction: column;
    align-items: flex-start
  }

  .app-filter-toggle {
    width: 100%;
    min-height: 46px;
    border: 1.5px solid var(--app-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--app-primary-dark);
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
  }

  .app-filter-card form {
    display: none;
    margin-top: 18px
  }

  .app-filter-card.is-open form,
  body.has-active-filters .app-filter-card form {
    display: block
  }

  .app-filter-grid {
    grid-template-columns: 1fr
  }

  .app-filter-actions {
    flex-direction: column;
    align-items: stretch
  }

  .app-filter-actions .app-btn {
    width: 100%
  }

  .app-modal-dialog {
    margin-top: 5vh;
    padding: 24px 18px 18px
  }

  .app-modal-row {
    flex-direction: column;
    align-items: flex-start
  }

  .app-modal-row span {
    text-align: left
  }

  .app-modal-actions {
    flex-direction: column
  }

  .app-modal-actions .app-btn {
    width: 100%
  }

  .app-notification-item {
    grid-template-columns: 46px 1fr
  }

  .app-notification-item form {
    grid-column: 1 / -1
  }

  .app-notification-item form .app-btn {
    width: 100%
  }

  .app-toast-container {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto
  }
}

@media (max-width:575px) {
  .app-account-dropdown {
    right: 0;
    width: 210px
  }

  .app-readonly-grid {
    grid-template-columns: 1fr
  }

  .app-summary-grid {
    grid-template-columns: 1fr
  }
}


/* =========================================
   MIS DATOS - GRUPO FAMILIAR
   Recupera diseño visual del módulo familiar con clases neutras app-*
========================================= */

.app-family-module {
  margin-top: 28px;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ffffff 0%, #fbf2fb 100%);
  border: 1px solid rgba(158, 70, 148, .18);
  box-shadow: var(--app-shadow-md);
  position: relative;
  overflow: hidden;
}

.app-family-module::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--app-gradient);
}

.app-family-module-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.app-family-module-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  color: var(--app-text);
}

.app-family-module-head p {
  margin: 0;
  color: var(--app-muted);
  max-width: 620px;
  line-height: 1.5;
}

.app-family-count {
  min-width: 118px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(158, 70, 148, .10);
  text-align: center;
}

.app-family-count strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  color: var(--app-primary-dark);
  font-weight: 700;
}

.app-family-count span {
  display: block;
  margin-top: 4px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 700;
}

.app-responsible-block {
  margin-bottom: 24px;
}

.app-family-form-head {
  margin-bottom: 20px;
}

.app-family-form-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--app-primary-dark);
}

.app-family-form-head p {
  margin: 0;
  color: var(--app-muted);
  line-height: 1.45;
}

.app-contact-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.app-contact-summary-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(158, 70, 148, .14);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(69, 20, 68, .04);
}

.app-contact-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--app-surface-soft);
  color: var(--app-primary);
  display: grid;
  place-items: center;
  font-size: 26px;
}

.app-contact-info h4 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--app-text);
  font-weight: 650;
}

.app-contact-info p {
  margin: 0 0 8px;
  color: var(--app-muted);
  font-size: 14px;
}

.app-contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--app-primary-dark);
  font-weight: 650;
  margin-bottom: 10px;
}

.app-contact-phone i {
  color: var(--app-primary);
}

.app-family-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-family-tags span {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.app-family-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.app-family-member {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(158, 70, 148, .12);
}

.app-family-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--app-surface-soft);
  color: var(--app-primary);
  display: grid;
  place-items: center;
  font-size: 26px;
}

.app-family-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
}

.app-family-info p {
  margin: 0 0 8px;
  color: var(--app-muted);
}

.app-family-phone {
  color: var(--app-muted);
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-family-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(158, 70, 148, .08);
  border: 1px solid rgba(158, 70, 148, .14);
  margin: 10px 0 20px;
}

.app-family-tab {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--app-primary-dark);
  font-weight: 700;
  cursor: pointer;
}

.app-family-tab.is-active {
  background: var(--app-gradient);
  color: #fff;
  box-shadow: 0 12px 28px rgba(158, 70, 148, .20);
}

.app-family-tab-panel {
  display: none;
}

.app-family-tab-panel.is-active {
  display: block;
}

.app-family-add-card {
  background: #fff;
  border-radius: 26px;
  padding: 26px;
  border: 1px solid rgba(158, 70, 148, .14);
}

.app-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.app-permission-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 86px;
  padding: 16px;
  border-radius: 18px;
  background: var(--app-bg-soft);
  border: 1px solid rgba(158, 70, 148, .12);
  cursor: pointer;
}

.app-permission-card input {
  margin-top: 4px;
  accent-color: var(--app-primary);
}

.app-permission-card strong,
.app-permission-card small {
  display: block;
}

.app-permission-card strong {
  color: var(--app-text);
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 4px;
}

.app-permission-card small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.35;
}

.app-family-module .app-info-note {
  margin-top: 18px;
  margin-bottom: 0;
}

.app-family-module .app-actions {
  margin-top: 26px;
}

@media (max-width: 991px) {
  .app-family-module-head {
    flex-direction: column;
  }

  .app-family-count {
    align-self: flex-start;
  }

  .app-contact-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .app-family-module {
    padding: 22px;
    border-radius: 26px;
  }

  .app-family-module-head h2 {
    font-size: 24px;
  }

  .app-family-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .app-family-tab {
    width: 100%;
  }

  .app-permission-grid {
    grid-template-columns: 1fr;
  }

  .app-contact-summary-card,
  .app-family-member {
    grid-template-columns: 48px 1fr;
  }
}

/* =========================================
   NOTIFICACIONES - CARDS INDIVIDUALES
========================================= */

.app-notifications-card {
  padding: 32px;
  background: #fff;
  border-radius: 32px;
}

.app-notification-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-notification-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 22px;
  align-items: center;

  padding: 28px 34px;
  border-radius: 28px;
  background: #fff;
  border: 1.5px solid rgba(158, 70, 148, .22);
  box-shadow: none;
}

.app-notification-item.is-unread {
  background: linear-gradient(135deg, #f9edf9 0%, #ffffff 100%);
  border-color:rgba(158, 70, 148, 0.28);
}

.app-notification-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--app-surface-soft);
  color: var(--app-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.app-notification-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.app-notification-title-row h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--app-text);
}

.app-notification-body p {
  margin: 0 0 16px;
  color: var(--app-muted);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 400;
}

.app-notification-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 700;
}

.app-notification-meta i {
  margin-right: 5px;
}

.app-notification-item form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.app-notification-item .app-btn-small {
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 0;
  background: var(--app-surface-soft);
  color: var(--app-primary-dark) !important;
  font-size: 18px;
  font-weight: 700;
}

.app-unread-dot {
  padding: 0 18px;
  border-radius: 999px;
  background: #fff4e5;
  color: #c56a00;
  font-size: 15px;
  font-weight: 700;
}

/* fuerza el badge Nueva a quedar a la derecha junto al botón */
.app-notification-title-row .app-unread-dot {
  position: absolute;
  right: 190px;
  top: 34px;
}

.app-notification-item {
  position: relative;
}

@media (max-width: 767px) {
  .app-notifications-card {
    padding: 18px;
    border-radius: 24px;
  }

  .app-notification-item {
    grid-template-columns: 54px 1fr;
    padding: 20px;
    border-radius: 22px;
  }

  .app-notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    font-size: 24px;
  }

  .app-notification-body p {
    font-size: 15px;
  }

  .app-notification-title-row h3 {
    font-size: 18px;
  }

  .app-notification-title-row .app-unread-dot {
    position: static;
  }

  .app-notification-item form {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 76px;
  }

  .app-notification-item .app-btn-small {
    min-height: 44px;
    font-size: 15px;
  }
}

/* =========================================
   OBTENER TURNO - RESTAURAR DISEÑO FINAL
========================================= */

.app-booking-page .app-filter-card {
  padding: 30px;
  border-radius: 28px;
}

.app-booking-page .app-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 24px 28px;
  align-items: end;
}

.app-booking-page .app-filter-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.app-booking-page .app-filter-actions .app-link {
  font-size: 17px;
  color: var(--app-primary);
  font-weight: 700;
}

.app-booking-page .app-filter-actions .app-btn-primary {
  min-width: 180px;
}

/* Radios con círculo visible */
.app-booking-page .app-radio-group {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.app-booking-page .app-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--app-muted);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.app-booking-page .app-radio-group input {
  position: static;
  opacity: 1;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  min-height: auto;
  accent-color: var(--app-primary);
}

.app-booking-page .app-radio-group span {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.app-booking-page .app-radio-group input:checked+span {
  background: transparent;
  color: var(--app-muted);
}

/* Cards de resultados */
.app-booking-page .app-schedule-card {
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
}

.app-booking-page .app-schedule-row {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(300px, 1fr) 180px;
  gap: 0;
  align-items: center;
  padding: 0;
}

.app-booking-page .app-professional,
.app-booking-page .app-time-picker,
.app-booking-page .app-schedule-action {
  min-height: 112px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
}

.app-booking-page .app-time-picker {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-left: 1px solid rgba(158, 70, 148, .12);
}

.app-booking-page .app-schedule-action {
  justify-content: center;
  border-left: 1px solid rgba(158, 70, 148, .12);
}

.app-booking-page .app-tag {
  background: var(--app-surface-soft);
  color: var(--app-primary-dark);
  font-weight: 700;
}

/* Botón Agendar siempre con forma correcta */
.app-booking-page .app-reserve-btn {
  min-width: 126px;
  min-height: 50px;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--app-gradient) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(158, 70, 148, .22);
}

.app-booking-page .app-reserve-btn:disabled {
  opacity: .45;
  background: var(--app-gradient) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(69, 20, 68, .10);
  cursor: not-allowed;
}

/* Horarios */
.app-booking-page .app-time-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.app-booking-page .app-time-btn.is-selected {
  background: var(--app-primary-dark);
  color: #fff;
  border-color: var(--app-primary-dark);
}

@media (max-width: 1199px) {
  .app-booking-page .app-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-booking-page .app-schedule-row {
    grid-template-columns: 1fr;
  }

  .app-booking-page .app-professional,
  .app-booking-page .app-time-picker,
  .app-booking-page .app-schedule-action {
    min-height: auto;
    border-left: 0;
  }

  .app-booking-page .app-schedule-action {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .app-booking-page .app-filter-grid {
    grid-template-columns: 1fr;
  }

  .app-booking-page .app-radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .app-booking-page .app-reserve-btn {
    width: 100%;
  }
}


/* NOTIFICACIONES - ACCIONES ALINEADAS */

.app-notification-item {
  grid-template-columns: 74px 1fr 260px;
  align-items: center;
}

.app-notification-title-row .app-unread-dot {
  position: static;
}

.app-notification-title-row {
  display: block;
}

.app-notification-item form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

/* mueve visualmente el badge al área derecha */
.app-notification-item .app-unread-dot {
  position: absolute;
  right: 210px;
  top: 50%;
  transform: translateY(-50%);
}

.app-notification-item .app-btn-small {
  min-width: 170px;
}

@media (max-width: 767px) {
  .app-notification-item {
    grid-template-columns: 54px 1fr;
  }

  .app-notification-item .app-unread-dot {
    position: static;
    transform: none;
    margin-top: 10px;
    display: inline-flex;
  }

  .app-notification-item form {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 76px;
  }
}

/* =========================================
   Logout como <form>/<button> (ghealth)
   ========================================= */

.app-sidebar-nav form,
.app-account-dropdown form {
  margin: 0;
}

.app-sidebar-nav form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.app-sidebar-nav button.app-sidebar-logout {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffd3dc;
  border-radius: 16px;
  padding: 0 15px;
  white-space: nowrap;
  font-weight: 600;
  opacity: .92;
  transition: background .18s ease, opacity .18s ease;
}

.app-sidebar-nav button.app-sidebar-logout i {
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-size: 22px;
}

.app-sidebar-nav button.app-sidebar-logout span {
  opacity: 0;
  transform: translateX(-8px);
  transition: all .18s ease;
}

.app-sidebar:hover .app-sidebar-nav button.app-sidebar-logout span,
body.app-sidebar-open .app-sidebar .app-sidebar-nav button.app-sidebar-logout span {
  opacity: 1;
  transform: translateX(0);
}

.app-sidebar-nav button.app-sidebar-logout:hover {
  background: rgba(224, 90, 110, .22);
  opacity: 1;
}

.app-account-dropdown form {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--app-border);
}

.app-account-dropdown button.app-account-logout {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-danger-text);
  font-weight: 600;
  transition: background .18s ease;
}

.app-account-dropdown button.app-account-logout i {
  width: 20px;
  color: var(--app-danger-text);
  text-align: center;
}

.app-account-dropdown button.app-account-logout:hover {
  background: var(--app-danger-bg);
}