:root {
  --primary: #6959fa;
  --primary-dark: #5546d8;
  --primary-pale: #efedff;
  --charcoal: #111827;
  --muted: #667085;
  --gold: #c99700;
  --bg: #f8faf7;
  --panel: #ffffff;
  --border: #d8ded6;
  --line: #e6ebe4;
  --success: var(--primary);
  --warning: #b7791f;
  --error: #b91c1c;
  --info: #2563eb;
  --success-bg: var(--primary-pale);
  --warning-bg: #fff7e0;
  --error-bg: #fdecec;
  --info-bg: #eaf2ff;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.07);
  --login-bg: #f8fafc;
  --login-card: #ffffff;
  --login-text: #111827;
  --login-muted: #667085;
  --login-border: #d8ded6;
  --login-input: #edf3ff;
  --login-accent: var(--primary);
  --login-accent-strong: var(--primary-dark);
}

body[data-theme="dark"] {
  --bg: #161616;
  --panel: #242424;
  --border: #343434;
  --line: #333333;
  --charcoal: #f5f5f5;
  --muted: #9ca3af;
  --login-bg: #191919;
  --login-card: #262626;
  --login-text: #f5f5f5;
  --login-muted: #9ca3af;
  --login-border: #363636;
  --login-input: #eaf1ff;
  --login-accent: #8f84ff;
  --login-accent-strong: #a79fff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--charcoal);
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 34px 18px 22px;
  background: var(--login-bg);
  color: var(--login-text);
}

.login-screen.hp-authenticated {
  display: block;
  padding: 0;
  background: #f5f6f8;
}

body[data-theme="dark"] .login-screen.hp-authenticated { background: #15161a; }

.login-screen.hp-authenticated > div {
  width: 100%;
}

.login-screen.hp-authenticated .hp-app {
  width: 100%;
  min-width: 0;
}

.login-center {
  width: min(100%, 390px);
  text-align: center;
}

.login-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--login-accent), var(--login-accent-strong));
  box-shadow: 0 14px 28px rgba(105, 89, 250, 0.24);
}

.dealdrum-mark {
  width: 32px;
  height: 32px;
  position: relative;
  display: block;
}

.dealdrum-mark::before,
.dealdrum-mark::after,
.dealdrum-mark i,
.dealdrum-mark b {
  content: "";
  position: absolute;
  display: block;
  background: white;
}

.dealdrum-mark::before {
  inset: 6px 5px;
  border-radius: 12px;
  transform: rotate(-8deg);
}

.dealdrum-mark::after {
  left: 13px;
  top: 11px;
  width: 10px;
  height: 16px;
  border-radius: 999px;
  background: var(--login-accent);
  transform: rotate(-8deg);
}

.dealdrum-mark i {
  left: 4px;
  top: 4px;
  width: 20px;
  height: 6px;
  border-radius: 999px;
  transform: rotate(-8deg);
}

.dealdrum-mark b {
  right: 2px;
  bottom: 5px;
  width: 13px;
  height: 6px;
  border-radius: 999px;
  transform: rotate(-8deg);
  opacity: 0.82;
}

.login-center h1 {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 600;
}

.login-center > p {
  margin-bottom: 24px;
  color: var(--login-muted);
  font-weight: 400;
}

.login-card {
  border: 1px solid var(--login-border);
  border-radius: 12px;
  padding: 24px;
  background: var(--login-card);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
  text-align: left;
}

.login-card .field + .field {
  margin-top: 16px;
}

.login-card input {
  min-height: 44px;
  background: var(--login-input);
  font-weight: 400;
}

.remember-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--login-muted);
  font-weight: 400;
}

.remember-line input {
  width: 20px;
  height: 20px;
  accent-color: var(--login-accent);
}

.login-button {
  width: 100%;
  min-height: 46px;
  border-color: var(--login-accent);
  background: var(--login-accent);
  position: relative;
  display: inline-grid;
  place-items: center;
  font-weight: 500;
}

.login-button:hover {
  border-color: var(--login-accent-strong);
  background: var(--login-accent-strong);
}

.button-loading {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.login-button.loading .button-label {
  visibility: hidden;
}

.login-button.loading .button-loading {
  display: block;
  position: absolute;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--login-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.login-footer p {
  margin-bottom: 0;
  opacity: 0.76;
}

.login-footer span {
  margin: 0 8px;
  opacity: 0.7;
}

.investor-app-link {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
}

.investor-app {
  min-height: 100vh;
  display: grid;
  align-items: stretch;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(105, 89, 250, 0.12), transparent 32%),
    #f4f5f8;
}

.investor-web-shell {
  width: min(100%, 1180px);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #dfe3eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.1);
}

.investor-app-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-bottom: 1px solid #edf0f4;
}

.investor-web-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.investor-web-brand strong {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 600;
}

.dealdrum-mini-mark,
.investor-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary), #8d82ff);
  color: #ffffff;
  font-weight: 600;
}

.investor-app-back,
.investor-app-admin-link {
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
}

.investor-app-back {
  width: 32px;
  height: 32px;
  font-size: 24px;
  line-height: 1;
}

.investor-app-admin-link {
  grid-column: 3;
  font-size: 12px;
  font-weight: 500;
}

.investor-app-body {
  padding: 34px;
  overflow: auto;
}

.investor-app-card {
  width: min(100%, 520px);
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.investor-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.investor-app-card h1,
.investor-home h1 {
  margin: 0;
  color: var(--charcoal);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 600;
}

.investor-app-card p,
.investor-home-head p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.investor-app-form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.investor-app-form label {
  color: #4f5d70;
  font-size: 12px;
  font-weight: 500;
}

.investor-app-form input,
.investor-app-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dde3ed;
  border-radius: 12px;
  padding: 0 14px;
  background: #f7f8fb;
  color: var(--charcoal);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.investor-app-form .button {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.investor-home {
  display: grid;
  gap: 20px;
}

.investor-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.investor-avatar {
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
}

.investment-profile-callout {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(105, 89, 250, 0.2);
  border-radius: 16px;
  padding: 18px 20px;
  background: var(--primary-pale);
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
}

.investment-profile-callout span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.investment-profile-callout strong {
  font-size: 13px;
  font-weight: 500;
}

.investor-deal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.investor-deal-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid #e2e6ed;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.investor-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.investor-dashboard-metrics article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #e2e6ed;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
}

.investor-dashboard-metrics span {
  color: #667085;
  font-size: 11.5px;
  font-weight: 500;
}

.investor-dashboard-metrics strong {
  color: var(--charcoal);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 600;
}

.investor-deal-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary), #9f95ff);
  color: #ffffff;
  font-weight: 600;
}

.investor-deal-card h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.investor-deal-card p {
  margin: 4px 0 10px;
  color: #667085;
  font-size: 11.5px;
  line-height: 1.4;
}

.investor-deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.investor-deal-meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f1f3f7;
  color: #4f5d70;
  font-size: 10.5px;
  font-weight: 500;
}

.investor-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(102, 112, 133, 0.16);
  color: var(--login-muted);
  cursor: pointer;
  font-size: 18px;
}

.login-alert {
  position: fixed;
  top: 44px;
  left: 50%;
  z-index: 50;
  width: min(620px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--login-border);
  border-radius: 12px;
  padding: 18px 22px;
  background: var(--login-card);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
  color: var(--login-text);
  transform: translateX(-50%);
}

.login-alert span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--login-text);
  color: var(--login-card);
  font-weight: 900;
}

.login-alert strong {
  font-size: 15px;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.48);
}

.two-factor-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--login-border);
  border-radius: 12px;
  padding: 24px;
  background: var(--login-card);
  color: var(--login-text);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--login-muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-heading {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.modal-heading h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.modal-heading p {
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

.shield-icon {
  width: 18px;
  height: 22px;
  border: 2px solid #16a34a;
  border-top-width: 4px;
  border-radius: 10px 10px 14px 14px;
}

.qr-code {
  width: 168px;
  height: 168px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin: 16px auto;
  border: 7px solid white;
  background: white;
  box-shadow: 0 0 0 1px var(--login-border);
}

.qr-code span {
  background: black;
}

.qr-code span:nth-child(2n),
.qr-code span:nth-child(5n),
.qr-code span:nth-child(7),
.qr-code span:nth-child(19) {
  background: white;
}

.manual-code {
  border: 1px solid var(--login-border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(102, 112, 133, 0.06);
}

.manual-code p {
  color: var(--login-muted);
  margin-bottom: 6px;
  font-size: 13px;
}

.manual-code code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--login-border);
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--login-card);
  color: var(--login-text);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 13px;
}

.two-factor-card .field {
  margin-top: 14px;
}

.two-factor-card .field label {
  font-size: 14px;
}

.two-factor-card .field input,
#operatorCode {
  text-align: center;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 18px;
  letter-spacing: 3px;
}

.center-help {
  text-align: center;
  font-size: 12px;
}

.auth-app-note {
  border: 1px solid #aed2ff;
  border-radius: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  background: #edf5ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.modal-action {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
}

.password-save-card {
  position: fixed;
  z-index: 90;
  top: 34px;
  left: 50%;
  width: min(680px, calc(100vw - 36px));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 34px;
  background: var(--panel);
  color: var(--charcoal);
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
  transform: translateX(-50%);
}

.password-art {
  width: 180px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 25% 50%, var(--primary) 0 10px, transparent 11px),
    radial-gradient(circle at 50% 50%, var(--primary) 0 10px, transparent 11px),
    radial-gradient(circle at 75% 50%, var(--success) 0 10px, transparent 11px),
    linear-gradient(90deg, #c7f3d3, #cde0ff);
}

.password-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

.password-row strong {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 232px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 28px 18px;
  background: var(--primary);
  color: white;
  min-width: 0;
}

.brand {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.subbrand,
.scope-note {
  color: #eeecff;
  font-size: 12px;
  font-weight: 800;
}

.subbrand {
  margin-top: 6px;
}

.scope-note {
  margin-top: auto;
}

.sidebar-signout {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: transparent;
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--primary-dark);
}

.nav-item:focus-visible,
.button:focus-visible,
.filter:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(105, 89, 250, 0.28);
  outline-offset: 2px;
}

.main {
  width: 100%;
  max-width: 1340px;
  min-width: 0;
  padding: 34px 48px 56px;
}

.view,
.topbar,
.metrics,
.toolbar,
.filters,
.panel,
.table-row,
.form-grid,
.two-column,
.summary-grid,
.summary-meta {
  min-width: 0;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

h1,
h2,
h3 {
  font-family: "Open Sans", Arial, sans-serif;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: 0;
}

.subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.button {
  font-family: "Open Sans", Arial, sans-serif;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--panel);
  color: var(--charcoal);
  cursor: pointer;
  font-weight: 500;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 80ms ease;
}

.button:hover {
  border-color: #bfc8bc;
  background: #fbfcfb;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.button.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.button.danger {
  border-color: #f2c8c8;
  color: var(--error);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.toast {
  position: fixed;
  z-index: 80;
  top: 18px;
  right: 18px;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(105, 89, 250, 0.22);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  box-shadow: var(--shadow);
  color: var(--charcoal);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 26px;
}

.metric,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  min-height: 92px;
  padding: 18px;
}

.eyebrow,
.metric-label,
.mobile-label,
.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-value,
.money,
.data-value {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-weight: 600;
}

.metric-value {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.25;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 13px;
  background: var(--panel);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.filter.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: white;
}

.search-wrap {
  min-width: 280px;
}

.search-wrap label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-wrap input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--charcoal);
}

.search-wrap input {
  min-height: 40px;
  padding: 8px 12px;
}

.table-panel {
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1fr) minmax(105px, 0.7fr) minmax(90px, 0.55fr) minmax(132px, 0.86fr) minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 22px;
}

.table-row.header {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-row.deal {
  cursor: pointer;
}

.table-row.deal:hover {
  background: #fbfaff;
}

.deal-title {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 800;
}

.small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stale-text {
  color: var(--error);
  font-weight: 800;
}

.mobile-label {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.badge.draft {
  background: var(--info-bg);
  color: var(--info);
}

.badge.needs-more-proof {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.verified {
  background: var(--success-bg);
  color: var(--success);
}

.badge.rejected {
  background: var(--error-bg);
  color: var(--error);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.empty-state {
  padding: 54px 24px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 520px;
  margin: 0 auto 22px;
  color: var(--muted);
}

.form-panel,
.settings-panel {
  padding: 28px 32px;
}

.form-section-heading {
  margin-bottom: 22px;
}

.form-section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.single-grid {
  grid-template-columns: 1fr;
}

.span-2 {
  grid-column: span 2;
}

.field label {
  display: block;
  margin-bottom: 8px;
}

.field input,
.field select {
  min-height: 46px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #e59a9a;
  background: #fffafa;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.attachment-zone input[type="file"] {
  padding: 10px;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--charcoal);
  font-size: 13px;
}

.file-item span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

.error {
  min-height: 18px;
  margin-top: 6px;
  color: var(--error);
  font-size: 12px;
  font-weight: 700;
}

.actions,
.settings-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.actions {
  margin-top: 24px;
}

.settings-actions {
  margin-top: 18px;
  justify-content: flex-start;
}

#formView {
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  background: #f4f5f8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-theme="dark"] #formView {
  background: #17191f;
}

.form-topbar-actions {
  gap: 10px;
}

.compact-profile {
  display: flex;
  align-items: center;
}

.deal-form-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px 18px;
  border-bottom: 1px solid #e5e7ec;
  background: var(--panel);
}

body[data-theme="dark"] .deal-form-hero {
  border-bottom-color: #2d3038;
}

.deal-form-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.deal-back-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.deal-back-button:hover {
  background: rgba(105, 89, 250, 0.1);
  color: var(--primary);
}

.deal-form-hero h1 {
  margin: 0 0 2px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

.deal-form-hero .subtitle {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.deal-stepper {
  --form-progress: 1;
  position: relative;
  flex: 0 0 auto;
  z-index: 18;
  padding: 16px 32px 22px;
  border-bottom: 1px solid #e5e7ec;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

body[data-theme="dark"] .deal-stepper {
  border-bottom-color: #2d3038;
}

.deal-progress-rail {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6d7dc;
}

body[data-theme="dark"] .deal-progress-rail {
  background: #3a3d46;
}

.deal-progress-rail span {
  display: block;
  width: calc(var(--form-progress) * 12.5%);
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 220ms ease;
}

body[data-theme="dark"] .deal-progress-rail span {
  background: var(--primary);
}

.deal-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.deal-steps li {
  min-width: 0;
}

.deal-steps button {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #9aa1af;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  text-align: center;
  font-size: 10.5px;
  font-weight: 400;
}

.deal-steps span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid #d5d9e1;
  border-radius: 50%;
  background: var(--panel);
  color: #9aa1af;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.deal-steps strong {
  max-width: 92px;
  font-weight: 400;
  line-height: 1.25;
}

.deal-steps li.active button {
  color: var(--primary);
}

.deal-steps li.active span {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}

.deal-steps li.complete span {
  border-color: #13a64a;
  background: #e9faef;
  color: #0a9f43;
}

.deal-steps li.incomplete button {
  color: #c86969;
}

.deal-steps li.incomplete span {
  border-color: #f0b5b5;
  background: #fff1f1;
  color: #d14f4f;
}

.deal-form-shell {
  display: grid;
  gap: 22px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 32px 96px;
  scroll-padding-bottom: 112px;
}

.deal-form-card {
  width: min(100%, 1120px);
  justify-self: center;
  padding: 28px 34px 32px;
  border: 1px solid #e1e4ea;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.04);
}

body[data-theme="dark"] .deal-form-card {
  border-color: #323640;
  box-shadow: none;
}

#formView .form-section-heading {
  margin-bottom: 20px;
}

#formView .form-section-heading h2 {
  margin: 0 0 8px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

#formView .form-section-heading p {
  font-size: 12.5px;
  line-height: 1.5;
}

#formView .form-grid {
  gap: 16px 18px;
}

.form-step-panel {
  display: none;
}

.form-step-panel.active {
  display: block;
  animation: formStepIn 180ms ease both;
}

@keyframes formStepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-subsection {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #edf0f4;
}

body[data-theme="dark"] .form-subsection {
  border-top-color: #323640;
}

.form-subsection h3 {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 650;
  color: var(--charcoal);
}

#formView .field label {
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--charcoal);
}

#formView .field input,
#formView .field select,
#formView .field textarea {
  border-color: transparent;
  border-radius: 9px;
  background: #f0f1f4;
  color: var(--charcoal);
  font-size: 12.5px;
  font-weight: 400;
}

#formView .field input,
#formView .field select {
  min-height: 43px;
  padding: 8px 12px;
}

#formView .field textarea {
  min-height: 84px;
  padding: 10px 12px;
}

.step-note {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid #e6e9ef;
  border-radius: 12px;
  background: #f8f9fc;
}

body[data-theme="dark"] .step-note {
  border-color: #323640;
  background: #2b2e37;
}

.step-note h3 {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.step-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

#formView .field input:focus,
#formView .field select:focus,
#formView .field textarea:focus {
  border-color: rgba(105, 89, 250, 0.48);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(105, 89, 250, 0.12);
}

body[data-theme="dark"] #formView .field input,
body[data-theme="dark"] #formView .field select,
body[data-theme="dark"] #formView .field textarea {
  background: #2d3038;
}

body[data-theme="dark"] #formView .field input:focus,
body[data-theme="dark"] #formView .field select:focus,
body[data-theme="dark"] #formView .field textarea:focus {
  background: #242731;
}

#formView .file-item {
  background: #f7f8fb;
}

body[data-theme="dark"] #formView .file-item {
  background: #2b2e37;
}

.deal-form-actions {
  position: fixed;
  bottom: 0;
  left: 300px;
  right: 0;
  flex: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-top: 1px solid #e5e7ec;
  background: var(--panel);
  box-shadow: 0 -10px 24px rgba(17, 24, 39, 0.04);
}

.deal-form-actions .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-theme="dark"] .deal-form-actions {
  border-top-color: #2d3038;
  box-shadow: none;
}

body[data-theme="dark"] .deal-steps li.complete span {
  border-color: #38d979;
  background: rgba(56, 217, 121, 0.14);
  color: #72efa0;
}

body[data-theme="dark"] .deal-steps li.incomplete span {
  border-color: #8b3f3f;
  background: rgba(209, 79, 79, 0.16);
  color: #ff9a9a;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.oauth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.investor-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.kyc-panel {
  padding: 24px;
}

.investor-copy {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.investor-deals {
  display: grid;
  gap: 16px;
}

.investor-deal-card {
  padding: 22px 24px;
}

.investor-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.investor-card-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--bg);
}

.investor-card-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.investor-card-grid strong {
  display: block;
  margin-top: 4px;
}

.check-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
}

.check-line input {
  margin-top: 4px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 342px;
  gap: 32px;
  align-items: start;
}

.checklist-panel,
.decision-panel,
.summary-panel {
  padding: 28px 32px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #eef2ec;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--warning);
  transition: width 180ms ease, background 180ms ease;
}

.progress-bar.complete {
  background: var(--success);
}

.progress-label {
  margin-top: 10px;
  font-weight: 800;
}

.checklist {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.check-item,
.evidence-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.check-item > input[type="checkbox"],
.evidence-row > input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
}

.check-item label,
.evidence-row label {
  cursor: pointer;
  font-weight: 700;
}

.evidence-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.evidence-row-main {
  min-width: 0;
}

.evidence-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 5px;
}

.dot.complete {
  background: var(--success);
}

.dot.missing {
  background: var(--warning);
}

.evidence-editor {
  margin-top: 12px;
}

.field.compact label {
  margin-bottom: 4px;
  font-size: 11px;
}

.field.compact input {
  min-height: 34px;
  padding: 7px 9px;
}

.field.compact textarea {
  min-height: 56px;
  padding: 8px 9px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.span-evidence {
  grid-column: span 2;
}

.decision-stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.alert {
  border: 1px solid #e8d8a5;
  border-radius: 8px;
  background: var(--warning-bg);
  padding: 16px 18px;
}

.alert p:last-child {
  margin-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg);
}

.summary-card.fee {
  border-color: #e8d8a5;
  background: #fff9e8;
}

.summary-card.risk-low {
  border-color: #bfe7ce;
  background: var(--success-bg);
}

.summary-card.risk-medium {
  border-color: #e8d8a5;
  background: var(--warning-bg);
}

.summary-card.risk-high {
  border-color: #f2c8c8;
  background: var(--error-bg);
}

.summary-card .data-value {
  margin-top: 8px;
  font-size: 17px;
}

.mini-progress {
  --progress: 0;
  width: 54px;
  height: 54px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 58%, transparent 60%),
    conic-gradient(var(--primary) calc(var(--progress) * 1%), #e8ebe6 0);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 13px;
  font-weight: 800;
}

.summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.note-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 18px;
}

.note-box + .note-box {
  margin-top: 16px;
}

.evidence-summary,
.audit-list,
.audit-timeline {
  display: grid;
  gap: 10px;
}

.evidence-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.evidence-summary-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.evidence-summary-item details {
  grid-column: 1 / -1;
}

.evidence-summary-item summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.summary-chip {
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.summary-chip.complete {
  background: var(--success-bg);
  color: var(--success);
}

.summary-chip.missing {
  background: var(--warning-bg);
  color: var(--warning);
}

.audit-timeline {
  position: relative;
  gap: 0;
}

.audit-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 16px;
}

.audit-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.audit-item:last-child {
  padding-bottom: 0;
}

.audit-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border: 3px solid var(--primary-pale);
  border-radius: 50%;
  background: var(--primary);
}

.audit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.audit-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.evidence-summary-item p,
.audit-item p {
  margin-bottom: 4px;
  color: var(--muted);
}

/* Dealdrum admin dashboard redesign */
.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  background: #f5f6f8;
}

body[data-theme="dark"] .app-shell {
  background: #15161a;
}

.main {
  max-width: none;
  padding: 24px 32px 48px;
}

.view {
  width: 100%;
  max-width: 1840px;
  margin: 0 auto;
}

.view:not(#dashboardView) {
  padding: 0;
}

.sidebar {
  gap: 32px;
  padding: 24px 14px;
  background: #f1f2f5;
  color: #111827;
  border-right: 1px solid #e0e4ea;
}

body[data-theme="dark"] .sidebar {
  background: #1d1f25;
  color: #f5f7fb;
  border-right-color: #2d3038;
}

.workspace-wrap {
  position: relative;
}

.workspace-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid #d8dde6;
  border-radius: 16px;
  background: #ffffff;
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.workspace-card:hover,
.workspace-card[aria-expanded="true"] {
  border-color: rgba(105, 89, 250, 0.28);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

body[data-theme="dark"] .workspace-card {
  border-color: #343844;
  background: #262933;
}

.workspace-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 600;
}

.workspace-chevron {
  color: #667085;
  font-weight: 600;
}

.workspace-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.14);
}

body[data-theme="dark"] .workspace-menu {
  border-color: #343844;
  background: #262933;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.workspace-menu button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid #e9edf2;
  padding: 0 20px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  text-align: left;
}

.workspace-menu button:last-child {
  border-bottom: 0;
}

.workspace-menu button:hover {
  background: rgba(105, 89, 250, 0.08);
}

body[data-theme="dark"] .workspace-menu button {
  border-bottom-color: #343844;
}

.workspace-menu button > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #74798a;
}

.workspace-menu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
}

.workspace-card .brand,
.workspace-card .subbrand {
  display: block;
}

.workspace-card .subbrand {
  white-space: nowrap;
}

.subbrand,
.scope-note {
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
}

.scope-note {
  width: calc(100% + 28px);
  margin-left: -14px;
  padding: 18px 14px 0;
  border-top: 1px solid #e0e4ea;
}

body[data-theme="dark"] .subbrand,
body[data-theme="dark"] .scope-note {
  color: #9ca3af;
}

body[data-theme="dark"] .scope-note {
  border-top-color: #2d3038;
}

.nav {
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 16px;
  color: #4f5d70;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover,
.nav-item.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 9px 22px rgba(17, 24, 39, 0.09);
}

.nav-item.active .nav-icon {
  stroke-width: 2.15;
}

body[data-theme="dark"] .nav-item {
  color: #a8b0bf;
}

body[data-theme="dark"] .nav-item:hover,
body[data-theme="dark"] .nav-item.active {
  background: #2a2d37;
  color: #f5f7fb;
}

.admin-topbar {
  position: sticky;
  top: 24px;
  z-index: 35;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid #e4e7ec;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.compact-topbar {
  min-height: 64px;
}

.compact-topbar .breadcrumb {
  font-size: 12.5px;
}

.compact-topbar .breadcrumb button {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

body[data-theme="dark"] .admin-topbar {
  border-bottom-color: #2d3038;
  background: #1c1f27;
}

.breadcrumb,
.topbar-actions,
.admin-profile {
  display: flex;
  align-items: center;
}

.breadcrumb {
  gap: 12px;
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.breadcrumb button,
.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #596273;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
}

.icon-button:hover {
  background: rgba(105, 89, 250, 0.1);
  color: var(--primary);
}

.topbar-actions {
  gap: 16px;
}

.profile-menu-wrap {
  position: relative;
}

.admin-profile {
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid #e4e7ec;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

body[data-theme="dark"] .admin-profile {
  border-left-color: #343844;
}

.admin-profile > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.admin-profile strong,
.admin-profile small {
  display: block;
  line-height: 1.25;
}

.admin-profile strong {
  font-size: 12px;
  font-weight: 600;
}

.admin-profile small {
  color: #667085;
  font-size: 12px;
  font-weight: 400;
}

.admin-profile b {
  margin-left: 8px;
  color: #667085;
  font-size: 16px;
  font-weight: 500;
}

.admin-profile:focus-visible,
.profile-menu button:focus-visible {
  outline: 3px solid rgba(105, 89, 250, 0.24);
  outline-offset: 2px;
}

.profile-menu {
  position: fixed;
  z-index: 300;
  width: 250px;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.14);
  overflow: hidden;
}

body[data-theme="dark"] .profile-menu {
  border-color: #343844;
  background: #262933;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.profile-menu button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid #e9edf2;
  padding: 0 22px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

.profile-menu button:last-child {
  border-bottom: 0;
}

.profile-menu button:hover {
  background: rgba(105, 89, 250, 0.08);
}

body[data-theme="dark"] .profile-menu button {
  border-bottom-color: #343844;
}

.profile-menu span {
  width: 20px;
  color: #667085;
  font-size: 18px;
}

.dashboard-page {
  padding: 24px 0 36px;
  font-size: 14px;
}

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding: 0 28px;
}

.dashboard-heading h1 {
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 600;
}

.dashboard-heading .subtitle {
  font-size: 13px;
  font-weight: 400;
}

.admin-create-button {
  min-width: 174px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.admin-metrics {
  gap: 20px;
  margin-bottom: 24px;
}

.admin-stat-card {
  min-height: 166px;
  padding: 24px;
  border-radius: 18px;
  border-color: #e2e6ed;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.admin-stat-card .metric-label {
  color: #777b8c;
  font-size: 13px;
  font-weight: 400;
}

.admin-stat-card .metric-value {
  margin-top: 4px;
  color: #111827;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
}

body[data-theme="dark"] .admin-stat-card .metric-value {
  color: #f7f8fb;
}

.trend-pill,
.soft-badge,
.share-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
}

.trend-pill {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(105, 89, 250, 0.22);
  background: var(--primary-pale);
  color: var(--primary);
}

.spark-bars {
  height: 54px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  margin-top: 28px;
}

.spark-bars span {
  border-radius: 8px 8px 4px 4px;
  background: rgba(105, 89, 250, 0.24);
  transform-origin: bottom;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.admin-panel {
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

body[data-theme="dark"] .admin-panel,
body[data-theme="dark"] .admin-stat-card {
  border-color: #303541;
  background: #22262f;
}

.panel-head {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e9edf2;
}

body[data-theme="dark"] .panel-head {
  border-bottom-color: #303541;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ghost {
  font-size: 16px;
}

.ops-menu-wrap {
  position: relative;
}

.ops-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 10px);
  right: 0;
  width: 270px;
  overflow: hidden;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.14);
}

body[data-theme="dark"] .ops-menu {
  border-color: #343844;
  background: #262933;
}

.ops-menu button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  padding: 0 20px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  text-align: left;
}

.ops-menu button:hover {
  background: rgba(105, 89, 250, 0.08);
}

.ops-menu span {
  width: 22px;
  color: #74798a;
  font-size: 17px;
  text-align: center;
}

.bar-chart {
  height: 324px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 16px;
  padding: 46px 54px 26px;
}

.chart-month {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.chart-month span {
  width: min(100%, 118px);
  min-height: 3px;
  border-radius: 12px 12px 0 0;
  background: #e5e7ee;
  transform-origin: bottom;
}

.chart-month span.active {
  background: var(--primary);
}

.chart-month small {
  margin-top: 10px;
  color: #777b8c;
  font-weight: 600;
}

.chart-tooltip {
  position: absolute;
  bottom: calc(68% + 10px);
  display: none;
  border-radius: 6px;
  padding: 5px 8px;
  background: #111827;
  color: white;
  font-size: 11px;
  font-weight: 500;
}

.chart-tooltip.visible {
  display: block;
}

.dashboard-entering .dashboard-heading {
  animation: dashboardFadeUp 460ms ease-out both;
}

.dashboard-entering .admin-stat-card,
.dashboard-entering .admin-panel {
  animation: dashboardParallaxIn 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-entering .admin-stat-card:nth-child(1) {
  animation-delay: 30ms;
}

.dashboard-entering .admin-stat-card:nth-child(2) {
  animation-delay: 90ms;
}

.dashboard-entering .admin-stat-card:nth-child(3) {
  animation-delay: 150ms;
}

.dashboard-entering .admin-stat-card:nth-child(4) {
  animation-delay: 210ms;
}

.dashboard-entering .chart-panel {
  animation-delay: 280ms;
}

.dashboard-entering .ops-panel {
  animation-delay: 360ms;
}

.dashboard-entering .recent-panel {
  animation-delay: 430ms;
}

.dashboard-entering .lower .admin-panel:nth-child(1) {
  animation-delay: 500ms;
}

.dashboard-entering .lower .admin-panel:nth-child(2) {
  animation-delay: 560ms;
}

.dashboard-entering .spark-bars span,
.dashboard-entering .chart-month span {
  animation: dashboardBarGrow 740ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-entering .spark-bars span:nth-child(1) { animation-delay: 120ms; }
.dashboard-entering .spark-bars span:nth-child(2) { animation-delay: 150ms; }
.dashboard-entering .spark-bars span:nth-child(3) { animation-delay: 180ms; }
.dashboard-entering .spark-bars span:nth-child(4) { animation-delay: 210ms; }
.dashboard-entering .spark-bars span:nth-child(5) { animation-delay: 240ms; }
.dashboard-entering .spark-bars span:nth-child(6) { animation-delay: 270ms; }
.dashboard-entering .spark-bars span:nth-child(7) { animation-delay: 300ms; }
.dashboard-entering .spark-bars span:nth-child(8) { animation-delay: 330ms; }
.dashboard-entering .spark-bars span:nth-child(9) { animation-delay: 360ms; }
.dashboard-entering .spark-bars span:nth-child(10) { animation-delay: 390ms; }
.dashboard-entering .spark-bars span:nth-child(11) { animation-delay: 420ms; }
.dashboard-entering .spark-bars span:nth-child(12) { animation-delay: 450ms; }

.dashboard-entering .chart-month:nth-child(1) span { animation-delay: 360ms; }
.dashboard-entering .chart-month:nth-child(2) span { animation-delay: 430ms; }
.dashboard-entering .chart-month:nth-child(3) span { animation-delay: 500ms; }
.dashboard-entering .chart-month:nth-child(4) span { animation-delay: 570ms; }

.dashboard-entering .chart-tooltip.visible {
  animation: dashboardTooltipIn 480ms ease-out 760ms both;
}

@keyframes dashboardFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardParallaxIn {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardBarGrow {
  from {
    opacity: 0.55;
    transform: scaleY(0.08);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes dashboardTooltipIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-entering .dashboard-heading,
  .dashboard-entering .admin-stat-card,
  .dashboard-entering .admin-panel,
  .dashboard-entering .spark-bars span,
  .dashboard-entering .chart-month span,
  .dashboard-entering .chart-tooltip.visible {
    animation: none;
  }
}

.queue-list {
  display: grid;
  gap: 18px;
  padding: 34px 36px;
}

.queue-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.queue-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308;
}

.queue-dot.red {
  background: #ef4444;
}

.queue-dot.blue {
  background: #3b82f6;
}

.queue-item strong,
.queue-item small {
  display: block;
}

.queue-item strong {
  font-size: 14px;
  font-weight: 500;
}

.queue-item small {
  color: #777b8c;
  font-size: 12px;
  font-weight: 500;
}

.count-pill {
  min-width: 30px;
  height: 28px;
  background: #eef0f5;
  color: #4b5563;
}

.avatar-stack {
  display: flex;
}

.avatar-stack span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-left: -7px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
}

body[data-theme="dark"] .avatar-stack span {
  border-color: #22262f;
}

.dashboard-modal-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.52);
}

.dashboard-modal {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  max-height: min(86vh, 780px);
  overflow: auto;
  border: 1px solid #dfe3ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.28);
  padding: 32px 36px;
}

body[data-theme="dark"] .dashboard-modal {
  border-color: #343844;
  background: #22262f;
}

.dashboard-modal h2 {
  margin: 0 40px 8px 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
}

.dashboard-modal p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.small-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #596273;
  cursor: pointer;
  font-size: 24px;
  font-weight: 300;
}

.ops-select {
  position: relative;
  display: block;
  margin-bottom: 24px;
}

.ops-select select {
  width: 100%;
  min-height: 54px;
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0 48px 0 18px;
  background: #f0f1f5;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="dark"] .ops-select select {
  background: #2c303a;
}

.ops-select > span {
  position: absolute;
  top: 50%;
  right: 20px;
  color: #9aa1af;
  pointer-events: none;
  transform: translateY(-50%);
}

.modal-queue-list {
  gap: 28px;
  padding: 10px 22px 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-actions .button {
  width: auto;
  min-width: 112px;
  min-height: 48px;
  border-radius: 12px;
}

.ops-filter-modal {
  width: min(680px, calc(100vw - 48px));
}

.recent-panel {
  margin-bottom: 24px;
}

.recent-head {
  grid-template-columns: 1fr auto auto;
}

.investor-search {
  width: min(100%, 390px);
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 0 14px;
  background: #f0f1f5;
}

body[data-theme="dark"] .investor-search {
  background: #2c303a;
}

.investor-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  font-weight: 500;
  outline: none;
}

.investor-table {
  margin: 28px;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  overflow: hidden;
}

body[data-theme="dark"] .investor-table {
  border-color: #303541;
}

.investor-row {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.8fr 0.8fr 0.8fr auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  padding: 0 18px;
  border-bottom: 1px solid #e9edf2;
  font-size: 14px;
  font-weight: 500;
}

.investor-row:last-child {
  border-bottom: 0;
}

.investor-row.header {
  min-height: 50px;
  color: #111827;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

body[data-theme="dark"] .investor-row {
  border-bottom-color: #303541;
}

body[data-theme="dark"] .investor-row.header {
  color: #f7f8fb;
}

.investor-name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.investor-name > span,
.ranked-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.investor-name > span.multi {
  font-size: 11px;
}

.investor-name strong,
.top-investor-row strong,
.progress-copy strong,
.progress-meta strong {
  font-weight: 500;
  font-size: 14px;
}

.investor-name strong,
.investor-name small,
.top-investor-row strong,
.top-investor-row small {
  display: block;
  line-height: 1.3;
}

.investor-name small,
.top-investor-row small {
  color: #777b8c;
  font-size: 12px;
  font-weight: 600;
}

.soft-badge {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(105, 89, 250, 0.26);
  background: var(--primary-pale);
  color: var(--primary);
}

.soft-badge.red {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fdecec;
  color: #b91c1c;
}

.investor-admin-page {
  min-height: calc(100vh - 64px);
}

.investor-export-button {
  width: auto;
  min-height: 44px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
}

.investor-admin-card {
  overflow: hidden;
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.04);
}

body[data-theme="dark"] .investor-admin-card {
  border-color: #303541;
  box-shadow: none;
}

.investor-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-bottom: 1px solid #e5e8ee;
}

body[data-theme="dark"] .investor-admin-toolbar {
  border-bottom-color: #303541;
}

.investor-admin-toolbar h2 {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.investor-admin-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.investor-admin-search,
.investor-admin-controls select {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #f0f1f5;
  color: var(--charcoal);
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

body[data-theme="dark"] .investor-admin-search,
body[data-theme="dark"] .investor-admin-controls select {
  background: #2c303a;
}

.investor-admin-search {
  width: 330px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.investor-admin-search span {
  color: #8a91a1;
  font-size: 16px;
}

.investor-admin-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
}

.investor-admin-controls select {
  min-width: 150px;
  padding: 0 34px 0 14px;
}

.investor-admin-table-wrap {
  padding: 28px;
  overflow-x: auto;
}

.investor-admin-table {
  min-width: 1260px;
  overflow: visible;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  background: var(--panel);
}

body[data-theme="dark"] .investor-admin-table {
  border-color: #303541;
}

.investor-admin-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 1.65fr 0.8fr 0.72fr 0.86fr 0.86fr 0.78fr 0.7fr 56px;
  gap: 16px;
  align-items: center;
  justify-items: start;
  min-height: 64px;
  padding: 0 12px;
  border-bottom: 1px solid #e5e8ee;
  color: var(--charcoal);
  font-size: 12.5px;
  font-weight: 400;
}

.investor-admin-row > * {
  min-width: 0;
  text-align: left;
  justify-self: start;
}

.investor-admin-row:last-child {
  border-bottom: 0;
}

.investor-admin-row.header {
  min-height: 46px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
}

.investor-admin-row.clickable {
  cursor: pointer;
  transition: background 160ms ease;
}

.investor-admin-row.clickable:hover {
  background: rgba(105, 89, 250, 0.045);
}

body[data-theme="dark"] .investor-admin-row {
  border-bottom-color: #303541;
}

.investor-admin-row .money {
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 600;
  white-space: nowrap;
}

.muted-cell {
  color: #777b8c;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill.green {
  border: 1px solid #65e58a;
  background: #e8faee;
  color: #067536;
}

.status-pill.amber {
  border: 1px solid #efd590;
  background: #fff7e2;
  color: #93670a;
}

.status-pill.red {
  border: 1px solid #ff9b9b;
  background: #fff0f0;
  color: #b91c1c;
}

.status-pill.blue {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.status-pill.purple {
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.status-pill.gray {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #6b7280;
}

.soft-badge.green {
  border-color: #65e58a;
  background: #e8faee;
  color: #067536;
}

.soft-badge.amber {
  border-color: #efd590;
  background: #fff7e2;
  color: #93670a;
}

.soft-badge.blue {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.soft-badge.gray {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #6b7280;
}

.investor-actions {
  position: relative;
  display: flex;
  justify-content: flex-start;
  justify-self: start;
  width: 100%;
}

.investor-menu {
  position: absolute;
  z-index: 80;
  top: 38px;
  right: 8px;
  width: 255px;
  overflow: hidden;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.15);
}

body[data-theme="dark"] .investor-menu {
  border-color: #343844;
  background: #262933;
}

.investor-menu button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  padding: 0 15px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

.investor-menu button:nth-child(4) {
  border-top: 1px solid #e9edf2;
}

body[data-theme="dark"] .investor-menu button:nth-child(4) {
  border-top-color: #343844;
}

.investor-menu button:hover {
  background: rgba(105, 89, 250, 0.08);
}

.investor-menu span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f4f5fb;
  color: #74798a;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.investor-menu svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.investor-menu button:hover span {
  background: var(--primary-pale);
  color: var(--primary);
  transform: translateX(1px);
}

body[data-theme="dark"] .investor-menu span {
  background: #303440;
  color: #9aa2b2;
}

.investor-count {
  margin: -10px 28px 28px;
  color: var(--muted);
  font-size: 13px;
}

.investor-detail-page {
  display: grid;
  gap: 20px;
  padding: 24px 0 36px;
}

.investor-detail-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 0 28px;
}

.investor-back-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-size: 18px;
  font-weight: 400;
}

.investor-back-button:hover {
  background: rgba(105, 89, 250, 0.1);
  color: var(--primary);
}

.investor-detail-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.investor-detail-identity > span {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
}

.investor-detail-identity > span.multi {
  font-size: 12px;
}

.investor-detail-identity h1 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
}

.investor-detail-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.investor-detail-actions {
  display: flex;
  gap: 10px;
}

.investor-detail-actions .button {
  width: auto;
  min-height: 40px;
  gap: 8px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
}

.investor-detail-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.solid-danger {
  border-color: transparent;
  background: #c92d45;
  color: #ffffff;
}

.solid-danger:hover {
  background: #b8263c;
}

.investor-detail-actions .solid-danger,
.investor-detail-actions .solid-danger:hover,
.investor-detail-actions .solid-danger:focus-visible {
  border-color: transparent;
  color: #ffffff;
}

.investor-detail-actions .solid-danger svg {
  stroke: #ffffff;
}

.investor-detail-status-card,
.investor-detail-panel,
.investor-detail-metrics article {
  border: 1px solid #e2e6ed;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.035);
}

body[data-theme="dark"] .investor-detail-status-card,
body[data-theme="dark"] .investor-detail-panel,
body[data-theme="dark"] .investor-detail-metrics article {
  border-color: #303541;
  box-shadow: none;
}

.investor-detail-status-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px;
}

.status-pill.neutral {
  border: 1px solid #e1e4ea;
  background: #ffffff;
  color: var(--charcoal);
}

.investor-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.investor-detail-metrics article {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.detail-metric-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.detail-metric-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-metric-icon.blue {
  background: #eaf1ff;
  color: #356df3;
}

.detail-metric-icon.green {
  background: #e8faee;
  color: #1fa64f;
}

.detail-metric-icon.purple {
  background: var(--primary-pale);
  color: var(--primary);
}

.detail-metric-icon.gray {
  background: #f0f1f5;
  color: #596273;
}

.investor-detail-metrics p,
.investor-detail-metrics small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.investor-detail-metrics strong {
  display: block;
  color: var(--charcoal);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.investor-detail-tabs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border-radius: 16px;
  background: #e9e9ee;
}

body[data-theme="dark"] .investor-detail-tabs {
  background: #2c303a;
}

.investor-detail-tabs button,
.investor-tab-btn {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.investor-detail-tabs button.active,
.investor-tab-btn.active {
  background: var(--panel);
  box-shadow: 0 7px 18px rgba(17, 24, 39, 0.08);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: #e85d04;
  color: #fff;
  line-height: 1;
}

/* Tab panel show/hide */
.investor-tab-panel { display: none; }
.investor-tab-panel.active { display: block; }

/* Table used in Requests and Orders panels */
/* Table wrap gives the same 24px inset as the profile-info-grid */
.inv-tab-table-wrap {
  padding: 0 24px 24px;
  overflow-x: auto;
}

.inv-tab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.inv-tab-table th {
  text-align: left;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  padding-right: 24px;
}
.inv-tab-table th:last-child { padding-right: 0; }

.inv-tab-table td {
  padding: 14px 0;
  padding-right: 24px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
  font-weight: 450;
}
.inv-tab-table td:last-child { padding-right: 0; }

.inv-tab-table tbody tr:last-child td { border-bottom: none; }
.inv-tab-table tbody tr:hover td { background: rgba(105,89,250,0.03); }
.inv-tab-table small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 400; }

.investor-detail-panel {
  overflow: hidden;
}

.investor-detail-panel h2 {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e8ee;
  font-size: 16px;
  font-weight: 600;
}

body[data-theme="dark"] .investor-detail-panel h2 {
  border-bottom-color: #303541;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 64px;
  padding: 24px;
}

.profile-info-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.profile-info-grid strong {
  display: block;
  font-size: 14px;
  font-weight: 450;
}

.kyc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.detail-divider {
  height: 1px;
  margin: 0 24px;
  background: #e5e8ee;
}

.investor-detail-panel h3 {
  margin: 0;
  padding: 20px 24px 8px;
  font-size: 14px;
  font-weight: 600;
}

.investor-detail-panel > p {
  padding: 0 24px 24px;
  font-size: 13px;
}

.bank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px;
  padding: 16px;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
}

.bank-card > span {
  color: #74798a;
}

.bank-card svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bank-card div {
  flex: 1;
}

.bank-card strong,
.bank-card small {
  display: block;
}

.bank-card small {
  color: var(--muted);
  font-size: 12px;
}

.bank-card em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #65e58a;
  border-radius: 10px;
  padding: 0 10px;
  background: #e8faee;
  color: #067536;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
}

.table-icons {
  display: flex;
  gap: 12px;
}

.table-icons button,
.text-button {
  border: 0;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-weight: 600;
}

.text-button {
  color: var(--primary);
  font-weight: 500;
}

.lower {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
}

.deal-progress-list {
  display: grid;
  gap: 14px;
  padding: 26px 28px 30px;
}

.progress-deal {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.deal-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #9f95ff);
  color: white;
  font-weight: 600;
}

.progress-copy strong,
.progress-copy span,
.progress-meta strong,
.progress-meta small {
  display: block;
}

.progress-copy span {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: #eff1f5;
  overflow: hidden;
}

.progress-copy i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.progress-meta {
  text-align: right;
}

.progress-meta small {
  color: #777b8c;
  font-weight: 600;
}

.top-investor-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 42px;
}

.deals-page {
  min-height: 100vh;
}

.deals-table-shell {
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.04);
  overflow: visible;
  padding: 22px;
  width: 100%;
  margin: 0;
}

body[data-theme="dark"] .deals-table-shell {
  border-color: #303541;
  background: #22262f;
}

.deals-table {
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  background: #ffffff;
  overflow: visible;
  width: 100%;
  isolation: isolate;
}

body[data-theme="dark"] .deals-table {
  border-color: #303541;
  background: #22262f;
}

.deal-review-queue {
  margin-bottom: 18px;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

body[data-theme="dark"] .deal-review-queue {
  border-color: #303541;
  background: #22262f;
}

.deal-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e9edf2;
}

body[data-theme="dark"] .deal-review-head {
  border-bottom-color: #303541;
}

.deal-review-head span {
  display: block;
  margin-bottom: 4px;
  color: #777b8c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.deal-review-head strong {
  display: block;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 600;
}

.deal-review-head p {
  max-width: 520px;
  margin: 0;
  color: #777b8c;
  font-size: 12px;
  line-height: 1.5;
}

.deal-review-list {
  display: grid;
  gap: 0;
}

.deal-review-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .9fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e9edf2;
}

.deal-review-card:last-child {
  border-bottom: 0;
}

body[data-theme="dark"] .deal-review-card {
  border-bottom-color: #303541;
}

.deal-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-review-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: rgba(105, 89, 250, .08);
  color: #777b8c;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
}

.deal-review-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.deal-private-monitor {
  border-color: rgba(105, 89, 250, .22);
}

.deal-private-summary {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
}

.deal-private-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(105, 89, 250, .08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
}

.deals-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.05fr) minmax(88px, 0.55fr) minmax(110px, 0.7fr) minmax(0, 1.05fr) minmax(96px, 0.55fr) 52px;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 10px 16px;
  border-bottom: 1px solid #e9edf2;
}

.deals-row > * {
  min-width: 0;
}

.deals-row:last-child {
  border-bottom: 0;
}

body[data-theme="dark"] .deals-row {
  border-bottom-color: #303541;
}

.deals-header {
  min-height: 50px;
  color: #111827;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

body[data-theme="dark"] .deals-header {
  color: #f7f8fb;
}

.deal-record {
  position: relative;
  z-index: 0;
  animation: dashboardFadeUp 480ms ease-out both;
  animation-delay: var(--row-delay);
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.deal-record:hover {
  opacity: 0.72;
  background: rgba(105, 89, 250, 0.04);
}

.deal-record:focus-within {
  position: relative;
  z-index: 25;
  opacity: 1;
}

.deal-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.deal-image {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), transparent 42%),
    linear-gradient(135deg, var(--primary), #9f95ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.deal-identity strong,
.deal-identity small,
.funding-cell strong {
  display: block;
}

.deal-identity strong {
  overflow: hidden;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.deal-identity small {
  margin-top: 2px;
  color: #777b8c;
  font-size: 11px;
}

.deal-buyer,
.deal-date {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-date {
  color: #777b8c;
  white-space: nowrap;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 10px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.stage-pill.verified,
.stage-pill.published {
  border: 1px solid rgba(105, 89, 250, 0.22);
  background: var(--primary-pale);
  color: var(--primary);
}

.stage-pill.review {
  background: #fff7e0;
  color: #9a6700;
}

.stage-pill.private {
  border: 1px solid rgba(105, 89, 250, 0.22);
  background: rgba(105, 89, 250, 0.1);
  color: var(--primary);
}

.stage-pill.draft {
  background: #eaf2ff;
  color: #2563eb;
}

.stage-pill.rejected {
  background: #fdecec;
  color: #b91c1c;
}

.funding-cell strong {
  color: var(--charcoal);
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funding-cell span {
  display: block;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #d8d8dd;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.funding-cell i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
}

body[data-theme="dark"] .funding-cell span {
  background: #383c46;
}

body[data-theme="dark"] .funding-cell i {
  background: #f5f7fb;
}

.deal-actions {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.dots-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dots-button:hover {
  background: rgba(105, 89, 250, 0.1);
  color: var(--primary);
}

.deal-menu {
  position: absolute;
  z-index: 100;
  top: 38px;
  right: 6px;
  width: 260px;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.15);
  overflow: hidden;
  opacity: 1;
  backdrop-filter: none;
}

body[data-theme="dark"] .deal-menu {
  border-color: #343844;
  background: #262933;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.deal-menu-group {
  padding: 8px 0;
  border-bottom: 1px solid #e9edf2;
}

.deal-menu-group:last-child {
  border-bottom: 0;
}

body[data-theme="dark"] .deal-menu-group {
  border-bottom-color: #343844;
}

.deal-menu h3 {
  margin: 0 0 4px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.deal-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font-family: "Be Vietnam Pro", Helvetica, Arial, Lucida, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
}

.deal-menu button:hover {
  background: rgba(105, 89, 250, 0.08);
}

.deal-menu button span {
  width: 18px;
  color: #777b8c;
  font-size: 15px;
  text-align: center;
}

.ranked-avatar {
  position: relative;
}

.ranked-avatar em {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbbf24;
  color: white;
  font-size: 11px;
  font-style: normal;
}

.share-pill {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(105, 89, 250, 0.22);
  background: var(--primary-pale);
  color: var(--primary);
}

@media (max-width: 1100px) {
  .investor-deal-list {
    grid-template-columns: 1fr;
  }

  .metrics,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid,
  .lower {
    grid-template-columns: 1fr;
  }

  .deals-table-shell {
    overflow-x: auto;
  }

  .deals-table {
    min-width: 960px;
  }

  .investor-row {
    grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
  }

  .investor-row > :nth-child(4),
  .investor-row > :nth-child(5) {
    display: none;
  }

  .table-row {
    grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 1fr) minmax(110px, 0.7fr) minmax(128px, 0.8fr);
  }

  .table-row > :nth-child(3),
  .table-row > :nth-child(5),
  .table-row.header > :nth-child(3),
  .table-row.header > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 900px) {
  .investor-app {
    padding: 12px;
  }

  .investor-web-shell {
    min-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .investor-app-header {
    padding: 12px 16px;
  }

  .investor-app-body {
    padding: 22px 18px;
  }

  .investor-app-card {
    min-height: 520px;
  }

  .investor-app-card h1,
  .investor-home h1 {
    font-size: 24px;
  }

  .investor-dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 18px;
    padding: 18px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    min-height: 44px;
    white-space: nowrap;
  }

  .scope-note {
    display: none;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .view:not(#dashboardView) {
    padding: 0;
  }

  .admin-topbar,
  .dashboard-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-topbar {
    top: 12px;
    padding: 16px;
  }

  .deal-form-actions {
    left: 0;
  }

  .deal-stepper {
    top: 0;
    overflow-x: auto;
  }

  .deal-steps {
    min-width: 760px;
  }

  .dashboard-page {
    padding: 18px 0 40px;
  }

  .deals-table-shell {
    padding: 14px;
  }

  .dashboard-heading h1 {
    font-size: 24px;
  }

  .dashboard-heading .subtitle {
    font-size: 13px;
  }

  .admin-stat-card .metric-value {
    font-size: 26px;
  }

  .admin-stat-card .metric-label {
    font-size: 12px;
  }

  .admin-profile {
    padding-left: 0;
    border-left: 0;
  }

  .recent-head {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .investor-search {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }

  .investor-table {
    margin: 16px;
    overflow-x: auto;
  }

  .investor-row {
    min-width: 760px;
  }

  .bar-chart {
    height: 260px;
    padding: 32px 22px 22px;
  }

  .topbar,
  .toolbar,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 28px;
  }

  .search-wrap {
    min-width: 0;
  }

  .button {
    min-height: 44px;
    width: 100%;
  }

  .field-row {
    flex-direction: column;
  }

  .file-item {
    flex-direction: column;
    gap: 2px;
  }

  .metrics,
  .summary-grid,
  .summary-meta,
  .form-grid,
  .auth-grid,
  .investor-layout,
  .investor-card-grid,
  .two-column,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-evidence {
    grid-column: span 1;
  }

  .form-panel,
  .settings-panel,
  .checklist-panel,
  .decision-panel,
  .summary-panel {
    padding: 22px 18px;
  }

  .table-panel {
    border: 0;
    background: transparent;
  }

  .table-row.header {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    background: var(--panel);
  }

  .mobile-label {
    display: block;
    margin-bottom: 1px;
  }

  .row-actions {
    justify-content: stretch;
  }

  .row-actions .button {
    width: auto;
    flex: 1;
  }

  .evidence-row-header,
  .audit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-summary-item {
    grid-template-columns: 1fr;
  }

  .two-factor-card,
  .password-save-card {
    padding: 20px 16px;
  }

  .qr-code {
    width: 150px;
    height: 150px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-actions {
    flex-direction: column;
  }
}

/* ─── Verification redesign ───────────────────────────────────── */

.verify-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.verify-aside {
  position: sticky;
  top: 24px;
}

.verify-deal-card {
  padding: 20px 22px;
}

.verify-deal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.verify-deal-header h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.verify-deal-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #8d7eff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.verify-ring-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.verify-ring {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}

.verify-ring svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.verify-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.verify-ring-row > div > strong {
  display: block;
  font-size: 13px;
}

.verify-ring-row > div > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.decision-panel h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.verify-ready-note {
  margin: 10px 0 0;
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* ─── Quick fill bar ──────────────────────────────────────────── */

.quick-fill-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfe;
}

.quick-fill-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.quick-fill-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
}

.quick-fill-fields .field.compact {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.quick-fill-bar .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ─── Verify checklist ────────────────────────────────────────── */

.verify-checklist {
  display: grid;
  gap: 8px;
}

.verify-check-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 140ms ease;
}

.verify-check-row.is-checked {
  border-color: #d4d0ff;
}

.verify-check-row.is-checked.has-proof {
  border-color: #b7dfc8;
}

.verify-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
}

.verify-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.verify-check-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.verify-check-number {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.verify-check-row.is-checked .verify-check-number {
  background: var(--primary-soft);
  color: var(--primary);
}

.verify-check-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
}

.verify-check-stamp {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  flex-shrink: 0;
}

.verify-check-stamp .dot {
  margin: 0;
}

.verify-check-pending {
  color: var(--muted);
  font-size: 11.5px;
  font-style: italic;
}

.verify-proof-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 16px 13px;
}

.verify-proof-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #f7f8fb;
  color: var(--charcoal);
  font: inherit;
  font-size: 12.5px;
  resize: vertical;
  transition: border-color 140ms ease;
}

.verify-proof-input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}

.verify-proof-input::placeholder {
  color: #b0b8c8;
}

.proof-ok {
  flex: 0 0 auto;
  margin-top: 10px;
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .verify-shell {
    grid-template-columns: 1fr;
  }

  .verify-aside {
    position: static;
  }

  .quick-fill-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-fill-fields {
    flex-direction: column;
  }
}

/* ─── Investor activity by deal ───────────────────────────────── */

.activity-section {
  margin-top: 0;
}

.activity-group-list {
  display: grid;
  gap: 0;
}

.activity-deal-group {
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
}

.activity-deal-group:first-child {
  border-top: 0;
  padding-top: 4px;
}

.activity-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.activity-group-head strong {
  font-size: 13px;
  font-weight: 700;
}

.activity-rows {
  display: grid;
  gap: 2px;
}

.activity-row {
  display: grid;
  grid-template-columns: 130px minmax(100px, 1fr) minmax(160px, 1.4fr) 130px 110px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  font-size: 12.5px;
  transition: background 120ms ease;
}

.activity-row:hover {
  background: var(--bg);
}

.activity-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 0 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.investor-activity-list {
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

.investor-activity-row {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 450;
}

.investor-activity-row:last-child {
  border-bottom: none;
}

.investor-activity-deal {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pending demo requests panel */
.pending-demos-card {
  border-left: 3px solid var(--primary);
}

.pending-demos-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-demos-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pending-demos-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 12px;
}

.pending-demo-row {
  display: grid;
  grid-template-columns: 40px 200px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.pending-demo-row:last-child {
  border-bottom: none;
}

.pending-demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.pending-demo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pending-demo-info strong {
  font-size: 13px;
  font-weight: 600;
}

.pending-demo-info span {
  font-size: 12px;
  color: var(--muted);
}

.pending-demo-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pending-demo-notes {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-demo-date {
  font-size: 12px;
  white-space: nowrap;
}

.pending-demo-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.button.small {
  padding: 5px 12px;
  font-size: 12px;
}

/* Nav badge */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.nav-badge.hidden {
  display: none;
}

/* Demo requests view */
.demo-req-card {
  overflow: hidden;
}

.demo-req-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-req-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 32px;
  gap: 12px;
}

.demo-req-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-pale, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.demo-req-empty h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.demo-req-empty p {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 360px;
  line-height: 1.6;
  margin: 0;
}

.demo-req-group {
  border-bottom: 1px solid #e5e8ee;
}

body[data-theme="dark"] .demo-req-group {
  border-bottom-color: #303541;
}

.demo-req-group:last-child {
  border-bottom: none;
}

.demo-req-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 28px 14px;
}

.demo-req-group-header h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0;
}

.demo-req-group-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.demo-req-group-dot.dot-pending {
  background: var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

.demo-req-group-dot.dot-amber { background: #f59e0b; }
.demo-req-group-dot.dot-blue { background: #3b82f6; }
.demo-req-group-dot.dot-green { background: #10b981; }
.demo-req-group-dot.dot-red { background: #ef4444; }
.demo-req-group-dot.dot-muted { background: #cbd5e1; }

.demo-req-table-head {
  display: grid;
  grid-template-columns: 44px 200px 120px 140px 1fr 100px 160px;
  gap: 16px;
  align-items: center;
  padding: 0 28px 10px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-req-row {
  display: grid;
  grid-template-columns: 44px 200px 120px 140px 1fr 100px 160px;
  gap: 16px;
  align-items: center;
  padding: 14px 28px;
  border-top: 1px solid #f0f2f5;
  font-size: 13px;
  transition: background 140ms ease;
}

body[data-theme="dark"] .demo-req-row {
  border-top-color: #2c303a;
}

.demo-req-row:hover {
  background: rgba(105, 89, 250, 0.03);
}

.demo-req-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-pale, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.demo-req-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.demo-req-identity strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-req-identity span {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-req-location,
.demo-req-interest {
  display: flex;
  align-items: center;
}

.demo-req-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-req-tag-geo {
  background: #f0f1f5;
  color: #555b6e;
}

body[data-theme="dark"] .demo-req-tag-geo {
  background: #2c303a;
  color: #a0a7b8;
}

.demo-req-tag-interest {
  background: #ede9fe;
  color: #5b21b6;
}

body[data-theme="dark"] .demo-req-tag-interest {
  background: rgba(105, 89, 250, 0.18);
  color: #a78bfa;
}

.demo-req-notes {
  min-width: 0;
}

.demo-req-note-text {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.demo-req-admin-note {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-req-date {
  font-size: 12px;
  white-space: nowrap;
}

.demo-req-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.demo-req-status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.demo-req-status-pill.pill-green {
  background: #d1fae5;
  color: #065f46;
}

.demo-req-status-pill.pill-muted {
  background: #f0f2f5;
  color: var(--muted);
}

.demo-req-actions .demo-schedule-trigger {
  border-color: rgba(105, 89, 250, 0.26);
  background: rgba(105, 89, 250, 0.08);
  color: var(--primary);
  font-weight: 650;
}

.demo-req-actions .demo-schedule-trigger:hover {
  border-color: rgba(105, 89, 250, 0.4);
  background: rgba(105, 89, 250, 0.13);
}

.demo-req-schedule-panel,
.demo-req-approve-panel {
  grid-column: 2 / -1;
  padding: 6px 0 4px;
}

.demo-schedule-form,
.demo-approve-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  padding: 16px;
}

.demo-schedule-form {
  display: grid;
  gap: 12px;
  max-width: 760px;
  padding: 14px;
  border-radius: 16px;
}

.demo-schedule-head,
.demo-schedule-body,
.demo-schedule-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-schedule-head {
  justify-content: space-between;
}

.demo-schedule-head .icon-only {
  width: 28px;
  height: 28px;
  font-size: 18px;
  color: var(--muted);
}

.demo-schedule-body {
  justify-content: space-between;
  align-items: flex-end;
}

.demo-schedule-message {
  border: 1px solid rgba(105, 89, 250, 0.16);
  border-radius: 12px;
  background: rgba(105, 89, 250, 0.055);
  padding: 12px 14px;
}

.demo-schedule-message span,
.demo-schedule-message p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.demo-schedule-message strong {
  display: block;
  margin: 3px 0 5px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 650;
}

.demo-schedule-link {
  text-decoration: none;
}

.demo-schedule-presets {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.demo-schedule-presets button {
  border: 1px solid rgba(105, 89, 250, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(105, 89, 250, 0.06);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.demo-schedule-presets button:hover,
.demo-schedule-presets button.active {
  border-color: rgba(105, 89, 250, 0.42);
  background: rgba(105, 89, 250, 0.12);
}

.demo-schedule-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-schedule-fields label {
  display: grid;
  gap: 4px;
  min-width: 118px;
}

.demo-schedule-note {
  flex: 1;
}

.demo-schedule-head strong,
.demo-approve-head strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--charcoal);
}

.demo-schedule-head span,
.demo-approve-head span,
.demo-schedule-form label span,
.demo-approve-note span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.demo-schedule-form input,
.demo-approve-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--charcoal);
}

.demo-approve-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.demo-role-grid label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.demo-role-grid label:hover {
  border-color: rgba(105, 89, 250, 0.45);
  background: rgba(105, 89, 250, 0.04);
}

.demo-role-grid input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.demo-role-grid strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--charcoal);
}

.demo-role-grid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.demo-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.demo-approve-note {
  display: grid;
  gap: 6px;
}

body[data-theme="dark"] .demo-schedule-form,
body[data-theme="dark"] .demo-approve-form,
body[data-theme="dark"] .demo-role-grid label {
  background: var(--panel);
}

@media (max-width: 1180px) {
  .demo-schedule-body,
  .demo-schedule-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .demo-schedule-fields {
    align-items: stretch;
  }
  .demo-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Summary page redesign ─────────────────────────────── */
.summary-page { padding-bottom: 60px; }

.summary-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.summary-header-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-deal-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-page-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.summary-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-stale-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 600;
}

.summary-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.summary-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.summary-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #555b6e;
  font-size: 12px;
  font-weight: 500;
}

body[data-theme="dark"] .summary-meta-chip {
  background: #2c303a;
  color: #a0a7b8;
}

.summary-risk-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.summary-risk-chip.risk-green { background: #d1fae5; color: #065f46; }
.summary-risk-chip.risk-amber { background: #fef3c7; color: #92400e; }
.summary-risk-chip.risk-red   { background: #fee2e2; color: #991b1b; }

.summary-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.summary-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #e2e6ed;
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(17,24,39,0.04);
}

body[data-theme="dark"] .summary-stat-card {
  border-color: #303541;
}

.summary-stat-card p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 3px;
  font-weight: 500;
}

.summary-stat-card strong {
  font-size: 15px;
  font-weight: 700;
}

.summary-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.summary-main { display: flex; flex-direction: column; gap: 16px; }
.summary-aside { display: flex; flex-direction: column; gap: 16px; }

.summary-section { overflow: hidden; }

.summary-section-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e8ee;
}

body[data-theme="dark"] .summary-section-head {
  border-bottom-color: #303541;
}

.summary-section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.summary-section-body {
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-description {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--charcoal);
  margin: 0;
}

.summary-description.note-warning {
  color: #b91c1c;
  background: #fef2f2;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid #ef4444;
}

.summary-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f5;
}

.summary-field-row:last-child { border-bottom: none; }

.summary-field-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.summary-field-row strong {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

.summary-ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-ring-wrap .verify-ring { width: 60px; height: 60px; }
.summary-ring-wrap .verify-ring span { font-size: 11px; }

.summary-holder-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-holder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-pale, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.summary-evidence-list {
  display: flex;
  flex-direction: column;
}

.summary-evidence-row {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
}

.summary-evidence-row:last-child { border-bottom: none; }

.summary-check-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.summary-check-dot.dot-complete { background: #10b981; }
.summary-check-dot.dot-partial  { background: #f59e0b; }
.summary-check-dot.dot-empty    { background: #e2e6ed; border: 1px solid #cbd5e1; }

.summary-evidence-info strong { font-size: 13px; font-weight: 500; display: block; }
.summary-evidence-info p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

.summary-evidence-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.summary-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.summary-chip.complete { background: #d1fae5; color: #065f46; }
.summary-chip.partial  { background: #fef3c7; color: #92400e; }
.summary-chip.missing  { background: #f0f2f5; color: var(--muted); }

.summary-audit-list {
  padding: 4px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-audit-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  position: relative;
}

.summary-audit-row:last-child { border-bottom: none; }

.summary-audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 5px;
  flex-shrink: 0;
}

.summary-audit-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-audit-body strong { font-size: 12.5px; font-weight: 600; }
.summary-audit-body span   { font-size: 11.5px; color: var(--muted); }
.summary-audit-body p      { font-size: 12px; color: var(--muted); margin: 2px 0 0; line-height: 1.5; }

.summary-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 32px;
  gap: 14px;
}

.summary-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-pale, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Contract Holders page ─────────────────────────────── */
.holders-table {
  min-width: 1100px;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

body[data-theme="dark"] .holders-table { border-color: #303541; }

.holders-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr 1fr 0.5fr 0.8fr 1fr 0.8fr 1fr 0.8fr;
  gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 0 16px;
  border-bottom: 1px solid #e5e8ee;
  font-size: 12.5px;
}

body[data-theme="dark"] .holders-row { border-bottom-color: #303541; }
.holders-row:last-child { border-bottom: none; }

.holders-row.header {
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--muted);
  background: #fafbfc;
}

body[data-theme="dark"] .holders-row.header { background: #1e2028; }

.holders-row.clickable {
  cursor: pointer;
  transition: background 140ms ease;
}

.holders-row.clickable:hover { background: rgba(105,89,250,0.04); }

.holder-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.holder-pill.pill-verified  { background: #d1fae5; color: #065f46; }
.holder-pill.pill-pending   { background: #fef3c7; color: #92400e; }
.holder-pill.pill-requires  { background: #fee2e2; color: #991b1b; }
.holder-pill.pill-failed    { background: #fee2e2; color: #991b1b; }
.holder-pill.pill-low       { background: #d1fae5; color: #065f46; }
.holder-pill.pill-medium    { background: #fef3c7; color: #92400e; }
.holder-pill.pill-high      { background: #fee2e2; color: #991b1b; }

.holder-type-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

body[data-theme="dark"] .holder-type-tag {
  background: rgba(105,89,250,0.18);
  color: #a78bfa;
}

.holder-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.holder-status-dot.dot-active    { background: #10b981; }
.holder-status-dot.dot-review    { background: #f59e0b; }
.holder-status-dot.dot-inactive  { background: #94a3b8; }
.holder-status-dot.dot-suspended { background: #ef4444; }

.holder-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.holder-checklist-item.done { color: var(--charcoal); }

.holder-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: #e5e8ee;
  color: var(--muted);
}

.holder-checklist-item.done .holder-check-icon {
  background: #d1fae5;
  color: #065f46;
}

@media (max-width: 1100px) {
  .summary-stat-row { grid-template-columns: repeat(2, 1fr); }
  .summary-body { grid-template-columns: 1fr; }
  .summary-aside { order: -1; }
}

/* ── Notification bell ───────────────────────────────────── */
.notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-bell-btn,
.icon-button.notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted, #666);
  transition: background 0.15s, color 0.15s;
}

.notif-bell-btn:hover,
.icon-button.notif-bell-btn:hover {
  background: var(--hover, #f4f5f7);
  color: var(--text, #111);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--bg, #fff);
}

.notif-badge.hidden { display: none; }

.notif-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--bg, #fff);
}

.notif-dot.hidden { display: none; }

/* ── Notification dropdown (position:fixed, placed via JS) ── */
.notif-dropdown {
  position: fixed;
  z-index: 900;
  width: 340px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e5e8ee);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}

.notif-dropdown.hidden { display: none; }

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line, #e5e8ee);
}

.notif-dropdown-header strong {
  font-size: 14px;
  font-weight: 700;
}

.notif-mark-read {
  font-size: 12px;
  color: var(--primary, #6959fa);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.notif-mark-read:hover { background: rgba(105,89,250,0.08); }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-empty {
  text-align: center;
  color: var(--muted, #888);
  font-size: 13px;
  padding: 24px 16px;
  margin: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line, #e5e8ee);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover, #f4f5f7); }

.notif-item-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #6959fa);
  margin-top: 5px;
}
.notif-dot-commit { background: #e85d04; }
.notif-dot-docs   { background: #2563eb; }

.notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text, #111);
}

.notif-item-body strong { font-weight: 600; }
.notif-item-body em { font-style: normal; color: var(--primary, #6959fa); }

.notif-item-time {
  font-size: 11px;
  color: var(--muted, #888);
  margin-top: 2px;
}

/* ── Operator KYC detail panel ───────────────────────────── */
.kyc-op-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
}

.kyc-op-empty svg { opacity: 0.35; }
.kyc-op-empty p { margin: 0; font-size: 13px; max-width: 320px; line-height: 1.6; }

.kyc-op-submitted { padding: 0 24px 24px; }

.kyc-op-submitted-date {
  margin: 0 0 20px;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kyc-op-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.kyc-op-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.kyc-op-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

.kyc-op-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
}

.kyc-op-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kyc-op-field span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kyc-op-field strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.kyc-op-doc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kyc-op-doc span:first-child {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kyc-doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.kyc-doc-badge.uploaded {
  background: rgba(22, 128, 60, 0.1);
  color: #16803c;
}

.kyc-doc-badge.missing {
  background: rgba(156, 163, 175, 0.15);
  color: var(--muted);
}

/* declarations */
.kyc-op-declarations {
  grid-template-columns: 1fr;
  gap: 8px;
}

.kyc-op-decl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.kyc-op-decl.ok {
  background: rgba(22, 128, 60, 0.07);
  color: #16803c;
}

.kyc-op-decl.warn {
  background: rgba(234, 179, 8, 0.1);
  color: #9a6a12;
}

.kyc-op-decl span:first-child {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.kyc-op-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

/* ── Compliance view ─────────────────────────────────────────── */
.compliance-page {
  padding: 28px 32px;
  max-width: 1100px;
}

.compliance-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.compliance-page-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 2px;
}

.compliance-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.compliance-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.compliance-tab:hover {
  background: var(--bg);
  color: var(--charcoal);
}

.compliance-tab.active {
  background: var(--bg);
  border-color: var(--line);
  color: var(--charcoal);
  font-weight: 600;
}

.compliance-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary, #6959fa);
  color: #fff;
}

.compliance-tab-badge-warn { background: #e85d04; }
.compliance-tab-badge-zero { background: var(--surface-3, #e5e7eb); color: var(--muted); }

.compliance-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.compliance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.compliance-card-header strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.compliance-card-header p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

.compliance-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.compliance-search {
  padding: 7px 10px 7px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--charcoal);
  width: 190px;
}

.compliance-select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--charcoal);
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.compliance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compliance-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.compliance-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.compliance-table tbody tr:last-child td { border-bottom: none; }

.compliance-table tbody tr:hover td { background: var(--bg); }

.compliance-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compliance-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary, #6959fa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.compliance-avatar.lg {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.compliance-user strong { display: block; font-size: 13px; }
.compliance-user small { color: var(--muted); font-size: 11px; }

.compliance-date { font-size: 12px; color: var(--muted); }

.compliance-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.pill-pending    { background: rgba(105, 89, 250, 0.1); color: var(--primary, #6959fa); }
.pill-approved   { background: rgba(22, 128, 60, 0.1); color: #16803c; }
.pill-rejected   { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.pill-resubmit   { background: rgba(234, 179, 8, 0.1); color: #9a6a12; }
.pill-risk-low   { background: rgba(22, 128, 60, 0.1); color: #16803c; }
.pill-risk-med   { background: rgba(234, 179, 8, 0.1); color: #9a6a12; }
.pill-risk-high  { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.compliance-pep-tag {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  margin-left: 4px;
  vertical-align: middle;
}

.compliance-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.compliance-action-wrap { position: relative; }

.compliance-action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  overflow: hidden;
}

.compliance-action-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  text-align: left;
  background: none;
  border: none;
  color: var(--charcoal);
  cursor: pointer;
}

.compliance-action-menu button:hover { background: var(--bg); }
.compliance-action-menu button.danger { color: #dc2626; }

.compliance-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.compliance-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 32px;
  color: var(--muted);
  text-align: center;
}

.compliance-flag-reason {
  font-size: 12px;
  color: var(--muted);
}

.compliance-audit-action { font-size: 12px; font-weight: 600; }
.compliance-audit-action.approved { color: #16803c; }
.compliance-audit-action.rejected { color: #dc2626; }
.compliance-audit-action.needs_resubmission { color: #9a6a12; }
.compliance-audit-notes { font-size: 12px; color: var(--muted); }

/* Detail slide-over */
/* Detail panel — overlay + drawer */
.compliance-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
}

.compliance-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 96vw;
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 401;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* children scroll, not panel */
}

/* sticky header */
.cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.cd-head .compliance-user strong { font-size: 14px; }
.cd-head .compliance-user small  { font-size: 12px; color: var(--muted); }

.cd-close { flex-shrink: 0; }

/* pills row under header */
.cd-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  flex-shrink: 0;
  background: var(--bg);
}

/* review note banner */
.cd-review-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(234, 179, 8, 0.07);
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  font-size: 12px;
  color: #9a6a12;
  flex-shrink: 0;
}

/* scrollable body */
.cd-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: 8px;
}

/* each KYC section */
.cd-section {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.cd-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* 2-column field grid */
.cd-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 12px;
}

.cd-field-grid:last-child { margin-bottom: 0; }

.cd-field { display: flex; flex-direction: column; gap: 3px; }

.cd-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cd-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}

/* document upload badge in grid */
.cd-doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.cd-doc-badge.uploaded { background: rgba(22, 128, 60, 0.12); color: #16803c; }
.cd-doc-badge.missing  { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

/* declaration rows */
.cd-decl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.cd-decl:last-child { margin-bottom: 0; }

.cd-decl.ok   { background: rgba(22, 128, 60, 0.07); color: var(--charcoal); }
.cd-decl.warn { background: rgba(234, 179, 8, 0.08); color: var(--charcoal); }

.cd-decl-icon {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.cd-decl.ok   .cd-decl-icon { color: #16803c; }
.cd-decl.warn .cd-decl-icon { color: #9a6a12; }

/* sticky action bar */
.cd-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.cd-actions .button { flex: 1; justify-content: center; }

/* ── Deal Source card ────────────────────────────────────── */
.deal-source-card .summary-section-head h2 {
  display: flex;
  align-items: center;
}

.deal-source-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.deal-source-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: .01em;
}

.deal-source-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
}

body[data-theme="dark"] .deal-source-note {
  border-top-color: #2d3038;
}

/* ── New Partner modal form grid ─────────────────────────── */
#newPartnerForm .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

#newPartnerForm .field.span-2 {
  grid-column: 1 / -1;
}

#newPartnerForm .field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

#newPartnerForm .field input,
#newPartnerForm .field select,
#newPartnerForm .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--charcoal);
  background: var(--bg);
  outline: none;
  transition: border-color 0.13s;
  box-sizing: border-box;
}

#newPartnerForm .field input:focus,
#newPartnerForm .field select:focus,
#newPartnerForm .field textarea:focus {
  border-color: var(--primary);
}

#newPartnerForm .field.invalid input,
#newPartnerForm .field.invalid select {
  border-color: #e53e3e;
}

#newPartnerForm .error {
  font-size: 11.5px;
  color: #e53e3e;
  margin-top: 4px;
  min-height: 16px;
}

#newPartnerForm textarea {
  resize: vertical;
}

/* ─── Login portal entry links ────────────────────────────────── */
.login-portal-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.login-portal-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--charcoal);
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.login-portal-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(105,89,250,.08);
}

/* ─── Holder Portal — Login ────────────────────────────────────── */
.hp-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
}

.hp-login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.hp-login-card h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--charcoal);
}

.hp-login-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.hp-login-card .login-card,
.hp-login-card form {
  text-align: left;
}

.hp-login-card .button.primary.login-button {
  width: 100%;
  margin-top: 4px;
}

.hp-demo-accounts {
  margin-top: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-demo-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.hp-demo-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s;
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
}

.hp-demo-chip:hover {
  border-color: var(--primary);
}

.hp-demo-av {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.hp-demo-chip strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}

.hp-demo-chip small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.hp-back-link {
  display: block;
  margin-top: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.hp-back-link:hover { color: var(--primary); }

/* ─── Holder Portal — Sidebar + tabs layout ─────────────────────── */
.hp-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f6f8;
  font-family: "Open Sans", Arial, sans-serif;
}

body[data-theme="dark"] .hp-app { background: #15161a; }

/* ── Header ── */
.hp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e2e6ed;
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
}

body[data-theme="dark"] .hp-header { background: #1a1d24; border-bottom-color: #303541; }

.hp-header-left { display: flex; align-items: center; gap: 10px; }

.hp-sidebar-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.hp-sidebar-toggle:hover { background: #f3f4f6; color: #111827; }
body[data-theme="dark"] .hp-sidebar-toggle { color: #7a8499; }
body[data-theme="dark"] .hp-sidebar-toggle:hover { background: #22262f; color: #f7f8fb; }

.hp-header-brand {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

body[data-theme="dark"] .hp-header-brand { color: #f7f8fb; }

.hp-header-divider { color: #d1d5db; font-size: 18px; line-height: 1; }
.hp-header-sub { font-size: 13px; color: #6b7280; font-weight: 500; }
.hp-header-right { display: flex; align-items: center; gap: 14px; }
.hp-header-user { display: flex; align-items: center; gap: 10px; }

.hp-user-av {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.hp-user-info { max-width: 180px; overflow: hidden; }

.hp-user-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .hp-user-info strong { color: #f7f8fb; }
.hp-user-info span { display: block; font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hp-signout-btn {
  border: 1px solid #e2e6ed;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  padding: 7px 14px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.hp-signout-btn:hover { background: #f5f6f8; border-color: #c7ccd5; }
body[data-theme="dark"] .hp-signout-btn { border-color: #303541; color: #c9d1e0; }
body[data-theme="dark"] .hp-signout-btn:hover { background: #22262f; }

/* ── Body: sidebar + main ── */
.hp-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ── */
.hp-sidebar-nav {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e6ed;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  transition: width 200ms ease;
  z-index: 100;
}

body[data-theme="dark"] .hp-sidebar-nav { background: #1a1d24; border-right-color: #303541; }

.hp-sidebar-nav nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 2px;
  flex: 1;
}

.hp-sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background 150ms, color 150ms;
  width: 100%;
}

.hp-sidebar-item:hover { background: #f3f4f6; color: #111827; }
.hp-sidebar-item.active { background: var(--primary-pale, #ede9ff); color: var(--primary); }
.hp-sidebar-item.active .hp-sidebar-icon { color: var(--primary); }

body[data-theme="dark"] .hp-sidebar-item { color: #9ba5b8; }
body[data-theme="dark"] .hp-sidebar-item:hover { background: #22262f; color: #f7f8fb; }
body[data-theme="dark"] .hp-sidebar-item.active { background: rgba(105, 89, 250, 0.15); color: #9f8fff; }

.hp-sidebar-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ba5b8;
  transition: color 150ms;
}

.hp-sidebar-item:hover .hp-sidebar-icon { color: #374151; }
body[data-theme="dark"] .hp-sidebar-item:hover .hp-sidebar-icon { color: #f7f8fb; }

.hp-sidebar-label { flex: 1; transition: opacity 150ms; }

.hp-sidebar-foot {
  padding: 8px;
  border-top: 1px solid #e9edf2;
}

body[data-theme="dark"] .hp-sidebar-foot { border-top-color: #303541; }

.hp-sidebar-signout .hp-sidebar-icon { color: #ef4444; }
.hp-sidebar-signout { color: #ef4444; }
.hp-sidebar-signout:hover { background: #fef2f2; color: #dc2626; }
body[data-theme="dark"] .hp-sidebar-signout { color: #f87171; }
body[data-theme="dark"] .hp-sidebar-signout:hover { background: rgba(239,68,68,0.12); }

/* ── Collapsed sidebar ── */
.hp-sidebar-collapsed .hp-sidebar-nav {
  width: 56px;
}

.hp-sidebar-collapsed .hp-sidebar-label { opacity: 0; width: 0; overflow: hidden; }
.hp-sidebar-collapsed .hp-sidebar-item { padding: 9px; justify-content: center; gap: 0; }
.hp-sidebar-collapsed .hp-sidebar-icon { width: auto; }

/* ── Main content ── */
.hp-main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hp-page-head {
  background: #fff;
  border-bottom: 1px solid #e2e6ed;
  padding: 22px 32px 0;
  position: sticky;
  top: 56px;
  z-index: 90;
}

body[data-theme="dark"] .hp-page-head { background: #1a1d24; border-bottom-color: #303541; }

.hp-page-title {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
}

body[data-theme="dark"] .hp-page-title { color: #f7f8fb; }

/* ── Horizontal tabs ── */
.hp-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
}

.hp-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
}

.hp-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.hp-tab:hover:not(.active) { color: #374151; }

body[data-theme="dark"] .hp-tab { color: #7a8499; }
body[data-theme="dark"] .hp-tab.active { color: #9f8fff; border-bottom-color: #9f8fff; }
body[data-theme="dark"] .hp-tab:hover:not(.active) { color: #c9d1e0; }

.hp-tab svg { opacity: 0.7; }
.hp-tab.active svg { opacity: 1; }

.hp-panel { display: none; }
.hp-panel.active { display: block; }

.hp-tab-content { padding: 28px 32px 60px; }

.hp-stats-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}

body[data-theme="dark"] .hp-stats-strip { background: #1a1d24; border-color: #303541; }

.hp-stat-cell {
  padding: 16px 20px;
  border-right: 1px solid #e9edf2;
}

body[data-theme="dark"] .hp-stat-cell { border-right-color: #303541; }
.hp-stat-cell:last-child { border-right: 0; }

.hp-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-stat-value {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 6px;
}

body[data-theme="dark"] .hp-stat-value { color: #f7f8fb; }

.hp-stat-trend { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.hp-stat-trend-val { font-weight: 700; }
.hp-stat-trend-val.up { color: #22c55e; }
.hp-stat-trend-val.down { color: #ef4444; }
.hp-stat-trend-val.neutral { color: #9ca3af; }
.hp-stat-trend-from { color: #9ca3af; }

.hp-charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.hp-chart-card {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  padding: 20px 22px;
}

body[data-theme="dark"] .hp-chart-card { background: #1a1d24; border-color: #303541; }

.hp-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hp-chart-head strong { font-size: 13.5px; font-weight: 700; color: #111827; }
body[data-theme="dark"] .hp-chart-head strong { color: #f7f8fb; }
.hp-chart-head span { font-size: 11.5px; color: #9ca3af; }

.hp-hbar-row {
  display: grid;
  grid-template-columns: 100px 1fr 28px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hp-hbar-row:last-child { margin-bottom: 0; }

.hp-hbar-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .hp-hbar-label { color: #9ca3af; }

.hp-hbar-track {
  height: 8px;
  background: #f1f3f7;
  border-radius: 6px;
  overflow: hidden;
}

body[data-theme="dark"] .hp-hbar-track { background: #303541; }

.hp-hbar-fill {
  height: 100%;
  border-radius: 6px;
  min-width: 3px;
  transition: width 600ms cubic-bezier(0.4,0,0.2,1);
}

.hp-hbar-val { font-size: 12px; font-weight: 700; color: #111827; text-align: right; }
body[data-theme="dark"] .hp-hbar-val { color: #f7f8fb; }

.hp-doccheck-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f7;
}

body[data-theme="dark"] .hp-doccheck-row { border-bottom-color: #22262f; }
.hp-doccheck-row:last-child { border-bottom: 0; }

.hp-doccheck-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
}

.hp-doccheck-icon.done { background: #22c55e; border-color: #22c55e; color: #fff; }

.hp-doccheck-label {
  flex: 1;
  font-size: 12.5px;
  color: #374151;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .hp-doccheck-label { color: #c9d1e0; }
.hp-doccheck-label.done { color: #9ca3af; text-decoration: line-through; }

.hp-doccheck-status { font-size: 11px; font-weight: 600; white-space: nowrap; }
.hp-doccheck-status.submitted { color: #22c55e; }
.hp-doccheck-status.pending { color: #f59e0b; }

.hp-chart-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid #f1f3f7;
  font-size: 12px;
}

body[data-theme="dark"] .hp-chart-total { border-top-color: #303541; }
.hp-chart-total span { color: #6b7280; }
.hp-chart-total strong { font-weight: 700; color: #111827; }
body[data-theme="dark"] .hp-chart-total strong { color: #f7f8fb; }

.hp-section-card {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}

body[data-theme="dark"] .hp-section-card { background: #1a1d24; border-color: #303541; }

.hp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #e9edf2;
}

body[data-theme="dark"] .hp-section-head { border-bottom-color: #303541; }
.hp-section-head strong { font-size: 13.5px; font-weight: 700; color: #111827; }
body[data-theme="dark"] .hp-section-head strong { color: #f7f8fb; }
.hp-section-head span { font-size: 12px; color: #9ca3af; }
.hp-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.hp-activity-shell {
  display: grid;
  gap: 16px;
}

.hp-activity-hero {
  margin-bottom: 0;
}

.hp-activity-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hp-activity-kpi {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  padding: 15px 16px;
  min-width: 0;
}

body[data-theme="dark"] .hp-activity-kpi {
  background: #1a1d24;
  border-color: #303541;
}

.hp-activity-kpi span {
  display: block;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.hp-activity-kpi strong {
  display: block;
  color: #111827;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

body[data-theme="dark"] .hp-activity-kpi strong { color: #f7f8fb; }

.hp-activity-kpi small {
  display: block;
  margin-top: 7px;
  color: #8b93a7;
  font-size: 11.5px;
  font-weight: 500;
}

.hp-activity-list {
  display: grid;
}

.hp-activity-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(260px, 1.35fr) 110px minmax(360px, auto);
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid #edf0f5;
}

.hp-activity-row:last-child { border-bottom: 0; }
.hp-activity-row.is-new { background: linear-gradient(90deg, rgba(105, 89, 250, 0.06), transparent 48%); }

body[data-theme="dark"] .hp-activity-row {
  border-bottom-color: #303541;
}

.hp-activity-investor {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.hp-activity-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary-pale, #ede9ff);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.hp-activity-investor strong,
.hp-activity-line strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .hp-activity-investor strong,
body[data-theme="dark"] .hp-activity-line strong {
  color: #f7f8fb;
}

.hp-activity-investor span:not(.hp-activity-avatar),
.hp-activity-meta {
  color: #6b7280;
  font-size: 11.5px;
  font-weight: 500;
}

.hp-activity-main {
  min-width: 0;
}

.hp-activity-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.hp-activity-type {
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--primary-pale, #ede9ff);
  border: 1px solid rgba(105, 89, 250, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.hp-activity-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  min-width: 0;
}

.hp-activity-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-activity-status {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.hp-activity-status.purple { color: var(--primary); background: var(--primary-pale, #ede9ff); }
.hp-activity-status.green { color: #15803d; background: #dcfce7; }
.hp-activity-status.neutral { color: #4b5563; background: #eef1f5; }

.hp-activity-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-deal-row {
  display: grid;
  grid-template-columns: 42px 1fr 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px 0;
}

.hp-deal-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(145deg, rgba(255,255,255,0.2), transparent 40%), linear-gradient(135deg, var(--primary), #9f95ff);
}

.hp-deal-info { min-width: 0; }

.hp-deal-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .hp-deal-info strong { color: #f7f8fb; }
.hp-deal-info span { font-size: 12px; color: #6b7280; }

.hp-deal-pipeline-mini { min-width: 0; overflow: hidden; }
.hp-deal-pipeline-mini .hp-pipeline { transform: scale(0.82); transform-origin: left center; }

.hp-deal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.hp-deal-amount {
  font-size: 15px;
  font-weight: 700;
  font-family: "Open Sans", Arial, sans-serif;
  color: #111827;
}

body[data-theme="dark"] .hp-deal-amount { color: #f7f8fb; }
.hp-deal-return { font-size: 12px; color: #6b7280; }

.hp-deal-meta-row {
  display: flex;
  gap: 0;
  padding: 12px 22px 16px 80px;
  border-bottom: 1px solid #f1f3f7;
}

body[data-theme="dark"] .hp-deal-meta-row { border-bottom-color: #303541; }

.hp-deal-meta-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

body[data-theme="dark"] .hp-deal-meta-row span { color: #e5e9f2; }

.hp-deal-meta-row label {
  font-size: 10.5px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}

.hp-followup-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 22px;
  border-bottom: 1px solid #f1f3f7;
}

body[data-theme="dark"] .hp-followup-row { border-bottom-color: #303541; }
.hp-followup-row:last-child { border-bottom: 0; }

.hp-followup-amt { font-size: 13.5px; font-weight: 700; color: #111827; white-space: nowrap; }
body[data-theme="dark"] .hp-followup-amt { color: #f7f8fb; }

.hp-pipeline { display: flex; align-items: center; }

.hp-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }

.hp-stage-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line, #e2e6ed);
  background: var(--bg, #fff);
  color: var(--muted, #8b93a7);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  transition: all .2s;
}

.hp-stage.done .hp-stage-dot { background: var(--success, #22c55e); border-color: var(--success, #22c55e); color: #fff; }
.hp-stage.active .hp-stage-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(105,89,250,.18); }

.hp-stage > span { font-size: 10.5px; font-weight: 500; color: var(--muted, #8b93a7); white-space: nowrap; }
.hp-stage.active > span { color: var(--primary); font-weight: 700; }
.hp-stage.done > span { color: var(--success, #22c55e); }

.hp-stage-line { flex: 1; height: 2px; background: var(--line, #e2e6ed); margin-bottom: 18px; min-width: 16px; }
.hp-stage-line.done { background: var(--success, #22c55e); }

.hp-pipeline.rejected { padding: 10px 14px; background: #fff5f5; border-radius: 8px; border: 1px solid #fecaca; }
body[data-theme="dark"] .hp-pipeline.rejected { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); }
.hp-rejected-label { font-size: 13px; color: #ef4444; font-weight: 500; }

.hp-doc-list { display: flex; flex-direction: column; gap: 10px; }

.hp-doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg, #f8f9fb); border-radius: 10px; }

.hp-doc-icon { width: 32px; height: 32px; flex: 0 0 32px; background: var(--primary-pale, #ede9ff); color: var(--primary); border-radius: 8px; display: grid; place-items: center; }

.hp-doc-info { flex: 1; min-width: 0; }

.hp-doc-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--charcoal, #111827); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hp-checklist { display: flex; flex-direction: column; gap: 10px; }

.hp-check-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--charcoal, #111827); }

.hp-check-icon { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--line, #e2e6ed); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted, #8b93a7); }

.hp-check-row.done .hp-check-icon { background: #22c55e; border-color: #22c55e; color: #fff; }
.hp-check-row.done > span:nth-child(2) { color: var(--muted, #8b93a7); text-decoration: line-through; }

.hp-repay-summary { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line, #e2e6ed); }

.hp-repay-summary > div { display: flex; flex-direction: column; gap: 5px; padding: 18px 22px; border-right: 1px solid var(--line, #e2e6ed); }
.hp-repay-summary > div:last-child { border-right: none; }
.hp-repay-summary span { font-size: 11px; color: var(--muted, #8b93a7); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.hp-repay-summary strong { font-size: 15px; font-weight: 700; color: var(--charcoal, #111827); font-family: "Open Sans", Arial, sans-serif; }

.hp-table-wrap { overflow-x: auto; }

.hp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hp-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #8b93a7); padding: 12px 22px; border-bottom: 1px solid var(--line, #e2e6ed); white-space: nowrap; }
.hp-table td { padding: 13px 22px; border-bottom: 1px solid var(--line, #e2e6ed); color: var(--charcoal, #111827); }
.hp-table tr:last-child td { border-bottom: none; }
.hp-table tbody tr:hover { background: var(--bg, #f8f9fb); }

.hp-contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

.hp-thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; max-height: 320px; overflow-y: auto; padding-right: 4px; }

.hp-message { display: flex; align-items: flex-end; gap: 10px; }
.hp-message.outgoing { flex-direction: row-reverse; }

.hp-msg-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: var(--primary-pale, #ede9ff); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.hp-msg-avatar.you { background: var(--primary); color: #fff; }

.hp-msg-body { max-width: 70%; display: flex; flex-direction: column; gap: 4px; }
.hp-msg-sender { font-size: 11px; font-weight: 600; color: var(--muted, #8b93a7); }
.hp-msg-body p { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: var(--bg, #f5f6f8); color: var(--charcoal, #111827); }
.hp-message.outgoing .hp-msg-body p { background: var(--primary); color: #fff; }
.hp-msg-time { font-size: 10.5px; color: var(--muted, #8b93a7); }
.hp-message.outgoing .hp-msg-time { text-align: right; }

.hp-compose { display: flex; flex-direction: column; gap: 10px; }
.hp-compose textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line, #e2e6ed); border-radius: 10px; background: var(--bg, #f8f9fb); color: var(--charcoal, #111827); font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif; font-size: 13.5px; resize: vertical; box-sizing: border-box; }
.hp-compose textarea:focus { outline: none; border-color: var(--primary); }
.hp-compose .button { align-self: flex-end; }

.hp-rm-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg, #f8f9fb); border-radius: 12px; }
.hp-rm-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.hp-rm-card strong { display: block; font-size: 14px; font-weight: 600; color: var(--charcoal, #111827); }
.hp-rm-card .button { margin-left: auto; }

.hp-empty { padding: 40px 0; text-align: center; color: var(--muted, #8b93a7); font-size: 14px; }
.hp-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.hp-muted { color: var(--muted, #8b93a7); font-size: 13px; }
.hp-muted-sm { color: var(--muted, #8b93a7); font-size: 11.5px; }

/* ─── REMOVED: .hp-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
.hp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  background: var(--primary);
  color: white;
  overflow-y: auto;
}

.hp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 20px;
}

.hp-brand-name {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: white;
  line-height: 1.1;
}

.hp-brand-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  margin-top: 2px;
}

.hp-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: flex-start;
  align-items: stretch;
}

.hp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  text-align: left;
  transition: background .15s, color .15s;
}

.hp-nav-item:hover { background: rgba(255,255,255,0.12); color: white; }
.hp-nav-item.active { background: rgba(255,255,255,0.2); color: white; }
.hp-nav-item svg { flex-shrink: 0; opacity: 0.8; }
.hp-nav-item.active svg { opacity: 1; }

.hp-sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.hp-user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.hp-sidebar-user strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.hp-sidebar-user span {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 148px;
}


/* ─── Main content area ─────────────────────────────────────────── */
.hp-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f6f8;
}

body[data-theme="dark"] .hp-main { background: #15161a; }

.hp-topbar {
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hp-topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  font-family: "Open Sans", Arial, sans-serif;
}

.hp-content {
  padding: 28px 32px 60px;
}

/* ─── Panels ────────────────────────────────────────────────────── */
.hp-panel { display: none; }
.hp-panel.active { display: block; }

/* ─── Deal card inner (inside investor-admin-card) ──────────────── */
.hp-deal-inner {
  padding: 24px 28px;
}

.hp-deal-inner--bordered {
  border-top: 1px solid var(--line);
}

.hp-deal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.hp-deal-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.hp-deal-meta {
  flex: 1;
  min-width: 0;
}

.hp-deal-meta h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--charcoal);
}

.hp-deal-sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.hp-deal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.hp-deal-amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  font-family: "Open Sans", Arial, sans-serif;
}

.hp-deal-return {
  font-size: 12.5px;
  color: var(--muted);
}

/* ─── Pipeline ─────────────────────────────────────────────────── */
.hp-deal-pipeline-wrap {
  margin-bottom: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hp-pipeline-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 14px;
}

.hp-pipeline {
  display: flex;
  align-items: center;
}

.hp-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.hp-stage-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: all .2s;
}

.hp-stage.done .hp-stage-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.hp-stage.active .hp-stage-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(105,89,250,.18);
}

.hp-stage span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.hp-stage.active span { color: var(--primary); font-weight: 700; }
.hp-stage.done span { color: var(--success); }

.hp-stage-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin-bottom: 20px;
  min-width: 20px;
}

.hp-stage-line.done { background: var(--success); }

.hp-pipeline.rejected {
  padding: 12px 16px;
  background: #fff5f5;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

body[data-theme="dark"] .hp-pipeline.rejected { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.2); }

.hp-rejected-label { font-size: 13.5px; color: #ef4444; font-weight: 500; }

.hp-deal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hp-deal-stats > div { display: flex; flex-direction: column; gap: 4px; }

.hp-deal-stats span:first-child {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hp-deal-stats strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}

/* ─── Contact layout ────────────────────────────────────────────── */
.hp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* ─── Documents ────────────────────────────────────────────────── */
.hp-doc-list { display: flex; flex-direction: column; gap: 10px; }

.hp-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
}

.hp-doc-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-doc-info { flex: 1; min-width: 0; }

.hp-doc-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-checklist { display: flex; flex-direction: column; gap: 10px; }

.hp-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--charcoal);
}

.hp-check-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.hp-check-row.done .hp-check-icon {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.hp-check-row.done > span:nth-child(2) { color: var(--muted); text-decoration: line-through; }

.hp-check-row .button { margin-left: auto; }

/* ─── Repayment ────────────────────────────────────────────────── */
.hp-repay-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.hp-repay-summary > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.hp-repay-summary > div:last-child { border-right: none; }

.hp-repay-summary span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hp-repay-summary strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  font-family: "Open Sans", Arial, sans-serif;
}

.hp-table-wrap { overflow-x: auto; }

.hp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.hp-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 14px 24px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.hp-table td {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--charcoal);
}

.hp-table tr:last-child td { border-bottom: none; }

.hp-table tbody tr:hover { background: var(--bg); }

/* ─── Contact / Messages ───────────────────────────────────────── */
.hp-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.hp-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.hp-message.outgoing { flex-direction: row-reverse; }

.hp-msg-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.hp-msg-avatar.you {
  background: var(--primary);
  color: #fff;
}

.hp-msg-body {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-msg-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.hp-msg-body p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--charcoal);
}

.hp-message.outgoing .hp-msg-body p {
  background: var(--primary);
  color: #fff;
}

.hp-msg-time {
  font-size: 10.5px;
  color: var(--muted);
}

.hp-message.outgoing .hp-msg-time { text-align: right; }

.hp-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-compose textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--charcoal);
  font-family: "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  resize: vertical;
  box-sizing: border-box;
}

.hp-compose textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.hp-compose .button { align-self: flex-end; }

.hp-rm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border-radius: 12px;
}

.hp-rm-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.hp-rm-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}

.hp-rm-card .button { margin-left: auto; }

/* ─── Utilities ────────────────────────────────────────────────── */
.hp-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hp-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hp-muted { color: var(--muted); font-size: 13px; }
.hp-muted-sm { color: var(--muted); font-size: 11.5px; }

/* ─── Deals Analytics ────────────────────────────────────────── */

.da-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.da-kpi-card {
  min-width: 0;
}

.da-kpi-card .metric-value {
  font-size: 22px;
}

.da-chart-row {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.da-chart-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.da-chart-row-2 {
  grid-template-columns: 320px 1fr;
}

.da-chart-card {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.04);
}

body[data-theme="dark"] .da-chart-card {
  background: #22262f;
  border-color: #303541;
}

.da-chart-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.da-chart-head strong {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
}

body[data-theme="dark"] .da-chart-head strong {
  color: #f7f8fb;
}

.da-chart-head span {
  font-size: 11.5px;
  color: #8b93a7;
}

.da-hbar-row {
  display: grid;
  grid-template-columns: 110px 1fr 32px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.da-hbar-row:last-child {
  margin-bottom: 0;
}

.da-hbar-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .da-hbar-label {
  color: #a0aec0;
}

.da-hbar-track {
  height: 8px;
  background: #f1f3f7;
  border-radius: 6px;
  overflow: hidden;
}

body[data-theme="dark"] .da-hbar-track {
  background: #303541;
}

.da-hbar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

.da-hbar-val {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  text-align: right;
}

body[data-theme="dark"] .da-hbar-val {
  color: #f7f8fb;
}

.da-donut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.da-donut-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 8px auto 12px;
}

.da-donut-svg {
  width: 100%;
  height: 100%;
}

.da-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.da-donut-center strong {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

body[data-theme="dark"] .da-donut-center strong {
  color: #f7f8fb;
}

.da-donut-center span {
  font-size: 11px;
  color: #8b93a7;
  margin-top: 2px;
}

.da-donut-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 4px;
}

.da-donut-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #4b5563;
}

body[data-theme="dark"] .da-donut-legend span {
  color: #a0aec0;
}

.da-donut-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.da-followup-section {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.04);
}

body[data-theme="dark"] .da-followup-section {
  background: #22262f;
  border-color: #303541;
}

.da-followup-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.da-followup-head strong {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
}

body[data-theme="dark"] .da-followup-head strong {
  color: #f7f8fb;
}

.da-followup-head span {
  font-size: 11.5px;
  color: #8b93a7;
}

.da-followup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.da-followup-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f8f9fb;
  border-radius: 12px;
  border: 1px solid #e9edf2;
}

body[data-theme="dark"] .da-followup-item {
  background: #1a1e27;
  border-color: #303541;
}

.da-followup-info {
  min-width: 0;
}

.da-followup-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .da-followup-info strong {
  color: #f7f8fb;
}

.da-followup-info small {
  font-size: 12px;
  color: #8b93a7;
}

.da-followup-verif {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 100px;
}

.da-followup-bar {
  width: 90px;
  height: 6px;
  background: #e9edf2;
  border-radius: 4px;
  overflow: hidden;
}

body[data-theme="dark"] .da-followup-bar {
  background: #303541;
}

.da-followup-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 600ms ease;
}

.da-followup-verif span {
  font-size: 11px;
  color: #8b93a7;
  white-space: nowrap;
}

.da-followup-amt {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

body[data-theme="dark"] .da-followup-amt {
  color: #f7f8fb;
}

@media (max-width: 1300px) {
  .da-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .da-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .da-chart-row-3 { grid-template-columns: 1fr; }
  .da-chart-row-2 { grid-template-columns: 1fr; }
  .da-followup-item { grid-template-columns: 36px 1fr auto; }
  .da-followup-item .stage-pill,
  .da-followup-verif,
  .da-followup-amt { display: none; }
}

/* ─── End Deals Analytics ─────────────────────────────────────── */

/* ─── Holder Portal responsive ───────────────────────────────── */
@media (max-width: 1100px) {
  .hp-stats-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hp-sidebar-nav { width: 56px; }
  .hp-sidebar-label { opacity: 0; width: 0; overflow: hidden; }
  .hp-sidebar-item { padding: 9px; justify-content: center; gap: 0; }
  .hp-sidebar-icon { width: auto; }
  .hp-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .hp-charts-row { grid-template-columns: 1fr; }
  .hp-deal-row { grid-template-columns: 36px 1fr auto; }
  .hp-deal-pipeline-mini { display: none; }
  .hp-repay-summary { grid-template-columns: repeat(2, 1fr); }
  .hp-contact-grid { grid-template-columns: 1fr; }
  .hp-tab-content { padding: 20px 16px 40px; }
  .hp-page-head { padding: 16px 16px 0; }
}

/* ── Deal Rooms ─────────────────────────────────────────────── */
.hp-rooms-layout { display: flex; flex-direction: column; gap: 20px; }
.hp-create-room-form { padding: 16px 20px 20px; border-top: 1px solid var(--border); background: var(--surface-alt, var(--bg)); margin: 0 -20px; }
.hp-create-room-form .field { margin-bottom: 12px; }
.hp-form-row { display: flex; gap: 8px; align-items: center; }
.hp-room-list { display: flex; flex-direction: column; }
.hp-room-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.hp-room-row:first-child { border-top: none; }
.hp-room-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary-light, #ede9fe); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.hp-room-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-room-info strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-room-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hp-room-detail { margin-top: 20px; }
.hp-room-detail-inner { display: flex; flex-direction: column; gap: 24px; padding: 4px 0; }
.hp-room-invite-section h3, .hp-invite-list h3 { font-size: 0.85rem; font-weight: 600; margin: 0 0 10px; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: 0.05em; }
.hp-invite-row { display: flex; gap: 8px; align-items: center; }
.hp-invite-row input { font-size: 0.9rem; }
.hp-room-invite-section, .hp-invite-list { padding: 0 20px; }

/* ─── Originator OS dashboard additions ─────────────────────────── */
.hp-originator-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  margin-bottom: 18px;
  border: 1px solid var(--line, #e2e6ed);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(105,89,250,0.10), rgba(255,255,255,0.92));
}

body[data-theme="dark"] .hp-originator-hero {
  background: linear-gradient(135deg, rgba(105,89,250,0.18), rgba(26,29,36,0.96));
  border-color: #303541;
}

.hp-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hp-originator-hero h2 {
  margin: 0 0 8px;
  color: var(--charcoal, #111827);
  font: 700 24px/1.15 "Open Sans", Arial, sans-serif;
  letter-spacing: 0;
}

body[data-theme="dark"] .hp-originator-hero h2 { color: #f7f8fb; }

.hp-originator-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted, #8b93a7);
  font-size: 13.5px;
  line-height: 1.55;
}

.hp-originator-actions,
.landing-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hp-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.hp-command-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line, #e2e6ed);
  border-radius: 14px;
  background: var(--panel, #fff);
  color: var(--charcoal, #111827);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.hp-command-card:hover {
  transform: translateY(-1px);
  border-color: rgba(105,89,250,.35);
  box-shadow: 0 12px 30px rgba(17,24,39,.08);
}

body[data-theme="dark"] .hp-command-card { background: #1a1d24; border-color: #303541; color: #f7f8fb; }

.hp-command-icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(105,89,250,.12);
}

.hp-command-card strong { font-size: 14px; font-weight: 700; }
.hp-command-card span:last-child { color: var(--muted, #8b93a7); font-size: 12.5px; line-height: 1.45; }

.hp-originator-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.hp-console-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.hp-console-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line, #e2e6ed);
  border-radius: 14px;
  background: var(--panel, #fff);
  color: var(--charcoal, #111827);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.hp-console-card:hover {
  transform: translateY(-1px);
  border-color: rgba(105,89,250,.35);
  box-shadow: 0 12px 28px rgba(17,24,39,.07);
}

body[data-theme="dark"] .hp-console-card { background: #1a1d24; border-color: #303541; color: #f7f8fb; }

.hp-console-card span {
  color: var(--muted, #8b93a7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hp-console-card strong {
  color: var(--charcoal, #111827);
  font: 700 30px/1 "Open Sans", Arial, sans-serif;
}

body[data-theme="dark"] .hp-console-card strong { color: #f7f8fb; }

.hp-console-card small {
  margin-top: auto;
  color: var(--muted, #8b93a7);
  font-size: 12px;
  line-height: 1.35;
}

.hp-dashboard-grid,
.hp-marketplace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}

.hp-mini-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line, #e9edf2);
}

.hp-mini-row:last-child { border-bottom: 0; }
.hp-mini-row.compact { padding: 11px 20px; }
.hp-readiness-row { align-items: flex-start; }

.hp-link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: 700 12px "Be Vietnam Pro", Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.hp-queue-list { padding: 10px 20px 18px; }
.hp-queue-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line, #eef1f5); }
.hp-queue-row:last-child { border-bottom: 0; }
.hp-queue-row strong { display: block; font-size: 13px; color: var(--charcoal, #111827); }
.hp-queue-row span:last-child { display: block; margin-top: 3px; color: var(--muted, #8b93a7); font-size: 12px; }
body[data-theme="dark"] .hp-queue-row strong { color: #f7f8fb; }

.hp-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; flex: 0 0 9px; }
.hp-dot.amber { background: #f59e0b; }
.hp-dot.purple { background: var(--primary); }
.hp-dot.green { background: #22c55e; }

.hp-marketplace-form { padding: 20px 22px 24px; }
.hp-marketplace-note { padding: 14px 16px; margin-bottom: 18px; border-radius: 12px; background: rgba(105,89,250,.09); color: var(--charcoal, #111827); }
.hp-marketplace-note strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.hp-marketplace-note p { margin: 0; color: var(--muted, #8b93a7); font-size: 12.5px; line-height: 1.5; }
body[data-theme="dark"] .hp-marketplace-note { background: rgba(105,89,250,.16); color: #f7f8fb; }

.hp-funding-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr);
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(105,89,250,.2);
  border-radius: 14px;
  background: #fbfaff;
}

.hp-funding-guide strong {
  display: block;
  color: var(--charcoal, #111827);
  font-size: 13.5px;
  font-weight: 750;
}

.hp-funding-guide p {
  margin: 6px 0 0;
  color: var(--muted, #8b93a7);
  font-size: 12px;
  line-height: 1.55;
}

.hp-funding-guide ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted, #8b93a7);
  font-size: 12px;
  line-height: 1.6;
}

.hp-funding-guide li + li { margin-top: 3px; }

body[data-theme="dark"] .hp-funding-guide {
  background: rgba(105,89,250,.12);
  border-color: rgba(155,140,255,.28);
}

body[data-theme="dark"] .hp-funding-guide strong { color: #f7f8fb; }

.hp-packaging-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.hp-packaging-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line, #e9edf2);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--muted, #8b93a7);
  font-size: 11.5px;
  font-weight: 600;
}

body[data-theme="dark"] .hp-packaging-step { background: rgba(255,255,255,.03); border-color: #303541; }

.hp-packaging-step i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(105,89,250,.12);
  color: var(--primary);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  flex: 0 0 20px;
}

.hp-submission-intro {
  margin-bottom: 16px;
}

.hp-submission-tracker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e9edf2);
  border-radius: 12px;
  background: #fbfcff;
}

body[data-theme="dark"] .hp-submission-tracker {
  background: rgba(255,255,255,.03);
  border-color: #303541;
}

.hp-submission-step {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted, #8b93a7);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.hp-submission-step i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #d9deea;
  background: #fff;
  color: #8b93a7;
  font-style: normal;
  font-size: 10px;
}

.hp-submission-step.active {
  color: var(--primary);
}

.hp-submission-step.active i,
.hp-submission-step.done i {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.hp-submission-step.done {
  color: var(--charcoal, #111827);
}

.hp-submission-tracker b {
  height: 1px;
  min-width: 18px;
  flex: 1 1 18px;
  background: #d9deea;
}

.hp-submission-tracker b.done {
  background: var(--primary);
}

.hp-submission-tracker.rejected {
  display: block;
  border-color: #fecaca;
  background: #fff5f5;
}

.hp-submission-tracker.rejected strong,
.hp-submission-tracker.rejected span {
  display: block;
}

.hp-submission-tracker.rejected strong {
  color: #b91c1c;
  font-size: 12px;
}

.hp-submission-tracker.rejected span {
  margin-top: 3px;
  color: #777b8c;
  font-size: 11px;
}

.hp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-mini-form textarea { width: 100%; box-sizing: border-box; }
.hp-marketplace-pending .hp-submission-tracker {
  margin-top: 8px;
  padding: 8px 10px;
}
.hp-section-subhead { padding: 14px 20px 8px; color: var(--muted, #8b93a7); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

.hp-invite-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line, #e9edf2); }
.hp-invite-summary > div { padding: 18px 20px; border-right: 1px solid var(--line, #e9edf2); }
.hp-invite-summary > div:last-child { border-right: 0; }
.hp-invite-summary span { display: block; color: var(--muted, #8b93a7); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hp-invite-summary strong { display: block; margin-top: 6px; color: var(--charcoal, #111827); font: 700 26px/1 "Open Sans", Arial, sans-serif; }
body[data-theme="dark"] .hp-invite-summary strong { color: #f7f8fb; }

.hp-big-metric { margin: 18px 0 10px; color: var(--charcoal, #111827); font: 700 34px/1 "Open Sans", Arial, sans-serif; }
body[data-theme="dark"] .hp-big-metric { color: #f7f8fb; }

.hp-readiness-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: auto;
  min-width: 180px;
}

.hp-readiness-ring {
  --score: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel, #fff) 58%, transparent 59%),
    conic-gradient(var(--primary) calc(var(--score) * 1%), #e8ebf2 0);
}

body[data-theme="dark"] .hp-readiness-ring {
  background:
    radial-gradient(circle at center, #1a1d24 58%, transparent 59%),
    conic-gradient(var(--primary) calc(var(--score) * 1%), #303541 0);
}

.hp-readiness-ring b {
  color: var(--charcoal, #111827);
  font-size: 10px;
  font-weight: 800;
}

body[data-theme="dark"] .hp-readiness-ring b { color: #f7f8fb; }

.hp-missing-list {
  margin: 0;
  padding-left: 15px;
  color: var(--muted, #8b93a7);
  font-size: 11.5px;
  line-height: 1.45;
}

.hp-ready-note {
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

.hp-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 20px;
}

.hp-readiness-card {
  border: 1px solid var(--line, #e9edf2);
  border-radius: 14px;
  background: #fbfcff;
  padding: 14px;
}

body[data-theme="dark"] .hp-readiness-card { background: rgba(255,255,255,.03); border-color: #303541; }

.hp-readiness-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-readiness-card-head > div {
  min-width: 0;
  flex: 1;
}

.hp-readiness-card-head strong {
  display: block;
  overflow: hidden;
  color: var(--charcoal, #111827);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .hp-readiness-card-head strong { color: #f7f8fb; }

.hp-readiness-card-head span:not(.status-pill) {
  display: block;
  margin-top: 2px;
  color: var(--muted, #8b93a7);
  font-size: 11.5px;
}

.hp-readiness-missing {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #e9edf2);
}

body[data-theme="dark"] .hp-readiness-missing { border-color: #303541; }

.hp-readiness-missing > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted, #8b93a7);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hp-room-activity-panel {
  padding: 0 20px;
}

.hp-section-head.flush {
  padding: 0 0 12px;
  border-bottom: 0;
}

.hp-room-activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hp-room-activity-card {
  padding: 12px;
  border: 1px solid var(--line, #e9edf2);
  border-radius: 12px;
  background: #fbfcff;
}

body[data-theme="dark"] .hp-room-activity-card { background: rgba(255,255,255,.03); border-color: #303541; }

.hp-room-activity-card span {
  display: block;
  color: var(--muted, #8b93a7);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hp-room-activity-card strong {
  display: block;
  margin-top: 7px;
  color: var(--charcoal, #111827);
  font: 700 24px/1 "Open Sans", Arial, sans-serif;
}

body[data-theme="dark"] .hp-room-activity-card strong { color: #f7f8fb; }

.hp-room-activity-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted, #8b93a7);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .hp-originator-hero,
  .hp-dashboard-grid,
  .hp-marketplace-layout { grid-template-columns: 1fr; }
  .hp-originator-hero { display: block; }
  .hp-originator-actions { justify-content: flex-start; margin-top: 18px; }
  .hp-console-grid,
  .hp-activity-kpis,
  .hp-originator-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-activity-row {
    grid-template-columns: minmax(170px, 0.9fr) minmax(240px, 1.2fr) 100px;
  }
  .hp-activity-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .hp-room-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-review-card { grid-template-columns: 1fr; }
  .deal-review-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .hp-command-grid,
  .hp-console-grid,
  .hp-activity-kpis,
  .hp-packaging-steps,
  .hp-readiness-grid,
  .hp-room-activity-grid,
  .hp-form-grid,
  .hp-charts-row { grid-template-columns: 1fr; }
  .hp-originator-stats,
  .hp-invite-summary { grid-template-columns: 1fr; }
  .hp-readiness-meta { margin-left: 0; min-width: 0; }
  .hp-readiness-row { flex-wrap: wrap; }
  .hp-activity-row { grid-template-columns: 1fr; gap: 10px; }
  .hp-activity-line,
  .hp-activity-meta { flex-wrap: wrap; }
  .deal-review-head { display: block; }
  .deal-review-head p { margin-top: 8px; }
  .hp-submission-tracker { overflow-x: auto; }
}

.originator-deals-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.originator-deals-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.originator-deals-toolbar strong {
  display: block;
  margin-top: 4px;
  color: var(--charcoal);
  font-size: 15px;
  font-weight: 650;
}

.originator-deals-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px;
  gap: 10px;
  min-width: min(100%, 620px);
}

.originator-deals-controls input,
.originator-deals-controls select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--charcoal);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  outline: none;
}

.originator-submissions-table .deals-row {
  grid-template-columns: minmax(210px, 1.25fr) minmax(120px, .74fr) minmax(135px, .82fr) minmax(112px, .62fr) minmax(135px, .74fr) minmax(98px, .52fr) minmax(78px, .42fr);
  gap: 12px;
}

.originator-submissions-table {
  overflow: hidden;
}

.originator-submissions-table .deals-row > div {
  min-width: 0;
  overflow: hidden;
}

.originator-submission-row {
  cursor: pointer;
}

.originator-submission-row:hover {
  opacity: 1;
  background: rgba(105, 89, 250, .055);
}

.originator-submission-row:focus-visible {
  outline: 2px solid rgba(105, 89, 250, .35);
  outline-offset: -2px;
}

.originator-submissions-table .button.small {
  min-width: 72px;
  padding-inline: 12px;
}

.originator-public-note,
.originator-public-marketplace {
  border: 1px solid rgba(105, 89, 250, .18);
  border-radius: 16px;
  background: rgba(105, 89, 250, .06);
}

.originator-public-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.originator-public-note strong,
.originator-public-marketplace strong {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 650;
}

.originator-public-note span,
.originator-public-marketplace p,
.originator-public-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.originator-public-marketplace {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
}

.originator-public-marketplace > div:first-child span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.originator-public-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.originator-public-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "mark title"
    "mark buyer"
    "mark amount";
  gap: 2px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.originator-public-item:hover {
  border-color: rgba(105, 89, 250, .35);
  background: rgba(105, 89, 250, .04);
}

.originator-public-item .deal-image {
  grid-area: mark;
}

.originator-public-item strong {
  grid-area: title;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.originator-public-item small {
  grid-area: buyer;
  color: var(--muted);
  font-size: 11px;
}

.originator-public-item i {
  grid-area: amount;
  color: var(--charcoal);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.originator-detail {
  display: grid;
  gap: 14px;
}

.originator-detail-hero,
.originator-detail-status,
.originator-detail-field,
.originator-detail-notes article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.originator-detail-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.back-link.compact {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.originator-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.originator-detail-title h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

.originator-detail-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.originator-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.originator-detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.originator-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.originator-detail-field {
  min-width: 0;
  padding: 13px 14px;
}

.originator-detail-field span,
.originator-detail-notes h3 {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.originator-detail-field strong {
  display: block;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.originator-detail-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.originator-detail-notes article {
  min-width: 0;
  padding: 16px;
}

.originator-detail-notes p,
.originator-detail-notes li {
  margin: 0 0 8px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.originator-detail-notes small {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.originator-detail-notes ul {
  margin: 0;
  padding-left: 18px;
}

.originator-proof-checklist ul {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.originator-proof-checklist li {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .originator-deals-toolbar,
  .originator-detail-hero {
    display: grid;
    grid-template-columns: 1fr;
  }

  .originator-deals-controls,
  .originator-detail-grid,
  .hp-funding-guide,
  .originator-detail-notes {
    grid-template-columns: 1fr;
  }

  .originator-detail-actions {
    justify-content: flex-start;
  }
}
