.aea-content:has([data-aea-patients]) > .aea-module { display: none !important; }

html:has([data-aea-patients]) .aea-nav-sub a[href="/bookings"].is-active,
html:has([data-aea-patients]) .aea-nav-sub a[href="/aesthetic-admin/bookings"].is-active {
  color: inherit;
  font-weight: inherit;
  background: transparent;
}
html:has([data-aea-patients]) .aea-nav-sub a[data-aea-patients-nav] {
  color: #16a34a;
  font-weight: 700;
}

.aea-patients { display: grid; gap: 14px; font-family: "DM Sans", sans-serif; color: #0f172a; padding-bottom: 24px; }
.aea-patients h1, .aea-patients h2, .aea-patients h3, .aea-patients p { margin: 0; }
.aea-pt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.aea-pt-title { display: flex; align-items: center; gap: 12px; }
.aea-pt-title h1 { font-size: 1.45rem; }
.aea-pt-title p { color: #64748b; font-size: .85rem; margin-top: 2px; }
.aea-pt-mark { width: 46px; height: 46px; border-radius: 14px; background: #dcfce7; color: #15803d; display: grid; place-items: center; flex: none; }
.aea-pt-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.aea-pt-btn { height: 38px; border-radius: 10px; padding: 0 14px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; font: 700 13px "DM Sans", sans-serif; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.aea-pt-btn:hover { background: #f8fafc; }
.aea-pt-btn:disabled { opacity: .6; cursor: default; }
.aea-pt-btn.is-green { background: #16a34a; border-color: #16a34a; color: #fff; }
.aea-pt-btn.is-green:hover { background: #15803d; }
.aea-pt-btn.is-ghost { background: transparent; }

.aea-pt-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aea-pt-kpi { background: #fff; border: 1px solid #e7eef2; border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.aea-pt-kpi-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.aea-pt-kpi-icon.is-green { background: #dcfce7; color: #16a34a; }
.aea-pt-kpi-icon.is-amber { background: #fef3c7; color: #d97706; }
.aea-pt-kpi-icon.is-blue { background: #dbeafe; color: #2563eb; }
.aea-pt-kpi strong { display: block; font-size: 1.6rem; line-height: 1.1; }
.aea-pt-kpi span { color: #475569; font-size: .85rem; font-weight: 600; }

.aea-pt-notice { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 650; }
.aea-pt-error { color: #be123c; font-weight: 700; font-size: 13px; }

.aea-pt-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fff; border: 1px solid #e7eef2; border-radius: 14px; padding: 12px; }
.aea-pt-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 40px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 12px; color: #94a3b8; }
.aea-pt-search input { border: 0; outline: 0; flex: 1; min-width: 0; font: 500 13.5px "DM Sans", sans-serif; color: #0f172a; background: transparent; }
.aea-pt-select { display: inline-flex; align-items: center; gap: 6px; height: 40px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 8px 0 10px; color: #475569; background: #fff; }
.aea-pt-select select { border: 0; outline: 0; background: transparent; font: 650 13px "DM Sans", sans-serif; color: #0f172a; max-width: 190px; cursor: pointer; }

.aea-pt-card { background: #fff; border: 1px solid #e7eef2; border-radius: 16px; overflow: hidden; }
.aea-pt-table-wrap { overflow-x: auto; }
.aea-pt-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.aea-pt-table th { text-align: left; font-size: 12px; color: #334155; font-weight: 750; padding: 12px 10px; background: #f8fafc; border-bottom: 1px solid #eef2f6; white-space: nowrap; }
.aea-pt-table td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; font-size: 13px; vertical-align: middle; }
.aea-pt-table tr:last-child td { border-bottom: 0; }
.aea-pt-table tbody tr { cursor: pointer; }
.aea-pt-table tbody tr:hover { background: #f8fafc; }
.aea-pt-person { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.aea-pt-avatar { width: 36px; height: 36px; border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.aea-pt-person strong { display: block; white-space: nowrap; }
.aea-pt-code { display: inline-block; margin-top: 2px; background: #dcfce7; color: #15803d; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 750; }
.aea-pt-muted { color: #64748b; }
.aea-pt-wrap { max-width: 220px; }
.aea-pt-num { text-align: right; white-space: nowrap; }
.aea-pt-due { color: #be123c; font-weight: 700; }
.aea-pt-actions { white-space: nowrap; }
.aea-pt-mini { height: 30px; border-radius: 8px; padding: 0 10px; border: 1px solid #e2e8f0; background: #fff; font: 700 12px "DM Sans", sans-serif; color: #0f172a; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; margin-right: 6px; }
.aea-pt-mini.is-green { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.aea-pt-empty { padding: 22px 14px; color: #64748b; text-align: center; }

.aea-pt-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid #eef2f6; }
.aea-pt-showing { color: #334155; font-size: 13px; }
.aea-pt-pages { display: flex; align-items: center; gap: 6px; }
.aea-pt-page { min-width: 32px; height: 32px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff; font: 700 13px "DM Sans", sans-serif; color: #0f172a; display: inline-grid; place-items: center; cursor: pointer; padding: 0 6px; }
.aea-pt-page.is-on { background: #15803d; border-color: #15803d; color: #fff; }
.aea-pt-page:disabled { opacity: .45; cursor: default; }
.aea-pt-gap { color: #64748b; padding: 0 2px; }
.aea-pt-per { font-size: 13px; color: #334155; display: inline-flex; align-items: center; gap: 8px; }
.aea-pt-per select { height: 32px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 0 6px; font: 650 13px "DM Sans", sans-serif; }

.aea-pt-shade { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 16px; }
.aea-pt-modal { width: min(920px, 100%); max-height: min(92vh, 900px); overflow: auto; background: #fff; border-radius: 18px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.aea-pt-modal.is-form { width: min(640px, 100%); }
.aea-pt-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.aea-pt-modal-head h2 { font-size: 1.15rem; }
.aea-pt-modal-head p { color: #64748b; font-size: .85rem; margin-top: 2px; }
.aea-pt-profile { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.aea-pt-avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.aea-pt-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; background: #f8fafc; border-radius: 12px; padding: 12px; flex: 1; min-width: 240px; }
.aea-pt-fact span { display: block; color: #64748b; font-size: 11.5px; font-weight: 650; }
.aea-pt-fact strong { font-size: 13px; }
.aea-pt-fact .aea-pt-due { font-size: 13px; }
.aea-pt-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e8f0; }
.aea-pt-tab { border: 0; background: transparent; padding: 10px 14px; font: 700 13.5px "DM Sans", sans-serif; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.aea-pt-tab.is-on { color: #15803d; border-bottom-color: #16a34a; }
.aea-pt-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aea-pt-field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 750; color: #475569; }
.aea-pt-field.is-wide { grid-column: 1 / -1; }
.aea-pt-field input, .aea-pt-field select, .aea-pt-field textarea { border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 10px; font: 500 14px "DM Sans", sans-serif; color: #0f172a; background: #fff; }
.aea-pt-field input, .aea-pt-field select { height: 40px; }
.aea-pt-field textarea { padding: 8px 10px; min-height: 72px; resize: vertical; }
.aea-pt-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.aea-pt-hist { width: 100%; border-collapse: collapse; }
.aea-pt-hist th { text-align: left; font-size: 12px; color: #475569; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; }
.aea-pt-hist td { padding: 8px 6px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.aea-pt-pill { display: inline-flex; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.aea-pt-pill.is-green { background: #dcfce7; color: #15803d; }
.aea-pt-pill.is-amber { background: #fef3c7; color: #b45309; }
.aea-pt-pill.is-gray { background: #f1f5f9; color: #475569; }
.aea-pt-pill.is-red { background: #ffe4e6; color: #be123c; }
.aea-pt-pill.is-blue { background: #dbeafe; color: #1d4ed8; }

@media (max-width: 900px) {
  .aea-pt-kpis { grid-template-columns: 1fr; }
  .aea-pt-facts, .aea-pt-form { grid-template-columns: 1fr; }
}
