/* ============================================================
   MyFinancials review tab — broker portal
   Brand: navy #12153D, gold #C9A84C
   ============================================================ */

/* ── Drawer tab strip (Details / My Financials) ── */
.ct-drawer-tabs {
  display: flex;
  gap: 0;
  background: #FAFAF8;
  border-bottom: 1px solid var(--br, #E8E5DA);
  padding: 0 16px;
  flex: none;
}
.ct-drawer-tab {
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--mu, #707070);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .12s, border-color .12s;
}
.ct-drawer-tab:hover {
  color: var(--navy, #12153D);
}
.ct-drawer-tab.active {
  color: var(--navy, #12153D);
  border-bottom-color: var(--gold, #C9A84C);
}
.ct-tab-icon { font-size: 14px; }

.ct-pane { display: block; }

/* ── MyFi pane shell ── */
#ct-myfi-pane { padding: 0; }
.myfi-loading {
  padding: 32px 20px;
  text-align: center;
  color: var(--mu, #707070);
  font-size: 13px;
}
.myfi-error {
  padding: 24px 20px;
  text-align: center;
  background: #FFF4E0;
  border: 1px solid #E8C268;
  border-radius: 8px;
  margin: 16px;
  color: #6B4F0E;
}
.myfi-error-icon { font-size: 28px; margin-bottom: 6px; }

/* ── Empty state ── */
.myfi-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--mu, #707070);
}
.myfi-empty-icon { font-size: 40px; margin-bottom: 12px; }
.myfi-empty h3 { color: var(--navy, #12153D); margin: 0 0 8px; }
.myfi-empty p  { font-size: 13px; max-width: 420px; margin: 0 auto 18px; line-height: 1.5; }
.myfi-empty-actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.myfi-empty-hint {
  font-size: 11px; color: var(--mu, #707070);
  background: #F5F3EC; padding: 10px 14px; border-radius: 6px;
  max-width: 420px; margin: 0 auto; text-align: left; line-height: 1.5;
}

/* ── Header (status + stats + actions) ── */
.myfi-head {
  padding: 16px 20px;
  background: linear-gradient(180deg, #FAFAF8 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--br, #E8E5DA);
}
.myfi-head-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.myfi-status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.myfi-status-green { background: #DCFCE7; color: #166534; }
.myfi-status-amber { background: #FEF3C7; color: #92400E; }
.myfi-status-grey  { background: #E5E7EB; color: #4B5563; }
.myfi-head-meta {
  font-size: 11.5px;
  color: var(--mu, #707070);
}
.myfi-emp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6B46C1, #14B8A6);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* Quick stats grid */
.myfi-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.myfi-stat {
  background: #fff;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 6px;
  padding: 8px 10px;
}
.myfi-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mu, #707070);
  margin-bottom: 2px;
}
.myfi-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy, #12153D);
}

.myfi-head-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* ── Sections ── */
.myfi-sections {
  padding: 12px 16px 24px;
}
.myfi-section {
  background: #fff;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.myfi-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #FAFAF8;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy, #12153D);
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.myfi-section-head:hover { background: #F5F3EC; }
.myfi-section-toggle {
  font-size: 11px;
  color: var(--mu, #707070);
  transition: transform .15s;
}
.myfi-section.collapsed .myfi-section-toggle {
  transform: rotate(-90deg);
}
.myfi-section.collapsed .myfi-section-body {
  display: none;
}
.myfi-section-body {
  padding: 14px 16px;
  font-size: 13px;
}

.myfi-subhead {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy, #12153D);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Key-value tables (Personal, Employment, ID extracts) ── */
.myfi-kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.myfi-kv-table th {
  text-align: left;
  font-weight: 500;
  color: var(--mu, #707070);
  padding: 6px 8px 6px 0;
  vertical-align: top;
  width: 35%;
  font-size: 12px;
}
.myfi-kv-table td {
  padding: 6px 0;
  vertical-align: top;
  color: var(--navy, #12153D);
}

/* ── Document rows + actions ── */
.myfi-doc-row {
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #FFFEFB;
}
.myfi-doc-row.is-unavailable {
  background: #FFFAEC;
  border-color: #E8C268;
}
.myfi-doc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.myfi-unavailable-banner {
  background: #FEF3C7;
  border-left: 3px solid #E8C268;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 6px 0 8px;
  font-size: 11.5px;
  color: #6B4F0E;
}

.btn-icon-sm {
  background: transparent;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.btn-icon-sm:hover {
  border-color: var(--gold, #C9A84C);
  color: var(--gold, #C9A84C);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--gold, #C9A84C);
  text-decoration: underline;
  font-size: 11.5px;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}

/* ── Income docs table ── */
.myfi-docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}
.myfi-docs-table th {
  text-align: left;
  font-weight: 600;
  color: var(--mu, #707070);
  padding: 6px 8px;
  border-bottom: 1px solid var(--br, #E8E5DA);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.myfi-docs-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #F0EEE7;
  vertical-align: top;
}
.myfi-docs-table tr.is-unavailable td {
  background: #FFFAEC;
  color: #6B4F0E;
}
.myfi-docs-table tr.myfi-doc-reason td {
  background: #FEF3C7;
  font-size: 11px;
  padding: 4px 12px;
}

.myfi-extracted {
  background: #F5F3EC;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 6px;
}
.myfi-extracted-pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--navy, #12153D);
}

/* ── Asset / liability tables ── */
.myfi-asset-group {
  margin-bottom: 12px;
}
.myfi-asset-group-head {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--br, #E8E5DA);
  font-size: 12px;
  color: var(--navy, #12153D);
  margin-bottom: 4px;
}
.myfi-asset-subtotal {
  color: var(--gold, #C9A84C);
  font-weight: 700;
}
.myfi-assets-table, .myfi-liab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.myfi-assets-table td, .myfi-liab-table td, .myfi-liab-table th {
  padding: 6px 8px 6px 0;
  vertical-align: top;
  border-bottom: 1px solid #F0EEE7;
}
.myfi-liab-table th {
  text-align: left;
  font-weight: 600;
  color: var(--mu, #707070);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.myfi-asset-meta {
  font-size: 11px;
  color: var(--mu, #707070);
  margin-top: 2px;
}
.myfi-asset-extra td {
  font-size: 11px;
  color: var(--mu, #707070);
  font-style: italic;
  padding: 2px 8px 6px;
  background: #FAFAF8;
}
.myfi-owner {
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--mu, #707070);
  text-align: right;
  width: 80px;
}
.myfi-amount {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  width: 110px;
}
.myfi-section-total {
  margin-top: 10px;
  padding: 8px 0;
  border-top: 2px solid var(--navy, #12153D);
  text-align: right;
  font-size: 13px;
}

.myfi-emp-source-chip {
  display: inline-block;
  background: linear-gradient(135deg, #6B46C1, #14B8A6);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  letter-spacing: .03em;
  margin-top: 4px;
}

/* ── Personal / employment cards ── */
.myfi-personal-card,
.myfi-employment-card {
  background: #FFFEFB;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.myfi-audit {
  font-size: 10.5px;
  color: var(--mu, #707070);
  margin-top: 6px;
  font-style: italic;
}

/* ── Generic badges ── */
.myfi-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.myfi-badge-green { background: #DCFCE7; color: #166534; }
.myfi-badge-amber { background: #FEF3C7; color: #92400E; }
.myfi-badge-red   { background: #FEE2E2; color: #991B1B; }
.myfi-badge-grey  { background: #E5E7EB; color: #4B5563; }

/* ── Misc ── */
.myfi-muted {
  color: var(--mu, #707070);
  font-size: 12.5px;
  font-style: italic;
}
.myfi-status-ok {
  color: #166534;
  font-weight: 600;
}

/* ── Card drawer "My Financials" link styling ── */
.wf-myfi-link {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(20, 184, 166, 0.12));
  border: 1px solid var(--gold, #C9A84C);
  color: var(--navy, #12153D);
  font-weight: 600;
  margin-left: 6px;
}
.wf-myfi-link:hover {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.22), rgba(20, 184, 166, 0.22));
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .myfi-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .myfi-head { padding: 12px 14px; }
  .myfi-sections { padding: 10px 12px 20px; }
  .myfi-section-body { padding: 12px 12px; }
  .myfi-docs-table { font-size: 11px; }
  .ct-drawer-tab { padding: 10px 12px; font-size: 12.5px; }
}

/* ════════════════════════════════════════════════════════════════
   PHASE 2A — INLINE EDIT
   ════════════════════════════════════════════════════════════════ */

/* Editable row — pencil icon hidden until row hover */
.myfi-editable-row td {
  position: relative;
  padding-right: 28px; /* leave room for pencil */
}
.myfi-edit-pencil {
  position: absolute;
  right: 0;
  top: 4px;
  background: transparent;
  border: none;
  color: var(--mu, #707070);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity .12s, color .12s, background .12s;
  font-family: inherit;
}
.myfi-editable-row:hover .myfi-edit-pencil {
  opacity: 0.6;
}
.myfi-editable-row .myfi-edit-pencil:hover {
  opacity: 1;
  color: var(--gold, #C9A84C);
  background: rgba(201, 168, 76, 0.12);
}

/* Empty value display */
.myfi-empty-val {
  color: var(--mu, #707070);
  font-style: italic;
}

/* Sub-row (address line 1, 2, etc) styling */
.myfi-kv-sub th {
  font-size: 11px;
  color: var(--mu, #707070);
  font-weight: 400;
  padding-left: 12px;
}

/* Inline editor inputs */
.myfi-edit-input {
  width: 100%;
  max-width: 280px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1.5px solid var(--gold, #C9A84C);
  border-radius: 4px;
  background: #fff;
  color: var(--navy, #12153D);
  outline: none;
  box-sizing: border-box;
}
.myfi-edit-input:focus {
  border-color: var(--gold, #C9A84C);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.18);
}
select.myfi-edit-input {
  cursor: pointer;
}

/* Action row beneath input */
.myfi-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.myfi-edit-actions button {
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
  border: 1px solid var(--br, #E8E5DA);
}
.myfi-edit-actions .btn-navy {
  background: var(--navy, #12153D);
  color: #fff;
  border-color: var(--navy, #12153D);
}
.myfi-edit-actions .btn-navy:hover { background: #1c1f4d; }
.myfi-edit-actions .btn-navy:disabled { opacity: 0.6; cursor: wait; }
.myfi-edit-actions .btn-sm {
  background: #fff;
  color: var(--navy, #12153D);
}
.myfi-edit-actions .btn-sm:hover {
  border-color: var(--mu, #707070);
}

/* Note shown beneath input (e.g. monthly_expenses warning) */
.myfi-edit-note {
  margin-top: 6px;
  padding: 8px 10px;
  background: #FFF4E0;
  border-left: 3px solid #E8C268;
  border-radius: 4px;
  font-size: 11px;
  color: #6B4F0E;
  line-height: 1.4;
  max-width: 320px;
}

/* Toast — top right of viewport */
.myfi-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  background: var(--navy, #12153D);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.myfi-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.myfi-toast.is-ok {
  background: #166534;
}

/* ════════════════════════════════════════════════════════════════
   PHASE 2B — Row CRUD on Assets / Liabilities
   ════════════════════════════════════════════════════════════════ */

/* Section-level "Add asset / Add liability" button */
.myfi-section-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--br, #E8E5DA);
  display: flex;
  justify-content: flex-start;
}
.myfi-row-add {
  background: #fff;
  color: var(--navy, #12153D);
  border: 1.5px dashed var(--gold, #C9A84C);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-style .12s;
}
.myfi-row-add:hover {
  background: rgba(201, 168, 76, 0.10);
  border-style: solid;
}

/* Row card layout (replaces table rows for assets/liabilities) */
.myfi-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.myfi-row-card {
  background: #FFFEFB;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 6px;
  padding: 10px 12px;
  position: relative;
  transition: border-color .12s, box-shadow .12s;
}
.myfi-row-card:hover {
  border-color: var(--gold, #C9A84C);
  box-shadow: 0 1px 4px rgba(201, 168, 76, 0.10);
}

.myfi-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.myfi-row-summary { flex: 1; min-width: 0; }
.myfi-row-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--navy, #12153D);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.myfi-row-meta {
  font-size: 11.5px;
  color: var(--mu, #707070);
  margin-top: 1px;
}
.myfi-row-amount {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy, #12153D);
  flex: none;
}
.myfi-row-owner {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--mu, #707070);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.myfi-row-extra {
  font-size: 11.5px;
  color: var(--mu, #707070);
  font-style: italic;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #F0EEE7;
}

.myfi-row-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #F0EEE7;
  opacity: 0;
  transition: opacity .12s;
}
.myfi-row-card:hover .myfi-row-actions {
  opacity: 1;
}
@media (max-width: 600px) {
  /* On mobile show actions always — hover doesn't trigger on touch */
  .myfi-row-actions { opacity: 1; }
}
.myfi-row-delete {
  color: #B91C1C;
  border-color: #FCA5A5;
}
.myfi-row-delete:hover {
  background: #FEE2E2;
  border-color: #B91C1C;
  color: #991B1B;
}

/* Inline-clickable cells (description, balance, etc on rows) */
.myfi-cell-editable {
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: border-color .12s, background .12s;
  padding: 1px 3px;
  border-radius: 3px;
  margin: -1px -3px;
}
.myfi-cell-editable:hover {
  background: rgba(201, 168, 76, 0.12);
  border-bottom-color: var(--gold, #C9A84C);
}

/* Cell-edit popover */
.myfi-cell-pop {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1.5px solid var(--gold, #C9A84C);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 10px 12px;
  min-width: 200px;
  max-width: 320px;
}
.myfi-cell-pop-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mu, #707070);
  font-weight: 700;
  margin-bottom: 4px;
}

/* Row modal — full-screen dim + centred panel */
.myfi-row-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 21, 61, 0.6);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: myfi-modal-in 0.15s ease-out;
}
@keyframes myfi-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.myfi-row-modal {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.32);
  overflow: hidden;
}
.myfi-row-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--br, #E8E5DA);
  flex: none;
}
.myfi-row-modal-head h2 {
  margin: 0;
  font-size: 16px;
  color: var(--navy, #12153D);
  text-transform: capitalize;
}
.myfi-row-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--mu, #707070);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-family: inherit;
}
.myfi-row-modal-close:hover { color: var(--navy, #12153D); }

.myfi-row-modal-body {
  padding: 14px 18px 4px;
  overflow-y: auto;
  flex: 1;
}
.myfi-modal-field {
  margin-bottom: 12px;
}
.myfi-modal-field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mu, #707070);
  font-weight: 600;
  margin-bottom: 4px;
}
.myfi-req { color: #B91C1C; }
.myfi-modal-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1.5px solid var(--br, #E8E5DA);
  border-radius: 4px;
  background: #fff;
  color: var(--navy, #12153D);
  outline: none;
  box-sizing: border-box;
}
.myfi-modal-input:focus {
  border-color: var(--gold, #C9A84C);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.18);
}

.myfi-row-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--br, #E8E5DA);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
}
.myfi-row-modal-foot .btn-navy {
  background: var(--navy, #12153D);
  color: #fff;
  border: 1px solid var(--navy, #12153D);
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.myfi-row-modal-foot .btn-navy:hover { background: #1c1f4d; }
.myfi-row-modal-foot .btn-navy:disabled { opacity: 0.6; cursor: wait; }
.myfi-row-modal-foot .btn-sm {
  background: #fff;
  border: 1px solid var(--br, #E8E5DA);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ════════════════════════════════════════════════════════════════
   PHASE B.5 — JOINT HOUSEHOLD SUPPORT
   ════════════════════════════════════════════════════════════════ */

/* Member count chip in header strip */
.myfi-member-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 12px;
  background: #E5E7EB;
  color: #4B5563;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.myfi-member-chip.is-joint {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.20), rgba(20, 184, 166, 0.20));
  color: var(--navy, #12153D);
  border: 1px solid var(--gold, #C9A84C);
}

/* Member tab strip — sits between header and sections */
.myfi-member-strip {
  background: #FAFAF8;
  border-bottom: 1px solid var(--br, #E8E5DA);
  padding: 12px 20px 14px;
}
.myfi-member-strip-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mu, #707070);
  font-weight: 700;
  margin-bottom: 8px;
}
.myfi-member-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.myfi-member-tab {
  background: #fff;
  border: 1.5px solid var(--br, #E8E5DA);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: border-color .12s, background .12s, transform .08s;
  min-width: 110px;
}
.myfi-member-tab:hover {
  border-color: var(--gold, #C9A84C);
}
.myfi-member-tab.is-active {
  border-color: var(--gold, #C9A84C);
  background: rgba(201, 168, 76, 0.10);
  box-shadow: 0 1px 4px rgba(201, 168, 76, 0.15);
}
.myfi-member-tab-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy, #12153D);
  line-height: 1.1;
}
.myfi-member-tab-role {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mu, #707070);
  font-weight: 600;
}
.myfi-member-progress {
  display: inline-flex;
  gap: 3px;
  margin-top: 4px;
}
.myfi-member-dot {
  font-size: 10px;
  line-height: 1;
}
.myfi-member-dot.is-ok      { color: #16a34a; }
.myfi-member-dot.is-pending { color: #d1d5db; }
.myfi-member-strip-hint {
  font-size: 11px;
  color: var(--mu, #707070);
  margin-top: 8px;
  font-style: italic;
}

/* Members card (bottom of MyFi pane) */
.myfi-member-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 6px;
  margin-bottom: 6px;
  background: #FFFEFB;
}
.myfi-member-card-row.is-removed {
  opacity: 0.65;
  background: #F5F3EC;
}
.myfi-member-card-info { flex: 1; min-width: 0; }
.myfi-member-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--navy, #12153D);
}
.myfi-member-card-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mu, #707070);
  font-weight: 700;
}
.myfi-member-card-meta {
  font-size: 11.5px;
  color: var(--mu, #707070);
  margin-top: 2px;
}
.myfi-member-card-actions { flex: none; }

/* Mobile */
@media (max-width: 600px) {
  .myfi-member-strip { padding: 10px 14px 12px; }
  .myfi-member-tab { min-width: 100px; padding: 7px 10px; }
  .myfi-member-card-row { flex-wrap: wrap; }
}

/* ════════════════════════════════════════════════════════════════
   EXTRACTED DATA — pretty per-doc kv tables
   ════════════════════════════════════════════════════════════════ */
.myfi-extracted-kv {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  background: #FFFEFB;
  border: 1px solid var(--br, #E8E5DA);
  border-radius: 4px;
  overflow: hidden;
}
.myfi-extracted-kv tr {
  border-bottom: 1px solid #F0EEE7;
}
.myfi-extracted-kv tr:last-child {
  border-bottom: none;
}
.myfi-extracted-kv th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--mu, #707070);
  padding: 6px 10px;
  width: 40%;
  vertical-align: top;
  background: #FAFAF6;
  border-right: 1px solid #F0EEE7;
}
.myfi-extracted-kv td {
  font-size: 12.5px;
  color: var(--navy, #12153D);
  padding: 6px 10px;
  vertical-align: top;
  font-weight: 500;
}

/* ── Verify income button (per-member) ─────────────────────── */
.myfi-verify-income-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.myfi-verify-income-btn {
  background: linear-gradient(135deg, var(--gold, #C9A84C), #d4b870);
  color: var(--navy, #12153D);
  border: 1.5px solid var(--gold, #C9A84C);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .12s, transform .08s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.myfi-verify-income-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.myfi-verify-income-btn:disabled {
  background: #E5E7EB;
  border-color: #D1D5DB;
  color: #9CA3AF;
  cursor: not-allowed;
}
