:root { --practice-settings-max: 640px; }

html { min-height: 100%; scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { min-height: 100vh; min-height: 100svh; padding-bottom: 78px; overflow-x: hidden; }
button { color: inherit; }

.settings-hero { min-height: 195px; padding: calc(12px + env(safe-area-inset-top)) 20px 25px; }
.settings-hero::before { bottom: -29px; height: 33px; }
.settings-hero .dusk-disc {
  right: max(26px, calc((100vw - var(--practice-settings-max)) / 2 + 26px));
  top: 72px;
  width: 34px;
  height: 34px;
  box-shadow: 0 0 28px rgba(242, 181, 126, .72);
}
.settings-hero-inner { position: relative; z-index: 4; width: 100%; max-width: var(--practice-settings-max); margin: 0 auto; }
.settings-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.settings-wordmark { color: var(--sky-ink); font: 600 16px/1 'Source Serif 4', serif; letter-spacing: .115em; text-transform: uppercase; white-space: nowrap; }
.settings-practice-name { max-width: 270px; margin-top: 8px; color: rgba(248, 238, 231, .9); font-size: 11px; }
.settings-actions { display: flex; align-items: center; gap: 8px; }
.settings-icon-button,
.settings-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: var(--sky-ink);
  background: rgba(255,255,255,.08);
}
.settings-icon-button .material-symbols-rounded { font-size: 18px; font-variation-settings: 'FILL' 0, 'wght' 350; }
.settings-avatar { overflow: hidden; padding: 2px; border-color: rgba(255,255,255,.62); background: #fff8f0; box-shadow: 0 0 0 2px rgba(231,161,120,.34); }
.settings-avatar img { width: 100%; height: 100%; display: block; object-fit: contain; transform: scale(.88); }
.settings-hero-copy { margin-top: 11px; padding-right: 45px; }
.settings-admin-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: rgba(255,241,231,.92); background: rgba(255,255,255,.11); font-size: 9px; font-weight: 600; }
.settings-admin-badge .material-symbols-rounded { font-size: 12px; }
.settings-admin-badge .filled { font-variation-settings: 'FILL' 1, 'wght' 400; }
.settings-hero h1 { margin-top: 12px; color: var(--sky-ink); font: 600 29px/1.02 'Source Serif 4', serif; letter-spacing: -.025em; }
.settings-description,
.settings-trust { color: rgba(248,238,231,.9); font-size: 10.5px; line-height: 1.4; }
.settings-description { margin-top: 8px; }
.settings-trust { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.settings-trust .material-symbols-rounded { font-size: 14px; }

.practice-settings-tabs {
  position: relative;
  z-index: 7;
  width: calc(100% - 40px);
  max-width: 600px;
  height: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 10px auto 0;
  padding: 5px;
  border: 1px solid var(--dusk-line);
  border-radius: 999px;
  background: rgba(255,250,245,.98);
  box-shadow: 0 12px 28px -25px rgba(58,45,39,.55);
}
.practice-settings-tabs button { min-width: 0; padding: 0 5px; border: 0; border-radius: 999px; color: #947a6b; background: transparent; font-size: 9px; font-weight: 600; }
.practice-settings-tabs button[aria-disabled="true"] { cursor: default; }
.practice-settings-tabs button.active { color: var(--dusk-pill-text); background: var(--dusk-pill); }

.practice-settings-main { width: 100%; max-width: var(--practice-settings-max); margin: 0 auto; padding: 14px 21px 36px; }
[data-settings-panel][hidden] { display: none; }
[data-settings-panel="members"] { padding-bottom: 22px; }
[data-settings-panel="groups"] { padding-bottom: 22px; }
[data-settings-panel="notifications"] { padding-bottom: 22px; }
.settings-card { border: 1px solid var(--dusk-line); border-radius: 14px; background: var(--dusk-card-2); box-shadow: 0 12px 30px -28px rgba(58,45,39,.45); }
.practice-identity-card { padding: 12px 14px 9px; }
.practice-identity-card > .practice-lockup-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.practice-lockup-crop { width: min(100%, 390px); height: 76px; display: block; overflow: hidden; border-radius: 10px; background: rgba(255,252,248,.38); }
.practice-lockup-crop img { width: 100%; height: auto; display: block; transform: translateY(-16%); }
.practice-lockup-header p { margin-top: 1px; color: #a77f6f; font-size: 9px; }
.settings-list { overflow: hidden; border: 1px solid var(--dusk-line); border-radius: 9px; }
.settings-row {
  width: 100%;
  min-height: 31px;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr) minmax(80px,auto) 13px;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  color: var(--dusk-ink);
  background: transparent;
  text-align: left;
}
.settings-row:first-child { border-top: 0; }
.row-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; }
.row-icon .material-symbols-rounded { font-size: 14px; }
.row-icon .filled { font-variation-settings: 'FILL' 1, 'wght' 400; }
.row-icon.purple, .section-icon.purple { color: #7665a0; background: rgba(124,105,166,.12); }
.row-icon.green { color: #61825a; background: rgba(101,137,92,.12); }
.row-icon.blue { color: #5d80a7; background: rgba(97,132,171,.12); }
.row-icon.amber, .section-icon.amber { color: #df7b29; background: rgba(224,124,42,.12); }
.row-label { min-width: 0; font-size: 8.8px; }
.row-value { max-width: 210px; color: var(--dusk-copy); font-size: 8.5px; text-align: right; overflow-wrap: anywhere; }
.chevron { color: #967b6d; font-size: 14px; }

.settings-section-card { margin-top: 9px; padding: 10px 14px 8px; }
.settings-section-heading { min-height: 31px; display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.section-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; }
.section-icon .material-symbols-rounded { font-size: 17px; }
.settings-section-heading h2 { color: var(--dusk-ink); font: 600 14px/1 'Source Serif 4',serif; }
.toggle-value { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.settings-toggle { position: relative; width: 29px; height: 17px; display: inline-block; border-radius: 999px; background: #6f9066; }
.settings-toggle::before { content: '✓'; position: absolute; left: 5px; top: 1px; color: #fff; font-size: 8px; }
.settings-toggle i { position: absolute; right: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(40,35,31,.2); }
.profile-card { margin-bottom: 18px; }
.settings-row.compact { grid-template-columns: minmax(0,1fr) minmax(110px,1.5fr) 13px; }

/* Members */
.members-card,
.member-section-card { padding: 11px 13px 9px; }
.members-heading {
  min-height: 52px;
  display: grid;
  grid-template-columns: 43px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.members-heading-icon,
.member-section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg,#715ca5,#493278);
}
.members-heading-icon { width: 43px; height: 43px; border-radius: 11px; }
.members-heading-icon .material-symbols-rounded { font-size: 25px; }
.members-title { min-width: 0; }
.members-title h2,
.member-section-card h2 { color: var(--dusk-ink); font: 600 17px/1.05 'Source Serif 4',serif; }
.members-title p { margin-top: 4px; color: #987e72; font-size: 8.5px; }
.invite-member-button {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #7663aa;
  border-radius: 999px;
  color: #5f4ca2;
  background: transparent;
  font-size: 8.5px;
  white-space: nowrap;
}
.invite-member-button .material-symbols-rounded { font-size: 15px; }
.invite-member-button:disabled { cursor: not-allowed; opacity: .5; }
.member-list,
.pending-list,
.roles-list { overflow: hidden; border: 1px solid var(--dusk-line); border-radius: 9px; }
.practice-live-placeholder { padding: 18px 12px; color: #8b766d; font-size: 8px; text-align: center; }
.practice-live-placeholder.error { color: #af5145; }
.member-row {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 27px minmax(0,1fr) minmax(72px,.8fr) 52px 12px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.member-row:first-child,
.pending-row:first-child,
.role-row:first-child { border-top: 0; }
.member-initial {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #49387c;
  background: rgba(123,104,170,.14);
  font-size: 10px;
  font-weight: 600;
}
.member-row strong { color: var(--dusk-ink); font-size: 8.5px; font-weight: 500; }
.member-role { color: #8b766d; font-size: 8px; }
.member-status { display: flex; align-items: center; gap: 6px; color: var(--dusk-ink); font-size: 8px; }
.member-status i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #60955e; }
.member-row > .material-symbols-rounded,
.pending-row > .material-symbols-rounded,
.role-row > .material-symbols-rounded { color: #92786c; font-size: 13px; }
.member-row.practice-live-row { grid-template-columns: 27px minmax(0,1.1fr) minmax(66px,.72fr) 54px minmax(74px,.72fr); }
.practice-row-detail { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: #9b8479; text-align: right; }
.practice-row-detail small { font-size: 7px; }
.practice-row-detail .material-symbols-rounded { color: #92786c; font-size: 13px; }
.member-status.removed { color: #a95a4d; }
.member-status.removed i { background: #c56a5d; }

.member-section-card { margin-top: 9px; }
.member-section-card > header { min-height: 36px; display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.member-section-icon { width: 33px; height: 33px; border-radius: 9px; }
.member-section-icon .material-symbols-rounded { font-size: 20px; }
.pending-row {
  width: 100%;
  min-height: 37px;
  display: grid;
  grid-template-columns: 26px minmax(125px,1.35fr) minmax(57px,.65fr) minmax(72px,.8fr) 12px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.pending-row strong { min-width: 0; color: var(--dusk-ink); font-size: 7.2px; font-weight: 500; overflow-wrap: anywhere; }
.pending-row > span:nth-child(3) { color: #8b766d; font-size: 7.5px; }
.invite-state { display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: #8b766d; font-size: 7.3px; text-align: right; }
.invite-state .material-symbols-rounded { font-size: 12px; }
.invite-state.resend { color: #6653ad; }
.invite-state.accepted { color: #4f8250; }
.invite-state.delivery-failed {
  padding: 3px 6px;
  border-radius: 999px;
  color: #9d3e39;
  background: #fae9e7;
  font-weight: 700;
}
.invite-state.expired,
.invite-state.revoked { color: #9a7768; }
.practice-invite-row-action {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #92786c;
  background: transparent;
}
.practice-invite-row-action:not(:disabled):hover { color: #a94c42; background: rgba(184,84,68,.09); }
.practice-invite-row-action:disabled { visibility: hidden; }
.practice-invite-row-action .material-symbols-rounded { font-size: 14px; }

.practice-invite-dialog {
  width: min(720px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  max-height: calc(100svh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--dusk-line);
  border-radius: 20px;
  color: var(--dusk-ink);
  background: #fffaf5;
  box-shadow: 0 24px 70px rgba(56,37,42,.3);
}
.practice-invite-dialog[open],
.practice-member-dialog[open],
.practice-invitation-detail-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
}
.practice-invite-dialog::backdrop { background: rgba(38,25,38,.58); backdrop-filter: blur(5px); }
.practice-invite-dialog form { display: grid; gap: 15px; padding: 22px; }
.practice-invite-dialog header { display: grid; grid-template-columns: 42px minmax(0,1fr) 30px; align-items: center; gap: 11px; }
.practice-invite-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg,#715ca5,#493278); }
.practice-invite-dialog-icon .material-symbols-rounded { font-size: 22px; }
.practice-invite-dialog header p { color: #9a7968; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.practice-invite-dialog h2 { margin-top: 3px; font: 600 21px/1.05 'Source Serif 4',serif; }
.practice-dialog-close { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #856e66; background: transparent; }
.practice-dialog-close:hover { background: rgba(117,92,163,.09); }
.practice-invite-dialog label { display: grid; gap: 7px; color: var(--dusk-ink); font-size: 10px; font-weight: 600; }
.practice-invite-dialog [hidden] { display: none !important; }
.practice-invite-dialog input,
.practice-invite-dialog select,
.practice-invite-dialog textarea { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #dfd0c6; border-radius: 12px; color: var(--dusk-ink); background: rgba(255,255,255,.64); font: 500 11px/1.35 'Albert Sans',sans-serif; }
.practice-invite-dialog textarea { min-height: 88px; padding-block: 11px; resize: vertical; }
.practice-invite-dialog input:focus,
.practice-invite-dialog select:focus,
.practice-invite-dialog textarea:focus { outline: 2px solid rgba(117,92,163,.24); border-color: #755ca3; }
.practice-invite-batch-count { justify-self: end; margin-top: -2px; color: #8b766d; font-size: 8px; font-weight: 600; }
.practice-invite-batch-count.error { color: #b14e43; }
.practice-csv-import { display: flex; align-items: center; gap: 10px; }
.practice-csv-import button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; font: 700 9px/1 'Albert Sans',sans-serif; }
.practice-csv-import button .material-symbols-rounded { font-size: 14px; }
.practice-csv-import button:disabled { opacity: .52; cursor: not-allowed; }
.practice-csv-import small { color: #826f67; font-size: 8px; font-weight: 500; }
.practice-invite-review { overflow: hidden; border: 1px solid #e1d3ca; border-radius: 13px; background: rgba(255,255,255,.42); }
.practice-invite-review > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e7dbd3; }
.practice-invite-review > header strong { font-size: 10px; }
.practice-invite-review > header small { color: #88746b; font-size: 8px; }
.practice-invite-review > div { max-height: 230px; overflow: auto; }
.practice-invite-review-row { display: grid; grid-template-columns: minmax(150px,1.4fr) minmax(110px,.72fr) minmax(145px,1fr) 28px; align-items: center; gap: 7px; padding: 8px 10px; border-top: 1px solid #eee3dc; }
.practice-invite-review-row:first-child { border-top: 0; }
.practice-invite-review-email { min-width: 0; }
.practice-invite-review-email strong, .practice-invite-review-email small { display: block; overflow-wrap: anywhere; }
.practice-invite-review-email strong { font-size: 8.5px; }
.practice-invite-review-email small { margin-top: 2px; color: #a24740; font-size: 7.5px; }
.practice-invite-review-row select { min-height: 34px; padding: 0 8px; font-size: 8px; }
.practice-invite-review-remove { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #9f4a43; background: rgba(177,78,67,.08); }
.practice-invite-review-remove .material-symbols-rounded { font-size: 15px; }
.practice-invite-dialog .practice-invite-attestation { display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: start; gap: 9px; padding: 10px 11px; border: 1px solid rgba(117,92,163,.2); border-radius: 11px; background: rgba(117,92,163,.07); cursor: pointer; }
.practice-invite-dialog .practice-invite-attestation > input { width: 15px; min-height: 15px; height: 15px; margin: 1px 0 0; padding: 0; accent-color: #755ca3; }
.practice-invite-attestation strong, .practice-invite-attestation small { display: block; }
.practice-invite-attestation strong { font-size: 9px; }
.practice-invite-attestation small { margin-top: 3px; color: #826e65; font-size: 8px; font-weight: 500; line-height: 1.4; }
.practice-invite-policy { padding: 10px 12px; border-radius: 11px; color: #66577d; background: rgba(117,92,163,.08); font-size: 9px; line-height: 1.45; }
.practice-invite-form-status { min-height: 14px; color: #75635b; font-size: 9px; line-height: 1.4; }
.practice-invite-form-status.success { color: #4f8250; }
.practice-invite-form-status.error { color: #b14e43; }
.practice-invite-dialog footer { display: flex; justify-content: flex-end; gap: 9px; }
.practice-invite-dialog footer button { min-height: 39px; padding: 8px 16px; border-radius: 999px; font: 700 10px/1 'Albert Sans',sans-serif; }
.practice-dialog-secondary { border: 1px solid #dfd0c6; color: #725f57; background: transparent; }
.practice-dialog-primary { display: inline-flex; align-items: center; gap: 7px; border: 0; color: #fff; background: #493732; box-shadow: 0 8px 20px rgba(73,55,50,.16); }
.practice-dialog-primary:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.practice-dialog-primary .material-symbols-rounded { font-size: 15px; }

@media (max-width: 620px) {
  .practice-invite-review > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .practice-invite-review-row { grid-template-columns: minmax(0,1fr) 28px; }
  .practice-invite-review-row select { grid-column: 1 / -1; }
  .practice-invite-review-remove { grid-column: 2; grid-row: 1; }
}

.practice-member-dialog,
.practice-invitation-detail-dialog {
  width: min(480px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  max-height: calc(100svh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--dusk-line);
  border-radius: 20px;
  color: var(--dusk-ink);
  background: #fffaf5;
  box-shadow: 0 24px 70px rgba(56,37,42,.3);
}
.practice-member-dialog::backdrop,
.practice-invitation-detail-dialog::backdrop { background: rgba(38,25,38,.58); backdrop-filter: blur(5px); }
.practice-member-dialog form,
.practice-invitation-detail-shell { display: grid; gap: 15px; padding: 22px; }
.practice-member-dialog header,
.practice-invitation-detail-dialog header { display: grid; grid-template-columns: 46px minmax(0,1fr) 30px; align-items: center; gap: 11px; }
.practice-member-dialog header p,
.practice-invitation-detail-dialog header p { color: #9a7968; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.practice-member-dialog h2,
.practice-invitation-detail-dialog h2 { margin-top: 3px; font: 600 20px/1.08 'Source Serif 4',serif; overflow-wrap: anywhere; }
.practice-member-dialog header small,
.practice-invitation-detail-dialog header small { display: block; margin-top: 3px; color: #8d766c; font-size: 8.5px; overflow-wrap: anywhere; }
.practice-member-dialog-mark,
.practice-invitation-detail-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#715ca5,#493278); font-size: 15px; font-weight: 700; }
.practice-invitation-detail-icon .material-symbols-rounded { font-size: 23px; }
.practice-member-overview { display: flex; flex-wrap: wrap; gap: 7px; }
.practice-member-overview > span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #eaded5; border-radius: 999px; color: #78655e; background: rgba(255,255,255,.52); font-size: 8px; }
.practice-member-overview .material-symbols-rounded { color: #755ca3; font-size: 13px; }
.practice-member-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.practice-member-dialog label { display: grid; gap: 7px; color: var(--dusk-ink); font-size: 9px; font-weight: 600; }
.practice-member-dialog select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #dfd0c6; border-radius: 12px; color: var(--dusk-ink); background: rgba(255,255,255,.64); font: 500 10px/1.2 'Albert Sans',sans-serif; }
.practice-member-dialog select:focus { outline: 2px solid rgba(117,92,163,.24); border-color: #755ca3; }
.practice-member-dialog select:disabled { opacity: .65; cursor: not-allowed; }
.practice-member-dialog [hidden],
.practice-invitation-detail-dialog [hidden] { display: none !important; }
.practice-assignment-section { padding: 12px; border: 1px solid #e4d7ce; border-radius: 13px; background: rgba(255,255,255,.4); }
.practice-assignment-section h3 { font: 600 15px/1.1 'Source Serif 4',serif; }
.practice-assignment-section > div:first-child p { margin-top: 4px; color: #8a746a; font-size: 8px; line-height: 1.4; }
.practice-assignment-list { display: grid; gap: 6px; margin-top: 10px; }
.practice-assignment-option { grid-template-columns: 17px minmax(0,1fr); align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid #ebdfd6; border-radius: 9px; background: rgba(255,250,245,.72); }
.practice-assignment-option input { width: 15px; height: 15px; accent-color: #755ca3; }
.practice-assignment-option span { display: grid; gap: 2px; }
.practice-assignment-option strong { font-size: 9px; }
.practice-assignment-option small { color: #927b70; font-size: 7.5px; }
.practice-assignment-empty { color: #8a746a; font-size: 8px; }
.practice-assignment-reason { display: grid; gap: 5px; margin-top: 10px; color: #523f39; font-size: 8px; font-weight: 700; }
.practice-assignment-reason input { min-height: 36px; padding: 0 11px; border: 1px solid #dfd0c7; border-radius: 9px; background: rgba(255,255,255,.72); color: #302523; font: 500 9px/1.3 'Nunito Sans',sans-serif; }
.practice-assignment-reason input:focus { outline: 2px solid rgba(117,92,163,.2); border-color: #8872af; }
.practice-assignment-reason small { color: #8a746a; font-size: 7px; font-weight: 500; line-height: 1.4; }
.practice-seat-impact { padding: 9px 11px; border-radius: 10px; color: #5f6f55; background: rgba(105,139,91,.1); font-size: 8.5px; line-height: 1.45; }
.practice-seat-impact.warning { color: #ad4d40; background: rgba(189,83,64,.1); }
.practice-member-form-status,
.practice-invitation-detail-status { min-height: 14px; color: #75635b; font-size: 9px; line-height: 1.4; }
.practice-member-form-status.success,
.practice-invitation-detail-status.success { color: #4f8250; }
.practice-member-form-status.error,
.practice-invitation-detail-status.error { color: #b14e43; }
.practice-member-dialog footer,
.practice-invitation-detail-dialog footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.practice-member-dialog footer button,
.practice-invitation-detail-dialog footer button { min-height: 39px; padding: 8px 15px; border-radius: 999px; font: 700 9.5px/1 'Albert Sans',sans-serif; }
.practice-invitation-detail-dialog footer > span { flex: 1; }
.practice-dialog-danger { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(177,78,67,.24); color: #ad4d40; background: rgba(189,83,64,.07); }
.practice-dialog-danger .material-symbols-rounded { font-size: 14px; }
.practice-invitation-detail-list { display: grid; grid-template-columns: minmax(95px,.7fr) minmax(0,1.3fr); overflow: hidden; border: 1px solid #e4d7ce; border-radius: 12px; }
.practice-invitation-detail-list dt,
.practice-invitation-detail-list dd { min-height: 35px; display: flex; align-items: center; margin: 0; padding: 7px 10px; border-top: 1px solid #eaded5; font-size: 8.5px; }
.practice-invitation-detail-list dt:nth-of-type(1),
.practice-invitation-detail-list dd:nth-of-type(1) { border-top: 0; }
.practice-invitation-detail-list dt { color: #91786d; background: rgba(117,92,163,.045); }
.practice-invitation-detail-list dd { justify-content: flex-end; color: var(--dusk-ink); text-align: right; overflow-wrap: anywhere; }

.role-row {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) minmax(100px,1.1fr) 12px;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.role-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: #6c58a1; background: rgba(123,104,170,.13); }
.role-icon .material-symbols-rounded { font-size: 13px; }
.role-icon .filled { font-variation-settings: 'FILL' 1, 'wght' 400; }
.role-row strong { color: var(--dusk-ink); font-size: 8px; font-weight: 600; }
.role-row > span:nth-child(3) { color: #455573; font-size: 7.8px; text-align: right; }

/* Groups */
.groups-card,
.group-section-card { padding: 11px 13px 9px; }
.groups-heading {
  min-height: 52px;
  display: grid;
  grid-template-columns: 43px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.groups-heading-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg,#715ca5,#493278);
}
.groups-heading-icon .material-symbols-rounded { font-size: 25px; }
.groups-title h2,
.group-section-card h2 { color: var(--dusk-ink); font: 600 17px/1.05 'Source Serif 4',serif; }
.groups-title p,
.group-section-card header p { margin-top: 4px; color: #987e72; font-size: 8.5px; }
.create-group-button {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--dusk-line);
  border-radius: 9px;
  color: var(--dusk-ink);
  background: transparent;
  font-size: 8.5px;
  white-space: nowrap;
}
.create-group-button .material-symbols-rounded { color: #6653a2; font-size: 16px; }
.group-list,
.group-rule-list,
.archived-list { overflow: hidden; border: 1px solid var(--dusk-line); border-radius: 9px; }
.group-row {
  width: 100%;
  min-height: 37px;
  display: grid;
  grid-template-columns: 27px minmax(0,1.35fr) minmax(76px,.8fr) 51px 12px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.group-row:first-child,
.group-rule-row:first-child,
.archived-row:first-child { border-top: 0; }
.group-row-icon,
.rule-icon,
.archive-row-icon { display: grid; place-items: center; border-radius: 7px; }
.group-row-icon { width: 26px; height: 26px; color: #6f5d9c; background: rgba(123,104,170,.13); }
.group-row-icon .material-symbols-rounded { font-size: 15px; }
.group-row strong { min-width: 0; color: var(--dusk-ink); font: 500 9px/1.15 'Source Serif 4',serif; }
.group-row > span:nth-child(3),
.group-row > span:nth-child(4) { color: var(--dusk-copy); font-size: 8px; }
.group-row > span:nth-child(4) { text-align: right; }
.group-row > .material-symbols-rounded,
.group-rule-row > .material-symbols-rounded,
.archived-row > .material-symbols-rounded { color: #92786c; font-size: 13px; }

.group-section-card { margin-top: 9px; }
.group-section-card > header { min-height: 38px; display: flex; align-items: center; gap: 11px; margin-bottom: 7px; }
.group-section-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; }
.group-section-icon.purple { color: #6d59a0; background: rgba(123,104,170,.13); }
.group-section-icon.amber { color: #93663f; background: rgba(210,151,95,.16); }
.group-section-icon .material-symbols-rounded { font-size: 19px; }
.group-rule-row {
  width: 100%;
  min-height: 31px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) minmax(82px,.75fr) 12px;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.rule-icon { width: 22px; height: 22px; color: #705d9d; background: rgba(123,104,170,.13); }
.rule-icon .material-symbols-rounded { font-size: 13px; }
.group-rule-row strong { color: var(--dusk-ink); font-size: 8px; font-weight: 500; }
.group-rule-row > span:nth-child(3) { color: var(--dusk-copy); font-size: 8px; text-align: right; }

.archived-row {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 55px 12px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.archive-row-icon { width: 22px; height: 22px; color: #94643b; background: rgba(210,151,95,.16); }
.archive-row-icon .material-symbols-rounded { font-size: 13px; }
.archived-row strong { color: var(--dusk-ink); font: 500 9px/1.1 'Source Serif 4',serif; }
.archived-row > span:nth-child(3) { color: var(--dusk-copy); font-size: 8px; text-align: right; }

/* Notifications */
.notification-card { padding: 10px 13px 8px; }
.notification-card + .notification-card { margin-top: 9px; }
.notification-heading { min-height: 38px; display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.notification-heading-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg,#715ca5,#493278);
}
.notification-heading-icon .material-symbols-rounded { font-size: 19px; }
.notification-heading-icon .filled { font-variation-settings: 'FILL' 1, 'wght' 400; }
.notification-heading h2 { color: var(--dusk-ink); font: 600 17px/1.05 'Source Serif 4',serif; }
.notification-list { overflow: hidden; border: 1px solid var(--dusk-line); border-radius: 9px; }
.notification-row {
  width: 100%;
  min-height: 33px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 0;
  border-top: 1px solid var(--dusk-line);
  background: transparent;
  text-align: left;
}
.notification-row:first-child { border-top: 0; }
.notification-row.toggle-row { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; }
.notification-row.value-row { display: grid; grid-template-columns: 25px minmax(0,1fr) minmax(78px,auto) 12px; }
.notification-row-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #6c59a0; background: rgba(123,104,170,.12); }
.notification-row-icon .material-symbols-rounded { font-size: 14px; }
.notification-row strong { min-width: 0; color: var(--dusk-ink); font-size: 8.3px; font-weight: 500; }
.notification-toggle-value { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--dusk-ink); }
.notification-toggle-value em { min-width: 14px; font-size: 8px; font-style: normal; }
.notification-toggle {
  position: relative;
  width: 29px;
  height: 17px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
  transition: background .2s ease;
}
.notification-toggle.on { background: #6f9066; }
.notification-toggle.off { background: #a5a7a6; }
.notification-toggle::before { position: absolute; top: 1px; color: #fff; font-size: 8px; }
.notification-toggle.on::before { content: '✓'; left: 5px; }
.notification-toggle.off::before { content: '×'; right: 5px; }
.notification-toggle i { position: absolute; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(40,35,31,.2); transition: left .2s ease; }
.notification-toggle.on i { left: 14px; }
.notification-toggle.off i { left: 2px; }
.notification-setting-value { color: var(--dusk-ink); font-size: 8px; text-align: right; }
.notification-row.value-row > .material-symbols-rounded { color: #92786c; font-size: 13px; }

.practice-settings-dock {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(9px + env(safe-area-inset-bottom));
  width: calc(100% - 22px);
  max-width: 618px;
  min-height: 47px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--dusk-line);
  border-radius: 999px;
  background: rgba(255,252,248,.96);
  box-shadow: 0 13px 34px -18px rgba(58,45,39,.45);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.practice-settings-dock a { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 999px; color: #9a7f70; font-size: 10.5px; font-weight: 700; text-decoration: none; }
.practice-settings-dock > span { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 999px; color: #9a7f70; font-size: 10.5px; font-weight: 700; }
.practice-settings-dock .practice-dock-disabled { opacity: .46; cursor: not-allowed; }
.practice-settings-dock .material-symbols-rounded { font-size: 17px; }
.practice-settings-dock .active { color: var(--dusk-pill-text); background: var(--dusk-pill); }
.practice-settings-dock .active .material-symbols-rounded { color: var(--dusk-pill-icon); font-variation-settings: 'FILL' 1, 'wght' 450; }

.settings-card { animation: settingsReveal .5s cubic-bezier(.22,1,.36,1) var(--settings-delay,0ms) both; }
@keyframes settingsReveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

html.dark .practice-settings-tabs,
html.dark .settings-card,
html.dark .practice-settings-dock { background: rgba(33,30,44,.95); }
html.dark .practice-lockup-crop { background: rgba(255,252,248,.94); }

@media (max-width: 419px) {
  .settings-hero { min-height: 207px; padding-inline: 16px; }
  .settings-wordmark { font-size: 14px; }
  .settings-practice-name { max-width: 200px; font-size: 9.5px; }
  .settings-icon-button,.settings-avatar { width: 32px; height: 32px; }
  .settings-hero-copy { padding-right: 28px; }
  .settings-hero h1 { font-size: 27px; }
  .settings-description,.settings-trust { font-size: 9.5px; }
  .practice-settings-tabs { width: calc(100% - 22px); }
  .practice-settings-tabs button { padding-inline: 2px; font-size: 7.8px; }
  .practice-settings-main { padding-inline: 12px; }
  .practice-lockup-crop { height: 66px; }
  .settings-row { grid-template-columns: 25px minmax(0,1fr) minmax(68px,auto) 12px; gap: 5px; padding-inline: 7px; }
  .row-label,.row-value { font-size: 7.7px; }
  .settings-row.compact { grid-template-columns: minmax(0,1fr) minmax(96px,1.4fr) 12px; }
  .members-heading { grid-template-columns: 38px minmax(0,1fr); gap: 9px; }
  .members-heading-icon { width: 38px; height: 38px; }
  .members-title h2,.member-section-card h2 { font-size: 15px; }
  .invite-member-button { grid-column: 1 / -1; width: 100%; }
  .member-row { grid-template-columns: 26px minmax(0,1fr) 47px 12px; }
  .member-role { display: none; }
  .member-row.practice-live-row { grid-template-columns: 26px minmax(0,1fr) 49px 14px; }
  .member-row.practice-live-row .practice-row-detail small { display: none; }
  .pending-row { grid-template-columns: 26px minmax(0,1fr) minmax(68px,.7fr) 12px; }
  .pending-row > span:nth-child(3) { display: none; }
  .practice-invite-dialog form { gap: 12px; padding: 18px; }
  .practice-member-dialog form,
  .practice-invitation-detail-shell { gap: 12px; padding: 18px; }
  .practice-member-fields { grid-template-columns: 1fr; }
  .practice-member-dialog footer,
  .practice-invitation-detail-dialog footer { flex-wrap: wrap; }
  .practice-invitation-detail-dialog footer > span { display: none; }
  .role-row { grid-template-columns: 23px minmax(0,1fr) minmax(90px,1fr) 12px; }
  .groups-heading { grid-template-columns: 38px minmax(0,1fr); gap: 9px; }
  .groups-heading-icon { width: 38px; height: 38px; }
  .groups-title h2,.group-section-card h2 { font-size: 15px; }
  .create-group-button { grid-column: 1 / -1; width: 100%; }
  .group-row { grid-template-columns: 26px minmax(0,1fr) 46px 12px; }
  .group-row > span:nth-child(3) { display: none; }
  .group-rule-row { grid-template-columns: 23px minmax(0,1fr) minmax(72px,.75fr) 12px; }
  .notification-heading h2 { font-size: 15px; }
  .notification-row strong,.notification-setting-value,.notification-toggle-value em { font-size: 7.6px; }
  .notification-row.value-row { grid-template-columns: 24px minmax(0,1fr) minmax(69px,auto) 12px; gap: 6px; }
  .practice-settings-dock a { gap: 4px; padding-inline: 5px; font-size: 9px; }
  .practice-settings-dock > span { gap: 4px; padding-inline: 5px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .settings-card { animation: none !important; }
}

/* ── Wide desktop ───────────────────────────────────────────────
   These screens were laid out phone-first and kept a 640px column at
   every width, which left most of a laptop empty. Widen to the same
   1160px the clinician workspace uses, and give the extra room to a
   second column: every panel is one primary card plus two secondary
   ones, so the primary spans and the pair sits beside itself.
   Below 1000px nothing changes.
   ─────────────────────────────────────────────────────────────── */
@media (min-width: 1000px) {
  :root { --practice-settings-max: 1160px; }

  .practice-settings-main { padding: 20px 26px 52px; }
  .practice-settings-main > section:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }
  .practice-settings-main > section:not([hidden]) > :first-child { grid-column: 1 / -1; }

  /* The dock is a phone pattern: pinned to the bottom of the viewport, it
     floats over the content and is the first thing anything else on screen
     covers. On a desktop it belongs in the page, under the UI it navigates, which is what the clinician workspace does when it swaps its hotbar
     for inline tabs above 820px. */
  /* Back on the viewport, because each admin page is its own document:
     in flow the dock landed at a different height on every tab, so the
     nav you just clicked jumped hundreds of pixels. Lifted clear of the
     preview banner rather than hidden behind it. */
  .practice-settings-dock {
    position: fixed;
    bottom: calc(16px + var(--ed-preview-banner-h, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(618px, 100%);
    box-shadow: 0 10px 28px -20px rgba(58,45,39,.45);
  }

  /* One hero height across the four admin pages. They are separate
     documents, so an uneven hero moves the whole page down as you
     switch tabs and the change reads as a glitch. */
  /* One hero across the four admin pages: same height and the same
     type. Home was running a 38px h1 and an 18px wordmark against
     29px and 16px everywhere else, so the banner visibly changed
     weight as you moved between tabs. */
  .settings-hero { min-height: 172px; padding-bottom: 26px; }
  .settings-hero h1 { font-size: 29px; line-height: 1.08; }
  .settings-wordmark { font-size: 16px; }

  /* The dock floats over the page, so the last card needs room to
     scroll out from under it, banner included. */
  .practice-settings-main { padding-bottom: calc(104px + var(--ed-preview-banner-h, 0px)); }

  /* Density pass so the page fits a laptop screen. */
  .practice-settings-main { padding-bottom: calc(72px + var(--ed-preview-banner-h, 0px)); padding-top: 16px; }
  .settings-card { padding: 12px 14px 11px; }
}

/* Member and invitation directories share the full workspace width. Each
   directory scrolls on its own, so a growing roster does not stretch the page. */
.practice-directory-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; }
.practice-directory-tools label { display: grid; gap: 5px; min-width: 0; color: var(--dusk-copy); font-size: 11px; font-weight: 700; }
.practice-directory-tools select { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--dusk-line); border-radius: 10px; color: var(--dusk-ink); background: var(--dusk-card-2); font: 600 12px/1.3 'Albert Sans', sans-serif; }
.practice-directory-tools select:focus-visible,
.member-list:focus-visible, .pending-list:focus-visible { outline: 2px solid #715ca5; outline-offset: 2px; }
.practice-directory-count { min-height: 17px; margin: 0 2px 8px; color: var(--dusk-copy); font-size: 11px; }
#practiceMemberList, #practiceInviteList { max-height: clamp(180px, 30vh, 310px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.members-title p, .invite-member-button { font-size: 12px; }
.members-card, .pending-card { padding: 16px; }
.member-row.practice-live-row, .pending-row.practice-live-invite-row { min-height: 54px; gap: 10px; padding: 9px 11px; }
.member-row.practice-live-row strong, .pending-row.practice-live-invite-row strong { font-size: 13px; font-weight: 600; }
.member-row.practice-live-row .member-role, .pending-row.practice-live-invite-row > span:nth-child(3),
.member-row.practice-live-row .member-status, .pending-row.practice-live-invite-row .invite-state { font-size: 11px; }
.member-row.practice-live-row .practice-row-detail small { font-size: 10px; }
.member-row.practice-live-row { grid-template-columns: 30px minmax(0, 1.4fr) minmax(88px, .7fr) minmax(75px, .6fr) minmax(115px, .8fr); }
.pending-row.practice-live-invite-row { grid-template-columns: 30px minmax(0, 1.5fr) minmax(88px, .7fr) minmax(115px, .8fr) 14px; }
.pending-row.practice-live-invite-row .invite-identity { min-width: 0; display: grid; gap: 3px; }
.pending-row.practice-live-invite-row .invite-identity strong { overflow-wrap: anywhere; }
.pending-row.practice-live-invite-row .invite-identity small { color: var(--dusk-copy); font-size: 10px; }
.practice-live-placeholder { font-size: 12px; }

@media (min-width: 1000px) {
  .practice-settings-main > #settings-panel-members:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .practice-directory-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-directory-tools label:last-child { grid-column: 1 / -1; }
  .member-row.practice-live-row { grid-template-columns: 30px minmax(0, 1fr) minmax(70px, auto) 14px; }
  .pending-row.practice-live-invite-row { grid-template-columns: 30px minmax(0, 1fr) minmax(100px, auto) 14px; }
  .member-row.practice-live-row .member-role,
  .pending-row.practice-live-invite-row > span:nth-child(3),
  .member-row.practice-live-row .practice-row-detail small { display: none; }
}
