:root {
  --hub-navy:var(--cb-navy,#092d72);
  --hub-blue:var(--cb-blue,#086bff);
  --hub-cyan:var(--cb-cyan,#22b8e8);
  --hub-ink:var(--cb-ink,#173b78);
  --hub-muted:var(--cb-muted,#587392);
  --hub-line:var(--cb-line,#d4e8f7);
  --hub-sky:var(--cb-sky,#eaf5ff);
  --hub-pale:var(--cb-sky-soft,#f5faff);
  --hub-shadow:0 18px 55px rgba(17,61,110,.10);
}

.member-account,
.member-community,
.member-account * ,
.member-community * { box-sizing:border-box; }

.member-account,
.member-community {
  color:var(--hub-ink);
  font-family:var(--cb-font-body);
}

.member-account :is(label,button),
.member-community :is(label,button) {
  font-family:var(--cb-font-body) !important;
  font-style:normal !important;
}

body.account-screen .account-hero {
  display:none;
}

.member-profile-visual {
  overflow:hidden;
  border:1px solid var(--hub-line);
  border-radius:30px;
  background:#fff;
  box-shadow:var(--hub-shadow);
}

.member-profile-visual__banner {
  min-height:260px;
  background:
    linear-gradient(90deg,rgba(7,22,95,.38),rgba(8,116,249,.03)),
    url('/assets/connect-bro-whangarei-hero-v2.jpg') center 51%/cover;
}

.member-profile-visual__body {
  position:relative;
  display:flex;
  align-items:center;
  gap:24px;
  padding:0 32px 28px;
}

.member-profile-visual__avatar {
  width:116px;
  height:116px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  margin-top:-52px;
  border:7px solid #fff;
  border-radius:50%;
  background:linear-gradient(145deg,var(--hub-cyan),var(--hub-blue));
  color:#fff;
  font-size:30px;
  font-weight:900;
  box-shadow:0 12px 28px rgba(4,46,112,.22);
}

.member-profile-visual__copy {
  min-width:0;
  padding-top:18px;
}

.member-account .member-profile-visual__name {
  margin:0 0 5px;
  color:var(--hub-navy);
  font-size:clamp(28px,3.2vw,44px);
  font-weight:850 !important;
  letter-spacing:-.035em;
  line-height:1.04;
}

.member-profile-visual__bio {
  max-width:720px;
  margin:0;
  color:var(--hub-muted);
  font-size:16px;
  line-height:1.55;
}

.member-profile-visual__location {
  margin:8px 0 0;
  color:var(--hub-blue);
  font-size:14px;
  font-weight:800;
}

.member-hub__eyebrow {
  margin:0 0 6px !important;
  color:#058ba6 !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.15em !important;
  text-transform:uppercase;
}

/* Account */
.member-account {
  width:min(1540px,calc(100% - 40px));
  margin:30px auto 84px;
}

.member-account > * + * { margin-top:22px; }

.profile-edit-button {
  align-self:flex-start;
  margin:24px 0 0 auto;
  padding:12px 20px;
  border:1.5px solid var(--hub-blue);
  border-radius:999px;
  background:#fff;
  color:var(--hub-navy);
  font-weight:800;
  cursor:pointer;
}

.profile-edit-button:hover,
.profile-edit-button:focus-visible {
  background:var(--hub-sky);
  outline:3px solid rgba(8,116,249,.16);
}

.account-profile-editor {
  padding:28px;
  border:1px solid var(--hub-line);
  border-radius:26px;
  background:#fff;
  box-shadow:var(--hub-shadow);
}

.account-profile-editor[hidden] { display:none !important; }

.account-session-actions {
  display:flex;
  justify-content:flex-end;
}

.account-session-actions[hidden] { display:none !important; }

.member-account .account-layout {
  display:block !important;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  border:0;
  box-shadow:none;
}

.member-account .account-primary {
  max-width:920px;
  margin:0 auto;
  padding:0;
  border:0;
  box-shadow:none;
}

.member-account .account-primary > h2 {
  margin-top:0;
  color:var(--hub-navy);
  font-size:30px;
}

.member-account #profile-completion {
  margin-top:24px;
  border:1px solid var(--hub-line);
  border-radius:22px;
  background:var(--hub-pale);
}

.member-account #auth-form {
  max-width:680px;
}

.member-account #member-dashboard {
  display:grid;
  gap:22px;
  width:100%;
  max-width:none;
  margin:0;
}

.member-account #member-dashboard[hidden] { display:none !important; }

.account-overview,
.account-activity {
  padding:30px;
  border:1px solid var(--hub-line);
  border-radius:28px;
  background:#fff;
  box-shadow:var(--hub-shadow);
}

.account-quick-actions {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 22px !important;
}

.account-quick-actions a {
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px !important;
  text-align:center;
  font-weight:850;
}

.member-account .dashboard-summary {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.member-account .dashboard-summary > div {
  min-height:112px;
  justify-content:center;
  border:1px solid var(--hub-line);
  border-radius:18px;
  background:linear-gradient(145deg,#edf7ff,#f9fcff);
}

.member-account .dashboard-summary strong {
  color:var(--hub-blue);
  font-size:38px;
}

.account-section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding-bottom:22px;
  border-bottom:1px solid var(--hub-line);
}

.account-section-heading h2 {
  margin:0;
  color:var(--hub-navy);
  font-size:clamp(25px,3vw,36px);
  letter-spacing:-.03em;
}

.account-view-tabs {
  display:flex;
  gap:8px;
  padding:5px;
  border-radius:999px;
  background:#eaf5ff;
}

.account-view-tabs button {
  min-height:40px;
  padding:8px 18px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--hub-navy);
  font-weight:800;
  cursor:pointer;
}

.account-view-tabs button[aria-selected="true"] {
  background:#fff;
  color:var(--hub-blue);
  box-shadow:0 5px 18px rgba(19,71,128,.12);
}

.account-tab-body { padding-top:24px; }
.account-tab-body > section[hidden] { display:none !important; }
.account-tab-body h3 { margin:0 0 18px; color:var(--hub-navy); font-size:23px; }
.member-account #dashboard-requests,
.member-account #dashboard-saved {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}
.member-account .dashboard-request-card { margin:0; }

/* My Community */
body.community-screen .workspace {
  max-width:none;
  padding:0 0 64px;
}

body.community-screen #account.auth-panel {
  width:min(1180px,calc(100% - 40px));
  margin:30px auto;
}

body.community-screen #member-content > :not(.member-community) {
  display:none !important;
}

.member-community {
  width:min(1540px,calc(100% - 40px));
  margin:30px auto 0;
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  gap:26px;
  align-items:start;
}

.member-community__rail {
  position:sticky;
  top:20px;
  overflow:hidden;
  border:1px solid var(--hub-line);
  border-radius:28px;
  background:#fff;
  box-shadow:var(--hub-shadow);
}

.community-rail-profile .member-profile-visual {
  border:0;
  border-radius:0;
  box-shadow:none;
}

.community-rail-profile .member-profile-visual__banner { min-height:150px; }
.community-rail-profile .member-profile-visual__body {
  display:block;
  padding:0 22px 20px;
}
.community-rail-profile .member-profile-visual__avatar {
  width:88px;
  height:88px;
  margin-top:-40px;
  border-width:5px;
  font-size:23px;
}
.community-rail-profile .member-profile-visual__copy { padding-top:10px; }
.community-rail-profile .member-profile-visual__name { font-size:25px; }
.community-rail-profile .member-profile-visual__bio { font-size:14px; }
.community-rail-profile .member-profile-visual__location { font-size:13px; }

.community-rail-nav {
  display:grid;
  gap:8px;
  padding:14px 16px 10px;
  border-top:1px solid var(--hub-line);
}

.community-rail-nav button {
  min-height:50px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 15px;
  border:0;
  border-radius:15px;
  background:transparent;
  color:var(--hub-navy);
  font-size:15px;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}

.community-rail-nav button span {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eaf5ff;
  color:var(--hub-blue);
}

.community-rail-nav button[aria-current="page"] {
  background:var(--hub-navy);
  color:#fff;
}
.community-rail-nav button[aria-current="page"] span {
  background:rgba(255,255,255,.15);
  color:#fff;
}

.community-rail-action,
.community-sign-out {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:8px 16px;
  border-radius:999px;
  font-weight:800;
  text-decoration:none;
}

.community-rail-action {
  border:1.5px solid var(--hub-blue);
  color:var(--hub-navy);
  background:#fff;
}

.community-sign-out {
  width:calc(100% - 32px);
  margin-bottom:18px;
  border:0;
  background:var(--hub-sky);
  color:var(--hub-navy);
  cursor:pointer;
}

.community-pane {
  min-height:720px;
  padding:34px;
  border:1px solid var(--hub-line);
  border-radius:28px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  box-shadow:var(--hub-shadow);
}

.community-pane[hidden] { display:none !important; }

.community-pane__header {
  max-width:850px;
  padding-bottom:24px;
  border-bottom:1px solid var(--hub-line);
}

.community-pane__header h1 {
  margin:0 0 10px;
  color:var(--hub-navy);
  font-size:clamp(34px,4.2vw,54px);
  font-weight:850 !important;
  letter-spacing:-.045em;
  line-height:1.02;
}

.community-pane__header p:last-child {
  margin:0;
  color:var(--hub-muted);
  font-size:17px;
  line-height:1.6;
}

.community-card-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  margin-top:24px;
}

.community-card-grid > .panel,
.community-inbox > .panel {
  margin:0;
  padding:26px;
  border:1px solid var(--hub-line);
  border-radius:22px;
  background:#fff;
  box-shadow:0 10px 28px rgba(22,72,122,.07);
}

.community-card-grid .eyebrow,
.community-inbox .eyebrow {
  color:#058ba6;
  font-size:12px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.community-card-grid h2,
.community-inbox h2 {
  margin:5px 0 10px;
  color:var(--hub-navy);
  font-size:26px;
}

.community-inbox { margin-top:24px; }

.member-community .search-results {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
  margin-top:18px;
}

.member-community .search-result {
  position:relative;
  min-height:104px;
  display:grid;
  grid-template-columns:54px 1fr;
  align-content:center;
  gap:5px 14px;
  margin:0;
  padding:16px;
  border:1px solid var(--hub-line);
  border-radius:18px;
  background:linear-gradient(145deg,#fff,#f4f9ff);
  box-shadow:0 7px 20px rgba(22,72,122,.06);
}

.member-community .search-result > :not(.community-person-avatar) {
  grid-column:2;
}

.community-person-avatar {
  grid-row:1 / span 4;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(145deg,var(--hub-cyan),var(--hub-blue));
  color:#fff;
  font-size:15px;
  font-weight:900;
}

.member-community .search-result strong { color:var(--hub-navy); }
.member-community .search-result span,
.member-community .search-result p { color:var(--hub-muted); line-height:1.45; }

.member-community #message-reply-form {
  display:grid;
  grid-template-columns:minmax(220px,.7fr) minmax(320px,1.3fr) auto;
  gap:14px;
  align-items:end;
  margin-top:18px;
}
.member-community #message-reply-form label { margin:0; }
.member-community #message-reply-form textarea { min-height:54px; }
.member-community #message-reply-form button { min-height:54px; border-radius:999px; }

@media(max-width:1000px) {
  .member-community { grid-template-columns:1fr; }
  .member-community__rail { position:static; }
  .community-rail-profile .member-profile-visual__banner { min-height:200px; }
  .community-rail-nav { grid-template-columns:1fr 1fr; }
  .account-quick-actions { grid-template-columns:1fr 1fr; }
  .community-card-grid { grid-template-columns:1fr; }
}

@media(max-width:700px) {
  .member-account,
  .member-community { width:calc(100% - 16px); margin-top:12px; }
  .member-profile-visual { border-radius:22px; }
  .member-profile-visual__banner { min-height:170px; }
  .member-profile-visual__body { align-items:flex-start; gap:14px; padding:0 18px 20px; }
  .member-profile-visual__avatar { width:82px; height:82px; margin-top:-34px; border-width:5px; font-size:21px; }
  .member-profile-visual__copy { padding-top:12px; }
  .member-account .member-profile-visual__name { font-size:27px; }
  .profile-edit-button { margin:14px 0 0 auto; padding:10px 14px; font-size:13px; }
  .account-profile-editor,
  .account-overview,
  .account-activity,
  .community-pane { padding:20px; border-radius:20px; }
  .account-quick-actions { grid-template-columns:1fr; }
  .member-account .dashboard-summary { grid-template-columns:1fr; }
  .account-section-heading { align-items:flex-start; flex-direction:column; }
  .member-community #message-reply-form { grid-template-columns:1fr; }
}

@media(max-width:480px) {
  .member-profile-visual__body { flex-wrap:wrap; }
  .profile-edit-button { width:100%; margin:8px 0 0; }
  .community-rail-nav { grid-template-columns:1fr; }
}

.member-account :is(h1,h2,h3),
.member-community :is(h1,h2,h3) {
  font-family:var(--cb-font-display) !important;
  font-style:normal !important;
}

/* Focused, responsive inbox: preserve the existing guarded forms and messages. */
body.community-screen #account[hidden],
.focused-inbox [hidden] { display:none !important; }
.member-community .community-sign-out {
  display:inline-flex; width:auto; min-height:44px; margin:4px 20px 12px;
  padding:8px 0; background:transparent; border:0; border-radius:0;
  color:var(--hub-muted); font-size:14px; font-weight:600; box-shadow:none;
}
.member-community .community-sign-out:hover { color:var(--hub-navy); text-decoration:underline; }
.community-session-notice { padding:12px 16px; border:1px solid var(--hub-line); border-radius:12px; }
.member-community [data-community-pane="messages"] { padding:24px; min-height:0; }
.member-community [data-community-pane="messages"] .community-pane__header { padding-bottom:18px; }
.member-community [data-community-pane="messages"] .community-pane__header h1 { font-size:32px; }
.member-community .focused-inbox { padding:0; overflow:hidden; box-shadow:none; }
.focused-inbox > .eyebrow, .focused-inbox > h2 { display:none; }
.inbox-layout { display:grid; grid-template-columns:minmax(180px,30%) minmax(0,1fr); }
.inbox-conversations { padding:16px; background:var(--hub-pale); border-right:1px solid var(--hub-line); }
.inbox-conversations button {
  width:100%; min-height:48px; margin:6px 0; padding:12px; text-align:left;
  border:1px solid transparent; border-radius:12px; background:transparent;
  color:var(--hub-navy); cursor:pointer; overflow-wrap:anywhere;
}
.inbox-conversations button[aria-pressed="true"] { background:#fff; border-color:var(--hub-blue); font-weight:750; }
.inbox-picker { display:block; font-size:14px; margin-bottom:12px; }
.inbox-picker select { width:100%; min-width:0; }
.inbox-thread { padding:20px; min-width:0; }
.member-community .inbox-thread-title { font-family:inherit !important; font-size:20px; margin:0 0 8px; overflow-wrap:anywhere; }
.inbox-safety-link { font-size:13px; }
.member-community .focused-inbox #message-list { display:block; margin:20px 0; }
.member-community .focused-inbox .inbox-message-thread {
  display:block; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;
}
.inbox-message-thread > strong { display:none; }
.member-community .inbox-message-thread p {
  max-width:65ch; padding:14px 16px; margin:0 0 12px; border-radius:14px;
  background:var(--hub-sky); color:var(--hub-ink); white-space:pre-wrap; overflow-wrap:anywhere;
  font-size:16px; line-height:1.6;
}
.member-community .focused-inbox #message-reply-form {
  display:grid; grid-template-columns:minmax(0,1fr); border-top:1px solid var(--hub-line);
  padding-top:16px; margin-top:16px; gap:12px;
}
.member-community .focused-inbox #message-reply-form textarea { min-height:100px; width:100%; resize:vertical; }
.member-community .focused-inbox #message-reply-form button { justify-self:end; min-height:44px; padding:10px 24px; }
.inbox-conversations button:focus-visible, .community-sign-out:focus-visible { outline:3px solid var(--hub-blue); outline-offset:3px; }
@media(max-width:700px) {
  .inbox-layout { grid-template-columns:minmax(0,1fr); }
  .inbox-conversations { border-right:0; border-bottom:1px solid var(--hub-line); }
  .inbox-conversations button { display:none; }
  .inbox-thread { padding:16px; }
  .member-community [data-community-pane="messages"] { padding:14px; }
  .community-rail-profile .member-profile-visual__banner { min-height:80px; }
}

/* Override the site's horizontal navigation defaults inside the inbox. */
.member-community nav.inbox-conversations {
  display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:6px;
}
.member-community nav.inbox-conversations > * { flex:none; width:100%; min-width:0; }
.member-community nav.inbox-conversations button { border-radius:12px; white-space:normal; }

/* Messenger-style identity and direction, without changing contact permissions. */
.chat-avatar {
  display:inline-grid; place-items:center; flex:0 0 40px; width:40px; height:40px;
  border-radius:50%; background:#dcefff; color:#103678; font:700 14px/1 system-ui,sans-serif;
  overflow:hidden;
}
.chat-avatar img { width:100%; height:100%; object-fit:cover; }
.chat-identity-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.chat-identity-name { font-weight:750; color:var(--hub-navy); }
.chat-identity-context { font-size:12px; font-weight:400; line-height:1.4; color:var(--hub-muted); overflow-wrap:anywhere; }
.member-community .inbox-thread-title,
.member-community nav.inbox-conversations button { display:flex; align-items:center; gap:10px; }
.member-community .inbox-thread-title { padding-bottom:12px; border-bottom:1px solid var(--hub-line); }
.member-community .inbox-message-thread .chat-message { display:flex; align-items:flex-end; gap:8px; margin:16px 0; }
.member-community .inbox-message-thread .chat-message--outgoing { flex-direction:row-reverse; }
.member-community .inbox-message-thread .chat-bubble {
  min-width:0; max-width:80%; padding:12px 14px; border-radius:16px 16px 16px 4px;
  background:#edf4fb; color:#17314d;
}
.member-community .inbox-message-thread .chat-message--outgoing .chat-bubble {
  background:#123e84; color:#fff; border-radius:16px 16px 4px 16px;
}
.member-community .inbox-message-thread .chat-bubble .chat-sender { display:block; font:700 12px/1.4 system-ui,sans-serif; color:inherit; }
.member-community .inbox-message-thread .chat-bubble p {
  padding:0; margin:6px 0; background:transparent; color:inherit; font-size:15px; line-height:1.55;
  white-space:pre-wrap; overflow-wrap:anywhere;
}
.chat-bubble time { display:block; font-size:11px; line-height:1.4; opacity:.85; }
@media(max-width:700px) {
  .member-community nav.inbox-conversations button { display:none; }
  .member-community .inbox-message-thread .chat-bubble { max-width:calc(100% - 40px); }
  .chat-message .chat-avatar { width:30px; height:30px; flex-basis:30px; font-size:11px; }
}

