/* Control room dashboard (company chat) */
.dash-app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
  background: var(--bg);
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 22, 0.96);
}

.dash-brand h2 { font-size: 17px; font-weight: 800; }
.dash-brand .meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.dash-brand .meta b { color: var(--text); }

.dash-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.dash-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-2);
}

.dash-chip.gold { color: var(--gold-bright); border-color: rgba(232, 180, 74, 0.35); }
.dash-chip.green { color: var(--green); border-color: rgba(47, 191, 113, 0.35); cursor: pointer; }
.dash-chip.green:hover { filter: brightness(1.08); }

.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.dash-live.on { color: var(--green); border-color: rgba(47, 191, 113, 0.45); background: rgba(47, 191, 113, 0.08); }
.dash-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.dash-live.on .dot { background: var(--green); animation: dash-pulse 1.6s infinite; }

@keyframes dash-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0.45); }
  70% { box-shadow: 0 0 0 8px transparent; }
}

.dash-btn {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.dash-btn.green { background: var(--green); color: #062214; border: none; }
.dash-btn.red { background: var(--red); color: #fff; border: none; }
.dash-btn.gold { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #14100a; border: none; }
.dash-btn.ghost { background: transparent; color: var(--text-dim); }

.dash-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.dash-strip .cell { background: var(--bg-2); padding: 10px 14px; }
.dash-strip .k { font-size: 11px; color: var(--text-faint); font-weight: 700; text-transform: uppercase; }
.dash-strip .v { font-size: 18px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dash-strip .v.gold { color: var(--gold-bright); }
.dash-strip .v.warn { color: #e88; }
.dash-strip .s { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.dash-strip .s.profit { color: #6c6; }
.dash-strip .s.loss { color: #e88; }
.dash-stance {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--gold-bright);
  background: rgba(232, 180, 74, 0.12);
}

.dash-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 220px;
  grid-template-rows: 1fr auto;
}

.dash-chat-wrap {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.dash-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-chat-head h3 { font-size: 14px; font-weight: 800; }
.dash-chat-head .sub { font-size: 12px; color: var(--text-dim); }

.dash-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-filters button {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dash-filters button.on { color: var(--gold-bright); border-color: rgba(232, 180, 74, 0.45); background: rgba(232, 180, 74, 0.08); }

.dash-chat {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
  background: linear-gradient(180deg, #0a0e14 0%, var(--bg) 40%);
}

.dash-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  margin-bottom: 14px;
  max-width: 820px;
}

.dash-msg.system { grid-template-columns: 1fr; max-width: none; }
.dash-msg.system .dash-bubble {
  margin: 0 auto;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
}

.dash-av {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0a0e14;
  background: var(--text-dim);
}

.dash-av.ceo { background: var(--gold-bright); }
.dash-av.hot { background: #d4a03a; }
.dash-av.mi { background: #5b8def; color: #fff; }
.dash-av.sc { background: #7c6af0; color: #fff; }
.dash-av.rk { background: var(--red); color: #fff; }
.dash-av.pm { background: #2aa8a0; color: #fff; }
.dash-av.ln { background: #8b95a5; }
.dash-av.ops { background: #4a90a4; color: #fff; }
.dash-av.eye { background: #3d4a5c; color: var(--gold-bright); }

.dash-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.dash-bubble .who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-bubble .who .name { font-size: 13px; font-weight: 800; }
.dash-bubble .who .time { font-size: 11px; color: var(--text-faint); }
.dash-bubble .body { font-size: 13px; line-height: 1.55; color: #d5dde8; }
.dash-bubble .tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--gold-bright);
  background: rgba(232, 180, 74, 0.1);
}

.dash-bubble.decision { border-color: rgba(232, 180, 74, 0.45); background: rgba(232, 180, 74, 0.06); }

.dash-team {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--bg-2);
  overflow: auto;
  padding: 12px 10px;
}

.dash-team h4 {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 4px 6px 10px;
}

.dash-member {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  margin-bottom: 4px;
  cursor: pointer;
}

.dash-member:hover,
.dash-member.on { background: var(--surface); border-color: var(--border); }

.dash-member .info .n { font-size: 12px; font-weight: 700; }
.dash-member .info .st { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

.dash-bottom {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.dash-plan {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
}

.dash-plan-state {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.dash-plan-section {
  margin-bottom: 10px;
}

.dash-plan-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.dash-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 3px 0;
}

.dash-plan-row .k { color: var(--text-faint); }
.dash-plan-row .v { font-weight: 700; text-align: right; }

.dash-plan-prose,
.dash-plan-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.92;
  padding: 2px 0 4px;
}

.dash-plan-note {
  color: var(--text-faint);
  font-size: 11px;
}

.dash-plan-branch {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}

.dash-plan-branch .bk {
  color: var(--text-faint);
}

.dash-plan-branch .bv {
  font-weight: 600;
  line-height: 1.4;
}

.dash-plan-horizon {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  font-size: 12px;
  padding: 2px 0;
}

.dash-plan-horizon .hk { color: var(--text-faint); }
.dash-plan-horizon .hv { line-height: 1.4; }

.dash-plan-hit { color: var(--gold-bright); }
.dash-plan-ok { color: var(--green); }
.dash-plan-broke { color: var(--red); }

.dash-journal {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.dash-journal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 2px 0;
}
.dash-journal-row .k { color: var(--text-faint); }
.dash-journal-row .v { font-weight: 600; }

.dash-book {
  padding: 12px 14px 14px;
}

.dash-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dash-book-head h4 { font-size: 13px; font-weight: 800; }
.dash-book-head .sum { font-size: 12px; color: var(--text-dim); }

.dash-book table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-book th,
.dash-book td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(42, 51, 68, 0.8); }
.dash-book th { color: var(--text-faint); font-size: 11px; }
.dash-empty { color: var(--text-faint); font-size: 13px; padding: 10px 0; }
.dash-pnl-pos { color: var(--green); font-weight: 700; }
.dash-pnl-neg { color: var(--red); font-weight: 700; }

.dash-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 8, 14, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.dash-scrim.on {
  display: block;
  opacity: 1;
}

.dash-drawer {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  z-index: 50;
  width: min(480px, calc(100vw - 32px));
  max-height: min(90vh, 860px);
  height: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  padding: 18px 16px 20px;
  overflow: auto;
}

.dash-drawer--settings {
  width: min(720px, calc(100vw - 24px));
  max-height: min(92vh, 900px);
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #171e29 0%, var(--surface) 120px);
  border-color: rgba(232, 180, 74, 0.18);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.dash-drawer.on {
  display: block;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.dash-drawer--settings.on {
  display: flex;
  flex-direction: column;
}

.dash-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(35, 44, 59, 0.9);
  flex-shrink: 0;
}

.dash-modal-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.dash-modal-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dash-modal-head .hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  max-width: 36em;
}

.dash-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 29, 0.8);
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dash-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: rgba(232, 180, 74, 0.35);
}

.dash-modal-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  flex-shrink: 0;
}

.dash-tab {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px 10px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dash-tab:hover { color: var(--text); background: rgba(26, 34, 48, 0.55); }

.dash-tab.on {
  color: var(--gold-bright);
  background: rgba(232, 180, 74, 0.08);
  border-color: rgba(232, 180, 74, 0.25);
}

.dash-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 12px;
  border-top: 1px solid rgba(35, 44, 59, 0.65);
}

.dash-tab-panel { display: none; }
.dash-tab-panel.on { display: block; }

.dash-panel-lead {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.45;
}

.dash-panel-lead strong { color: var(--text); font-weight: 700; }

.dash-overlay-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.dash-search-icon {
  color: var(--text-faint);
  font-size: 14px;
}

.dash-search-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.dash-search-wrap input::placeholder { color: var(--text-faint); }

.dash-overlay-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(232, 180, 74, 0.1);
  border: 1px solid rgba(232, 180, 74, 0.22);
}

.dash-risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.dash-field--wide { grid-column: 1 / -1; }

.dash-field label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
}

.dash-field input,
.dash-field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.dash-modal-foot {
  flex-shrink: 0;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(35, 44, 59, 0.9);
  background: rgba(10, 14, 20, 0.45);
}

.dash-drawer h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.dash-drawer .hint { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; line-height: 1.45; }
.dash-drawer label { display: block; font-size: 12px; color: var(--text-dim); font-weight: 700; margin: 12px 0 6px; }
.dash-drawer input,
.dash-drawer select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.dash-section {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
}

.dash-skill-list { display: flex; flex-direction: column; gap: 8px; }

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

.dash-skill-grid.overlay {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.dash-skill-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 12px 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(35, 44, 59, 0.95);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.95), rgba(15, 20, 29, 0.98));
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
}

.dash-skill-card:hover {
  border-color: rgba(139, 149, 165, 0.35);
  transform: translateY(-1px);
}

.dash-skill-card.on {
  border-color: rgba(232, 180, 74, 0.55);
  background: linear-gradient(180deg, rgba(232, 180, 74, 0.12), rgba(20, 26, 36, 0.95));
  box-shadow: 0 0 0 1px rgba(232, 180, 74, 0.15) inset;
}

.dash-skill-card.overlay.on {
  border-color: rgba(91, 141, 239, 0.55);
  background: linear-gradient(180deg, rgba(91, 141, 239, 0.12), rgba(20, 26, 36, 0.95));
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.12) inset;
}

.dash-skill-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  border: 2px solid rgba(139, 149, 165, 0.45);
  background: transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.dash-skill-card.overlay .dash-skill-mark {
  border-radius: 5px;
}

.dash-skill-card.on .dash-skill-mark {
  border-color: var(--gold);
  background: radial-gradient(circle at 50% 50%, var(--gold-bright), var(--gold));
  box-shadow: 0 0 0 3px rgba(232, 180, 74, 0.15);
}

.dash-skill-card.overlay.on .dash-skill-mark {
  border-color: #5b8def;
  background: #5b8def;
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-skill-card.overlay.on .dash-skill-mark::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.dash-skill-body { flex: 1; min-width: 0; }

.dash-skill-card .t {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dash-skill-card .d {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-skill-card.hidden { display: none; }

.dash-preview {
  margin-top: 0;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 20, 29, 0.85);
  border: 1px solid rgba(232, 180, 74, 0.15);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.dash-preview b { color: var(--gold-bright); }

.dash-key-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #0b1017;
  border: 1px dashed rgba(232, 180, 74, 0.45);
  font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
  color: var(--gold-bright);
  word-break: break-all;
}

.dash-key-box.empty { color: var(--text-faint); border-style: solid; }

.dash-warn {
  margin-top: 10px;
  font-size: 12px;
  color: #f0b4b0;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(229, 83, 75, 0.1);
  border: 1px solid rgba(229, 83, 75, 0.35);
}

.dash-exe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 14px;
}

.dash-exe-st {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 11px;
}

.dash-exe-st .k { font-size: 11px; color: var(--text-faint); font-weight: 700; }
.dash-exe-st .v { font-size: 13px; font-weight: 800; margin-top: 3px; }

.dash-drawer-actions { display: flex; gap: 8px; margin-top: 0; flex-wrap: wrap; justify-content: flex-end; }

.dash-drawer-actions .dash-btn { min-width: 120px; }

.dash-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}

.dash-toast.on { display: block; }

.dash-error {
  margin: 12px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(229, 83, 75, 0.1);
  border: 1px solid rgba(229, 83, 75, 0.35);
  color: #f0b4b0;
  font-size: 13px;
}

@media (max-width: 640px) {
  .dash-skill-grid { grid-template-columns: 1fr; }
  .dash-risk-grid { grid-template-columns: 1fr; }
  .dash-modal-tabs { overflow-x: auto; }
  .dash-tab { flex: 0 0 auto; min-width: 96px; }
}

@media (max-width: 900px) {
  .dash-strip { grid-template-columns: 1fr 1fr; }
  .dash-stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; }
  .dash-chat-wrap { border-right: none; }
  .dash-bottom { max-height: 240px; }
  .dash-book { max-height: none; }
  .dash-team {
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    grid-column: 1;
    grid-row: 3;
  }
  .dash-team h4 { display: none; }
  .dash-member { min-width: 140px; flex-shrink: 0; border: 1px solid var(--border); }
}

/* --- brain widgets --- */
.dash-brain-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  padding: 0;
}
.dash-brain-summary > div {
  background: var(--bg-2);
  padding: 12px 14px;
}
.dash-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dash-widget-head h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.dash-widget-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(232, 180, 74, 0.12);
  color: var(--gold);
}
.dash-timeline-body,
.dash-pathbook-body,
.dash-decision-body {
  font-size: 12px;
  line-height: 1.5;
  max-height: 160px;
  overflow-y: auto;
}
.dash-timeline-item {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(42, 51, 68, 0.4);
}
.dash-timeline-item .time {
  color: var(--text-faint);
  font-size: 11px;
  flex-shrink: 0;
  width: 44px;
}
.dash-timeline-item .event {
  color: var(--text);
}
.dash-timeline-item .price {
  color: var(--gold-bright);
  font-weight: 700;
  margin-left: auto;
}
.dash-path-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(42, 51, 68, 0.3);
  font-size: 12px;
}
.dash-path-row .side {
  font-weight: 800;
  width: 40px;
}
.dash-path-row .info {
  flex: 1;
  color: var(--text-dim);
}
.dash-path-row .ev {
  color: var(--gold-bright);
  font-weight: 700;
}
.dash-path-row .status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
}
.dash-path-row .status.active { background: rgba(47, 191, 113, 0.15); color: var(--green); }
.dash-path-row .status.waiting { background: rgba(232, 180, 74, 0.1); color: var(--gold); }
.dash-path-row .status.invalid { background: rgba(229, 83, 75, 0.1); color: var(--red); }
.dash-decision-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}
.dash-decision-stats .stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.dash-decision-stats .stat .label {
  font-size: 11px;
  color: var(--text-faint);
}
.dash-decision-stats .stat .value {
  font-weight: 800;
  font-size: 14px;
}
.dash-decision-stats .stat .value.enter { color: var(--green); }
.dash-decision-stats .stat .value.wait { color: var(--gold); }
.dash-decision-stats .stat .value.error { color: var(--red); }
.dash-decision-last {
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 4px;
  border-top: 1px solid rgba(42, 51, 68, 0.3);
}
.dash-decision-last .reason {
  color: var(--text);
}
@media (max-width: 900px) {
  .dash-brain-summary {
    grid-template-columns: 1fr;
  }
}

/* ══ Connector install guide (install_guide.js) — อยู่ใน drawer "เครื่อง EXE" ══
   ตัว drawer เดิมกว้าง 480px ซึ่งคับสำหรับคู่มือทีละขั้น + ตารางแก้ปัญหา → ขยายเป็น 1080px
   และแบ่ง 2 คอลัมน์ (ซ้าย = ขั้นตอน / ขวา = เช็คลิสต์ live) */

.dash-drawer--exe {
  width: min(1080px, calc(100vw - 28px));
  max-height: min(94vh, 1040px);
  padding: 22px 24px 26px;
}
.dash-drawer--exe h2 { font-size: 18px; }

.dash-exe-guide {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ปุ่มเติมเครดิตใบการ์ด KPI (เดิมเป็นข้อความขีดเส้นเล็ก ๆ ลูกค้าหาไม่เจอ) */
.dash2-topup-link {
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 9px;
  border: 1px solid rgba(232, 180, 74, 0.4);
  background: rgba(232, 180, 74, 0.1);
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.dash2-topup-link:hover { background: rgba(232, 180, 74, 0.2); }

/* ── หัวคู่มือ (ติดบนสุดตอนเลื่อน) ── */
.nxig-head {
  position: sticky;
  top: -8px;
  z-index: 3;
  background: var(--surface);
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.nxig-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.nxig-title { font-size: 16px; font-weight: 800; }
.nxig-head-btns { display: flex; gap: 8px; flex-shrink: 0; }
.nxig-mini {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 9px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.nxig-mini:hover { color: var(--gold-bright); border-color: var(--gold); }

.nxig-progress {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
  margin: 12px 0 8px;
}
.nxig-progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.25s ease;
}
.nxig-progress > i.all { background: var(--green); }
.nxig-sum { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.nxig-sum b.ok { color: var(--green); }

/* ── 2 คอลัมน์ ── */
.nxig-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 26px;
  align-items: start;
}
.nxig-col > .nxig-sub:first-child { margin-top: 0; }
@media (max-width: 1000px) {
  .nxig-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dash-drawer--exe { padding: 16px 15px 20px; }
}

.nxig-sub {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  margin: 18px 0 9px;
  letter-spacing: 0.02em;
}

.nxig-prep {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
}
.nxig-prep ul { margin: 0; padding-left: 18px; }
.nxig-prep li { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin: 3px 0; }
.nxig-prep li::marker { color: var(--gold); }

.nxig-dl {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 2px;
}
.nxig-dl .dash-btn {
  text-decoration: none;
  display: inline-block;
  padding: 8px 14px;
  font-size: 12.5px;
}

/* ── ขั้นตอน ── */
.nxig-step {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.nxig-step.on { border-color: rgba(232, 180, 74, 0.4); }
.nxig-step-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.nxig-step-head:hover .nxig-step-title { color: var(--gold-bright); }
.nxig-step-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(232, 180, 74, 0.12);
  border: 1px solid rgba(232, 180, 74, 0.3);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.nxig-step-title { flex: 1; }
.nxig-step-caret { color: var(--text-faint); font-size: 12px; }
.nxig-step-body { display: none; padding: 2px 16px 15px 49px; }
.nxig-step.on .nxig-step-body { display: block; }

.nxig-part { margin-top: 11px; }
.nxig-part .k {
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}
.nxig-part .v { display: block; font-size: 12.5px; line-height: 1.65; color: var(--text-dim); }
.nxig-part.p-see .k { color: var(--green); }
.nxig-part.p-else .k { color: #e07b74; }

/* ── เช็คลิสต์ ── */
.nxig-ck {
  display: flex;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 11px;
  margin-bottom: 7px;
  background: rgba(255, 255, 255, 0.02);
}
.nxig-ck-mark { flex: 0 0 auto; width: 15px; text-align: center; font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--text-faint); }
.nxig-ck-body { min-width: 0; }
.nxig-ck-t { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); }
.nxig-ck-d { display: block; margin-top: 3px; font-size: 12px; line-height: 1.55; color: var(--text-dim); }
.nxig-ck.ok { border-left-color: var(--green); }
.nxig-ck.ok .nxig-ck-mark { color: var(--green); }
.nxig-ck.warn { border-left-color: var(--gold); }
.nxig-ck.warn .nxig-ck-mark { color: var(--gold); }
.nxig-ck.fail { border-left-color: var(--red); }
.nxig-ck.fail .nxig-ck-mark { color: var(--red); }
.nxig-ck.wait { border-left-color: var(--text-faint); }

/* ── ปัญหาที่เจอบ่อย ── */
.nxig-more { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; }
.nxig-more summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 4px 0;
}
.nxig-more[open] summary { color: var(--gold-bright); margin-bottom: 10px; }
.nxig-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.nxig-table th {
  text-align: left;
  color: var(--text-faint);
  font-weight: 700;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--border);
}
.nxig-table td {
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid rgba(42, 51, 68, 0.5);
  color: var(--text-dim);
  vertical-align: top;
  line-height: 1.55;
}
.nxig-table td:first-child { color: var(--text); }

.nxig-support { font-size: 12px; color: var(--text-dim); line-height: 1.65; }
.nxig-support ol { margin: 8px 0 0; padding-left: 18px; }
.nxig-support li { margin: 4px 0; }
.nxig-support li::marker { color: var(--gold); }
