/* Patients workspace — one white theme */
.bn-patients-workspace {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
  box-sizing: border-box;
  overflow-x: clip;
  min-width: 0;
}

.bn-patients-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(23, 56, 47, 0.1);
  box-shadow: 0 10px 28px rgba(16, 37, 29, 0.05);
}

.bn-patients-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(23, 56, 47, 0.06);
  color: #17382F;
  text-decoration: none;
  flex-shrink: 0;
}

.bn-patients-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #c5a46d;
}

.bn-patients-head h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #17382F;
}

.bn-patients-lead {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #5a6b64;
  font-weight: 700;
}

.bn-patients-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(23, 56, 47, 0.1);
}

.bn-patients-tab {
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #5a6b64;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bn-patients-tab.is-active {
  background: #17382F;
  color: #fff;
}

.bn-patients-panel {
  display: grid;
  gap: 14px;
}

.bn-patients-toolbar {
  display: grid;
  gap: 8px;
}

.bn-patients-toolbar--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(23, 56, 47, 0.1);
}

.bn-patients-toolbar h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #17382F;
}

.bn-patients-toolbar p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #5a6b64;
  font-weight: 700;
}

.bn-patients-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(23, 56, 47, 0.12);
}

.bn-patients-search i { color: #5a6b64; }
.bn-patients-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #17382F;
  outline: none;
}

.bn-patients-roster,
.bn-patients-records {
  display: grid;
  gap: 12px;
}

.bn-patients-card,
.bn-patients-record,
.bn-patients-form {
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(23, 56, 47, 0.1);
  box-shadow: 0 10px 28px rgba(16, 37, 29, 0.05);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.bn-patients-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.bn-patients-card__head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bn-patients-card__head img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(23, 56, 47, 0.1);
}

.bn-patients-card__id {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bn-patients-card__id strong {
  color: #17382F;
  font-size: 0.98rem;
}

.bn-patients-card__id small {
  color: #5a6b64;
  font-weight: 700;
}

.bn-patients-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.bn-patients-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.bn-patients-badge--consult {
  background: rgba(23, 56, 47, 0.08);
  color: #17382F;
}

.bn-patients-badge--service {
  background: rgba(197, 164, 109, 0.16);
  color: #7a6230;
}

.bn-patients-health {
  border-radius: 14px;
  border: 1px solid rgba(23, 56, 47, 0.08);
  background: #f7f9f8;
  padding: 8px 12px;
}

.bn-patients-health summary {
  cursor: pointer;
  font-weight: 800;
  color: #17382F;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bn-patients-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.bn-patients-health-chips span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(23, 56, 47, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  color: #17382F;
}

.bn-patients-health-chips em {
  font-style: normal;
  color: #5a6b64;
  margin-inline-end: 4px;
}

.bn-patients-health-block {
  margin-top: 8px;
}

.bn-patients-health-block strong {
  display: block;
  font-size: 0.74rem;
  color: #17382F;
}

.bn-patients-health-block p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #5a6b64;
  font-weight: 700;
}

.bn-patients-note {
  display: grid;
  gap: 6px;
}

.bn-patients-note span {
  font-size: 0.74rem;
  font-weight: 800;
  color: #5a6b64;
}

.bn-patients-note textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 10px;
  font: inherit;
  resize: vertical;
  min-height: 64px;
}

.bn-patients-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-patients-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.bn-patients-btn--ghost {
  background: #fff;
  border-color: rgba(23, 56, 47, 0.14);
  color: #17382F;
}

.bn-patients-btn--danger {
  background: #fff;
  border-color: rgba(180, 35, 24, 0.25);
  color: #b42318;
}

.bn-patients-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.bn-patients-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bn-patients-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bn-patients-field--wide {
  grid-column: 1 / -1;
}

.bn-patients-field span {
  font-size: 0.76rem;
  font-weight: 800;
  color: #5a6b64;
}

.bn-patients-field input,
.bn-patients-field select,
.bn-patients-field textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: #17382F;
}

.bn-patients-field textarea { min-height: 88px; resize: vertical; }

.bn-patients-share {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: #f7f9f8;
  border: 1px solid rgba(23, 56, 47, 0.08);
}

.bn-patients-share strong {
  display: block;
  color: #17382F;
  font-size: 0.86rem;
}

.bn-patients-share small {
  display: block;
  margin-top: 2px;
  color: #5a6b64;
  font-weight: 700;
  font-size: 0.74rem;
}

.bn-patients-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-patients-record {
  overflow: hidden;
  display: grid;
}

.bn-patients-record__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #eef2f0;
  min-height: 140px;
}

.bn-patients-record__media img,
.bn-patients-ph {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.bn-patients-ph {
  display: grid;
  place-items: center;
  color: #5a6b64;
  font-weight: 800;
  background: #f3f6f4;
}

.bn-patients-record__body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.bn-patients-record__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bn-patients-record__top strong {
  display: block;
  color: #17382F;
}

.bn-patients-record__top span,
.bn-patients-record__top em,
.bn-patients-muted,
.bn-patients-private {
  color: #5a6b64;
  font-size: 0.78rem;
  font-weight: 700;
}

.bn-patients-record__body h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #17382F;
}

.bn-patients-record__body p {
  margin: 0;
  font-size: 0.82rem;
  color: #3d5c50;
  font-weight: 700;
  line-height: 1.5;
}

.bn-patients-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px dashed rgba(23, 56, 47, 0.16);
  color: #5a6b64;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 560px) {
  .bn-patients-form__grid {
    grid-template-columns: 1fr;
  }
  .bn-patients-toolbar--split {
    flex-direction: column;
  }
}

.bn-patients-toolbar--stack {
  display: grid;
  gap: 10px;
}

.bn-patients-manual-add {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 8px;
}

.bn-patients-manual-add input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 0 12px;
  background: rgba(255, 252, 247, 0.9);
  color: #122c26;
  font-weight: 700;
}

.bn-patients-filter-chip {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #29483d;
}

.bn-patients-filter-chip button {
  margin-inline-start: 8px;
  border: none;
  background: rgba(23, 56, 47, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
}

.bn-patients-inline-file {
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(197, 164, 109, 0.35);
  background: rgba(255, 252, 247, 0.72);
  padding: 8px 12px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.bn-patients-inline-file summary {
  cursor: pointer;
  font-weight: 800;
  color: #17382f;
  list-style: none;
}

.bn-patients-inline-file__body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bn-patients-inline-file__body input[type='text'],
.bn-patients-inline-file__body textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.bn-patients-inline-file__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.bn-patients-inline-file__media input[type='file'] {
  max-width: 100%;
  min-width: 0;
}

.bn-patients-inline-file__media label {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #5a6b64;
}

.bn-patients-btn--primary {
  background: #17382f !important;
  color: #fbfaf7 !important;
  border: none !important;
  border-radius: 12px;
  min-height: 42px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 640px) {
  .bn-patients-manual-add {
    grid-template-columns: 1fr;
  }
}

/* Patient profile referral rewards */
.bn-patient-referral {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
}
.bn-patient-referral__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #c5a46d;
}
.bn-patient-referral__hero h2 {
  margin: 4px 0 6px;
  color: #17382f;
  font-size: 1.15rem;
}
.bn-patient-referral__hero p {
  margin: 0;
  color: #5a6b64;
  font-weight: 600;
  line-height: 1.55;
  font-size: 0.88rem;
}
.bn-patient-referral__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bn-patient-referral__stats article {
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(23, 56, 47, 0.08);
}
.bn-patient-referral__stats strong {
  display: block;
  font-size: 1.15rem;
  color: #17382f;
}
.bn-patient-referral__stats span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #5a6b64;
}
.bn-patient-referral__redeem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.bn-patient-referral__redeem input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 0 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bn-patient-referral__list {
  display: grid;
  gap: 10px;
}
.bn-patient-referral__list h3 {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #17382f;
}
.bn-patient-referral__card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(23, 56, 47, 0.08);
}
.bn-patient-referral__card strong { color: #17382f; }
.bn-patient-referral__card span,
.bn-patient-referral__card small { color: #5a6b64; font-weight: 700; font-size: 0.82rem; }
.bn-patient-referral__muted { color: #5a6b64; font-weight: 700; text-align: center; padding: 18px 8px; }
.bn-referral-login-banner {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(197, 164, 109, 0.18);
  color: #17382f;
  font-weight: 800;
  font-size: 0.84rem;
}
@media (max-width: 560px) {
  .bn-patient-referral__stats { grid-template-columns: 1fr; }
  .bn-patient-referral__redeem { grid-template-columns: 1fr; }
}

.dp-owner-nav-stack__btn--referral.is-on {
  background: linear-gradient(145deg, #f8e7c0, #c9a45e 55%, #a88845);
  color: #2a2110;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(168, 136, 69, 0.28);
}
.bn-profile-tab.is-on {
  box-shadow: inset 0 -2px 0 #c9a45e;
}

.bn-ref-lux {
  display: grid;
  gap: 16px;
  padding: 18px 16px 22px;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(201, 164, 94, 0.22), transparent 52%),
    linear-gradient(165deg, rgba(255, 252, 247, 0.96), rgba(244, 236, 223, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(23, 56, 47, 0.08);
}
.bn-ref-lux__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.bn-ref-lux__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #b08945;
}
.bn-ref-lux__hero h2 {
  margin: 4px 0 6px;
  color: #17382f;
  font-size: 1.35rem;
}
.bn-ref-lux__hero p {
  margin: 0;
  color: #5a6b64;
  font-weight: 650;
  line-height: 1.6;
  font-size: 0.9rem;
}
.bn-ref-lux__seal {
  flex-shrink: 0;
  min-width: 72px;
  min-height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #2a2110;
  background: linear-gradient(160deg, #f8e7c0, #c9a45e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.bn-ref-lux__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bn-ref-lux__stats article {
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(23, 56, 47, 0.08);
}
.bn-ref-lux__stats strong {
  display: block;
  font-size: 1.12rem;
  color: #17382f;
}
.bn-ref-lux__stats span {
  font-size: 0.7rem;
  font-weight: 800;
  color: #5a6b64;
}
.bn-ref-lux__redeem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.bn-ref-lux__redeem input {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  padding: 0 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.8);
}
.bn-ref-lux__body { display: grid; gap: 10px; }
.bn-ref-lux__body h3 {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: #17382f;
}
.bn-ref-lux__card,
.bn-ref-lux__event {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 56, 47, 0.08);
}
.bn-ref-lux__card strong,
.bn-ref-lux__event strong { color: #17382f; }
.bn-ref-lux__card span,
.bn-ref-lux__event span,
.bn-ref-lux__event small { color: #5a6b64; font-weight: 700; font-size: 0.82rem; }
.bn-ref-lux__event.is-debit { border-color: rgba(154, 59, 47, 0.28); background: rgba(154, 59, 47, 0.06); }
.bn-ref-lux__event.is-debit strong { color: #8a3328; }
.bn-ref-lux__event.is-credit { border-color: rgba(23, 56, 47, 0.16); }
.bn-ref-lux__timeline { display: grid; gap: 8px; }
.bn-ref-lux__muted { color: #5a6b64; font-weight: 700; text-align: center; padding: 18px 8px; }
@media (max-width: 860px) {
  .bn-ref-lux__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bn-ref-lux__stats,
  .bn-ref-lux__redeem { grid-template-columns: 1fr; }
  .bn-ref-lux__hero { flex-direction: column-reverse; }
}
