:root {
  --bg: #080b0f;
  --bg-soft: #10151c;
  --panel: #151a21;
  --panel-2: #1c222b;
  --line: #303947;
  --line-soft: #242c36;
  --text: #eef3f8;
  --muted: #94a3b8;
  --green: #18c964;
  --green-soft: rgba(24, 201, 100, 0.14);
  --red: #f04444;
  --red-soft: rgba(240, 68, 68, 0.15);
  --yellow: #f5c542;
  --blue: #2f80ed;
  --shadow: rgba(0, 0, 0, 0.35);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--green) #0b0f14;
}

*::-webkit-scrollbar {
  width: 0.7rem;
  height: 0.7rem;
}

*::-webkit-scrollbar-track {
  background: #0b0f14;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--green), #0f8d49);
  border: 2px solid #0b0f14;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(24, 201, 100, 0.05), transparent 28rem),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.login-panel {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  padding: 1.5rem;
  position: relative;
  z-index: 3;
}

.login-activity-float-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.login-activity-chip {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  max-width: min(21rem, calc(100vw - 2rem));
  padding: 0.52rem 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(11, 15, 20, 0.64);
  color: rgba(238, 243, 248, 0.84);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: normal;
  will-change: transform;
}

.login-activity-chip.up {
  border-color: rgba(24, 201, 100, 0.32);
  color: #d7fbe5;
}

.login-activity-chip.down {
  border-color: rgba(47, 128, 237, 0.34);
  color: #dcecff;
}

.login-activity-chip.yield {
  border-color: rgba(245, 197, 66, 0.36);
  color: #fff1bc;
}

.brand-mark,
.terminal-brand,
.session-box,
.ticker-strip,
.panel-title,
.form-row,
.check-row {
  display: flex;
  align-items: center;
}

.brand-mark {
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.brand-mark strong,
.terminal-brand strong {
  display: block;
  line-height: 1;
}

.brand-mark small,
.terminal-brand small {
  display: block;
  color: var(--muted);
  margin-top: 0.25rem;
}

.brand-pulse,
.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.login-form,
.action-form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #0b0f14;
  padding: 0.55rem 0.7rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(24, 201, 100, 0.12);
}

textarea {
  min-height: 5.5rem;
  resize: vertical;
}

button[type="submit"] {
  min-height: 2.6rem;
  border: 0;
  border-radius: 6px;
  color: #061009;
  background: var(--green);
  font-weight: 800;
}

.primary-action {
  border: 0;
  border-radius: 6px;
  color: #061009;
  background: var(--green);
  font-weight: 800;
}

.primary-action.danger {
  color: #fff7f7;
  background: var(--red);
}

.link-button {
  min-height: 2.1rem;
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  text-align: center;
  font-weight: 700;
}

.link-button:hover {
  color: #baf7d2;
}

.form-error {
  min-height: 1.2rem;
  margin: 0;
  color: #ff9a9a;
  font-size: 0.86rem;
}

.terminal-topbar {
  min-height: 3.6rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #11161d;
  position: sticky;
  top: 0;
  z-index: 10;
}

.terminal-brand {
  gap: 0.65rem;
}

.ticker-strip {
  gap: 0.55rem;
  min-width: 0;
  overflow: hidden;
}

.ticker-strip > span {
  white-space: nowrap;
  border: 1px solid var(--line-soft);
  background: #0b0f14;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ticker-strip > span b {
  color: var(--green);
  margin-left: 0.25rem;
}

.withdrawal-marquee {
  flex: 1 1 18rem;
  min-width: 14rem;
  max-width: 100%;
  height: 2.05rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(240, 68, 68, 0.28);
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(240, 68, 68, 0.08), rgba(11, 15, 20, 0.96) 7rem), #0b0f14;
  mask-image: linear-gradient(90deg, transparent, #000 1.2rem, #000 calc(100% - 1.2rem), transparent);
}

.withdrawal-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: max-content;
  animation: withdrawalMarquee 58s linear infinite;
  will-change: transform;
}

.withdrawal-marquee:hover .withdrawal-marquee-track {
  animation-play-state: paused;
}

.withdrawal-marquee-track.static {
  padding-left: 0.75rem;
  animation: none;
}

.withdrawal-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.withdrawal-marquee-item i {
  width: 0.38rem;
  height: 0.38rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 10px rgba(240, 68, 68, 0.72);
}

.withdrawal-marquee-item strong {
  color: var(--text);
}

.withdrawal-marquee-item b {
  color: #ffb4b4;
  margin: 0;
}

.withdrawal-marquee-item small {
  color: #b6c2d2;
  font-size: 0.7rem;
}

@keyframes withdrawalMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.session-box {
  gap: 0.55rem;
  justify-content: flex-end;
}

.profile-shell {
  position: relative;
  flex: 0 0 auto;
}

.profile-button {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0f14;
  color: var(--text);
  padding: 0;
}

.profile-button:hover,
.profile-button.active {
  border-color: var(--green);
}

.profile-avatar {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: linear-gradient(145deg, #1d2632, #10151c);
  color: #cfe2ff;
  font-weight: 800;
  font-size: 0.78rem;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

button.profile-avatar {
  border: 0;
  padding: 0;
  cursor: default;
}

.profile-photo-trigger[data-profile-photo-preview],
.chat-quick-avatar[data-profile-photo-preview] {
  cursor: zoom-in;
}

button.profile-avatar[data-profile-photo-preview]:focus-visible,
.chat-quick-avatar[data-profile-photo-preview]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.profile-panel {
  width: min(330px, calc(100vw - 2rem));
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10151c;
  box-shadow: 0 18px 60px var(--shadow);
  max-height: min(760px, calc(100vh - 4.8rem));
  overflow: auto;
  z-index: 60;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
}

.profile-summary div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.profile-summary strong,
.profile-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary small {
  color: var(--muted);
  font-size: 0.75rem;
}

.profile-form {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
}

.profile-form + .profile-form {
  border-top: 1px solid var(--line-soft);
}

.profile-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 0.86rem;
}

.profile-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  min-height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  text-transform: none;
}

.profile-form textarea {
  min-height: 5rem;
  resize: vertical;
}

.profile-form button {
  min-height: 2.45rem;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #03130a;
  font-weight: 800;
}

.notification-shell {
  position: relative;
  flex: 0 0 auto;
}

.notification-button {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  position: relative;
}

.privacy-button {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  font-size: 1rem;
}

.privacy-button:hover,
.privacy-button.active {
  border-color: var(--green);
  color: var(--green);
}

.privacy-button.active::after {
  content: "";
  width: 1.35rem;
  height: 2px;
  position: absolute;
  left: 0.32rem;
  top: 0.94rem;
  border-radius: 999px;
  background: var(--green);
  transform: rotate(-38deg);
}

.notification-button:hover,
.notification-button.active {
  border-color: var(--green);
  color: var(--green);
}

.notification-button b {
  min-width: 1.05rem;
  height: 1.05rem;
  display: grid;
  place-items: center;
  position: absolute;
  top: -0.4rem;
  right: -0.45rem;
  border-radius: 999px;
  background: var(--red);
  color: white;
  border: 1px solid #11161d;
  font-size: 0.68rem;
  line-height: 1;
}

.notification-panel {
  width: min(370px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10151c;
  box-shadow: 0 18px 60px var(--shadow);
  overflow: hidden;
  z-index: 50;
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.notification-head strong {
  font-size: 0.9rem;
}

.notification-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
}

.notification-tools small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-tools.active small {
  color: var(--green);
}

.notification-tools.blocked small {
  color: var(--yellow);
}

.notification-list {
  overflow: auto;
  padding: 0.45rem;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  padding: 0.65rem;
  margin-bottom: 0.4rem;
  text-align: left;
}

.notification-item:hover {
  border-color: var(--green);
}

.notification-item.unread {
  border-color: rgba(24, 201, 100, 0.55);
  background: var(--green-soft);
}

.notification-item strong {
  font-size: 0.86rem;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.notification-item .notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
}

.chat-quick-button > span {
  font-size: 1rem;
  line-height: 1;
}

.chat-quick-panel {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(82vh, 720px);
}

.chat-quick-search {
  width: calc(100% - 1.5rem);
  min-height: 2.25rem;
  margin: 0.65rem 0.75rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #232a33;
  color: var(--text);
  padding: 0.45rem 0.75rem;
}

.chat-quick-search:focus {
  outline: none;
  border-color: rgba(47, 128, 237, 0.65);
}

.chat-quick-list {
  max-height: none;
  display: grid;
  gap: 0.45rem;
}

.chat-quick-results {
  max-height: 14rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.chat-quick-section {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.chat-quick-section > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.2rem;
  text-transform: uppercase;
}

.chat-quick-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0.55rem;
  text-align: left;
}

.chat-quick-item:hover,
.chat-quick-item.unread,
.chat-quick-item.active {
  border-color: var(--line-soft);
  background: #171d25;
}

.chat-quick-item.active {
  border-color: rgba(24, 201, 100, 0.55);
}

.chat-quick-item.unread strong {
  color: var(--green);
}

.chat-quick-avatar {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #202834;
  color: #dce8f8;
  font-weight: 800;
  font-size: 0.78rem;
}

.chat-quick-avatar.small {
  width: 2rem;
  height: 2rem;
}

.chat-quick-avatar.tiny {
  width: 1.55rem;
  height: 1.55rem;
  font-size: 0.62rem;
}

.chat-quick-avatar img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.chat-quick-item div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.chat-quick-item strong,
.chat-quick-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-quick-item strong {
  font-size: 0.88rem;
}

.chat-quick-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-floating-dock {
  position: fixed;
  right: 1rem;
  bottom: 0.85rem;
  z-index: 80;
  pointer-events: none;
}

.chat-floating-window {
  width: min(360px, calc(100vw - 1.5rem));
  min-height: 24rem;
  display: grid;
  grid-template-rows: auto minmax(14rem, 1fr) auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px 8px 0 0;
  background: #0b0f14;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.46);
  overflow: hidden;
  pointer-events: auto;
}

.chat-floating-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line-soft);
  background: #141a22;
}

.chat-floating-title {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.chat-floating-title strong,
.chat-floating-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-title small {
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-floating-icon {
  min-width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--green);
  padding: 0 0.3rem;
  font-size: 0.74rem;
  font-weight: 800;
}

.chat-floating-icon:hover {
  border-color: var(--line);
  background: #0b0f14;
}

.chat-floating-messages {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  max-height: 23rem;
  overflow: auto;
  padding: 0.65rem;
  background:
    linear-gradient(180deg, rgba(47, 128, 237, 0.04), transparent 8rem),
    #070a0e;
}

.chat-floating-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 0.35rem;
}

.chat-floating-message.own {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.chat-floating-message > div {
  max-width: min(86%, 18rem);
  display: grid;
  gap: 0.18rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px 14px 14px 4px;
  background: #151b23;
  padding: 0.48rem 0.6rem;
}

.chat-floating-message.own > div {
  border-color: rgba(24, 201, 100, 0.34);
  border-radius: 14px 14px 4px 14px;
  background: rgba(24, 201, 100, 0.16);
}

.chat-floating-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.32;
  font-size: 0.84rem;
}

.chat-floating-message small {
  color: var(--muted);
  font-size: 0.64rem;
}

.chat-floating-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
  padding: 0.55rem;
  border-top: 1px solid var(--line-soft);
  background: #10151c;
}

.chat-floating-composer textarea {
  min-height: 2.15rem;
  max-height: 5.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #232a33;
  color: var(--text);
  resize: vertical;
  padding: 0.5rem 0.8rem;
}

.chat-floating-composer button {
  min-height: 2.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #03130a;
  padding: 0 0.75rem;
  font-weight: 800;
}

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
  .chat-floating-dock {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .chat-floating-window {
    width: 100%;
    max-height: calc(100svh - 1.5rem);
  }

  .chat-floating-messages {
    max-height: min(52svh, 24rem);
  }
}

.ghost-button {
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  padding: 0.35rem 0.6rem;
}

.ghost-button:hover {
  border-color: var(--green);
}

.ghost-button.danger:hover {
  border-color: var(--red);
  color: #ffb4b4;
}

.terminal-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 0;
  min-height: calc(100vh - 3.6rem);
}

.market-rail,
.action-rail {
  min-width: 0;
  background: #0d1117;
  border-right: 1px solid var(--line);
  padding: 0.75rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.action-rail {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.workspace {
  min-width: 0;
  padding: 0.75rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.rail-panel,
.chart-panel,
.heatmap-panel,
.table-panel,
.focus-panel,
.add-panel,
.settings-panel,
.alerts-panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.add-panel {
  overflow: hidden;
}

.panel-title {
  min-height: 2.35rem;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.investor-filter {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}

.charge-tabs {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}

.charge-tabs button {
  flex: 0 0 auto;
  min-width: 8.5rem;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--muted);
  padding: 0 0.7rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.charge-tabs button small {
  min-width: 1.2rem;
  height: 1.2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.66rem;
  line-height: 1;
}

.charge-tabs button:hover,
.charge-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #061009;
}

.charge-tabs button.active small {
  background: rgba(6, 16, 9, 0.12);
}

.filter-chip {
  flex: 0 0 auto;
  max-width: 12rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0f14;
  color: var(--muted);
  padding: 0 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 800;
}

.filter-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip.has-alert {
  border-color: rgba(240, 68, 68, 0.58);
  color: #ffd1d1;
}

.filter-chip.has-alert.active {
  border-color: var(--green);
  color: #061009;
}

.filter-alert-badge {
  min-width: 1.18rem;
  height: 1.18rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, #ff6b6b, #d92d20);
  color: #fff;
  padding: 0 0.32rem;
  font-size: 0.66rem;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(240, 68, 68, 0.28);
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--green);
  color: #061009;
  background: var(--green);
}

.summary-reset {
  min-height: 1.75rem;
  font-size: 0.7rem;
}

.referral-panel-actions {
  flex-wrap: wrap;
}

#referralZoomLabel {
  min-width: 3.2rem;
  text-align: center;
}

.panel-title b {
  color: var(--green);
  font-size: 0.78rem;
}

.book-list,
.tape-list,
.alerts-list {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  max-height: 38vh;
  overflow: auto;
}

.book-row,
.tape-row,
.alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  background: #0b0f14;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.book-row {
  cursor: pointer;
}

.book-row:hover {
  border-color: rgba(24, 201, 100, 0.55);
}

.book-row strong,
.tape-row strong,
.alert-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}

.book-row small,
.tape-row small,
.alert-row small {
  color: var(--muted);
  font-size: 0.74rem;
}

.alert-row {
  grid-template-columns: 1fr;
  align-items: start;
}

.alert-row > div {
  min-width: 0;
}

.alert-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.alert-row strong,
.alert-row small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.alert-amount {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  color: var(--green);
  font-size: 0.9rem;
  line-height: 1.05;
  white-space: nowrap;
}

.alert-amount small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.alert-row .row-actions {
  justify-content: flex-start;
}

.alert-row .status-pill {
  min-width: auto;
}

#sectionCharges .alerts-list {
  max-height: min(68vh, 42rem);
}

.price-up {
  color: var(--green);
}

.yield-metric-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.price-down {
  color: var(--red);
}

.values-hidden .private-value {
  display: inline-block;
  min-width: 4.2rem;
  position: relative;
  overflow: hidden;
  color: transparent !important;
  text-shadow: none !important;
  user-select: none;
  vertical-align: baseline;
}

.values-hidden .private-value::after {
  content: attr(data-private-mask);
  position: absolute;
  inset: 0 auto auto 0;
  color: var(--muted);
  white-space: nowrap;
}

.values-hidden .price-up .private-value::after {
  color: var(--green);
}

.values-hidden .price-down .private-value::after {
  color: var(--red);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-card {
  --metric-accent: var(--green);
  position: relative;
  min-height: 7rem;
  padding: 0.85rem;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(24 201 100 / 0.12), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  border-color: rgba(148, 163, 184, 0.2);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--metric-accent), transparent);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid color-mix(in srgb, var(--metric-accent) 42%, transparent);
  border-radius: 8px;
  transform: rotate(12deg);
  opacity: 0.2;
  pointer-events: none;
}

.metric-balance {
  --metric-accent: #18c964;
}

.metric-yield {
  --metric-accent: #2f80ed;
}

.metric-commission {
  --metric-accent: #f5c542;
}

.metric-alert {
  --metric-accent: #f04444;
}

.metric-card span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.58rem;
  line-height: 1.1;
  color: var(--text);
}

.metric-card small {
  position: relative;
  z-index: 1;
  color: var(--green);
}

.metric-card.alert small {
  color: var(--yellow);
}

.dashboard-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
  gap: 0.45rem;
  position: sticky;
  top: 4.35rem;
  z-index: 7;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.dashboard-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  position: relative;
  min-height: 2.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

.dashboard-nav .home-nav-button {
  min-width: 0;
  padding: 0;
}

.home-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-alert-badge {
  position: absolute;
  top: -0.34rem;
  right: -0.28rem;
  min-width: 1.08rem;
  height: 1.08rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #0b0f14;
  background: linear-gradient(180deg, #ff6b6b, #d92d20);
  color: #fff;
  padding: 0 0.26rem;
  font-size: 0.62rem;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(240, 68, 68, 0.32);
}

.dashboard-nav button.active .nav-alert-badge {
  border-color: var(--green);
}

.dashboard-nav button:hover,
.dashboard-nav button.active {
  border-color: var(--green);
  color: #061009;
  background: var(--green);
}

.dashboard-nav button.chat-attention {
  border-color: var(--yellow);
  color: #fff4c4;
  background: rgba(245, 197, 66, 0.14);
  box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.5);
  animation: chatAttentionPulse 1.15s ease-out infinite;
}

@keyframes chatAttentionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.5);
  }

  70% {
    box-shadow: 0 0 0 0.55rem rgba(245, 197, 66, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 197, 66, 0);
  }
}

.dashboard-section {
  display: grid;
  gap: 0.75rem;
}

.home-section {
  gap: 0.85rem;
}

.home-command-strip {
  min-width: 0;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(48, 57, 71, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 201, 100, 0.16), rgba(47, 128, 237, 0.08) 52%, rgba(245, 197, 66, 0.08)),
    #10151c;
}

.home-command-strip div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.home-command-strip span {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-command-strip strong {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.05;
}

.home-command-strip small {
  min-width: 0;
  color: #b6c2d2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.home-command-strip b {
  flex: 0 0 auto;
  border: 1px solid rgba(24, 201, 100, 0.42);
  border-radius: 999px;
  background: rgba(24, 201, 100, 0.12);
  color: #baf7d2;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1;
}

.home-metrics .metric-card {
  min-height: 7.75rem;
}

.home-focus {
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.08), transparent 58%),
    var(--panel);
}

.home-focus .info-grid {
  gap: 0.7rem;
}

.home-focus .info-card {
  min-height: 4.8rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    #0b0f14;
}

.home-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(19rem, 0.8fr);
  gap: 0.85rem;
  align-items: stretch;
}

.home-analytics-grid .chart-panel,
.home-analytics-grid .heatmap-panel {
  min-height: 24rem;
  overflow: hidden;
}

.home-analytics-grid .portfolio-heatmap {
  grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr));
  grid-auto-rows: minmax(5.4rem, auto);
  max-height: 21.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.7rem;
}

.info-card,
.bucket-card {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
  padding: 0.6rem;
}

.info-card span,
.bucket-card span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.info-card strong,
.bucket-card strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.info-card small,
.bucket-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.info-card.action-card .icon-action {
  width: fit-content;
  margin-top: 0.2rem;
  border-color: rgba(24, 201, 100, 0.55);
  color: #baf7d2;
}

.info-card.action-card .row-actions {
  justify-content: flex-start;
}

.bucket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.7rem 0.7rem 0;
}

.bucket-card.hot {
  border-color: rgba(240, 68, 68, 0.45);
  background: var(--red-soft);
}

.bucket-card.watch {
  border-color: rgba(245, 197, 66, 0.45);
  background: rgba(245, 197, 66, 0.1);
}

.info-card.watch {
  border-color: rgba(245, 197, 66, 0.45);
  background: rgba(245, 197, 66, 0.08);
}

.daily-priority-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.7rem 0.7rem 0;
}

.daily-priority-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem;
}

.daily-priority-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.daily-priority-block {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(11, 15, 20, 0.58);
  overflow: hidden;
}

.daily-priority-title {
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-priority-title b {
  color: var(--text);
}

.daily-priority-list {
  max-height: 18rem;
  padding: 0.55rem;
}

.daily-priority-row strong {
  white-space: normal;
}

.daily-priority-row .row-actions {
  align-self: start;
}

.daily-priority-list.card-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-list {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  max-height: 22rem;
  overflow: auto;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
  padding: 0.55rem;
}

.compact-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}

.compact-row small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.compact-row.hot {
  border-color: rgba(240, 68, 68, 0.45);
}

.compact-row.watch {
  border-color: rgba(245, 197, 66, 0.45);
}

.testimonial-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.78fr) minmax(0, 1.22fr);
  gap: 0.75rem;
  padding: 0.7rem;
}

.transfer-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
  gap: 0.75rem;
  padding: 0.7rem;
}

.transfer-block {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
}

.transfer-block .form-section-title {
  padding: 0.65rem 0.7rem 0;
}

.transfer-list {
  max-height: 34rem;
  padding-top: 0.45rem;
}

.transfer-row {
  align-items: start;
}

.transfer-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.transfer-content strong {
  white-space: normal;
}

.transfer-actions {
  align-content: start;
  max-width: 12rem;
}

.testimonial-form {
  align-self: start;
  padding: 0.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
}

.testimonial-form .form-feedback {
  grid-column: 1 / -1;
}

.testimonial-list {
  max-height: 34rem;
  padding: 0;
}

.testimonial-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.testimonial-content {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.testimonial-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.testimonial-headline strong {
  white-space: normal;
}

.testimonial-row p {
  margin: 0;
  color: #d9e2ec;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.testimonial-carousel {
  position: relative;
  width: min(100%, 26rem);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #080b0f;
  overflow: hidden;
}

.testimonial-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.testimonial-carousel-track::-webkit-scrollbar {
  display: none;
}

.testimonial-carousel-slide {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  min-width: 100%;
  scroll-snap-align: center;
  background: #05080c;
}

.testimonial-media {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #05080c;
}

.testimonial-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.25rem;
  min-height: 2.25rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(8, 11, 15, 0.72);
  color: #f8fafc;
  font-size: 1.85rem;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.testimonial-carousel-button.previous {
  left: 0.55rem;
}

.testimonial-carousel-button.next {
  right: 0.55rem;
}

.testimonial-carousel-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.testimonial-carousel-footer {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.6rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  pointer-events: none;
}

.testimonial-carousel-footer span {
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  background: rgba(8, 11, 15, 0.72);
  color: #f8fafc;
  font-size: 0.68rem;
}

.testimonial-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  min-width: 0;
}

.testimonial-carousel-dots span {
  width: 0.36rem;
  height: 0.36rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.45);
}

.testimonial-carousel-dots span.active {
  width: 1rem;
  background: var(--green);
}

.testimonial-actions {
  align-content: start;
  max-width: 13rem;
}

.automation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.9fr);
  align-items: start;
  gap: 0.75rem;
}

.automation-summary-panel {
  grid-column: 1 / -1;
}

.automation-summary-cards {
  padding-bottom: 0.45rem;
}

.automation-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0.7rem 0.7rem;
}

.automation-highlights span,
.automation-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  padding: 0.18rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.automation-list {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  max-height: 34rem;
  overflow: auto;
  padding: 0.7rem;
}

.automation-alert-panel .automation-list {
  max-height: 30rem;
}

.automation-row {
  align-items: start;
}

.automation-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.automation-row-head,
.automation-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.automation-row-head {
  justify-content: space-between;
}

.automation-row-head strong {
  min-width: 8rem;
}

.automation-meta {
  margin-top: 0.35rem;
}

.automation-meta span {
  color: var(--muted);
  font-size: 0.7rem;
}

.automation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.automation-tags span {
  min-height: 1.35rem;
  border-color: rgba(24, 201, 100, 0.24);
  background: rgba(24, 201, 100, 0.08);
  color: #baf7d2;
}

.automation-score-actions,
.automation-opportunity-actions {
  min-width: 8.8rem;
}

.automation-score {
  min-width: 2.35rem;
  min-height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(24, 201, 100, 0.45);
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.automation-opportunity-form {
  display: grid;
  grid-template-columns: minmax(10rem, 1.1fr) minmax(8rem, 0.8fr) minmax(8rem, 0.75fr) minmax(8rem, 0.75fr);
  gap: 0.5rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.automation-opportunity-form select,
.automation-opportunity-form input,
.automation-opportunity-form textarea {
  min-width: 0;
}

.automation-opportunity-form textarea {
  grid-column: 1 / 4;
  min-height: 2.45rem;
}

.automation-opportunity-form button {
  min-height: 2.45rem;
}

.automation-status-select {
  width: 9.3rem;
  min-height: 2rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.74rem;
}

#commissionPayableList {
  max-height: min(72vh, 48rem);
  gap: 0.65rem;
}

.commission-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.commission-overview-item {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 197, 66, 0.1), transparent 54%),
    #0b0f14;
}

.commission-overview-item small,
.commission-overview-item em,
.commission-metric small,
.commission-balance small,
.commission-detail-amount small {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.commission-overview-item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.02rem;
}

.commission-overview-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.commission-row {
  align-items: start;
  gap: 0.85rem;
  padding: 0.75rem;
}

.commission-row strong {
  white-space: normal;
}

.commission-row-content {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.commission-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.commission-investor {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.commission-avatar {
  flex: 0 0 auto;
  width: 2.05rem;
  height: 2.05rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(245, 197, 66, 0.32);
  border-radius: 8px;
  background: rgba(245, 197, 66, 0.12);
  color: #f7d976;
  font-size: 0.72rem;
  font-weight: 900;
}

.commission-balance {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  white-space: nowrap;
}

.commission-balance b {
  font-size: 1.02rem;
}

.commission-progress {
  height: 0.42rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(240, 68, 68, 0.22);
}

.commission-progress span {
  display: block;
  width: var(--commission-paid, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18c964, #f5c542);
}

.commission-row-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.commission-metric {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.commission-metric b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.commission-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}

.commission-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.commission-detail-stats span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  background: rgba(15, 23, 32, 0.58);
}

.commission-detail-stats small {
  margin: 0;
  color: var(--muted);
}

.commission-detail-stats b {
  font-size: 0.86rem;
}

.commission-history {
  display: grid;
  gap: 0.25rem;
  max-height: min(52vh, 30rem);
  overflow: auto;
}

.commission-detail-row {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr) minmax(13rem, auto);
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.commission-detail-row:first-child {
  border-top: 0;
}

.commission-detail-row strong {
  white-space: normal;
  font-size: 0.84rem;
  line-height: 1.25;
}

.commission-detail-row small {
  margin-top: 0.16rem;
}

.commission-detail-main {
  min-width: 0;
}

.commission-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.28rem;
}

.commission-detail-meta span {
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.05);
  padding: 0 0.42rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.commission-detail-kind {
  width: fit-content;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.commission-detail-row.paid .commission-detail-kind {
  border-color: rgba(24, 201, 100, 0.45);
  color: var(--green);
  background: var(--green-soft);
}

.commission-detail-row b {
  white-space: nowrap;
}

.commission-detail-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.commission-detail-amount {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  min-width: 5.8rem;
}

.commission-detail-actions {
  justify-content: flex-end;
}

.projection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 0.75rem;
  align-items: start;
}

#sectionProjection .info-grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.projection-block {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.projection-block-title {
  min-height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 32, 0.58);
  padding: 0.5rem 0.65rem;
}

.projection-block-title span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.projection-block-title b {
  color: var(--text);
  white-space: nowrap;
}

.projection-row-list {
  display: grid;
  gap: 0.4rem;
}

.projection-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.08), transparent 58%),
    #0b0f14;
  padding: 0.62rem;
}

.commission-projection-row {
  background:
    linear-gradient(135deg, rgba(245, 197, 66, 0.1), transparent 58%),
    #0b0f14;
}

.projection-rank {
  width: 2.05rem;
  height: 2.05rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(47, 128, 237, 0.32);
  border-radius: 8px;
  color: #b9d6ff;
  background: rgba(47, 128, 237, 0.1);
  font-size: 0.7rem;
  font-weight: 900;
}

.commission-projection-row .projection-rank {
  border-color: rgba(245, 197, 66, 0.32);
  color: #f7d976;
  background: rgba(245, 197, 66, 0.12);
}

.projection-row-main {
  min-width: 0;
  display: grid;
  gap: 0.28rem;
}

.projection-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: baseline;
}

.projection-row-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.projection-row-head b {
  font-size: 0.96rem;
  white-space: nowrap;
}

.projection-row-bar {
  height: 0.38rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.14);
}

.projection-row-bar span {
  display: block;
  width: var(--projection-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ed, #18c964);
}

.projection-row-bar.commission {
  background: rgba(245, 197, 66, 0.14);
}

.projection-row-bar.commission span {
  background: linear-gradient(90deg, #f5c542, #f04444);
}

.projection-row small {
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.activity-log-scroll {
  max-height: 28rem;
}

#activityLogTable {
  min-width: 880px;
}

.online-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.online-overview span {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 201, 100, 0.1), transparent 58%),
    #0b0f14;
  padding: 0.62rem;
}

.online-overview small,
.online-card-metrics small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.online-overview b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-overview em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.online-card-list {
  display: grid;
  gap: 0.5rem;
}

.activity-row small + small {
  color: var(--text);
}

.activity-row {
  align-items: start;
}

.activity-row > div {
  min-width: 0;
}

.activity-row strong,
.activity-row small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.online-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 0.75rem;
}

.online-card-main {
  min-width: 0;
  display: grid;
  gap: 0.58rem;
}

.online-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.online-avatar {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(24, 201, 100, 0.34);
  border-radius: 8px;
  background: rgba(24, 201, 100, 0.12);
  color: #baf7d2;
  font-size: 0.78rem;
  font-weight: 900;
}

.online-avatar.away {
  border-color: rgba(245, 197, 66, 0.42);
  background: rgba(245, 197, 66, 0.12);
  color: #ffe08a;
}

.online-card-head > div {
  min-width: 0;
}

.online-card-head strong {
  font-size: 0.9rem;
}

.online-card-head small,
.online-card-foot span {
  color: var(--muted);
  font-size: 0.74rem;
}

.online-card-metrics {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.55fr) minmax(5.5rem, 0.55fr) minmax(0, 1.4fr);
  gap: 0.4rem;
}

.online-card-metrics span {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  background: rgba(15, 23, 32, 0.58);
  padding: 0.45rem 0.5rem;
}

.online-card-metrics b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.online-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.online-card-foot span {
  min-height: 1.45rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  padding: 0 0.46rem;
  overflow-wrap: anywhere;
}

.online-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.online-session-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}

.online-detail-group {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 32, 0.42);
  padding: 0.65rem;
}

.online-detail-group h4 {
  margin: 0;
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.online-detail-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.45rem 0.8rem;
}

.online-detail-group span {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.online-detail-group small {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.online-detail-group b {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.online-detail-group a {
  color: var(--green);
  text-decoration: none;
}

.activity-action-chip,
.activity-route-chip {
  display: inline-flex;
  max-width: 18rem;
  min-height: 1.5rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  padding: 0 0.48rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 800;
}

.activity-action-chip {
  border-color: rgba(47, 128, 237, 0.25);
  color: #cfe3ff;
}

.activity-route-chip {
  max-width: 14rem;
  color: var(--muted);
}

.status-pill.online {
  border-color: rgba(24, 201, 100, 0.45);
  color: #baf7d2;
  background: var(--green-soft);
}

.status-pill.away {
  border-color: rgba(245, 197, 66, 0.45);
  color: #ffe08a;
  background: rgba(245, 197, 66, 0.1);
}

.approval-list {
  max-height: 32rem;
}

.status-pill.pending {
  border-color: rgba(245, 197, 66, 0.45);
  color: #ffe08a;
  background: rgba(245, 197, 66, 0.1);
}

.status-pill.approved {
  border-color: rgba(24, 201, 100, 0.45);
  color: #baf7d2;
  background: var(--green-soft);
}

.status-pill.rejected {
  border-color: rgba(240, 68, 68, 0.45);
  color: #ffb4b4;
  background: var(--red-soft);
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

.chat-sidebar {
  min-height: 34rem;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

.chat-presence-actions {
  gap: 0.45rem;
}

.chat-presence-actions select {
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  padding: 0 0.45rem;
  font-size: 0.74rem;
}

.chat-form,
.team-form {
  display: grid;
  gap: 0.7rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.chat-channel-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.chat-channel-tabs[hidden] {
  display: none;
}

.chat-channel-tabs button {
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080c11;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: normal;
}

.chat-channel-tabs button:hover,
.chat-channel-tabs button.active {
  border-color: rgba(24, 201, 100, 0.48);
  background: rgba(24, 201, 100, 0.1);
  color: var(--green);
}

.chat-thread-list {
  min-height: 0;
  max-height: none;
  align-content: start;
}

.chat-thread {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.chat-thread strong,
.chat-thread small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread.active {
  border-color: rgba(24, 201, 100, 0.55);
  background: rgba(24, 201, 100, 0.08);
}

.chat-thread.whatsapp {
  border-color: rgba(34, 197, 94, 0.32);
}

.chat-thread-last-message.failed {
  color: #fca5a5;
  font-weight: 700;
}

.chat-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 2.75rem;
  min-height: 1.15rem;
  margin-right: 0.35rem;
  padding: 0 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.chat-channel.whatsapp {
  border-color: rgba(34, 197, 94, 0.48);
  color: #4ade80;
  background: rgba(34, 197, 94, 0.08);
}

.chat-channel.site {
  border-color: rgba(59, 130, 246, 0.34);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.07);
}

.presence-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
  vertical-align: middle;
}

.presence-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(24, 201, 100, 0.14);
}

.presence-dot.away {
  background: var(--yellow);
  box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.14);
}

.presence-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

#chatThreadMeta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-main {
  min-height: 34rem;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

body.desktop-layout #sectionChat {
  min-height: 0;
}

body.desktop-layout #sectionChat .chat-layout {
  height: var(--chat-panel-height, min(34rem, calc(100svh - 27rem)));
  min-height: 0;
}

body.desktop-layout #sectionChat .chat-sidebar,
body.desktop-layout #sectionChat .chat-main {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.desktop-layout #sectionChat .chat-thread-list,
body.desktop-layout #sectionChat .chat-messages {
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.whatsapp-broadcast-form {
  grid-row: 2 / -1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  min-height: 0;
  overflow: hidden;
  padding: 0.95rem;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.06), transparent 11rem),
    #080c11;
}

.whatsapp-broadcast-form[hidden] {
  display: none;
}

.broadcast-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.broadcast-heading b {
  min-width: 3rem;
  text-align: right;
  color: var(--green);
}

.broadcast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.75rem;
  min-height: 0;
  overflow: auto;
  padding-right: 0.35rem;
}

.broadcast-message-field,
.broadcast-media-field,
.broadcast-media-preview,
.whatsapp-recipient-list {
  grid-column: 1 / -1;
}

.broadcast-message-field textarea {
  min-height: 9rem;
}

.broadcast-media-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
}

.broadcast-media-preview[hidden] {
  display: none;
}

.broadcast-media-preview span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.broadcast-media-preview strong,
.broadcast-media-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-media-preview small {
  color: var(--muted);
}

.whatsapp-recipient-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  align-content: start;
  gap: 0.45rem;
  min-width: 0;
  max-height: 16rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.whatsapp-recipient {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(8, 12, 17, 0.82);
  overflow: hidden;
}

.whatsapp-recipient input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  justify-self: center;
}

.whatsapp-recipient span {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 0.12rem;
}

.whatsapp-recipient strong,
.whatsapp-recipient small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-recipient small {
  color: var(--muted);
}

.broadcast-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.8rem;
}

.broadcast-footer button {
  min-width: 11rem;
}

.form-feedback {
  display: grid;
  gap: 0.22rem;
  padding: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
}

.form-feedback[hidden] {
  display: none;
}

.form-feedback small {
  color: var(--muted);
}

.broadcast-failures {
  display: grid;
  gap: 0.18rem;
}

.chat-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.5rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.chat-controls select,
.chat-controls button {
  min-height: 2.15rem;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 18rem;
  max-height: 32rem;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(47, 128, 237, 0.04), transparent 9rem),
    #080c11;
  padding: 0.9rem;
}

.chat-bubble {
  max-width: min(78%, 48rem);
  display: grid;
  gap: 0.25rem;
  padding: 0.62rem 0.76rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px 14px 14px 4px;
  background: #0b0f14;
}

.chat-bubble.own {
  justify-self: end;
  border-color: rgba(24, 201, 100, 0.35);
  border-radius: 14px 14px 4px 14px;
  background: rgba(24, 201, 100, 0.08);
}

.chat-bubble.internal {
  border-color: rgba(245, 197, 66, 0.45);
  background: rgba(245, 197, 66, 0.08);
}

.chat-bubble.whatsapp {
  border-color: rgba(34, 197, 94, 0.3);
}

.chat-bubble.whatsapp.inbound {
  background: rgba(34, 197, 94, 0.07);
}

.chat-bubble strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.chat-bubble small {
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-unread-marker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  color: #facc15;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chat-unread-marker::before,
.chat-unread-marker::after {
  content: "";
  height: 1px;
  background: rgba(250, 204, 21, 0.28);
}

.chat-attachments {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.chat-attachment-link {
  width: min(100%, 22rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(47, 128, 237, 0.08);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  text-align: left;
}

.chat-attachment-link:hover {
  border-color: var(--blue);
}

.chat-attachment-link span {
  color: #b7d3ff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-attachment-link strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.chat-attachment-link small {
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-attachment-link.compact {
  width: 100%;
}

.chat-attachment-media {
  width: min(100%, 24rem);
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(47, 128, 237, 0.08);
  color: var(--text);
  padding: 0.45rem;
}

.chat-attachment-media.image {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
}

.chat-attachment-media.image img {
  width: 100%;
  max-height: 18rem;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.15);
}

.chat-attachment-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
}

.chat-attachment-meta span {
  color: #b7d3ff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-attachment-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.chat-attachment-meta small {
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-attachment-download {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(11, 15, 20, 0.72);
  color: var(--text);
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.chat-attachment-download:hover {
  border-color: var(--blue);
}

.chat-attachment-media.audio audio {
  width: 100%;
  min-width: 0;
}

.chat-attachment-media.video video {
  width: 100%;
  max-height: 20rem;
  display: block;
  border-radius: 8px;
  background: #05080d;
}

.chat-message-error {
  color: #fca5a5 !important;
}

.chat-composer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
  padding: 0.7rem;
  border-top: 1px solid var(--line-soft);
}

.chat-composer textarea {
  grid-column: 1 / -1;
  min-height: 3rem;
  max-height: 8rem;
  border-radius: 8px;
  resize: vertical;
}

.chat-composer .check-row {
  grid-column: 1 / -1;
}

.chat-composer > button[type="submit"] {
  grid-column: 4;
  justify-self: end;
  min-height: 2.3rem;
}

.chat-composer .icon-action {
  min-width: 2.3rem;
  min-height: 2.3rem;
}

#chatAudioButton.recording {
  border-color: var(--red);
  color: #ffb4b4;
  box-shadow: 0 0 0 3px rgba(240, 68, 68, 0.12);
}

.chat-attachment-preview {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 2.15rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.72);
  padding: 0.45rem;
}

.chat-attachment-chip {
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #111821;
  color: var(--text);
  padding: 0.28rem 0.35rem 0.28rem 0.55rem;
  font-size: 0.76rem;
}

.chat-attachment-chip b {
  flex: 0 0 auto;
  color: #b7d3ff;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.chat-attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-chip small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-attachment-chip button {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0f14;
  color: var(--muted);
  padding: 0;
}

.chat-attachment-chip button:hover {
  border-color: var(--red);
  color: #ffb4b4;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.team-grid .compact-list {
  max-height: 32rem;
}

.panel-tools {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.mini-input {
  width: 5.6rem;
  min-height: 1.9rem;
  padding: 0.25rem 0.45rem;
}

.goal-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.7rem;
  border-top: 1px solid var(--line-soft);
}

.goal-form button[type="submit"] {
  align-self: end;
}

.goal-progress {
  width: 100%;
  height: 0.38rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.goal-progress i {
  display: block;
  width: var(--goal-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #f5c542);
}

.goal-row.reached {
  border-color: rgba(24, 201, 100, 0.38);
}

.goals-panel .compact-list {
  max-height: 34rem;
}

.statement-body {
  padding: 0.7rem;
}

.statement-empty {
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

.statement-bank-body {
  display: grid;
  gap: 0.7rem;
  padding: 0;
}

.statement-investor-filter {
  margin: -0.7rem -0.7rem 0;
}

.statement-bank-filters {
  display: grid;
  grid-template-columns: minmax(16rem, 1.3fr) repeat(4, minmax(8.5rem, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.statement-periods {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.05rem;
}

.statement-bank-filters input,
.statement-bank-filters select {
  min-height: 2.25rem;
}

.statement-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.statement-bank-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.statement-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  margin: -0.25rem 0 0.7rem;
}

.timeline-list {
  display: grid;
  gap: 0.35rem;
}

.statement-ledger {
  max-height: 32rem;
  overflow: auto;
}

.statement-ledger-row {
  align-items: start;
}

.statement-ledger-row strong {
  white-space: normal;
}

.statement-ledger-value {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.statement-ledger-value b {
  white-space: nowrap;
}

.chart-panel {
  min-height: 18rem;
}

.chart-panel-actions {
  flex-wrap: wrap;
}

.chart-mode-controls {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(4.4rem, auto));
  gap: 0.25rem;
  padding: 0.18rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
}

.chart-mode-controls button {
  min-height: 1.75rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-mode-controls button.active {
  background: var(--green);
  color: #061009;
}

#equityChart {
  display: block;
  width: 100%;
  height: 280px;
}

.chart-legend {
  display: flex;
  gap: 0.45rem;
  padding: 0 0.7rem 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-legend-item {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: auto minmax(4rem, auto);
  grid-template-areas:
    "avatar name"
    "avatar value";
  column-gap: 0.45rem;
  align-items: center;
  min-height: 2.45rem;
  border: 1px solid rgb(var(--investor-rgb) / 0.32);
  border-radius: 6px;
  background: rgb(var(--investor-rgb) / 0.11);
  color: var(--text);
  padding: 0.32rem 0.5rem;
  text-align: left;
}

.chart-avatar {
  grid-area: avatar;
  width: 1.65rem;
  height: 1.65rem;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--investor-color);
  border-radius: 50%;
  background: rgb(var(--investor-rgb) / 0.18);
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 900;
}

.chart-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chart-legend-item span:not(.chart-avatar) {
  grid-area: name;
  overflow: hidden;
  max-width: 9.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 900;
}

.chart-legend-item b {
  grid-area: value;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.chart-controls {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto minmax(9rem, auto);
  gap: 0.5rem;
  align-items: center;
  padding: 0 0.7rem 0.7rem;
}

.chart-controls input[type="range"] {
  width: 100%;
  min-height: 2rem;
  padding: 0;
  accent-color: var(--green);
}

.chart-controls span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.portfolio-heatmap {
  min-height: 10rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 5rem;
  gap: 0.5rem;
  padding: 0.7rem;
}

.heat-cell {
  appearance: none;
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(var(--investor-rgb) / 0.26);
  border-radius: 6px;
  background: rgb(var(--investor-rgb) / 0.14);
  color: var(--text);
  padding: 0.55rem;
  display: grid;
  align-content: space-between;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.heat-cell::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: var(--heat, 45%);
  background: rgb(var(--investor-rgb) / 0.28);
}

.heat-cell strong,
.heat-cell small {
  position: relative;
  z-index: 1;
}

.heat-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-cell small {
  color: var(--text);
}

.permission-label {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(47, 128, 237, 0.35);
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.1);
  color: #b8d5ff;
  padding: 0.1rem 0.38rem;
  font-size: 0.62rem;
  font-weight: 800;
}

.heat-cell:hover,
.heat-cell:focus-visible,
.heat-cell.active {
  border-color: var(--investor-color);
}

.heat-cell.active {
  box-shadow: inset 0 0 0 1px rgb(var(--investor-rgb) / 0.42);
}

.referral-tree {
  padding: 0.7rem;
}

.referral-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.referral-overview > div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #0b0f14;
  padding: 0.65rem;
}

.referral-overview span,
.referral-overview small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.referral-overview strong {
  display: block;
  margin: 0.14rem 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-tree-scroll {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-height: min(68vh, 46rem);
  padding: 1rem 0.75rem 1.35rem;
  cursor: grab;
  overscroll-behavior: contain;
  user-select: none;
}

.referral-tree-scroll.dragging {
  cursor: grabbing;
}

.referral-tree-canvas {
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
  zoom: var(--referral-zoom, 1);
}

.referral-tree-scroll button,
.referral-tree-scroll input,
.referral-tree-scroll select,
.referral-tree-scroll textarea {
  user-select: auto;
}

#sectionReferrals .table-panel:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  padding: 0.75rem;
}

#sectionReferrals .table-panel:fullscreen .referral-overview {
  display: none;
}

#sectionReferrals .table-panel:fullscreen .referral-tree {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

#sectionReferrals .table-panel:fullscreen .referral-tree-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.referral-branch {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;
  margin: 0;
  padding: 1.05rem 0 0;
  list-style: none;
}

.referral-branch.root {
  gap: 1.2rem;
  padding-top: 0;
}

.referral-branch .referral-branch {
  margin-top: 0.85rem;
}

.referral-branch .referral-branch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 1.05rem;
  border-left: 1px solid rgba(24, 201, 100, 0.28);
}

.referral-branch li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1.05rem 0.45rem 0;
}

.referral-branch.root > li {
  padding-top: 0;
}

.referral-branch li::before,
.referral-branch li::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 1.05rem;
  border-top: 1px solid rgba(24, 201, 100, 0.28);
}

.referral-branch li::before {
  right: 50%;
}

.referral-branch li::after {
  left: 50%;
  border-left: 1px solid rgba(24, 201, 100, 0.28);
}

.referral-branch.root > li::before,
.referral-branch.root > li::after,
.referral-branch li:only-child::before,
.referral-branch li:only-child::after {
  display: none;
}

.referral-branch li:first-child::before,
.referral-branch li:last-child::after {
  border: 0 none;
}

.referral-branch li:first-child::after {
  border-radius: 6px 0 0;
}

.referral-branch li:last-child::before {
  border-right: 1px solid rgba(24, 201, 100, 0.28);
  border-radius: 0 6px 0 0;
}

.referral-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: clamp(11.4rem, 15vw, 14.1rem);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(24, 201, 100, 0.08), transparent 8rem), #0b0f14;
  padding: 0.62rem;
  text-align: center;
}

.referral-node.has-commission {
  border-color: rgba(24, 201, 100, 0.36);
}

.referral-node.owner-root {
  border-color: rgba(47, 128, 237, 0.52);
  background: linear-gradient(90deg, rgba(47, 128, 237, 0.12), transparent 8rem), #0b0f14;
}

.referral-node.missing-commission {
  border-color: rgba(245, 197, 66, 0.38);
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.08), transparent 8rem), #0b0f14;
}

.referral-node.leaf {
  background: #0b0f14;
}

.referral-node-head {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.referral-avatar {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(24, 201, 100, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.16), transparent 28%),
    rgba(24, 201, 100, 0.12);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
}

.referral-node.missing-commission .referral-avatar {
  border-color: rgba(245, 197, 66, 0.48);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.16), transparent 28%),
    rgba(245, 197, 66, 0.12);
  color: var(--yellow);
}

.referral-node.owner-root .referral-avatar {
  border-color: rgba(47, 128, 237, 0.58);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.16), transparent 28%),
    rgba(47, 128, 237, 0.14);
  color: #b8d5ff;
}

.referral-node.leaf .referral-avatar {
  border-color: var(--line);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.13), transparent 28%),
    rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.referral-node-main,
.referral-node small {
  display: block;
  min-width: 0;
}

.referral-node-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  align-items: center;
}

.referral-node-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-node-title span {
  border: 1px solid rgba(47, 128, 237, 0.35);
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.1);
  color: #b8d5ff;
  padding: 0.1rem 0.32rem;
  font-size: 0.62rem;
  font-weight: 800;
}

.referral-node small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.64rem;
}

.referral-node-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.32rem;
  margin-top: 0;
}

.referral-node-tags span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
  padding: 0.12rem 0.34rem;
  font-size: 0.6rem;
  font-weight: 800;
}

.referral-node-tags .ok {
  border-color: rgba(24, 201, 100, 0.42);
  background: rgba(24, 201, 100, 0.1);
  color: var(--green);
}

.referral-node-tags .warn {
  border-color: rgba(245, 197, 66, 0.45);
  background: rgba(245, 197, 66, 0.1);
  color: var(--yellow);
}

.referral-node-tags .muted {
  border-color: rgba(245, 197, 66, 0.32);
  background: rgba(245, 197, 66, 0.07);
  color: #f6d977;
}

.referral-node-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem;
  min-width: 0;
}

.referral-node-metrics.collapsed {
  display: none;
}

.referral-details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 1.9rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(16, 21, 28, 0.72);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.referral-details-toggle:hover {
  border-color: rgba(24, 201, 100, 0.42);
  color: var(--green);
}

.referral-details-toggle span,
.referral-branch-toggle span {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.referral-details-toggle.expanded span {
  transform: rotate(225deg);
}

.referral-node-metrics span {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(16, 21, 28, 0.72);
  padding: 0.3rem 0.32rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  min-width: 0;
}

.referral-node-metrics small,
.referral-node-metrics b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-node-metrics small {
  margin: 0 0 0.1rem;
  color: var(--muted);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.referral-node-metrics b {
  color: var(--text);
  font-size: 0.68rem;
}

.referral-node-metrics .price-up b {
  color: var(--green);
}

.referral-node-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}

.referral-node-actions:empty {
  display: none;
}

.referral-branch-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-height: 2rem;
  padding: 0;
  color: var(--green);
}

.referral-branch-toggle.collapsed span {
  transform: rotate(-45deg);
}

.referral-branch-toggle.expanded span {
  transform: rotate(45deg);
}

.referral-node.collapsed {
  border-style: dashed;
}

.table-scroll {
  overflow: auto;
  max-height: 40vh;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1240px;
}

th,
td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 0.82rem;
}

th {
  color: var(--muted);
  background: #0f141b;
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
}

td.numeric,
th.numeric {
  text-align: right;
}

#sectionApplications,
#sectionApplications .table-panel,
#sectionApplications .table-scroll,
#sectionYields,
#sectionYields .table-panel,
#sectionYields .table-scroll,
#sectionWithdrawals,
#sectionWithdrawals .table-panel,
#sectionWithdrawals .table-scroll,
#sectionFrozen,
#sectionFrozen .table-panel,
#sectionFrozen .table-scroll,
#sectionClosed,
#sectionClosed .table-panel,
#sectionClosed .table-scroll {
  min-width: 0;
  max-width: 100%;
}

#sectionApplications .table-scroll,
#sectionYields .table-scroll,
#sectionWithdrawals .table-scroll,
#sectionFrozen .table-scroll,
#sectionClosed .table-scroll {
  max-height: 52vh;
}

#sectionApplications table {
  min-width: 920px;
  table-layout: fixed;
}

#sectionYields table {
  min-width: 1420px;
  table-layout: fixed;
}

#sectionWithdrawals table,
#sectionFrozen table,
#sectionClosed table {
  min-width: 980px;
  table-layout: fixed;
}

#sectionApplications th,
#sectionApplications td,
#sectionYields th,
#sectionYields td,
#sectionWithdrawals th,
#sectionWithdrawals td,
#sectionFrozen th,
#sectionFrozen td,
#sectionClosed th,
#sectionClosed td {
  padding: 0.56rem 0.35rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
}

#sectionWithdrawals th:nth-child(1),
#sectionWithdrawals td:nth-child(1) {
  width: 92px;
}

#sectionWithdrawals th:nth-child(2),
#sectionWithdrawals td:nth-child(2),
#sectionFrozen th:nth-child(3),
#sectionFrozen td:nth-child(3),
#sectionFrozen th:nth-child(4),
#sectionFrozen td:nth-child(4),
#sectionClosed th:nth-child(3),
#sectionClosed td:nth-child(3),
#sectionClosed th:nth-child(4),
#sectionClosed td:nth-child(4),
#sectionClosed th:nth-child(5),
#sectionClosed td:nth-child(5) {
  width: 82px;
}

#sectionWithdrawals th:nth-child(3),
#sectionWithdrawals td:nth-child(3),
#sectionFrozen th:nth-child(2),
#sectionFrozen td:nth-child(2),
#sectionClosed th:nth-child(2),
#sectionClosed td:nth-child(2) {
  width: 116px;
}

#sectionWithdrawals th:nth-child(4),
#sectionWithdrawals td:nth-child(4),
#sectionFrozen th:nth-child(1),
#sectionFrozen td:nth-child(1),
#sectionClosed th:nth-child(1),
#sectionClosed td:nth-child(1) {
  width: 56px;
}

#sectionWithdrawals th:nth-child(5),
#sectionWithdrawals td:nth-child(5),
#sectionFrozen th:nth-child(7),
#sectionFrozen td:nth-child(7) {
  width: 170px;
}

#sectionWithdrawals th:nth-child(6),
#sectionWithdrawals td:nth-child(6),
#sectionFrozen th:nth-child(5),
#sectionFrozen td:nth-child(5),
#sectionFrozen th:nth-child(6),
#sectionFrozen td:nth-child(6),
#sectionClosed th:nth-child(6),
#sectionClosed td:nth-child(6),
#sectionClosed th:nth-child(7),
#sectionClosed td:nth-child(7),
#sectionClosed th:nth-child(8),
#sectionClosed td:nth-child(8),
#sectionClosed th:nth-child(9),
#sectionClosed td:nth-child(9) {
  width: 92px;
}

#sectionWithdrawals th:nth-child(7),
#sectionWithdrawals td:nth-child(7) {
  width: 128px;
}

#sectionWithdrawals th:nth-child(8),
#sectionWithdrawals td:nth-child(8),
#sectionFrozen th:nth-child(8),
#sectionFrozen td:nth-child(8),
#sectionClosed th:nth-child(10),
#sectionClosed td:nth-child(10) {
  width: 124px;
}

#sectionYields th:nth-child(1),
#sectionYields td:nth-child(1) {
  width: 44px;
}

#sectionYields th:nth-child(2),
#sectionYields td:nth-child(2) {
  width: 76px;
}

#sectionYields th:nth-child(3),
#sectionYields td:nth-child(3) {
  width: 112px;
}

#sectionYields th:nth-child(4),
#sectionYields td:nth-child(4) {
  width: 74px;
}

#sectionYields th:nth-child(5),
#sectionYields td:nth-child(5) {
  width: 174px;
}

#sectionYields th:nth-child(6),
#sectionYields td:nth-child(6),
#sectionYields th:nth-child(8),
#sectionYields td:nth-child(8) {
  width: 92px;
}

#sectionYields th:nth-child(7),
#sectionYields td:nth-child(7) {
  width: 64px;
}

#sectionYields th:nth-child(9),
#sectionYields td:nth-child(9) {
  width: 150px;
}

#sectionYields th:nth-child(10),
#sectionYields td:nth-child(10) {
  width: 156px;
}

#sectionYields th:nth-child(11),
#sectionYields td:nth-child(11) {
  width: 180px;
}

#sectionYields th:nth-child(12),
#sectionYields td:nth-child(12) {
  width: 130px;
}

#sectionYields th:nth-child(13),
#sectionYields td:nth-child(13) {
  width: 104px;
}

#sectionYields th {
  white-space: normal;
  overflow-wrap: anywhere;
}

.yield-table-help {
  margin: 0;
  padding: 0.6rem 0.7rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

body.mobile-layout #sectionYields table {
  min-width: 1420px;
}

#sectionApplications th:nth-child(1),
#sectionApplications td:nth-child(1) {
  width: 36px;
}

#sectionApplications th:nth-child(2),
#sectionApplications td:nth-child(2) {
  width: 76px;
}

#sectionApplications th:nth-child(3),
#sectionApplications td:nth-child(3) {
  width: 74px;
}

#sectionApplications th:nth-child(4),
#sectionApplications td:nth-child(4) {
  width: 74px;
}

#sectionApplications th:nth-child(5),
#sectionApplications td:nth-child(5) {
  width: 44px;
}

#sectionApplications th:nth-child(6),
#sectionApplications td:nth-child(6) {
  width: 70px;
}

#sectionApplications th:nth-child(7),
#sectionApplications td:nth-child(7),
#sectionApplications th:nth-child(8),
#sectionApplications td:nth-child(8),
#sectionApplications th:nth-child(9),
#sectionApplications td:nth-child(9) {
  width: 82px;
}

#sectionApplications th:nth-child(10),
#sectionApplications td:nth-child(10) {
  width: 76px;
}

#sectionApplications th:nth-child(11),
#sectionApplications td:nth-child(11) {
  width: 80px;
}

#sectionApplications th:nth-child(12),
#sectionApplications td:nth-child(12) {
  width: 124px;
}

#sectionApplications .application-objective-cell {
  line-height: 1.18;
  white-space: normal;
}

#sectionApplications tr.application-overdue td {
  border-top: 1px solid rgba(240, 68, 68, 0.58);
  border-bottom: 1px solid rgba(240, 68, 68, 0.58);
  background: rgba(240, 68, 68, 0.08);
}

#sectionApplications tr.application-overdue td:first-child {
  border-left: 2px solid rgba(240, 68, 68, 0.85);
}

#sectionApplications tr.application-overdue td:last-child {
  border-right: 2px solid rgba(240, 68, 68, 0.85);
}

#sectionApplications .application-actions-cell {
  white-space: normal;
}

#sectionApplications .application-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  align-items: stretch;
  gap: 0.22rem;
}

#sectionApplications .application-row-actions .icon-action {
  width: 100%;
  min-width: 0;
  min-height: 1.65rem;
  padding: 0 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.68rem;
}

#sectionApplications .status-pill {
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.25rem;
  white-space: normal;
  line-height: 1.05;
  font-size: 0.62rem;
}

.status-pill {
  display: inline-flex;
  min-width: 5.3rem;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.status-pill.hot {
  border-color: rgba(240, 68, 68, 0.45);
  color: #ffb4b4;
  background: var(--red-soft);
}

.status-pill.watch {
  border-color: rgba(245, 197, 66, 0.45);
  color: #ffe08a;
  background: rgba(245, 197, 66, 0.1);
}

.status-pill.closed {
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.status-pill.frozen {
  border-color: rgba(47, 128, 237, 0.48);
  color: #b9d7ff;
  background: rgba(47, 128, 237, 0.12);
}

.status-pill.unlocked {
  border-color: rgba(24, 201, 100, 0.42);
  color: #baf7d2;
  background: rgba(24, 201, 100, 0.1);
}

.add-header {
  display: grid;
  place-items: center;
  min-height: 3.2rem;
  margin: -1px -1px 0;
  border-radius: 8px 8px 0 0;
  background: #020403;
  border-bottom: 1px solid var(--line);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  font-weight: 900;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.7rem;
}

.segmented-control button {
  min-height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--muted);
}

.segmented-control button.active {
  background: var(--green);
  border-color: var(--green);
  color: #061009;
  font-weight: 800;
}

.action-form {
  padding: 0 0.7rem 0.8rem;
  min-width: 0;
}

.form-section-title {
  border-top: 1px solid var(--line-soft);
  padding-top: 0.8rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.form-stack {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  align-items: start;
  gap: 0.55rem;
}

.action-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-form input,
.action-form select,
.action-form textarea {
  min-width: 0;
  max-width: 100%;
}

.action-form select {
  overflow: hidden;
  text-overflow: ellipsis;
}

#transactionValueRow.percent-mode {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
}

#transactionValueRow.percent-mode #transactionAmountWrap {
  grid-column: 1 / -1;
}

.form-row > label {
  flex: 1;
  min-width: 0;
}

.calculation-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: none;
}

.settings-rule-list {
  display: grid;
  gap: 0.55rem;
}

.settings-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(4.5rem, 0.7fr) auto;
  gap: 0.45rem;
  align-items: end;
}

.settings-rule-row label {
  min-width: 0;
}

.settings-rule-row .ghost-button {
  min-height: 2.45rem;
  padding-inline: 0.65rem;
}

.empty-settings-rules {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 0.62rem 0.7rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  text-transform: none;
}

.check-row {
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  text-transform: none;
  color: var(--text);
  font-size: 0.84rem;
}

.check-row input {
  width: 1rem;
  min-height: 1rem;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.form-actions .ghost-button {
  min-height: 2.6rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.receipt-actions {
  display: grid;
  gap: 0.25rem;
  min-width: 9.5rem;
}

.receipt-actions .row-actions {
  justify-content: flex-start;
}

.receipt-actions small,
.muted-cell {
  color: var(--muted);
  font-size: 0.74rem;
}

.icon-action {
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0f14;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.icon-action:hover {
  border-color: var(--green);
}

.icon-action.danger:hover {
  border-color: var(--red);
  color: #ffb4b4;
}

.icon-action[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 42;
  width: min(26rem, calc(100vw - 2rem));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 4px solid var(--green);
  background: rgba(13, 18, 25, 0.97);
  color: var(--text);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  line-height: 1.35;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.error {
  border-left-color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 10, 0.74);
}

.reminder-modal {
  width: min(42rem, 100%);
  max-height: min(44rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(16rem, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.prompt-modal {
  width: min(32rem, 100%);
  max-height: min(40rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.revolving-capital-modal {
  width: min(38rem, 100%);
  max-height: min(42rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.login-notice-modal {
  width: min(30rem, 100%);
  max-height: min(34rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.receipt-preview-modal {
  width: min(72rem, 96vw);
  height: min(48rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.profile-photo-backdrop {
  z-index: 120;
  background: rgba(2, 6, 10, 0.88);
}

.profile-photo-preview-modal {
  width: min(68rem, 96vw);
  height: min(48rem, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.profile-photo-preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line-soft);
  background: #05080c;
  overflow: auto;
  padding: 0.75rem;
}

.profile-photo-preview-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.receipt-preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #05080c;
  overflow: auto;
}

.receipt-preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.receipt-preview-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.receipt-preview-modal .modal-actions {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
}

.reminder-modal textarea {
  min-height: 18rem;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: #0b0f14;
  line-height: 1.42;
  resize: none;
}

.modal-backdrop.report-mode .reminder-modal {
  width: min(66rem, 96vw);
  grid-template-rows: auto minmax(20rem, 1fr) auto;
}

.modal-backdrop.report-mode.report-complete-mode .reminder-modal {
  width: min(92rem, 98vw);
}

.modal-backdrop.report-mode .report-complete-toggle {
  margin-left: auto;
  border-color: rgba(24, 201, 100, 0.38);
  background: #0b0f14;
  color: var(--green);
}

.modal-backdrop.report-mode .report-complete-toggle[aria-pressed="true"] {
  background: var(--green);
  color: #03130a;
}

.modal-backdrop.report-mode .modal-actions {
  grid-template-columns: minmax(16rem, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line-soft);
  background: #0f141b;
}

.modal-backdrop.report-mode .modal-actions button {
  min-height: 2.55rem;
  border-radius: 6px;
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.modal-backdrop.report-mode #reminderCopy {
  width: 100%;
  color: #03130a;
  background: var(--green);
  box-shadow: inset 0 -1px 0 rgba(3, 19, 10, 0.24);
}

.modal-backdrop.report-mode #reminderCopy:hover {
  background: #23dc72;
}

.modal-backdrop.report-mode #reminderWhatsapp,
.modal-backdrop.report-mode #reminderDownload {
  border: 1px solid var(--line);
  background: #0b0f14;
  color: var(--text);
}

.modal-backdrop.report-mode #reminderWhatsapp:hover,
.modal-backdrop.report-mode #reminderDownload:hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: #141b24;
  color: #ffffff;
}

.investor-report-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
  overflow: hidden;
}

.investor-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--line-soft);
}

.investor-report-meta b {
  color: var(--text);
}

.investor-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.investor-report-summary div {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #101720;
  padding: 0.55rem 0.65rem;
}

.investor-report-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.investor-report-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.investor-report-table-scroll {
  min-height: 0;
  overflow: auto;
  padding: 0 0.7rem 0.7rem;
}

.investor-report-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.investor-report-table.complete {
  min-width: 1500px;
}

.investor-report-table th,
.investor-report-table td {
  padding: 0.58rem 0.65rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.investor-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111923;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.investor-report-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.investor-report-name {
  min-width: 12rem;
}

.investor-report-name b {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-grid;
  place-items: center;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: #1b2430;
  color: var(--muted);
  font-size: 0.68rem;
}

.investor-report-name span {
  color: var(--text);
  font-weight: 800;
}

.investor-report-profit {
  display: inline-flex;
  min-width: 4.6rem;
  justify-content: center;
  border: 1px solid rgba(24, 201, 100, 0.32);
  border-radius: 999px;
  background: var(--green-soft);
  padding: 0.24rem 0.45rem;
  font-weight: 900;
}

.investor-report-table tfoot td {
  position: sticky;
  bottom: 0;
  border-top: 1px solid rgba(24, 201, 100, 0.35);
  border-bottom: 0;
  background: #111923;
  font-weight: 900;
}

@media (max-width: 720px) {
  .login-shell {
    align-content: start;
    padding: 1rem;
  }

  .login-panel {
    width: min(100%, 380px);
    margin-top: 1rem;
  }

  .login-activity-chip {
    max-width: min(16rem, calc(100vw - 2rem));
    font-size: 0.7rem;
  }

  .transfer-layout,
  .testimonial-layout,
  .transfer-row,
  .testimonial-row {
    grid-template-columns: 1fr;
  }

  .transfer-actions,
  .testimonial-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .testimonial-carousel {
    width: 100%;
  }

  .testimonial-carousel-slide {
    aspect-ratio: 1 / 1;
  }

  .testimonial-carousel-button {
    width: 2rem;
    min-height: 2rem;
    font-size: 1.55rem;
  }

  .revolving-capital-summary {
    grid-template-columns: 1fr;
  }

  .modal-backdrop.report-mode .modal-actions {
    grid-template-columns: 1fr;
  }

  .modal-backdrop.report-mode .modal-actions button {
    width: 100%;
  }

  .investor-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .investor-report-table {
    min-width: 760px;
  }

  .investor-report-table.complete {
    min-width: 1400px;
  }
}

.prompt-body {
  display: grid;
  gap: 0.85rem;
  min-height: 0;
  padding: 1rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
  overflow: auto;
}

.revolving-capital-body {
  display: grid;
  gap: 0.85rem;
  min-height: 0;
  padding: 1rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
  overflow: auto;
}

.revolving-capital-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.revolving-capital-summary span {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(16, 21, 28, 0.72);
  padding: 0.52rem 0.62rem;
}

.revolving-capital-summary small {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.revolving-capital-summary b {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-notice-body {
  min-height: 0;
  padding: 1rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #0b0f14;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
}

.prompt-message {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-line;
}

.prompt-details {
  max-height: 12rem;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #05080c;
  color: var(--muted);
  padding: 0.7rem;
  white-space: pre-wrap;
  overflow: auto;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
}

.prompt-field {
  color: var(--muted);
}

.prompt-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.prompt-feedback {
  display: block;
  border: 1px solid rgba(239, 68, 68, 0.36);
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  padding: 0.62rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.35;
  text-transform: none;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  padding: 0.7rem;
}

.modal-actions button {
  min-height: 2.45rem;
}

.modal-actions.prompt-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.login-notice-modal .modal-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.empty-state {
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

@media (max-width: 1180px) {
  .terminal-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .home-analytics-grid {
    grid-template-columns: 1fr;
  }

  .action-rail {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .action-rail {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  }
}

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
  .toast {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .terminal-topbar {
    grid-template-columns: 1fr;
  }

  .session-box,
  .ticker-strip {
    justify-content: start;
    flex-wrap: wrap;
  }

  .withdrawal-marquee {
    flex-basis: 100%;
  }

  .notification-panel {
    left: 0;
    right: auto;
  }

  .profile-panel {
    left: 0;
    right: auto;
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .market-rail,
  .action-rail {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid,
  .dashboard-nav,
  .info-grid,
  .bucket-grid,
  .statement-grid,
  .statement-bank-filters,
  .statement-bank-summary,
  .portfolio-heatmap,
  .action-rail,
  .goal-form,
    .automation-layout,
    .automation-opportunity-form,
    .chat-layout,
    .team-grid,
    .chat-controls,
    .chat-composer,
    .broadcast-grid,
    .broadcast-footer,
    .modal-actions {
    grid-template-columns: 1fr;
  }

  .chat-channel-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .whatsapp-recipient-list {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .action-form .form-row,
  #transactionValueRow.percent-mode {
    grid-template-columns: 1fr;
  }

  .alert-head {
    grid-template-columns: 1fr;
  }

  .alert-amount {
    justify-items: start;
  }

  .commission-overview,
  .commission-row-metrics,
  .commission-detail-stats,
  .online-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projection-layout,
  .online-session-details {
    grid-template-columns: 1fr;
  }

  #sectionProjection .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projection-row-head {
    grid-template-columns: 1fr;
  }

  .online-card {
    grid-template-columns: 1fr;
  }

  .online-card-actions {
    justify-content: flex-start;
  }

  .online-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .online-card-metrics span:last-child {
    grid-column: 1 / -1;
  }

  .commission-row {
    grid-template-columns: 1fr;
  }

  .commission-row-top {
    grid-template-columns: 1fr;
  }

  .commission-balance {
    justify-items: start;
  }

  .settings-rule-row {
    grid-template-columns: minmax(0, 1fr) minmax(4.5rem, 0.65fr) auto;
  }

  #transactionValueRow.percent-mode #transactionAmountWrap {
    grid-column: auto;
  }

  .commission-detail-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .commission-detail-row b {
    justify-self: start;
  }

  .commission-detail-side,
  .commission-detail-amount {
    justify-content: flex-start;
    justify-items: start;
  }

  .commission-detail-actions {
    justify-content: flex-start;
  }

  .referral-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-branch {
    min-width: max-content;
  }

  .referral-node {
    width: 11.2rem;
    align-items: stretch;
  }

  .referral-node-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statement-action-bar {
    justify-content: flex-start;
  }

  .referral-node-actions {
    justify-content: center;
  }

  .chart-controls {
    grid-template-columns: auto 1fr auto;
  }

  .chart-controls span {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
  body.mobile-layout {
    min-height: 100svh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  body.mobile-layout .terminal-topbar {
    position: relative;
    top: auto;
    z-index: 25;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.6rem;
    padding: calc(0.48rem + env(safe-area-inset-top)) 0.62rem 0.52rem;
  }

  body.mobile-layout .terminal-brand {
    min-width: 0;
  }

  body.mobile-layout .terminal-brand strong {
    font-size: 0.95rem;
  }

  body.mobile-layout .terminal-brand small {
    margin-top: 0.1rem;
    font-size: 0.68rem;
  }

  body.mobile-layout .status-dot {
    width: 0.58rem;
    height: 0.58rem;
  }

  body.mobile-layout .session-box {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    gap: 0.32rem;
    flex-wrap: nowrap;
  }

  body.mobile-layout #sessionName {
    display: none;
  }

  body.mobile-layout .session-box .ghost-button,
  body.mobile-layout .notification-button,
  body.mobile-layout .privacy-button {
    min-width: 2.08rem;
    width: auto;
    min-height: 2.08rem;
    height: 2.08rem;
    padding: 0 0.42rem;
    font-size: 0.72rem;
  }

  body.mobile-layout .notification-panel,
  body.mobile-layout .profile-panel {
    position: fixed;
    top: calc(3.35rem + env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
    left: max(0.5rem, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100svh - 4.1rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 4.1rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  body.mobile-layout .ticker-strip {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.42rem;
    min-height: 2rem;
    overflow-x: hidden;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 0.08rem;
    scrollbar-width: none;
  }

  body.mobile-layout .ticker-strip::-webkit-scrollbar,
  body.mobile-layout .dashboard-nav::-webkit-scrollbar {
    display: none;
  }

  body.mobile-layout .ticker-strip > span {
    flex: 1 1 calc(50% - 0.42rem);
    min-width: 7.1rem;
    padding: 0.28rem 0.45rem;
    font-size: 0.68rem;
  }

  body.mobile-layout .withdrawal-marquee {
    display: flex;
    order: 10;
    flex: 0 0 100%;
    min-width: 0;
    height: 1.85rem;
    margin-top: 0.05rem;
  }

  body.mobile-layout .withdrawal-marquee-item {
    font-size: 0.68rem;
  }

  body.mobile-layout .terminal-grid {
    min-height: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }

  body.mobile-layout .workspace {
    order: 1;
    padding: 0.6rem;
    gap: 0.62rem;
  }

  body.mobile-layout .market-rail {
    order: 2;
    padding: 0.6rem;
  }

  body.mobile-layout .action-rail {
    order: 3;
    padding: 0.6rem 0.6rem calc(0.6rem + env(safe-area-inset-bottom));
  }

  body.mobile-layout .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  body.mobile-layout .metric-card {
    min-height: 5.4rem;
    padding: 0.62rem;
  }

  body.mobile-layout .metric-card span {
    font-size: 0.64rem;
  }

  body.mobile-layout .metric-card strong {
    font-size: 1.04rem;
  }

  body.mobile-layout .metric-card small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
  }

  body.mobile-layout .focus-panel,
  body.mobile-layout .chart-panel,
  body.mobile-layout .heatmap-panel,
  body.mobile-layout .table-panel,
  body.mobile-layout .rail-panel,
  body.mobile-layout .add-panel,
  body.mobile-layout .settings-panel,
  body.mobile-layout .alerts-panel {
    border-radius: 8px;
    box-shadow: none;
  }

  body.mobile-layout .panel-title {
    flex-wrap: wrap;
    min-height: 2.2rem;
    padding: 0.48rem 0.58rem;
    font-size: 0.68rem;
  }

  body.mobile-layout .dashboard-section {
    min-width: 0;
    scroll-margin-top: calc(4.8rem + env(safe-area-inset-top));
  }

  body.mobile-layout .dashboard-nav {
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 0.38rem;
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 20;
    padding: calc(0.48rem + env(safe-area-inset-top)) 0.58rem 0.48rem;
    border: 1px solid rgba(48, 57, 71, 0.92);
    border-radius: 8px;
    background: rgba(8, 11, 15, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0.58rem;
  }

  body.mobile-layout .dashboard-nav button {
    flex: 0 0 auto;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  body.mobile-layout .dashboard-nav button.active {
    box-shadow: 0 0 0 3px rgba(24, 201, 100, 0.12);
  }

  body.mobile-layout .nav-alert-badge {
    top: -0.24rem;
    right: -0.18rem;
  }

  body.mobile-layout .info-grid,
  body.mobile-layout .bucket-grid,
  body.mobile-layout .daily-priority-summary,
  body.mobile-layout .daily-priority-list.card-list,
  body.mobile-layout .statement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  body.mobile-layout .info-card {
    min-height: 5.1rem;
    padding: 0.62rem;
  }

  body.mobile-layout .info-card strong {
    font-size: 0.95rem;
  }

  body.mobile-layout .chart-panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  body.mobile-layout .chart-controls {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  body.mobile-layout .chart-controls span {
    grid-column: 1 / -1;
    text-align: left;
  }

  body.mobile-layout .table-scroll {
    max-height: 68svh;
  }

  body.mobile-layout table {
    min-width: 980px;
  }

  body.mobile-layout #sectionApplications table {
    min-width: 920px;
  }

  body.mobile-layout .chat-layout,
  body.mobile-layout .testimonial-layout,
  body.mobile-layout .transfer-layout,
  body.mobile-layout .automation-layout,
  body.mobile-layout .automation-opportunity-form,
  body.mobile-layout .team-grid,
  body.mobile-layout .daily-priority-columns,
  body.mobile-layout .statement-bank-filters,
  body.mobile-layout .statement-bank-summary,
  body.mobile-layout .portfolio-heatmap,
  body.mobile-layout .action-rail,
  body.mobile-layout .goal-form,
  body.mobile-layout .chat-controls,
  body.mobile-layout .chat-composer,
  body.mobile-layout .modal-actions {
    grid-template-columns: 1fr;
  }

  body.mobile-layout #sectionChat .chat-sidebar,
  body.mobile-layout #sectionChat .chat-main {
    min-height: 0;
  }

  body.mobile-layout #sectionChat .chat-thread-list {
    max-height: min(60svh, 28rem);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.mobile-layout #sectionChat .chat-messages {
    max-height: min(62svh, 32rem);
  }

  body.mobile-layout .automation-opportunity-form textarea {
    grid-column: auto;
  }

  body.mobile-layout .automation-row {
    grid-template-columns: 1fr;
  }

  body.mobile-layout .automation-row .row-actions {
    justify-content: flex-start;
  }

  body.mobile-layout .automation-score-actions,
  body.mobile-layout .automation-opportunity-actions,
  body.mobile-layout .automation-status-select {
    width: 100%;
    min-width: 0;
  }

  body.mobile-layout .workspace > *,
  body.mobile-layout .panel-title > *,
  body.mobile-layout .form-row > *,
  body.mobile-layout input,
  body.mobile-layout select,
  body.mobile-layout textarea {
    min-width: 0;
    max-width: 100%;
  }

  body.mobile-layout .notification-head,
  body.mobile-layout .notification-tools {
    flex-wrap: wrap;
  }

  body.mobile-layout .compact-row:not(.chat-thread),
  body.mobile-layout .book-row,
  body.mobile-layout .tape-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  body.mobile-layout .compact-row > div,
  body.mobile-layout .book-row > div,
  body.mobile-layout .tape-row > div {
    min-width: 0;
  }

  body.mobile-layout .compact-row:not(.chat-thread) strong,
  body.mobile-layout .compact-row small,
  body.mobile-layout .book-row strong,
  body.mobile-layout .book-row small,
  body.mobile-layout .tape-row strong,
  body.mobile-layout .tape-row small {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.mobile-layout .compact-row:not(.chat-thread) > .row-actions,
  body.mobile-layout .book-row > .row-actions {
    justify-content: flex-start;
  }

  body.mobile-layout .modal-backdrop {
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  }

  body.mobile-layout .reminder-modal {
    max-height: calc(100svh - 1rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 1rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 520px) {
  body.mobile-layout .metric-grid,
  body.mobile-layout .info-grid,
  body.mobile-layout .bucket-grid,
  body.mobile-layout .daily-priority-summary,
  body.mobile-layout .daily-priority-list.card-list,
  body.mobile-layout .statement-grid,
  body.mobile-layout #sectionProjection .info-grid,
  body.mobile-layout .commission-overview,
  body.mobile-layout .commission-row-metrics,
  body.mobile-layout .commission-detail-stats,
  body.mobile-layout .online-overview,
  body.mobile-layout .online-card-metrics {
    grid-template-columns: 1fr;
  }

  body.mobile-layout .projection-row {
    grid-template-columns: 1fr;
  }

  body.mobile-layout .referral-node-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.mobile-layout .metric-card {
    min-height: 4.8rem;
  }

  body.mobile-layout .terminal-brand strong {
    font-size: 0.84rem;
  }

  body.mobile-layout .terminal-brand small {
    overflow-wrap: anywhere;
  }

  body.mobile-layout .terminal-brand {
    gap: 0.3rem;
  }
}

.profile-notifications { margin: 0; padding: 10px; border: 1px solid #334155; border-radius: 8px; }
.profile-notifications legend { padding: 0 4px; font-weight: 600; }
.profile-form .profile-notifications label { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.profile-form .profile-notifications input { width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 0; }
.profile-notifications small { display: block; line-height: 1.4; }
