[hidden] {
  display: none !important;
}
:root:not(.role-nav-ready) #sideNav [data-view="clients"],
:root:not(.role-nav-ready) #sideNav [data-view="team"],
:root:not(.role-nav-ready) #sideNav [data-view="hr"],
:root:not(.role-nav-ready) #sideNav [data-view="approvals"],
:root:not(.role-nav-ready) #sideNav [data-view="finance"],
:root:not(.role-nav-ready) #sideNav [data-view="activity"],
:root:not(.role-nav-ready) #sideNav [data-nav-section="management"],
:root:not(.role-nav-ready) #sideNav .management-only {
  display: none !important;
}
:root {
  --bg: #071019;
  --panel: #0d1824;
  --panel2: #101e2c;
  --line: #253546;
  --muted: #8ca4ba;
  --text: #f4f7fb;
  --accent: #f6b73c;
  --good: #48c98b;
  --bad: #ff7b7b;
  --sidebar: 248px;
  --sidebar-mini: 76px;
}
* {
  box-sizing: border-box;
}
.portal-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}
.portal-body a {
  color: #9dcaef;
}
.portal-body button,
.portal-body input,
.portal-body select,
.portal-body textarea {
  font: inherit;
}
.portal-body input,
.portal-body select,
.portal-body textarea {
  background: #09131e;
  color: var(--text);
  border: 1px solid #2a3b4d;
  border-radius: 10px;
  padding: 11px 12px;
  width: 100%;
  outline: none;
}
.portal-body input:focus,
.portal-body select:focus,
.portal-body textarea:focus {
  border-color: #5b7996;
  box-shadow: 0 0 0 2px rgba(246, 183, 60, 0.12);
}
.portal-body textarea {
  min-height: 100px;
  resize: vertical;
}
.portal-form {
  display: grid;
  gap: 12px;
}
.portal-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer;
}
.button.secondary {
  background: #17283a;
  color: #eef5fc;
  border: 1px solid #30455a;
}
.button.danger {
  background: #4a2024;
  color: #ffd7d9;
}
.small-button {
  padding: 10px 14px;
}
.mini-btn {
  border: 1px solid #304458;
  background: #132233;
  color: #e9f1f8;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}
.mini-btn.primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
.mini-btn.ghost {
  background: transparent;
}
.mini-btn.danger {
  border-color: #65343a;
  color: #ffb7b7;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #2d4052;
  background: #101d2a;
  color: #d6e2ec;
  border-radius: 9px;
  cursor: pointer;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: min(460px, 100%);
  background: #0e1926;
  border: 1px solid #26394b;
  border-radius: 22px;
  padding: 36px;
}
.login-card h1 {
  font-size: 38px;
  margin: 18px 0 24px;
}
.login-divider {
  text-align: center;
  color: var(--muted);
  margin: 16px 0;
  position: relative;
}
.login-divider:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #27394a;
}
.login-divider span {
  position: relative;
  background: #0e1926;
  padding: 0 12px;
}
.form-status {
  color: var(--bad);
  min-height: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #2a3d50;
  border-radius: 11px;
  display: grid;
  place-items: center;
  position: relative;
}
.brand-mark span {
  position: absolute;
  width: 4px;
  height: 25px;
  background: var(--accent);
  transform: rotate(38deg);
  border-radius: 2px;
}
.brand-mark span:last-child {
  height: 11px;
  left: 13px;
  top: 18px;
}
.brand-copy {
  display: grid;
  line-height: 1;
}
.brand-copy strong {
  font-size: 20px;
}
.brand-copy strong span {
  color: var(--accent);
}
.brand-copy small {
  font-size: 9px;
  letter-spacing: 4px;
  margin-top: 5px;
}
.workspace {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  background: #08121c;
  border-right: 1px solid #203143;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
}
.sidebar-head {
  height: 76px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1c2b39;
  flex: 0 0 auto;
}
.side-nav {
  padding: 14px 10px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}
.nav-section {
  color: #668096;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 800;
  padding: 15px 12px 7px;
}
.side-nav button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #9eb1c2;
  padding: 11px 12px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  margin: 2px 0;
}
.side-nav button:hover {
  background: #0f1e2c;
  color: white;
}
.side-nav button.active {
  background: #142538;
  color: white;
}
.side-nav b {
  font-size: 14px;
}
.side-nav em {
  font-style: normal;
  background: #213a50;
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 11px;
}
.sidebar-foot {
  flex: 0 0 auto;
  border-top: 1px solid #1c2b39;
  padding: 14px 16px;
  color: #7590a5;
  display: grid;
  gap: 4px;
  font-size: 11px;
}
.workspace-main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}
.workspace-topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 16, 25, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #203143;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
}
.global-search {
  position: relative;
  flex: 1;
  max-width: 760px;
}
.global-search > span {
  position: absolute;
  left: 14px;
  top: 12px;
  color: #718da3;
}
.global-search input {
  padding-left: 38px;
  height: 46px;
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 51px;
  background: #0d1925;
  border: 1px solid #2a3e51;
  border-radius: 12px;
  box-shadow: 0 22px 60px #0009;
  max-height: 420px;
  overflow: auto;
  z-index: 100;
}
.search-result {
  padding: 12px 14px;
  border-bottom: 1px solid #1c2d3d;
  cursor: pointer;
}
.search-result:hover {
  background: #142536;
}
.search-result small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notification-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid #2b3e51;
  background: #0e1b28;
  color: #dce8f2;
  border-radius: 10px;
  cursor: pointer;
}
.compact-action {
  padding: 9px 13px;
  min-height: 36px;
}
.icon-mini {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #31495c;
  border-radius: 9px;
  background: #10202e;
  color: #dce8f2;
  cursor: pointer;
}
.icon-mini.danger { color: #ff9b9b; border-color: #6a3840; }
.notice.warning { border-color:#745820; background:#2a220f; color:#ffe2a0; }
.notification-btn span {
  position: absolute;
  right: -5px;
  top: -6px;
  background: #e75858;
  color: white;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.user-menu-wrap {
  position: relative;
  z-index: 500;
}
.user-menu-button {
  height: 44px;
  min-width: 190px;
  border: 1px solid #2b3e51;
  background: #0d1a27;
  color: white;
  border-radius: 11px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 9px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.user-menu-button .menu-chevron,
.split-toggle > span {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
}
.user-menu-button .menu-chevron { justify-self:end; display:block; }
.user-menu-button span:nth-child(2) {
  display: grid;
}
.user-menu-button small {
  color: #7891a6;
  font-size: 10px;
}
.presence-dot {
  width: 9px;
  height: 9px;
  background: var(--good);
  border-radius: 50%;
}
.user-menu {
  position: absolute;
  right: 0;
  top: 50px;
  width: 285px;
  background: #0f1c29;
  border: 1px solid #2b3f51;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 22px 60px #000b;
  z-index: 1000;
}
.user-menu-head {
  padding: 10px;
  display: grid;
}
.user-menu-head small {
  color: var(--muted);
}
.menu-label {
  padding: 7px 10px;
  color: #7890a4;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.presence-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.user-menu button {
  border: 0;
  background: transparent;
  color: #dce8f2;
  text-align: left;
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
}
.user-menu button:hover {
  background: #17293a;
}
.menu-sep {
  height: 1px;
  background: #233445;
  margin: 8px;
}
.content {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 20px;
}
.page-head h1 {
  font-size: 31px;
  margin: 0;
}
.page-head p {
  color: var(--muted);
  margin: 5px 0 0;
}
.page-head-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.view-refresh { white-space:nowrap; }
.view-refresh.is-refreshing { cursor:wait; opacity:.72; }
.panel {
  background: var(--panel);
  border: 1px solid #233648;
  border-radius: 16px;
  padding: 16px;
}
.filters {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #23394b;
  border-radius: 13px;
  background: #0b1824;
}
.filters input,
.filters select {
  width: auto;
  min-width: 160px;
  min-height: 40px;
  background: #101f2d;
  border-color: #314a5e;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  background: #0d1a27;
  border: 1px solid #23384b;
  border-radius: 14px;
  padding: 14px;
}
.stat small {
  color: #83a0b6;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
}
.stat strong {
  display: block;
  font-size: 27px;
  margin-top: 5px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid #203445;
  border-radius: 12px;
}
.portal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.portal-table th {
  text-align: left;
  color: #7692a8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  padding: 11px 12px;
  background: #0a1621;
  position: sticky;
  top: 0;
}
.portal-table td {
  padding: 12px;
  border-top: 1px solid #1d3142;
  vertical-align: top;
  font-size: 13px;
}
.portal-table tr:hover td {
  background: #10202f;
}
.primary-text {
  font-weight: 800;
  color: #f6f9fc;
}
.subtext {
  color: #87a0b4;
  font-size: 12px;
  margin-top: 3px;
}
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #192b3c;
  color: #b9d0e2;
}
.chip.accent {
  background: #43391d;
  color: #ffd66f;
}
.chip.good {
  background: #17392b;
  color: #79e3ab;
}
.chip.bad {
  background: #402124;
  color: #ff9a9f;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.split-action { display:inline-flex; position:relative; isolation:isolate; white-space:nowrap; vertical-align:middle; }
.split-action .split-main { min-height:36px; margin:0; border-radius:8px 0 0 8px; }
.split-toggle { width:40px; min-height:36px; margin:0; padding:0; display:grid; place-items:center; border:1px solid var(--accent); border-left-color:rgba(17,17,17,.22); border-radius:0 8px 8px 0; background:var(--accent); color:#111; cursor:pointer; }
.split-toggle > span { display:block; }
.split-toggle:hover,.split-action.is-open .split-toggle { filter:brightness(.94); box-shadow:inset 0 0 0 2px rgba(17,17,17,.18); }
.split-action.is-open { z-index:300; }
.portal-table tr:has(.split-action.is-open) { position:relative; z-index:301; }
.split-menu { position:absolute; z-index:400; right:0; top:calc(100% + 5px); min-width:154px; display:none; padding:5px; border:1px solid #365068; border-radius:9px; background:#102132; box-shadow:0 14px 30px rgba(0,0,0,.35); }
.split-action.is-open .split-menu { display:grid; }
.split-menu a,.split-menu button { display:block; width:100%; border:0; border-radius:6px; background:transparent; color:var(--text); padding:8px 9px; text-align:left; font:inherit; font-size:12px; font-weight:700; text-decoration:none; cursor:pointer; }
.split-menu a:hover,.split-menu button:hover { background:#1d3449; color:#fff; }
.task-work-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-2px 0 14px; padding:10px 12px; border:1px solid #4b5d2b; border-radius:10px; background:#172613; }
.task-work-banner div { display:grid; gap:2px; }
.task-work-banner span { color:var(--muted); font-size:12px; }
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}
.pagination span {
  color: #829aaf;
  font-size: 12px;
}
.empty-state {
  padding: 34px;
  text-align: center;
  color: #839caf;
}
.drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: #0008;
}
.drawer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(780px, 96vw);
  background: #0a1621;
  border-left: 1px solid #2b4052;
  overflow: auto;
  padding: 28px;
}
.profile-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 8px 0 18px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #07111a;
  background: linear-gradient(145deg, #ffd06a, #f5a915);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .6px;
}
.profile-hero h2 { margin: 0 0 5px; }
.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 8px 0 14px;
}
.profile-summary-grid > div,
.agreement-review-summary section {
  background: #0e1d2a;
  border: 1px solid #263d4f;
  border-radius: 11px;
  padding: 12px;
  min-width: 0;
}
.profile-summary-grid small,
.agreement-review-summary small {
  display: block;
  color: #84a0b7;
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.profile-summary-grid strong { display:block; overflow-wrap:anywhere; }
.profile-section {
  border: 1px solid #273e50;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
  background: #0b1824;
}
.profile-section > h3 { margin-top: 0; }
.edit-details summary { cursor: pointer; font-weight: 800; }
.edit-details[open] summary { margin-bottom: 16px; }
.opportunity-card,
.document-card {
  display: grid;
  gap: 10px;
  border: 1px solid #2a4356;
  border-radius: 12px;
  padding: 13px;
  margin-top: 9px;
  background: #101f2c;
}
.opportunity-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.opportunity-actions select { width:auto; min-width:160px; }
.or-divider { text-align:center; color:#7892a8; margin:10px 0; position:relative; }
.or-divider::before,.or-divider::after { content:""; display:inline-block; width:38%; border-top:1px solid #2b4152; vertical-align:middle; margin:0 10px; }
.agreement-review-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0; }
.agreement-review-summary section { display:grid; gap:3px; }
.agreement-review-summary span { color:#91a8bb; font-size:12px; overflow-wrap:anywhere; }
.review-fee-list { display:grid; gap:7px; }
.review-fee-list > div { display:flex; justify-content:space-between; gap:20px; padding:10px 12px; border:1px solid #263d4f; border-radius:10px; }
:root[data-theme="light"] .filters,
:root[data-theme="light"] .profile-section,
:root[data-theme="light"] .profile-summary-grid > div,
:root[data-theme="light"] .agreement-review-summary section,
:root[data-theme="light"] .opportunity-card,
:root[data-theme="light"] .document-card { background:#fff; border-color:#cad6df; }
.drawer-close,
.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 26px;
  cursor: pointer;
}
.drawer h2,
.modal-card h2 {
  margin: 0 40px 18px 0;
}
.drawer-section {
  border-top: 1px solid #253748;
  padding-top: 18px;
  margin-top: 20px;
}
.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.detail-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.detail-kv dt {
  color: #819aaf;
}
.detail-kv dd {
  margin: 0;
}
.timeline {
  display: grid;
  gap: 10px;
}
.timeline-item {
  border-left: 2px solid #2c4358;
  padding-left: 12px;
}
.timeline-item small {
  color: #7791a7;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #0e1b28;
  border: 1px solid #2b4052;
  border-radius: 16px;
  padding: 26px;
  position: relative;
}
.modal-card.wide {
  width: min(1000px, 96vw);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notice {
  background: #101f2e;
  border: 1px solid #2a4053;
  border-radius: 10px;
  padding: 11px 13px;
  color: #b5c9d8;
  font-size: 12px;
}
.success-notice {
  border-color: #2e684e;
  color: #9be5ba;
}
.flash {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  background: #153122;
  border: 1px solid #347150;
  padding: 12px 15px;
  border-radius: 10px;
  box-shadow: 0 15px 40px #0008;
}
.flash.err {
  background: #3a1e22;
  border-color: #704047;
}
.notification-drawer {
  position: fixed;
  right: 235px;
  top: 68px;
  width: min(390px, calc(100vw - 24px));
  max-height: 560px;
  overflow: auto;
  background: #0d1a27;
  border: 1px solid #2b4052;
  border-radius: 14px;
  box-shadow: 0 25px 70px #000b;
  z-index: 120;
  padding: 10px;
}
.notification-head {
  display: flex;
  justify-content: space-between;
  padding: 8px 7px;
}
.notification-item {
  padding: 11px;
  border-radius: 9px;
  border-top: 1px solid #1f3243;
}
.notification-item.unread {
  background: #122435;
}
.notification-item small {
  color: #7792a7;
}
.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: clamp(320px, calc(100dvh - 245px), 760px);
  border: 1px solid #25394b;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1722;
}
.chat-side {
  background: #0a1420;
  border-right: 1px solid #243747;
  padding: 12px;
  overflow: auto;
}
.chat-side h4 {
  color: #728da2;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin: 14px 8px 6px;
}
.chat-side button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #a9bdcc;
  text-align: left;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.chat-side button.active,
.chat-side button:hover {
  background: #142738;
  color: white;
}
.chat-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
}
.chat-head {
  padding: 14px 18px;
  border-bottom: 1px solid #243747;
}
.chat-messages {
  padding: 16px 20px;
  overflow: auto;
  min-height: 0;
}
.chat-message {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 9px;
  margin-bottom: 14px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #1d3448;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.chat-message strong {
  font-size: 13px;
}
.chat-message small {
  color: #718ba0;
  margin-left: 7px;
}
.chat-message p {
  margin: 4px 0;
  white-space: pre-wrap;
  color: #d7e2eb;
}
.lead-ref {
  display: inline-flex;
  margin-top: 5px;
  background: #183149;
  border: 1px solid #315575;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: #a9d8ff;
  cursor: pointer;
}
.chat-compose {
  border-top: 1px solid #243747;
  padding: 12px;
  position: relative;
  background: #0b1722;
  z-index: 2;
}
.chat-compose textarea {
  min-height: 64px;
}
.autocomplete {
  position: absolute;
  left: 12px;
  bottom: 85px;
  width: min(460px, calc(100% - 24px));
  max-height: 260px;
  overflow: auto;
  background: #102030;
  border: 1px solid #334b60;
  border-radius: 10px;
  box-shadow: 0 20px 50px #0009;
  z-index: 20;
}
.autocomplete button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #23384b;
  background: transparent;
  color: #dfeaf3;
  text-align: left;
  cursor: pointer;
}
.autocomplete button:hover {
  background: #193149;
}
.channel-create-members {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.member-check {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 7px !important;
}
.member-check input {
  width: auto;
}
.team-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.team-card {
  background: #0e1b28;
  border: 1px solid #263a4b;
  border-radius: 14px;
  padding: 15px;
}
.team-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.score {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), #263a4b 0);
  position: relative;
}
.score:after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #0e1b28;
}
.score span {
  position: relative;
  z-index: 1;
  font-weight: 900;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.metric {
  background: #0a1621;
  padding: 9px;
  border-radius: 9px;
}
.metric small {
  display: block;
  color: #7691a6;
  font-size: 9px;
  text-transform: uppercase;
}
.metric strong {
  font-size: 15px;
}
.legal-doc {
  background: #fafafa;
  color: #151515;
  border-radius: 8px;
  padding: 34px;
  line-height: 1.6;
}
.legal-doc h2,
.legal-doc h3 {
  color: #111;
}
.legal-doc pre {
  white-space: pre-wrap;
  font: inherit;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.signature-preview {
  background: white;
  border-radius: 8px;
  border: 1px solid #bbb;
}
.mobile-only {
  display: none;
}
.sidebar.collapsed {
  width: var(--sidebar-mini);
}
.sidebar.collapsed .brand-copy,
.sidebar.collapsed .side-nav b,
.sidebar.collapsed .side-nav em,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-foot {
  display: none;
}
.sidebar.collapsed .side-nav button {
  grid-template-columns: 1fr;
  place-items: center;
}
.sidebar.collapsed ~ .workspace-main {
  margin-left: var(--sidebar-mini);
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 20px 0 60px #0009;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .workspace-main,
  .sidebar.collapsed ~ .workspace-main {
    margin-left: 0;
  }
  .mobile-only {
    display: inline-grid;
    place-items: center;
  }
  .workspace-topbar {
    padding: 10px 12px;
  }
  .user-menu-button {
    min-width: 0;
  }
  .user-menu-button span:nth-child(2) {
    display: none;
  }
  .content {
    padding: 16px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid2,
  .drawer-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-side {
    display: none;
  }
  .notification-drawer {
    right: 12px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.text-link {
  border: 0;
  background: transparent;
  color: #9fc5e6;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
}
.login-help {
  color: #8aa2b5;
  margin: -4px 0 18px;
  line-height: 1.45;
}
.form-status {
  min-height: 18px;
  color: #ff9c9c;
  font-size: 12px;
}
.form-status.ok {
  color: #8fe1b0;
}

/* V5.3 sidebar hardening: explicitly override the public-site nav rules. */
#sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  width: var(--sidebar) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 80 !important;
}
#sidebar .sidebar-head {
  flex: 0 0 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
}
#sidebar .side-brand {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}
#sidebar #sideNav {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 12px 10px 18px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
}
#sidebar #sideNav .nav-section {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}
#sidebar #sideNav button {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-content: stretch !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 42px !important;
  margin: 1px 0 !important;
}
#sidebar #sideNav button b {
  display: block !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#sidebar #sideNav button em {
  display: inline-flex !important;
}
#sidebar .sidebar-foot {
  display: grid !important;
  flex: 0 0 auto !important;
}
#workspace .workspace-main {
  margin-left: var(--sidebar) !important;
  min-width: 0 !important;
}
#sidebar.collapsed {
  width: var(--sidebar-mini) !important;
}
#sidebar.collapsed .sidebar-head {
  height: 112px !important;
  flex-basis: 112px !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 10px 8px !important;
  gap: 8px !important;
}
#sidebar.collapsed .side-brand {
  flex: 0 0 auto !important;
  justify-content: center !important;
  overflow: visible !important;
}
#sidebar.collapsed .side-brand .brand-copy {
  display: none !important;
}
#sidebar.collapsed #sidebarToggle {
  flex: 0 0 auto !important;
}
#sidebar.collapsed #sideNav {
  padding: 10px 8px 16px !important;
}
#sidebar.collapsed #sideNav .nav-section,
#sidebar.collapsed #sideNav button b,
#sidebar.collapsed #sideNav button em,
#sidebar.collapsed .sidebar-foot {
  display: none !important;
}
#sidebar.collapsed #sideNav button {
  grid-template-columns: 1fr !important;
  place-items: center !important;
  padding: 10px 6px !important;
}
#sidebar.collapsed #sideNav button span {
  font-size: 17px !important;
}
#sidebar.collapsed ~ .workspace-main {
  margin-left: var(--sidebar-mini) !important;
}
.workspace-topbar {
  position: sticky !important;
  top: 0 !important;
}
@media (max-width: 900px) {
  #sidebar {
    width: var(--sidebar) !important;
    transform: translateX(-100%) !important;
  }
  #sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  #sidebar.collapsed {
    width: var(--sidebar) !important;
  }
  #sidebar.collapsed .sidebar-head {
    height: 76px !important;
    flex-basis: 76px !important;
    flex-direction: row !important;
    padding: 16px !important;
  }
  #sidebar.collapsed .side-brand .brand-copy {
    display: grid !important;
  }
  #sidebar.collapsed #sideNav .nav-section {
    display: block !important;
  }
  #sidebar.collapsed #sideNav button b {
    display: block !important;
  }
  #sidebar.collapsed #sideNav button em {
    display: inline-flex !important;
  }
  #sidebar.collapsed #sideNav button {
    grid-template-columns: 22px minmax(0, 1fr) auto !important;
    place-items: initial !important;
    padding: 11px 12px !important;
  }
  #workspace .workspace-main,
  #sidebar.collapsed ~ .workspace-main {
    margin-left: 0 !important;
  }
}

/* V6 theme, calendar, chat reactions and management polish */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 700;
}
.theme-toggle span {
  font-size: 16px;
}
.sidebar-foot {
  gap: 8px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}
.tag {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
}
.notification-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.notification-item:hover {
  background: var(--panel2);
}
.message-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 8px;
}
.chat-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  position: relative;
}
.emoji-picker {
  position: absolute;
  left: 0;
  bottom: 44px;
  display: grid;
  grid-template-columns: repeat(5, 38px);
  gap: 4px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  z-index: 30;
}
.emoji-picker button,
.reaction-menu button,
.reaction-add,
.reaction-chip {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}
.emoji-picker button {
  width: 38px;
  height: 36px;
  border-radius: 8px;
}
.reaction-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  position: relative;
}
.reaction-chip {
  padding: 3px 7px;
  font-size: 12px;
}
.reaction-chip.mine {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--panel2));
}
.reaction-add {
  padding: 3px 7px;
  font-size: 11px;
}
.reaction-menu {
  display: flex;
  gap: 3px;
  position: absolute;
  left: 0;
  bottom: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}
.reaction-menu button {
  width: 31px;
  height: 29px;
  border-radius: 7px;
}
.calendar-picker {
  display: grid;
  gap: 14px;
}
.calendar-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.calendar-week span {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px;
}
.calendar-days > span {
  min-height: 40px;
}
.cal-day {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
  cursor: pointer;
}
.cal-day:hover {
  border-color: var(--accent);
}
.cal-day.selected {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 900;
}
.calendar-time {
  display: grid;
  grid-template-columns: 90px minmax(0, 240px);
  align-items: center;
  gap: 10px;
}
.calendar-selected {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
  color: var(--muted);
}

/* Keep the theme control available as an icon even when the sidebar is collapsed. */
#sidebar.collapsed .sidebar-foot {
  display: flex !important;
  padding: 8px !important;
  justify-content: center !important;
}
#sidebar.collapsed .sidebar-foot > small,
#sidebar.collapsed .sidebar-foot > #systemStatus,
#sidebar.collapsed .theme-toggle b {
  display: none !important;
}
#sidebar.collapsed .theme-toggle {
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
}
.management-only {
  display: none;
}

:root[data-theme="light"] {
  --bg: #f3f6f9;
  --panel: #ffffff;
  --panel2: #edf2f6;
  --line: #cbd6df;
  --muted: #5d7284;
  --text: #142231;
  --accent: #eaa82e;
  --good: #23865c;
  --bad: #c94444;
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="light"] .portal-body {
  background: var(--bg);
  color: var(--text);
}
:root[data-theme="light"] .portal-body a {
  color: #1767a4;
}
:root[data-theme="light"] .portal-body input,
:root[data-theme="light"] .portal-body select,
:root[data-theme="light"] .portal-body textarea {
  background: #fff;
  color: #142231;
  border-color: #bdcad5;
}
:root[data-theme="light"] .portal-body input:focus,
:root[data-theme="light"] .portal-body select:focus,
:root[data-theme="light"] .portal-body textarea:focus {
  border-color: #627f97;
  box-shadow: 0 0 0 2px rgba(234, 168, 46, 0.18);
}
:root[data-theme="light"] .button.secondary,
:root[data-theme="light"] .mini-btn,
:root[data-theme="light"] .icon-btn {
  background: #edf2f6;
  color: #1b2d3d;
  border-color: #c3d0da;
}
:root[data-theme="light"] .button.danger {
  background: #fce8e8;
  color: #942e35;
}
:root[data-theme="light"] .login-card,
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .workspace-topbar,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .stat,
:root[data-theme="light"] .drawer,
:root[data-theme="light"] .modal-card,
:root[data-theme="light"] .notification-drawer,
:root[data-theme="light"] .team-card,
:root[data-theme="light"] .chat-layout,
:root[data-theme="light"] .chat-main {
  background: #fff;
  color: #142231;
  border-color: #cbd6df;
}
:root[data-theme="light"] .sidebar-head,
:root[data-theme="light"] .sidebar-foot,
:root[data-theme="light"] .chat-head,
:root[data-theme="light"] .chat-compose,
:root[data-theme="light"] .drawer-section {
  border-color: #d4dde5;
}
:root[data-theme="light"] .side-nav button {
  color: #486073;
}
:root[data-theme="light"] .side-nav button:hover,
:root[data-theme="light"] .side-nav button.active {
  background: #e8f0f7;
  color: #142231;
}
:root[data-theme="light"] .brand {
  color: #172536;
}
:root[data-theme="light"] .brand-mark {
  border-color: #b9c9d6;
  background: #f4f7fa;
}
:root[data-theme="light"] .global-search,
:root[data-theme="light"] .user-menu-button,
:root[data-theme="light"] .notification-btn {
  background: #fff;
  border-color: #c5d1dc;
  color: #142231;
}
:root[data-theme="light"] .search-results,
:root[data-theme="light"] .user-menu,
:root[data-theme="light"] .autocomplete {
  background: #fff;
  border-color: #c3d0da;
  color: #142231;
  box-shadow: 0 18px 45px rgba(30, 50, 70, 0.15);
}
:root[data-theme="light"] .search-result,
:root[data-theme="light"] .user-menu button,
:root[data-theme="light"] .autocomplete button {
  color: #253c4f;
  border-color: #e0e6eb;
}
:root[data-theme="light"] .search-result:hover,
:root[data-theme="light"] .user-menu button:hover,
:root[data-theme="light"] .autocomplete button:hover {
  background: #edf3f7;
}
:root[data-theme="light"] .portal-table th {
  background: #eef3f7;
  color: #536c80;
  border-color: #ccd6df;
}
:root[data-theme="light"] .portal-table td {
  border-color: #dde4ea;
  color: #172536;
}
:root[data-theme="light"] .portal-table tr:hover td {
  background: #f8fafc;
}
:root[data-theme="light"] .subtext,
:root[data-theme="light"] .page-head p,
:root[data-theme="light"] .detail-kv dt,
:root[data-theme="light"] .timeline-item small,
:root[data-theme="light"] .chat-message small {
  color: #61788c;
}
:root[data-theme="light"] .notice,
:root[data-theme="light"] .calendar-selected,
:root[data-theme="light"] .tag,
:root[data-theme="light"] .cal-day,
:root[data-theme="light"] .theme-toggle {
  background: #edf3f7;
  color: #253c4f;
  border-color: #c9d5df;
}
:root[data-theme="light"] .modal-backdrop {
  background: rgba(34, 45, 55, 0.48);
}
:root[data-theme="light"] .drawer-scrim {
  background: rgba(40, 50, 60, 0.28);
}
:root[data-theme="light"] .flash {
  background: #e6f6ed;
  color: #175b3f;
  border-color: #8fc9aa;
  box-shadow: 0 15px 40px rgba(30, 50, 70, 0.18);
}
:root[data-theme="light"] .flash.err {
  background: #fbeaea;
  color: #8d2c32;
  border-color: #d8a2a6;
}
:root[data-theme="light"] .notification-item.unread {
  background: #eaf3fb;
}
:root[data-theme="light"] .notification-item:hover {
  background: #edf3f7;
}
:root[data-theme="light"] .chat-side {
  background: #f4f7fa;
  border-color: #ccd7df;
}
:root[data-theme="light"] .chat-side button {
  color: #4d6579;
}
:root[data-theme="light"] .chat-side button.active,
:root[data-theme="light"] .chat-side button:hover {
  background: #e5eef5;
  color: #172536;
}
:root[data-theme="light"] .chat-message p {
  color: #24394b;
}
:root[data-theme="light"] .avatar {
  background: #dfeaf2;
  color: #24425a;
}
:root[data-theme="light"] .lead-ref {
  background: #e5f0f8;
  border-color: #b5d0e4;
  color: #185f91;
}
:root[data-theme="light"] .metric {
  background: #eef3f7;
}
:root[data-theme="light"] .score:after {
  background: #fff;
}
:root[data-theme="light"] .score {
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), #d5dee6 0);
}
:root[data-theme="light"] .legal-doc {
  background: #fff;
  color: #151515;
  border: 1px solid #d7d7d7;
}
:root[data-theme="light"] .calendar-picker,
:root[data-theme="light"] .emoji-picker,
:root[data-theme="light"] .reaction-menu {
  background: #fff;
  color: #142231;
  border-color: #cbd6df;
}
:root[data-theme="light"] .reaction-chip,
:root[data-theme="light"] .reaction-add,
:root[data-theme="light"] .reaction-menu button,
:root[data-theme="light"] .emoji-picker button {
  background: #edf3f7;
  color: #142231;
  border-color: #cbd6df;
}

/* V7 — brand consistency, clearer light hierarchy, saved filters, profiles, status and attachments */
/* Match the approved homepage logo exactly. */
.portal-body .brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transform: skewX(-7deg);
  background: transparent;
}
.portal-body .brand-mark::before,
.portal-body .brand-mark::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 18px;
  background: var(--accent);
  left: 8px;
  transform: rotate(-42deg);
}
.portal-body .brand-mark::before {
  top: 11px;
}
.portal-body .brand-mark::after {
  bottom: 11px;
}
.portal-body .brand-mark span {
  position: absolute;
  width: 2px;
  height: 5px;
  background: var(--white);
  left: 16px;
  transform: none;
  border-radius: 0;
}
.portal-body .brand-mark span:first-child {
  top: 4px;
}
.portal-body .brand-mark span:last-child {
  bottom: 4px;
  top: auto;
  height: 5px;
  left: 16px;
}

:root[data-theme="light"] {
  --bg: #e9eef3;
  --panel: #ffffff;
  --panel2: #f1f4f7;
  --line: #c6d1db;
  --muted: #596f82;
  --text: #142231;
}
:root[data-theme="light"] .sidebar {
  background: #eef2f5 !important;
  border-color: #c8d3dd !important;
}
:root[data-theme="light"] .sidebar-head,
:root[data-theme="light"] .sidebar-foot {
  background: #e7edf2 !important;
}
:root[data-theme="light"] .workspace-topbar {
  background: rgba(247, 249, 251, 0.97) !important;
  border-color: #c8d3dd !important;
}
:root[data-theme="light"] .panel,
:root[data-theme="light"] .team-card,
:root[data-theme="light"] .modal-card,
:root[data-theme="light"] .drawer {
  background: #fff !important;
}
:root[data-theme="light"] .stat,
:root[data-theme="light"] .metric {
  background: #f5f7f9 !important;
}
:root[data-theme="light"] .chat-layout {
  background: #fff !important;
}
:root[data-theme="light"] .chat-main {
  background: #fff !important;
}
:root[data-theme="light"] .chat-side {
  background: #edf2f6 !important;
}
:root[data-theme="light"] .primary-text {
  color: #142231 !important;
}
:root[data-theme="light"] .brand-mark {
  background: #111820 !important;
  border-color: #8f9fab !important;
}
:root[data-theme="light"] .brand-mark span {
  background: #fff !important;
}

.view-as-banner {
  position: sticky;
  top: 0;
  z-index: 45;
  background: #fff0c9;
  color: #4b3710;
  border-bottom: 1px solid #d9aa38;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.view-as-banner[hidden] {
  display: none;
}
.view-as-banner button {
  width: auto;
}
.saved-filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.saved-filter-bar select {
  width: auto;
  min-width: 190px;
}
.quality-stack {
  display: grid;
  gap: 4px;
}
.quality-badge {
  display: inline-flex;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
}
.quality-badge.verified {
  background: #143b2a;
  color: #89e8b2;
}
.quality-badge.likely {
  background: #3d3418;
  color: #ffd470;
}
.quality-badge.prospect {
  background: var(--panel2);
  color: var(--muted);
}
.confidence {
  font-size: 10px;
  color: var(--muted);
}
.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: #48c98b;
}
.status-icon {
  font-size: 15px;
  line-height: 1;
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 8px;
}
.profile-stat {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 10px;
  padding: 10px;
}
.profile-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.profile-stat strong {
  font-size: 20px;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-attachment-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
  font-size: 12px;
}
.chat-attachment-preview img {
  max-width: 220px;
  max-height: 180px;
  border-radius: 7px;
  display: block;
}
.chat-file-selected {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.attachment-btn {
  width: auto !important;
}
.danger-zone {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.market-admin {
  margin-top: 18px;
}
.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.market-row:first-child {
  border-top: 0;
}
.market-row .subtext {
  margin: 0;
}
.dnc-notice {
  background: #4a2024;
  color: #ffd9db;
  border: 1px solid #744047;
  border-radius: 9px;
  padding: 9px 11px;
  margin: 10px 0;
}
.ownership-history {
  display: grid;
  gap: 8px;
}
.ownership-event {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.ownership-event small {
  color: var(--muted);
}
.match-score {
  font-size: 22px;
  font-weight: 900;
}
.match-reasons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.match-reasons span {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 99px;
  background: var(--panel2);
  border: 1px solid var(--line);
}
.source-grid {
  margin-top: 18px;
}
.readonly-input {
  opacity: 0.78;
  cursor: not-allowed;
}
@media (max-width: 700px) {
  .profile-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .view-as-banner {
    position: relative;
  }
  .saved-filter-bar select {
    width: 100%;
  }
}

/* V8 — portal email, provenance, contact ownership and workflow polish */
.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9dcaef;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
  text-align: left;
}
.text-link:hover {
  color: #c6e3fa;
}
.stale-source {
  color: #d4a74a !important;
}
.stale-source:before {
  content: "⚠ ";
  font-size: 10px;
}
.email-compose-tools {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 1.3fr);
  gap: 12px;
}
.input-button-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}
.input-button-row .mini-btn {
  white-space: nowrap;
}
.draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}
.draft-card {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 10px;
  padding: 11px;
  cursor: pointer;
}
.draft-card span,
.draft-card small {
  color: var(--muted);
  font-size: 11px;
}
.draft-card:hover {
  border-color: var(--accent);
}
.attachment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}
.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
}
.attachment-pill button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
}
.portal-table .text-link {
  font-size: 13px;
}
:root[data-theme="light"] .text-link {
  color: #1767a4;
}
:root[data-theme="light"] .text-link:hover {
  color: #0b4f82;
}
:root[data-theme="light"] .draft-card,
:root[data-theme="light"] .attachment-pill {
  background: #eef3f7;
  color: #142231;
  border-color: #c7d3dd;
}
:root[data-theme="light"] .stale-source {
  color: #8b6510 !important;
}
@media (max-width: 760px) {
  .email-compose-tools {
    grid-template-columns: 1fr;
  }
  .input-button-row {
    grid-template-columns: 1fr;
  }
  .input-button-row .mini-btn {
    width: 100%;
  }
}
/* V8 brand lockup — match the public home-page mark in portal and light mode. */
.portal-body .brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transform: skewX(-7deg);
  background: transparent;
}
.portal-body .brand-mark::before,
.portal-body .brand-mark::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 18px;
  background: var(--accent);
  left: 8px;
  transform: rotate(-42deg);
}
.portal-body .brand-mark::before {
  top: 11px;
}
.portal-body .brand-mark::after {
  bottom: 11px;
}
.portal-body .brand-mark span {
  position: absolute;
  width: 2px;
  height: 5px;
  background: #fff !important;
  left: 16px;
  transform: none;
  border-radius: 0;
}
.portal-body .brand-mark span:first-child {
  top: 4px;
}
.portal-body .brand-mark span:last-child {
  bottom: 4px;
  left: 16px;
  top: auto;
  height: 5px;
}
:root[data-theme="light"] .portal-body .brand-mark {
  background: #111820 !important;
  border-color: #8f9fab !important;
}
:root[data-theme="light"] .portal-body .brand-mark::before,
:root[data-theme="light"] .portal-body .brand-mark::after {
  background: var(--accent) !important;
}

/* V10 onboarding, academy, shared inbox and notification polish */
.onboarding-shell {
  align-items: flex-start;
  padding: 44px 18px 80px;
  overflow: auto;
}
.onboarding-card {
  width: min(980px, 100%);
  margin: auto;
  background: var(--panel, #0d1c29);
  border: 1px solid var(--line, #274056);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}
.onboarding-heading {
  max-width: 720px;
  margin: 28px 0;
}
.onboarding-heading h1 {
  font-size: clamp(30px, 5vw, 46px);
  margin: 8px 0;
}
.onboarding-heading p {
  color: var(--muted, #89a2b8);
  font-size: 16px;
  line-height: 1.6;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6b73c;
  font-weight: 800;
}
.onboarding-form {
  display: grid;
  gap: 18px;
}
.onboarding-section {
  padding: 22px;
  border: 1px solid var(--line, #274056);
  background: var(--panel-soft, #0a1722);
  border-radius: 17px;
}
.section-title-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.section-title-row h2 {
  font-size: 19px;
  margin: 1px 0 4px;
}
.section-title-row p {
  margin: 0;
  color: var(--muted, #89a2b8);
}
.section-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f6b73c;
  color: #09121b;
  font-weight: 900;
  flex: 0 0 32px;
}
.document-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line, #274056);
  background: var(--panel, #0d1c29);
}
.onboarding-submit {
  justify-self: end;
  min-width: 240px;
  padding: 14px 20px;
}
.training-hero {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  padding: 26px;
}
.training-hero h2 {
  font-size: 27px;
  margin: 6px 0 8px;
}
.training-hero p {
  color: var(--muted, #89a2b8);
  max-width: 660px;
}
.course-progress-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.course-progress-inline > div {
  height: 8px;
  background: var(--line, #274056);
  border-radius: 999px;
  overflow: hidden;
  flex: 1;
  max-width: 520px;
}
.course-progress-inline > div > span {
  display: block;
  height: 100%;
  background: #f6b73c;
  border-radius: 999px;
}
.training-progress-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 8px solid #f6b73c;
  display: grid;
  place-items: center;
  align-content: center;
  flex: 0 0 auto;
}
.training-progress-ring strong {
  font-size: 23px;
}
.training-progress-ring span {
  font-size: 11px;
  color: var(--muted, #89a2b8);
}
.course-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.course-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  border: 1px solid var(--line, #274056);
  border-radius: 15px;
  padding: 18px;
  background: var(--panel, #0d1c29);
  transition: 0.15s ease;
}
.course-row:hover {
  border-color: #3f6078;
}
.course-row.completed {
  border-color: rgba(72, 201, 139, 0.45);
}
.course-row.locked {
  opacity: 0.62;
}
.course-order {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: var(--panel-soft, #0a1722);
  border: 1px solid var(--line, #274056);
  color: #f6b73c;
}
.course-row.completed .course-order {
  background: rgba(72, 201, 139, 0.15);
  color: #48c98b;
}
.course-row-main h3 {
  margin: 3px 0 7px;
  font-size: 17px;
}
.course-row-main p {
  margin: 0;
  color: var(--muted, #89a2b8);
  line-height: 1.45;
}
.course-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #89a2b8);
  font-weight: 800;
}
.course-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  color: var(--muted, #89a2b8);
  font-size: 13px;
}
.certification-card {
  margin-top: 18px;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(72, 201, 139, 0.45);
  background: rgba(72, 201, 139, 0.08);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.certification-card strong {
  font-size: 18px;
  color: #48c98b;
}
.certification-card small {
  margin-left: auto;
  color: var(--muted, #89a2b8);
}
.course-modal > .course-kicker {
  color: #f6b73c;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
}
.course-modal > h2 {
  font-size: 28px;
  margin: 6px 0 20px;
}
.lesson-sections {
  display: grid;
  gap: 12px;
}
.lesson-section {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  padding: 16px;
  border-radius: 13px;
  background: var(--panel-soft, #0a1722);
  border: 1px solid var(--line, #274056);
}
.lesson-section h3 {
  margin: 0 0 7px;
}
.lesson-section p {
  margin: 0;
  line-height: 1.6;
  color: var(--text, #eef7ff);
}
.lesson-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #173149;
  color: #f6b73c;
  font-weight: 800;
}
.scenario-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(246, 183, 60, 0.4);
  background: rgba(246, 183, 60, 0.07);
}
.scenario-card > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f6b73c;
  font-weight: 800;
}
.scenario-card h3 {
  margin: 6px 0;
}
.scenario-card details {
  margin-top: 12px;
}
.scenario-card summary {
  cursor: pointer;
  font-weight: 800;
}
.knowledge-check {
  margin-top: 24px;
  border-top: 1px solid var(--line, #274056);
  padding-top: 20px;
  display: grid;
  gap: 16px;
}
.knowledge-check fieldset {
  border: 1px solid var(--line, #274056);
  border-radius: 13px;
  padding: 15px;
}
.knowledge-check legend {
  font-weight: 800;
  padding: 0 6px;
  line-height: 1.4;
}
.quiz-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
}
.quiz-choice:hover {
  background: var(--panel-soft, #0a1722);
}
.quiz-choice input {
  margin-top: 3px;
}
.thread-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.thread-head h2 {
  margin-bottom: 3px;
}
.thread-workflow {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel-soft, #0a1722);
  border: 1px solid var(--line, #274056);
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(150px, 1fr) minmax(
      170px,
      1fr
    );
  gap: 10px;
  align-items: end;
}
.thread-workflow small {
  display: block;
  color: var(--muted, #89a2b8);
}
.thread-workflow label {
  font-size: 12px;
  color: var(--muted, #89a2b8);
}
.thread-workflow select {
  margin-top: 4px;
}
.email-filters {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) !important;
}
.preference-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line, #274056);
  background: var(--panel-soft, #0a1722);
  border-radius: 13px;
  padding: 15px;
}
.preference-card p {
  margin: 4px 0 0;
}
.training-lock {
  margin-bottom: 14px;
}
.success-notice {
  border-color: rgba(72, 201, 139, 0.45) !important;
  background: rgba(72, 201, 139, 0.08) !important;
}
.readonly-input {
  opacity: 0.75;
}
html[data-theme="light"] .onboarding-card,
html[data-theme="light"] .course-row,
html[data-theme="light"] .lesson-section,
html[data-theme="light"] .thread-workflow,
html[data-theme="light"] .preference-card,
html[data-theme="light"] .document-callout {
  background: #fff;
}
html[data-theme="light"] .onboarding-section {
  background: #f4f7fa;
}
html[data-theme="light"] .course-row-main p,
html[data-theme="light"] .lesson-section p {
  color: #20364a;
}
@media (max-width: 760px) {
  .onboarding-card {
    padding: 18px;
  }
  .onboarding-section {
    padding: 16px;
  }
  .document-callout,
  .preference-card,
  .training-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .thread-workflow {
    grid-template-columns: 1fr;
  }
  .course-row {
    grid-template-columns: 40px 1fr;
  }
  .course-row-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .training-progress-ring {
    width: 90px;
    height: 90px;
  }
  .grid2 {
    grid-template-columns: 1fr !important;
  }
}

/* V11 academy, onboarding signature, pay plan and position-fee polish */
.native-agreement {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 20px;
  margin: 12px 0 18px;
  line-height: 1.55;
}
.native-agreement-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.native-agreement-head span {
  color: var(--muted);
  font-size: 12px;
}
.native-agreement h3 {
  margin: 17px 0 5px;
  font-size: 15px;
}
.native-agreement p {
  margin: 0;
  color: var(--muted);
}
.agreement-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 7px;
  margin: 10px 0;
}
.agreement-rate-grid span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
}
.agreement-rate-grid b {
  color: var(--accent);
}
.position-fee-builder {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--panel2);
}
.section-title-row.compact {
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
}
.section-title-row.compact h3 {
  margin: 0 0 3px;
}
.section-title-row.compact p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.fee-table-head,
.fee-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(145px, 0.45fr) 38px;
  gap: 8px;
  align-items: center;
}
.fee-table-head {
  padding: 5px 7px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.fee-row {
  margin-top: 7px;
}
.money-input {
  position: relative;
}
.money-input > span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  z-index: 1;
}
.money-input input {
  padding-left: 24px !important;
}
.compact-table {
  margin: 12px 0;
}
.pay-plan-doc {
  max-width: 820px;
}
.pay-plan-table th:last-child,
.pay-plan-table td:last-child {
  text-align: right;
}
.pay-plan-table td {
  font-size: 15px;
}
.pay-plan-table strong {
  color: var(--accent);
  font-size: 16px;
}
.pay-plan-terms {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 12px;
}
.pay-plan-terms p {
  line-height: 1.6;
  color: var(--muted);
}
.academy-v11 {
  width: min(1040px, 96vw);
}
.academy-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.academy-top h2 {
  margin: 5px 0 0;
  font-size: 27px;
}
.academy-mode {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.academy-progress {
  height: 7px;
  background: var(--panel2);
  border-radius: 999px;
  overflow: hidden;
  margin: 5px 0 18px;
}
.academy-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.academy-slide {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 18px;
  padding: 28px;
}
.slide-copy h3 {
  font-size: 28px;
  line-height: 1.12;
  margin: 8px 0 14px;
}
.slide-copy p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.slide-visual {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  align-items: center;
}
.slide-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 16px 0;
}
.slide-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  padding: 0;
  border: 0;
  background: var(--line);
  cursor: pointer;
}
.slide-dots button.active {
  background: var(--accent);
  transform: scale(1.25);
}
.academy-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.academy-actions .button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.visual-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.visual-flow > i {
  font-style: normal;
  color: var(--muted);
  font-size: 20px;
}
.flow-step {
  min-width: 95px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  background: var(--panel2);
}
.flow-step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  font-weight: 900;
}
.flow-step b {
  font-size: 12px;
}
.visual-math {
  display: grid;
  gap: 10px;
}
.visual-math > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
}
.visual-math span {
  color: var(--muted);
}
.visual-math strong {
  font-size: 18px;
}
.visual-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.visual-compare > div {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--panel2);
}
.visual-compare small {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 10px;
}
.visual-compare strong {
  font-size: 20px;
  line-height: 1.35;
}
.visual-checklist {
  display: grid;
  gap: 9px;
}
.visual-checklist > div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px;
  background: var(--panel2);
}
.visual-checklist span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(72, 201, 139, 0.13);
  color: #48c98b;
  font-weight: 900;
}
.visual-timeline {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  position: relative;
  padding-top: 25px;
}
.visual-timeline:before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 36px;
  height: 2px;
  background: var(--line);
}
.visual-timeline > div {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}
.visual-timeline span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 5px solid var(--panel);
  margin: 0 auto 10px;
}
.visual-timeline b {
  font-size: 11px;
  line-height: 1.3;
}
.training-table {
  font-size: 12px;
}
.portal-demo {
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: var(--bg);
}
.portal-demo-top {
  height: 27px;
  background: var(--panel2);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
}
.portal-demo-top span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.portal-demo-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 220px;
}
.portal-demo-side {
  background: #09131d;
  border-right: 1px solid var(--line);
}
.portal-demo-main {
  padding: 18px;
}
.portal-demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}
.portal-demo-toolbar button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  padding: 8px 12px;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(246, 183, 60, 0.13);
}
.portal-demo-lines {
  display: grid;
  gap: 9px;
  margin: 32px 0;
}
.portal-demo-lines i {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: var(--panel2);
}
.portal-demo-lines i:nth-child(2) {
  width: 77%;
}
.portal-demo-lines i:nth-child(3) {
  width: 55%;
}
.portal-demo p {
  font-size: 12px !important;
  color: var(--muted) !important;
}
.quiz-screen {
  max-width: 820px;
  margin: 0 auto;
  min-height: 420px;
  padding: 20px 4px;
}
.quiz-screen-head h3 {
  font-size: 25px;
  line-height: 1.3;
  margin: 9px 0 8px;
}
.quiz-screen-head p {
  color: var(--muted);
  margin: 0 0 22px;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--panel2);
  cursor: pointer;
  text-align: left;
  transition: 0.12s ease;
}
.quiz-option:hover {
  border-color: #52708a;
}
.quiz-option.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel2));
  box-shadow: 0 0 0 1px var(--accent);
}
.quiz-option input {
  margin: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}
.quiz-option span {
  line-height: 1.45;
}
.quiz-result-card {
  max-width: 820px;
  margin: 8px auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel2);
}
.quiz-result-card > strong {
  display: block;
  font-size: 50px;
  line-height: 1;
  margin: 12px 0 6px;
}
.quiz-result-card.passed > strong {
  color: #48c98b;
}
.quiz-result-card.needs-review > strong {
  color: var(--accent);
}
.missed-review {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.missed-review > div {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  background: var(--panel);
}
.missed-review p {
  margin: 6px 0;
  color: var(--muted);
}
.missed-review small {
  display: block;
  margin-top: 5px;
  color: var(--text);
}
html[data-theme="light"] .native-agreement,
html[data-theme="light"] .slide-visual,
html[data-theme="light"] .quiz-result-card .missed-review > div {
  background: #fff;
}
html[data-theme="light"] .academy-slide,
html[data-theme="light"] .quiz-option,
html[data-theme="light"] .position-fee-builder {
  background: #f4f7fa;
}
html[data-theme="light"] .portal-demo-side {
  background: #dce5ec;
}
@media (max-width: 800px) {
  .academy-slide {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 19px;
  }
  .slide-visual {
    min-height: 240px;
  }
  .slide-copy h3 {
    font-size: 23px;
  }
  .visual-compare {
    grid-template-columns: 1fr;
  }
  .fee-table-head {
    display: none;
  }
  .fee-row {
    grid-template-columns: 1fr 120px 38px;
  }
  .academy-top {
    flex-direction: column;
  }
  .native-agreement-head {
    flex-direction: column;
  }
}

.source-link {
  color: var(--accent, #ffbb38);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entity-highlight {
  animation: entity-focus 2.4s ease-out;
  outline: 2px solid var(--accent, #ffbb38);
  outline-offset: -2px;
}
@keyframes entity-focus {
  0%, 35% { background: rgba(255, 187, 56, 0.25); }
  100% { background: transparent; }
}

/* V12 Pass 3: resilient training, agreements and compensation layouts */
.agreement-validation {
  border: 1px solid #a94b52;
  background: #3a1e22;
  color: #ffd7d9;
  border-radius: 12px;
  padding: 12px 14px;
}
.agreement-validation ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.field-error {
  border-color: #e3656c !important;
  box-shadow: 0 0 0 2px rgba(227, 101, 108, 0.18) !important;
}
.fee-row.has-error {
  border: 1px solid #e3656c;
  background: rgba(227, 101, 108, 0.09);
  border-radius: 11px;
  padding: 7px;
}
.document-action-required {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #a94b52;
  background: #28191f;
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0 18px;
}
.document-action-required h3 {
  margin: 8px 0 4px;
}
.document-action-required p {
  margin: 0;
  color: var(--muted);
}
.agreement-sign-doc {
  margin-bottom: 18px;
}
.approval-grid {
  display: grid;
  gap: 16px;
}
.approval-section h2 {
  margin: 0 0 6px;
}
.coaching-detail,
.capstone-review-answers section {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  padding: 13px;
  margin: 10px 0;
}
.coaching-detail h3,
.capstone-review-answers h3 {
  margin: 0 0 8px;
}
.capstone-review-answers p {
  white-space: pre-wrap;
}
.capstone-card {
  margin: 18px 0;
}
.capstone-card h2 {
  margin: 10px 0 5px;
}
.capstone-card textarea {
  min-height: 130px;
}
.pay-plan-doc {
  width: 100%;
  max-width: 820px;
  overflow: hidden;
}
.pay-plan-table {
  min-width: 0 !important;
  width: 100%;
  table-layout: fixed;
  border: 1px solid #ccd3d9;
  border-radius: 8px;
  overflow: hidden;
}
.pay-plan-table th,
.pay-plan-table td {
  width: 50%;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #151515 !important;
  background: #fff !important;
  border-color: #d8dde2 !important;
}
.pay-plan-table th {
  color: #42505c !important;
  background: #eef2f5 !important;
  position: static;
}
.pay-plan-table tr:hover td {
  color: #111 !important;
  background: #e8f0f7 !important;
}
.pay-plan-table strong {
  color: #815600 !important;
}
.pay-plan-terms p {
  color: #303840 !important;
}
.modal-card.academy-shell {
  width: min(1080px, 96vw);
  height: min(860px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.academy-shell > .modal-close {
  z-index: 5;
}
.academy-shell .academy-v11 {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.academy-shell .academy-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  margin: 0;
  padding: 22px 64px 14px 24px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.academy-shell #academyStage {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px;
  overscroll-behavior: contain;
}
.academy-shell .academy-slide,
.academy-shell .slide-copy,
.academy-shell .slide-visual {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.academy-shell .academy-slide {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}
.academy-shell .slide-copy p,
.academy-shell .slide-visual,
.academy-shell td,
.academy-shell th {
  overflow-wrap: anywhere;
}
.academy-shell .slide-visual .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.academy-shell .training-table {
  min-width: 0;
  table-layout: fixed;
}
.academy-shell .academy-actions {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  background: var(--panel);
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 12px 0 0;
}
.academy-shell .academy-progress,
.academy-shell .slide-dots {
  flex: 0 0 auto;
}
.academy-shell .quiz-screen {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: 14px;
}
.academy-shell .quiz-screen-head h3 {
  font-size: clamp(24px, 3.1vw, 34px);
  line-height: 1.18;
  margin-bottom: 10px;
}
.academy-shell .quiz-options {
  gap: 10px;
}
.academy-shell .quiz-option {
  padding: 14px 18px;
}
.academy-shell .quiz-result-card {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: visible;
  flex: 0 0 auto;
  padding-bottom: 20px;
}

/* Pass 6C follow-up: keep the working surface readable and actions together. */
.available-work-panel { padding: 14px; }
.queue-summary .stat { min-height: 96px; }
.queue-filters { margin-bottom: 10px; }
.worklist-caption { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; padding:0 4px 12px; }
.available-work-table { min-width: 1050px; table-layout:fixed; }
.available-work-table th:nth-child(1), .available-work-table td:nth-child(1) { width:24%; }
.available-work-table th:nth-child(2), .available-work-table td:nth-child(2) { width:22%; }
.available-work-table th:nth-child(3), .available-work-table td:nth-child(3) { width:12%; }
.available-work-table th:nth-child(4), .available-work-table td:nth-child(4) { width:17%; }
.available-work-table th:nth-child(5), .available-work-table td:nth-child(5) { width:12%; }
.available-work-table th:nth-child(6), .available-work-table td:nth-child(6) { width:13%; }
.available-work-table td { vertical-align:middle; }
.available-work-table .primary-text { font-size:14px; }
.available-work-table .queue-status { margin-top:7px; }
.queue-actions { flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.queue-actions .mini-btn { white-space:nowrap; }
@media (max-width: 760px) {
  .chat-layout { height: clamp(360px, calc(100dvh - 225px), 620px); }
  .worklist-caption { align-items:flex-start; flex-direction:column; gap:3px; }
}
.academy-shell .visual-flow {
  min-width: 0;
}
.academy-shell .flow-step {
  min-width: 80px;
}
html[data-theme="light"] .agreement-validation {
  background: #fff0f1;
  color: #77272e;
}
html[data-theme="light"] .document-action-required {
  background: #fff4f4;
}
html[data-theme="light"] .academy-shell .academy-top {
  background: #fff;
}
html[data-theme="light"] .academy-shell .academy-actions {
  background: #fff;
}
@media (max-width: 800px) {
  .modal-backdrop {
    padding: 8px;
  }
  .modal-card.academy-shell {
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .academy-shell .academy-top {
    padding: 18px 52px 12px 16px;
  }
  .academy-shell #academyStage {
    padding: 12px 14px;
  }
  .academy-shell .academy-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }
  .academy-shell .slide-visual {
    min-height: 190px;
    padding: 13px;
  }
  .academy-shell .academy-actions {
    gap: 8px;
  }
  .academy-shell .academy-actions .button {
    padding: 11px 12px;
  }
  .document-action-required {
    align-items: stretch;
    flex-direction: column;
  }
  .pay-plan-doc {
    padding: 20px;
  }
  .pay-plan-table th,
  .pay-plan-table td {
    font-size: 12px;
    padding: 10px 8px;
  }
  .fee-row {
    grid-template-columns: minmax(0, 1fr) 108px 38px;
  }
  .approval-section {
    padding: 12px;
  }
  .profile-summary-grid,
  .agreement-review-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .drawer { padding:22px 17px; }
}
@media (max-width: 520px) {
  .profile-summary-grid,
  .agreement-review-summary { grid-template-columns:1fr; }
  .profile-hero { grid-template-columns:52px minmax(0,1fr); }
  .profile-avatar { width:52px; height:52px; border-radius:14px; }
}

/* Pass 6C: keyboard focus and dense screens that remain usable on phones. */
.portal-body :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.email-mailbox-summary { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:3px 12px; }
.email-mailbox-summary small { grid-column:1 / -1; }
.thread-workflow label { min-width:142px; }
@media (max-width:700px) {
  .content { padding:14px 12px 28px; }
  .workspace-topbar,.topbar-actions { gap:8px; }
  .compact-action { padding:10px 11px; }
  .page-head h1 { font-size:clamp(28px,8vw,36px); }
  .panel { border-radius:14px; }
  .email-mailbox-summary,.thread-workflow { grid-template-columns:1fr; }
  .email-mailbox-summary small { grid-column:auto; }
  .thread-workflow label { min-width:0; }
  .row-actions { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; } }


/* Pass 7: viewport-safe recruiter workspaces and result actions. */
#mainContent[data-active-view="chat"] { min-height: 0; height: calc(100dvh - 128px); overflow: hidden; display: flex; flex-direction: column; }
#mainContent[data-active-view="chat"] .page-head { flex: 0 0 auto; }
#mainContent[data-active-view="chat"] .chat-layout { height: auto; min-height: 0; flex: 1 1 auto; margin-bottom: 0; }
#mainContent[data-active-view="chat"] .chat-main, #mainContent[data-active-view="chat"] .chat-messages { min-height: 0; }
.academy-shell #academyStage:has(.quiz-result-card) { display:block; overflow-y:auto; overscroll-behavior:contain; }
.academy-shell .quiz-result-card { margin: 0 auto 18px; }
.academy-shell .quiz-result-card .academy-actions { justify-content:center; }
.academy-shell .quiz-result-card .academy-actions:has(> :nth-child(2)) { justify-content:space-between; }
@media (max-width: 900px) {
  #mainContent[data-active-view="chat"] { height: auto; min-height: calc(100dvh - 118px); overflow: visible; }
  #mainContent[data-active-view="chat"] .chat-layout { height: calc(100dvh - 210px); min-height: 430px; }
}

/* Pass 8: stable loading state, recruiter-safe navigation, and a Slack-inspired conversation surface. */
.access-loading-card { text-align:center; }
.access-loading-card .brand { justify-content:center; }
.access-loading-card h1 { margin-bottom:8px; }
.access-spinner { width:42px; height:42px; margin:30px auto 18px; border:4px solid #2b4256; border-top-color:var(--accent); border-radius:50%; animation:access-spin .8s linear infinite; }
@keyframes access-spin { to { transform:rotate(360deg); } }
.profile-summary-grid .email-value { font-size:clamp(12px, 1.05vw, 16px); overflow-wrap:anywhere; word-break:normal; }
#mainContent[data-active-view="chat"] { height:calc(100dvh - 104px); padding-top:14px; padding-bottom:14px; }
#mainContent[data-active-view="chat"] .chat-layout { grid-template-columns:280px minmax(0, 1fr) auto; }
.chat-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; }
.chat-head > div { min-width:0; display:grid; gap:3px; }
.chat-head small { color:var(--muted); font-size:12px; }
.chat-details { width:330px; overflow:auto; border-left:1px solid #243747; background:#0a1420; padding:16px; }
.chat-details-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding-bottom:14px; border-bottom:1px solid #243747; }
.chat-details-head > div { display:grid; gap:3px; }
.chat-details-head small,.member-row small { color:var(--muted); font-size:12px; }
.chat-details-section h4 { display:flex; justify-content:space-between; margin:18px 0 10px; font-size:12px; text-transform:uppercase; letter-spacing:.7px; color:#9ab1c4; }
.chat-details-section input { width:100%; margin-bottom:10px; }
.member-list { display:grid; gap:6px; max-height:calc(100dvh - 330px); overflow:auto; margin-bottom:14px; }
.member-row { display:flex; align-items:center; gap:9px; padding:8px; border-radius:8px; }
.member-row:hover { background:#142738; }
.member-row > div { min-width:0; display:grid; gap:2px; }
.member-row strong,.member-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.member-avatar { width:30px; height:30px; flex:0 0 30px; border-radius:8px; display:grid; place-items:center; background:#29435a; font-weight:800; }
.member-picker { display:grid; max-height:50vh; overflow:auto; gap:4px; }
.member-picker .member-check { display:grid; grid-template-columns:auto 1fr; gap:2px 9px; align-items:center; }
.member-picker .member-check small { grid-column:2; color:var(--muted); }
.agreement-history { display:grid; gap:8px; }
@media (max-width: 1000px) { .chat-details { position:absolute; right:0; top:0; bottom:0; z-index:5; box-shadow:-18px 0 42px #0008; } .chat-layout { position:relative; } }
@media (max-width: 700px) { #mainContent[data-active-view="chat"] { height:calc(100dvh - 82px); padding:0; } #mainContent[data-active-view="chat"] .chat-layout { grid-template-columns:1fr; } .chat-side { display:none; } .chat-details { width:min(92vw,360px); } }

/* Pass 9: a channel workspace, not a checkbox dialog. */
.chat-head-actions { display:flex; align-items:center; gap:8px; }
.chat-head-actions input { width:190px; padding:8px 10px; font-size:13px; }
.channel-tabs { display:flex; gap:4px; padding:13px 0 8px; border-bottom:1px solid #243747; }
.channel-tabs button { border:0; background:transparent; color:var(--muted); padding:7px 8px; border-radius:6px; font:inherit; font-size:13px; }
.channel-tabs button.active { color:var(--text); background:#173147; }
.channel-item-list { display:grid; gap:7px; }
.channel-item-list > a,.channel-item-list > button,.channel-search-results button { display:grid; gap:3px; text-align:left; padding:10px; border:1px solid #253a4b; background:#101f2d; border-radius:8px; color:var(--text); }
.channel-item-list small,.channel-search-results small { color:var(--muted); }
.people-manage-list { display:grid; gap:7px; max-height:52vh; overflow:auto; margin-top:12px; }
.people-manage-list .member-row { border:1px solid #253a4b; }
.people-manage-list .mini-btn { margin-left:auto; }
.message-actions { display:flex; gap:10px; margin-top:5px; }
.text-action { background:transparent; border:0; color:#8fb9e9; padding:2px 0; font-size:12px; cursor:pointer; }
.text-action:hover { color:var(--accent); text-decoration:underline; }
.chat-thread { width:370px; min-width:300px; display:flex; flex-direction:column; border-left:1px solid #243747; background:#0a1420; overflow:hidden; }
.thread-scroll { overflow:auto; padding:14px; flex:1; }
.thread-message { padding:10px 0; border-bottom:1px solid #203443; }
.thread-message strong { margin-right:8px; }
.thread-message small { color:var(--muted); font-size:11px; }
.thread-message p { margin:6px 0 0; line-height:1.4; }
.thread-replies { margin-top:8px; padding-left:12px; border-left:2px solid #29465d; }
.thread-compose { padding:12px; border-top:1px solid #243747; display:grid; gap:8px; }
.thread-compose textarea { min-height:76px; resize:vertical; }
.channel-search-results { display:grid; gap:8px; max-width:760px; margin:20px auto; }
@media (max-width:1200px) { .chat-thread { position:absolute; z-index:7; right:0; top:0; bottom:0; box-shadow:-18px 0 42px #0008; } }
@media (max-width:700px) { .chat-head-actions input { width:150px; } .chat-thread { width:min(94vw,380px); } }

/* Pass 10: compact message density with Slack-like hover actions. */
.chat-messages { padding:12px 16px; }
.chat-message { grid-template-columns:30px 1fr; gap:8px; margin-bottom:10px; }
.chat-message .avatar { width:30px; height:30px; border-radius:7px; font-size:13px; }
.chat-message strong { font-size:12px; }
.chat-message small { font-size:11px; }
.chat-message p { font-size:14px; line-height:1.32; margin:2px 0; }
.reaction-row { margin-top:4px; }
.reaction-chip { padding:2px 6px; font-size:11px; }
.reaction-add,.message-actions { opacity:0; pointer-events:none; transition:opacity .12s ease; }
.chat-message:hover .reaction-add,.chat-message:hover .message-actions,.chat-message:focus-within .reaction-add,.chat-message:focus-within .message-actions { opacity:1; pointer-events:auto; }
.reaction-add { padding:2px 6px; font-size:10px; }
.message-actions { gap:8px; margin-top:2px; }
.text-action { font-size:11px; line-height:1.2; }

/* Pass 23: keep conversation scanning dense; controls appear only on hover. */
.chat-messages { padding:8px 14px; }
.chat-message { margin-bottom:6px; }
.chat-message p { font-size:13px; line-height:1.25; }
.reaction-row { margin-top:2px; }
.message-actions { margin-top:1px; }

/* Email uses compact tabs so messages stay in one place without a page reload. */
.email-folder-tabs { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 12px; padding:0 0 12px; border-bottom:1px solid #24394b; }
.email-folder-tabs .mini-btn { min-height:32px; }

/* Pass 12: readable recruiter email conversation view. */
.email-thread-head { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:12px; align-items:center; padding:2px 38px 18px 0; border-bottom:1px solid #253748; }
.email-thread-avatar,.email-message-avatar { display:grid; place-items:center; color:#0a1621; background:linear-gradient(145deg,#ffd46d,#f5ac18); font-weight:850; }
.email-thread-avatar { width:48px; height:48px; border-radius:14px; font-size:19px; }
.email-thread-head p { margin:0 0 3px; color:#96b5d2; font-size:12px; }
.email-thread-head h2 { margin:0; font-size:24px; line-height:1.15; overflow-wrap:anywhere; }
.email-thread-head > div:nth-child(2) > span { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.email-context { margin-top:18px; padding:14px 16px; border:1px solid #263c4e; background:#0d1d2a; border-radius:12px; }
.email-context-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.email-context-title h3 { margin:0; font-size:15px; }
.email-context-title > span { display:grid; place-items:center; min-width:22px; height:22px; padding:0 6px; border-radius:999px; color:#0a1621; background:#ffbd36; font-size:12px; font-weight:800; }
.email-context-items { display:flex; flex-wrap:wrap; gap:12px 24px; margin-top:12px; }
.email-context-items > div { display:grid; gap:2px; min-width:160px; max-width:100%; }
.email-context-items small { color:#88a5bf; font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.email-context-items strong { color:#e8f3ff; font-size:13px; overflow-wrap:anywhere; }
.email-context-items span,.email-context p { color:var(--muted); font-size:12px; margin:0; }
.email-context-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.email-context-links a { color:#9dcbff; font-size:12px; text-decoration:none; border:1px solid #31516a; border-radius:7px; padding:6px 8px; }
.email-context-links a:hover { border-color:var(--accent); color:#fff; }
.email-conversation { display:grid; gap:12px; margin-top:18px; }
.email-message-card { border:1px solid #263c4e; border-radius:12px; background:#0d1c28; overflow:hidden; }
.email-message-card.is-outbound { border-left:3px solid #f5b62b; }
.email-message-card.is-inbound { border-left:3px solid #5d9ed1; }
.email-message-card > header { display:flex; align-items:center; gap:9px; padding:12px 14px; background:#102332; border-bottom:1px solid #263c4e; }
.email-message-avatar { width:30px; height:30px; border-radius:9px; flex:0 0 30px; font-size:12px; }
.is-inbound .email-message-avatar { color:#e8f6ff; background:#234a69; }
.email-message-meta { display:grid; min-width:0; gap:1px; }
.email-message-meta strong { font-size:13px; overflow-wrap:anywhere; }
.email-message-meta span { color:var(--muted); font-size:11px; }
.email-direction { margin-left:auto; color:#9cb5cb; font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.email-message-body { padding:16px 16px 14px; color:#f1f7fc; font-size:15px; line-height:1.55; overflow-wrap:anywhere; }
.email-attachments { display:flex; flex-wrap:wrap; gap:7px; padding:0 16px 14px; }
.email-attachment { color:#b6dbff; background:#132c40; border:1px solid #31516a; border-radius:7px; padding:6px 8px; font-size:12px; text-decoration:none; }
.email-attachment:hover { color:#fff; border-color:var(--accent); }
.email-quoted { border-top:1px solid #263c4e; }
.email-quoted summary { cursor:pointer; color:#9abbd8; padding:10px 16px; font-size:12px; user-select:none; }
.email-quoted summary:hover { color:#fff; background:#112535; }
.email-quoted > div { padding:0 16px 14px; color:#95aabc; font-size:12px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
.email-thread-footer { position:sticky; bottom:-28px; margin:18px -28px -28px; padding:14px 28px; border-top:1px solid #253748; background:#0a1621f5; box-shadow:0 -10px 24px #0004; }
:root[data-theme="light"] .email-context,:root[data-theme="light"] .email-message-card { background:#fff; border-color:#cbd9e4; }
:root[data-theme="light"] .email-message-card > header { background:#f3f8fc; border-color:#d7e2ea; }
:root[data-theme="light"] .email-message-body,:root[data-theme="light"] .email-context-items strong { color:#172634; }
:root[data-theme="light"] .email-quoted { border-color:#d7e2ea; }
:root[data-theme="light"] .email-quoted summary:hover { background:#edf5fb; color:#172634; }
:root[data-theme="light"] .email-thread-footer { background:#fffffff5; border-color:#cbd9e4; }
@media (max-width:700px) { .email-thread-head { grid-template-columns:42px minmax(0,1fr); padding-right:32px; } .email-thread-head .chip { grid-column:2; justify-self:start; } .email-thread-avatar { width:42px; height:42px; font-size:16px; } .email-thread-head h2 { font-size:20px; } .email-context-items { display:grid; grid-template-columns:1fr; gap:10px; } .email-thread-footer { bottom:-22px; margin:16px -17px -22px; padding:12px 17px; } }
