:root {
  --pas-bg: #f6f7fb;
  --pas-card: rgba(255,255,255,.92);
  --pas-card-strong: #ffffff;
  --pas-text: #162032;
  --pas-muted: #667085;
  --pas-line: rgba(20,31,52,.10);
  --pas-primary: #6d5dfc;
  --pas-primary-2: #00b8a9;
  --pas-accent: #ff8f70;
  --pas-danger: #e5484d;
  --pas-warning: #f59e0b;
  --pas-success: #16a34a;
  --pas-shadow: 0 18px 45px rgba(30, 41, 59, .10);
  --pas-radius: 22px;
  --pas-radius-sm: 14px;
}

.pas-app,
.pas-login-card {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pas-text);
  box-sizing: border-box;
}
.pas-app *, .pas-app *::before, .pas-app *::after,
.pas-login-card *, .pas-login-card *::before, .pas-login-card *::after { box-sizing: border-box; }
.pas-app { max-width: 1380px; margin: 16px auto 48px; padding: 0 16px 36px; }
.pas-app .pas-app { display: none !important; }
.pas-context-admin { max-width: none; margin-right: 20px; }

.pas-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.36), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(0,184,169,.35), transparent 24%),
    linear-gradient(135deg, #665df3 0%, #7e5bef 42%, #12b8ad 100%);
  color: #fff;
  box-shadow: var(--pas-shadow);
}
.pas-hero:after {
  content: "";
  position: absolute;
  inset: auto -50px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.pas-hero h1 { margin: 4px 0 6px; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; letter-spacing: -.04em; color: #fff; }
.pas-hero p { margin: 0; color: rgba(255,255,255,.84); font-size: 15px; }
.pas-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.17); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.pas-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; z-index: 1; }

.pas-nav {
  position: sticky;
  top: 32px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--pas-line);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(30,41,59,.07);
}
.pas-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 10px;
  border-radius: 16px;
  color: var(--pas-muted);
  text-decoration: none;
  transition: .18s ease;
}
.pas-nav a:hover { background: rgba(109,93,252,.08); color: var(--pas-primary); }
.pas-nav a.is-active { background: linear-gradient(135deg, rgba(109,93,252,.15), rgba(0,184,169,.14)); color: var(--pas-text); box-shadow: inset 0 0 0 1px rgba(109,93,252,.12); }
.pas-nav span { font-size: 18px; line-height: 1; }
.pas-nav strong { font-size: 13px; font-weight: 800; }

.pas-content { display: grid; gap: 16px; }
.pas-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.pas-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pas-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pas-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pas-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.pas-card,
.pas-login-card {
  background: var(--pas-card);
  border: 1px solid var(--pas-line);
  border-radius: var(--pas-radius);
  padding: 20px;
  box-shadow: var(--pas-shadow);
}
.pas-card h2, .pas-card h3 { margin: 0; color: var(--pas-text); letter-spacing: -.03em; }
.pas-card h2 { font-size: 22px; }
.pas-card h3 { font-size: 17px; }
.pas-card p { color: var(--pas-muted); margin: 6px 0 0; }
.pas-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.pas-card-head a { color: var(--pas-primary); text-decoration: none; font-weight: 800; }
.pas-card-head-stack { align-items: flex-start; }
.pas-section-title { margin: 22px 0 12px !important; display: flex; align-items: center; gap: 8px; }
.pas-section-title:before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--pas-primary), var(--pas-primary-2)); }

.pas-metric { display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 18px; }
.pas-metric-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 18px; background: linear-gradient(135deg, rgba(109,93,252,.14), rgba(0,184,169,.12)); font-size: 22px; }
.pas-metric span { display: block; color: var(--pas-muted); font-size: 12px; text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.pas-metric strong { display: block; margin-top: 4px; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.04em; }
.pas-metric small { display: block; margin-top: 2px; color: var(--pas-muted); }

.pas-btn,
.pas-app button.pas-btn,
.pas-app input[type="submit"].pas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(22,32,50,.11);
  border-radius: 999px;
  background: #fff;
  color: var(--pas-text);
  text-decoration: none;
  font-weight: 850;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(30,41,59,.06);
  transition: .18s ease;
}
.pas-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30,41,59,.10); }
.pas-btn-primary { border-color: transparent; color: #fff !important; background: linear-gradient(135deg, var(--pas-primary), #8a5cf6); }
.pas-btn-light { border-color: rgba(255,255,255,.40); color: #fff !important; background: rgba(255,255,255,.18); box-shadow: none; }
.pas-btn-ghost { background: rgba(109,93,252,.08); color: var(--pas-primary) !important; border-color: rgba(109,93,252,.12); box-shadow: none; }
.pas-btn-danger { color: #fff !important; border-color: transparent; background: linear-gradient(135deg, var(--pas-danger), #f97373); }
.pas-btn-small { min-height: 32px; padding: 8px 11px; font-size: 12px; }

.pas-notice { margin: 14px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(22,32,50,.08); background: rgba(22,163,74,.10); color: #166534; font-weight: 750; }
.pas-notice-error { background: rgba(229,72,77,.11); color: #991b1b; }

.pas-form { display: block; }
.pas-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pas-field { display: grid; gap: 7px; color: var(--pas-text); font-weight: 760; font-size: 13px; }
.pas-field > span { color: #344054; }
.pas-field-wide { grid-column: 1 / -1; }
.pas-field input,
.pas-field select,
.pas-field textarea,
.pas-filters input,
.pas-filters select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(22,32,50,.13);
  border-radius: 14px;
  background: #fff;
  color: var(--pas-text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.pas-field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.pas-field input:focus,
.pas-field select:focus,
.pas-field textarea:focus,
.pas-filters input:focus,
.pas-filters select:focus { border-color: rgba(109,93,252,.55); box-shadow: 0 0 0 4px rgba(109,93,252,.10); }
.pas-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 12px 14px; border: 1px solid var(--pas-line); border-radius: 14px; background: rgba(109,93,252,.05); font-weight: 800; }
.pas-form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.pas-danger-form { margin-top: 12px; padding: 14px; border-radius: 18px; background: rgba(229,72,77,.07); border: 1px solid rgba(229,72,77,.16); }
.pas-inline-form { display: inline-flex; margin: 0; }

.pas-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) auto; gap: 10px; align-items: end; margin: 14px 0 18px; padding: 12px; border: 1px solid var(--pas-line); background: rgba(246,247,251,.75); border-radius: 18px; }
.pas-table-wrap { width: 100%; overflow-x: auto; border-radius: 18px; border: 1px solid var(--pas-line); }
.pas-table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.pas-table th { background: #f9fafc; color: var(--pas-muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; text-align: left; padding: 13px 14px; }
.pas-table td { padding: 14px; border-top: 1px solid rgba(20,31,52,.08); vertical-align: middle; }
.pas-table td strong { display: block; font-weight: 900; }
.pas-table td small { display: block; color: var(--pas-muted); margin-top: 2px; }
.pas-actions { display: flex; gap: 7px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.pas-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: rgba(102,112,133,.10); color: #475467; font-size: 11px; font-weight: 900; white-space: nowrap; }
.pas-chip-active, .pas-chip-paid, .pas-chip-attended, .pas-chip-realizada, .pas-chip-confirmed { background: rgba(22,163,74,.12); color: #15803d; }
.pas-chip-pending, .pas-chip-partial, .pas-chip-paused { background: rgba(245,158,11,.13); color: #b45309; }
.pas-chip-cancelled, .pas-chip-no_show, .pas-chip-inactive, .pas-chip-cancelada { background: rgba(229,72,77,.12); color: #b91c1c; }
.pas-chip-bonified, .pas-chip-discharge, .pas-chip-referred, .pas-chip-rescheduled { background: rgba(109,93,252,.13); color: #5b21b6; }

.pas-empty { text-align: center; padding: 34px 18px; color: var(--pas-muted); }
.pas-empty-icon { width: 58px; height: 58px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(135deg, rgba(109,93,252,.12), rgba(0,184,169,.11)); font-size: 25px; }
.pas-empty h3 { margin: 0 0 6px; color: var(--pas-text); }
.pas-empty p { margin: 0 0 14px; }

.pas-timeline { display: grid; gap: 12px; }
.pas-timeline-item { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; background: rgba(246,247,251,.85); border: 1px solid var(--pas-line); }
.pas-timeline-item time { display: grid; place-items: center; min-height: 44px; border-radius: 14px; background: #fff; color: var(--pas-primary); font-weight: 950; }
.pas-timeline-item span { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--pas-muted); margin-top: 4px; }

.pas-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; height: 245px; padding: 18px 8px 0; }
.pas-bar-wrap { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; align-items: end; text-align: center; }
.pas-bar { position: relative; min-height: 16px; border-radius: 16px 16px 7px 7px; background: linear-gradient(180deg, var(--pas-primary), var(--pas-primary-2)); box-shadow: 0 12px 24px rgba(109,93,252,.20); transition: .25s ease; }
.pas-bar:hover { filter: saturate(1.14); transform: translateY(-2px); }
.pas-bar span { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; background: var(--pas-text); color: #fff; border-radius: 999px; padding: 4px 8px; font-size: 10px; opacity: 0; pointer-events: none; transition: .18s ease; }
.pas-bar:hover span { opacity: 1; }
.pas-bar-wrap small { color: var(--pas-muted); font-weight: 900; text-transform: capitalize; }

.pas-patient-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pas-patient-head > div:first-child { display: grid; grid-template-columns: 68px 1fr; align-items: center; column-gap: 14px; }
.pas-patient-head h2 { grid-column: 2; margin: 0; font-size: 28px; }
.pas-patient-head p { grid-column: 2; margin: 4px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pas-avatar { grid-row: span 2; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 24px; color: #fff; font-size: 22px; font-weight: 950; background: linear-gradient(135deg, var(--pas-primary), var(--pas-primary-2)); box-shadow: 0 14px 26px rgba(109,93,252,.22); }
.pas-patient-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.pas-info-list { display: grid; gap: 12px; }
.pas-info-item { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid rgba(20,31,52,.08); }
.pas-info-item:last-child { border-bottom: 0; }
.pas-info-item span { color: var(--pas-muted); font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.pas-info-item p { color: var(--pas-text); margin: 0; line-height: 1.45; }
.pas-sensitive-card { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(109,93,252,.05)); }
.pas-sensitive-banner { margin: 12px 0; padding: 12px 14px; border: 1px solid rgba(109,93,252,.16); border-radius: 16px; color: #42389d; background: rgba(109,93,252,.08); font-weight: 760; }
.pas-lock { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(109,93,252,.10); color: var(--pas-primary); font-size: 12px; font-weight: 900; }

.pas-upload { display: grid; gap: 12px; margin-bottom: 16px; padding: 14px; border-radius: 18px; background: rgba(246,247,251,.85); border: 1px dashed rgba(109,93,252,.30); }
.pas-shortcodes { display: grid; gap: 9px; margin: 16px 0; }
.pas-code { width: 100%; text-align: left; border: 1px solid var(--pas-line); background: #fff; border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.pas-code code { font-size: 13px; color: var(--pas-primary); font-weight: 900; }
.pas-create-pages { margin-top: 14px; }

.pas-summary-list { display: grid; gap: 10px; margin: 16px 0; }
.pas-summary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--pas-line); border-radius: 16px; background: rgba(246,247,251,.78); }
.pas-summary-list span { color: var(--pas-muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.pas-summary-list strong { color: var(--pas-text); font-weight: 950; text-align: right; }
.pas-settings-helper .pas-btn { margin-top: 2px; }

.pas-login-card { max-width: 520px; margin: 34px auto; }
.pas-login-card h3 { margin: 0 0 8px; font-size: 24px; }
.pas-login-card input[type="text"], .pas-login-card input[type="password"] { width: 100%; min-height: 44px; border: 1px solid var(--pas-line); border-radius: 14px; padding: 10px 12px; }
.pas-login-card input[type="submit"] { min-height: 42px; border: 0; border-radius: 999px; padding: 10px 16px; background: var(--pas-primary); color: #fff; font-weight: 900; }

@media (max-width: 1180px) {
  .pas-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pas-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pas-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
  .pas-app { padding: 0 10px 88px; margin-top: 8px; }
  .pas-context-admin { margin-right: 10px; }
  .pas-hero { padding: 22px; border-radius: 24px; align-items: flex-start; flex-direction: column; }
  .pas-hero-actions { width: 100%; }
  .pas-hero-actions .pas-btn { flex: 1; }
  .pas-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 8px;
    border-radius: 24px;
    max-height: 152px;
    overflow-y: auto;
  }
  .pas-nav a { min-height: 54px; flex-direction: column; gap: 3px; padding: 8px 4px; }
  .pas-nav strong { font-size: 11px; }
  .pas-grid, .pas-grid-2, .pas-grid-3, .pas-grid-4, .pas-grid-5 { grid-template-columns: 1fr; }
  .pas-card { padding: 16px; border-radius: 20px; }
  .pas-card-head { align-items: flex-start; flex-direction: column; }
  .pas-form-grid { grid-template-columns: 1fr; }
  .pas-filters { grid-template-columns: 1fr; }
  .pas-patient-head { align-items: flex-start; flex-direction: column; }
  .pas-patient-head > div:first-child { grid-template-columns: 58px 1fr; }
  .pas-avatar { width: 58px; height: 58px; border-radius: 20px; }
  .pas-patient-head h2 { font-size: 23px; }
  .pas-patient-actions { justify-content: flex-start; width: 100%; }
  .pas-patient-actions .pas-btn { flex: 1 1 auto; }
  .pas-chart { height: 190px; gap: 8px; }
  .pas-table { min-width: 680px; }
  .pas-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .pas-nav { grid-template-columns: repeat(4, 1fr); }
  .pas-btn { width: 100%; }
  .pas-actions .pas-btn, .pas-inline-form .pas-btn { width: auto; }
  .pas-metric { min-height: 92px; }
}

/* === PsicoGestión Pro 1.0.1: estabilidad visual, selects buscables y mobile UX === */
.pas-app {
  width: min(100%, 1380px);
  max-width: 1380px;
  min-width: 0;
}
.pas-context-admin {
  max-width: 1380px;
  width: calc(100% - 20px);
  margin-left: 0;
  margin-right: 20px;
}
.pas-content,
.pas-grid,
.pas-grid > *,
.pas-card,
.pas-table-wrap {
  min-width: 0;
  max-width: 100%;
}
.pas-module-dashboard .pas-grid,
.pas-module-dashboard .pas-card,
.pas-module-dashboard .pas-table-wrap {
  width: 100%;
}

.pas-app .pas-btn-primary,
.pas-app button.pas-btn-primary,
.pas-app input[type="submit"].pas-btn-primary,
.pas-hero .pas-btn-primary {
  border-color: transparent !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--pas-primary), #8a5cf6) !important;
}
.pas-app .pas-btn-danger,
.pas-app button.pas-btn-danger,
.pas-app input[type="submit"].pas-btn-danger {
  border-color: transparent !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--pas-danger), #f97373) !important;
}
.pas-app .pas-btn-light,
.pas-app button.pas-btn-light {
  border-color: rgba(255,255,255,.40) !important;
  color: #fff !important;
  background: rgba(255,255,255,.18) !important;
  box-shadow: none !important;
}
.pas-app .pas-btn-ghost,
.pas-app button.pas-btn-ghost {
  background: rgba(109,93,252,.08) !important;
  color: var(--pas-primary) !important;
  border-color: rgba(109,93,252,.12) !important;
  box-shadow: none !important;
}

.pas-field-searchable {
  position: relative;
}
.pas-searchable-select.pas-native-enhanced {
  position: absolute !important;
  left: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}
.pas-combobox {
  position: relative;
  width: 100%;
}
.pas-combobox-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(22,32,50,.13);
  border-radius: 14px;
  background: #fff;
  color: var(--pas-text);
  padding: 10px 44px 10px 12px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.pas-combobox-input:focus {
  border-color: rgba(109,93,252,.55);
  box-shadow: 0 0 0 4px rgba(109,93,252,.10);
}
.pas-combobox-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(109,93,252,.08);
  color: var(--pas-primary);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.pas-combobox.is-invalid .pas-combobox-input {
  border-color: rgba(229,72,77,.65);
  box-shadow: 0 0 0 4px rgba(229,72,77,.10);
}
.pas-combobox-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 100000;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid rgba(20,31,52,.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(30,41,59,.16);
}
.pas-combobox.is-open .pas-combobox-list {
  display: grid;
  gap: 4px;
}
.pas-combobox-option {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--pas-text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}
.pas-combobox-option:hover,
.pas-combobox-option.is-active {
  background: linear-gradient(135deg, rgba(109,93,252,.12), rgba(0,184,169,.10));
  color: var(--pas-primary);
}
.pas-combobox-empty {
  padding: 12px;
  color: var(--pas-muted);
  font-weight: 750;
  text-align: center;
}

.pas-table-wrap {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.pas-table-wrap:focus {
  outline: 3px solid rgba(109,93,252,.14);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .pas-app { width: calc(100% - 20px); }
  .pas-context-admin { width: calc(100% - 10px); margin-right: 10px; }
}

@media (max-width: 782px) {
  .pas-app,
  .pas-context-admin {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0;
    padding: 0 10px 94px;
    overflow-x: hidden;
  }
  .pas-hero {
    padding: 20px;
    border-radius: 24px;
  }
  .pas-hero:after {
    width: 180px;
    height: 180px;
    opacity: .75;
  }
  .pas-hero h1 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.04;
  }
  .pas-hero p { font-size: 14px; }
  .pas-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .pas-hero-actions .pas-btn {
    width: 100%;
    min-width: 0;
  }
  .pas-nav {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    top: auto;
    z-index: 99999;
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    max-height: none;
    margin: 0;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    border-radius: 24px;
  }
  .pas-nav a {
    flex: 0 0 76px;
    min-height: 56px;
    flex-direction: column;
    gap: 4px;
    padding: 8px 5px;
    scroll-snap-align: start;
  }
  .pas-nav span { font-size: 18px; }
  .pas-nav strong { font-size: 10.5px; line-height: 1.1; }
  .pas-card-head,
  .pas-card-head-stack {
    gap: 12px;
  }
  .pas-card-head .pas-btn,
  .pas-card-head a.pas-btn {
    width: 100%;
  }
  .pas-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .pas-form-actions .pas-btn,
  .pas-upload > .pas-btn {
    width: 100%;
  }
  .pas-field input,
  .pas-field select,
  .pas-field textarea,
  .pas-filters input,
  .pas-filters select,
  .pas-combobox-input {
    font-size: 16px;
    min-height: 48px;
  }
  .pas-combobox-list {
    max-height: min(300px, 52vh);
  }
  .pas-table {
    min-width: 620px;
  }
  .pas-table th,
  .pas-table td {
    padding: 12px 10px;
  }
  .pas-chart {
    height: 170px;
    padding-left: 0;
    padding-right: 0;
  }
  .pas-timeline-item {
    grid-template-columns: 58px 1fr;
  }
}

@media (max-width: 480px) {
  .pas-app,
  .pas-context-admin {
    padding-left: 8px;
    padding-right: 8px;
  }
  .pas-hero-actions {
    grid-template-columns: 1fr;
  }
  .pas-card {
    padding: 14px;
  }
  .pas-btn,
  .pas-app button.pas-btn,
  .pas-app input[type="submit"].pas-btn {
    min-height: 46px;
    white-space: normal;
    line-height: 1.15;
  }
  .pas-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
  }
  .pas-actions .pas-btn,
  .pas-inline-form .pas-btn {
    width: auto;
  }
  .pas-metric {
    min-height: 88px;
    padding: 14px;
  }
  .pas-metric-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
}


/* === PsicoGestión Pro 1.0.2: shell estable, UX unificada y mobile full-width === */
:root {
  --pas-shell-max: 1380px;
  --pas-shell-half: 690px;
  --pas-mobile-gutter: 10px;
}

@supports selector(:has(*)) {
  body:has(.pas-app.pas-context-front) {
    overflow-x: hidden;
  }

  :where(.entry-content, .wp-block-post-content, .page-content, .post-content, .site-content, .content-area, .wp-site-blocks, .wp-block-group, .is-layout-constrained, .is-layout-flow):has(.pas-app.pas-context-front) {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.pas-page-active {
  overflow-x: hidden;
}
.pas-host-fullbleed {
  max-width: none !important;
  width: 100% !important;
}

.pas-app {
  display: block;
  inline-size: min(100%, var(--pas-shell-max));
  width: min(100%, var(--pas-shell-max));
  max-inline-size: var(--pas-shell-max);
  max-width: var(--pas-shell-max);
  min-inline-size: 0;
  margin-block-start: 16px;
  margin-block-end: 48px;
  box-sizing: border-box;
}

.pas-context-front {
  inline-size: min(100vw, var(--pas-shell-max)) !important;
  width: min(100vw, var(--pas-shell-max)) !important;
  max-inline-size: none !important;
  max-width: none !important;
  margin-inline-start: calc(50% - min(50vw, var(--pas-shell-half))) !important;
  margin-inline-end: 0 !important;
}

@supports (width: 100dvw) {
  .pas-context-front {
    inline-size: min(100dvw, var(--pas-shell-max)) !important;
    width: min(100dvw, var(--pas-shell-max)) !important;
    margin-inline-start: calc(50% - min(50dvw, var(--pas-shell-half))) !important;
  }
}

.pas-context-admin {
  inline-size: min(var(--pas-shell-max), calc(100% - 20px)) !important;
  width: min(var(--pas-shell-max), calc(100% - 20px)) !important;
  max-inline-size: var(--pas-shell-max) !important;
  max-width: var(--pas-shell-max) !important;
  margin: 16px 20px 48px 0 !important;
}

.pas-content,
.pas-content > *,
.pas-grid,
.pas-grid > *,
.pas-card,
.pas-table-wrap,
.pas-module-dashboard .pas-grid,
.pas-module-dashboard .pas-card,
.pas-module-dashboard .pas-table-wrap {
  inline-size: 100%;
  width: 100%;
  max-inline-size: 100%;
  max-width: 100%;
  min-inline-size: 0;
}

.pas-app a,
.pas-app button,
.pas-app input,
.pas-app select,
.pas-app textarea {
  -webkit-tap-highlight-color: transparent;
}

.pas-app .pas-btn,
.pas-app button.pas-btn,
.pas-app input[type="submit"].pas-btn {
  min-height: 44px;
  border-radius: 999px !important;
  border: 1px solid rgba(22,32,50,.11) !important;
  background: #fff !important;
  color: var(--pas-text) !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(30,41,59,.07) !important;
}

.pas-app .pas-btn:hover,
.pas-app button.pas-btn:hover,
.pas-app input[type="submit"].pas-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(30,41,59,.11) !important;
}

.pas-app .pas-btn-primary,
.pas-app a.pas-btn-primary,
.pas-app button.pas-btn-primary,
.pas-app input[type="submit"].pas-btn-primary,
.pas-app button[type="submit"].pas-btn:not(.pas-btn-danger):not(.pas-btn-ghost):not(.pas-code),
.pas-app input[type="submit"].pas-btn:not(.pas-btn-danger):not(.pas-btn-ghost),
.pas-app .pas-filters button[type="submit"].pas-btn,
.pas-app .pas-create-pages button[type="submit"].pas-btn {
  border-color: transparent !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--pas-primary), #8a5cf6) !important;
  box-shadow: 0 12px 26px rgba(109,93,252,.20) !important;
}

.pas-app .pas-btn-light,
.pas-app a.pas-btn-light,
.pas-app button.pas-btn-light {
  border-color: rgba(255,255,255,.42) !important;
  color: #fff !important;
  background: rgba(255,255,255,.18) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10) !important;
}

.pas-app .pas-btn-ghost,
.pas-app a.pas-btn-ghost,
.pas-app button.pas-btn-ghost {
  color: var(--pas-primary) !important;
  border-color: rgba(109,93,252,.14) !important;
  background: rgba(109,93,252,.08) !important;
  box-shadow: none !important;
}

.pas-app .pas-btn-danger,
.pas-app a.pas-btn-danger,
.pas-app button.pas-btn-danger,
.pas-app input[type="submit"].pas-btn-danger {
  border-color: transparent !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--pas-danger), #f97373) !important;
  box-shadow: 0 12px 26px rgba(229,72,77,.18) !important;
}

.pas-app .pas-btn-small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}

.pas-field input,
.pas-field select,
.pas-field textarea,
.pas-filters input,
.pas-filters select,
.pas-combobox-input {
  min-height: 46px;
  border: 1px solid rgba(22,32,50,.13) !important;
  border-radius: 16px !important;
  background-color: #fff !important;
  color: var(--pas-text) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.65), inset 0 1px 0 rgba(255,255,255,.50) !important;
}

.pas-field input::placeholder,
.pas-field textarea::placeholder,
.pas-filters input::placeholder,
.pas-combobox-input::placeholder {
  color: #98a2b3;
}

.pas-field select:not([multiple]),
.pas-filters select:not([multiple]) {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 46px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--pas-primary) 50%),
    linear-gradient(135deg, var(--pas-primary) 50%, transparent 50%),
    linear-gradient(135deg, rgba(109,93,252,.10), rgba(0,184,169,.08)) !important;
  background-position:
    calc(100% - 21px) 50%,
    calc(100% - 15px) 50%,
    calc(100% - 42px) 50% !important;
  background-size: 6px 6px, 6px 6px, 1px 24px !important;
  background-repeat: no-repeat !important;
}

.pas-field input:focus,
.pas-field select:focus,
.pas-field textarea:focus,
.pas-filters input:focus,
.pas-filters select:focus,
.pas-combobox-input:focus {
  border-color: rgba(109,93,252,.58) !important;
  box-shadow: 0 0 0 4px rgba(109,93,252,.11) !important;
}

.pas-combobox-toggle {
  border: 1px solid rgba(109,93,252,.12) !important;
  background: linear-gradient(135deg, rgba(109,93,252,.10), rgba(0,184,169,.08)) !important;
  color: var(--pas-primary) !important;
}
.pas-combobox-option {
  border-radius: 13px;
}

.pas-filters {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) auto;
  align-items: end;
  gap: 12px;
  border-radius: 20px;
}
.pas-filters .pas-btn {
  min-height: 46px;
  padding-inline: 22px;
}

@media (max-width: 1180px) {
  .pas-context-admin {
    width: calc(100% - 10px) !important;
    inline-size: calc(100% - 10px) !important;
    margin-right: 10px !important;
  }
}

@media (max-width: 782px) {
  .pas-app,
  .pas-context-front {
    inline-size: 100vw !important;
    width: 100vw !important;
    max-inline-size: none !important;
    max-width: none !important;
    margin-inline-start: calc(50% - 50vw) !important;
    margin-inline-end: 0 !important;
    margin-block-start: 8px !important;
    padding: 0 var(--pas-mobile-gutter) max(96px, calc(96px + env(safe-area-inset-bottom))) !important;
    overflow-x: hidden;
  }

  @supports (width: 100dvw) {
    .pas-context-front {
      inline-size: 100dvw !important;
      width: 100dvw !important;
      margin-inline-start: calc(50% - 50dvw) !important;
    }
  }

  .pas-context-admin {
    inline-size: calc(100% - 10px) !important;
    width: calc(100% - 10px) !important;
    margin: 8px 10px 0 0 !important;
    padding: 0 0 max(96px, calc(96px + env(safe-area-inset-bottom))) !important;
  }

  .pas-hero {
    margin: 0;
    padding: 20px;
    border-radius: 24px;
  }
  .pas-hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
  .pas-hero-actions .pas-btn {
    width: 100% !important;
    min-width: 0;
  }

  .pas-content,
  .pas-grid {
    gap: 14px;
  }
  .pas-grid,
  .pas-grid-2,
  .pas-grid-3,
  .pas-grid-4,
  .pas-grid-5,
  .pas-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pas-card {
    padding: 16px;
    border-radius: 22px;
  }
  .pas-metric {
    min-height: 104px;
    padding: 16px;
  }
  .pas-card-head,
  .pas-card-head-stack {
    gap: 12px;
    margin-bottom: 14px;
  }
  .pas-card-head > .pas-btn,
  .pas-card-head > a.pas-btn,
  .pas-form-actions .pas-btn,
  .pas-upload > .pas-btn,
  .pas-create-pages .pas-btn,
  .pas-filters .pas-btn {
    width: 100% !important;
  }

  .pas-filters {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 12px;
    gap: 10px;
  }
  .pas-field input,
  .pas-field select,
  .pas-field textarea,
  .pas-filters input,
  .pas-filters select,
  .pas-combobox-input {
    min-height: 50px;
    font-size: 16px;
  }

  .pas-nav {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(30,41,59,.18);
  }
}

@media (max-width: 480px) {
  .pas-app .pas-btn,
  .pas-app button.pas-btn,
  .pas-app input[type="submit"].pas-btn {
    width: auto;
    min-height: 46px;
    line-height: 1.15;
    white-space: normal;
  }
  .pas-hero-actions .pas-btn,
  .pas-form-actions .pas-btn,
  .pas-filters .pas-btn,
  .pas-card-head > .pas-btn,
  .pas-card-head > a.pas-btn,
  .pas-upload > .pas-btn,
  .pas-create-pages .pas-btn {
    width: 100% !important;
  }
  .pas-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
  .pas-actions .pas-btn,
  .pas-inline-form .pas-btn {
    width: 100% !important;
  }
  .pas-table {
    min-width: 600px;
  }
}

@media (max-width: 360px) {
  .pas-hero-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .pas-nav a {
    flex-basis: 70px;
  }
}

/* Protección de renderizado */
.pas-app.pas-app-duplicate,
.pas-app .pas-app {
  display: none !important;
  visibility: hidden !important;
}
.pas-shortcode-token {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.pas-shortcode-token::before { content: "\005B"; }
.pas-shortcode-token::after { content: "\005D"; }
.pas-shortcode-name { display: inline; }
.pas-code code,
.pas-card code .pas-shortcode-token,
.pas-card code.pas-shortcode-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pas-settings-single {
  grid-template-columns: minmax(0, 1fr) !important;
}
.pas-module-settings .pas-settings-single > .pas-card,
.pas-module-settings .pas-settings-single > .pas-form {
  width: 100%;
}

/* === PsicoGestión Pro 1.1.0: ficha clínica ampliada, agenda visual e hitos === */
.pas-clinical-builder {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.pas-clinical-section {
  border: 1px solid var(--pas-line);
  border-radius: 20px;
  background: rgba(255,255,255,.74);
  overflow: hidden;
}
.pas-clinical-section > summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 16px;
  font-weight: 950;
  color: var(--pas-text);
  background: linear-gradient(135deg, rgba(109,93,252,.08), rgba(0,184,169,.06));
}
.pas-clinical-section > summary::-webkit-details-marker { display: none; }
.pas-clinical-section > summary::after {
  content: "⌄";
  float: right;
  color: var(--pas-primary);
  transition: transform .18s ease;
}
.pas-clinical-section[open] > summary::after { transform: rotate(180deg); }
.pas-clinical-grid,
.pas-legacy-clinical .pas-form-grid {
  padding: 14px;
}
.pas-check-card {
  align-items: flex-start;
  min-height: 56px;
  line-height: 1.35;
}
.pas-check-card input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--pas-primary);
}
.pas-clinical-view {
  display: grid;
  gap: 14px;
}
.pas-clinical-view-section {
  padding: 14px;
  border: 1px solid var(--pas-line);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
}
.pas-clinical-view-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -.02em;
}
.pas-tick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 6px 4px 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22,163,74,.10);
  color: #15803d;
  font-weight: 850;
  font-size: 12px;
}
.pas-subhead {
  margin-top: 18px;
  margin-bottom: 10px;
}
.pas-agenda-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 16px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(246,247,251,.82);
  border: 1px solid var(--pas-line);
  color: var(--pas-muted);
  font-weight: 850;
  font-size: 12px;
}
.pas-agenda-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.pas-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(255,255,255,.8);
}
.pas-dot-presencial { background: #22c55e; }
.pas-dot-virtual { background: #0ea5e9; }
.pas-dot-inicial { background: #f97316; }
.pas-dot-cancelado { background: #ef4444; }
.pas-agenda-board {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}
.pas-agenda-board-day { grid-template-columns: minmax(0, 1fr); }
.pas-agenda-board-week { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
.pas-agenda-board-month { grid-template-columns: repeat(7, minmax(132px, 1fr)); }
.pas-agenda-day {
  min-height: 180px;
  border: 1px solid var(--pas-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,247,251,.80));
  overflow: hidden;
}
.pas-agenda-day.is-drop-target {
  border-color: rgba(109,93,252,.55);
  box-shadow: 0 0 0 4px rgba(109,93,252,.10);
}
.pas-agenda-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--pas-line);
}
.pas-agenda-day-head strong { font-size: 13px; }
.pas-agenda-day-head small { color: var(--pas-muted); font-weight: 800; }
.pas-agenda-dropzone {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 10px;
}
.pas-agenda-empty-day {
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(102,112,133,.24);
  border-radius: 14px;
  color: var(--pas-muted);
  font-weight: 750;
  font-size: 12px;
}
.pas-appointment-card {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 16px;
  color: var(--pas-text);
  text-decoration: none;
  background: #fff;
  border-left: 5px solid #22c55e;
  box-shadow: 0 8px 20px rgba(30,41,59,.08);
  cursor: grab;
}
.pas-appointment-card:active { cursor: grabbing; }
.pas-appointment-card:hover { transform: translateY(-1px); }
.pas-appointment-card strong { font-size: 13px; line-height: 1.2; }
.pas-appointment-card small,
.pas-appointment-status,
.pas-appointment-time {
  color: var(--pas-muted);
  font-size: 11px;
  font-weight: 800;
}
.pas-appointment-time { color: var(--pas-primary); }
.pas-appointment-virtual { border-left-color: #0ea5e9; }
.pas-appointment-inicial { border-left-color: #f97316; }
.pas-appointment-cancelado { border-left-color: #ef4444; opacity: .72; }
.pas-filters-agenda {
  grid-template-columns: minmax(150px, .7fr) minmax(150px, .7fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
}
.pas-milestone-timeline,
.pas-message-list {
  display: grid;
  gap: 10px;
}
.pas-milestone-item,
.pas-message-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--pas-line);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
}
.pas-message-item { grid-template-columns: 36px minmax(0, 1fr); }
.pas-message-item > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(109,93,252,.10);
}
.pas-milestone-item time {
  color: var(--pas-primary);
  font-weight: 950;
  font-size: 12px;
}
.pas-milestone-item p,
.pas-message-item p {
  margin: 3px 0 0;
  color: var(--pas-muted);
}
.pas-milestone-item small,
.pas-message-item small {
  display: block;
  color: var(--pas-muted);
  margin-top: 2px;
}
.pas-sensitive-card .pas-empty { padding: 22px 12px; }
@media (max-width: 1180px) {
  .pas-agenda-board-week,
  .pas-agenda-board-month {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}
@media (max-width: 782px) {
  .pas-agenda-board {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .pas-agenda-day {
    flex: 0 0 min(84vw, 330px);
    scroll-snap-align: start;
  }
  .pas-filters-agenda {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .pas-milestone-item {
    grid-template-columns: 1fr;
  }
  .pas-clinical-section > summary {
    padding: 14px;
  }
  .pas-clinical-grid,
  .pas-legacy-clinical .pas-form-grid {
    padding: 12px;
  }
}

/* === PsicoGestión Pro 1.1.1: tipografía compacta y consistente === */
.pas-app,
.pas-login-card {
  font-size: 14px !important;
  line-height: 1.42;
}

/* Mantener tamaño del menú superior / navegación principal */
.pas-nav span { font-size: 18px !important; }
.pas-nav strong { font-size: 13px !important; font-weight: 800 !important; line-height: 1.1; }

.pas-hero h1 {
  font-size: clamp(25px, 3.2vw, 36px) !important;
  line-height: 1.04 !important;
}
.pas-hero p {
  font-size: 13px !important;
  line-height: 1.35 !important;
}
.pas-kicker {
  font-size: 10.5px !important;
  padding: 6px 11px !important;
}

.pas-card h2,
.pas-card-head h2 {
  font-size: 18px !important;
  line-height: 1.18 !important;
  letter-spacing: -.025em !important;
}
.pas-card h3,
.pas-card-head h3,
.pas-empty h3,
.pas-section-title {
  font-size: 15px !important;
  line-height: 1.22 !important;
  letter-spacing: -.02em !important;
}
.pas-card h4,
.pas-clinical-view-section h4 {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
}
.pas-card p,
.pas-card-head p,
.pas-empty p,
.pas-info-item p,
.pas-message-item p,
.pas-milestone-item p,
.pas-timeline-item p,
.pas-sensitive-banner,
.pas-summary-list,
.pas-clinical-view-section,
.pas-check,
.pas-check-card {
  font-size: 13px !important;
  line-height: 1.38 !important;
}
.pas-card-head a:not(.pas-btn),
.pas-patient-head p,
.pas-info-item span,
.pas-summary-list span,
.pas-summary-list strong,
.pas-message-item small,
.pas-milestone-item small,
.pas-timeline-item span,
.pas-agenda-legend,
.pas-agenda-empty-day,
.pas-field,
.pas-lock {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.pas-metric {
  min-height: 98px !important;
  padding: 16px !important;
  gap: 12px !important;
}
.pas-metric-icon {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-radius: 16px !important;
  font-size: 19px !important;
}
.pas-metric span {
  font-size: 10.5px !important;
  line-height: 1.16 !important;
  letter-spacing: .075em !important;
}
.pas-metric strong {
  margin-top: 3px !important;
  font-size: clamp(18px, 1.55vw, 24px) !important;
  line-height: 1.08 !important;
}
.pas-metric small {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
}

.pas-patient-head h2 {
  font-size: 23px !important;
  line-height: 1.1 !important;
}
.pas-avatar {
  width: 60px !important;
  height: 60px !important;
  font-size: 19px !important;
  border-radius: 22px !important;
}

.pas-field input,
.pas-field select,
.pas-field textarea,
.pas-filters input,
.pas-filters select,
.pas-combobox-input,
.pas-combobox-option,
.pas-code code,
.pas-login-card input[type="text"],
.pas-login-card input[type="password"] {
  font-size: 13px !important;
  line-height: 1.35 !important;
}
.pas-field input,
.pas-field select,
.pas-filters input,
.pas-filters select,
.pas-combobox-input {
  min-height: 42px !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}
.pas-field textarea {
  min-height: 98px !important;
}
.pas-filters .pas-btn {
  min-height: 42px !important;
}

.pas-table th {
  font-size: 10px !important;
  line-height: 1.2 !important;
  padding: 11px 12px !important;
}
.pas-table td {
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  padding: 12px !important;
}
.pas-table td strong {
  font-size: 13px !important;
  line-height: 1.25 !important;
}
.pas-table td small {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
}
.pas-chip,
.pas-tick {
  font-size: 10.5px !important;
  line-height: 1 !important;
}

.pas-timeline-item time,
.pas-milestone-item time,
.pas-bar-wrap small,
.pas-bar span,
.pas-appointment-card small,
.pas-appointment-status,
.pas-appointment-time,
.pas-agenda-day-head small {
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}
.pas-message-item strong,
.pas-milestone-item strong,
.pas-timeline-item strong,
.pas-appointment-card strong,
.pas-agenda-day-head strong {
  font-size: 13px !important;
  line-height: 1.22 !important;
}
.pas-appointment-card {
  padding: 9px 10px !important;
}

@media (max-width: 782px) {
  .pas-app,
  .pas-login-card {
    font-size: 13.5px !important;
  }
  .pas-nav span { font-size: 18px !important; }
  .pas-nav strong { font-size: 10.5px !important; }
  .pas-hero h1 {
    font-size: clamp(23px, 6.5vw, 30px) !important;
  }
  .pas-hero p {
    font-size: 12.5px !important;
  }
  .pas-kicker {
    font-size: 10px !important;
  }
  .pas-card {
    padding: 14px !important;
  }
  .pas-card h2,
  .pas-card-head h2 {
    font-size: 17px !important;
  }
  .pas-card h3,
  .pas-card-head h3,
  .pas-empty h3,
  .pas-section-title {
    font-size: 14px !important;
  }
  .pas-card p,
  .pas-card-head p,
  .pas-empty p,
  .pas-info-item p,
  .pas-message-item p,
  .pas-milestone-item p,
  .pas-timeline-item p,
  .pas-sensitive-banner,
  .pas-summary-list,
  .pas-clinical-view-section,
  .pas-check,
  .pas-check-card {
    font-size: 12.5px !important;
  }
  .pas-card-head a:not(.pas-btn),
  .pas-info-item span,
  .pas-summary-list span,
  .pas-summary-list strong,
  .pas-message-item small,
  .pas-milestone-item small,
  .pas-agenda-legend,
  .pas-agenda-empty-day,
  .pas-field,
  .pas-lock {
    font-size: 11.5px !important;
  }
  .pas-metric {
    min-height: 88px !important;
    padding: 13px !important;
  }
  .pas-metric-icon {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    font-size: 17px !important;
  }
  .pas-metric span {
    font-size: 10px !important;
  }
  .pas-metric strong {
    font-size: 20px !important;
  }
  .pas-metric small {
    font-size: 12px !important;
  }
  .pas-field input,
  .pas-field select,
  .pas-field textarea,
  .pas-filters input,
  .pas-filters select,
  .pas-combobox-input,
  .pas-combobox-option {
    font-size: 14px !important;
    min-height: 44px !important;
  }
  .pas-table td {
    font-size: 12px !important;
  }
  .pas-table td strong,
  .pas-message-item strong,
  .pas-milestone-item strong,
  .pas-timeline-item strong,
  .pas-appointment-card strong {
    font-size: 12.5px !important;
  }
}

/* === PsicoGestión Pro 1.1.2: actualización automática y navegación sin recargar === */
.pas-app.is-loading .pas-content {
  opacity: .62;
  filter: saturate(.96);
  transition: opacity .16s ease, filter .16s ease;
  pointer-events: none;
}
.pas-app.is-loading .pas-content::before {
  content: "Actualizando...";
  position: sticky;
  top: 86px;
  z-index: 30;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 -2px;
  padding: 8px 12px;
  border: 1px solid rgba(109,93,252,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--pas-primary);
  box-shadow: 0 12px 30px rgba(30,41,59,.10);
  font-size: 12px;
  font-weight: 850;
}
.pas-app .pas-btn.is-saving,
.pas-app button.is-saving,
.pas-app input[type="submit"].is-saving {
  cursor: wait !important;
  opacity: .78;
  transform: none !important;
}
.pas-app .pas-notice-success,
.pas-app .pas-notice-success:empty {
  background: rgba(22,163,74,.10);
  color: #166534;
}
.pas-app .pas-notice-error {
  background: rgba(229,72,77,.11);
  color: #991b1b;
}
@media (max-width: 782px) {
  .pas-app.is-loading .pas-content::before {
    top: 10px;
    font-size: 11.5px;
    padding: 7px 11px;
  }
}

/* 1.1.3 Email notification UX */
.pas-switch-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 2px;
}
.pas-switch {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--pas-line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  color: var(--pas-text);
  cursor: pointer;
  transition: .18s ease;
}
.pas-switch:hover {
  border-color: rgba(109,93,252,.26);
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(30,41,59,.07);
}
.pas-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pas-switch-control {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  margin-top: 1px;
  border-radius: 999px;
  background: #d9deea;
  box-shadow: inset 0 1px 3px rgba(30,41,59,.16);
  transition: .2s ease;
}
.pas-switch-control:after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(30,41,59,.20);
  transition: .2s ease;
}
.pas-switch input:checked + .pas-switch-control {
  background: linear-gradient(135deg, var(--pas-primary), var(--pas-primary-2));
}
.pas-switch input:checked + .pas-switch-control:after {
  transform: translateX(18px);
}
.pas-switch input:focus-visible + .pas-switch-control {
  box-shadow: 0 0 0 4px rgba(109,93,252,.16), inset 0 1px 3px rgba(30,41,59,.16);
}
.pas-switch-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--pas-text);
  font-size: 13px;
  line-height: 1.35;
}
.pas-switch-copy strong {
  color: var(--pas-text);
  font-size: 13px;
  font-weight: 900;
}
.pas-switch-copy small {
  color: var(--pas-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.38;
}
.pas-notification-switch {
  background: linear-gradient(135deg, rgba(109,93,252,.055), rgba(0,184,169,.05));
}
.pas-email-option {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(109,93,252,.075), rgba(0,184,169,.065));
}
.pas-email-banner {
  margin: 0 0 14px;
  line-height: 1.5;
}
.pas-email-banner code {
  display: inline-flex;
  padding: 2px 6px;
  margin: 1px 2px;
  border-radius: 8px;
  background: rgba(109,93,252,.09);
  color: #5b21b6;
  font-weight: 850;
  font-size: .92em;
}
.pas-create-pages + .pas-create-pages {
  margin-top: 10px;
}
@media (max-width: 782px) {
  .pas-switch-list { gap: 8px; }
  .pas-switch { padding: 12px; border-radius: 16px; gap: 10px; }
  .pas-switch-control { width: 42px; height: 24px; flex-basis: 42px; }
  .pas-switch-control:after { width: 16px; height: 16px; }
  .pas-switch input:checked + .pas-switch-control:after { transform: translateX(18px); }
  .pas-switch-copy strong { font-size: 12.5px; }
  .pas-switch-copy small { font-size: 11.5px; }
}

/* Login interno */
.pas-auth-card {
  overflow: hidden;
  padding: 0 !important;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(30,41,59,.14);
}
.pas-auth-brand {
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.35), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(0,184,169,.30), transparent 25%),
    linear-gradient(135deg, #665df3 0%, #7e5bef 45%, #12b8ad 100%);
  color: #fff;
}
.pas-auth-brand h2 {
  margin: 13px 0 6px;
  color: #fff;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.pas-auth-brand p {
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: 14px;
  line-height: 1.45;
}
.pas-auth-form {
  display: grid;
  gap: 13px;
  padding: 22px 22px 8px;
}
.pas-auth-card .pas-field {
  font-size: 13px;
}
.pas-auth-card .pas-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(22,32,50,.13);
  border-radius: 15px;
  background: #fff;
  color: var(--pas-text);
  padding: 10px 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.pas-auth-card .pas-field input:focus {
  border-color: rgba(109,93,252,.55);
  box-shadow: 0 0 0 4px rgba(109,93,252,.10);
}
.pas-auth-form .pas-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
}
.pas-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pas-muted);
  font-size: 13px;
  font-weight: 750;
}
.pas-auth-remember input {
  accent-color: var(--pas-primary);
}
.pas-auth-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 22px 22px;
  color: var(--pas-muted);
  font-size: 13px;
  font-weight: 850;
}
.pas-auth-links a {
  color: var(--pas-primary);
  text-decoration: none;
}
.pas-auth-links a:hover {
  text-decoration: underline;
}
.pas-auth-notice {
  margin: 16px 22px 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(22,163,74,.16);
  background: rgba(22,163,74,.10);
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}
.pas-auth-notice-error {
  border-color: rgba(229,72,77,.18);
  background: rgba(229,72,77,.10);
  color: #991b1b;
}
@media (max-width: 782px) {
  .pas-auth-card {
    width: calc(100vw - 24px);
    margin: 14px auto;
    border-radius: 26px;
  }
  .pas-auth-brand {
    padding: 23px;
  }
  .pas-auth-brand h2 {
    font-size: 24px;
  }
  .pas-auth-form {
    padding: 18px 18px 6px;
  }
  .pas-auth-links {
    padding: 12px 18px 20px;
  }
  .pas-auth-notice {
    margin: 14px 18px 0;
  }
}
