/* ==========================================================================
   Mediator Directory — Frontend Styles
   ========================================================================== */

:root {
  --md-primary:       #1a5276;
  --md-primary-hover: #154360;
  --md-accent:        #2e86c1;
  --md-accent-light:  #d6eaf8;
  --md-success:       #1e8449;
  --md-error:         #c0392b;
  --md-gray-50:       #f9fafb;
  --md-gray-100:      #f3f4f6;
  --md-gray-200:      #e5e7eb;
  --md-gray-400:      #9ca3af;
  --md-gray-600:      #4b5563;
  --md-gray-800:      #1f2937;
  --md-radius:        8px;
  --md-radius-lg:     12px;
  --md-shadow:        0 2px 8px rgba(0,0,0,.08);
  --md-shadow-hover:  0 6px 20px rgba(0,0,0,.14);
  --md-font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.screen-reader-text {
  position:absolute; width:1px; height:1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;
}

/* ==========================================================================
   DIRECTORY — filter bar
   ========================================================================== */
.md-directory { font-family: var(--md-font); color: var(--md-gray-800); max-width: 1300px; width: 100%; margin: 0 auto; box-sizing: border-box; }

.md-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--md-gray-50);
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.md-filter-bar__search {
  position: relative;
  flex: 1 1 260px;
}
.md-filter-bar__search input[type="search"] {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius);
  font-size: 15px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}
.md-filter-bar__search input:focus { border-color: var(--md-accent); box-shadow: 0 0 0 3px var(--md-accent-light); }

.md-search-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--md-gray-400);
  padding: 0; display: flex; align-items: center;
}
.md-search-btn:hover { color: var(--md-primary); }

.md-filter-bar__filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.md-filter-bar__filters select {
  padding: 10px 14px;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius);
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  outline: none;
  min-width: 150px;
  flex: 1 1 150px;
  max-width: 220px;
}
.md-filter-bar__filters select:focus { border-color: var(--md-accent); box-shadow: 0 0 0 3px var(--md-accent-light); }

/* Results meta */
.md-results-meta {
  font-size: 14px; color: var(--md-gray-600); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* View toggle */
.md-view-toggle {
  display: inline-flex; border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius); overflow: hidden; background: #fff;
}
.md-view-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; font-weight: 500;
  background: #fff; color: var(--md-gray-600);
  border: none; cursor: pointer; line-height: 1;
}
.md-view-btn + .md-view-btn { border-left: 1px solid var(--md-gray-200); }
.md-view-btn svg { width: 16px; height: 16px; }
.md-view-btn:hover { background: var(--md-gray-100); }
.md-view-btn.is-active { background: var(--md-primary); color: #fff; }

/* ==========================================================================
   DIRECTORY — card grid
   ========================================================================== */
.md-grid {
  display: grid;
  /* Fixed max width per card (like the reference listing cards) so a card
     always looks like a normal card — same size whether there's 1 mediator
     or 20 — instead of either staying skinny (auto-fill) or stretching to
     fill the whole row when the results are sparse (1fr). */
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  gap: 24px;
}

.md-card {
  background: #fff;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius-lg);
  overflow: hidden;
  box-shadow: var(--md-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.md-card:hover { box-shadow: var(--md-shadow-hover); transform: translateY(-2px); }

.md-card__photo { position: relative; height: 180px; overflow: hidden; background: var(--md-gray-100); }
.md-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-card__no-photo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-accent) 100%);
  text-decoration: none;
}
.md-card__no-photo span {
  font-size: 56px; font-weight: 700; color: rgba(255,255,255,.9);
}

.md-card__body { padding: 18px; display: flex; flex-direction: column; flex: 1; }

.md-card__name { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.md-card__name a { color: var(--md-primary); text-decoration: none; }
.md-card__name a:hover { text-decoration: underline; }

.md-card__location { margin: 0 0 10px; font-size: 13px; color: var(--md-gray-600); }

.md-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.md-tag {
  display: inline-block;
  font-size: 12px;
  background: var(--md-accent-light);
  color: var(--md-primary);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 500;
}
a.md-tag--link:hover { background: var(--md-primary); color: #fff; text-decoration: none; }

.md-card__bio { font-size: 14px; color: var(--md-gray-600); line-height: 1.5; flex: 1; margin: 0 0 12px; }

.md-card__meta { display: flex; gap: 12px; font-size: 13px; color: var(--md-gray-600); margin-bottom: 16px; }
.md-card__meta span::before { content: ''; }

.md-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ==========================================================================
   DIRECTORY — "showcase" card style
   Opt-in via [mediator_directory style="showcase"]. Same markup, same search/
   filter behavior as the default cards — just a real-estate-listing look:
   a taller edge-to-edge photo, a bold name where a price would sit, and a
   pill-style outline button. Reordering is done with flex `order` only, so
   no PHP/markup changes were needed to support this as a second layout.
   ========================================================================== */
.md-directory--showcase .md-grid { gap: 40px 32px; }

.md-directory--showcase .md-card {
  background: transparent;
  border: none;
  border-radius: 6px;
  box-shadow: none;
}
.md-directory--showcase .md-card:hover { box-shadow: none; transform: none; }

.md-directory--showcase .md-card__photo { height: 260px; border-radius: 6px; }

.md-directory--showcase .md-card__body { padding: 18px 0 0; }

.md-directory--showcase .md-card__name { order: 1; font-size: 24px; font-weight: 700; color: var(--md-gray-800); margin: 0 0 6px; }
.md-directory--showcase .md-card__name a { color: var(--md-gray-800); }

.md-directory--showcase .md-card__meta { order: 2; margin: 0 0 8px; font-size: 15px; color: var(--md-gray-600); }

.md-directory--showcase .md-card__location { order: 3; font-size: 15px; color: var(--md-gray-600); margin: 0 0 18px; }

/* Reference cards are just photo / price / specs / address / one button —
   no tag chips, no description paragraph. Hide both to match. */
.md-directory--showcase .md-card__tags,
.md-directory--showcase .md-card__bio { display: none; }

/* Just one pill button, like the single "Contact Agent" button in the reference. */
.md-directory--showcase .md-card__actions .md-btn--primary { display: none; }

.md-directory--showcase .md-card__actions { order: 6; margin-top: 4px; gap: 10px; }
.md-directory--showcase .md-btn--outline,
.md-directory--showcase .md-btn--primary {
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1.5px solid var(--md-accent);
  background: transparent;
  color: var(--md-accent);
}
.md-directory--showcase .md-btn--primary { background: var(--md-primary); border-color: var(--md-primary); color: #fff; }
.md-directory--showcase .md-btn--outline:hover { background: var(--md-accent); color: #fff; }

/* ==========================================================================
   LIST VIEW (toggled via .md-view-list on #md-directory)
   A dense, aligned table so many mediators fit on screen at once.
   Card grid and list are both rendered; CSS shows one at a time.
   ========================================================================== */
.md-list { display: none; }
.md-directory.md-view-list .md-grid { display: none; }
.md-directory.md-view-list .md-list {
  display: block;
  border-top: 1px solid var(--md-gray-200);
}

.md-list-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 2fr) 150px 150px auto;
  align-items: center;
  column-gap: 32px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--md-gray-200);
  transition: background .12s ease;
}
.md-list-row:hover { background: var(--md-gray-50); }

.md-list-cell {
  font-size: 14px;
  color: var(--md-gray-600);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md-list-name { font-weight: 600; font-size: 15px; }
.md-list-name a { color: var(--md-primary); text-decoration: none; }
.md-list-name a:hover { text-decoration: underline; }
.md-list-action { text-align: right; overflow: visible; }
.md-list-action .md-btn { padding: 6px 14px; font-size: 13px; }

@media (max-width: 720px) {
  /* Stack the text cells, keep the action pinned right — still compact */
  .md-list-row {
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    row-gap: 2px;
    padding: 10px 12px;
  }
  .md-list-name,
  .md-list-location,
  .md-list-exp,
  .md-list-rate { grid-column: 1; white-space: normal; }
  .md-list-exp, .md-list-rate { font-size: 13px; }
  .md-list-action { grid-column: 2; grid-row: 1 / 5; align-self: center; }
}

/* ==========================================================================
   FEATURED MEDIATORS ([mediator_featured])
   Centered, card-less layout: circular photo, name, role, blurb, socials.
   ========================================================================== */
.md-featured { color: var(--md-gray-800); margin: 0 0 40px; }
.md-featured__head { text-align: center; margin-bottom: 40px; }
.md-featured__title { color: var(--md-primary); margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); }
.md-featured__subtitle { margin: 0; font-size: 16px; color: var(--md-gray-600); }

.md-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.md-feat-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.md-feat-photo {
  display: block; width: 150px; height: 150px;
  border-radius: 50%; overflow: hidden; margin-bottom: 20px;
  background: var(--md-gray-100);
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
}
.md-feat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-feat-photo--initials {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-accent) 100%);
}
.md-feat-photo--initials span { font-size: 54px; font-weight: 700; color: rgba(255,255,255,.9); }

.md-feat-name { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.md-feat-name a { color: var(--md-gray-800); text-decoration: none; }
.md-feat-name a:hover { color: var(--md-primary); }
.md-feat-location {
  margin: 0 0 14px; font-size: 14px; color: var(--md-gray-600);
}
.md-feat-info { margin: 0 0 18px; font-size: 15px; color: var(--md-gray-600); max-width: 280px; line-height: 1.5; }

.md-feat-social { display: flex; gap: 12px; justify-content: center; margin-top: auto; }
.md-feat-social__link {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; transition: transform .15s, opacity .15s;
}
.md-feat-social__link:hover { transform: translateY(-2px); opacity: .9; color: #fff; }
.md-feat-social__link.md-social--facebook  { background: #1877F2; }
.md-feat-social__link.md-social--linkedin  { background: #0A66C2; }
.md-feat-social__link.md-social--instagram { background: #E4405F; }
.md-feat-social__link.md-social--x          { background: #000000; }
.md-feat-social__link.md-social--youtube    { background: #FF0000; }

/* ==========================================================================
   ACCOUNTS (button, login, dashboard)
   ========================================================================== */
.md-account { position: relative; display: inline-block; font-family: var(--md-font); }
.md-account__toggle { cursor: pointer; }
.md-account__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 100;
  min-width: 180px; background: #fff;
  border: 1px solid var(--md-gray-200); border-radius: var(--md-radius);
  box-shadow: var(--md-shadow-hover); overflow: hidden;
}
.md-account__menu[hidden] { display: none; }
.md-account__menu a {
  display: block; padding: 11px 16px; font-size: 14px;
  color: var(--md-gray-800); text-decoration: none;
}
.md-account__menu a:hover { background: var(--md-gray-100); color: var(--md-primary); }

.md-account-note { font-family: var(--md-font); color: var(--md-gray-600); }
.md-account-note a { color: var(--md-primary); }

.md-login { max-width: 420px; margin: 0 auto; font-family: var(--md-font); }
.md-login__title { font-size: 26px; color: var(--md-primary); margin: 0 0 20px; text-align: center; }
.md-login-form {
  background: #fff; border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius-lg); padding: 28px;
}
.md-login-form .md-form-field { margin-bottom: 16px; }
.md-login-form .md-form-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--md-gray-800); }
.md-login-form input {
  width: 100%; padding: 10px 14px; box-sizing: border-box;
  border: 1px solid var(--md-gray-200); border-radius: var(--md-radius); font-size: 15px;
}
.md-login-form input:focus { border-color: var(--md-accent); box-shadow: 0 0 0 3px var(--md-accent-light); outline: none; }
.md-login-form .md-btn--large { width: 100%; }
#md-login-message { margin-top: 14px; padding: 12px 14px; border-radius: var(--md-radius); font-size: 14px; }
#md-login-message.md-error   { background: #f8d7da; color: #721c24; }
#md-login-message.md-success { background: #d4edda; color: #155724; }
.md-login__signup { text-align: center; margin-top: 20px; }
.md-login__signup p { margin: 0 0 10px; color: var(--md-gray-600); }

.md-dashboard { font-family: var(--md-font); }
.md-dashboard__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.md-dashboard__title { margin: 0; font-size: 26px; color: var(--md-primary); }

/* ==========================================================================
   PLANS & PAYMENTS (Flutterwave)
   ========================================================================== */
.md-plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-top: 10px;
}
.md-plan-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  border: 2px solid var(--md-gray-200); border-radius: var(--md-radius);
  padding: 16px 18px; cursor: pointer; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.md-plan-card:hover { border-color: var(--md-primary); }
.md-plan-card input[type="radio"] { position: absolute; top: 16px; right: 16px; }
.md-plan-card:has(input:checked) {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 1px var(--md-primary);
  background: var(--md-gray-50);
}
.md-plan-card__name { font-weight: 700; font-size: 16px; color: var(--md-gray-800); padding-right: 24px; }
.md-plan-card__price { font-size: 20px; font-weight: 700; color: var(--md-primary); }
.md-plan-card__desc { font-size: 13px; color: var(--md-gray-600); line-height: 1.4; }

.md-plan-grid--compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.md-plan-grid--compact .md-plan-card { padding: 10px 14px; }
.md-plan-grid--compact .md-plan-card__name { font-size: 14px; }
.md-plan-grid--compact .md-plan-card__price { font-size: 16px; }
.md-plan-card.is-current::after {
  content: 'Current'; position: absolute; top: -9px; left: 12px;
  background: var(--md-primary); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; letter-spacing: .03em; text-transform: uppercase;
}

.md-billing-panel {
  border: 1px solid var(--md-gray-200); border-radius: var(--md-radius);
  background: var(--md-gray-50); padding: 18px 20px; margin-bottom: 24px;
}
.md-billing-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.md-billing-plan { margin-left: 10px; font-size: 15px; color: var(--md-gray-800); }
.md-billing-renews { font-size: 13px; color: var(--md-gray-600); }
.md-billing-note { font-size: 14px; color: var(--md-gray-600); margin: 10px 0 0; }
.md-billing-badge {
  display: inline-block; padding: 3px 11px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.md-billing-badge--paid    { background: #eafaf1; color: #1e8449; }
.md-billing-badge--expired { background: #fdedec; color: #b03a2e; }
.md-billing-badge--unpaid  { background: #fef9e7; color: #b9770e; }
.md-plan-form { margin-top: 14px; }
.md-plan-form .md-btn { margin-top: 12px; }
#md-plan-message { margin-top: 12px; padding: 10px 14px; border-radius: var(--md-radius); font-size: 14px; }
#md-plan-message.md-error   { background: #f8d7da; color: #721c24; }
#md-plan-message.md-success { background: #d4edda; color: #155724; }

.md-payment-banner {
  border-radius: var(--md-radius); padding: 14px 18px; margin-bottom: 20px; font-size: 14px;
}
.md-payment-banner--success { background: #d4edda; color: #155724; }
.md-payment-banner--pending { background: #fef9e7; color: #7d6608; }
.md-payment-banner--error   { background: #f8d7da; color: #721c24; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.md-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px;
  border-radius: var(--md-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  line-height: 1;
}
.md-btn--primary { background: var(--md-primary); color: #fff; }
.md-btn--primary:hover { background: var(--md-primary-hover); color: #fff; text-decoration: none; }
.md-btn--outline { border-color: var(--md-primary); color: var(--md-primary); background: transparent; }
.md-btn--outline:hover { background: var(--md-primary); color: #fff; text-decoration: none; }
.md-btn--ghost { border-color: var(--md-gray-200); color: var(--md-gray-600); background: transparent; }
.md-btn--ghost:hover { background: var(--md-gray-100); text-decoration: none; }
.md-btn--large { padding: 13px 28px; font-size: 16px; }

.md-clear-filters { font-size: 13px; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.md-pagination { margin-top: 32px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.md-page {
  padding: 8px 14px;
  border-radius: var(--md-radius);
  border: 1px solid var(--md-gray-200);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: var(--md-gray-600);
  transition: background .15s;
}
.md-page:hover { background: var(--md-gray-100); }
.md-page--active { background: var(--md-primary); color: #fff; border-color: var(--md-primary); }

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */
.md-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6);
  z-index: 9999;
}
.md-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--md-gray-200);
  border-top-color: var(--md-primary);
  border-radius: 50%;
  animation: md-spin .7s linear infinite;
}
@keyframes md-spin { to { transform: rotate(360deg); } }

.md-no-results { text-align: center; padding: 48px 20px; color: var(--md-gray-600); font-size: 16px; }

/* ==========================================================================
   SINGLE PROFILE
   ========================================================================== */
.md-single-wrap { max-width: 900px; margin: 40px auto; padding: 0 20px; }
.md-archive-wrap { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.md-archive-header { text-align: center; margin-bottom: 32px; }
.md-archive-title { font-size: 32px; color: var(--md-primary); margin-bottom: 8px; }
.md-archive-description { font-size: 16px; color: var(--md-gray-600); max-width: 600px; margin: 0 auto; }

.md-profile { background: #fff; border-radius: var(--md-radius-lg); box-shadow: var(--md-shadow); overflow: hidden; }

.md-profile__hero {
  display: flex; flex-wrap: wrap; gap: 32px;
  padding: 40px;
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-accent) 100%);
  color: #fff;
}
.md-profile__photo { flex-shrink: 0; }
.md-profile__photo img {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.3);
}
.md-profile__initials {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 700; color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.15);
}
.md-profile__intro { flex: 1; }
.md-profile__name { margin: 0 0 8px; font-size: 30px; font-weight: 700; color: #fff; }
.md-profile__location { margin: 0 0 6px; opacity: .85; font-size: 15px; }
.md-profile__occupation { margin: 0 0 8px; font-size: 16px; font-weight: 500; opacity: .95; }
.md-profile__nationality { margin: 0 0 16px; opacity: .85; font-size: 15px; }

.md-profile__stats { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.md-stat { text-align: center; }
.md-stat strong { display: block; font-size: 20px; }
.md-stat span { font-size: 12px; opacity: .8; }

.md-profile__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.md-profile__tags .md-tag { background: rgba(255,255,255,.2); color: #fff; }
.md-profile__tags .md-tag:hover { background: rgba(255,255,255,.35); }

.md-profile__contact-bar { display: flex; flex-wrap: wrap; gap: 10px; }

/* Social icons on the profile hero */
.md-profile__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.md-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff; text-decoration: none;
  transition: background .15s, transform .15s;
}
.md-social:hover { background: rgba(255,255,255,.35); transform: translateY(-2px); color: #fff; }
.md-social svg { display: block; }
.md-profile__contact-bar .md-btn--primary { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); color: #fff; }
.md-profile__contact-bar .md-btn--primary:hover { background: rgba(255,255,255,.35); }
.md-profile__contact-bar .md-btn--outline { border-color: rgba(255,255,255,.5); color: #fff; }
.md-profile__contact-bar .md-btn--outline:hover { background: rgba(255,255,255,.15); }
.md-profile__contact-bar .md-btn--ghost { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.85); }

.md-profile__body { padding: 40px; }
.md-profile__section { margin-bottom: 32px; border-bottom: 1px solid var(--md-gray-100); padding-bottom: 32px; }
.md-profile__section:last-child { border-bottom: none; padding-bottom: 0; }
.md-profile__section h2 { font-size: 18px; color: var(--md-primary); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.md-profile__bio p { line-height: 1.7; color: var(--md-gray-600); }

.md-expertise-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.md-expertise-list li a { display: inline-block; background: var(--md-accent-light); color: var(--md-primary); padding: 6px 14px; border-radius: 20px; font-size: 14px; text-decoration: none; font-weight: 500; }
.md-expertise-list li a:hover { background: var(--md-primary); color: #fff; }

.md-profile__back { padding: 0 40px 40px; }

/* ==========================================================================
   REGISTRATION FORM
   ========================================================================== */
.md-register-wrap { max-width: 960px; width: 100%; margin: 0 auto; font-family: var(--md-font); box-sizing: border-box; }
.md-register-intro { text-align: center; margin-bottom: 32px; }
.md-register-intro h2 { font-size: 28px; color: var(--md-primary); }
.md-register-intro p { color: var(--md-gray-600); }
.md-register-signin { margin-top: 10px; font-size: 14px; }
.md-register-signin a { color: var(--md-primary); font-weight: 600; text-decoration: none; }
.md-register-signin a:hover { text-decoration: underline; }

.md-form-section {
  background: #fff;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.md-form-section__title {
  font-size: 17px; font-weight: 600; color: var(--md-primary);
  margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--md-accent-light);
}
.md-form-section--submit { border: none; background: none; padding: 0; text-align: center; }

.md-form-row { margin-bottom: 16px; }
.md-form-row--two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.md-form-field label { display: block; font-size: 14px; font-weight: 500; color: var(--md-gray-800); margin-bottom: 6px; }
.md-form-field input[type="text"],
.md-form-field input[type="email"],
.md-form-field input[type="tel"],
.md-form-field input[type="url"],
.md-form-field input[type="number"],
.md-form-field select,
.md-form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius);
  font-size: 15px;
  color: var(--md-gray-800);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  background: #fff;
}
.md-form-field input:focus,
.md-form-field select:focus,
.md-form-field textarea:focus {
  border-color: var(--md-accent);
  box-shadow: 0 0 0 3px var(--md-accent-light);
}
.md-form-field textarea { resize: vertical; min-height: 100px; }

.md-input-prefix { display: flex; align-items: center; gap: 6px; }
.md-input-prefix span { font-weight: 600; color: var(--md-gray-600); }
.md-input-prefix input { flex: 1; }

.md-input-group { display: flex; align-items: center; gap: 8px; }
.md-input-group input,
.md-input-group select { padding: 10px 14px; border: 1px solid var(--md-gray-200); border-radius: var(--md-radius); font-size: 15px; box-sizing: border-box; }

.md-required { color: var(--md-error); }
.md-optional { color: var(--md-gray-400); font-size: 13px; font-weight: 400; }
.md-form-field input.md-field-error {
  border-color: var(--md-error);
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}

/* Declaration checkbox */
.md-declaration {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--md-gray-800); cursor: pointer;
  line-height: 1.5;
}
.md-declaration input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 1px;
  accent-color: var(--md-primary); cursor: pointer; flex-shrink: 0;
}
.md-form-hint { font-size: 13px; color: var(--md-gray-400); margin-top: 6px; margin-bottom: 0; }

/* Checkbox grid */
.md-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.md-checkbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--md-gray-200);
  border-radius: var(--md-radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 14px;
}
.md-checkbox-item:hover { border-color: var(--md-accent); background: var(--md-accent-light); }
.md-checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--md-primary); cursor: pointer; }
.md-checkbox-item input:checked + span { color: var(--md-primary); font-weight: 500; }

/* Photo upload */
.md-photo-upload { display: flex; align-items: center; gap: 24px; }
.md-photo-preview {
  width: 120px; height: 120px;
  border-radius: 50%; border: 2px dashed var(--md-gray-200);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--md-gray-50); flex-shrink: 0;
}
.md-photo-preview img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.md-photo-placeholder { font-size: 36px; }
.md-photo-controls label.md-btn { cursor: pointer; }

/* Focal-point / crop chooser */
.md-focal__stage { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 8px; }
.md-focal__imgwrap {
  position: relative;
  width: 280px; max-width: 100%;
  border-radius: var(--md-radius); overflow: hidden;
  cursor: crosshair; user-select: none; touch-action: none;
  border: 1px solid var(--md-gray-200); background: var(--md-gray-100);
}
.md-focal__imgwrap img { display: block; width: 100%; height: auto; pointer-events: none; }
.md-focal__marker {
  position: absolute; width: 28px; height: 28px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.4);
  background: rgba(46,134,193,.35); pointer-events: none;
}
.md-focal__previews { display: flex; gap: 18px; }
.md-focal__preview-item { text-align: center; font-size: 12px; color: var(--md-gray-600); }
.md-focal__preview-item span { display: block; margin-bottom: 6px; }
.md-focal__preview { overflow: hidden; border: 1px solid var(--md-gray-200); background: var(--md-gray-100); }
.md-focal__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-focal__preview--card { width: 140px; height: 84px; border-radius: var(--md-radius); }
.md-focal__preview--circle { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto; }

/* Messages */
#md-register-message {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--md-radius);
  font-size: 15px;
  font-weight: 500;
}
#md-register-message.md-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#md-register-message.md-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .md-form-row--two { grid-template-columns: 1fr; }
  .md-grid { grid-template-columns: 1fr; }
  .md-profile__hero { padding: 24px; gap: 20px; flex-direction: column; align-items: center; text-align: center; }
  .md-profile__body { padding: 24px; }
  .md-profile__back { padding: 0 24px 24px; }
}