/* BADZO terminal: one quiet, consistent visual system across the gold desk. */
:root {
  --rail: 240px;
  --header: 76px;
  --bg: #101213;
  --panel: #191c1d;
  --panel2: #1d2021;
  --line: #2a2e2f;
  --text: #eff1ed;
  --muted: #a1a8a7;
  --lime: #c3f879;
  --green: #93d6aa;
  --amber: #e2b86d;
  --red: #ec9292;
  --edge: #ffffff10;
  --surface-shadow: 0 6px 24px #00000014, inset 0 1px 0 #ffffff04;
}
*, *::before, *::after {
  scroll-behavior: auto !important;
}
html {scroll-padding-top: 100px; scrollbar-color: #434b46 var(--bg)}
body {background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility}
button, input, select {font-family: inherit}
button, a { -webkit-tap-highlight-color: transparent }
button:hover, a:hover {transform: none}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 4px;
}
::selection {background: #c3f87933; color: var(--text)}
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  height: var(--header); display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 28px; background: #101213;
  border-bottom: 1px solid var(--line); backdrop-filter: none;
}
.topbar-brand {display: flex; align-items: center; gap: 32px}
.brand {padding: 0; gap: 13px; font-size: 24px; letter-spacing: .9px}
.brandmark {color: var(--lime)}
.brand-sub {font-size: 9px; letter-spacing: 1.9px; color: #89928c}
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; padding: 0; font-size: 25px;
  border: 1px solid var(--edge); border-radius: 9px;
  background: #ffffff02; color: var(--muted);
}
.icon-button svg {width: 19px; height: 19px; stroke-width: 1.7}
.icon-button:hover {background: #ffffff07; color: var(--lime); border-color: #c3f87936}
.menu-button {border-color: transparent; background: transparent}
.header-right {display: flex; align-items: center; gap: 10px}
.demo-chip {display: inline-flex; align-items: center; gap: 13px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: 8px; background: #ffffff02}
.demo-chip>span:first-child {color: var(--lime)}
.chip-divider {display: block; height: 13px; width: 1px; background: #ffffff18}
.profile-button {display: flex; align-items: center; gap: 12px; padding: 5px 13px 5px 5px; background: #ffffff02; border: 1px solid var(--edge); border-radius: 999px; color: var(--muted)}
.profile-button:hover {border-color: #c3f87936; color: var(--lime)}
.profile-button .avatar {width: 30px; height: 30px; border-radius: 50%; background: #c3f87914; color: var(--lime); font: 700 11px Manrope, sans-serif}
.profile-button>svg {width: 18px; height: 18px}
.sidebar {position: fixed; isolation: isolate; inset: var(--header) auto 0 0; width: var(--rail); height: auto; padding: 30px 14px 20px; background: #111415; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin}
.sidebar-label {font-size: 10px; font-weight: 600; letter-spacing: 1.7px; color: #7e8a82; padding: 0 16px; margin-bottom: 18px}
.sidebar nav {display: flex; flex-direction: column; gap: 5px}
.nav-item {
  position: relative; margin: 0; min-height: 49px; padding: 13px 15px;
  gap: 12px; border: 1px solid transparent; border-radius: 8px;
  color: #aab3ae; font-size: 13px; font-weight: 500; background: transparent;
}
.nav-item svg {width: 19px; height: 19px; color: #84918a}
.nav-item.active {color: var(--text); border-color: #c3f87920; background: #c3f8790d; box-shadow: inset 2px 0 var(--lime)}
.nav-item.active svg {color: var(--lime)}
.nav-item:hover {background: #ffffff05; color: var(--text)}
.nav-item.active:hover {background: #c3f8790d}
.nav-count {font-size: 11px; padding: 1px 7px; border: 1px solid #ffffff08; border-radius: 5px; background: #ffffff04; font-variant-numeric: tabular-nums}
.sidebar-bottom {margin-top: auto; padding-top: 32px}
.read-only {padding: 15px 13px; border: 1px solid var(--edge); border-radius: 9px; background: #ffffff02; align-items: flex-start; font-size: 12px; color: #c2cbc5}
.read-only small {font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 4px}
.read-only svg {width: 18px; height: 18px; margin-top: 3px}
.profile {margin-top: 16px; padding: 14px 8px 0; border-color: var(--line)}
.profile .avatar {background: #ffffff07; color: #c6cfc8; border: 1px solid var(--edge)}
.profile small {font-size: 12px}
.main-shell {position: relative; isolation: isolate; margin: var(--header) 0 0 var(--rail); padding: 0; min-width: 0}
main {max-width: 1880px; margin: 0 auto; padding: 28px 30px 0; min-width: 0}
.page-heading {margin: 0 0 24px; gap: 20px}
.page-heading h1 {font-size: clamp(25px, 2.3vw, 34px); font-weight: 600; letter-spacing: -1px}
.page-heading p {font-size: 14px; max-width: 650px; line-height: 1.6}
.eyebrow {display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: #8a978f; margin-bottom: 9px}
body:has(#overview-view:not([hidden])) .page-heading,
body:has(#overview-view:not([hidden])) #sync-status {display: none}
.demo-banner {font-size: 13px; padding: 0 0 22px}
.overview-toolbar {display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; min-height: 60px}
.welcome {min-width: 0; flex-shrink: 0}
.welcome h1 {font: 600 clamp(28px, 2.15vw, 37px)/1.25 Manrope, sans-serif; margin: 0 0 10px; letter-spacing: -1.3px}
.overview-kicker {color: #8f9b94; font-size: 10px; letter-spacing: 1.6px; font-weight: 600; margin-bottom: 11px}
.welcome h1 span {color: var(--lime)}
.sync-line {display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums}
.sync-line .icon-button {width: 26px; height: 26px; border: 0; background: transparent}
.sync-line svg {width: 15px; height: 15px}
.overview-controls {display: flex; justify-content: flex-end; align-items: stretch; gap: 9px; flex: 1; min-width: 0; max-width: 710px}
.select-control {display: flex; align-items: center; gap: 11px; padding: 9px 14px; min-height: 56px; min-width: 0; border: 1px solid var(--edge); border-radius: 9px; background: #16191a; box-shadow: inset 0 1px 0 #ffffff03}
.select-control:focus-within {border-color: #c3f87970; box-shadow: 0 0 0 3px #c3f87908}
.select-control>svg {width: 18px; height: 18px; color: #96a78e}
.account-control {flex: 1; max-width: 345px}
.control-field {display: flex; flex-direction: column; min-width: 0; width: 100%}
.control-caption {font-size: 10px; font-weight: 500; line-height: 1.2; margin-bottom: 5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted)}
.select-control select, .select-control input {min-width: 0; width: 100%; border: 0; background: transparent; padding: 0; font-size: 14px; font-weight: 500; line-height: 1.5; border-radius: 0; color: var(--text)}
.select-control select:focus-visible, .select-control input:focus-visible {outline-offset: 2px}
select option {background: var(--panel); color: var(--text)}
.currency-control {min-width: 78px}
.month-control {flex: 0 1 210px}
.month-control input {width: 100%; color-scheme: dark}
.panel, .metric, .slot-card {
  min-width: 0; border: 1px solid var(--edge); border-radius: 12px;
  background: var(--panel); background-image: none; box-shadow: var(--surface-shadow);
}
.analytics-layout {display: grid; grid-template-columns: minmax(340px, 1.05fr) minmax(0, 1.45fr); gap: 18px; align-items: stretch}
.analytics-left, .analytics-right {display: grid; gap: 14px; min-width: 0}
.analytics-left {grid-template-rows: minmax(0,1fr) auto}
.analytics-right {display: block}
.analytics-right>.calendar-panel {height: 100%}
.performance-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px}
.overview-performance {grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 18px}
.stat-card {position: relative; padding: 19px 20px 16px; min-height: 194px; display: flex; flex-direction: column; overflow: visible}
.stat-label {display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10px; line-height: 1.3; letter-spacing: 1.25px; font-weight: 600; color: #8f9b94; margin-bottom: 11px}
.stat-label svg {width: 24px; height: 24px; padding: 5px; border: 1px solid #ffffff08; border-radius: 6px; background: #ffffff02; color: #a4b19a; stroke-width: 1.5}
.stat-card>strong {font: 600 clamp(28px, 2vw, 36px)/1.15 Manrope, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -1.2px; margin-bottom: 7px}
.stat-card h2 {font: 500 13px/1.4 'DM Sans', sans-serif; letter-spacing: 0; margin: 0; color: #c7d0ca}
.stat-card p {font-size: 11px; color: var(--muted); line-height: 1.5; margin: 9px 0 0; min-height: 17px}
.gauge-slot {display: flex; justify-content: center; align-items: flex-end; margin: auto 0 0; padding-top: 12px; height: 66px}
.gauge-slot svg {height: 57px; width: 106px; stroke-linecap: butt; overflow: visible}
.gauge-track {fill: none; stroke: #ec929257; stroke-width: 17}
.gauge-profit {fill: none; stroke: var(--lime); stroke-width: 17}
.gauge-track.no-data {stroke: #2f3732}
.ratio-bar {height: 8px; flex-shrink: 0; margin: auto 0 20px; border-radius: 5px; overflow: hidden; display: flex; gap: 2px; background: #2a322d}
.ratio-bar i {display: block; height: 100%}
.ratio-win {background: var(--lime)}
.ratio-loss {background: var(--red)}
.stat-card:has(.ratio-bar) h2 {margin-bottom: 26px}
.overview-performance .stat-card {min-height: 182px}
.overview-performance .stat-card>strong {font-size: 34px}
.overview-performance .stat-card h2 {font-size: 12px}
.overview-performance .stat-card:has(.gauge-slot) h2 {max-width: calc(100% - 80px)}
.overview-performance .gauge-slot {position: absolute; right: 18px; top: 96px; width: 84px; height: 52px; margin: 0; padding: 0}
.overview-performance .gauge-slot svg {width: 84px; height: 47px}
.overview-performance .stat-card p {margin-top: auto; padding-top: 14px}
.overview-performance .stat-card:has(.ratio-bar) h2 {margin-bottom: 16px}
.overview-performance .ratio-bar {margin-bottom: 0}
.activity-row {display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px}
.activity-card, .streak-card {min-height: 180px; padding: 21px}
.panel-heading {display: flex; justify-content: space-between; align-items: center; gap: 12px}
.panel-heading h2, .streak-card h2 {font: 600 17px/1.4 Manrope, sans-serif; margin: 0; letter-spacing: -.4px}
.headline-value {font: 600 35px/1.15 Manrope, sans-serif; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; display: block; margin-bottom: 5px}
.activity-card h2 {font: 500 14px/1.4 'DM Sans', sans-serif; color: #c7d0ca; letter-spacing: 0}
.soft-tag {font-size: 10px; font-weight: 500; color: var(--muted); padding: 5px 8px; border: 1px solid var(--edge); border-radius: 5px; letter-spacing: 1px}
.activity-chart {height: 62px; margin-top: 24px}
.activity-chart svg {display: block; height: 62px; width: 100%; stroke: none}
.chart-line {fill: none; stroke: var(--lime); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round}
.activity-empty {display: flex; align-items: center; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); height: 62px}
.streak-icon {color: var(--lime); width: 19px; height: 19px}
.streak-grid {display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-align: center; margin: 20px 0 0}
.streak-grid>div {background: transparent; border: 0; border-radius: 0; padding: 8px}
.streak-grid>div+div {border-left: 1px solid var(--edge)}
.streak-grid strong {display: block; font: 600 35px/1.15 Manrope, sans-serif; font-variant-numeric: tabular-nums; color: var(--lime)}
.streak-grid span {display: block; font-size: 13px; color: var(--muted); margin-top: 4px}
.streak-card p {font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; margin: 10px 0 0}
.balance-panel {padding: 26px; min-height: 382px; display: flex; flex-direction: column; background: linear-gradient(155deg,#c3f87904,transparent 45%),var(--panel)}
.balance-value {font: 600 clamp(30px, 2.25vw, 40px)/1.25 Manrope, sans-serif; letter-spacing: -1.3px; font-variant-numeric: tabular-nums; margin: 27px 0 20px; overflow-wrap: anywhere}
.balance-value small {font: 500 14px 'DM Sans', sans-serif; color: var(--muted); letter-spacing: .3px}
.chart-switch {display: flex; padding: 3px; gap: 2px; border: 1px solid var(--edge); border-radius: 7px; background: #1012137a}
.chart-switch button {background: transparent; color: var(--muted); border: 0; border-radius: 5px; padding: 5px 8px; font-size: 12px; line-height: 1.4}
.chart-switch button.active {background: #c3f87916; color: var(--lime)}
.balance-chart {display: block; width: 100%; height: auto; min-height: 224px; max-height: 340px; flex: 1; fill: none; stroke: none; overflow: visible}
.balance-chart text {font: 12px 'DM Sans', sans-serif; fill: #9aa89f; stroke: none; letter-spacing: 0}
.chart-grid {stroke: #ffffff0a; stroke-width: 1; stroke-dasharray: 3 4}
.chart-area {stroke: none; fill: #c3f8790b}
.chart-end-guide {stroke: #c3f87932; stroke-width: 1; stroke-dasharray: 3 5}
.chart-end-point {fill: var(--lime); stroke: var(--panel); stroke-width: 2}
.chart-caption {font-size: 11px; line-height: 1.6; color: var(--muted); margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--edge); overflow-wrap: anywhere}
.chart-empty {display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; min-height: 237px; border: 1px dashed #ffffff10; border-radius: 10px; margin-top: 18px; font-size: 14px; color: var(--muted); background: #ffffff01}
.calendar-panel {padding: 22px; overflow: hidden}
.panel-eyebrow {font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: #8f9b94; margin-bottom: 9px}
.calendar-heading {display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 58px; margin-bottom: 20px}
.calendar-navigation {display: flex; align-items: center; gap: 12px; min-width: 0}
.calendar-navigation h2 {font: 600 20px/1.3 Manrope, sans-serif; text-transform: capitalize; margin: 0; letter-spacing: -.6px; white-space: nowrap}
.calendar-navigation .icon-button {width: 30px; height: 30px; border-radius: 8px; font-size: 23px; background: transparent}
.calendar-totals {display: flex; align-items: stretch; border: 1px solid var(--edge); border-radius: 8px; background: #11141566; text-align: center; padding: 10px 0; color: var(--muted); font-size: 11px}
.calendar-totals>span {padding: 0 13px; border-right: 1px solid var(--line); white-space: nowrap}
.calendar-totals>span:last-child {border: 0}
.calendar-totals b {display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums}
.calendar-totals b.accent {color: var(--lime)}
.calendar-scroll {overflow-x: auto; scrollbar-width: thin}
.profit-calendar {display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(86px, 1fr); gap: 7px; min-width: 592px}
.calendar-weekday {text-align: center; padding: 5px 0 13px; font-size: 11px; font-weight: 600; color: #a1aca5}
.calendar-day, .calendar-week-total {
  position: relative; min-width: 0; min-height: 87px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 25px 4px 9px;
  border: 1px solid #ffffff0c; border-radius: 7px; background: #11141544;
  font-variant-numeric: tabular-nums;
}
.calendar-day .day-number {position: absolute; top: 8px; left: 9px; font-size: 11px; line-height: 1.2; color: #a9b4ad}
.calendar-day strong, .calendar-week-total strong {font-size: 14px; font-weight: 600; letter-spacing: -.3px}
.calendar-day small, .calendar-week-total small {font-size: 12px; color: var(--muted); line-height: 1.4}
.calendar-day.outside {border-color: #ffffff04; background: transparent}
.calendar-day.outside .day-number {color: #515b55}
.calendar-day.up {background: #c3f87908; border-color: #c3f8791f}
.calendar-day.down {background: #ec929208; border-color: #ec929220}
.calendar-day.today {border-color: #e2b86d85}
.calendar-day.today .day-number {color: var(--amber)}
.calendar-day:hover {background: #ffffff05; border-color: #c3f87966}
.calendar-day.outside:hover {background: transparent; border-color: #ffffff04}
.calendar-week-total {background: #c3f87908; border-color: #c3f87928; padding: 8px 4px}
.calendar-week-total strong {font-size: 14px}
.calendar-footer {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 17px; padding: 14px 2px 0; border-top: 1px solid var(--edge)}
.legend-dot {display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin: 0 5px 1px 13px}
.legend-dot:first-child {margin-left: 0}
.legend-dot.positive {background: var(--lime)}
.legend-dot.negative {background: var(--red)}
.accent {color: var(--lime)}
.analytics-status {font-size: 13px; line-height: 1.7; color: var(--muted); padding: 16px 0 8px}
.calculation-help {font-size: 13px; color: var(--muted); margin: 0 0 26px}
.calculation-help summary {width: fit-content; cursor: pointer}
.calculation-help[open] {padding: 16px 18px; background: #ffffff02; border: 1px solid var(--edge); border-radius: 10px}
.calculation-help p {line-height: 1.8; max-width: 1050px; margin-bottom: 0}
#overview-view>#metrics {display: none !important}
.metric-grid {grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px}
.metric {padding: 22px}
.metric:first-child {border-color: var(--edge)}
.metric-title {font-size: 12px; color: var(--muted)}
.metric-value {font-size: 30px; font-weight: 600; letter-spacing: -.9px; margin: 12px 0 8px}
.metric-note {line-height: 1.6}
.market-journal-grid {display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 16px; margin-top: 12px}
.xau-chart-card, .journal-preview {padding: 23px}
.xau-chart-head {margin-bottom: 21px}
.xau-chart-head h2 {font-size: 21px; font-weight: 600; letter-spacing: -.6px}
.xau-chart-head p {font-size: 13px; margin-top: 6px}
.section-tag {font-size: 12px; font-weight: 500; letter-spacing: 1.4px; line-height: 1.5}
.xau-symbol {background: #c3f87908; border-color: #c3f87925; border-radius: 8px; font-size: 12px; letter-spacing: .6px}
.xau-chart-card iframe {height: 368px; border: 1px solid var(--edge); border-radius: 10px}
.xau-chart-foot {font-size: 12px; line-height: 1.6; align-items: baseline; flex-wrap: wrap; margin-top: 15px}
.mini-close {padding: 18px 0; gap: 12px; align-items: center}
.mini-close:first-child {border-top: 0}
.mini-close strong {font-size: 15px; font-weight: 600; white-space: nowrap}
.mini-close small {margin-top: 5px; line-height: 1.5}
.section-heading {margin: 28px 0 16px; gap: 16px; flex-wrap: wrap}
.section-heading h2 {font-size: 19px; letter-spacing: -.45px}
.section-heading .subtle {font-size: 13px}
.button {min-height: 42px; padding: 10px 15px; background: #232927; border: 1px solid #ffffff10; border-radius: 9px; color: #d9e1db; font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 #ffffff04}
.button:hover {filter: none; border-color: #ffffff30; background: #2a322e}
.button.primary {background: var(--lime); border-color: var(--lime); color: #1a2717; font-weight: 600; box-shadow: 0 2px 10px #c3f87908}
.button.primary:hover {background: #cef994; border-color: #cef994}
.button.danger {color: var(--red); background: #ec929208; border-color: #ec929233}
.button.danger:hover {background: #ec929215; border-color: #ec92926b}
.text-button {font-size: 14px; color: var(--lime); padding: 8px 0; font-weight: 500}
.text-button:hover {color: #d6ff9d}
input, select {background: #111615; border: 1px solid #343e37; border-radius: 8px; padding: 11px 12px; font-size: 14px}
.table-panel {border: 1px solid var(--edge); border-radius: 12px; overflow-x: auto; scrollbar-width: thin}
table {font-size: 13px; border-collapse: collapse; width: 100%}
th {background: #11141566; font-size: 10px; text-transform: uppercase; letter-spacing: .75px; color: #9da9a1; font-weight: 600}
th, td {padding: 17px 20px; border-color: #ffffff08}
td {font-variant-numeric: tabular-nums}
td small {font-size: 12px; line-height: 1.5; margin-top: 5px}
tbody tr:hover {background: #ffffff03}
#all-accounts th:nth-child(n+4):nth-child(-n+6), #all-accounts td:nth-child(n+4):nth-child(-n+6),
#overview-accounts th:nth-child(n+4):nth-child(-n+6), #overview-accounts td:nth-child(n+4):nth-child(-n+6),
#positions-table th:nth-child(n+4):nth-child(-n+8), #positions-table td:nth-child(n+4):nth-child(-n+8),
#deals-table th:nth-child(n+5), #deals-table td:nth-child(n+5),
#daily-table th:last-child, #daily-table td:last-child {text-align: right}
.account-link {gap: 13px}
.account-link .name {font-size: 14px; font-weight: 500}
.account-link:hover .name {color: var(--lime)}
.account-symbol {width: 36px; height: 36px; border-radius: 8px; background: #c3f8790a; color: var(--lime); border: 1px solid #c3f87920; font-weight: 600}
.role-badge {display: inline-flex; padding: 4px 8px; border-radius: 5px; background: #ffffff03; border: 1px solid #ffffff13; font-size: 11px; font-weight: 500}
.role-badge.master {background: #c3f8790a; border-color: #c3f87925; color: var(--lime)}
.status {font-size: 12px}
.status.connected:before, .status.stale:before {box-shadow: none}
.empty, .state-box {padding: 34px 24px; font-size: 14px; line-height: 1.7}
.state-box .button {margin-top: 6px}
.account-toolbar {display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px}
.filters {display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--edge); border-radius: 9px; background: #16191a}
.filter {padding: 9px 13px; min-height: 36px; font-size: 13px; border-radius: 6px; white-space: nowrap}
.filter.active {color: var(--lime); background: #c3f87912; border-color: #c3f87915}
.filter:hover {color: var(--text)}
.search {border-color: var(--edge); padding: 12px 14px; border-radius: 9px; background: #16191a}
.search input {font-size: 14px; width: 210px; background: transparent; padding: 0; border: 0}
.removed-panel {padding: 18px 21px; margin-top: 22px; background: #ffffff02}
.removed-panel summary {font-size: 14px}
.removed-panel p {font-size: 13px; line-height: 1.7}
.position-summary {gap: 16px}
.position-summary>.panel {padding: 24px}
.position-summary strong {font: 600 29px/1.4 Manrope, sans-serif; letter-spacing: -.7px; margin-top: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere}
.position-summary span {font-size: 14px}
.live-masters {display: grid; grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr)); gap: 16px}
.slot-grid {gap: 16px; margin-top: 16px}
.slot-card {padding: 24px}
.slot-card:hover {border-color: #c3f87932}
.master-slot {border-color: #c3f8792b; background: var(--panel); box-shadow: inset 0 2px 0 #c3f8792b, var(--surface-shadow)}
.slot-card-top {margin-bottom: 23px}
.slot-card h2 {font-size: 21px; font-weight: 600; letter-spacing: -.6px}
.slot-number {font-size: 10px; font-weight: 600; letter-spacing: 1.3px}
.slot-account {font-size: 13px; line-height: 1.5; margin: 6px 0 23px}
.slot-data {gap: 18px 16px; padding-top: 19px; border-top: 1px solid var(--edge); font-size: 12px}
.slot-data b {font-size: 16px; font-weight: 500; margin-top: 7px; font-variant-numeric: tabular-nums}
.slot-card-bottom {padding-top: 17px; border-color: var(--edge)}
.slot-card-bottom .button {min-height: 34px; font-size: 12px}
.live-module {padding: 23px}
.live-alerts {padding: 20px 23px; margin: 18px 0}
.live-module-head {gap: 15px; margin-bottom: 19px}
.live-module-head h2 {font-size: 19px}
.live-alerts .live-module-head {margin: 0}
.live-alerts h2 {font-size: 15px}
.live-alerts ul {font-size: 14px; line-height: 1.8; margin-bottom: 0}
.map-grid {gap: 14px}
.map-master {padding: 20px; border: 1px solid #c3f87925; border-radius: 10px; background: #c3f87904}
.map-master b {font-size: 14px; font-weight: 600}
.map-master small {font-size: 13px}
.map-copy {font-size: 12px; padding: 7px 9px; background: #ffffff02; border: 1px solid #ffffff15; border-radius: 6px}
.map-copy i {font-size: 12px}
.live-module-grid {gap: 16px}
.risk-card {padding: 21px}
.risk-card>span {font-size: 13px}
.risk-card strong {font: 600 30px/1.3 Manrope, sans-serif; margin: 14px 0 10px; font-variant-numeric: tabular-nums}
.risk-bar {height: 5px; background: #ffffff08; margin-top: 21px}
.history-toolbar {background: #16191a; padding: 20px; gap: 14px; border: 1px solid var(--edge); align-items: flex-end}
.history-toolbar label {font-size: 12px; gap: 8px}
.history-toolbar input, .history-toolbar select {height: 43px; background: #101514; border-color: #ffffff16}
.history-toolbar .button {min-height: 43px}
.history-pages {font-size: 13px; padding: 8px 0; margin: 18px 0 22px; flex-wrap: wrap}
.history-pages .button {font-size: 13px}
.setup-notice {border: 1px solid #c3f8791d; border-radius: 10px; background: #c3f87905; color: #bcc8ba; font-size: 14px; line-height: 1.8; padding: 17px 20px; margin: 20px 0; overflow-wrap: anywhere}
.connection-grid {gap: 18px; align-items: start}
.connection-card {padding: 28px}
.connection-card h2 {font-size: 24px; margin: 8px 0 17px; letter-spacing: -.65px}
.connection-card p {font-size: 14px; line-height: 1.8}
.connection-card>.section-tag {color: #a6b7a0}
.field-label {font-size: 13px; gap: 10px}
.field-label input {font-size: 13px; min-height: 45px}
.download-stack {display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0}
.download-stack>a {grid-column: 1/-1; min-height: 48px; margin-top: 4px}
.download-stack .button {white-space: normal; text-align: center}
.setup-steps li {gap: 17px; margin-top: 27px; align-items: flex-start}
.setup-steps li>span {display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; flex-shrink: 0; color: var(--lime); background: #c3f87909; border: 1px solid #c3f87922; border-radius: 9px; font-size: 12px}
.setup-steps h3 {font-size: 16px; font-weight: 600; margin-top: 4px}
.setup-steps p {margin: 6px 0 0}
#connection-summary {font-size: 14px; color: var(--muted); line-height: 1.7}
dialog {width: min(1080px,94vw); max-height: 88vh; border: 1px solid #ffffff20; border-radius: 16px; background: var(--panel); padding: 30px; box-shadow: 0 24px 100px #0008}
dialog::backdrop {background: #060908cc; backdrop-filter: blur(6px)}
.dialog-header {margin-bottom: 24px}
.detail-head {gap: 18px; flex-wrap: wrap}
.detail-head h2 {font-size: 26px; letter-spacing: -.7px}
#account-detail>p {font-size: 14px; line-height: 1.7}
.detail-stats {grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 25px 0}
.detail-stats>div {background: #ffffff03; border: 1px solid var(--edge); padding: 16px; border-radius: 10px; min-width: 0}
.detail-stats span {font-size: 12px}
.detail-stats strong {font-size: 19px; font-weight: 500; overflow-wrap: anywhere; margin-top: 7px; font-variant-numeric: tabular-nums}
.detail-stats>div:last-child strong {font-size: 14px; line-height: 1.6}
/* The access page uses the same brand, with a monochrome gold atmosphere. */
.browser-login {display: flex; flex-direction: column; overflow-y: auto; padding: 38px 6vw 24px; background: radial-gradient(ellipse at 78% 36%,#2b302e55,transparent 56%),#101213; isolation: isolate}
.login-scene {position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; user-select: none}
.login-ambient-light {position: absolute; width: 75vw; height: 75vw; top: -42vw; right: -23vw; border-radius: 50%; background: radial-gradient(circle,#818b8315,transparent 68%)}
.login-grid {position: absolute; inset: 0; background-image: linear-gradient(#ffffff04 1px,transparent 1px),linear-gradient(90deg,#ffffff04 1px,transparent 1px); background-size: 80px 80px; mask-image: radial-gradient(ellipse at 50% 55%,#0008,transparent 75%)}
.login-float {position: absolute; top: var(--top); left: var(--rest-x,10%); color: #a2aaa5; opacity: .58; pointer-events: none}
.login-float:nth-child(3) {--rest-x: 10%}
.login-float:nth-child(4) {--rest-x: 74%}
.login-float:nth-child(5) {--rest-x: 4%}
.login-float:nth-child(6) {--rest-x: 83%}
.login-float:nth-child(7) {--rest-x: 21%}
.login-float:nth-child(8) {--rest-x: 68%}
.login-float:nth-child(9) {--rest-x: 7%}
.login-float:nth-child(10) {--rest-x: 87%}
.login-float:nth-child(11) {--rest-x: 51%}
.login-float:nth-child(12) {--rest-x: 45%}
.float-word {font: 600 23px/1.2 Manrope,sans-serif; letter-spacing: 2px; padding: 14px 19px; border: 1px solid #9aa39d1f; border-radius: 10px; background: linear-gradient(135deg,#9aa39d07,#11151433); box-shadow: 0 14px 28px #00000032,inset 0 1px 0 #ffffff04}
.float-word small {display: block; font: 500 8px/1.5 'DM Sans',sans-serif; letter-spacing: 2.5px; margin-top: 6px; color: #919b94}
.float-word.float-small {font-size: 16px; padding: 11px 15px}
.float-bullion svg {display: block; width: var(--size); height: auto; aspect-ratio: 130/104; filter: drop-shadow(0 16px 14px #0009)}
.float-logo {opacity: .38; filter: drop-shadow(0 10px 12px #0008)}
.login-scene .brandmark {display: block; width: 60px; height: 64px; font-size: 59px; line-height: 64px; letter-spacing: -5px; color: inherit}
.login-scene .brandmark span {font-size: 37px; right: -4px; top: -13px; color: inherit}
.login-scene .float-small .brandmark {width: 39px; height: 43px; font-size: 40px; line-height: 43px; letter-spacing: -3px}
.login-scene .float-small .brandmark span {font-size: 25px; top: -9px; right: -3px}
/* Reuse the access-page scene beneath the dashboard's opaque surfaces. */
.dashboard-scene {inset: var(--header) 0 0 var(--rail); opacity: .75}
.dashboard-scene .login-grid {opacity: .6}
body.nav-collapsed .dashboard-scene {left: 0}
body:has(#browser-login:not([hidden])) :is(.dashboard-scene,.sidebar-scene) {display: none}
/* Keep the shared gold atmosphere inside the navigation's own bounds. */
.sidebar-scene {position: absolute; inset: 0; --sidebar-span: var(--rail); opacity: .8; border-radius: inherit}
.sidebar-scene .login-grid {background-size: 48px 48px; opacity: .55}
.sidebar-scene .login-ambient-light {width: 360px; height: 360px; top: -220px; right: -190px}
.sidebar-scene .float-word {font-size: 14px; padding: 9px 12px; letter-spacing: 1.6px; opacity: .32}
.sidebar-scene .float-logo {opacity: .28}
.sidebar-scene .float-bullion {opacity: .5}
.sidebar-scene .login-float:nth-child(4) {--rest-x: 55%}
.sidebar-scene .login-float:nth-child(5) {--rest-x: 18%}
.sidebar-scene .login-float:nth-child(6) {--rest-x: 58%}
.sidebar-scene .login-float:nth-child(7) {--rest-x: 40%}
@media (max-width: 760px) {
  .dashboard-scene {bottom: calc(78px + env(safe-area-inset-bottom,0px))}
  .dashboard-scene .login-float:nth-child(n+9) {display: none}
  .sidebar-scene {--sidebar-span: 100vw}
  .sidebar-scene .float-word {top: 15px; font-size: 11px; padding: 6px 8px; letter-spacing: 1px}
  .sidebar-scene .float-word small {display: none}
  .sidebar-scene .float-bullion {top: 13px}
  .sidebar-scene .float-bullion svg {width: 48px}
  .sidebar-scene .float-logo {top: 12px}
  .sidebar-scene .float-small .brandmark {width: 26px; height: 28px; font-size: 27px; line-height: 28px; letter-spacing: -2px}
  .sidebar-scene .float-small .brandmark span {font-size: 17px; top: -6px; right: -2px}
  .sidebar-scene .login-float:nth-child(4) {--rest-x: 43%}
  .sidebar-scene .login-float:nth-child(5) {--rest-x: 72%}
  .sidebar-scene .login-float:nth-child(6) {--rest-x: 91%}
  .sidebar-scene .login-float:nth-child(n+7) {display: none}
}
.login-layout {position: relative; width: min(1180px,100%); display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,420px); gap: clamp(48px,8vw,120px); align-items: center; margin: auto; padding: 56px 0}
.login-brand {margin-bottom: 65px; font-size: 28px; gap: 14px}
.login-brand .brand-sub {font-size: 10px; letter-spacing: 2.6px}
.login-kicker {display: flex; align-items: center; gap: 9px; color: #a7b2aa; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; margin-bottom: 22px}
.login-kicker>span {display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px #c3f87908}
.login-intro h1 {font: 500 clamp(45px,4.6vw,68px)/1.1 Manrope,sans-serif; letter-spacing: -2.5px; margin: 0; color: var(--text)}
.login-intro h1>span {color: #a7b0aa}
.login-intro>p {max-width: 420px; color: #a4ada7; font-size: 14px; line-height: 1.9; margin: 26px 0 0}
.login-facts {display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 34px; color: #bcc8bd; font-size: 10px; font-weight: 500; letter-spacing: 1px}
.login-facts>span:first-child {color: var(--lime)}
.login-facts i {width: 3px; height: 3px; border-radius: 50%; background: #68756b}
.browser-login-card {position: relative; width: 100%; border: 1px solid #ffffff18; border-radius: 18px; padding: 34px; background: #171c1bf2; box-shadow: 0 35px 100px #00000066,inset 0 1px 0 #ffffff08}
.browser-login-card::before {content: ''; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg,transparent,#d1d7d137,transparent)}
.login-card-top {display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px}
.login-card-top .section-tag {font-size: 9px; font-weight: 600; letter-spacing: 1.8px}
.login-shield {display: grid; place-items: center; width: 37px; height: 37px; color: var(--lime); border: 1px solid #c3f87924; border-radius: 10px; background: #c3f87908}
.login-shield svg {width: 17px; height: 17px}
.browser-login-card h2 {font: 600 27px/1.3 Manrope,sans-serif; letter-spacing: -.9px; margin: 0 0 11px}
.browser-login-card p {font-size: 13px; line-height: 1.8; color: var(--muted); margin: 0 0 27px}
.login-code-label {display: block; font-size: 12px; color: #c0cac2; margin-bottom: 10px}
.login-code-field {display: flex; align-items: center; gap: 13px; min-height: 56px; padding: 0 16px; border: 1px solid #ffffff16; border-radius: 10px; background: #111615}
.login-code-field>svg {width: 17px; height: 17px; color: #748278}
.login-code-field:focus-within {border-color: #c3f87980; box-shadow: 0 0 0 4px #c3f87908}
.browser-login-card .login-code-field input {width: 100%; min-width: 0; min-height: 54px; padding: 12px 0; margin: 0; background: transparent; border: 0; border-radius: 0; font-size: 16px; letter-spacing: .4px; color: var(--text); caret-color: var(--lime)}
.login-code-field input::placeholder {font-size: 13px; letter-spacing: .1px; color: #78867c}
.login-code-field input:focus-visible {outline: none}
.login-code-field input:-webkit-autofill {-webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px #111615 inset}
.browser-login-card button {display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 51px; padding-inline: 17px; margin-top: 15px; border-radius: 10px; font-size: 13px}
.browser-login-card button svg {width: 18px; height: 18px}
#browser-login-error {font-size: 12px; margin-top: 16px; line-height: 1.7}
#browser-login-error:empty {display: none}
.login-privacy {display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 23px; margin-top: 25px; border-top: 1px solid var(--edge); font-size: 11px; color: #8e9c92}
.login-privacy svg {width: 13px; height: 13px}
.login-footer {position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1180px,100%); margin: 0 auto; padding: 23px 0 0; border-top: 1px solid #ffffff0a; color: #7f8c83; font-size: 10px; letter-spacing: 1.2px}
.toast {border-radius: 12px; padding: 15px 20px; box-shadow: 0 12px 50px #0006; font-size: 14px}
footer {font-size: 12px; border-color: var(--line); padding: 26px 0; margin-top: 28px; gap: 14px; flex-wrap: wrap}
footer>span:first-child {letter-spacing: 1.4px}
footer b {color: #c2d0bb; font-weight: 500}
.footer-divider {padding: 0 8px; color: #59695e}
body.nav-collapsed .sidebar {display: none}
body.nav-collapsed .main-shell {margin-left: 0}

@media (min-width: 1720px) {
  :root {--rail: 260px; --header: 80px}
  main {padding: 30px 36px 0}
  .analytics-layout {gap: 18px}
  .analytics-left, .analytics-right, .performance-grid, .activity-row {gap: 16px}
  .stat-card {min-height: 198px; padding: 20px 22px 17px}
  .activity-card, .streak-card {min-height: 182px}
  .calendar-panel {padding: 21px}
  .calendar-day, .calendar-week-total {min-height: 99px}
  .calendar-totals>span {padding-inline: 18px}
  .balance-panel {min-height: 409px; padding: 25px}
}
@media (max-width: 1380px) {
  :root {--rail: 216px}
  main {padding: 24px 22px 0}
  .sidebar {padding-inline: 12px}
  .sidebar-label {padding-inline: 12px}
  .nav-item {gap: 11px; padding-inline: 12px}
  .overview-toolbar {gap: 18px; flex-wrap: wrap}
  .overview-controls {max-width: none; min-width: 470px}
  .welcome h1 {font-size: 30px}
  .analytics-layout {grid-template-columns: minmax(320px,1fr) minmax(0,1.4fr); gap: 16px}
  .performance-grid, .activity-row {gap: 12px}
  .stat-card {padding: 16px 14px 13px}
  .stat-card>strong {font-size: 32px}
  .stat-card h2 {font-size: 14px}
  .activity-card, .streak-card {padding: 19px 17px}
  .panel-heading h2, .streak-card h2 {font-size: 15px}
  .calendar-panel {padding: 14px}
  .calendar-heading {gap: 12px; flex-wrap: wrap; margin-bottom: 13px}
  .calendar-navigation {gap: 9px}
  .calendar-totals {margin-left: auto}
  .calendar-day, .calendar-week-total {min-height: 82px}
  .profit-calendar {min-width: 570px}
  .calendar-day strong, .calendar-week-total strong {font-size: 13px}
  .account-toolbar {flex-wrap: wrap}
  .search {flex: 1}
  .search input {width: 100%}
  .connection-card {padding: 23px}
}
@media (max-width: 1120px) {
  .overview-toolbar {align-items: flex-start}
  .overview-controls {width: 100%; flex-basis: 100%; min-width: 0; justify-content: flex-start}
  .account-control {max-width: none}
  .analytics-layout {grid-template-columns: minmax(0,1fr)}
  .analytics-left {grid-template-columns: minmax(0,1fr); align-items: stretch}
  .analytics-left, .analytics-right {grid-template-rows: auto}
  .overview-performance {grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 16px}
  .balance-panel {min-height: 0; padding: 22px 18px}
  .balance-chart {min-height: 180px; margin-top: 18px}
  .chart-empty {min-height: 252px}
  .activity-card, .streak-card {min-height: 190px}
  .calendar-heading {flex-wrap: nowrap}
  .calendar-day, .calendar-week-total {min-height: 98px}
  .calendar-panel {padding: 20px}
  .market-journal-grid {grid-template-columns: 1fr}
  .metric-grid {grid-template-columns: repeat(2,minmax(0,1fr))}
  .connection-grid {grid-template-columns: 1fr}
  .detail-stats {grid-template-columns: repeat(2,minmax(0,1fr))}
  .position-summary strong {font-size: 24px}
  .account-toolbar {align-items: stretch}
  .filters {flex-wrap: wrap}
  .search {flex-basis: 100%}
}
@media (max-width: 980px) {
  .analytics-left {grid-template-columns: minmax(0,1fr)}
  .calendar-heading {flex-wrap: wrap}
}
@media (max-width: 760px) {
  :root {--rail: 0px; --header: 70px}
  .topbar {height: var(--header); padding: 0 16px; gap: 12px}
  .topbar-brand {gap: 0}
  .brand {font-size: 22px; gap: 10px}
  .brandmark {width: 31px; height: 37px; font-size: 31px}
  .brand-sub {font-size: 9px; letter-spacing: 1.4px}
  .menu-button, .header-right .demo-chip {display: none}
  .header-right {gap: 9px}
  .header-right>.icon-button {width: 36px; height: 36px}
  .profile-button {padding: 4px; border-radius: 11px}
  .profile-button>svg {display: none}
  .profile-button .avatar {width: 29px; height: 29px}
  .sidebar, body.nav-collapsed .sidebar {display: flex; position: fixed; inset: auto 0 0; z-index: 35; width: 100%; height: calc(74px + env(safe-area-inset-bottom,0px)); padding: 7px 9px calc(6px + env(safe-area-inset-bottom,0px)); background: #111615; border-top: 1px solid #ffffff13; border-right: 0; overflow: visible; backdrop-filter: none}
  .sidebar-label, .sidebar-bottom {display: none}
  .sidebar nav {display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; width: 100%; height: 100%; overflow: visible}
  .nav-item, .nav-item.active {display: flex; width: 100%; min-width: 0; min-height: 0; padding: 7px 1px 5px; margin: 0; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 9px; white-space: normal; box-shadow: none}
  .nav-item::after {content: attr(data-short); font-size: 10px; line-height: 1.2; font-weight: 500; letter-spacing: -.15px}
  .nav-item .nav-text, .nav-item .nav-count {display: none}
  .nav-item.active {border-color: #c3f87920; color: var(--lime)}
  .nav-item svg {width: 19px; height: 19px}
  .main-shell, body.nav-collapsed .main-shell {margin: var(--header) 0 0; padding-bottom: calc(78px + env(safe-area-inset-bottom,0px))}
  main {padding: 23px 15px 0}
  .page-heading {align-items: flex-start; margin-top: 0}
  .page-heading h1 {font-size: 27px}
  .page-heading p {font-size: 14px}
  .overview-toolbar {gap: 19px; margin-bottom: 20px}
  .welcome h1 {font-size: 29px; margin-bottom: 8px}
  .sync-line {font-size: 12px}
  .overview-controls {flex-wrap: wrap; gap: 9px}
  .select-control {min-height: 58px; padding: 9px 12px}
  .account-control {flex-basis: 100%; max-width: none}
  .currency-control {flex: 1}
  .month-control {flex: 2}
  .select-control input, .select-control select {font-size: 16px}
  .analytics-left {grid-template-columns: minmax(0,1fr)}
  .performance-grid {gap: 11px}
  .stat-card {padding: 17px 16px 14px; min-height: 205px; border-radius: 13px}
  .stat-card>strong {font-size: 31px}
  .stat-label {font-size: 12px; letter-spacing: .5px; margin-bottom: 11px}
  .stat-card h2 {font-size: 14px}
  .stat-card p {font-size: 12px}
  .balance-panel {min-height: 0; padding: 21px 19px}
  .panel-heading h2, .streak-card h2 {font-size: 16px}
  .balance-value {font-size: 29px; margin: 21px 0 6px}
  .balance-chart {min-height: 220px; max-height: 290px; margin-top: 8px}
  .chart-empty {min-height: 220px}
  .chart-caption {font-size: 12px}
  .activity-row {grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px}
  .activity-card, .streak-card {padding: 17px 14px; min-height: 180px}
  .activity-card .panel-heading {align-items: flex-start; flex-wrap: wrap; gap: 8px}
  .headline-value {font-size: 29px}
  .activity-card .soft-tag {display: none}
  .activity-chart {margin-top: 24px}
  .streak-card h2 {font-size: 14px}
  .streak-icon {display: none}
  .streak-grid {gap: 7px; margin-top: 15px}
  .streak-grid>div {padding: 9px 4px}
  .streak-grid strong {font-size: 25px}
  .streak-grid span {font-size: 12px}
  .streak-card p {font-size: 12px; line-height: 1.4}
  .calendar-panel {padding: 15px}
  .calendar-heading {flex-wrap: wrap; gap: 15px; margin-bottom: 17px}
  .calendar-navigation {width: 100%; justify-content: space-between}
  .calendar-navigation h2 {font-size: 20px}
  .calendar-navigation .icon-button {width: 35px; height: 35px}
  .calendar-totals {width: 100%; margin: 0; justify-content: space-evenly; padding: 12px 0}
  .calendar-totals>span {flex: 1; padding-inline: 8px}
  .calendar-totals b {font-size: 14px}
  .calendar-scroll {padding-bottom: 9px}
  .calendar-day, .calendar-week-total {min-height: 89px}
  .calendar-footer {font-size: 12px; line-height: 1.6; margin-top: 10px}
  .profit-calendar {min-width: 600px}
  .analytics-status {font-size: 13px; padding-top: 14px}
  .calculation-help {font-size: 13px; margin-bottom: 23px}
  .market-journal-grid {gap: 14px}
  .xau-chart-card, .journal-preview {padding: 20px 17px}
  .xau-chart-head {gap: 10px}
  .xau-chart-head h2 {font-size: 20px}
  .xau-chart-card iframe {height: 315px}
  .xau-chart-foot {flex-direction: column; gap: 4px; font-size: 12px}
  .mini-close strong {font-size: 14px}
  .mini-close {font-size: 14px; padding-block: 17px}
  .section-heading {margin-top: 25px}
  .section-heading h2 {font-size: 18px}
  .metric-grid {gap: 11px}
  .metric {padding: 18px}
  .metric-value {font-size: 25px}
  .metric-title {font-size: 14px}
  .account-toolbar {flex-direction: column; gap: 13px}
  .filters {display: grid; grid-template-columns: 1fr 1fr; width: 100%}
  .filter {padding: 9px 6px; font-size: 14px}
  .search {flex-basis: auto}
  .search input {font-size: 16px}
  .position-summary {grid-template-columns: 1fr; gap: 12px}
  .position-summary>.panel {padding: 21px}
  .position-summary strong {font-size: 27px}
  .live-masters {grid-template-columns: 1fr}
  .slot-grid {grid-template-columns: 1fr}
  .slot-card {padding: 21px}
  .slot-data b {font-size: 14px}
  .map-grid {grid-template-columns: 1fr}
  .live-module {padding: 20px}
  .live-alerts {padding: 19px}
  .live-alerts ul {font-size: 14px}
  .live-module-grid {grid-template-columns: 1fr 1fr; gap: 12px}
  .risk-card {padding: 17px}
  .risk-card>span {font-size: 12px}
  .risk-card strong {font-size: 27px}
  .history-toolbar {padding: 16px; gap: 12px}
  .history-toolbar label {flex: 1 1 42%}
  .history-toolbar label:first-child {flex-basis: 100%}
  .history-toolbar input, .history-toolbar select {width: 100%; font-size: 16px}
  .history-toolbar .button {flex: 1; font-size: 14px}
  .history-pages {font-size: 12px; gap: 10px}
  .history-pages .button {padding: 9px 10px; font-size: 12px}
  .history-pages>span {flex-basis: 100%; text-align: center; order: 3}
  .connection-card {padding: 23px 19px}
  .connection-card h2 {font-size: 22px}
  .setup-notice {padding: 16px; font-size: 14px}
  .download-stack {gap: 9px}
  .download-stack .button {font-size: 13px}
  .field-label input {font-size: 14px}
  dialog {width: calc(100vw - 20px); max-height: 91vh; padding: 22px 18px; border-radius: 15px}
  .detail-head h2 {font-size: 23px}
  .detail-stats {gap: 9px}
  .detail-stats>div {padding: 13px}
  .detail-stats strong {font-size: 17px}
  .browser-login-card {padding: 30px 26px}
  .toast {bottom: calc(90px + env(safe-area-inset-bottom,0px)); font-size: 14px}
  footer {font-size: 12px; line-height: 1.7; padding-bottom: 24px}
}
.system-strip {display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 0 18px; margin-bottom: 25px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent}
.system-primary {display: flex; align-items: center; gap: 13px; min-width: 0}
.system-primary strong {display: block; font-size: 12px; font-weight: 600}
.system-primary p {font-size: 11px; color: var(--muted); margin: 4px 0 0; line-height: 1.5}
.system-dot {width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0}
.system-strip[data-state=live] .system-dot {background: var(--lime)}
.system-strip[data-state=warning] .system-dot, .system-strip[data-state=paused] .system-dot {background: var(--amber)}
.system-strip[data-state=offline] {border-color: #ec92923d}
.system-strip[data-state=offline] .system-dot {background: var(--red)}
.system-actions {display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-shrink: 0; flex-wrap: wrap}
.system-time {font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums}
.system-chip {border: 1px solid #e2b86d30; background: #e2b86d08; color: var(--amber); padding: 7px 9px; border-radius: 7px; font-size: 12px}
.system-chip:hover {border-color: var(--amber)}
.pause-badge {display: block; width: fit-content; padding: 3px 7px; border: 1px solid #e2b86d30; border-radius: 5px; color: var(--amber); background: #e2b86d08; font-size: 11px; margin-top: 6px; line-height: 1.5}
.slot-card-top {gap: 12px; flex-wrap: wrap}
.slot-card-top>.pause-badge {margin-top: 0; margin-left: auto}
.account-toolbar {flex-wrap: wrap}
.account-toolbar .filters {flex-wrap: wrap}
.account-reset {margin: -7px 0 14px; font-size: 12px}
.emergency-banner[data-tone=success] {border-color: #93d6aa35; background: #93d6aa08}
.resume-help {border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.7}
.resume-help summary {cursor: pointer; color: var(--lime)}
.resume-help ol {padding-left: 20px}
.resume-help li {margin: 9px 0}
.resume-help p {font-size: 12px}
@media (max-width: 1150px) {
 .system-strip {align-items: flex-start; flex-direction: column; gap: 12px}
 .system-actions {width: 100%; justify-content: flex-start}
 .system-actions>.icon-button {margin-left: auto; width: 33px; height: 33px}
}
@media (max-width: 560px) {
 .system-strip {padding: 0 0 16px; margin-bottom: 20px}
 .system-actions {gap: 7px}
 .system-time {flex: 1 1 100%; order: 2}
 .system-primary p {font-size: 12px}
 .account-toolbar .filters {grid-template-columns: repeat(3,minmax(0,1fr))}
 .account-toolbar .filter {font-size: 12px; padding-inline: 5px}
}
.emergency-trigger {border: 1px solid #ec92924d; background: #ec92920d; color: #ec9292; white-space: nowrap; gap: 8px}
.emergency-trigger:hover {background: #ec929221; border-color: #ec9292}
.resume-trigger {color: var(--lime); border-color: #c3f87940; background: #c3f87909; white-space: nowrap}
.resume-trigger:hover {border-color: var(--lime); background: #c3f87916}
#resume-dialog {width: min(820px,calc(100vw - 24px)); max-height: 90vh; overflow-y: auto}
#resume-title {font-size: clamp(24px,4vw,32px); margin: 14px 0}
#resume-description {color: var(--muted); font-size: 14px; line-height: 1.7}
.resume-group {margin: 16px 0; border: 1px solid var(--line); padding: 16px; border-radius: 10px}
.resume-group-heading {display: flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer}
.resume-group-heading input {width: 18px; height: 18px; accent-color: var(--lime); flex-shrink: 0}
.resume-group-heading strong {font-size: 14px; overflow-wrap: anywhere}
.resume-group-heading small {display: block; color: var(--muted); font-size: 12px; margin-top: 4px}
.resume-group p {font-size: 13px}
.resume-group .emergency-list {max-height: 180px}
#resume-error:empty {display: none}
@media (max-width: 560px) {
 .header-right .profile-button {display: none}
 .resume-trigger {font-size: 12px; padding: 9px 10px}
 .resume-group {padding: 12px}
}
@media (max-width: 374px) {
 .topbar {padding-inline: 12px; gap: 8px}
 .topbar .brand {font-size: 20px; gap: 7px}
 .topbar .brand-sub {display: none}
}
.emergency-trigger svg {width: 17px; height: 17px}
.emergency-banner {display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #ec929240; background: #ec92920a; padding: 15px 19px; margin-bottom: 20px; border-radius: 10px; font-size: 14px; line-height: 1.5}
.emergency-banner[hidden] {display: none}
.emergency-banner .button {flex-shrink: 0}
#emergency-dialog {width: min(820px,calc(100vw - 24px)); max-height: 90vh; overflow-y: auto}
#emergency-title {font-size: clamp(24px,4vw,32px); margin: 14px 0}
#emergency-description, .emergency-footnote {color: #a4aaac; line-height: 1.65; font-size: 14px}
.emergency-summary {padding: 16px 0; color: #e3e7e8; font-size: 14px; font-weight: 600}
.emergency-list {max-height: 235px; overflow: auto; border: 1px solid #ffffff12; border-radius: 9px}
.emergency-account {display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 13px 15px; font-size: 13px; border-bottom: 1px solid #ffffff0d}
.emergency-account:last-child {border-bottom: 0}
.emergency-account>div {min-width: 0; overflow-wrap: anywhere}
.emergency-account>div:last-child {text-align: right}
.emergency-account small {display: block; color: #939b9d; margin-top: 5px; font-size: 12px; line-height: 1.5}
.emergency-checkbox {display: flex; align-items: start; gap: 11px; margin: 21px 0; cursor: pointer; font-size: 14px}
.emergency-checkbox input {width: 18px; height: 18px; flex-shrink: 0; accent-color: #c3f879; margin-top: 2px}
.emergency-checkbox small {display: block; color: #939b9d; font-size: 12px; margin-top: 5px}
.emergency-actions {display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin: 20px 0}
.emergency-confirm {background: #ec9292; border-color: #ec9292; color: #261415; font-weight: 700}
.emergency-confirm:hover {background: #f1adad}
.emergency-confirm:disabled {opacity: .45; cursor: not-allowed}
.emergency-result-panel {border-top: 1px solid #ffffff16; padding-top: 18px; margin-top: 24px}
.emergency-result-panel h3 {font-size: 16px; margin: 0 0 14px}
.emergency-footnote {font-size: 12px; margin: 18px 0 0}
#emergency-error:empty {display: none}
@media (max-width: 560px) {
 #fullscreen-button {display: none}
 .header-right {gap: 8px}
 .emergency-trigger {font-size: 12px; padding: 9px 10px}
 .emergency-trigger svg {display: none}
 .emergency-banner {align-items: stretch; flex-direction: column; padding: 14px}
 .emergency-actions .button {flex: 1 1 100%}
 .emergency-account {padding: 12px 10px; gap: 9px; font-size: 12px}
}
@media (max-width: 374px) {
  main {padding-inline: 12px}
  .stat-card {padding-inline: 13px}
  .stat-card>strong {font-size: 28px}
  .stat-label svg {display: none}
  .nav-item::after {font-size: 9px; letter-spacing: -.25px}
  .sidebar {padding-inline: 4px}
  .calendar-totals>span {padding-inline: 5px}
  .activity-row {grid-template-columns: 1fr}
  .activity-card, .streak-card {min-height: 174px}
  .live-module-grid {grid-template-columns: 1fr}
  .detail-stats {grid-template-columns: 1fr}
}
.copier-diagnostic {display:block;max-width:340px;white-space:normal;line-height:1.45;color:#edc781;margin-top:6px;font-size:12px}
.monitor-badge.skipped {color:#edc781;border-color:#705d36}

/* Keep operational panels as legible and consistent as the overview. */
.copier-monitor {padding: 24px; margin-bottom: 24px}
.monitor-heading h2 {font: 600 23px/1.4 Manrope, sans-serif; letter-spacing: -.6px}
.monitor-heading p, .monitor-heading label {font-size: 13px}
.monitor-summary {margin: 21px 0; padding: 16px 18px; gap: 14px 24px; border: 1px solid var(--edge); border-radius: 8px; background: #11141555; font-size: 12px}
.monitor-summary b {font: 600 24px/1.3 Manrope, sans-serif; letter-spacing: -.7px}
.monitor-position {border-color: var(--edge); border-radius: 9px}
.monitor-position>header {padding: 18px 20px; background: #16191a; border-bottom: 1px solid var(--edge)}
.monitor-position h3 {font-size: 15px; font-weight: 500}
.monitor-master-values {font-size: 12px}
.monitor-scroll th {font-size: 10px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; padding: 14px 20px}
.monitor-scroll td {font-size: 13px; padding: 17px 20px}
.monitor-value strong {font-size: 13px}
.monitor-badge {font-size: 11px; font-weight: 600; padding: 5px 8px; border: 1px solid #ffffff08}
.monitor-notices {font-size: 13px; padding-inline: 14px}
.copier-monitor .calculation-help {margin-bottom: 0; font-size: 13px}
.copier-monitor .calculation-help p {font-size: 13px; line-height: 1.7}
.telegram-hero {padding: 26px; align-items: center; gap: 24px; margin-bottom: 16px}
.telegram-hero h2 {font: 600 26px/1.3 Manrope, sans-serif; letter-spacing: -.7px; margin-block: 7px 11px}
.telegram-hero p {font-size: 14px; line-height: 1.8}
.telegram-badge {font-size: 11px; font-weight: 500; padding: 7px 11px}
.telegram-grid {gap: 16px}
.telegram-card {padding: 26px}
.telegram-card h2 {font: 600 21px/1.4 Manrope, sans-serif; letter-spacing: -.5px}
.telegram-card p {font-size: 13px; line-height: 1.8}
.telegram-facts {gap: 10px}
.telegram-facts>div {padding: 14px; border-color: var(--edge); background: #11141555; border-radius: 8px}
.telegram-facts span {font-size: 11px; margin-bottom: 7px}
.telegram-facts b {font-weight: 500}
.telegram-pair-link {border-radius: 8px; font-size: 13px; line-height: 1.7}
.toggle-row {padding: 16px 0; border-color: var(--edge)}
.toggle-row b {font-size: 13px; font-weight: 500}
.toggle-row small {line-height: 1.6}
.emergency-list {border-color: var(--edge); background: #11141555}
.emergency-account {padding: 15px 17px; border-color: var(--edge); font-variant-numeric: tabular-nums}
.emergency-summary {font-variant-numeric: tabular-nums}
.emergency-result-panel {border-color: var(--edge); padding-top: 22px}
.resume-group {padding: 18px; border-color: var(--edge); border-radius: 9px; background: #ffffff02}
#emergency-dialog .dialog-header>.section-tag {color: var(--red)}
#resume-dialog .dialog-header>.section-tag {color: var(--lime)}

@media (max-width: 760px) {
  .copier-monitor, .telegram-card {padding: 20px 17px}
  .monitor-summary {padding: 14px; gap: 12px 18px}
  .monitor-position>header {padding: 16px}
  .telegram-hero {padding: 22px 18px; align-items: flex-start}
  .telegram-hero h2 {font-size: 24px}
  .telegram-hero p {font-size: 13px}
}
@media (max-width: 560px) {
  .monitor-summary span {flex: 1 1 40%}
  .monitor-heading label {width: 100%}
  .resume-group {padding: 14px}
  .emergency-account {padding: 13px 12px; gap: 10px; font-size: 12px}
}

/* Continuous background movement uses only transforms. Live numbers stay still. */
@keyframes gold-flight {
  0% {transform: translate3d(-60px,24px,0) rotate(-9deg)}
  25% {transform: translate3d(calc(25vw + 60px),-18px,0) rotate(-2deg)}
  50% {transform: translate3d(calc(50vw + 120px),30px,0) rotate(6deg)}
  75% {transform: translate3d(calc(75vw + 190px),-14px,0) rotate(2deg)}
  100% {transform: translate3d(calc(100vw + 280px),24px,0) rotate(-9deg)}
}
@keyframes sidebar-flight {
  0% {transform: translate3d(-40px,6px,0) rotate(-8deg)}
  50% {transform: translate3d(calc(var(--sidebar-span) / 2 + 100px),-6px,0) rotate(5deg)}
  100% {transform: translate3d(calc(var(--sidebar-span) + 240px),6px,0) rotate(-8deg)}
}
@keyframes login-enter {
  from {opacity: 0; transform: translate3d(0,12px,0)}
  to {opacity: 1; transform: translate3d(0,0,0)}
}
@keyframes view-enter {
  from {opacity: 0; transform: translate3d(0,6px,0)}
  to {opacity: 1; transform: translate3d(0,0,0)}
}
@media (prefers-reduced-motion: no-preference) {
  .button, .icon-button, .nav-item, .filter, .profile-button, .select-control, .login-code-field {transition: background-color 160ms ease,border-color 160ms ease,color 160ms ease,box-shadow 160ms ease}
  .login-float {left: -220px; will-change: transform; animation: gold-flight var(--duration,48s) linear infinite; animation-delay: var(--delay,0s)}
  .login-float:nth-child(even) {animation-direction: reverse}
  .sidebar-scene .login-float {left: -120px; animation-name: sidebar-flight}
  .login-layout {animation: login-enter 520ms cubic-bezier(.16,1,.3,1) both}
  .view:not([hidden]) {animation: view-enter 240ms cubic-bezier(.16,1,.3,1) both}
  dialog[open] {animation: view-enter 180ms ease both}
}
@media (prefers-reduced-motion: reduce) {
  .login-float {will-change: auto}
}
@media (max-width: 1040px) {
  .login-layout {width: min(470px,100%); grid-template-columns: minmax(0,1fr); gap: 32px; padding: 28px 0 38px}
  .login-brand {margin-bottom: 30px; font-size: 26px}
  .login-intro h1 {font-size: 47px; letter-spacing: -1.8px}
  .login-intro>p {max-width: 440px; font-size: 13px; margin-top: 20px}
  .login-kicker {margin-bottom: 17px}
  .login-facts {margin-top: 24px}
  .login-footer {width: min(470px,100%)}
}
@media (max-width: 560px) {
  .browser-login {padding: 20px 22px 21px}
  .login-layout {gap: 27px; padding: 20px 0 32px}
  .login-brand {margin-bottom: 27px; font-size: 25px}
  .login-brand .brand-sub {font-size: 9px; letter-spacing: 2px}
  .login-intro h1 {font-size: 37px; letter-spacing: -1.5px}
  .login-intro>p, .login-kicker, .login-facts {display: none}
  .browser-login-card {padding: 27px 24px; border-radius: 15px}
  .browser-login-card h2 {font-size: 25px}
  .login-card-top {margin-bottom: 21px}
  .browser-login-card p {margin-bottom: 22px; font-size: 12px}
  .login-privacy {margin-top: 22px; padding-top: 20px; font-size: 10px}
  .login-footer {font-size: 9px; letter-spacing: .8px; gap: 12px; padding-top: 18px}
  .login-scene .login-float:nth-child(n+10) {display: none}
  .float-word {font-size: 18px; padding: 12px 15px}
  .float-bullion {opacity: .48}
}
@media (max-width: 760px) {
  .overview-performance .stat-card {min-height: 205px}
  .overview-performance .stat-card>strong {font-size: 31px}
  .overview-performance .stat-card h2 {font-size: 13px}
  .overview-performance .stat-card:has(.gauge-slot) h2 {max-width: none}
  .overview-performance .gauge-slot {position: static; width: auto; height: 60px; margin: auto 0 0; padding-top: 8px}
  .overview-performance .stat-card p {padding-top: 0; margin-top: 9px}
}
