:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #697571;
  --soft: #8b9491;
  --paper: #fffefb;
  --canvas: #f4f5f3;
  --line: rgba(24, 33, 31, 0.11);
  --green: #174d40;
  --green-2: #2f7563;
  --mint: #e2eee8;
  --gold: #bf8a34;
  --gold-soft: #f4ead7;
  --orange: #b8642c;
  --orange-soft: #f8e7d9;
  --red: #a8403d;
  --red-soft: #f7e3e1;
  --shadow: 0 22px 70px rgba(28, 38, 35, 0.09);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell { width: min(100%, 1120px); min-height: 100vh; margin: 0 auto; padding: 0 24px; }

.site-header {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 24px; line-height: 1.15; letter-spacing: 0; }
.brand small { display: block; margin-top: 7px; color: #657069; font-size: 15px; }
.brand-mark {
  width: 38px;
  height: 38px;
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 8px 22px rgba(24, 33, 31, 0.18);
}
.brand-mark span { position: absolute; width: 25px; height: 5px; border-radius: 999px; transform: rotate(-43deg); }
.brand-mark span:first-child { background: #7969ed; transform: translate(-4px, 4px) rotate(-43deg); }
.brand-mark span:last-child { background: #57d0cb; transform: translate(5px, -4px) rotate(-43deg); }

.app { min-height: calc(100vh - 154px); padding: 30px 0 70px; }

.portal-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 28px; align-items: stretch; }
.hero-card, .access-card, .content-card, .detail-card, .new-request-card, .loading-card {
  border: 1px solid rgba(24, 33, 31, 0.08);
  background: rgba(255, 254, 251, 0.94);
  box-shadow: var(--shadow);
}
.hero-card { min-height: 560px; padding: 52px; border-radius: 34px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.hero-card::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -120px;
  bottom: -140px;
  border-radius: 50%;
  border: 58px solid rgba(47, 117, 99, 0.09);
}
.eyebrow { margin: 0 0 16px; color: var(--green-2); font-size: 12px; font-weight: 780; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 650px; margin-bottom: 18px; font-size: clamp(42px, 7vw, 76px); line-height: 0.99; letter-spacing: -0.052em; }
.hero-copy { max-width: 610px; color: var(--muted); font-size: 18px; line-height: 1.62; }
.trust-row { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.trust-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 13px; font-weight: 680; }
.trust-pill::before { content: "✓"; font-weight: 900; }

.access-card { padding: 34px; border-radius: 30px; display: flex; flex-direction: column; justify-content: center; }
.access-card h2 { margin-bottom: 8px; font-size: 27px; letter-spacing: -0.025em; }
.access-card > p { color: var(--muted); line-height: 1.52; }
.form-stack { display: grid; gap: 15px; margin-top: 24px; }
label { color: #44504c; font-size: 13px; font-weight: 720; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #f7f7f3;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input { min-height: 52px; padding: 0 15px; }
textarea { min-height: 112px; padding: 14px 15px; resize: vertical; line-height: 1.5; }
select { min-height: 48px; padding: 0 42px 0 14px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input:focus, textarea:focus, select:focus { border-color: rgba(47, 117, 99, 0.52); background-color: var(--paper); box-shadow: 0 0 0 4px rgba(47, 117, 99, 0.1); }
.code-input { font-size: 28px; font-weight: 720; letter-spacing: 0.25em; text-align: center; }

.primary-button, .secondary-button, .quiet-button, .link-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 730;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}
.primary-button { min-height: 52px; padding: 0 22px; color: white; background: var(--green); box-shadow: 0 12px 28px rgba(23, 77, 64, 0.2); }
.secondary-button { min-height: 46px; padding: 0 18px; color: var(--green); background: var(--mint); }
.quiet-button { min-height: 40px; padding: 0 15px; color: var(--muted); background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.link-button { padding: 0; color: var(--green-2); background: transparent; }
button:hover, .action-link:hover { filter: brightness(.97); }
button:active, .action-link:active { transform: scale(.985); }
button:disabled { cursor: wait; opacity: .58; }
.fine-print { color: var(--soft); font-size: 12px; line-height: 1.5; }
.message { padding: 12px 14px; border-radius: 13px; font-size: 13px; line-height: 1.45; }
.message.error { color: var(--red); background: var(--red-soft); }
.message.success { color: var(--green); background: var(--mint); }

.dashboard-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.dashboard-head h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); }
.dashboard-head p { margin: 8px 0 0; color: var(--muted); }
.new-request-menu { position: relative; }
.new-request-menu summary { list-style: none; cursor: pointer; }
.new-request-menu summary::-webkit-details-marker { display: none; }
.new-request-popover { position: absolute; z-index: 5; right: 0; top: calc(100% + 10px); width: 260px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.new-request-popover a { display: block; padding: 13px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 670; }
.new-request-popover a:hover { background: #f3f4ef; }

.overview-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.overview-stat { position: relative; width: 100%; padding: 18px 42px 18px 20px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); text-align: left; background: rgba(255,255,255,.62); cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.overview-stat:hover { border-color: rgba(47,117,99,.28); background: rgba(255,255,255,.88); }
.overview-stat:focus-visible { outline: 3px solid rgba(47,117,99,.2); outline-offset: 2px; }
.overview-stat.is-selected { border-color: rgba(47,117,99,.38); background: var(--mint); box-shadow: 0 10px 24px rgba(23,77,64,.08); }
.overview-stat strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.overview-stat span { color: var(--muted); font-size: 12px; }
.overview-stat .stat-arrow { position: absolute; right: 18px; top: 50%; color: var(--green-2); font-size: 18px; font-weight: 750; transform: translateY(-50%); }

.content-card { border-radius: 28px; overflow: hidden; }
.content-card-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 26px 16px; }
.content-card-head h2 { margin: 0; font-size: 21px; }
.content-card-head span { color: var(--muted); font-size: 13px; }
.history-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 26px 18px; }
.history-search { min-width: 0; position: relative; }
.history-search input { min-height: 46px; padding-left: 43px; background: #f5f5f0; }
.search-icon { position: absolute; z-index: 1; left: 15px; top: 50%; transform: translateY(-53%); color: var(--soft); font-size: 23px; line-height: 1; pointer-events: none; }
.filter-button { min-height: 46px; padding: 0 17px; border: 1px solid var(--line); border-radius: 14px; color: var(--green); background: var(--paper); cursor: pointer; font-weight: 730; }
.filter-button.has-filters { border-color: rgba(47, 117, 99, .28); background: var(--mint); }
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 0 26px 18px; }
.active-filter-pill { padding: 7px 10px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 11px; font-weight: 720; }
.clear-filter-button { padding: 6px 8px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 720; }
.record-list { display: grid; }
.record-row { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: center; overflow: hidden; padding: 20px 26px; border: 0; border-top: 1px solid var(--line); color: inherit; text-align: left; background: transparent; cursor: pointer; }
.record-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: var(--mint); font-size: 18px; font-weight: 800; }
.record-main { min-width: 0; }
.record-title { display: -webkit-box; margin: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; font-weight: 720; line-height: 1.25; }
.record-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.record-team { color: var(--ink); font-weight: 680; }
.record-reference { color: var(--green-2); font-weight: 700; }
.record-side { min-width: max-content; display: grid; justify-items: end; gap: 7px; }
.record-amount { font-size: 14px; font-weight: 720; }
.status-pill { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; background: #edf0ee; color: var(--muted); white-space: nowrap; }
.status-pill.needsInfo { color: var(--orange); background: var(--orange-soft); }
.status-pill.paid, .status-pill.approved { color: var(--green); background: var(--mint); }
.status-pill.readyForPayment { color: #8a661e; background: var(--gold-soft); }
.status-pill.cancelled, .status-pill.declined { color: var(--red); background: var(--red-soft); }
.empty-state { padding: 54px 26px; text-align: center; }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { color: var(--muted); }
.compact-empty { padding-block: 42px; }

.filter-dialog { width: min(calc(100% - 32px), 640px); max-height: min(86vh, 760px); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 90px rgba(24, 33, 31, .24); }
.filter-dialog::backdrop { background: rgba(24, 33, 31, .38); backdrop-filter: blur(6px); }
.filter-form { display: grid; max-height: inherit; overflow: auto; }
.filter-dialog-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 26px 28px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 254, 251, .96); }
.filter-dialog-head .eyebrow { margin-bottom: 5px; }
.filter-dialog-head h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.dialog-close { width: 38px; height: 38px; border: 0; border-radius: 999px; color: var(--muted); background: #f0f1ed; cursor: pointer; font-size: 25px; line-height: 1; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 24px 28px; }
.filter-field { display: grid; gap: 7px; color: #44504c; font-size: 12px; font-weight: 720; }
.filter-field.full { grid-column: 1 / -1; }
.filter-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 18px 28px 24px; border-top: 1px solid var(--line); background: rgba(255, 254, 251, .97); }
.filter-actions .link-button { margin-right: auto; }

.detail-wrap { width: min(100%, 760px); margin: 0 auto; }
.back-button { margin-bottom: 18px; }
.detail-card { border-radius: 30px; overflow: hidden; }
.detail-hero { padding: 34px; border-bottom: 1px solid var(--line); background: linear-gradient(140deg, rgba(226,238,232,.8), rgba(255,254,251,.9)); }
.detail-hero h1 { margin: 16px 0 10px; font-size: clamp(32px, 6vw, 52px); }
.detail-hero p { margin: 0; color: var(--muted); }
.detail-body { padding: 28px 34px 34px; }
.detail-section + .detail-section { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.detail-section h2 { margin-bottom: 16px; font-size: 19px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-field { padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-field span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.detail-field strong { display: block; margin-top: 5px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.needs-info-card { padding: 20px; border-radius: 18px; background: var(--orange-soft); color: #6f3d1e; }
.needs-info-card strong { display: block; margin-bottom: 7px; }
.edit-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.response-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.loading-card { width: min(100%, 480px); margin: 80px auto; padding: 40px; border-radius: 26px; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; display: inline-block; border: 3px solid rgba(23,77,64,.16); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer { min-height: 64px; display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--soft); font-size: 12px; }
.site-footer a { color: inherit; }
.is-hidden { display: none !important; }

@media (max-width: 780px) {
  .page-shell { padding: 0 24px; }
  .site-header { min-height: 76px; }
  .app { padding-top: 16px; }
  .portal-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 390px; padding: 34px 28px; border-radius: 28px; }
  .hero-copy { font-size: 16px; }
  .access-card { padding: 28px 24px; }
  .dashboard-head { align-items: start; }
  .overview-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .overview-stat { padding: 15px 28px 15px 12px; }
  .overview-stat strong { font-size: 23px; }
  .overview-stat .stat-arrow { right: 10px; font-size: 15px; }
  .record-row { padding: 18px; gap: 12px; }
  .history-toolbar { padding-inline: 18px; }
  .active-filters { padding-inline: 18px; }
  .record-icon { width: 39px; height: 39px; }
  .detail-hero, .detail-body { padding: 26px 22px; }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .record-side { align-self: start; }
}

@media (max-width: 430px) {
  h1 { font-size: 44px; }
  .trust-row { gap: 7px; }
  .trust-pill { padding: 8px 10px; font-size: 11px; }
  .dashboard-head { display: grid; }
  .new-request-menu { justify-self: start; }
  .new-request-popover { left: 0; right: auto; }
  .record-row { grid-template-columns: auto minmax(0, 1fr); }
  .record-side { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; }
  .response-actions { display: grid; }
  .filter-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; }
  .filter-dialog .filter-form { height: 100%; max-height: 100%; }
  .filter-dialog-head { padding: 22px 20px 16px; }
  .filter-grid { grid-template-columns: 1fr; padding: 20px; }
  .filter-field.full { grid-column: auto; }
  .filter-actions { padding: 16px 20px max(18px, env(safe-area-inset-bottom)); }
}

.admin-entry {
  display: block;
  width: auto;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  opacity: .62;
}
.admin-entry:hover, .admin-entry:focus-visible { opacity: 1; }
.admin-login-wrap { min-height: min(680px, 70vh); display: grid; place-items: center; }
.admin-login-card { width: min(100%, 520px); }
.admin-dashboard-head { align-items: end; }
.admin-safe-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e4efe9;
  color: #275b4e;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}
.admin-directory-card { overflow: hidden; }
.admin-picker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.admin-picker-controls .field { width: min(100%, 480px); }
.admin-directory-options { flex-basis: 100%; display: grid; grid-template-columns: repeat(3, minmax(150px, 210px)) auto; align-items: end; gap: 10px; padding-top: 3px; }
.admin-directory-select { min-width: 0; display: grid; gap: 5px; }
.admin-directory-select > span { color: var(--muted); font-size: 10px; font-weight: 720; }
.admin-directory-select select { width: 100%; min-width: 0; min-height: 40px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background-color: #f8f8f4; font: inherit; font-size: 11px; }
.admin-reset-filters { min-height: 40px; justify-self: start; white-space: nowrap; }
.admin-directory-help { flex-basis: 100%; margin: -3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.admin-directory-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-filter-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}
.admin-filter-chip.is-selected { border-color: rgba(47,117,99,.3); color: var(--green); background: var(--mint); }
.admin-filter-chip[data-filter="possible"] { border-color: #e2d0aa; color: #725521; background: #fbf3e4; }
.admin-filter-chip[data-filter="possible"].is-selected { border-color: #cbaa68; background: #f6e7c9; }
.admin-directory-workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 620px; }
.admin-identity-directory { min-width: 0; border-right: 1px solid var(--line); background: #f8f8f4; }
.admin-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.admin-directory-head strong { font-size: 13px; }
.admin-directory-head span { color: var(--muted); font-size: 11px; }
.admin-identity-list { display: grid; max-height: 680px; overflow: auto; overscroll-behavior: contain; }
.admin-identity-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid rgba(24,33,31,.07);
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.admin-identity-row:hover { background: rgba(255,255,255,.75); }
.admin-identity-row.is-selected { background: var(--mint); box-shadow: inset 3px 0 var(--green-2); }
.admin-identity-main { min-width: 0; display: grid; gap: 3px; }
.admin-identity-main strong, .admin-identity-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity-main strong { font-size: 13px; }
.admin-identity-main span { color: var(--muted); font-size: 10px; }
.admin-identity-meta { display: grid; justify-items: end; gap: 1px; }
.admin-identity-meta strong { font-size: 13px; }
.admin-identity-meta span, .admin-identity-meta em { color: var(--muted); font-size: 9px; font-style: normal; white-space: nowrap; }
.admin-show-more { display: block; margin: 14px auto; }
.admin-directory-empty { padding: 26px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.admin-account-panel { min-width: 0; }
.admin-account-summary { padding: 25px 26px 22px; border-bottom: 1px solid var(--line); }
.admin-account-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.admin-account-heading .eyebrow { margin-bottom: 6px; }
.admin-account-heading h2 { margin-bottom: 7px; font-size: 28px; letter-spacing: -.035em; }
.admin-account-heading h2 ~ p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.admin-account-heading .admin-account-aliases { margin-top: 5px; color: var(--soft); font-size: 10px; }
.admin-account-actions { display: grid; justify-items: end; gap: 9px; flex: 0 0 auto; }
.admin-account-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 22px; }
.admin-summary-stat { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #f8f8f4; }
.admin-summary-stat strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 19px; letter-spacing: -.035em; white-space: nowrap; }
.admin-summary-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-name-review { display: grid; gap: 3px; margin-top: 14px; padding: 12px 14px; border-radius: 13px; color: #6f5629; background: #fbf3e4; }
.admin-name-review strong { font-size: 11px; }
.admin-name-review span { font-size: 10px; line-height: 1.45; }
.admin-duplicate-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  border-bottom: 1px solid #e5d5b7;
  background: #fbf3e4;
  color: #6f5629;
}
.admin-duplicate-panel > div:first-child { display: grid; gap: 3px; }
.admin-duplicate-panel strong { font-size: 12px; }
.admin-duplicate-panel span { font-size: 11px; }
.admin-duplicate-candidates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-duplicate-candidates .quiet-button { min-height: 34px; font-size: 10px; }
.admin-record-list .record-row:first-child { border-top: 0; }
.admin-merge-dialog { width: min(calc(100% - 32px), 720px); }
.admin-merge-body { display: grid; gap: 15px; padding: 22px 28px; }
.admin-merge-body > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.admin-merge-suggestion { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(47,117,99,.28); border-radius: 18px; background: var(--mint); }
.admin-merge-suggestion-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.admin-merge-suggestion-head > div { display: grid; gap: 3px; }
.admin-merge-suggestion-head strong { font-size: 12px; }
.admin-merge-suggestion-head span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.admin-suggestion-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--green) !important; background: rgba(255,255,255,.72); font-weight: 750; }
.admin-merge-suggestion .admin-merge-candidate { border: 1px solid rgba(47,117,99,.2); border-radius: 14px; }
.admin-merge-list-label { margin: -3px 2px -6px !important; color: var(--ink) !important; font-size: 11px !important; font-weight: 750; }
.admin-merge-candidates { display: grid; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
.admin-merge-empty { margin: 0; padding: 20px 16px; color: var(--muted); font-size: 11px; text-align: center; }
.admin-merge-candidate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: var(--paper);
  cursor: pointer;
}
.admin-merge-candidate:last-child { border-bottom: 0; }
.admin-merge-candidate:hover, .admin-merge-candidate.is-selected { background: var(--mint); }
.admin-merge-candidate.is-base { border: 1px solid var(--line); border-radius: 16px; cursor: default; background: #f8f8f4; }
.admin-merge-candidate > span { min-width: 0; display: grid; gap: 3px; }
.admin-merge-candidate strong, .admin-merge-candidate span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-merge-candidate strong { font-size: 13px; }
.admin-merge-candidate span span { color: var(--muted); font-size: 10px; }
.admin-merge-candidate em { color: var(--green-2); font-size: 10px; font-style: normal; font-weight: 720; white-space: nowrap; }
.admin-merge-confirmation { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; color: var(--green); background: var(--mint); }
.admin-merge-confirmation strong { font-size: 13px; }
.admin-merge-confirmation span { font-size: 11px; line-height: 1.45; }
.admin-preview-notice {
  display: grid;
  gap: 5px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid #b8d2c7;
  border-radius: 14px;
  background: #edf6f1;
  color: #275b4e;
}
.admin-preview-notice span { font-size: 13px; line-height: 1.5; }
.loading-inline { padding: 28px 24px; color: var(--muted); }
.source-link { display: inline-flex; width: auto; margin-top: 18px; }

@media (max-width: 980px) {
  .admin-picker-controls { display: grid; }
  .admin-directory-filters { justify-content: flex-start; }
  .admin-directory-workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .admin-account-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .admin-picker-controls { display: grid; padding: 20px; }
  .admin-directory-filters { justify-content: flex-start; }
  .admin-directory-options { grid-template-columns: 1fr 1fr; }
  .admin-directory-options .admin-directory-select:nth-child(3) { grid-column: 1 / -1; }
  .admin-directory-workspace { grid-template-columns: 1fr; }
  .admin-identity-directory { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-identity-list { max-height: 310px; }
  .admin-account-stats { grid-template-columns: 1fr 1fr; }
  .admin-account-heading { display: grid; }
  .admin-account-actions { justify-items: start; }
  .admin-duplicate-panel { display: grid; }
  .admin-duplicate-candidates { justify-content: flex-start; }
  .admin-dashboard-head { align-items: start; }
}

@media (max-width: 430px) {
  .admin-directory-options { grid-template-columns: 1fr; }
  .admin-directory-options .admin-directory-select:nth-child(3) { grid-column: auto; }
}

/* Match the public entry pages without changing the authenticated workspace. */
.portal-grid { width: min(100%, 480px); margin: 16px auto 0; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.portal-grid * { letter-spacing: 0; }
.portal-grid .hero-card { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.portal-grid .hero-card::after { display: none; }
.portal-grid h1 { font-size: 28px; line-height: 1.2; margin-bottom: 12px; }
.portal-grid .hero-copy { font-size: 14px; line-height: 1.6; margin: 0; }
.portal-grid .access-card { padding: 28px; border: 1px solid #dce0dc; border-radius: 6px; background: #fff; box-shadow: 0 3px 8px #19231b04; }
.portal-grid .access-card h2 { font-size: 21px; line-height: 1.3; }
.portal-grid .access-card > p:not(.eyebrow) { font-size: 14px; }
.portal-grid .eyebrow { font-size: 11px; font-weight: 600; color: #526c57; margin-bottom: 12px; }
.portal-grid input { min-height: 44px; border-radius: 4px; background: #fff; }
.portal-grid .field { display: grid; gap: 8px; }
.portal-grid .primary-button { min-height: 44px; border-radius: 4px; font-size: 13px; background: #253c32; box-shadow: none; }
.portal-grid .message { border-radius: 4px; }
.portal-grid .fine-print { margin-bottom: 0; }
.portal-grid .code-input { font-size: 24px; }
@media (max-width: 520px) {
  .portal-grid { margin-top: 0; }
  .portal-grid .access-card { padding: 22px; }
}
