/* Client portal. Loaded after workspace.css; everything is scoped to body.client-app. */
.client-app {
  --bg: #f6f5f1;
  --surface: #fff;
  --surface-2: #faf9f6;
  --tint: #f1efe9;
  --border: #e6e3da;
  --border-strong: #d8d4c8;
  --ink: #0f1f2e;
  --muted: #5b6672;
  --navy: #0c2133;
  --navy-2: #13304a;
  --gold: #b08d4a;
  --gold-hover: #9c7b3d;
  --gold-ink: #7a5d24;
  --gold-soft: #f5eddc;
  --green: #2d7650;
  --green-soft: #e7f3ec;
  --amber: #8a6219;
  --amber-soft: #fbf0d9;
  --red: #a63d38;
  --red-soft: #fbe9e8;
  --blue: #2b4f7e;
  --blue-soft: #e8eff8;
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(15 31 46 / 0.04), 0 1px 1px rgb(15 31 46 / 0.02);
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}
.client-app h1,
.client-app h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.client-app h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.client-app small,
.client-app .muted {
  color: var(--muted);
}
.client-app .eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.client-app svg.icon {
  width: 20px;
  height: 20px;
}
.client-app a:focus-visible,
.client-app button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Layout */
.client-app .portal-layout {
  display: block;
  padding-left: 264px;
  min-height: 100dvh;
}
.client-app .portal-main {
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sidebar */
.client-app .client-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  height: 100dvh;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: var(--navy);
  color: #c9d3dc;
  overflow: hidden;
  overscroll-behavior: none;
  transform: none;
  z-index: 30;
}
.client-app .client-sidebar::before {
  content: '';
  position: absolute;
  inset: 38% 0 0;
  z-index: -2;
  background: url('/assets/mountains.webp') 57% bottom / cover no-repeat;
  opacity: 0.7;
}
.client-app .client-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    var(--navy) 0%,
    var(--navy) 40%,
    rgb(12 33 51 / 0.72) 58%,
    rgb(12 33 51 / 0.35) 74%,
    rgb(8 24 38 / 0.92) 100%
  );
}
.client-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 18px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  color: #fff;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(140deg, #c9a862, #9c7b3d);
  color: #fff;
  font: 600 22px/1 var(--serif);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text b {
  font: 500 21px/1.1 var(--serif);
  letter-spacing: 0.16em;
}
.brand-text small {
  margin-top: 3px;
  color: #93a3b3;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.client-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  margin: 14px 12px 4px;
  color: #7f91a3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.client-sidebar nav a,
.sidebar-foot > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 7px 12px;
  margin-bottom: 1px;
  border-radius: 9px;
  color: #c9d3dc;
  font-size: 14.5px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.client-sidebar nav a svg.icon,
.sidebar-foot > a svg.icon {
  width: 18px;
  height: 18px;
  color: #8fa1b2;
  transition: color 0.15s;
}
.client-sidebar nav a:hover,
.sidebar-foot > a:hover {
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}
.client-sidebar nav a:hover svg.icon,
.sidebar-foot > a:hover svg.icon {
  color: #dfe6ec;
}
.client-sidebar a.active {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}
.client-sidebar a.active svg.icon {
  color: #d6b574;
}
.client-sidebar a.active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d6b574;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 20px;
}
.help-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 12px;
  background: rgb(8 24 38 / 0.55);
  backdrop-filter: blur(6px);
  font-size: 14px;
  line-height: 1.45;
}
.help-icon {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: rgb(214 181 116 / 0.14);
  color: #d6b574;
}
.help-icon svg.icon {
  width: 18px;
  height: 18px;
}
.help-card p {
  color: #a9b7c4;
}
.help-card strong {
  display: block;
  color: #fff;
  font-weight: 600;
}
.help-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #d6b574;
  font-weight: 600;
}
.help-card a svg.icon {
  width: 15px;
  height: 15px;
}
.help-card a:hover {
  color: #e8cc93;
}

/* Top bar */
.client-app .portal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 32px;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.portal-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 380px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.portal-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgb(176 141 74 / 0.14);
  background: #fff;
}
.portal-search svg.icon {
  width: 17px;
  height: 17px;
}
.portal-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 14.5px;
}
.portal-search input::placeholder {
  color: #8a939c;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.client-app .icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.client-app .icon-button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.client-app .icon-button svg.icon {
  width: 18px;
  height: 18px;
}
.client-app .mobile-toggle {
  display: none;
}
.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  transition: background 0.15s;
}
.profile-chip:hover {
  background: var(--tint);
}
.client-app .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.profile-name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.profile-name b {
  max-width: 160px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-name small {
  font-size: 12.5px;
}

/* Buttons and links */
.client-app .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.client-app .btn:hover {
  background: var(--surface-2);
  border-color: #c3bdae;
}
.client-app .btn svg.icon {
  width: 17px;
  height: 17px;
}
.client-app .btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.client-app .btn.primary:hover {
  background: var(--navy-2);
}
.client-app .btn.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.client-app .btn.gold:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}
.client-app .btn.ghost {
  background: transparent;
  border-color: rgb(255 255 255 / 0.3);
  color: #fff;
}
.client-app .btn.ghost:hover {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.5);
}
.client-app .btn.compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.client-app .btn.danger {
  color: var(--red);
  border-color: #ebc9c6;
}
.client-app .text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.client-app .text-link svg.icon {
  width: 15px;
  height: 15px;
  transition: transform 0.15s;
}
.client-app .text-link:hover svg.icon {
  transform: translateX(2px);
}

/* Content area */
.client-app .portal-content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 32px 56px;
  flex: 1;
}
.client-app main.portal-content > * + * {
  margin-top: 24px;
}
.client-app .page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 8px;
}
.client-app .page-heading .eyebrow {
  margin-bottom: 8px;
}
.client-app .page-heading h1 {
  font-size: clamp(32px, 3.2vw, 42px);
  line-height: 1.1;
}
.client-app .page-heading p:not(.eyebrow) {
  max-width: 640px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}
.client-app .page-heading .actions:empty {
  display: none;
}
.client-app .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Cards and panels */
.client-app .card,
.client-app .panel,
.client-app .stat,
.client-app .metric-card {
  min-width: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.client-app .card,
.client-app .panel {
  padding: 24px;
}
.card-head,
.client-app .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 0;
}
.card-head h2,
.client-app .panel-header h2 {
  font-size: 23px;
  line-height: 1.2;
}
.card-head p,
.client-app .panel-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.card-head .text-link {
  margin-top: 4px;
}

/* Dashboard */
.client-app .portal-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  border-radius: 20px;
  background: var(--navy);
  color: #fff;
}
.client-app .portal-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/assets/office.webp') right 45% / cover no-repeat;
}
.client-app .portal-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #0c2133 28%,
    rgb(12 33 51 / 0.86) 50%,
    rgb(12 33 51 / 0.45) 78%,
    rgb(12 33 51 / 0.6)
  );
}
.banner-copy .eyebrow {
  color: #d6b574;
}
.client-app .portal-banner h1 {
  margin-top: 10px;
  color: #fff;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.05;
}
.banner-copy > p:not(.eyebrow) {
  margin-top: 10px;
  color: #c3cdd7;
  font-size: 17px;
}
.banner-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.banner-balance > span {
  color: #aebbc8;
  font-size: 14px;
  font-weight: 500;
}
.banner-balance strong {
  margin: 4px 0 18px;
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.banner-actions {
  display: flex;
  gap: 10px;
}
.callout {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid #ecdcb8;
  border-radius: 14px;
  background: var(--gold-soft);
}
.callout > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  color: var(--gold-ink);
  flex-shrink: 0;
}
.callout > div {
  flex: 1;
}
.callout b {
  font-weight: 600;
}
.callout p {
  color: #6b5a37;
  font-size: 14.5px;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.client-app .metric-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.client-app .metric-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.metric-icon svg.icon {
  width: 19px;
  height: 19px;
}
.metric-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.metric-card strong {
  margin: 2px 0 2px;
  overflow: hidden;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.metric-card small {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.dashboard-grid.wide {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: stretch;
}
.portfolio-chart {
  display: block;
  width: 100%;
  height: auto;
}
.portfolio-chart text {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}
.portfolio-chart .grid-line {
  stroke: #ece9e1;
  stroke-width: 1;
}
.portfolio-chart .chart-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.portfolio-chart .chart-dot {
  fill: #fff;
  stroke: var(--gold);
  stroke-width: 2.5;
}
.allocation-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 4px;
}
.donut {
  position: relative;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0 var(--share), var(--navy) var(--share) 100%);
}
.donut.donut-empty {
  background: var(--tint);
}
.donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}
.donut > div {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut strong {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.donut span {
  color: var(--muted);
  font-size: 13.5px;
}
.allocation-legend {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.allocation-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
}
.allocation-legend b {
  font-weight: 500;
}
.allocation-legend em {
  margin-left: auto;
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend-dot.gold {
  background: var(--gold);
}
.legend-dot.navy {
  background: var(--navy);
}
.case-row {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.case-row + .case-row {
  margin-top: 12px;
}
.case-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.case-id {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-row h3 {
  margin-top: 2px;
}
.case-row > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.case-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.case-meter .progress {
  flex: 1;
  margin: 0;
}
.case-meter b {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.activity-row,
.document-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.activity-row + .activity-row,
.document-row + .document-row {
  border-top: 1px solid var(--border);
}
.row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--ink);
  flex-shrink: 0;
}
.row-icon svg.icon {
  width: 18px;
  height: 18px;
}
.activity-row > div,
.document-row > div {
  flex: 1;
  min-width: 0;
}
.activity-row b,
.document-row b {
  display: block;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row b::first-letter {
  text-transform: uppercase;
}
.activity-row p,
.document-row p {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.card-action {
  margin-top: 16px;
}
.dashboard-grid.trio {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}
.dashboard-grid.trio > .card {
  display: flex;
  flex-direction: column;
}
.dashboard-grid.trio .portal-empty {
  flex: 1;
  justify-content: center;
  padding: 22px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
}
.dashboard-grid.trio .portal-empty > span {
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.dashboard-grid.trio .card-action {
  align-self: flex-start;
  margin-top: auto;
}
.dashboard-grid.trio .card > :nth-last-child(2) {
  margin-bottom: 16px;
}
.advisor-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgb(176 141 74 / 0.22), transparent 45%),
    linear-gradient(120deg, var(--navy), #163a57);
  color: #fff;
  box-shadow: var(--shadow);
}
.advisor-strip img {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: 2px solid #d6b574;
  border-radius: 50%;
  object-fit: cover;
}
.advisor-strip > div:not(.advisor-actions) {
  flex: 1;
  min-width: 0;
}
.client-app .advisor-strip .eyebrow {
  margin-bottom: 2px;
  color: #d6b574;
  font-size: 11.5px;
}
.client-app .advisor-strip h2 {
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
}
.advisor-strip p:not(.eyebrow) {
  margin-top: 4px;
  color: #b9c7d3;
  font-size: 14px;
}
.advisor-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 10px;
}
@media (max-width: 900px) {
  .advisor-strip {
    flex-wrap: wrap;
  }
  .advisor-strip > div:not(.advisor-actions) {
    flex-basis: calc(100% - 80px);
  }
}
.portal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px;
  text-align: center;
}
.portal-empty > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--muted);
}
.portal-empty b {
  font-size: 15.5px;
  font-weight: 600;
}
.portal-empty p {
  max-width: 320px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.portal-empty .btn {
  margin-top: 16px;
}

/* Shared components on inner pages */
.client-app .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.client-app .stat {
  padding: 20px;
}
.client-app .stat p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.client-app .stat strong {
  margin: 6px 0 2px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.client-app .stat small {
  font-size: 13.5px;
}
.client-app .stat.accent {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.client-app .stat.accent p,
.client-app .stat.accent small {
  color: #b4c1cd;
}
.client-app .grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.client-app .table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.client-app table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.client-app th {
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.client-app td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.client-app tbody tr {
  transition: background 0.12s;
}
.client-app tbody tr:hover {
  background: #fcfbf8;
}
.client-app td strong {
  font-weight: 600;
}
.client-app td small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}
.client-app .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  text-transform: capitalize;
  white-space: nowrap;
}
.client-app .badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.client-app .badge.verified,
.client-app .badge.approved,
.client-app .badge.paid,
.client-app .badge.resolved,
.client-app .badge.confirmed,
.client-app .badge.active {
  background: var(--green-soft);
  color: var(--green);
}
.client-app .badge.pending,
.client-app .badge.review,
.client-app .badge.investigating,
.client-app .badge.submitted,
.client-app .badge.requested {
  background: var(--amber-soft);
  color: var(--amber);
}
.client-app .badge.open,
.client-app .badge.in_progress {
  background: var(--blue-soft);
  color: var(--blue);
}
.client-app .badge.rejected,
.client-app .badge.cancelled,
.client-app .badge.suspended {
  background: var(--red-soft);
  color: var(--red);
}
.client-app .empty {
  padding: 36px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}
.client-app .empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}
.client-app .empty + .btn {
  margin-top: 16px;
}

/* Forms */
.client-app .field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}
.client-app .field label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.client-app .field input,
.client-app .field select,
.client-app .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.client-app .field textarea {
  min-height: 110px;
  line-height: 1.5;
}
.client-app .field input::placeholder,
.client-app .field textarea::placeholder {
  color: #959ca4;
}
.client-app .field input:focus-visible,
.client-app .field select:focus-visible,
.client-app .field textarea:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgb(176 141 74 / 0.15);
}
.client-app .field input:disabled {
  background: var(--surface-2);
  color: var(--muted);
}
.client-app .field input[type='file'] {
  padding: 8px;
  cursor: pointer;
}
.client-app .field input[type='file']::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--tint);
  color: var(--ink);
  font: 600 14px var(--sans);
  cursor: pointer;
}
.client-app .field small {
  font-size: 13px;
}
.client-app .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.client-app .form-note {
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.client-app form > .btn[type='submit'] {
  min-height: 44px;
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.client-app form > .btn[type='submit']:hover {
  background: var(--navy-2);
}
.client-app .feedback {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14.5px;
}
.client-app .check {
  font-size: 14.5px;
}

/* Detail lists, totals, progress */
.client-app .account-total {
  margin: 6px 0 12px;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.client-app .detail-list {
  display: grid;
  margin: 0 0 20px;
}
.client-app .detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.client-app .detail-list dt {
  color: var(--muted);
  font-size: 14.5px;
}
.client-app .detail-list dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}
.client-app .progress {
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--tint);
  overflow: hidden;
}
.client-app .progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a862, var(--gold));
}
.client-app .case-card {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.client-app .case-card + .case-card {
  margin-top: 12px;
}
.client-app .case-card .panel-header {
  align-items: center;
  margin-bottom: 0;
}
.client-app .case-card h3 {
  font-size: 16.5px;
}
.client-app .case-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
  white-space: pre-wrap;
}
.client-app .case-card small {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
}
.goal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.goal-top strong {
  color: var(--gold-ink);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Messages */
.client-app .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Floating chat */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}
.chat-widget > * {
  pointer-events: auto;
}
.chat-fab {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #1d4566, var(--navy));
  color: #fff;
  box-shadow:
    0 0 0 4px rgb(255 255 255 / 0.9),
    0 14px 30px -10px rgb(12 33 51 / 0.55);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
}
.client-app .chat-fab svg.icon {
  width: 26px;
  height: 26px;
}
.chat-open .chat-fab {
  background: linear-gradient(145deg, #c9a25e, var(--gold));
}
.chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font: 700 11.5px/1 var(--sans);
  animation: badge-pop 0.3s ease-out;
}
.chat-badge[hidden],
.chat-toast[hidden],
.chat-panel[hidden] {
  display: none;
}
@keyframes badge-pop {
  from {
    transform: scale(0.4);
  }
}
.chat-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: 0 18px 40px -16px rgb(12 33 51 / 0.4);
  cursor: pointer;
  animation: chat-rise 0.25s ease-out;
}
.chat-toast img {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.chat-toast b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}
.chat-toast-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  width: 400px;
  height: min(640px, calc(100dvh - 130px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 70px -24px rgb(12 33 51 / 0.45);
  transform-origin: bottom right;
  animation: chat-rise 0.22s ease-out;
}
@keyframes chat-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}
.chat-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  cursor: pointer;
}
.client-app .chat-close svg.icon {
  width: 18px;
  height: 18px;
}
.client-app .chat-panel .chat-log {
  padding: 16px 16px 12px;
}
.chat-panel .msg-group {
  max-width: 86%;
}
.client-app .chat-panel .composer {
  padding: 10px 12px 10px;
}
.chat-panel .composer-foot {
  padding: 0 10px;
}
.client-app .chat-panel .composer .send {
  width: 44px;
  padding: 0;
}
.chat-panel .chat-starters {
  margin-top: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .chat-panel,
  .chat-toast,
  .chat-badge {
    animation: none;
  }
}
@media (max-width: 600px) {
  .chat-widget {
    right: 16px;
    bottom: 16px;
  }
  .chat-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: min(86dvh, calc(100dvh - 48px));
    border-radius: 22px 22px 0 0;
    box-shadow:
      0 -10px 40px -10px rgb(12 33 51 / 0.35),
      0 0 0 100vmax rgb(7 19 31 / 0.4);
    transform-origin: bottom center;
  }
  .chat-open .chat-fab,
  .chat-open .chat-toast {
    display: none;
  }
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.chat-peer-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(140deg, #e3c88f, var(--gold) 55%, #8a6a2f);
}
.chat-peer-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
}
.chat-peer {
  flex: 1;
  min-width: 0;
}
.client-app .chat-peer h2 {
  overflow: hidden;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-peer p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.client-app .chat-peer svg.icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}
.chat-body {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}
.client-app .chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  max-height: none;
  padding: 24px max(28px, calc((100% - 760px) / 2)) 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  background: linear-gradient(180deg, #fbfaf7, #f6f4ef);
}
.client-app .chat-log:focus {
  outline: 0;
}
.client-app .chat-log:focus-visible {
  box-shadow: inset 0 0 0 2px rgb(176 141 74 / 0.3);
}
.chat-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 6px;
  color: #8a9199;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.client-app .chat-start svg.icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: var(--gold);
}
.chat-start a {
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-day {
  display: flex;
  justify-content: center;
  margin: 26px 0 6px;
  color: #8a9199;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.msg-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(78%, 580px);
  margin-top: 16px;
}
.msg-group:last-child .msg:last-of-type {
  animation: msg-in 0.24s ease-out;
}
.msg-group.mine {
  align-self: flex-end;
}
.msg-avatar {
  flex-shrink: 0;
  align-self: flex-end;
  width: 30px;
  height: 30px;
  margin-bottom: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff;
}
.msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.mine .msg-stack {
  align-items: flex-end;
}
.client-app .msg {
  max-width: 100%;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #ebe8e1;
  border-radius: 6px 18px 18px 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 31 46 / 0.03);
}
.client-app .theirs .msg:first-of-type {
  border-top-left-radius: 18px;
}
.client-app .mine .msg {
  border-color: transparent;
  border-radius: 18px 6px 6px 18px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px -4px rgb(12 33 51 / 0.4);
}
.client-app .mine .msg:first-of-type {
  border-top-right-radius: 18px;
}
.msg p {
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 3px 6px 0;
  color: #9aa1a8;
  font-size: 11.5px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.client-app .msg-meta svg.icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
  stroke-width: 2.5;
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.chat-empty {
  max-width: 480px;
  margin: auto;
  padding: 24px 8px;
  text-align: center;
}
.chat-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 1px #ecdcb8;
}
.client-app .chat-empty-icon svg.icon {
  width: 26px;
  height: 26px;
}
.client-app .chat-empty h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}
.chat-empty p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
}
.chat-starters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.chat-starter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 13.5px var(--sans);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chat-starter:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.client-app .chat-starter svg.icon {
  width: 16px;
  height: 16px;
  color: var(--gold-ink);
}
.chat-jump {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 13px var(--sans);
  box-shadow: 0 8px 20px -8px rgb(15 31 46 / 0.35);
  transform: translateX(-50%);
  cursor: pointer;
}
.chat-jump[hidden] {
  display: none;
}
.client-app .chat-jump svg.icon {
  width: 15px;
  height: 15px;
}
.chat-jump .jump-new,
.chat-jump.has-new .jump-latest {
  display: none;
}
.chat-jump.has-new .jump-new {
  display: inline;
}
.chat-jump.has-new {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.client-app .composer {
  margin: 0;
  padding: 14px max(22px, calc((100% - 800px) / 2)) 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.client-app .composer .feedback {
  margin-bottom: 10px;
}
.composer-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 5px 5px 5px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.composer-box:focus-within {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgb(176 141 74 / 0.14);
}
.composer textarea {
  flex: 1;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 200px;
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 15px/22px var(--sans);
  resize: none;
  overflow-y: hidden;
}
.composer textarea::placeholder {
  color: #8a939c;
}
.client-app .composer .send {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px 0 15px;
  border-radius: 999px;
}
.client-app .composer .send:disabled {
  opacity: 0.6;
  cursor: progress;
}
.composer-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 0 18px;
  color: #9aa1a8;
  font-size: 12px;
}
.composer-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.client-app .composer-note svg.icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: var(--gold);
}
.composer-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.composer-count.near {
  color: var(--amber);
  font-weight: 600;
}

/* Search, history, banners */
.search-results {
  display: grid;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 10px;
  transition: background 0.12s;
}
.search-result + .search-result {
  border-top: 1px solid var(--border);
}
.search-result:hover {
  background: var(--surface-2);
}
.search-result span {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}
.search-result svg.icon {
  color: var(--muted);
}
.client-app .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
.client-app .banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 32px;
  background: var(--gold-soft);
  border-bottom: 1px solid #ecdcb8;
  font-size: 14px;
}
.client-app .update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #d4e0ed;
  border-radius: 12px;
  background: var(--blue-soft);
  font-size: 14.5px;
}
.client-app main.portal-content > .update-banner[hidden] + * {
  margin-top: 0;
}
.client-app #notice {
  font-size: 14.5px;
}

/* Footer */
.portal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}
.portal-footer nav {
  display: flex;
  gap: 20px;
}
.portal-footer a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-height: 860px) {
  .client-sidebar nav a,
  .sidebar-foot > a {
    min-height: 34px;
    padding: 6px 12px;
  }
  .nav-label {
    margin: 10px 12px 2px;
  }
  .client-sidebar .brand {
    padding-bottom: 14px;
  }
  .sidebar-foot {
    padding-top: 12px;
  }
}
@media (max-height: 760px) {
  .help-card {
    display: none;
  }
}
@media (max-height: 640px) {
  .nav-label {
    display: none;
  }
}
@media (max-width: 1280px) {
  .dashboard-stats,
  .client-app .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-name {
    display: none;
  }
  .profile-chip {
    padding: 0;
  }
}
@media (max-width: 1100px) {
  .client-app .portal-layout {
    padding-left: 0;
  }
  .client-app .client-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    height: 100dvh;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease;
    z-index: 50;
  }
  .client-app.sidebar-open .client-sidebar {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 20px 0 50px rgb(7 19 31 / 0.3);
  }
  .client-app .scrim {
    display: none;
  }
  .client-app.sidebar-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(7 19 31 / 0.45);
  }
  .client-app .mobile-toggle {
    display: inline-grid;
  }
  .client-app .grid,
  .dashboard-grid,
  .dashboard-grid.wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .allocation-body {
    flex-direction: row;
    justify-content: center;
    gap: 40px;
  }
  .allocation-legend {
    max-width: 280px;
  }
}
@media (max-width: 760px) {
  .client-app .portal-topbar {
    gap: 10px;
    height: 60px;
    padding: 0 16px;
  }
  .client-app .topbar-cta {
    display: none;
  }
  .client-app .portal-content {
    padding: 20px 16px 40px;
  }
  .client-app main.portal-content > * + * {
    margin-top: 16px;
  }
  .client-app .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .client-app .portal-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 22px;
  }
  .banner-balance {
    align-items: flex-start;
    text-align: left;
  }
  .client-app .card,
  .client-app .panel {
    padding: 20px 18px;
  }
  .callout {
    flex-wrap: wrap;
  }
  .allocation-body {
    flex-direction: column;
    gap: 20px;
  }
  .client-app .form-row {
    grid-template-columns: 1fr;
  }
  .msg-avatar {
    width: 28px;
    height: 28px;
  }
  .client-app .banner {
    padding: 10px 16px;
  }
  .portal-footer {
    padding: 20px 16px;
  }
}
@media (max-width: 520px) {
  .client-app .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .client-app .metric-card {
    padding: 14px;
  }
  .dashboard-stats .metric-icon {
    display: none;
  }
  .metric-card strong {
    font-size: 19px;
  }
  .portal-search {
    max-width: none;
    padding: 0 10px;
  }
  .topbar-right {
    gap: 6px;
  }
  .client-app td {
    min-width: 120px;
  }
  .activity-row time {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .client-app *,
  .client-app *::before {
    transition: none !important;
    animation: none !important;
  }
}

/* Account pages: portfolio, money, verification, documents, cases, goals, appointments, reports */
.client-app {
  --series-in: #b9892f;
  --series-out: #3a6ea3;
}
.client-app .portfolio-chart .chart-line {
  stroke-width: 2;
}
.portfolio-chart .chart-area {
  fill: rgb(176 141 74 / 0.1);
}
.portfolio-chart .chart-cursor line {
  stroke: var(--border-strong);
  stroke-width: 1;
}
.portfolio-chart .chart-cursor circle {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 2;
}
.chart-wrap {
  position: relative;
}
.chart-hover {
  cursor: crosshair;
  touch-action: pan-y;
}
.chart-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--navy);
  color: #c9d3dc;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgb(7 19 31 / 0.5);
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
}
.chart-tip[hidden] {
  display: none;
}
.chart-tip b {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.client-app .chart-tip small {
  color: #aebbc8;
  font-size: 12px;
}

/* Figures */
.figure-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.figure-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.client-app .figure {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.figure-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.client-app .figure-icon svg.icon {
  width: 19px;
  height: 19px;
}
.figure.good .figure-icon {
  background: var(--green-soft);
  color: var(--green);
}
.figure.warn .figure-icon {
  background: var(--red-soft);
  color: var(--red);
}
.figure p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.figure strong {
  margin: 2px 0;
  overflow: hidden;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.figure small {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Navy value card */
.portfolio-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: stretch;
}
.value-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #c9d3dc;
}
.value-card::after {
  content: '';
  position: absolute;
  inset: auto -30% -55% auto;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(214 181 116 / 0.2), transparent 65%);
}
.client-app .value-card .eyebrow {
  color: #d6b574;
}
.value-total {
  margin: 6px 0 18px;
  color: #fff;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.value-card.compact .value-total {
  margin-bottom: 14px;
}
.split-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  background: #7e8fa1;
  overflow: hidden;
}
.split-bar span {
  border-right: 2px solid var(--navy);
  background: #d6b574;
}
.value-split {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}
.value-split > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 12px;
  align-items: center;
}
.value-split.single > div {
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
.value-split dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.client-app .value-split dt svg.icon {
  width: 15px;
  height: 15px;
  color: #d6b574;
}
.value-split dd {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.value-split small {
  grid-column: 1 / -1;
  padding-left: 18px;
  color: #8fa0b1;
  font-size: 13px;
}
.key {
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.key.gold {
  background: #d6b574;
}
.key.pale {
  background: #7e8fa1;
}
.key.in {
  background: var(--series-in);
}
.key.out {
  background: var(--series-out);
}
.value-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

/* Transactions */
.tx-month + .tx-month {
  margin-top: 22px;
}
.tx-month header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}
.client-app .tx-month h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tx-month header span {
  color: var(--muted);
  font-size: 13px;
}
.tx-month header b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tx-month header b.in {
  color: var(--green);
}
.tx-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tx {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
}
.tx + .tx {
  border-top: 1px solid #f0ede6;
}
.tx-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
}
.client-app .tx-icon svg.icon {
  width: 18px;
  height: 18px;
}
.tx-icon.in {
  background: var(--green-soft);
  color: var(--green);
}
.tx-icon.move {
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.tx-main {
  flex: 1;
  min-width: 0;
}
.tx-main b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.tx-main p {
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  text-align: right;
}
.tx-amount {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tx-amount.in {
  color: var(--green);
}
.tx-amount.move {
  color: var(--muted);
}
.tx-side time {
  color: var(--muted);
  font-size: 13px;
}

/* Responsive tables */
.client-app .rtable td {
  vertical-align: middle;
}
.client-app .rtable th.num,
.client-app .rtable td.num {
  text-align: right;
}
.client-app .rtable td.wide {
  min-width: 180px;
}
.client-app .rtable td.act {
  width: 1%;
  text-align: right;
}
.stamp {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.stamp b {
  font-weight: 500;
}
.client-app .stamp small {
  margin: 0;
  font-size: 12.5px;
}
.amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ref {
  display: block;
  font-weight: 500;
  overflow-wrap: break-word;
}
.client-app .badge.as-is {
  text-transform: none;
}
.client-app .ref-sub {
  margin-top: 4px;
  font-size: 12.5px;
}
.update {
  color: var(--muted);
  font-size: 14px;
}
.client-app tr.is-past td {
  background: var(--surface-2);
}
.client-app tr.is-past .topic,
.client-app tr.is-past .date-tile b {
  color: var(--muted);
}

/* Money in and out */
.money-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.money-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.money-card-head .figure-icon {
  margin: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.money-card-head h2 {
  font-size: 23px;
  line-height: 1.2;
}
.money-card-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}
.money-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.money-input:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgb(176 141 74 / 0.15);
}
.money-input span {
  padding: 0 4px 0 16px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
}
.client-app .field .money-input input {
  min-height: 56px;
  padding-left: 4px;
  border: 0;
  background: transparent;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}
.client-app .field .money-input input:focus-visible {
  box-shadow: none;
}
.field-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.client-app .field-foot b {
  color: var(--ink);
  font-weight: 600;
}
.fill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.form-row + .fill-chips,
.field + .fill-chips {
  margin: -8px 0 18px;
}
.chip {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 13px var(--sans);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chip:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.client-app form .submit-wide {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}
.client-app form > .submit-wide + .form-note {
  margin: 12px 0 0;
  text-align: center;
}
.money-side {
  display: grid;
  gap: 16px;
}
.how-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.how-steps li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
}
.how-steps li:last-child {
  padding-bottom: 0;
}
.how-steps li:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 13px;
  width: 2px;
  background: var(--border);
}
.how-steps li > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 700;
}
.how-steps b {
  font-size: 14.5px;
  font-weight: 600;
}
.how-steps p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sum-chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Verification */
.verify-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(120deg, #fff 40%, var(--gold-soft));
}
.verify-hero.verified {
  border-color: #cfe4d8;
  background: linear-gradient(120deg, #fff 40%, var(--green-soft));
}
.verify-hero.rejected {
  border-color: #efd2cf;
  background: linear-gradient(120deg, #fff 40%, var(--red-soft));
}
.verify-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 8px rgb(45 118 80 / 0.12);
}
.client-app .verify-mark svg.icon {
  width: 40px;
  height: 40px;
}
.verify-ring {
  position: relative;
  display: grid;
  place-content: center;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), #ecdcb8 0);
  text-align: center;
}
.verify-ring::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}
.verify-ring b,
.verify-ring small {
  position: relative;
}
.verify-ring b {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.client-app .verify-ring small {
  font-size: 11.5px;
}
.verify-copy {
  flex: 1;
  min-width: 0;
}
.verify-copy h2 {
  margin-top: 4px;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.15;
}
.verify-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}
.client-app .verify-copy .verify-note {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink);
  font-size: 14px;
}
.client-app .verify-note svg.icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--gold-ink);
}
.verify-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.verify-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.checklist {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.check-item > div {
  flex: 1;
  min-width: 0;
}
.check-item b {
  font-size: 15px;
  font-weight: 600;
}
.check-item b em {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}
.check-item p {
  color: var(--muted);
  font-size: 13.5px;
}
.client-app .check-item small {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.check-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--muted);
}
.client-app .check-mark svg.icon {
  width: 19px;
  height: 19px;
}
.check-item.done {
  background: #fbfdfb;
}
.check-item.done .check-mark {
  background: var(--green);
  color: #fff;
}
.client-app .check-item.done small {
  color: var(--green);
}
.check-item.wait .check-mark {
  background: var(--amber-soft);
  color: var(--amber);
}
.client-app .check-item.wait small {
  color: var(--amber);
}
.check-item.fix {
  border-color: #efd2cf;
}
.check-item.fix .check-mark {
  background: var(--red-soft);
  color: var(--red);
}
.client-app .check-item.fix small {
  color: var(--red);
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: center;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.dropzone:hover,
.dropzone.dragging,
.dropzone:focus-within {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-soft);
}
.client-app .dropzone input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: #fff;
  color: var(--gold-ink);
  box-shadow: 0 1px 2px rgb(15 31 46 / 0.08);
}
.dropzone.has-file .dropzone-icon {
  color: var(--green);
}
.dropzone-title {
  max-width: 100%;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropzone-title u {
  color: var(--gold-ink);
  text-underline-offset: 2px;
}
.client-app .dropzone-name {
  font-size: 13px;
}
.tip-list {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}
.tip-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.client-app .tip-list svg.icon {
  width: 15px;
  height: 15px;
  color: var(--green);
}

/* Documents */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--tint);
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: 600 13.5px var(--sans);
  cursor: pointer;
}
.seg button span {
  color: #8a939c;
  font-weight: 500;
}
.seg button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(15 31 46 / 0.1);
}
.doc-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.doc-name > span:last-child {
  min-width: 0;
}
.doc-name b {
  display: block;
  font-weight: 600;
  overflow-wrap: break-word;
}
.upload-inline {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: end;
}
.upload-inline .feedback {
  grid-column: 1 / -1;
}
.client-app .upload-inline .feedback {
  margin: 0;
}
.client-app .upload-inline .field {
  margin: 0;
}
.upload-inline .dropzone {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 6px 14px;
  text-align: left;
}
.upload-inline .dropzone-icon {
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 9px;
}
.client-app .upload-inline .dropzone-icon svg.icon {
  width: 16px;
  height: 16px;
}
.upload-inline .form-note {
  display: none;
}
.file-tile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 46px;
  border-radius: 8px 14px 8px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.file-tile.pdf {
  background: var(--red-soft);
  color: var(--red);
}
.file-tile.csv {
  background: var(--green-soft);
  color: var(--green);
}
.client-app .file-tile svg.icon {
  width: 18px;
  height: 18px;
}

/* Cases */
.case-list {
  display: grid;
  gap: 20px;
}
.case-panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.case-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.case-ref {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.case-panel h2 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.2;
}
.case-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.case-score strong {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.case-score span {
  color: var(--muted);
  font-size: 13px;
}
.case-panel > .progress {
  margin-top: 18px;
}
.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.stepper li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px;
  text-align: center;
}
.stepper li::before {
  content: '';
  position: absolute;
  top: 13px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--border);
}
.stepper li:first-child::before {
  display: none;
}
.stepper li.done::before,
.stepper li.current::before {
  background: var(--green);
}
.step-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: #fff;
}
.client-app .step-dot svg.icon {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.stepper li.done .step-dot {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.stepper li.current .step-dot {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgb(176 141 74 / 0.18);
}
.stepper li.current .step-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}
.stepper b {
  font-size: 14px;
  font-weight: 600;
}
.client-app .stepper small {
  font-size: 12.5px;
}
.stepper li.done small {
  color: var(--green);
}
.stepper li.current small {
  color: var(--gold-ink);
  font-weight: 600;
}
.case-update {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-2);
}
.case-update .row-icon {
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.case-update b {
  font-size: 14px;
  font-weight: 600;
}
.case-update p {
  color: var(--muted);
  font-size: 14.5px;
  white-space: pre-wrap;
}
.case-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.case-actions .spacer {
  flex: 1;
}
.closed-cases {
  margin: 0;
  padding: 0;
  list-style: none;
}
.closed-cases li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}
.closed-cases li + li {
  border-top: 1px solid var(--border);
}
.closed-cases .row-icon {
  background: var(--green-soft);
  color: var(--green);
}
.closed-cases li > div:not(.closed-meta) {
  flex: 1;
  min-width: 0;
}
.closed-cases b {
  font-weight: 600;
}
.closed-cases p {
  color: var(--muted);
  font-size: 14px;
}
.closed-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.client-app .closed-meta small {
  font-size: 12.5px;
}

/* Goals */
.goals-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.goals-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.goals-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 40px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #b4c1cd;
}
.client-app .goals-summary .eyebrow {
  color: #d6b574;
}
.goals-summary strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.goals-summary strong span {
  color: #8fa0b1;
  font-size: 18px;
  font-weight: 500;
}
.goals-summary > p {
  flex: 1 1 200px;
  font-size: 13.5px;
  text-align: right;
}
.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.goal-tile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.goal-ring {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--gold-soft) 0);
}
.goal-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}
.goal-ring span {
  position: relative;
  font-size: 18px;
  font-weight: 600;
}
.goal-tile.reached .goal-ring {
  background: var(--green);
}
.goal-tile.reached .goal-ring span {
  color: var(--green);
}
.client-app .goal-ring svg.icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.5;
}
.goal-copy {
  min-width: 0;
}
.client-app .goal-copy h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}
.goal-target {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.goal-target b {
  color: var(--ink);
  font-weight: 600;
}
.goal-left {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--gold-ink);
  font-size: 14px;
  font-weight: 600;
}
.goal-tile.reached .goal-left {
  color: var(--green);
}
.client-app .goal-left svg.icon {
  width: 16px;
  height: 16px;
}
.client-app .goal-copy small {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
}

/* Appointments */
.appt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: stretch;
}
.next-appt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--navy) url('/assets/office.webp') right 40% / cover no-repeat;
  color: #c9d3dc;
}
.next-appt::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, #0c2133 45%, rgb(12 33 51 / 0.82));
}
.client-app .next-appt .eyebrow {
  color: #d6b574;
}
.next-appt-body {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
}
.client-app .next-appt h2 {
  color: #fff;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.15;
}
.next-appt-body p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: 14.5px;
}
.client-app .next-appt-body p svg.icon {
  width: 16px;
  height: 16px;
  color: #d6b574;
}
.next-appt-note {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.07);
  font-size: 14px;
}
.client-app .next-appt-note svg.icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: #d6b574;
}
.next-appt .btn.ghost {
  margin-top: auto;
}
.next-appt-empty {
  margin: auto 0;
  padding: 24px 0;
}
.client-app .next-appt-empty svg.icon {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #d6b574;
}
.next-appt-empty p {
  margin-top: 6px;
}
.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 54px;
  padding: 6px 0 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  line-height: 1.1;
}
.date-tile small {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.date-tile b {
  font-size: 22px;
  font-weight: 600;
}
.date-tile em {
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
}
.date-tile.big {
  width: 82px;
  padding: 10px 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.6);
}
.date-tile.big b {
  font-size: 36px;
}
.date-tile.big small {
  font-size: 12px;
}
.appt-date {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-app .appt-date > small {
  font-size: 12.5px;
}
.topic {
  font-weight: 600;
}

/* Reports */
.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13.5px;
}
.flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flow-legend b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.flow-chart {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}
.flow-axis {
  position: relative;
  min-width: 36px;
  height: 220px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.flow-axis span {
  position: absolute;
  right: 0;
  line-height: 1;
  transform: translateY(50%);
}
.flow-plot {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  height: 220px;
  margin-bottom: 26px;
}
.flow-grid {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: #ece9e1;
}
.flow-col {
  position: relative;
  display: flex;
  justify-content: center;
  height: 100%;
  cursor: default;
}
.flow-col:hover {
  background: linear-gradient(transparent, rgb(176 141 74 / 0.06));
}
.flow-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
}
.flow-bars .bar {
  width: clamp(10px, 2.2vw, 22px);
  min-height: 0;
  border-radius: 4px 4px 0 0;
}
.bar.in {
  background: var(--series-in);
}
.bar.out {
  background: var(--series-out);
}
.flow-label {
  position: absolute;
  bottom: -24px;
  color: var(--muted);
  font-size: 12px;
}
.flow-tip {
  position: absolute;
  bottom: calc(100% - 30px);
  left: 50%;
  z-index: 2;
  display: none;
  gap: 4px;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--navy);
  color: #c9d3dc;
  font-size: 12.5px;
  box-shadow: 0 10px 24px -10px rgb(7 19 31 / 0.5);
  transform: translateX(-50%);
  pointer-events: none;
}
.flow-col:hover .flow-tip {
  display: grid;
}
.flow-col:first-child .flow-tip {
  left: 0;
  transform: none;
}
.flow-col:last-child .flow-tip {
  right: 0;
  left: auto;
  transform: none;
}
.flow-tip b {
  color: #fff;
  font-weight: 600;
}
.flow-tip span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-tip em {
  margin-left: auto;
  color: #fff;
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.export-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.export-card .card-head {
  margin-bottom: 8px;
}
.export-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.export-item:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.export-item div {
  flex: 1;
  min-width: 0;
}
.export-item b {
  font-weight: 600;
}
.export-item p {
  color: var(--muted);
  font-size: 13.5px;
}
.client-app .export-item > svg.icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gold-ink);
}
.client-app .export-card .form-note {
  margin: 6px 0 0;
  font-size: 13px;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.record:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.record .row-icon {
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.record div {
  flex: 1;
  min-width: 0;
}
.record b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.client-app .record small {
  font-size: 13px;
}
.client-app .record > svg.icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .figure-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .portfolio-top,
  .money-layout,
  .verify-layout,
  .goals-layout,
  .appt-layout,
  .reports-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .money-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
@media (max-width: 760px) {
  .figure-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .figure-row.three .figure small {
    display: none;
  }
  .client-app .figure {
    padding: 16px;
  }
  .figure strong {
    font-size: 22px;
  }
  .money-side,
  .upload-inline {
    grid-template-columns: minmax(0, 1fr);
  }
  .upload-inline .dropzone {
    flex-direction: column;
    justify-content: center;
    padding: 20px 14px;
    text-align: center;
  }
  .card-head:has(.seg) {
    flex-direction: column;
    align-items: stretch;
  }
  .client-app .seg {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .seg button {
    flex-shrink: 0;
  }
  .client-app .appt-table td:nth-child(3) {
    order: -1;
  }
  .client-app .appt-table td:first-child {
    order: -2;
  }
  .value-card,
  .case-panel,
  .next-appt {
    padding: 22px 18px;
  }
  .verify-hero {
    flex-wrap: wrap;
    gap: 18px;
    padding: 22px 18px;
  }
  .verify-actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }
  .verify-ring,
  .verify-mark {
    width: 72px;
    height: 72px;
  }
  .check-item {
    flex-wrap: wrap;
  }
  .check-item .btn {
    width: 100%;
  }
  .case-panel h2 {
    font-size: 22px;
  }
  .stepper {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .stepper li {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    padding: 0 0 14px;
    text-align: left;
  }
  .stepper li::before {
    top: -14px;
    right: auto;
    bottom: auto;
    left: 13px;
    width: 2px;
    height: 14px;
  }
  .step-dot {
    margin: 0;
  }
  .client-app .stepper small {
    margin-left: auto;
  }
  .case-actions .spacer {
    display: none;
  }
  .case-actions .btn {
    flex: 1 1 auto;
  }
  .goals-summary > p {
    text-align: left;
  }
  .goal-ring {
    width: 72px;
    height: 72px;
  }
  .tx-main p {
    white-space: normal;
  }
  .portfolio-chart text {
    font-size: 21px;
  }
  .flow-bars .bar {
    width: 9px;
  }
  /* Tables become stacked cards. */
  .client-app .rtable-wrap {
    overflow: visible;
    border: 0;
  }
  .client-app .rtable thead {
    display: none;
  }
  .client-app .rtable,
  .client-app .rtable tbody {
    display: block;
  }
  .client-app .rtable tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  .client-app .rtable tr + tr {
    margin-top: 10px;
  }
  .client-app .rtable tr[hidden] {
    display: none;
  }
  .client-app .rtable td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .client-app .rtable td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .client-app .rtable td.wide,
  .client-app .rtable td:first-child {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .client-app .rtable td.num {
    text-align: left;
  }
  .client-app .rtable td.act {
    position: absolute;
    width: auto;
  }
  .client-app .rtable td.act::before,
  .client-app .docs-table td:first-child::before,
  .client-app .appt-table td:first-child::before {
    display: none;
  }
  .client-app .docs-table tr {
    position: relative;
  }
  .client-app .docs-table td.act {
    top: 14px;
    right: 14px;
  }
  .client-app .docs-table td:first-child {
    padding-right: 48px;
  }
  .client-app tr.is-past td {
    background: none;
  }
  .client-app tr.is-past {
    background: var(--surface-2);
  }
}
@media (max-width: 520px) {
  .figure-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .figure-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .client-app .figure {
    padding: 14px;
  }
  .figure-row .figure-icon {
    display: none;
  }
  .figure p {
    font-size: 12.5px;
  }
  .figure strong {
    font-size: 19px;
  }
  .figure small {
    font-size: 12px;
    white-space: normal;
  }
  .tx-icon {
    width: 36px;
    height: 36px;
  }
  .case-panel-head {
    flex-direction: column;
    gap: 10px;
  }
  .case-score {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
  .goal-tile {
    padding: 18px;
  }
  .next-appt-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .client-app .seg {
    width: 100%;
  }
}
/* Investigation summary */
.client-app .investigation-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  border-color: #dce4e8;
}
.investigation-overview {
  padding: 32px;
  min-width: 0;
}
.investigation-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.investigation-topline .eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
}
.investigation-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #45605c;
  font-size: 11px;
}
.investigation-status i {
  width: 6px;
  height: 6px;
  background: #508c76;
  border-radius: 50%;
}
.client-app .investigation-overview h2 {
  max-width: 350px;
  margin: 0;
  color: #122e42;
  font-size: clamp(26px, 2.5vw, 35px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.investigation-update {
  color: #62717d;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.investigation-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  padding: 24px 0;
  margin: 0;
}
.investigation-metrics div {
  min-width: 0;
}
.investigation-metrics dt {
  color: #6c7884;
  font-size: 11px;
  margin-bottom: 7px;
}
.investigation-metrics dd {
  color: #163247;
  font-size: 28px;
  margin: 0;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.investigation-metrics dd.investigation-value {
  font-size: 19px;
  padding-top: 6px;
  overflow-wrap: anywhere;
}
.investigation-overview .btn {
  min-height: 43px;
  font-size: 13px;
  gap: 18px;
}
.investigation-map-preview {
  position: relative;
  min-width: 0;
  min-height: 320px;
  background: radial-gradient(ellipse at 50% 40%, #0b2756, #061634 55%, #020817);
  display: flex;
  align-items: center;
  padding-bottom: 110px;
}
.investigation-map-preview .trace-map {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
/* At preview size the dot texture and selection glow turn into noise. */
.investigation-map-preview .trace-lights,
.investigation-map-preview .trace-sea,
.investigation-map-preview .trace-label,
.investigation-map-preview .trace-marker-halo {
  display: none;
}
.investigation-map-caption {
  position: absolute;
  bottom: 26px;
  left: 28px;
  right: 28px;
  display: grid;
  gap: 6px;
}
.investigation-map-caption span {
  font-size: 9px;
  color: #a9bfcc;
  letter-spacing: 0.16em;
}
.investigation-map-caption strong {
  color: #fff;
  font-size: 21px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.investigation-map-caption small {
  color: #a8bbc7;
  font-size: 11px;
}
.investigation-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e4eaed;
  background: #f9fbfc;
}
.investigation-actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 24px;
  font-size: 12px;
  color: #354f62;
  transition: background 0.15s;
}
.investigation-actions a + a {
  border-left: 1px solid #e4eaed;
}
.investigation-actions a:hover {
  background: #edf3f6;
}
.investigation-actions a > .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.investigation-actions a > .icon:last-child {
  width: 14px;
  margin-left: auto;
}
@media (max-width: 1100px) {
  .investigation-overview {
    padding: 24px;
  }
  .investigation-actions a {
    padding: 18px;
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .client-app .investigation-card {
    grid-template-columns: 1fr;
  }
  .investigation-map-preview {
    min-height: 250px;
    padding-bottom: 96px;
  }
  .investigation-map-preview .trace-map {
    max-height: 235px;
  }
  .investigation-actions {
    grid-template-columns: 1fr;
  }
  .investigation-actions a + a {
    border-left: 0;
    border-top: 1px solid #e4eaed;
  }
}

/* Security */
.sec-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 28px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgb(176 141 74 / 0.2), transparent 45%),
    linear-gradient(120deg, var(--navy), #163a57);
  color: #fff;
  box-shadow: var(--shadow);
}
.sec-score {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(#d6b574 var(--score), rgb(255 255 255 / 0.12) 0);
}
.sec-score > div {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #10304a;
  text-align: center;
}
.sec-score strong {
  font-size: 24px;
  line-height: 1;
}
.sec-score span {
  margin-top: -14px;
  color: #b9c7d3;
  font-size: 12px;
}
.client-app .sec-hero .eyebrow {
  color: #d6b574;
}
.client-app .sec-hero h2 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
}
.sec-hero-copy p:not(.eyebrow) {
  color: #b9c7d3;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.sec-hero-copy b {
  color: #fff;
  font-weight: 600;
}
.sec-checks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sec-checks li {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.05);
}
.sec-checks li > span {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(52 211 153 / 0.18);
  color: #6ee7b7;
}
.sec-checks li.todo > span {
  background: rgb(214 181 116 / 0.2);
  color: #e8c98a;
}
.client-app .sec-checks svg.icon {
  width: 15px;
  height: 15px;
}
.sec-checks b {
  font-size: 14px;
  font-weight: 600;
}
.sec-checks p {
  color: #b9c7d3;
  font-size: 13px;
}
.sec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.sec-col {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.sec-error {
  padding: 12px 16px;
  border: 1px solid #f1d3a8;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 14px;
}
.sec-list,
.sec-timeline,
.sec-tips ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sec-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}
.sec-row + .sec-row {
  border-top: 1px solid var(--border);
}
.sec-row > div {
  flex: 1;
  min-width: 0;
}
.sec-row b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}
.sec-row p,
.sec-event p {
  color: var(--muted);
  font-size: 13px;
}
.sec-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
}
.sec-current {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
}
.sec-form .field + .field {
  margin-top: 14px;
}
.sec-form .form-note {
  margin: 10px 0 6px;
}
.sec-form .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.sec-timeline {
  position: relative;
}
.sec-timeline::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 15px;
  width: 1px;
  background: var(--border);
}
.sec-event {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 8px 0;
}
.sec-dot {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--gold-ink);
}
.client-app .sec-dot svg.icon {
  width: 14px;
  height: 14px;
}
.sec-event b {
  font-size: 14px;
  font-weight: 600;
}
.sec-tips li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
}
.sec-tips li + li {
  border-top: 1px solid var(--border);
}
.client-app .sec-tips li > svg.icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--gold-ink);
}
.sec-tips b {
  font-size: 14.5px;
  font-weight: 600;
}
.sec-tips p {
  color: var(--muted);
  font-size: 13.5px;
}
.sec-tips .text-link {
  display: inline;
  font-size: inherit;
}
@media (max-width: 1100px) {
  .sec-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .sec-checks {
    grid-column: 1 / -1;
  }
  .sec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .sec-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 22px 18px;
  }
  .sec-score {
    width: 92px;
    height: 92px;
  }
  .sec-score > div {
    width: 72px;
    height: 72px;
  }
  .sec-row {
    flex-wrap: wrap;
  }
  .sec-row .btn {
    margin-left: 56px;
  }
}
/* Client first paint and consistent portal surfaces */
.client-app .portal-content:focus {
  outline: none;
}
.client-app .client-pending {
  display: grid;
  gap: 22px;
}
.client-pending .page-heading {
  margin: 0;
}
.client-pending-overview {
  position: relative;
  display: grid;
  align-content: center;
  gap: 17px;
  min-height: 190px;
  padding: 32px;
  border-radius: 16px;
  background: #102c40;
  overflow: hidden;
}
.client-pending-overview > span {
  position: absolute;
  right: 30px;
  top: 30px;
  color: #afc5d5;
  opacity: 0.4;
}
.client-placeholder {
  display: block;
  border-radius: 5px;
  background: #eaf0f3;
}
.client-pending-overview .client-placeholder {
  background: #254257;
}
.client-placeholder-title {
  height: 24px;
  width: min(60%, 340px);
}
.client-placeholder-copy {
  height: 12px;
  width: min(75%, 420px);
}
.client-pending-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.client-pending-metrics > div,
.client-pending-panels > div {
  display: grid;
  gap: 15px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.client-pending-metrics i {
  width: 33px;
  height: 33px;
}
.client-pending-metrics span {
  width: 65%;
  height: 10px;
}
.client-pending-metrics b {
  width: 80%;
  height: 24px;
}
.client-pending-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
}
.client-pending-panels > div {
  min-height: 285px;
}
.client-placeholder-chart {
  width: 100%;
  min-height: 180px;
  background: linear-gradient(180deg, #f3f6f8, #fafbfc);
}
.identity-pending .avatar,
.identity-pending .profile-name b {
  color: transparent;
  background: #edf1f4;
}
.identity-pending .profile-name b {
  border-radius: 4px;
  min-width: 65px;
}
.client-app {
  --radius: 13px;
  --bg: #f4f6f8;
  --border: #e1e7eb;
  --border-strong: #cad5dc;
}
.client-app .portal-content {
  padding-top: 26px;
}
.client-app .portal-topbar {
  background: #fff;
  border-bottom-color: #e2e8ed;
}
.client-app .portal-topbar .icon-button {
  border-color: #e2e8ed;
  border-radius: 9px;
}
.client-app .portal-search {
  border-color: #e2e8ed;
  background: #f7f9fb;
  border-radius: 9px;
}
.client-app .client-sidebar::before {
  opacity: 0.3;
}
.client-app .client-sidebar::after {
  background: linear-gradient(180deg, #0c2133 0%, #0c2133e8 50%, #0c2133c7 100%);
}
.client-app .card,
.client-app .panel,
.client-app .metric-card,
.client-app .figure {
  border-radius: 13px;
  box-shadow: 0 1px 3px #142e3e04;
}
.client-app .card-head h2,
.client-app .panel-header h2 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.client-app .card-head p,
.client-app .panel-header small {
  font-size: 13px;
  line-height: 1.5;
}
.client-app .page-heading p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.6;
}
.client-app .metric-card,
.client-app .figure {
  padding: 18px 20px;
}
.client-app .metric-card strong,
.client-app .figure strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.client-app .portal-empty {
  padding: 26px 18px;
  min-height: 150px;
}
.client-app .dashboard-grid.trio .portal-empty {
  border-style: solid;
  background: #f8fafb;
  border-color: #edf1f4;
}
.client-app .upload-strip {
  border-color: #dce5eb;
}
.client-app .dropzone {
  border-color: #b5c5d0;
  background: #fafcfd;
}
.client-app .btn:focus-visible,
.client-app .icon-button:focus-visible {
  outline: 2px solid #b08d4a;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .client-pending-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .client-pending-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .client-pending-metrics > div {
    padding: 16px;
  }
  .client-pending-overview {
    padding: 26px 22px;
    min-height: 190px;
  }
  .client-app .portal-content {
    padding-top: 20px;
  }
  .client-app .metric-card,
  .client-app .figure {
    padding: 15px;
  }
}

/* Settings */
.set-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgb(176 141 74 / 0.2), transparent 45%),
    linear-gradient(120deg, var(--navy), #163a57);
  color: #fff;
  box-shadow: var(--shadow);
}
.set-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid #d6b574;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font: 600 24px var(--serif);
}
.client-app .set-who h2 {
  color: #fff;
  font-size: 26px;
  line-height: 1.2;
}
.set-who p {
  margin-top: 2px;
  color: #b9c7d3;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.set-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.set-tag {
  padding: 3px 10px;
  border: 1px solid rgb(214 181 116 / 0.5);
  border-radius: 999px;
  color: #e8c98a;
  font-size: 12px;
  font-weight: 600;
}
.set-meter {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.05);
}
.set-meter > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.set-meter strong {
  font-size: 24px;
  line-height: 1;
}
.set-meter span {
  color: #b9c7d3;
  font-size: 13px;
}
.client-app .set-meter .progress {
  height: 6px;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
}
.client-app .set-meter .progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d6b574, #f0d9a8);
}
.set-meter small {
  color: #b9c7d3;
  font-size: 12.5px;
}
.set-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.set-side {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.set-form .actions {
  margin-top: 8px;
}
.set-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.set-row + .set-row {
  border-top: 1px solid var(--border);
}
.set-row > div {
  flex: 1;
  min-width: 0;
}
.set-row b,
.set-help b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.set-row p,
.set-help p {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13.5px;
}
.set-copy {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.client-app .set-help {
  display: flex;
  gap: 14px;
  background: var(--surface-2);
  box-shadow: none;
}
.set-help .text-link {
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .set-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .set-meter {
    grid-column: 1 / -1;
  }
  .set-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .set-hero {
    gap: 16px;
    padding: 22px 18px;
  }
  .set-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
  .client-app .set-who h2 {
    font-size: 21px;
  }
}

/* Page polish: shared rhythm for every client page. Kept last so it settles earlier rules. */
.client-app .portal-content {
  padding-bottom: 104px; /* room for the floating chat button */
}
.client-app .page-heading {
  padding-bottom: 4px;
}
.client-app .page-heading .eyebrow {
  color: var(--gold-ink);
  letter-spacing: 0.14em;
}
.client-app .card,
.client-app .panel {
  border-color: #e3e8ec;
}
.client-app .card-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #eef1f3;
}
.client-app .card-head:has(+ .portal-empty),
.client-app .money-card-head {
  border-bottom: 0;
}
.client-app .figure,
.client-app .metric-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.client-app .figure::after,
.client-app .metric-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.client-app .figure:hover,
.client-app .metric-card:hover {
  border-color: #d9cdb4;
  box-shadow: 0 14px 30px -20px rgb(12 33 51 / 0.35);
  transform: translateY(-2px);
}
.client-app .figure:hover::after,
.client-app .metric-card:hover::after {
  opacity: 1;
}
.client-app .rtable tbody tr {
  transition: background 0.15s ease;
}
.client-app .rtable tbody tr:hover {
  background: #fafbfc;
}
.client-app .field textarea {
  min-height: 88px;
}
.client-app .field select {
  appearance: none;
  padding-right: 40px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364707d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 14px center;
}
.client-app .portal-empty {
  padding: 36px 20px;
  border: 1px dashed #dde3e7;
  border-radius: 14px;
  background: #fbfcfc;
}
.client-app .portal-empty > span {
  background: #fff;
  color: var(--gold-ink);
  box-shadow:
    0 0 0 1px var(--border),
    0 6px 14px -8px rgb(12 33 51 / 0.25);
}
.client-app .btn {
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.client-app .btn.gold:hover {
  box-shadow: 0 10px 22px -12px rgb(176 141 74 / 0.8);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .client-app .figure,
  .client-app .metric-card,
  .client-app .btn {
    transition: none;
    transform: none;
  }
}
@media (max-width: 760px) {
  .client-app .portal-content {
    padding-bottom: 96px;
  }
  .client-app .page-heading h1 {
    font-size: 30px;
  }
  .client-app .page-heading .actions,
  .client-app .page-heading .actions .btn {
    width: 100%;
  }
  .client-app .value-actions,
  .client-app .advisor-actions {
    width: 100%;
  }
  .client-app .value-actions .btn,
  .client-app .advisor-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .client-app .card-head {
    flex-wrap: wrap;
  }
  .client-app .summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .advisor-strip {
    padding: 20px 18px;
  }
}
@media (max-width: 520px) {
  .client-app .figure-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .client-app .figure {
    padding: 16px;
  }
  .client-app .figure strong {
    font-size: 19px;
  }
}
