/* Strategy X-Ray app styles � charts & domain UI on Tabler */

html.i18n-switching body {
  visibility: hidden;
}

/*
 * Admin console (base.html): force LTR shell when locale is Arabic.
 * html lang=ar + dir=rtl stay for marketing/auth (landing.css, auth-login.css).
 * Admin only translates copy; Tabler layout stays LTR (Stripe/AWS console pattern).
 */
html[dir='rtl'] body:has(> .page),
html[lang='ar'] body:has(> .page),
html[dir='rtl'] body:has(> .page) > .modal,
html[lang='ar'] body:has(> .page) > .modal,
html[dir='rtl'] .page,
html[lang='ar'] .page {
  direction: ltr;
}

html[lang='ar'] body:has(> .page) {
  font-family: "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", var(--tblr-body-font-family, system-ui), sans-serif;
}

@media (min-width: 992px) {
  html[dir='rtl'] body:has(> .page) .page > .navbar.navbar-vertical.navbar-expand-lg ~ .page-wrapper,
  html[lang='ar'] body:has(> .page) .page > .navbar.navbar-vertical.navbar-expand-lg ~ .page-wrapper {
    margin-left: var(--tblr-navbar-vertical-width, 15rem);
    margin-right: 0;
  }

  html[dir='rtl'] body:has(> .page).sidebar-collapsed .navbar.navbar-vertical.navbar-expand-lg ~ .page-wrapper,
  html[lang='ar'] body:has(> .page).sidebar-collapsed .navbar.navbar-vertical.navbar-expand-lg ~ .page-wrapper {
    margin-left: var(--sidebar-rail-width, 4.5rem);
    margin-right: 0;
  }
}


[v-cloak] {
  display: none !important;
}

:root {
  --success: var(--tblr-success, #22c55e);
  --danger: var(--tblr-danger, #ef4444);
  --warning: var(--tblr-warning, #f59e0b);
  --primary: var(--tblr-primary, #3b82f6);
  /* Neural Noir accent � active chrome only (~5�10% UI) */
  --accent: #b8956c;
  --accent-soft: #d4c0a5;
}

body[data-bs-theme="dark"],
[data-bs-theme="dark"] {
  /* Layered comfort: canvas < sidebar < surface < raised */
  --canvas: #1b2436;
  --sidebar: #243044;
  --surface-raised: #323e54;

  --tblr-body-bg: var(--canvas);
  --tblr-bg-surface: #2a3548;
  --tblr-bg-surface-secondary: var(--surface-raised);
  --tblr-border-color: rgba(255, 255, 255, 0.14);
  --tblr-body-color: #f1f5f9;
  --tblr-secondary-color: #cbd5e1;
  --tblr-tertiary-color: #94a3b8;
  --tblr-emphasis-color: #ffffff;

  --text: var(--tblr-body-color);
  --muted: #94a3b8;
  --text-dim: #64748b;
  --surface-1: var(--canvas);
  --surface-2: #2a3548;
  --surface-3: var(--surface-raised);
  --border: rgba(255, 255, 255, 0.14);

  /* Flat form fields (Variation B) � inputs, combobox, fc-select */
  --xn-field-bg: var(--surface-raised);
  --xn-field-border: rgba(255, 255, 255, 0.14);
  --xn-field-hover-border: var(--accent-soft);
  --xn-field-focus-border: var(--accent);
  --xn-field-radius: 8px;
  --xn-field-min-h: 2.375rem;
  --xn-field-menu-bg: var(--surface-raised);
  --xn-field-option-hover: rgba(184, 149, 108, 0.14);
  --xn-field-option-active: rgba(184, 149, 108, 0.22);
}

/* Dark theme � unified flat inputs & native selects (before fancy-controls enhancement) */
body[data-bs-theme="dark"] .form-control:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-bs-theme="dark"] .form-select {
  background-color: var(--xn-field-bg);
  border: 1px solid var(--xn-field-border);
  border-radius: var(--xn-field-radius);
  color: var(--tblr-body-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-bs-theme="dark"] .form-control:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover:not(:disabled):not([readonly]),
body[data-bs-theme="dark"] .form-select:hover:not(:disabled) {
  border-color: var(--xn-field-hover-border);
}

body[data-bs-theme="dark"] .form-control:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
body[data-bs-theme="dark"] .form-select:focus {
  border-color: var(--xn-field-focus-border);
  box-shadow: 0 0 0 1px rgba(184, 149, 108, 0.2);
}

body[data-bs-theme="dark"] .form-control:disabled,
body[data-bs-theme="dark"] .form-select:disabled {
  background-color: var(--xn-field-bg);
  opacity: 0.5;
  cursor: not-allowed;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", var(--tblr-body-font-family, system-ui), sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Monospace pockets still need CJK fallbacks (mixed labels like Tick??). */
.table-account-id,
.placeholder-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", "Microsoft YaHei", "PingFang SC", monospace;
}

/* Shell layers � clear elevation, no muddy flat navy */
body[data-bs-theme="dark"] {
  background-color: var(--canvas);
}

body[data-bs-theme="dark"] .page {
  background-color: var(--canvas);
}

body[data-bs-theme="dark"] .navbar.navbar-vertical {
  background-color: var(--sidebar) !important;
  border-inline-end: 1px solid var(--border);
}

body[data-bs-theme="dark"] .page-wrapper {
  background-color: transparent;
}

body[data-bs-theme="dark"] .card {
  background-color: var(--surface-2);
  border-color: var(--border);
}

body[data-bs-theme="dark"] .navbar-vertical .nav-link.active {
  color: var(--accent-soft);
}

body[data-bs-theme="dark"] .navbar-vertical .nav-link.active .nav-link-icon {
  color: var(--accent);
}

.small,
.meta-label,
.kpi-label,
.stat-label {
  font-size: max(0.75rem, 12px);
}

.table td { color: var(--text); }
.table td.text-secondary,
.table td .text-secondary { color: var(--tblr-secondary-color); }
.table thead th {
  color: #e2e8f0;
  font-weight: 600;
}

/*
 * Strip Rows table system � Neural Noir (Superdesign Strip Rows Style)
 * Soft card strips; left accent optional (accounts / cloud access omit it).
 */
.table-strips,
.monitor-config-table,
.monitor-list-table,
.accounts-list-table,
.cloud-accounts-table,
.dashboard-table {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  margin-bottom: 0;
}

.table-strips thead th,
.monitor-config-table thead th,
.monitor-list-table thead th,
.accounts-list-table thead th,
.cloud-accounts-table thead th,
.dashboard-table thead th {
  background: transparent;
  border: none !important;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.15rem 0.65rem;
  white-space: nowrap;
}

.table-strips tbody tr:not(.table-strip-empty) > td,
.monitor-config-table tbody tr:not(:has(td[colspan])) > td,
.monitor-list-table tbody tr:not(:has(td[colspan])) > td,
.accounts-list-table tbody tr:not(:has(td[colspan])) > td,
.cloud-accounts-table tbody tr:not(:has(td[colspan])) > td,
.dashboard-table tbody tr > td {
  background: #2a3548;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.05rem 1.15rem;
  vertical-align: middle;
  box-shadow: none;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-strips tbody tr:not(.table-strip-empty) > td:first-child,
.monitor-config-table tbody tr:not(:has(td[colspan])) > td:first-child,
.monitor-list-table tbody tr:not(:has(td[colspan])) > td:first-child,
.accounts-list-table tbody tr:not(:has(td[colspan])) > td:first-child,
.cloud-accounts-table tbody tr:not(:has(td[colspan])) > td:first-child,
.dashboard-table tbody tr > td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px 0 0 12px;
  /* Default / unknown: muted accent (accounts / cloud override below) */
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.14);
}

.table-strips tbody tr:not(.table-strip-empty) > td:last-child,
.monitor-config-table tbody tr:not(:has(td[colspan])) > td:last-child,
.monitor-list-table tbody tr:not(:has(td[colspan])) > td:last-child,
.accounts-list-table tbody tr:not(:has(td[colspan])) > td:last-child,
.cloud-accounts-table tbody tr:not(:has(td[colspan])) > td:last-child,
.dashboard-table tbody tr > td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 12px 12px 0;
}

.monitor-config-table tbody tr.is-online > td:first-child,
.monitor-list-table tbody tr.is-online > td:first-child {
  box-shadow: inset 3px 0 0 var(--success);
}

.monitor-config-table tbody tr.is-offline > td:first-child,
.monitor-list-table tbody tr.is-offline > td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}

.monitor-config-table tbody tr.is-inactive > td:first-child,
.monitor-list-table tbody tr.is-inactive > td:first-child,
.monitor-config-table tbody tr.is-unknown > td:first-child,
.monitor-list-table tbody tr.is-unknown > td:first-child {
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.14);
}

/* ???? / ????????????? */
.accounts-list-table tbody tr:not(:has(td[colspan])) > td:first-child,
.cloud-accounts-table tbody tr:not(:has(td[colspan])) > td:first-child,
.accounts-list-table tbody tr.is-online > td:first-child,
.accounts-list-table tbody tr.is-offline > td:first-child,
.accounts-list-table tbody tr.is-inactive > td:first-child,
.accounts-list-table tbody tr.is-unknown > td:first-child {
  box-shadow: none;
}

.table-strips tbody tr:not(.table-strip-empty):hover > td,
.monitor-config-table tbody tr:not(:has(td[colspan])):hover > td,
.monitor-list-table tbody tr:not(:has(td[colspan])):hover > td,
.accounts-list-table tbody tr:not(:has(td[colspan])):hover > td,
.cloud-accounts-table tbody tr:not(:has(td[colspan])):hover > td,
.dashboard-table tbody tr:hover > td {
  background: rgba(255, 255, 255, 0.04);
}

.table-account-id {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #323e54;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.accounts-list-table .col-account code {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}

.table-broker {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  line-height: 1.25;
}

.table-broker__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-broker__sub {
  font-size: 0.7rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-status-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.table-status-cell.is-muted {
  color: var(--muted);
  font-weight: 500;
}

.table-status-cell.is-online {
  color: #22c55e;
}

.table-status-cell.is-offline {
  color: #ef4444;
}

.table-status-dot {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}

.table-status-dot.online {
  background: var(--success);
}

.table-status-dot.online::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: currentColor;
  color: #22c55e;
  opacity: 0.35;
  animation: sx-status-pulse 2s infinite;
}

@keyframes sx-status-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.4); opacity: 0; }
}

.table-status-dot.offline {
  background: var(--danger);
}

.table-status-dot.unknown {
  background: #475569;
}

/* Account status � soft outlined pills (prototype), not solid Tabler badges */
.sx-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
}

.sx-status-badge.is-on {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.22);
}

.sx-status-badge.is-off {
  color: #94a3b8;
  background: #323e54;
  border-color: rgba(255, 255, 255, 0.06);
}

.sx-status-badge.is-bad {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}

.sx-status-badge.is-warn {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}

/* Config lists (monitors / orders / drawdown / reports) � same flush shell as accounts */
.config-list-page .accounts-toolbar {
  justify-content: flex-end;
  margin-bottom: 0.55rem;
}

.config-list-hint {
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: 48rem;
  padding: 0 0.15rem;
}

.config-list-page .accounts-table-shell {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Match accounts list: no left connection accent bar on config strips */
.config-list-page .monitor-config-table tbody tr:not(:has(td[colspan])) > td:first-child,
.config-list-page .monitor-list-table tbody tr:not(:has(td[colspan])) > td:first-child,
.config-list-page .monitor-config-table tbody tr.is-online > td:first-child,
.config-list-page .monitor-list-table tbody tr.is-online > td:first-child,
.config-list-page .monitor-config-table tbody tr.is-offline > td:first-child,
.config-list-page .monitor-list-table tbody tr.is-offline > td:first-child,
.config-list-page .monitor-config-table tbody tr.is-inactive > td:first-child,
.config-list-page .monitor-list-table tbody tr.is-inactive > td:first-child,
.config-list-page .monitor-config-table tbody tr.is-unknown > td:first-child,
.config-list-page .monitor-list-table tbody tr.is-unknown > td:first-child {
  box-shadow: none;
}

body[data-bs-theme="dark"] .config-list-page .btn-outline-primary {
  --tblr-btn-color: var(--accent, #b8956c);
  --tblr-btn-border-color: rgba(184, 149, 108, 0.35);
  --tblr-btn-hover-bg: rgba(184, 149, 108, 0.1);
  --tblr-btn-hover-border-color: var(--accent, #b8956c);
  --tblr-btn-hover-color: var(--accent-soft, #d4c0a5);
  color: var(--accent, #b8956c);
  border-color: rgba(184, 149, 108, 0.35);
}

.monitor-access-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}

.monitor-access-badge__icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.monitor-access-badge.is-ea {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.22);
}

.monitor-access-badge.is-cloud {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

.table-icon-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}

/* Prototype: borderless ghost icon actions */
.table-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.table-icon-btn:hover {
  color: var(--accent, #b8956c);
  background: rgba(184, 149, 108, 0.1);
}

.table-icon-btn.is-warn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.table-icon-btn.is-success {
  color: #22c55e;
}

.table-icon-btn.is-success:hover {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.table-icon-btn.is-danger:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Account / cloud pages � gold outline ghosts + flush strip shell */
body[data-bs-theme="dark"] .accounts-page .btn-outline-primary,
body[data-bs-theme="dark"] .cloud-accounts-page .btn-outline-primary,
body[data-bs-theme="dark"] .monitor-config-table .btn-outline-primary,
body[data-bs-theme="dark"] .accounts-list-table .btn-outline-primary,
body[data-bs-theme="dark"] .cloud-accounts-table .btn-outline-primary {
  --tblr-btn-color: var(--accent, #b8956c);
  --tblr-btn-border-color: rgba(184, 149, 108, 0.35);
  --tblr-btn-hover-bg: rgba(184, 149, 108, 0.1);
  --tblr-btn-hover-border-color: var(--accent, #b8956c);
  --tblr-btn-hover-color: var(--accent-soft, #d4c0a5);
  color: var(--accent, #b8956c);
  border-color: rgba(184, 149, 108, 0.35);
}

.accounts-table-shell {
  background: transparent;
  border: none;
  box-shadow: none;
}

.accounts-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  padding: 0 0.15rem;
}

.accounts-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.accounts-toolbar-btn svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.monitor-config-table-wrap {
  padding: 0.15rem 0.15rem 0.55rem;
}

.accounts-table-wrap {
  padding: 0;
  max-width: 100%;
  /* Desktop should not show a phantom horizontal bar; allow scroll only when truly narrow. */
  overflow-x: auto;
}

.accounts-list-table tbody tr.is-inactive > td,
.accounts-list-table tbody tr.is-dimmed > td {
  opacity: 0.55;
}

/*
 * Card-flush tables: Tabler table-sm cells are only 0.25rem, so the first
 * column sits on the card edge. Give first/last cells breathing room.
 * :where() keeps specificity low so specialized tables (ea-magic-summary,
 * sim-trades, dd-report, live !important, etc.) still win.
 */
:where(.card > .table-responsive > .table) > :not(caption) > * > :first-child {
  padding-left: 1rem;
}
:where(.card > .table-responsive > .table) > :not(caption) > * > :last-child {
  padding-right: 1rem;
}

/* mobile-shell already insets .table-responsive via --mn-page-x; avoid double padding */
body.mobile-shell :where(.card > .table-responsive > .table.table-sm) > :not(caption) > * > :first-child {
  padding-left: 0.25rem;
}
body.mobile-shell :where(.card > .table-responsive > .table.table-sm) > :not(caption) > * > :last-child {
  padding-right: 0.25rem;
}
body.mobile-shell :where(.card > .table-responsive > .table:not(.table-sm)) > :not(caption) > * > :first-child {
  padding-left: 0.75rem;
}
body.mobile-shell :where(.card > .table-responsive > .table:not(.table-sm)) > :not(caption) > * > :last-child {
  padding-right: 0.75rem;
}

/* Monitor config list tables (orders, drawdown, etc.) � strip inset via .monitor-config-table-wrap below */

/* ?? ??????????? ?? */
.monitors-onboarding-tip {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background:
    radial-gradient(ellipse 80% 80% at 0% 0%, rgba(59, 130, 246, 0.1), transparent 55%),
    var(--tblr-bg-surface, #1e293b);
}

.monitors-onboarding-tip.hidden {
  display: none !important;
}

.monitors-onboarding-tip-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.monitors-onboarding-tip-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--tblr-body-color, #f1f5f9);
}

.monitors-onboarding-tip-desc,
.monitors-onboarding-tip-hint {
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--tblr-secondary-color, #cbd5e1);
  max-width: 44rem;
}

.monitors-onboarding-tip-hint {
  margin-bottom: 0;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.monitors-onboarding-tip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  flex-shrink: 0;
}

.clm-onboarding-tip {
  margin: 0.65rem 0.85rem 0;
}

.monitor-config-table {
  table-layout: fixed;
  width: 100%;
}

.monitor-config-table th,
.monitor-config-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.monitor-config-table .col-account {
  width: 8.5rem;
  white-space: nowrap;
}

.monitor-config-table .col-account.text-center {
  text-align: center;
}

.monitor-config-table .col-broker {
  width: 12%;
  white-space: nowrap;
}

.monitor-config-table .col-label {
  width: 16%;
  white-space: nowrap;
}

.monitor-config-table .col-status {
  width: 6.5rem;
}

.monitor-config-table .col-threshold {
  width: 5.5rem;
  white-space: nowrap;
}

.monitor-config-table .col-scope {
  width: 7.5rem;
}

.monitor-config-table .col-drawdown {
  width: 7.5rem;
  white-space: nowrap;
}

.monitor-config-table .col-period,
.monitor-config-table .col-notify {
  width: 8%;
  white-space: nowrap;
}

.monitor-config-table .col-time {
  width: 12rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.monitor-config-table .col-magic {
  width: 4.5rem;
  white-space: nowrap;
}

.monitor-config-table .col-actions {
  width: 6rem;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 1.15rem;
  white-space: nowrap;
  overflow: visible;
}

.monitor-config-table .col-actions .btn {
  min-width: 3rem;
}

/* ???????????????/???????????????? */
.monitor-list-table {
  table-layout: fixed;
  width: 100%;
  min-width: 52rem;
}

.monitor-list-table th,
.monitor-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.monitor-list-table thead th {
  padding-top: 0.35rem;
  padding-bottom: 0.45rem;
}

/* Access-method accents removed; accounts/cloud omit left bar (see Strip Rows above). */

.monitor-list-table tbody tr.monitor-row.is-highlight,
.clm-card.is-highlight {
  outline: 2px solid rgba(66, 153, 225, 0.55);
  outline-offset: 1px;
  background: rgba(66, 153, 225, 0.08);
  transition: background 0.4s ease, outline-color 0.4s ease;
}

.monitor-list-table .col-account {
  width: 6.25rem;
  white-space: nowrap;
}

.monitor-list-table .col-access {
  width: 4.5rem;
  white-space: nowrap;
}

.monitor-list-table .col-broker {
  width: auto;
}

.monitor-list-table .col-label {
  width: 6rem;
}

.monitor-list-table .col-status {
  width: 4.5rem;
  white-space: nowrap;
  text-align: center;
}

.monitor-list-table th.col-status,
.monitor-list-table td.col-status {
  text-align: center;
}

.monitor-list-table .col-notify {
  width: 4.5rem;
  white-space: nowrap;
}

.monitor-list-table .col-time {
  width: 7.25rem;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.monitor-list-table .col-alert-config {
  width: 5rem;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

.monitor-list-table .col-alert-config .btn-list {
  justify-content: center;
}

.monitor-list-table .col-actions {
  width: 11.5rem;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

.monitor-list-table .col-actions .btn-list {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.2rem;
}

.monitor-list-table .col-actions .btn {
  min-width: auto;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

/* ???????????? monitor-list-table ? 52rem ?????????????? */
.accounts-list-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
}

.accounts-list-table th,
.accounts-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounts-list-table thead th {
  text-align: center;
  letter-spacing: 0.04em;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.accounts-list-table thead th.col-account,
.accounts-list-table thead th.col-broker,
.accounts-list-table thead th.col-label {
  text-align: left;
}

.accounts-list-table tbody tr:not(:has(td[colspan])) > td {
  padding: 0.95rem 0.85rem;
}

.accounts-list-table .col-account {
  width: 13%;
}

.accounts-list-table .col-access {
  width: 13%;
}

.accounts-list-table .col-broker {
  width: 16%;
}

.accounts-list-table .col-label {
  width: 16%;
  color: var(--muted, #94a3b8);
  font-size: 0.875rem;
}

.accounts-list-table .col-label .monitor-label-unset {
  color: var(--muted, #94a3b8);
  opacity: 0.85;
}

.accounts-list-table .col-status {
  width: 11%;
  white-space: nowrap;
}

.accounts-list-table .col-actions {
  width: 9rem;
  overflow: hidden;
  white-space: nowrap;
}

@media (min-width: 769px) {
  .accounts-table-wrap.table-responsive {
    overflow-x: hidden;
  }
}

/* ???????3 ?????>3 ????? */
.accounts-page {
  display: block;
}

.accounts-page--with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  gap: 1rem;
  align-items: start;
}

.accounts-page-main {
  min-width: 0;
}

/* Soft Layered Gold � ???????? */
.accounts-connect-panel {
  margin-top: 1.25rem;
  padding: 1.75rem 1.75rem 1.6rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #2a3548;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.accounts-connect-panel.hidden {
  display: none !important;
}

.accounts-connect-panel-head {
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  text-align: center;
}

.accounts-connect-panel-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft, #d4c0a5);
}

.accounts-connect-panel-title {
  margin: 0 0 0.5rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text, #f1f5f9);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.accounts-connect-panel-desc {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted, #94a3b8);
}

.accounts-connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.accounts-connect-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem 1.25rem 1.25rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #323e54;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.18s ease;
}

.accounts-connect-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.accounts-connect-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: rgba(148, 163, 184, 0.35);
}

.accounts-connect-card--cloud::before {
  background: rgba(96, 165, 250, 0.65);
}

.accounts-connect-card--ea::before {
  background: rgba(34, 197, 94, 0.6);
}

.accounts-connect-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-left: 0.15rem;
}

.accounts-connect-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text, #f1f5f9);
}

.accounts-connect-card-badge {
  flex-shrink: 0;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.accounts-connect-card-badge--ea {
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.28);
}

.accounts-connect-card-desc {
  margin: 0;
  padding-left: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted, #94a3b8);
}

.accounts-connect-perks {
  margin: 0;
  padding: 0 0 0 0.15rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.accounts-connect-perks li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.accounts-connect-perks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.75);
}

.accounts-connect-card--ea .accounts-connect-perks li::before {
  background: rgba(34, 197, 94, 0.7);
}

.accounts-connect-card-actions {
  margin-top: auto;
  padding-top: 0.35rem;
}

.accounts-connect-card-actions > .btn:only-child,
.accounts-connect-card-actions > a.btn:only-child {
  width: 100%;
  justify-content: center;
}

.accounts-connect-card-actions.ea-access-actions > .btn,
.accounts-connect-card-actions.ea-access-actions > a.btn {
  width: auto;
}

/* Soft Layered Gold � primary connect CTA */
.btn-connect-gold,
body[data-bs-theme="dark"] .accounts-connect-card--cloud .btn-connect-gold,
body[data-bs-theme="dark"] a.btn-connect-gold {
  --tblr-btn-color: #1b2436;
  --tblr-btn-bg: var(--accent, #b8956c);
  --tblr-btn-border-color: var(--accent, #b8956c);
  --tblr-btn-hover-bg: var(--accent-soft, #d4c0a5);
  --tblr-btn-hover-border-color: var(--accent-soft, #d4c0a5);
  --tblr-btn-hover-color: #1b2436;
  --tblr-btn-active-bg: var(--accent-soft, #d4c0a5);
  --tblr-btn-active-color: #1b2436;
  color: #1b2436 !important;
  background: var(--accent, #b8956c) !important;
  border-color: var(--accent, #b8956c) !important;
  font-weight: 650;
  padding: 0.7rem 1rem;
  border-radius: 8px;
}

.btn-connect-gold:hover,
body[data-bs-theme="dark"] .accounts-connect-card--cloud .btn-connect-gold:hover {
  color: #1b2436;
  background: var(--accent-soft, #d4c0a5);
  border-color: var(--accent-soft, #d4c0a5);
}

.btn-connect-ea-ghost,
body[data-bs-theme="dark"] .accounts-connect-card--ea .btn-connect-ea-ghost {
  color: #94a3b8;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  font-weight: 600;
}

.btn-connect-ea-ghost:hover,
body[data-bs-theme="dark"] .accounts-connect-card--ea .btn-connect-ea-ghost:hover {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.06);
}

/* EA download modal (guided setup) */
.ea-download-modal .ea-dl-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.ea-download-modal .ea-dl-title-icon {
  color: var(--tblr-primary, #3b82f6);
  flex-shrink: 0;
}

.ea-download-modal .ea-dl-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* display:none keeps radios out of the 2-col grid while :checked + label still works */
.ea-download-modal .ea-dl-mode-cards .btn-check {
  display: none;
}

.ea-download-modal .ea-dl-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0;
  padding: 0.95rem 0.9rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: transparent;
  color: var(--text, #f1f5f9);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ea-download-modal .ea-dl-mode-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ea-download-modal .btn-check:checked + .ea-dl-mode-card {
  border-color: var(--tblr-primary, #3b82f6);
  border-width: 2px;
  padding: calc(0.95rem - 1px) calc(0.9rem - 1px) calc(0.85rem - 1px);
  background: rgba(59, 130, 246, 0.08);
}

.ea-download-modal .ea-dl-mode-badge {
  position: absolute;
  top: -0.55rem;
  right: 0.55rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--tblr-primary, #3b82f6);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.ea-download-modal .ea-dl-mode-icon {
  color: var(--muted, #94a3b8);
  margin-bottom: 0.25rem;
}

.ea-download-modal .btn-check:checked + .ea-dl-mode-card .ea-dl-mode-icon {
  color: var(--tblr-primary, #3b82f6);
}

.ea-download-modal .ea-dl-mode-name {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.3;
}

.ea-download-modal .ea-dl-mode-desc {
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--muted, #94a3b8);
}

.ea-download-modal .ea-dl-mt5-guide {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(21, 28, 40, 0.55);
}

.ea-download-modal .ea-dl-mt5-guide-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text, #f1f5f9);
}

.ea-download-modal .ea-dl-mt5-guide-title svg {
  color: var(--tblr-primary, #3b82f6);
  flex-shrink: 0;
}

.ea-download-modal .ea-dl-guide-subtitle {
  margin: 0.55rem 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
}

.ea-download-modal .ea-dl-guide-subtitle:first-of-type {
  margin-top: 0.15rem;
}

.ea-download-modal .ea-dl-mt5-guide-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted, #94a3b8);
  font-size: 0.75rem;
  line-height: 1.55;
}

.ea-download-modal .ea-dl-mt5-guide-steps li + li {
  margin-top: 0.2rem;
}

.ea-download-modal .ea-dl-ex5-chip {
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  margin: 0 0.15rem;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  font-weight: 650;
  font-size: inherit;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.ea-download-modal .ea-dl-ex5-chip:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.7);
  color: #bfdbfe;
  text-decoration: none;
}

.ea-download-modal .ea-dl-mt4-row {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
}

.ea-download-modal .ea-dl-mt4-link {
  color: var(--tblr-primary, #3b82f6);
  text-decoration: none;
  font-weight: 500;
}

.ea-download-modal .ea-dl-mt4-link:hover {
  text-decoration: underline;
}

.ea-download-modal .ea-dl-manual-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8 !important;
  text-decoration: none;
  padding-left: 0;
}

.ea-download-modal .ea-dl-manual-link:hover {
  color: #f1f5f9 !important;
}

@media (max-width: 420px) {
  .ea-download-modal .ea-dl-mode-cards {
    grid-template-columns: 1fr;
  }
}

/* EA guide modal */
.ea-guide-modal .modal-body {
  padding-top: 0.85rem;
}

.ea-guide-scenarios {
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a3548;
}

.ea-guide-scenarios-title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-soft, #d4c0a5);
}

.ea-guide-scenarios ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.ea-guide-scenarios-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted, #94a3b8);
}

.ea-guide-steps-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text, #f1f5f9);
}

.ea-guide-modal .ea-access-step-num {
  color: #1b2436;
  background: var(--accent, #b8956c);
  border-color: transparent;
}

/* ????????????? */
.accounts-connect-rail {
  position: sticky;
  top: 1rem;
  padding: 1rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #2a3548;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.28);
}

.accounts-connect-rail.hidden {
  display: none !important;
}

.accounts-connect-rail-head {
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
}

.accounts-connect-rail-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-soft, #d4c0a5);
}

.accounts-connect-rail-title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text, #f8fafc);
}

.accounts-connect-rail-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #94a3b8;
}

.accounts-connect-rail-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 0.5rem;
  padding: 0.7rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.42);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.accounts-connect-rail-item:last-child {
  margin-bottom: 0;
}

.accounts-connect-rail-item:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}

.accounts-connect-rail-item--cloud {
  border-color: rgba(66, 153, 225, 0.35);
}

.accounts-connect-rail-item--cloud:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.55);
}

.accounts-connect-rail-item--ea {
  border-color: rgba(47, 179, 68, 0.3);
}

.accounts-connect-rail-item--ea:hover {
  background: rgba(47, 179, 68, 0.12);
  border-color: rgba(74, 222, 128, 0.5);
}

.accounts-connect-rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.16);
}

.accounts-connect-rail-item--ea .accounts-connect-rail-icon {
  color: #86efac;
  background: rgba(47, 179, 68, 0.16);
}

.accounts-connect-rail-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.accounts-connect-rail-name {
  font-size: 0.86rem;
  font-weight: 650;
  color: #f1f5f9;
}

.accounts-connect-rail-meta {
  font-size: 0.72rem;
  line-height: 1.3;
  color: #94a3b8;
}

.accounts-connect-rail-arrow {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.accounts-connect-rail-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.accounts-connect-rail--mobile {
  position: static;
  margin: 0.85rem;
  box-shadow: none;
}

.accounts-connect-rail--mobile .accounts-connect-rail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.accounts-connect-rail--mobile .accounts-connect-rail-item {
  margin: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

@media (max-width: 1100px) {
  .accounts-page--with-rail {
    grid-template-columns: 1fr;
  }

  .accounts-connect-rail:not(.accounts-connect-rail--mobile) {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 0.65rem;
    align-items: center;
  }

  .accounts-connect-rail:not(.accounts-connect-rail--mobile) .accounts-connect-rail-head {
    margin: 0;
  }

  .accounts-connect-rail:not(.accounts-connect-rail--mobile) .accounts-connect-rail-item {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .accounts-list-table {
    min-width: 36rem;
  }

  .accounts-connect-grid {
    grid-template-columns: 1fr;
  }

  .accounts-connect-panel {
    margin-top: 0.85rem;
    padding: 1rem;
  }

  .accounts-connect-rail--mobile .accounts-connect-rail-row {
    grid-template-columns: 1fr;
  }
}

/* ?? ??????????????flush shell + Soft Gold? ?? */
.cloud-accounts-page {
  display: block;
}

.cloud-accounts-page .accounts-page-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cloud-status-banner {
  margin-bottom: 0;
  border: 1px solid transparent;
}

.cloud-status-banner.is-active {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
}

.cloud-status-banner.is-failed {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.cloud-status-banner.is-done {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.28);
}

.cloud-seat-meter {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--surface-2, #2a3548);
}

.cloud-seat-meter.hidden {
  display: none !important;
}

.cloud-seat-meter.is-full {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(
    160deg,
    rgba(245, 158, 11, 0.1) 0%,
    var(--surface-2, #2a3548) 72%
  );
}

.cloud-seat-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cloud-seat-meter-title {
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.cloud-seat-meter-cta {
  flex-shrink: 0;
  min-height: 1.85rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.cloud-seat-meter-fraction {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--text, #f1f5f9);
}

.cloud-seat-meter-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.cloud-seat-meter-track.is-unlimited {
  display: none;
}

.cloud-seat-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--accent, #b8956c);
  transition: width 0.35s ease;
}

.cloud-seat-meter-fill.is-empty {
  background: rgba(148, 163, 184, 0.25);
}

.cloud-seat-meter.is-full .cloud-seat-meter-fill {
  background: var(--warning, #f59e0b);
}

.cloud-seat-meter-meta {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.cloud-seat-meter-dot {
  opacity: 0.45;
}

.cloud-seat-banner {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.cloud-seat-banner.hidden {
  display: none !important;
}

.cloud-seat-banner-actions {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.cloud-seat-banner-hint {
  font-size: 0.8rem;
  opacity: 0.9;
}

.cloud-seat-tip {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.cloud-seat-tip.is-full {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.cloud-seat-tip.hidden {
  display: none !important;
}

.cloud-status-banner-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.cloud-status-banner-body {
  margin-top: 0.15rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.cloud-empty-card {
  margin-top: 0.25rem;
}

.cloud-empty-card.hidden {
  display: none !important;
}

.cloud-empty-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: center;
  max-width: 58rem;
  margin: 0 auto;
}

.cloud-empty-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.cloud-empty-title {
  margin: 0 0 0.65rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text, #f1f5f9);
}

.cloud-empty-desc {
  margin: 0 0 1.35rem;
  max-width: 26rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted, #94a3b8);
}

.cloud-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
}

.cloud-empty-alt-link {
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--muted, #94a3b8);
  text-decoration: none;
}

.cloud-empty-alt-link:hover {
  color: var(--accent-soft, #d4c0a5);
}

.cloud-empty-aside {
  min-width: 0;
}

.cloud-empty-panel {
  height: 100%;
  margin: 0;
}

.cloud-empty-panel-label {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft, #d4c0a5);
}

.cloud-empty-benefits {
  gap: 0.75rem;
}

.cloud-empty-benefits li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding-left: 0;
}

.cloud-empty-benefits li::before {
  display: none;
}

.cloud-empty-benefit-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text, #f1f5f9);
  line-height: 1.35;
}

.cloud-empty-benefit-desc {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted, #94a3b8);
  font-weight: 400;
}

.cloud-empty-constraints {
  margin-top: 0.85rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cloud-empty-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-empty-perks li {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 550;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cloud-list-toolbar {
  gap: 0.65rem;
}

.cloud-table-empty td {
  padding: 2.5rem 1.25rem !important;
  border-bottom: none !important;
}

.cloud-table-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted, #94a3b8);
  font-size: 0.875rem;
}

.cloud-table-empty-inner svg {
  opacity: 0.55;
}

.cloud-onboard-strip {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #2a3548;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.cloud-onboard-strip.hidden {
  display: none !important;
}

.cloud-onboard-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  color: var(--accent-soft, #d4c0a5);
  background: rgba(184, 149, 108, 0.12);
  border: 1px solid rgba(184, 149, 108, 0.28);
}

.cloud-onboard-copy {
  flex: 1;
  min-width: 0;
}

.cloud-onboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.cloud-onboard-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tblr-body-color, #f1f5f9);
}

.cloud-onboard-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-onboard-perks li {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--muted, #94a3b8);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cloud-onboard-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted, #94a3b8);
}

.cloud-onboard-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.cloud-accounts-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  margin-bottom: 0;
}

.cloud-accounts-table thead th.col-account,
.cloud-accounts-table thead th.col-server {
  text-align: left;
}

.cloud-accounts-table thead th.col-status,
.cloud-accounts-table thead th.col-sync {
  text-align: center;
}

.cloud-accounts-table .col-account {
  width: 16%;
}

.cloud-account-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.cloud-accounts-table .col-server {
  width: 22%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-accounts-table .col-status {
  width: 12%;
  text-align: center;
  vertical-align: middle;
}

.cloud-accounts-table .col-sync {
  width: 22%;
  text-align: center;
  vertical-align: middle;
}

.cloud-status-block,
.cloud-sync-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}

.cloud-status-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cloud-status-meta {
  font-size: 0.8rem;
  color: var(--tblr-secondary-color, #cbd5e1);
  line-height: 1.35;
  text-align: center;
}

.cloud-status-meta.is-danger {
  color: #fca5a5;
}

.cloud-status-meta.is-warn {
  color: #fbbf24;
}

.cloud-sync-block .progress {
  height: 0.35rem;
  width: 100%;
  max-width: 12rem;
  background: rgba(148, 163, 184, 0.16);
}

.cloud-accounts-table tr.is-failed {
  background: rgba(239, 68, 68, 0.04);
}

.cloud-accounts-table .col-actions {
  width: 11rem;
  white-space: nowrap;
  overflow: visible;
}

.cloud-accounts-table .col-actions .btn-list {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cloud-accounts-table .col-actions .btn {
  min-width: auto;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.cloud-form-trust {
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

#add-cloud-dialog {
  --xn-field-min-h: 2.25rem;
}

#add-cloud-dialog .modal-dialog {
  max-width: 26rem;
}

#add-cloud-dialog .modal-header {
  padding: 1rem 1.25rem 0.85rem;
}

#add-cloud-dialog .modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible;
  padding: 0.25rem 1.25rem 0.35rem;
}

#add-cloud-dialog .modal-footer {
  padding: 0.65rem 1.25rem 0.95rem;
}

#add-cloud-dialog .cloud-field {
  margin-bottom: 0;
}

#add-cloud-dialog .cloud-field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}

#add-cloud-dialog .cloud-field-head .form-label {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

#add-cloud-dialog .form-label.required::after {
  content: " *";
  color: var(--tblr-danger, #ef4444);
}

#add-cloud-dialog .cloud-field-hint {
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 450;
  color: #64748b;
}

#add-cloud-dialog .cloud-field-hint--warn {
  color: #f0b45a;
}

#add-cloud-dialog .cloud-field-extra {
  margin-top: 0.55rem;
}

#add-cloud-dialog .cloud-field-check {
  margin: 0.15rem 0 0;
  min-height: auto;
  padding-left: 1.5rem;
}

#add-cloud-dialog .cloud-field-check .form-check-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

#add-cloud-dialog .cloud-combobox {
  position: relative;
}

#add-cloud-dialog .cloud-combobox__field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--xn-field-min-h);
  border: 1px solid var(--xn-field-border);
  border-radius: var(--xn-field-radius);
  background-color: var(--xn-field-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#add-cloud-dialog .cloud-combobox__field:hover:not(:has(.cloud-combobox__input:disabled)) {
  border-color: var(--xn-field-hover-border);
}

#add-cloud-dialog .cloud-combobox__field:focus-within:not(:has(.cloud-combobox__input:disabled)) {
  border-color: var(--xn-field-focus-border);
  box-shadow: 0 0 0 1px rgba(184, 149, 108, 0.2);
}

#add-cloud-dialog .cloud-combobox__field:has(.cloud-combobox__input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

#add-cloud-dialog .cloud-combobox__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding-left: 0.75rem;
  color: #64748b;
  pointer-events: none;
}

#add-cloud-dialog .cloud-combobox__field:focus-within:not(:has(.cloud-combobox__input:disabled)) .cloud-combobox__icon {
  color: #94a3b8;
}

#add-cloud-dialog .cloud-combobox__input {
  flex: 1;
  min-width: 0;
  min-height: calc(var(--xn-field-min-h) - 2px);
  padding: 0.45rem 0.55rem 0.45rem 0.45rem;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.875rem;
  color: var(--tblr-body-color);
}

#add-cloud-dialog .cloud-combobox__input:focus {
  box-shadow: none !important;
}

#add-cloud-dialog .cloud-combobox__input:disabled {
  opacity: 1;
  cursor: not-allowed;
}

#add-cloud-dialog .cloud-combobox__input::placeholder {
  color: #64748b;
}

#add-cloud-dialog .cloud-combobox__affix {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.55rem;
  padding-right: 0.75rem;
  pointer-events: none;
}

#add-cloud-dialog .cloud-combobox__divider {
  width: 1px;
  height: 1rem;
  background: rgba(255, 255, 255, 0.1);
}

#add-cloud-dialog .cloud-combobox__input::-webkit-search-cancel-button {
  display: none;
}

#add-cloud-dialog .cloud-combobox__input::-webkit-search-decoration {
  display: none;
}

#add-cloud-dialog .cloud-combobox__caret {
  flex-shrink: 0;
  color: #64748b;
}

#add-cloud-dialog .cloud-combobox__spinner {
  display: none;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--accent, #b8956c);
  border-radius: 50%;
  animation: cloud-combobox-spin 0.65s linear infinite;
}

#add-cloud-dialog .cloud-combobox.is-loading .cloud-combobox__spinner {
  display: inline-block;
}

#add-cloud-dialog .cloud-combobox.is-loading .cloud-combobox__caret {
  display: none;
}

#add-cloud-dialog .cloud-combobox.is-loading .cloud-combobox__input {
  cursor: wait;
}

@keyframes cloud-combobox-spin {
  to {
    transform: rotate(360deg);
  }
}

#add-cloud-dialog .cloud-field > .form-control,
#add-cloud-dialog .cloud-field-extra {
  min-height: var(--xn-field-min-h);
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

#add-cloud-dialog .cloud-combobox__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid var(--xn-field-border);
  border-radius: var(--xn-field-radius);
  background: var(--xn-field-menu-bg);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}

#add-cloud-dialog .cloud-combobox__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.42rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tblr-body-color);
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

#add-cloud-dialog .cloud-combobox__option:hover,
#add-cloud-dialog .cloud-combobox__option.is-active,
#add-cloud-dialog .cloud-combobox__option.is-highlight {
  background: var(--xn-field-option-hover);
  color: #fff;
}

#add-cloud-dialog .cloud-combobox__option.is-active {
  background: var(--xn-field-option-active);
  font-weight: 650;
}

#add-cloud-dialog .cloud-combobox__empty {
  padding: 0.45rem 0.6rem;
  color: var(--tblr-secondary, #94a3b8);
  font-size: 0.8rem;
}

#add-cloud-dialog #c-server-custom:not(.hidden) {
  display: block;
}

/* iOS Safari / WebKit: `backdrop-filter` on the full-viewport `position:fixed`
   `.modal` (Tabler `.modal-blur`) re-rasterizes everything behind it. Background
   animations (status pulses, auth equity float, live pending blinks) can stall
   the compositor so the modal looks fine but ignores taps. Disable blur on ALL
   `.modal.modal-blur` — `.modal-backdrop` dim is enough. Do not rely on
   (pointer:coarse) / body-class allowlists: login, live-mobile, dashboard-mobile,
   and dialogs.js all use modal-blur outside list-mobile/mobile-shell. */
.modal.modal-blur {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 991.98px) {
  .cloud-empty-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cloud-empty-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 767.98px) {
  .cloud-empty-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cloud-empty-actions .btn-connect-gold {
    width: 100%;
  }

  .cloud-empty-alt-link {
    text-align: center;
  }

  .cloud-accounts-table {
    min-width: 36rem;
  }

  .cloud-accounts-table .col-actions {
    width: 10rem;
  }

  .cloud-onboard-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cloud-onboard-cta {
    width: 100%;
  }
}

.monitor-label-unset,
.monitor-na {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .monitor-list-table {
    min-width: 0;
  }

  .monitor-list-table .col-actions {
    width: 10rem;
  }
}

.hidden { display: none !important; }

/* Inline "?" help � used next to form labels across the app */
.form-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.form-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  vertical-align: middle;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.form-help-btn:hover,
.form-help-btn:focus-visible {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(59, 130, 246, 0.14);
  outline: none;
}

/* ????????? */
#active-trades-empty:not(.hidden),
#dashboard-deals-empty:not(.hidden),
#ea-history-empty:not(.hidden),
#ea-cards-empty:not(.hidden) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 6rem;
  padding: 2rem 1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
}

body.dashboard-page #ea-overview-section .card-body:has(#ea-cards-empty:not(.hidden)) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
}

body.dashboard-page #ea-overview-section .card-body:has(#ea-cards-empty:not(.hidden)) #ea-overview-kpis,
body.dashboard-page #ea-overview-section .card-body:has(#ea-cards-empty:not(.hidden)) #ea-cards {
  display: none !important;
}

/* EA??/????? � ???? JS ???? flex */
.ea-orders-col--empty {
  display: flex;
  flex-direction: column;
  min-height: 11rem;
}

#ea-positions-empty:not(.hidden),
#ea-pending-empty:not(.hidden) {
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 8.5rem;
  padding: 1.75rem 1rem;
  margin: 0;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
  text-align: center;
}

.positive, .text-profit { color: var(--success) !important; }
.negative, .text-loss { color: var(--danger) !important; }
.dd-danger { color: var(--danger) !important; }
.dd-ok { color: var(--success) !important; }

.col-drawdown .is-ok { color: var(--success) !important; font-weight: 600; }
.col-drawdown .is-mild { color: #e6b422 !important; font-weight: 600; }
.col-drawdown .is-warn { color: #f59f00 !important; font-weight: 600; }
.col-drawdown .is-bad { color: var(--danger) !important; font-weight: 600; }
.col-drawdown .is-muted { color: var(--muted) !important; }

.text-online { color: var(--success); }
.text-offline { color: var(--danger); }
.text-unknown { color: var(--warning); }

.hint-inline { font-size: 0.8rem; color: var(--muted); }

/* ?? Report pages ?? */
.report-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.report-live-badge {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-wrap: wrap;
}

.report-live-badge[data-tip] {
  cursor: help;
}

.report-tz-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#report-date-filter-wrap {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

/*
 * Date popover hangs below the filter row over the equity card/chart.
 * A low z-index here traps .fc-date-popover (z-index 1200) in a weak
 * stacking context, so the bottom actions (今天 / 清除) get covered and
 * clicks hit the chart instead. Lift the wrap + toolbar while open.
 */
#report-date-filter-wrap:has(.fc-date.is-open),
#report-date-filter-wrap:has(.fc-select.is-open) {
  z-index: 1400;
}

#report-meta.report-toolbar:has(.fc-date.is-open),
#report-meta.report-toolbar:has(.fc-select.is-open) {
  position: relative;
  z-index: 1300;
  overflow: visible;
}

.report-toolbar,
.report-toolbar > .card-body,
.report-filter-row {
  overflow: visible;
}

#report-date-filter-wrap.filter-active .report-date-input {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.daily-calendar-day-selected {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: -1px;
}

.report-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: report-pulse 2s ease-in-out infinite;
}

@keyframes report-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.report-live-badge.load-stale .report-live-dot { background: var(--warning); }

.report-toolbar .report-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.35rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat-grid-dd {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

/* Drawdown report tables: keep date/time column off the card edge */
.dd-report-table thead th:first-child,
.dd-report-table tbody td:first-child {
  padding-left: 1rem;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--tblr-border-radius-lg, 8px);
  padding: 0.85rem 1rem;
}

.stat-card:has(.dd-danger) {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}

.stat-card--history {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.06);
}

.stat-card--history .stat-value { color: #fbbf24; }

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.stat-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.stat-value.dd-danger { color: var(--danger); }

.subsection-title {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.today-curve-block {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.history-charts-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-body.history-charts-stack {
  padding-top: 0.7rem;
  padding-bottom: 0.85rem;
}

.history-charts-stack > .egm-section-head {
  margin-bottom: 0;
}

.history-charts-stack > .egm-section-head .egm-section-hint:empty {
  display: none;
}

.history-curve-block,
.history-bar-block {
  padding-top: 0;
}

.history-period-label {
  margin: 0 0 0.3rem;
  line-height: 1.35;
}

.history-period-label:empty {
  display: none;
}

.history-curve-block > .subsection-title {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.history-bar-block > .subsection-title {
  margin-bottom: 0.45rem;
}

.history-curve-hint {
  margin: 0 0 0.4rem;
}

.report-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.filter-period-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.symbol-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.symbol-filter-select {
  width: auto;
  min-width: 10rem;
}

.report-date-input {
  width: auto;
  min-width: 8.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  border: 1px solid var(--border-color, #d9dbde);
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text, inherit);
  color-scheme: dark;
  cursor: pointer;
}

.report-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
}

.history-period-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

.period-tab {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.period-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.period-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--canvas, #1b2436);
  font-weight: 600;
}

/* ?? EA Magic Pill Filter ?? */
.ea-magic-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ea-magic-pill {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ea-magic-pill:hover {
  color: var(--text);
  border-color: var(--primary);
}

.ea-magic-pill.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
  color: var(--text);
}

/* ?? EA Summary Card Grid ?? */
.ea-summary-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.ea-summary-card {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ea-summary-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ea-summary-card-bar {
  width: 4px;
  flex-shrink: 0;
  background: var(--muted);
  transition: background 0.2s;
}

.ea-summary-card-bar.positive { background: rgba(34, 197, 94, 0.7); }
.ea-summary-card-bar.negative { background: rgba(239, 68, 68, 0.6); }

.ea-summary-card-body {
  flex: 1;
  padding: 0.85rem 1rem;
  min-width: 0;
}

.ea-summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ea-summary-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ea-summary-card-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.ea-summary-card-profit {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ea-summary-card-profit.positive { color: rgba(34, 197, 94, 0.9); }
.ea-summary-card-profit.negative { color: rgba(239, 68, 68, 0.85); }

.ea-summary-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ea-summary-card-stats strong { color: var(--text); }

.ea-summary-card-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.ea-summary-card-magics {
  font-size: 0.7rem;
  color: var(--muted);
}

.ea-summary-card-magics code {
  font-size: 0.7rem;
  background: transparent;
  color: var(--muted);
}

.ea-summary-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ea-summary-card-badge {
  font-variant-numeric: tabular-nums;
}

.ea-summary-card-profit {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ?? EA Orders Split Layout (vertical stack: ?? ? ??) ?? */
.ea-orders-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.ea-orders-col {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.18);
}

.ea-orders-positions { box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.55); }
.ea-orders-pending { box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.55); }

.ea-orders-col .report-orders-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  background: #1b2436;
}

.ea-orders-positions .report-orders-block-header {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent 55%), #1b2436;
}

.ea-orders-pending .report-orders-block-header {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent 55%), #1b2436;
}

.ea-orders-col .table-responsive,
.ea-orders-table-wrap {
  padding: 0.35rem 0.55rem 0.55rem;
}

.ea-orders-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.ea-orders-dot--pos {
  background: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
}

.ea-orders-dot--pend {
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.ea-orders-col .report-orders-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.ea-orders-pending .report-orders-subtitle {
  color: #fde68a;
}

.ea-orders-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
}

.ea-orders-count-badge:not(:empty) {
  display: inline-flex;
}

.ea-orders-positions .ea-orders-count-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.ea-orders-pending .ea-orders-count-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* EA orders tables � fixed layout + aligned numeric columns */
.ea-orders-table {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0 0.4rem;
  font-size: 0.8125rem;
}

.ea-orders-table thead th,
.ea-orders-table tbody td {
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-orders-table thead th {
  padding-top: 0.35rem !important;
  padding-bottom: 0.4rem !important;
}

.ea-orders-table tbody td {
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

.ea-orders-table .col-num,
.ea-orders-table th.col-num,
.ea-orders-table td.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.ea-orders-table .live-pending-signal-col,
.ea-orders-table th.live-pending-signal-col,
.ea-orders-table td.live-pending-signal-col {
  width: 2.1rem;
  min-width: 2.1rem;
  max-width: 2.1rem;
  padding-left: 0.45rem !important;
  padding-right: 0.15rem !important;
  text-align: center;
  overflow: visible;
}

/* Strip first/last radii must not skew column geometry */
.ea-orders-table tbody tr > td:first-child {
  border-radius: 10px 0 0 10px;
  box-shadow: none;
}

.ea-orders-table tbody tr > td:last-child {
  border-radius: 0 10px 10px 0;
}

/* Stable widths only � avoid nth-child (cross-account cols toggle with .hidden) */
.ea-orders-table--pending .live-pending-signal-col { width: 2.1rem; }
.ea-orders-table--positions th:not(.col-num),
.ea-orders-table--pending th:not(.col-num):not(.live-pending-signal-col) {
  text-align: left;
}

/* Pending signal dots (report page loads app.css only) */
.ea-orders-col .live-pending-signal {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.ea-orders-col .live-pending-signal--buy {
  background: var(--success);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 6px rgba(34, 197, 94, 0.35);
}

.ea-orders-col .live-pending-signal--sell {
  background: var(--danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3), 0 0 6px rgba(239, 68, 68, 0.35);
}

.ea-orders-col .live-pending-signal--neutral {
  background: var(--warning);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3), 0 0 6px rgba(245, 158, 11, 0.3);
}

.ea-orders-col .live-pending-signal--idle { opacity: 0.42; }

.ea-orders-col .live-pending-signal--near.live-pending-signal--buy {
  opacity: 1;
  animation: live-pending-signal-blink var(--pending-blink-ms, 1.2s) ease-in-out infinite;
}

.ea-orders-col .live-pending-signal--near.live-pending-signal--sell {
  opacity: 1;
  animation: live-pending-signal-blink-sell var(--pending-blink-ms, 1.2s) ease-in-out infinite;
}

.ea-orders-col .live-pending-signal--near.live-pending-signal--neutral {
  opacity: 1;
  animation: live-pending-signal-blink-warn var(--pending-blink-ms, 1.2s) ease-in-out infinite;
}

@keyframes live-pending-signal-blink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45), 0 0 10px rgba(34, 197, 94, 0.75); }
  50% { opacity: 0.25; transform: scale(0.72); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 0 2px rgba(34, 197, 94, 0.2); }
}

@keyframes live-pending-signal-blink-sell {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45), 0 0 10px rgba(239, 68, 68, 0.75); }
  50% { opacity: 0.25; transform: scale(0.72); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15), 0 0 2px rgba(239, 68, 68, 0.2); }
}

@keyframes live-pending-signal-blink-warn {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45), 0 0 10px rgba(245, 158, 11, 0.65); }
  50% { opacity: 0.25; transform: scale(0.72); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 0 2px rgba(245, 158, 11, 0.2); }
}

.ea-orders-col .live-spread-cell {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  color: rgba(251, 191, 36, 0.85);
}

.ea-orders-col .live-spread-cell--near {
  display: inline-block;
  padding: 0 0.28rem;
  border-radius: 3px;
  font-weight: 700;
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

/* ?? EA Daily Calendar Nav & Legend ?? */
.ea-daily-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ea-daily-calendar-month-label {
  font-size: 1rem;
  font-weight: 600;
  min-width: 8rem;
  text-align: center;
}

.ea-daily-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.ea-daily-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.ea-daily-legend-dot.pos { background: rgba(34, 197, 94, 0.55); }
.ea-daily-legend-dot.neg { background: rgba(239, 68, 68, 0.5); }
.ea-daily-legend-dot.zero { background: var(--muted); }

.daily-day-trades {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1;
}

/* ?? Drawdown curves ?? */
.dd-curve-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
  padding: 0.55rem 0.5rem;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.4) 0%, transparent 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}

.dd-curve-wrap--today,
.dd-curve-wrap--history {
  min-height: 180px;
}

.dd-curve-wrap--bars {
  min-height: 128px;
  padding-bottom: 0.4rem;
}

.dd-daily-bar-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0.15rem;
  width: 100%;
  height: 128px;
  z-index: 0;
}

.dd-daily-bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: rgba(212, 192, 165, 0.4);
  transition: opacity 0.15s ease;
  z-index: 2;
}

.dd-daily-bar.is-breach {
  background: rgba(239, 68, 68, 0.68);
}

.dd-daily-bar:hover {
  opacity: 0.95;
}

.dd-daily-bar-threshold {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(239, 68, 68, 0.45);
  pointer-events: none;
  z-index: 1;
}

.dd-daily-bar-threshold-label {
  position: absolute;
  right: 0;
  top: -1.1rem;
  font-size: 0.625rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--danger, #ef4444);
  opacity: 0.85;
}

.dd-daily-bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.dd-curve-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--tblr-bg-surface, #111827);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
}

td.dd-danger { color: var(--danger); font-weight: 600; }

/* ?? EA equity chart ?? */
.ea-equity-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.ea-equity-kpi-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--tblr-border-radius-lg, 8px);
  padding: 0.7rem 0.85rem;
}

.ea-equity-kpi-card--hero {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

.ea-equity-kpi-card--dd {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.ea-equity-kpi-label { display: block; font-size: 0.76rem; color: var(--muted); margin-bottom: 0.25rem; }
.ea-equity-kpi-value { font-size: 1.1rem; font-weight: 700; }
.ea-equity-kpi-value.positive { color: var(--success); }
.ea-equity-kpi-value.negative { color: var(--danger); }

/* ?? EA global KPI overview ?? */
.ea-global-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
}

.ea-global-kpi-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--tblr-border-radius-lg, 8px);
  padding: 0.8rem 1rem;
}

.ea-global-kpi-card--hero {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

.ea-global-kpi-label { display: block; font-size: 0.76rem; color: var(--muted); margin-bottom: 0.3rem; }
.ea-global-kpi-value { font-size: 1.2rem; font-weight: 700; }
.ea-global-kpi-value.positive { color: var(--success); }
.ea-global-kpi-value.negative { color: var(--danger); }

.ea-global-empty-state {
  padding: 1.25rem 0.5rem 0.75rem;
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.ea-global-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.ea-rating-help-wrap {
  position: relative;
  flex-shrink: 0;
}

.ea-rating-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ea-rating-help-btn:hover,
.ea-rating-help-btn[aria-expanded="true"] {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.ea-rating-help-popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 1080;
  width: min(20rem, calc(100vw - 2rem));
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #1a2230;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.ea-rating-help-popover.hidden {
  display: none !important;
}

.ea-rating-help-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #eef2f8;
}

.ea-rating-help-intro {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.ea-rating-help-list {
  margin: 0 0 0.55rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.ea-rating-help-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.45rem;
  align-items: start;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ea-rating-help-level {
  font-weight: 700;
}

.ea-rating-help-level--excellent { color: #eab308; }
.ea-rating-help-level--good { color: #22c55e; }
.ea-rating-help-level--fair { color: #60a5fa; }
.ea-rating-help-level--poor { color: #f87171; }

.ea-rating-help-desc {
  color: #d5dde8;
}

.ea-rating-help-note {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
}

.col-deal-time {
  font-size: 0.78rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.ea-equity-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 220px;
  padding: 0.5rem 0.25rem;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.55) 0%, rgba(15, 20, 25, 0.15) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ea-equity-tooltip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  min-width: 148px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.97);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.ea-equity-tooltip-title { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; }
.ea-equity-tooltip-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; margin-bottom: 0.2rem; }
.ea-equity-tooltip-row strong.positive { color: var(--success); }
.ea-equity-tooltip-row strong.negative { color: var(--danger); }
.ea-equity-tooltip-meta { margin-top: 0.25rem; font-size: 0.74rem; color: var(--muted); }

/* ?? Notifier form ?? */
.notifier-panel { margin-bottom: 0.5rem; }

.notifier-details {
  border: 1px solid var(--border);
  border-radius: var(--tblr-border-radius, 6px);
  overflow: hidden;
}

.notifier-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
  user-select: none;
  list-style: none;
}

.notifier-details > summary::-webkit-details-marker { display: none; }
.notifier-details > summary::before { content: '?'; margin-right: 0.4rem; font-size: 0.75rem; transition: transform 0.15s; }
.notifier-details[open] > summary::before { transform: rotate(90deg); }

.notifier-tag {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.notifier-tag-custom { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.notifier-details-body { padding: 0.65rem 0.75rem; border-top: 1px solid var(--border); }
.notifier-inline-hint { margin: 0 0 0.65rem; font-size: 0.8rem; color: var(--muted); }
.notifier-inline-hint.warn { color: var(--warning); }

.placeholder-details { margin: 0.25rem 0 0.5rem; }
.placeholder-details > summary { font-size: 0.8rem; color: var(--muted); cursor: pointer; margin-bottom: 0.35rem; }
.placeholder-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.placeholder-chip {
  width: auto;
  display: inline-block;
  margin: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.75rem;
}

.placeholder-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ?? Auth page ?? */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #0b0f14;
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  padding: 3rem 3.25rem;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-brand-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    linear-gradient(155deg, #0f172a 0%, #0b1220 45%, #0a1018 100%);
}

.auth-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

.auth-brand-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.auth-brand-glow--1 {
  width: 280px;
  height: 280px;
  top: 10%;
  right: 5%;
  background: rgba(59, 130, 246, 0.18);
}

.auth-brand-glow--2 {
  width: 200px;
  height: 200px;
  bottom: 15%;
  left: 10%;
  background: rgba(34, 197, 94, 0.1);
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.auth-logo--compact {
  margin-bottom: 0;
}

.auth-logo--brand {
  margin-bottom: 1.75rem;
}

.auth-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.12) 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  color: #93c5fd;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

.auth-logo--compact .auth-logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
}

.auth-logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.auth-logo-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.auth-logo-tagline {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.9);
  letter-spacing: 0.03em;
}

.sidebar-brand-link {
  display: block;
  text-decoration: none;
  padding: 0.15rem 0;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(184, 149, 108, 0.12);
  border: 1px solid rgba(212, 192, 165, 0.28);
  color: var(--accent-soft, #d4c0a5);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  align-items: center;
  line-height: 1.2;
  min-width: 0;
}

.sidebar-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: inherit;
}

.auth-brand-title {
  font-size: clamp(1.7rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.03em;
  color: #f8fafc;
  margin: 0 0 0.85rem;
}

.auth-brand-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(148, 163, 184, 0.95);
  margin: 0 0 1.75rem;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.88);
}

.auth-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  flex-shrink: 0;
}

.auth-brand-chart {
  opacity: 0.85;
  margin-top: 0.5rem;
}

.auth-brand-chart svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
}

.auth-brand-content--visual {
  max-width: 520px;
  width: 100%;
}

.auth-brand-caption {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(148, 163, 184, 0.95);
  max-width: 28rem;
}

.auth-brand-preview {
  width: 100%;
  max-width: 480px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2.25rem 1.75rem;
  background: #0b0f14;
  position: relative;
}

.auth-form-panel > .auth-mobile-brand,
.auth-form-panel > .auth-form-topbar,
.auth-form-panel > .auth-form-wrap {
  width: min(400px, 100%);
}

.auth-mobile-brand {
  display: none;
}

.auth-form-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2rem;
}

.auth-back-home {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.95);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.auth-back-home:hover {
  color: #e2e8f0;
  text-decoration: none;
}

.auth-form-wrap {
  width: min(400px, 100%);
}

.auth-form-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-form-card {
  background: rgba(22, 30, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(14px);
}

.auth-form-intro {
  margin-bottom: 1.75rem;
}

.auth-form-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  color: #f8fafc;
}

.auth-form-subtitle {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
  margin: 0;
}

.auth-smtp-hint {
  margin-bottom: 1rem;
}

.auth-oauth-section {
  margin-bottom: 1.25rem;
}

.auth-oauth-btn {
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.8125rem;
  text-align: center;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field--last {
  margin-bottom: 1.25rem;
}

.auth-form-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
}

.auth-form-alt {
  text-align: center;
  margin-top: 0.9rem;
}

.auth-alert {
  margin: 0.9rem 0 0;
}

.auth-nav-pills {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.25rem;
}

.auth-nav-pills .nav-link {
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  border: none;
  transition: background 0.15s, color 0.15s;
}

.auth-nav-pills .nav-link:hover {
  color: #e2e8f0;
}

.auth-nav-pills .nav-link.active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.auth-form-card .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.88);
  margin-bottom: 0.4rem;
}

.auth-form-card .form-control-lg {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: rgba(11, 15, 20, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.auth-form-card .form-control-lg:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: rgba(11, 15, 20, 0.9);
}

.auth-form-card .input-icon .form-control-lg {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: rgba(11, 15, 20, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
}

.auth-form-card .input-icon .form-control-lg:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-form-card .input-icon-addon {
  color: var(--muted);
}

.auth-submit-btn {
  margin-top: 0.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.auth-submit-btn:disabled {
  opacity: 1;
  color: var(--muted);
}

.auth-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.auth-inline-link {
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: #60a5fa;
}

.auth-inline-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.auth-inline-link.disabled,
.auth-switch-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.auth-label-note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--tblr-secondary-color, #6b7280);
  white-space: nowrap;
}

.auth-form-card .auth-field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--tblr-secondary-color, #6b7280);
}

.auth-workspace-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-workspace-select-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.5);
  cursor: pointer;
  margin: 0;
}

.auth-workspace-select-item:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.1);
}

.auth-workspace-select-name {
  font-weight: 600;
  color: #e2e8f0;
}

.auth-workspace-select-slug {
  width: 100%;
}

.auth-code-row {
  display: flex;
  gap: 0.5rem;
}

.auth-code-row .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-code-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.auth-forgot-link {
  font-size: 0.8125rem;
  text-decoration: none;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.95);
}

.auth-switch-link {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: #60a5fa;
}

.auth-switch-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.auth-captcha-modal {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: #121826;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.auth-captcha-modal .modal-title {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.auth-captcha-modal-sub {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.4;
}

.auth-captcha-puzzle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, 0.18), transparent 55%),
    linear-gradient(180deg, #1a2336 0%, #151c2c 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.auth-captcha-puzzle img {
  display: block;
  width: min(240px, 100%);
  height: auto;
  border-radius: 0.65rem;
}

.auth-captcha-reload-btn {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.auth-captcha-reload-btn:hover {
  color: #fff;
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(37, 99, 235, 0.25);
}

.auth-captcha-input {
  letter-spacing: 0.08em;
}

.auth-captcha-modal .modal-footer {
  gap: 0.5rem;
}

.auth-recover-results {
  margin-top: 1rem;
}

.auth-recover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-recover-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.auth-recover-list .recover-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.auth-recover-list .recover-username {
  font-weight: 600;
  word-break: break-all;
}

.auth-recover-list .recover-created {
  font-size: 0.75rem;
  color: var(--tblr-secondary);
}

.auth-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 1.25rem 0 0;
}

.auth-footer-note .auth-download-ea {
  color: var(--tblr-primary, #3b82f6);
  text-decoration: none;
}

.auth-footer-note .auth-download-ea:hover {
  text-decoration: underline;
}

.auth-footer-note .auth-download-ea-mt4 {
  font-size: 0.85em;
  opacity: 0.75;
}

.auth-footer-note .auth-footer-sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}

.auth-lang-switch {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auth-lang-switch--inline {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex-shrink: 0;
}

.auth-lang-switch svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.auth-lang-switch:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(30, 41, 59, 0.75);
  color: #fff;
}

.auth-lang-switch:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: 2px;
}

@media (max-width: 991px) {
  .auth-lang-switch:not(.auth-lang-switch--inline) {
    top: 1rem;
    right: 1rem;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-mobile-brand {
    display: block;
  }

  .auth-form-panel {
    padding: 1.5rem 1rem 2rem;
    align-items: center;
    justify-content: flex-start;
    padding-top: max(2rem, env(safe-area-inset-top));
  }

  .auth-form-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .auth-form-title {
    font-size: 1.4rem;
  }

  .auth-form-subtitle {
    font-size: 0.875rem;
  }
}

/* ?? Mobile ?? */
@media (max-width: 768px) {
  .page-header .row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .page-header .row > .col {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }

  .page-header .col-auto.ms-auto {
    width: 100%;
    margin-top: 0.45rem;
  }

  .page-header .col-auto.ms-auto .btn-list {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  #current-user {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-header .row.align-items-center.w-100 {
    row-gap: 0.45rem;
  }

  .card-header .col-auto {
    width: 100%;
  }

  .card-header .col-auto .btn,
  .card-header .col-auto .btn-list {
    width: 100%;
  }

  .card-header .col-auto .btn-list {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .stat-grid-dd { grid-template-columns: 1fr; }
  .ea-card-grid { grid-template-columns: 1fr; }
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .dashboard-kpi-grid .kpi-card { padding: 0.65rem 0.75rem; }
  .dashboard-kpi-grid .kpi-value { font-size: 1rem; }

  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .dashboard-toolbar-left {
    width: 100%;
  }

  .dashboard-toolbar .report-live-badge {
    align-self: flex-end;
    font-size: 0.72rem;
  }

  .dashboard-account-filter-wrap {
    width: 100%;
  }

  #active-trades-table th:first-child,
  #active-trades-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--tblr-card-bg, #1a2332);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.18);
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  .ea-equity-chart-wrap { min-height: 200px; }
  .be-chart-wrap:not(.live-curve-wrap) { height: 220px; min-height: 220px; }

  .page-header .btn-list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .col-hide-sm { display: none !important; }

  .heatmap-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .heatmap-table th:first-child,
  .heatmap-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--tblr-card-bg, #1a2332);
  }

  /* Dashboard mobile typography and spacing tuning */
  .dashboard-section .card-header {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .dashboard-section .card-title {
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    word-break: keep-all;
  }

  .dashboard-section .card-body .small {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .dashboard-section-tools {
    gap: 0.45rem;
  }

  .dashboard-filter-inline {
    gap: 0.35rem;
    font-size: 0.75rem;
  }

  .dashboard-filter-inline .symbol-filter-select {
    min-width: 7.5rem;
    max-width: 42vw;
  }

  .history-period-tabs {
    gap: 0.25rem;
  }

  .period-tab {
    font-size: 0.76rem;
    padding: 0.3rem 0.58rem;
  }

  #active-count {
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  /* ??????????????????/??????? */
  body.dashboard-page .page-subtitle {
    display: none;
  }

  body.dashboard-page .dashboard-toolbar-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }

  body.dashboard-page .dashboard-toolbar-filter-row .dashboard-filter-label,
  body.dashboard-page .dashboard-toolbar-filters .filter-period-label,
  body.dashboard-page .dashboard-toolbar-filters .symbol-filter-label > span:first-child,
  body.dashboard-page .dashboard-account-filter-label {
    flex: 0 0 4.5rem;
    min-width: 4.5rem;
    text-align: start;
  }

  body.dashboard-page .dashboard-toolbar-filter-row .dashboard-account-filter-wrap,
  body.dashboard-page .dashboard-toolbar-filter-row .history-period-tabs {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  body.dashboard-page .dashboard-toolbar-filters .history-period-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  body.dashboard-page .dashboard-monitor-filter-bar {
    width: 100%;
  }

  body.dashboard-page .dashboard-section > .card-header.dash-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  body.dashboard-page .dash-section-header-main {
    min-width: 0;
  }

  body.dashboard-page .dash-section-header-main .card-title {
    word-break: break-word;
  }

  body.dashboard-page .dashboard-section > .card-header .dash-section-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.dashboard-page .dashboard-section > .card-header .dash-section-header-actions .btn,
  body.dashboard-page .dashboard-section > .card-header .dash-section-header-actions .be-compare-btn {
    width: auto;
  }

  body.dashboard-page .dashboard-be-header .dash-section-subtitle {
    display: none;
  }

  body.dashboard-page .dashboard-active-header .dashboard-section-tools {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.35rem;
  }

  body.dashboard-page .dashboard-active-header .dashboard-ea-filter-bar {
    width: 100%;
  }

  body.dashboard-page #active-count {
    white-space: normal;
    align-self: flex-start;
  }

  body.dashboard-page .be-chart-legend {
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }

  body.dashboard-page .be-legend-toggle {
    font-size: 0.7rem;
    padding: 0.25rem 0.45rem;
  }

  body.dashboard-page .be-legend-note {
    display: none;
  }

  body.dashboard-page .be-chart-footnote,
  body.dashboard-page .dashboard-section-hint {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  body.dashboard-page .dashboard-kpi-grid .kpi-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
  }

  body.dashboard-page .ea-card-grid .ea-card-head {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  body.dashboard-page .ea-card-grid .ea-rating {
    max-width: 100%;
    font-size: 0.72rem;
  }

  body.dashboard-page .ea-card-footer {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 1.1rem;
    line-height: 1.25;
  }

  .page-header .col-auto.ms-auto .btn-list {
    justify-content: space-between;
  }

  #current-user {
    max-width: 50vw;
    font-size: 0.8rem;
  }

  .btn-list {
    gap: 0.35rem;
  }

  body.dashboard-page .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.dashboard-page .be-chart-wrap {
    height: 200px;
    min-height: 200px;
  }
}

@media (min-width: 769px) {
  .col-hide-md { display: none !important; }
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.dashboard-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-toolbar-filters {
  gap: 1.25rem 1.5rem;
}

.dashboard-toolbar-filter-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

body.dashboard-page .dashboard-toolbar-left {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

body.dashboard-page .dashboard-toolbar-filters {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
}

body.dashboard-page .dashboard-toolbar-filter-row .dashboard-account-filter-wrap,
body.dashboard-page .dashboard-toolbar-filter-row .history-period-tabs {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

body.dashboard-page .dashboard-account-filter-wrap {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

body.dashboard-page .dashboard-toolbar-filters .history-period-tabs {
  flex-wrap: wrap;
}

.dashboard-toolbar-filters .dashboard-filter-label,
.dashboard-toolbar-filters .filter-period-label,
.dashboard-toolbar-filters .symbol-filter-label > span:first-child,
.dashboard-account-filter-label {
  flex: 0 0 5rem;
  min-width: 5rem;
  max-width: 5rem;
  text-align: start;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-account-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 18rem;
}

.dashboard-monitor-filter-more {
  position: relative;
  flex-shrink: 0;
}

.dashboard-monitor-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-monitor-more-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.dashboard-monitor-popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  width: min(18rem, 80vw);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.dashboard-monitor-popover-search {
  margin-bottom: 0.45rem;
}

.dashboard-monitor-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 16rem;
  overflow-y: auto;
}

.dashboard-monitor-popover-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
}

.dashboard-monitor-popover-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-monitor-popover-item input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.dashboard-monitor-popover-item-main {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.dashboard-monitor-popover-item-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-monitor-popover-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.dashboard-account-filter-label {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-monitor-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  min-width: 0;
  flex: 1;
  padding-bottom: 2px;
}

.dashboard-monitor-filter-bar::-webkit-scrollbar { height: 4px; }
.dashboard-monitor-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.dashboard-monitor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.dashboard-monitor-chip:hover { border-color: rgba(255, 255, 255, 0.22); }

.dashboard-monitor-chip.active {
  border-color: rgba(184, 149, 108, 0.55);
  background: rgba(184, 149, 108, 0.18);
  color: #fff;
}

.dashboard-monitor-chip.offline:not(.active) {
  color: var(--muted);
  border-color: var(--border);
}

.dashboard-monitor-chip-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.dashboard-monitor-chip-label { font-weight: 600; }

.dashboard-monitor-chip-meta {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
}

.dashboard-monitor-chip.active .dashboard-monitor-chip-meta {
  color: rgba(255, 255, 255, 0.65);
}

/* ?? EA filter chip bar ?? */
.dashboard-ea-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow-x: auto;
  min-width: 0;
  flex: 1;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.dashboard-ea-filter-bar::-webkit-scrollbar { height: 4px; }
.dashboard-ea-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.dashboard-ea-filter-empty {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.15rem 0;
}

.dashboard-ea-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.dashboard-ea-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-ea-chip.active {
  border-color: rgba(184, 149, 108, 0.5);
  background: rgba(184, 149, 108, 0.18);
  color: #fff;
}

.dashboard-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.dashboard-status-dot.offline { background: var(--danger); }

.dashboard-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

body.dashboard-page {
  overflow-anchor: none;
}

body.dashboard-page #ea-cards,
body.dashboard-page #ea-overview-kpis,
body.dashboard-page #ea-filter-bar,
body.dashboard-page #be-kpi,
body.dashboard-page #active-trades-tbody {
  overflow-anchor: none;
}

.dashboard-section-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-filter-inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-load-error {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 0.82rem;
}

.report-live-badge.load-stale .report-live-dot {
  background: var(--warning);
}

.dashboard-section .section-hint {
  margin: 0.25rem 0 0;
}

/* Dashboard surface polish � cards sit above soft navy canvas */
body.dashboard-page .dashboard-section.card,
body.dashboard-page .card.dashboard-section {
  border-radius: 14px;
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dashboard-page .btn-ghost-primary {
  color: var(--accent-soft, #d4c0a5);
}

body.dashboard-page .btn-ghost-primary:hover {
  color: var(--accent, #b8956c);
  background: rgba(184, 149, 108, 0.1);
}

.dashboard-chart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}
.dashboard-chart-mode-tabs {
  display: inline-flex;
  gap: 0.25rem;
}
.dashboard-chart-body {
  padding-top: 0.85rem;
}
.dashboard-chart-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted, #94a3b8);
}
.dashboard-chart-panel.hidden {
  display: none !important;
}
.dashboard-chart-stage {
  position: relative;
  min-height: 220px;
}
.dashboard-chart-stage .be-chart-wrap {
  margin: 0;
}
.dashboard-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted, #94a3b8);
  pointer-events: none;
  z-index: 2;
}
.dashboard-chart-empty.hidden {
  display: none !important;
}
.dashboard-chart-footnote {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted, #94a3b8);
  opacity: 0.9;
}
.dashboard-dd-mini-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.55rem;
}
.dashboard-dd-mini-wrap.hidden {
  display: none;
}
.dashboard-dd-mini {
  display: block;
  flex: 1;
  width: 100%;
  max-width: 100%;
  height: 36px;
}
.dashboard-dd-mini-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}
.daily-calendar-day.is-chart-zoom {
  outline: 1px solid rgba(59, 130, 246, 0.85);
  outline-offset: 1px;
}
body.dashboard-page .dashboard-chart-section > .card-header.dash-section-header {
  align-items: center;
  gap: 0.75rem;
}
body.dashboard-page .dashboard-chart-section .dash-section-header-main .card-title {
  margin-bottom: 0;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi-card {
  background: var(--surface-raised, var(--surface-3));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}

.kpi-card-dd {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.1) 0%, rgba(50, 62, 84, 0.9) 100%);
}

.kpi-label {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.kpi-value {
  font-size: 1.12rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ea-card-clickable {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.ea-card-clickable:hover {
  border-color: rgba(184, 149, 108, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}


.ea-card-drill-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.kpi-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(239, 68, 68, 0.45);
}

.kpi-link:hover {
  color: #fca5a5;
  border-bottom-color: currentColor;
}

.be-chart-wrap {
  position: relative;
  height: 260px;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(184, 149, 108, 0.06), transparent 65%),
    rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.be-shade-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.be-chart-host {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.be-chart-wrap > .tv-lightweight-charts,
.be-chart-wrap > div[class*="lightweight"],
.be-chart-host > .tv-lightweight-charts,
.be-chart-host > div[class*="lightweight"] {
  position: relative;
  width: 100%;
  height: 100%;
}

/* LW Charts lays out panes with an internal <table>. Guard against page CSS
   that hides all tables (e.g. mobile "hide desktop tables" rules). */
.tv-lightweight-charts table {
  display: table !important;
  width: 100%;
  max-width: 100%;
}
.tv-lightweight-charts tr {
  display: table-row !important;
}
.tv-lightweight-charts td {
  display: table-cell !important;
}

.be-shade-overlay .be-area-profit {
  fill: rgba(34, 197, 94, 0.15);
}

.be-shade-overlay .be-area-dd {
  fill: rgba(239, 68, 68, 0.15);
}

.be-shade-overlay polygon.hidden {
  display: none;
}

.be-chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 190px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.be-tooltip-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.be-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.76rem;
  padding: 0.12rem 0;
}

.be-tooltip-row span {
  color: var(--muted);
}

.be-tooltip-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #f1f5f9;
}

.be-tooltip-row strong.positive { color: var(--success); }
.be-tooltip-row strong.negative { color: var(--danger); }

.be-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.be-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.74rem;
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}

.be-legend-toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

.be-legend-toggle:not(.active) {
  opacity: 0.45;
}

.be-legend-toggle.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.be-legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.be-legend-swatch.balance { background: #3b82f6; }
.be-legend-swatch.equity { background: #f87171; }
.be-legend-swatch.dd-shade {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.35);
}
.be-legend-swatch.profit-shade {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(34, 197, 94, 0.35);
}

.be-legend-text { font-weight: 600; color: #e2e8f0; }
.be-legend-note { font-size: 0.68rem; color: var(--muted); }

.be-chart-footnote {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
}

.be-compare-btn.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
  color: #93c5fd;
}

.be-compare-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.be-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.be-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.be-legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ea-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  align-items: start;
}

.ea-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 0.95rem;
  background: var(--surface-raised, var(--surface-3));
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
}

.ea-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border);
}

.ea-card-excellent::before { background: #eab308; }
.ea-card-good::before { background: #22c55e; }
.ea-card-fair::before { background: #3b82f6; }
.ea-card-poor::before { background: #ef4444; }

.ea-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.ea-card-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1.35;
  min-height: 1.35em;
}

.ea-card-sub {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.35;
  min-height: 1.35em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-card-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.15rem 0;
}

.ea-hero-profit {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
}

.ea-rating {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 600;
}

.ea-rating.excellent {
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
}
.ea-rating.good {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}
.ea-rating.fair {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}
.ea-rating.poor {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.ea-sparkline-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ea-sparkline-host,
.ea-sparkline {
  position: relative;
  height: 44px;
  width: 100%;
}

.ea-sparkline-svg {
  width: 100%;
  height: 44px;
  display: block;
}

.ea-spark-zero {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.ea-spark-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.ea-spark-area {
  stroke: none;
}

.ea-spark-marker {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.25;
}

.ea-spark-marker.hidden {
  display: none;
}

.ea-spark-hover {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  z-index: 2;
}

.ea-spark-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 148px;
  max-width: 220px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  font-size: 0.72rem;
}

.ea-spark-tooltip-title {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ea-spark-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.08rem 0;
}

.ea-spark-tooltip-row span {
  color: var(--muted);
}

.ea-spark-tooltip-row strong {
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
}

.ea-spark-tooltip-row strong.positive { color: var(--success); }
.ea-spark-tooltip-row strong.negative { color: var(--danger); }

.ea-spark-tooltip-meta {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.ea-sparkline-hint {
  font-size: 0.66rem;
  color: var(--muted);
}

.ea-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  font-size: 0.78rem;
  padding-top: 0.35rem;
}

.ea-metric {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.25;
}

.ea-metric--empty {
  visibility: hidden;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  min-height: 0;
  padding: 0;
}

.ea-metric--dd {
  align-items: flex-start;
  min-height: 2.6rem;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

.ea-metric-label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-metric-value {
  flex: 0 1 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #e8eef7;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-metric-value.positive { color: var(--success); }
.ea-metric-value.negative { color: var(--danger); }

.ea-metric-highlight {
  color: #bfdbfe;
}

.ea-metric-dd {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  color: #fb923c;
  font-size: 0.78rem;
  white-space: normal;
  max-width: none;
  overflow: visible;
}

.ea-metric-dd-amt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ea-metric-dd-pct {
  font-size: 0.66rem;
  font-weight: 600;
  opacity: 0.9;
  line-height: 1.2;
}

.ea-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  padding-top: 0.35rem;
}

.ea-card-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.live-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.pos-type-buy { color: #86efac; text-transform: uppercase; font-size: 0.78rem; font-weight: 600; }
.pos-type-sell { color: #fca5a5; text-transform: uppercase; font-size: 0.78rem; font-weight: 600; }

.heatmap-wrap { overflow-x: auto; }

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.heatmap-table th,
.heatmap-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.5rem;
  text-align: center;
  min-width: 58px;
}

.heatmap-table th:first-child,
.heatmap-table td:first-child {
  text-align: left;
  min-width: 52px;
}

.heatmap-cell.pos { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.heatmap-cell.neg { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.heatmap-cell.zero { color: var(--muted); }
.heatmap-total { font-weight: 600; }

.heatmap-cell-empty {
  background: transparent;
  border-color: transparent;
}

.daily-month-tabs {
  display: flex;
  align-items: center;
  max-width: min(100%, 42rem);
  padding: 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.daily-month-tabs-scroll {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.15rem;
  scrollbar-width: thin;
}

.daily-month-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}

.daily-month-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 4.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.daily-month-tab:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}

.daily-month-tab.active {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.1));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.daily-month-tab-pnl {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.92;
}

.daily-month-tab-pnl.positive { color: #4ade80; }
.daily-month-tab-pnl.negative { color: #f87171; }

.daily-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
}

.daily-month-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.daily-month-nav-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
}

.daily-month-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.daily-month-select {
  min-width: 7.5rem;
  max-width: 10rem;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  box-shadow: none;
}

.daily-month-select:focus {
  box-shadow: none;
  border-color: transparent;
}

.daily-calendar-wrap {
  position: relative;
}

.heatmap-wrap-tooltip {
  position: relative;
}

.heatmap-tooltip {
  position: fixed;
  z-index: 1080;
  min-width: 180px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.heatmap-tooltip-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.heatmap-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.heatmap-tooltip-row + .heatmap-tooltip-row {
  margin-top: 0.35rem;
}

.heatmap-tooltip-row.muted {
  color: var(--muted);
}

.heatmap-tooltip-row-sub {
  font-size: 0.72rem;
  color: var(--muted);
  padding-left: 0.35rem;
}

.heatmap-table .heatmap-cell[data-heatmap] {
  cursor: default;
}

.heatmap-table .heatmap-cell.heatmap-cell-pick {
  cursor: pointer;
  transition: box-shadow 0.15s, outline-color 0.15s;
}

.heatmap-table .heatmap-cell.heatmap-cell-pick:hover {
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.55);
}

.heatmap-table .heatmap-cell.heatmap-cell-linked {
  outline: 2px solid rgba(96, 165, 250, 0.85);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.daily-calendar-month + .daily-calendar-month {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.daily-calendar-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.daily-calendar-month-total-label {
  font-size: 0.72rem;
}

.daily-calendar-month-total {
  font-size: 0.88rem;
  font-weight: 600;
}

.daily-calendar-month-total.pos { color: #86efac; }
.daily-calendar-month-total.neg { color: #fca5a5; }
.daily-calendar-month-total.zero { color: var(--muted); }

.daily-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.daily-calendar-dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 0.15rem;
}

.daily-calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.4rem;
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: default;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.daily-calendar-day[data-day]:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.daily-calendar-day-pad {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
  min-height: 0;
  padding: 0;
}

.daily-day-num {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.daily-day-pnl {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
}

.daily-calendar-day.pos {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.daily-calendar-day.pos.daily-calendar-day-l2 {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.32);
}

.daily-calendar-day.pos.daily-calendar-day-l3 {
  background: rgba(34, 197, 94, 0.34);
  border-color: rgba(34, 197, 94, 0.45);
}

.daily-calendar-day.neg {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
}

.daily-calendar-day.neg.daily-calendar-day-l2 {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.32);
}

.daily-calendar-day.neg.daily-calendar-day-l3 {
  background: rgba(239, 68, 68, 0.34);
  border-color: rgba(239, 68, 68, 0.45);
}

.daily-calendar-day.zero .daily-day-pnl {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .daily-calendar-grid {
    gap: 0.25rem;
  }

  .daily-calendar-day {
    min-height: 2.85rem;
    padding: 0.25rem 0.15rem;
  }

  .daily-day-pnl {
    font-size: 0.65rem;
  }

  .daily-day-num {
    font-size: 0.62rem;
  }
}

.dashboard-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.dashboard-table th[data-sort]:hover {
  color: var(--primary);
}

/* ?? Unified section card headers (dashboard / live / reports) ?? */
.dash-section-header,
.dashboard-section > .card-header,
.card.mb-3:not(.report-toolbar) > .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 1rem;
  min-height: 2.85rem;
  flex-wrap: wrap;
}

.dash-section-header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.dash-section-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dash-section-header .card-title,
.dashboard-section > .card-header .card-title,
.card.mb-3:not(.report-toolbar) > .card-header .card-title {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0;
}

.dash-section-subtitle,
.dash-section-header .dash-section-subtitle,
.dashboard-section > .card-header > .text-secondary.small,
.card.mb-3:not(.report-toolbar) > .card-header > .text-secondary.small {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.12rem 0 0;
  line-height: 1.35;
}

.dash-section-header .history-period-tabs,
.dashboard-section > .card-header .history-period-tabs {
  gap: 0.2rem;
  padding-bottom: 0;
}

.dash-section-header .period-tab,
.dashboard-section > .card-header .period-tab {
  padding: 0.14rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 4px;
  line-height: 1.2;
}

.dash-section-header .dashboard-section-tools,
.dashboard-section > .card-header .dashboard-section-tools {
  gap: 0.45rem;
}

.dash-section-header .dashboard-filter-inline,
.dashboard-section > .card-header .dashboard-filter-inline {
  font-size: 0.72rem;
  gap: 0.35rem;
}

/* ?? EA report lazy sections ?? */
.report-lazy-section > .report-lazy-header {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.report-lazy-header {
  cursor: pointer;
  user-select: none;
}

.report-lazy-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.report-lazy-chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-top: -0.15rem;
}

.report-lazy-section.is-expanded .report-lazy-chevron {
  transform: rotate(45deg);
  margin-top: 0.1rem;
}

.report-lazy-body {
  padding: 0 0.75rem 0.75rem;
}

.report-lazy-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.report-orders-block + .report-orders-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.report-orders-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.report-orders-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0;
}

.report-lazy-body .live-dir-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.report-lazy-body .live-dir-badge.buy {
  background: rgba(47, 179, 68, 0.18);
  color: #2fb344;
}

.report-lazy-body .live-dir-badge.sell {
  background: rgba(214, 57, 57, 0.18);
  color: #d63939;
}

.report-lazy-body .live-pending-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.2;
}

/* ???????? */
.live-pending-badge--buy {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
  border-color: rgba(34, 197, 94, 0.28) !important;
}

.live-pending-badge--sell {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

.live-pending-badge--stop {
  background: rgba(249, 115, 22, 0.14) !important;
  color: #fb923c !important;
  border-color: rgba(249, 115, 22, 0.32) !important;
}

.live-pending-badge:not(.live-pending-badge--buy):not(.live-pending-badge--sell):not(.live-pending-badge--stop) {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--warning) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}

/* ?? EA settings ?? */
.ea-settings-shell .card-body {
  padding-bottom: 1.5rem;
}

.ea-groups-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ea-groups-empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  margin: 0;
}

.ea-group-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.ea-group-card:nth-child(4n + 1) {
  border-left: 3px solid var(--primary);
}

.ea-group-card:nth-child(4n + 2) {
  border-left: 3px solid #8b5cf6;
}

.ea-group-card:nth-child(4n + 3) {
  border-left: 3px solid #14b8a6;
}

.ea-group-card:nth-child(4n + 4) {
  border-left: 3px solid #f59e0b;
}

.ea-group-card__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.25rem;
  align-items: end;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.ea-group-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.28);
  white-space: nowrap;
}

.ea-group-card:nth-child(4n + 2) .ea-group-card__badge {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.28);
}

.ea-group-card:nth-child(4n + 3) .ea-group-card__badge {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.28);
}

.ea-group-card:nth-child(4n + 4) .ea-group-card__badge {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
}

.ea-group-card__title .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.ea-group-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.15rem;
}

.ea-group-card__body {
  padding: 1rem 1.25rem 1.15rem;
}

.ea-group-card__section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}

.ea-group-magic-table thead th {
  font-size: 0.75rem;
  color: var(--muted);
  border-bottom-color: var(--border);
}

.ea-group-magic-table tbody td {
  border-top-color: rgba(255, 255, 255, 0.05);
}

.ea-group-magic-empty td {
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.ea-magic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.ea-magic-chips-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.35rem 0;
}

.ea-magic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text, #e2e8f0);
  font-size: 0.85rem;
  line-height: 1.2;
}

.ea-magic-chip code {
  font-size: 0.85rem;
  background: transparent;
  color: inherit;
  padding: 0;
}

.ea-magic-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ea-magic-chip__remove:hover {
  background: rgba(239, 68, 68, 0.22);
}

.ea-magic-add-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.ea-magic-add-row .magic-draft-input {
  max-width: 220px;
}

.ea-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 0.15rem;
}

.ea-picker-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.ea-picker-item:hover:not(.is-disabled) {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.06);
}

.ea-picker-item.is-selected {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.1);
}

.ea-picker-item.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ea-picker-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ea-picker-item__magic code {
  font-size: 0.92rem;
  background: transparent;
  padding: 0;
}

.ea-picker-item__label {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-picker-item__status {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.ea-picker-empty {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .ea-group-card__header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ea-group-card__actions {
    justify-content: flex-end;
    padding-bottom: 0;
  }

  .ea-magic-add-row {
    flex-wrap: wrap;
  }

  .ea-magic-add-row .magic-draft-input {
    max-width: none;
    flex: 1 1 100%;
  }

  .ea-picker-item {
    grid-template-columns: auto 1fr;
    gap: 0.55rem 0.7rem;
  }

  .ea-picker-item__status {
    grid-column: 2;
  }
}

/* ?? EA Global Page Mobile ?? */
@media (max-width: 768px) {
  /* Filter row: stack vertically */
  .report-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    min-width: 0;
  }

  .report-filter-row > .ea-magic-filter-bar,
  .report-filter-row > .history-period-tabs,
  .report-filter-row > .symbol-filter-label {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
  }

  .ea-magic-filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .history-period-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .history-period-tabs .filter-period-label {
    flex: 0 0 100%;
    margin-right: 0;
    margin-bottom: 0.1rem;
  }

  .symbol-filter-label {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .symbol-filter-label .report-date-input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  #custom-date-range-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  #custom-date-range-row .filter-period-label {
    margin-right: 0;
  }

  #custom-date-range-row .report-date-input {
    width: 100%;
    max-width: 100%;
  }

  .report-toolbar .card-body {
    overflow-x: hidden;
  }

  /* KPI grid: 2 columns */
  .ea-global-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ea-global-kpi-card--hero {
    grid-column: 1 / -1;
  }

  /* Summary cards: 1 column */
  .ea-summary-card-grid {
    grid-template-columns: 1fr;
  }

  /* Orders split: stack vertically */
  .ea-orders-split {
    grid-template-columns: 1fr;
  }

  /* Calendar grid: smaller cells */
  .daily-calendar-day {
    min-height: 2.8rem;
    padding: 0.25rem 0.15rem;
  }

  .daily-day-num {
    font-size: 0.62rem;
  }

  .daily-day-pnl {
    font-size: 0.65rem;
  }

  .daily-day-trades {
    font-size: 0.58rem;
  }

  .daily-calendar-grid {
    gap: 0.2rem;
  }

  .daily-calendar-dow {
    font-size: 0.6rem;
  }

  /* Tables: horizontal scroll + sticky first column */
  .ea-orders-col .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ea-orders-col table th:first-child,
  .ea-orders-col table td:first-child {
    position: sticky;
    left: 0;
    background: var(--surface-2);
    z-index: 1;
  }

  /* Equity chart */
  .ea-equity-chart-wrap {
    min-height: 180px;
  }

  /* Daily modal: full-width */
  .ea-daily-modal-panel {
    width: calc(100vw - 24px);
    max-height: 80vh;
  }
}

/* Daily Summary � date list + modal detail cards */
.daily-summary-table .daily-summary-clickable {
  cursor: pointer;
}

.daily-summary-table .daily-summary-clickable:hover {
  background: var(--tblr-bg-surface-secondary);
}

.ea-daily-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ea-daily-modal.hidden {
  display: none;
}

.ea-daily-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.ea-daily-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: var(--tblr-bg-surface);
  border: 1px solid var(--tblr-border-color);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.ea-daily-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tblr-border-color-light);
}

.ea-daily-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.ea-daily-modal-close {
  font-size: 1.25rem;
  line-height: 1;
  padding: 2px 8px;
}

.ea-daily-modal-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ea-daily-detail-card {
  padding: 12px 14px;
  border: 1px solid var(--tblr-border-color-light);
  border-radius: 8px;
  background: var(--tblr-bg-surface-secondary);
}

.ea-daily-detail-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ea-daily-detail-card-ea {
  font-weight: 500;
}

.ea-daily-detail-card-profit {
  font-weight: 600;
}

.ea-daily-detail-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--tblr-secondary);
}

/* EA Overview Section */
.ea-overview-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.ea-overview-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--tblr-bg-surface-secondary);
  border-radius: 8px;
  text-align: center;
}

/* ?? Lightweight Charts container ?? */
.lw-chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}
.lw-chart-container canvas {
  display: block;
}
/* Tooltip overlay for LW charts (positioned absolutely over chart container) */
.lw-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  color: #e2e8f0;
}

.ea-overview-kpi-label {
  font-size: 0.75rem;
  color: var(--tblr-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ea-overview-kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
}

/* ?? Dashboard closed deals toolbar ?? */
/* Inline layout: period tabs + compact date range on one row; stats aligned right. */

.dashboard-deals-toolbar {
  display: block;
}

.dashboard-deals-toolbar-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.dashboard-deals-toolbar-main > .dashboard-deals-stats {
  margin-left: auto;
  flex-shrink: 0;
}

.filter-seg,
.dashboard-deals-period-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-seg__btn,
.dashboard-deals-period-tabs .period-tab,
.dashboard-deals-period-tabs .filter-seg__btn {
  margin: 0;
  flex-shrink: 0;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 550;
  line-height: 1.2;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted, rgba(255, 255, 255, 0.5));
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.filter-seg__btn:hover,
.dashboard-deals-period-tabs .period-tab:hover {
  color: var(--text, #f1f5f9);
}

.filter-seg__btn.active,
.dashboard-deals-period-tabs .period-tab.active,
.dashboard-deals-period-tabs .filter-seg__btn.active {
  background: rgba(184, 149, 108, 0.22);
  color: #f5efe6;
  box-shadow: inset 0 0 0 1px rgba(184, 149, 108, 0.4);
  font-weight: 600;
}

.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface-raised, #323e54);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
}

.filter-panel--inline,
#dashboard-deals-date-range {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0;
  border: none;
  background: transparent;
}

#dashboard-deals-date-range.hidden {
  display: none !important;
}

.filter-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.filter-panel__label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.filter-panel--inline .filter-panel__label {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.filter-panel__fields {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}

.filter-panel--inline .filter-panel__fields {
  flex: 0 1 auto;
}

.filter-panel--inline .filter-panel__apply,
.filter-panel--inline .filter-panel__reset {
  padding: 0.18rem 0.45rem;
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
}

.dashboard-deals-date-input {
  width: auto !important;
  min-width: 6.75rem;
  max-width: 8.25rem;
  padding: 0.16rem 0.35rem;
  font-size: 0.68rem;
  color-scheme: dark;
}

.dashboard-deals-date-sep {
  color: var(--muted, rgba(255, 255, 255, 0.35));
  font-size: 0.65rem;
  user-select: none;
  flex-shrink: 0;
}

.filter-panel__apply.btn-primary {
  background: var(--accent, #b8956c);
  border-color: var(--accent, #b8956c);
  color: #1b2436;
  font-weight: 600;
}

.filter-panel__apply.btn-primary:hover {
  background: var(--accent-soft, #d4c0a5);
  border-color: var(--accent-soft, #d4c0a5);
  color: #1b2436;
}

.dashboard-deals-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dashboard-deals-stats:empty {
  display: none;
}

.dashboard-deals-stats .live-section-stat-count {
  color: rgba(255, 255, 255, 0.48);
  padding-right: 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .dashboard-deals-toolbar-main {
    flex-wrap: wrap;
  }

  .dashboard-deals-toolbar-main > .dashboard-deals-stats {
    margin-left: 0;
    width: 100%;
  }

  .filter-panel__row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel:not(.filter-panel--inline) .filter-panel__fields {
    width: 100%;
  }

  .filter-panel--inline {
    flex-wrap: wrap;
    width: 100%;
  }

  .fc-date:has(> input.dashboard-deals-date-input) {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .fc-date:has(> input.dashboard-deals-date-input) .fc-date-trigger {
    width: 100%;
    max-width: none;
  }
}

.dashboard-deals-stats .live-section-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  padding-left: 0.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
}

.dashboard-deals-stats .live-section-stat-label {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.62rem;
}

.dashboard-deals-stats .live-section-stat-pnl {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding-left: 0.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Account cell hover + EA daily detail modal (ea-global) */
.acct-cell-tip {
  cursor: help;
  display: inline-block;
  line-height: 1.35;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
}

.acct-cell-tip--inline {
  border-bottom-style: dotted;
}

.acct-cell-primary { font-weight: 500; }

.acct-hover-tooltip {
  position: fixed;
  z-index: 1060;
  min-width: 220px;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  font-size: 0.8125rem;
  pointer-events: auto;
}

.acct-hover-tooltip.hidden { display: none; }

.acct-tip-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }

.acct-tip-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.acct-tip-status.online { background: var(--tblr-success); }
.acct-tip-status.stale { background: var(--tblr-warning); }
.acct-tip-status.offline { background: var(--tblr-secondary); }

.acct-tip-title { font-weight: 600; line-height: 1.35; }
.acct-tip-sub { font-weight: 400; font-size: 0.75rem; color: var(--tblr-secondary); }
.acct-tip-meta { font-size: 0.75rem; margin-bottom: 8px; }
.acct-tip-grid { display: grid; gap: 4px; margin-bottom: 8px; }
.acct-tip-row { display: flex; justify-content: space-between; gap: 12px; }
.acct-tip-section { margin-bottom: 6px; }
.acct-tip-label { font-size: 0.72rem; color: var(--tblr-secondary); margin-bottom: 4px; }
.acct-tip-eas { display: flex; flex-wrap: wrap; gap: 4px; }

.acct-tip-ea-tag {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--tblr-bg-surface-secondary);
}

.acct-tip-foot { font-size: 0.72rem; margin-top: 4px; }
.acct-tip-loading { color: var(--tblr-secondary); }

.daily-calendar-day-clickable { cursor: pointer; }

.daily-calendar-day-clickable:hover {
  outline: 1px solid var(--tblr-primary);
  outline-offset: -1px;
}

.ea-daily-modal-summary { padding: 12px 16px 0; }

.ea-daily-detail-day-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color-light);
}

.ea-daily-detail-stat { display: flex; flex-direction: column; gap: 2px; }
.ea-daily-detail-stat-label { font-size: 0.72rem; color: var(--tblr-secondary); }
.ea-daily-detail-stat-value { font-weight: 600; font-size: 0.9rem; }

.ea-daily-detail-card-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ea-daily-detail-card-account { font-size: 0.78rem; }

.ea-daily-detail-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  font-size: 0.8125rem;
  margin-bottom: 10px;
}

.ea-daily-detail-k { display: block; font-size: 0.72rem; color: var(--tblr-secondary); }
.ea-daily-detail-card-actions { display: flex; justify-content: flex-end; }

.ea-daily-modal-panel { width: min(560px, 100%); }

/* EA magic summary � inherits Strip Rows via .dashboard-table */
.ea-magic-summary-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.15rem 0.55rem;
}

.ea-magic-summary-table {
  width: 100%;
  font-size: 0.8125rem;
}

.ea-magic-summary-table tbody tr:not(:has(td[colspan])) > td:first-child,
.card .dashboard-table tbody tr:not(:has(td[colspan])) > td:first-child {
  box-shadow: none;
}

.ea-magic-summary-table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ea-magic-summary-table .ea-magic-summary-ea {
  font-weight: 600;
  color: var(--text, #f1f5f9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.ea-magic-summary-table .ea-magic-summary-magic {
  width: 7.5rem;
  max-width: 7.5rem;
  white-space: nowrap;
}

.ea-magic-summary-table .ea-magic-summary-magic code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  background: transparent;
  color: var(--muted, #94a3b8);
  padding: 0;
  vertical-align: middle;
}

.ea-magic-summary-table .ea-magic-summary-net {
  font-weight: 600;
}


/* ================================================================
   EA ???? (Sim Portfolio)
   ================================================================ */

/* ???? */
.sim-upload-zone {
  border: 2px dashed var(--tblr-border-color, #3a4a5e);
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: var(--tblr-bg-surface, #1a2233);
}

.sim-upload-zone:hover,
.sim-upload-zone--active {
  border-color: var(--tblr-primary, #206bc4);
  background: var(--tblr-bg-surface-secondary, #1e293b);
}

.sim-upload-icon {
  color: var(--tblr-muted, #6c7a91);
  margin-bottom: 0.75rem;
}

.sim-upload-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--tblr-body-color, #f4f6fa);
  margin-bottom: 0.25rem;
}

.sim-upload-hint {
  font-size: 0.85rem;
  color: var(--tblr-muted, #6c7a91);
  margin-bottom: 0;
}

/* ?? Tab */
.sim-page-tabs .nav-link {
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--tblr-muted, #6c7a91);
  padding: 0.55rem 1rem;
}

.sim-page-tabs .nav-link.active {
  color: var(--tblr-primary, #206bc4);
  border-bottom: 2px solid var(--tblr-primary, #206bc4);
  font-weight: 600;
  background: transparent;
}

/* ????????? / .tst ??? */
.sim-help,
.sim-tst-help {
  border: 1px solid var(--tblr-border-color, #3a4a5e);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: var(--tblr-bg-surface-secondary, #1e293b);
}

.sim-help-summary,
.sim-tst-help-summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--tblr-primary, #206bc4);
  user-select: none;
}

.sim-help-body,
.sim-tst-help-body {
  margin-top: 0.6rem;
  line-height: 1.55;
}

.sim-help-body code,
.sim-tst-help-body code {
  font-size: 0.8em;
}

/* EA ?????? */
.sim-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.sim-file-card {
  border: 1px solid var(--tblr-border-color, #3a4a5e);
  border-radius: 6px;
  background: var(--tblr-bg-surface, #1a2233);
  overflow: hidden;
}

.sim-file-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--tblr-bg-surface-secondary, #1e293b);
  border-bottom: 1px solid var(--tblr-border-color, #3a4a5e);
}

.sim-file-ea-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.sim-file-remove-btn {
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.25rem;
  color: var(--tblr-muted, #6c7a91);
  cursor: pointer;
  border: none;
  background: none;
}

.sim-file-remove-btn:hover {
  color: var(--tblr-danger, #d63939);
}

.sim-file-card-body {
  padding: 0.5rem 0.75rem;
}

.sim-file-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.15rem 0;
  font-size: 0.82rem;
}

.sim-file-card-label {
  color: var(--tblr-muted, #6c7a91);
  font-size: 0.78rem;
}

/* ???? � ?? Strip Rows?.dashboard-table? */
.sim-trades-table {
  font-size: 0.85rem;
}

.sim-trades-table .col-trade-open-time,
.sim-trades-table .col-trade-close-time {
  font-size: 0.78rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.sim-trades-table .sim-ea-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(32, 107, 196, 0.14);
  color: var(--tblr-primary, #206bc4);
  font-size: 0.78rem;
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-trades-table tbody tr.table-strip-empty > td,
.sim-trades-table tbody tr:has(td[colspan="14"]) > td,
.sim-trades-table tbody tr.table-strip-empty:hover > td,
.sim-trades-table tbody tr:has(td[colspan="14"]):hover > td {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.sim-trades-table .sim-summary-row > td {
  background: #323e54 !important;
  font-size: 0.85rem;
  font-weight: 650;
}

/* EA Access � workspace config field (full-width fancy select) */
.ea-access-ws-field .form-label {
  margin-bottom: 0.35rem;
}

.ea-access-ws-field .fc-select {
  display: flex;
  width: 100%;
}

.ea-access-ws-field .fc-select-trigger {
  width: 100%;
  min-width: 0;
  min-height: 2.375rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

.ea-access-ws-field .fc-select-menu {
  width: 100%;
  min-width: 100%;
}

.ea-access-ws-field .form-hint {
  margin-top: 0.4rem;
  color: var(--tblr-secondary, #8492a6);
  font-size: 0.8125rem;
}

/* EA Access � setup guide (reuses accounts-connect-panel look) */
.settings-page--ea-access .ea-access-guide {
  margin-top: 0;
  margin-bottom: 1rem;
}

.ea-access-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.ea-access-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.ea-access-step-num {
  flex-shrink: 0;
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #86efac;
  background: rgba(47, 179, 68, 0.18);
  border: 1px solid rgba(47, 179, 68, 0.35);
}

.ea-access-steps strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--tblr-body-color, #f8fafc);
}

.ea-access-steps p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #94a3b8;
}

/* Workspaces � rewritten to match design draft (outline create, horizontal ops) */
.settings-page--workspaces {
  --ws-gold: #b8956c;
  --ws-gold-soft: #d4c0a5;
  --ws-green: #22c55e;
  --ws-danger: #ef4444;
  --ws-muted: #94a3b8;
  --ws-text: #f1f5f9;
  --ws-line: rgba(255, 255, 255, 0.12);
}

.settings-page--workspaces .ws-panel {
  background: var(--tblr-bg-surface, #2a3548);
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  overflow: hidden;
}

.settings-page--workspaces .ws-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--ws-line);
}

.settings-page--workspaces .ws-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ws-text);
  line-height: 1.3;
}

.settings-page--workspaces .ws-panel__body {
  padding: 1rem 1.15rem 1.15rem;
}

.settings-page--workspaces .ws-panel__hint {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ws-muted);
}

.settings-page--workspaces .ws-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.settings-page--workspaces .ws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.settings-page--workspaces .ws-table thead th {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--ws-line);
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.settings-page--workspaces .ws-table tbody td {
  padding: 0.9rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
  color: var(--ws-text);
}

.settings-page--workspaces .ws-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-page--workspaces .ws-table tbody tr.is-current td {
  background: rgba(255, 255, 255, 0.035);
}

.settings-page--workspaces .ws-col-name {
  font-weight: 500;
  min-width: 12rem;
}

.settings-page--workspaces .ws-col-count {
  width: 5.5rem;
  color: var(--ws-muted);
}

.settings-page--workspaces .ws-col-flag {
  width: 5.5rem;
}

.settings-page--workspaces .ws-col-ops {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.settings-page--workspaces .ws-dash {
  color: var(--ws-muted);
}

.settings-page--workspaces .ws-empty {
  padding: 1.25rem 0.65rem !important;
  color: var(--ws-muted);
  text-align: left;
}

.settings-page--workspaces .ws-empty--error {
  color: var(--ws-danger);
}

.settings-page--workspaces .ws-ops {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.settings-page--workspaces .ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.settings-page--workspaces .ws-btn--create {
  color: var(--ws-gold);
  border-color: rgba(184, 149, 108, 0.65);
  background: transparent;
  font-weight: 600;
}

.settings-page--workspaces .ws-btn--create:hover {
  color: var(--ws-gold-soft);
  border-color: var(--ws-gold);
  background: rgba(184, 149, 108, 0.1);
}

.settings-page--workspaces .ws-btn--switch {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.35);
  background: transparent;
}

.settings-page--workspaces .ws-btn--switch:hover {
  color: #fff;
  border-color: rgba(226, 232, 240, 0.65);
  background: rgba(255, 255, 255, 0.06);
}

.settings-page--workspaces .ws-btn--danger {
  color: var(--ws-danger);
  border-color: rgba(239, 68, 68, 0.55);
  background: transparent;
}

.settings-page--workspaces .ws-btn--danger:hover {
  color: #fca5a5;
  border-color: var(--ws-danger);
  background: rgba(239, 68, 68, 0.1);
}

.settings-page--workspaces .ws-btn--link {
  color: var(--ws-muted);
  border-color: transparent;
  background: transparent;
  padding-inline: 0.35rem;
  font-weight: 500;
}

.settings-page--workspaces .ws-btn--link:hover {
  color: var(--ws-gold-soft);
}

.settings-page--workspaces .ws-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.settings-page--workspaces .ws-badge--default {
  color: var(--ws-gold);
  background: rgba(184, 149, 108, 0.14);
  border: 1px solid rgba(184, 149, 108, 0.4);
}

.settings-page--workspaces .ws-badge--current {
  color: var(--ws-green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

body[data-bs-theme="dark"] #ws-create-dialog .ws-modal-primary,
body[data-bs-theme="dark"] #ws-rename-dialog .ws-modal-primary {
  color: #1b2436 !important;
  background: var(--ws-gold, #b8956c) !important;
  border-color: var(--ws-gold, #b8956c) !important;
  font-weight: 650;
}

body[data-bs-theme="dark"] #ws-create-dialog .ws-modal-primary:hover,
body[data-bs-theme="dark"] #ws-rename-dialog .ws-modal-primary:hover {
  color: #1b2436 !important;
  background: var(--ws-gold-soft, #d4c0a5) !important;
  border-color: var(--ws-gold-soft, #d4c0a5) !important;
}

@media (max-width: 640px) {
  .settings-page--workspaces .ws-ops {
    flex-wrap: wrap;
    max-width: 11rem;
    justify-content: flex-end;
  }
}

/* Wallet / membership top-up */
.settings-page--wallet .wallet-balance-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.settings-page--wallet .wallet-topup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.settings-page--wallet .wallet-topup-field {
  flex: 1 1 12rem;
  max-width: 16rem;
}
.settings-page--wallet .wallet-topup-field .form-label {
  margin-bottom: 0.35rem;
}
.settings-page--wallet .wallet-topup-action {
  flex: 0 0 auto;
}
.settings-page--wallet .wallet-topup-action .btn {
  min-width: 7.5rem;
  height: 2.375rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}
/* Empty state is rendered in wallet.js / wallet.html (UTF-8). Legacy ::before removed. */
.settings-page--wallet #membership-plans:empty::before {
  content: none;
}

/* Global bottom toast (showToast) */
.app-dialog-toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 1300;
  transform: translate(-50%, 0.75rem);
  max-width: min(92vw, 24rem);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.app-dialog-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.app-dialog-toast.is-success {
  color: #ecfdf5;
  background: rgba(22, 101, 52, 0.95);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.28);
}
.app-dialog-toast.is-error {
  color: #fef2f2;
  background: rgba(127, 29, 29, 0.94);
  border-color: rgba(248, 113, 113, 0.45);
}
