:root {
  --font-fa: "Mitra", "B Mitra", "BMitra", "Far.Mitra", "Far_Mitra", Tahoma, "Segoe UI", Arial, sans-serif;
  --sapphire: #300338;
  --witch-haze: #FBEC70;
  --cerulean: #01689C;
  --jade: #00AD6F;
  --viking: #32B8CB;
  --water-leaf: #B8EAD9;
  --buy: #01689C;
  --sell: #b84363;
  --gold: #FBEC70;
  --azure: #01689C;
  --navy: #300338;
  --tiffany-deep: #32B8CB;
  --radius: 16px;
  --shadow: 0 16px 44px rgba(48, 3, 56, 0.14);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6fbfa;
  --bg-soft: #ebf6f2;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --ink: #300338;
  --muted: #5e6679;
  --line: rgba(1, 104, 156, 0.14);
  --line-strong: rgba(1, 104, 156, 0.24);
  --accent-main: #300338;
  --accent-soft: rgba(184, 234, 217, 0.46);
  --accent-vivid: #32B8CB;
  --accent-alt: #01689C;
  --panel-glow: rgba(251, 236, 112, 0.22);
  --bg-line: rgba(1, 104, 156, 0.08);
  --bg-line-soft: rgba(48, 3, 56, 0.04);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16001b;
  --bg-soft: #22052a;
  --surface: rgba(35, 10, 42, 0.9);
  --surface-strong: rgba(45, 16, 54, 0.98);
  --ink: #f5f9f7;
  --muted: #b2c6c5;
  --line: rgba(184, 234, 217, 0.1);
  --line-strong: rgba(251, 236, 112, 0.24);
  --accent-main: #FBEC70;
  --accent-soft: rgba(50, 184, 203, 0.16);
  --accent-vivid: #32B8CB;
  --accent-alt: #00AD6F;
  --panel-glow: rgba(50, 184, 203, 0.18);
  --bg-line: rgba(184, 234, 217, 0.07);
  --bg-line-soft: rgba(251, 236, 112, 0.05);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

@font-face {
  font-family: "Mitra";
  src:
    local("B Mitra"),
    local("BMitra"),
    local("Mitra"),
    local("Far.Mitra"),
    local("Far_Mitra"),
    local("Mitra Bold");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    repeating-linear-gradient(135deg, transparent 0 28px, var(--bg-line) 28px 29px),
    repeating-linear-gradient(35deg, transparent 0 42px, var(--bg-line-soft) 42px 43px),
    radial-gradient(circle at top right, var(--panel-glow), transparent 28%),
    radial-gradient(circle at top left, rgba(50, 184, 203, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--ink);
  font-family: var(--font-fa);
  font-size: 15px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 102px;
}

.topbar,
.panel-head,
.risk-strip,
.row,
.ticker {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 14px;
}

.topbar-copy {
  min-width: 0;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-vivid);
  font-size: 12px;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 2.4vw, 29px);
  line-height: 1.4;
}

h2 {
  font-size: 17px;
  line-height: 1.45;
}

h3 {
  font-size: 14px;
  line-height: 1.45;
}

.muted,
.topbar p,
small,
.metric-card small,
.chart-meta {
  color: var(--muted);
}

.ghost,
button,
.ghost-button,
input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.ghost,
.ghost-button {
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  color: var(--ink);
  padding: 8px 12px;
  min-height: 38px;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-vivid));
  color: #fff;
  cursor: pointer;
  padding: 9px 14px;
  min-height: 40px;
  box-shadow: 0 10px 22px rgba(48, 3, 56, 0.22);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-vivid);
  box-shadow: 0 0 0 4px rgba(50, 184, 203, 0.12);
}

.panel,
.metric-card,
.risk-strip,
.chart-shell,
.preview-box,
.glass-nav {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel,
.metric-card,
.chart-shell,
.preview-box {
  border-radius: var(--radius);
}

.panel {
  padding: 14px;
  margin-bottom: 10px;
}

.inset-panel {
  margin-bottom: 0;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
}

.view-intro {
  display: grid;
  gap: 6px;
  margin: 8px 0 14px;
}

.compact {
  padding: 13px 14px;
}

.sync-panel .panel-head {
  margin-bottom: 0;
}

.panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.compact-inline-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-inline-form label {
  min-width: 180px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.ticker {
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.metric-card {
  min-width: 220px;
  flex: 1;
  padding: 16px;
}

.ticker-compact {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 6px;
  margin: 6px 0 10px;
  align-items: stretch;
  overflow-x: auto;
}

.ticker-compact .metric-card {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(48, 3, 56, 0.1);
}

.ticker-compact .metric-card span {
  font-size: 10.5px;
}

.ticker-compact .metric-card strong {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.15;
}

.ticker-compact .metric-card small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.25;
}

.theme-toggle {
  white-space: nowrap;
}

.metric-card-quote {
  background: linear-gradient(135deg, rgba(41, 133, 229, 0.13), rgba(255, 255, 255, 0.96));
}

.metric-card-equity {
  background: linear-gradient(135deg, rgba(129, 216, 208, 0.2), rgba(255, 255, 255, 0.96));
}

.metric-card-buy {
  background: linear-gradient(135deg, rgba(38, 125, 226, 0.14), rgba(255, 255, 255, 0.96));
}

.metric-card-sell {
  background: linear-gradient(135deg, rgba(217, 79, 113, 0.12), rgba(255, 255, 255, 0.96));
}

.metric-card-ounce {
  background: linear-gradient(135deg, rgba(199, 158, 70, 0.14), rgba(255, 255, 255, 0.96));
}

.metric-card-dollar {
  background: linear-gradient(135deg, rgba(0, 173, 111, 0.14), rgba(255, 255, 255, 0.96));
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.demo-metric-card {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(129, 216, 208, 0.12), rgba(255, 255, 255, 0.96));
}

.demo-metric-card strong {
  margin-top: 6px;
  font-size: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.4;
}

.ounce-ticker-card {
  min-width: 180px;
  max-width: 220px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 246, 246, 0.84));
}

.risk-strip {
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  margin: 12px 0 14px;
}

.risk-copy {
  display: grid;
  gap: 6px;
}

.risk-dot {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 999px;
  margin-top: 4px;
  background: var(--tiffany-deep);
  box-shadow: 0 0 0 6px rgba(51, 184, 198, 0.14);
}

.risk-strip.warning .risk-dot {
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(199, 158, 70, 0.16);
}

.risk-strip.danger .risk-dot {
  background: var(--sell);
  box-shadow: 0 0 0 6px rgba(217, 79, 113, 0.16);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-grid,
.split,
.form-grid,
.account-grid,
.login-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: 1.55fr 1fr;
}

.dashboard-grid.order-grid {
  grid-template-columns: 0.95fr 1.15fr 1fr;
}

.dashboard-grid .wide {
  min-height: 360px;
}

.ounce-panel {
  min-height: 0;
}

.ounce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.ounce-latest-panel {
  padding: 14px 14px 12px;
}

.ounce-price-stack {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.ounce-price-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(238, 249, 252, 0.72));
  border: 1px solid rgba(205, 231, 240, 0.76);
  opacity: calc(0.4 + (var(--emphasis, 1) * 0.6));
  transform: scale(calc(0.88 + (var(--emphasis, 1) * 0.12)));
  transform-origin: center right;
}

.ounce-price-line span {
  font-weight: 700;
  letter-spacing: 0;
  color: color-mix(in srgb, var(--navy) calc(55% + (var(--emphasis, 1) * 45%)), #93aab6);
  font-size: calc(12px + (var(--emphasis, 1) * 5px));
}

.split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-emphasis {
  align-items: start;
}

.section-note {
  color: var(--muted);
  font-size: 12px;
}

.section-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, rgba(189, 221, 234, 0), rgba(189, 221, 234, 0.95), rgba(189, 221, 234, 0));
}

.inner-head {
  margin-top: 2px;
}

.login-grid {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-form,
.stack-form,
.support-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: grid;
  gap: 8px;
}

.segmented-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented label,
.period-switch button,
.chip-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
}

.segmented label input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  min-width: auto;
}

.period-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.period-switch button {
  min-height: 40px;
  box-shadow: none;
}

.period-switch button.active,
.glass-nav button.active {
  background: linear-gradient(135deg, var(--navy), var(--azure));
  color: #fff;
  border-color: transparent;
}

.chart-panel {
  min-height: 360px;
}

.chart-shell {
  min-height: 260px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.chart-shell.compact {
  min-height: 220px;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  touch-action: pan-y;
}

.chart-callout {
  display: inline-grid;
  justify-self: start;
  gap: 4px;
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 250, 255, 0.92));
  border: 1px solid rgba(189, 221, 234, 0.95);
  box-shadow: 0 10px 26px rgba(26, 73, 115, 0.09);
}

.chart-callout small {
  color: var(--muted);
  font-size: 12px;
}

.chart-callout strong {
  font-size: 20px;
  line-height: 1.2;
}

.chart-callout span {
  color: var(--muted);
  font-size: 13px;
}

.chart-hit,
.chart-overlay {
  cursor: pointer;
}

.chart-hit:focus-visible {
  outline: none;
  stroke: rgba(62, 134, 216, 0.45);
  stroke-width: 2;
  fill: rgba(62, 134, 216, 0.08);
}

.chart-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.chart-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(129, 216, 208, 0.14);
  color: var(--ink);
  font-size: 12px;
}

.badge {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(129, 216, 208, 0.14);
  border: 1px solid rgba(129, 216, 208, 0.25);
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
}

.soft-blue {
  background: rgba(62, 134, 216, 0.12);
  border-color: rgba(62, 134, 216, 0.24);
}

.soft-cyan {
  background: rgba(129, 216, 208, 0.18);
  border-color: rgba(51, 184, 198, 0.22);
}

.soft-gold {
  background: rgba(199, 158, 70, 0.14);
  border-color: rgba(199, 158, 70, 0.24);
}

.support-grid {
  align-items: start;
}

.compact-report-card .notice-head {
  margin-bottom: 8px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat-chip {
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-chip strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
}

.position-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.position-overview-compact {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.compact-position-card {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 96%, transparent), color-mix(in srgb, var(--accent-soft) 70%, transparent));
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.compact-grid .metric-inline {
  padding: 8px 10px;
  border-radius: 12px;
}

.compact-grid .metric-inline span {
  font-size: 11px;
}

.compact-grid .metric-inline strong {
  margin-top: 4px;
  font-size: 14px;
}

.position-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 252, 250, 0.78));
}

.position-card h3 {
  margin-bottom: 12px;
}

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

.position-card-grid .metric-inline {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(189, 221, 234, 0.8);
}

.metric-inline span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-inline strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.list-soft .row {
  background: rgba(255, 255, 255, 0.74);
}

.row {
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(211, 234, 243, 0.84);
  background: rgba(248, 252, 255, 0.86);
}

.position-row-extended,
.auto-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.rule-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.compact-rule {
  border-radius: 16px;
  border: 1px solid rgba(189, 221, 234, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 253, 0.88));
  padding: 12px;
  display: grid;
  gap: 10px;
}

.compact-rule.has-rule {
  border-color: rgba(129, 216, 208, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.compact-rule-head {
  display: grid;
  gap: 4px;
}

.compact-rule-head strong {
  font-size: 14px;
  line-height: 1.4;
}

.compact-rule-head small {
  font-size: 12px;
  line-height: 1.6;
}

.compact-rule-form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) auto;
  gap: 8px;
  align-items: end;
}

.compact-rule-form label {
  gap: 5px;
  font-size: 12px;
}

.compact-rule-form input,
.compact-rule-form select {
  min-height: 40px;
  padding: 10px 12px;
}

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

.mini-confirm,
.mini-delete {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

.trade-position-row .status-pill {
  min-width: 92px;
}

.row-main {
  min-width: 0;
  line-height: 1.7;
}

.row-main b,
.row > b {
  word-break: break-word;
}

.row .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.row button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-info {
  background: rgba(62, 134, 216, 0.12);
  color: #245f97;
  border-color: rgba(62, 134, 216, 0.2);
}

.status-success {
  background: rgba(46, 155, 102, 0.12);
  color: #1d7a4d;
  border-color: rgba(46, 155, 102, 0.22);
}

.status-warning {
  background: rgba(214, 152, 41, 0.13);
  color: #9f6310;
  border-color: rgba(214, 152, 41, 0.22);
}

.status-danger {
  background: rgba(217, 79, 113, 0.12);
  color: #b13257;
  border-color: rgba(217, 79, 113, 0.22);
}

.status-muted {
  background: rgba(96, 123, 140, 0.11);
  color: #597386;
  border-color: rgba(96, 123, 140, 0.18);
}

.profit-text {
  color: var(--buy);
}

.loss-text {
  color: var(--sell);
}

.units-input {
  width: 78px;
  min-width: 78px;
  text-align: center;
  min-height: 36px;
  padding: 8px 10px;
}

.preview-box {
  padding: 14px 16px;
  color: var(--muted);
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.74);
}

.message {
  min-height: 24px;
  margin-top: 8px;
  color: var(--navy);
}

.notice-row {
  align-items: flex-start;
}

.notice-row b {
  max-width: 58%;
  text-align: left;
  line-height: 1.8;
}

.notice-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(201, 227, 236, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 251, 255, 0.9));
}

.notice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.notice-head strong {
  font-size: 13px;
  line-height: 1.6;
}

.notice-head small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.notice-body {
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink);
}

.notice-body.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice-more {
  justify-self: flex-start;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.report-empty {
  font-size: 12px;
  line-height: 1.9;
}

.support-thread {
  display: grid;
  gap: 10px;
}

.support-bubble {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(198, 224, 234, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 251, 255, 0.9));
}

.support-bubble.user {
  background: linear-gradient(180deg, rgba(129, 216, 208, 0.16), rgba(255, 255, 255, 0.96));
}

.support-bubble.assistant {
  background: linear-gradient(180deg, rgba(62, 134, 216, 0.09), rgba(255, 255, 255, 0.96));
}

.support-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.support-bubble-head strong {
  font-size: 13px;
}

.support-bubble-body {
  font-size: 12px;
  line-height: 1.9;
}

.support-rating-box {
  border-style: dashed;
}

.rating-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.rating-actions .small-button {
  min-width: 54px;
}

.account-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 251, 255, 0.76));
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-button {
  padding: 0 12px;
  font-size: 14px;
}

.ghost-button {
  cursor: pointer;
  box-shadow: none;
}

.side-buy {
  color: var(--buy);
}

.side-sell {
  color: var(--sell);
}

.glass-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  z-index: 20;
}

.glass-nav button {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

@media (max-width: 1100px) {
  .dashboard-grid,
  .dashboard-grid.order-grid,
  .split,
  .account-grid,
  .position-overview,
  .ounce-layout {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .rule-grid,
  .compact-rule-form {
    grid-template-columns: 1fr;
  }

  .panel-actions,
  .compact-inline-form {
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100%, calc(100% - 16px));
    padding-bottom: 108px;
  }

  .topbar,
  .panel-head,
  .risk-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .login-grid,
  .form-grid,
  .segmented-2,
  .period-switch {
    grid-template-columns: 1fr;
  }

  .panel-actions,
  .compact-inline-form {
    flex-direction: column;
  }

  .ticker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticker-compact {
    grid-template-columns: repeat(6, minmax(102px, 1fr));
  }

  .metric-card {
    min-width: 0;
  }

  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .position-row-extended,
  .auto-order-row {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }

  .row .actions {
    justify-content: stretch;
  }

  .row .actions button,
  .row .actions .units-input {
    width: 100%;
  }

  .glass-nav {
    bottom: 10px;
  }

  .chart-callout {
    width: 100%;
    justify-self: stretch;
  }
}

/* 2026-05-23 palette refresh */
@font-face {
  font-family: "Mitra";
  src:
    local("B Mitra"),
    local("BMitra"),
    local("Mitra"),
    local("Far.Mitra"),
    local("Far_Mitra");
  font-display: swap;
}

html[data-theme="light"] {
  --bg: #f5f7f4;
  --bg-soft: #eef5f0;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --ink: #300338;
  --muted: #65687a;
  --line: rgba(1, 104, 156, 0.12);
  --line-strong: rgba(48, 3, 56, 0.18);
  --accent-main: #300338;
  --accent-soft: rgba(184, 234, 217, 0.38);
  --accent-vivid: #32B8CB;
  --accent-alt: #01689C;
  --panel-glow: rgba(251, 236, 112, 0.14);
  --bg-line: rgba(1, 104, 156, 0.07);
  --bg-line-soft: rgba(48, 3, 56, 0.04);
  --shadow: 0 16px 34px rgba(48, 3, 56, 0.1);
}

html[data-theme="dark"] {
  --bg: #140017;
  --bg-soft: #1d0423;
  --surface: rgba(29, 8, 35, 0.94);
  --surface-strong: rgba(38, 12, 45, 0.98);
  --ink: #f8faf8;
  --muted: #b9c4c6;
  --line: rgba(184, 234, 217, 0.1);
  --line-strong: rgba(251, 236, 112, 0.18);
  --accent-main: #FBEC70;
  --accent-soft: rgba(50, 184, 203, 0.14);
  --accent-vivid: #32B8CB;
  --accent-alt: #00AD6F;
  --panel-glow: rgba(50, 184, 203, 0.12);
  --bg-line: rgba(184, 234, 217, 0.06);
  --bg-line-soft: rgba(251, 236, 112, 0.04);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

body {
  background:
    repeating-linear-gradient(135deg, transparent 0 34px, var(--bg-line) 34px 38px),
    repeating-linear-gradient(0deg, transparent 0 158px, var(--bg-line-soft) 158px 196px),
    var(--bg);
  font-family: "Mitra", "B Mitra", "BMitra", "Far.Mitra", "Far_Mitra", Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

.shell {
  width: min(1280px, calc(100% - 20px));
  padding: 10px 0 96px;
}

.topbar {
  padding: 4px 0 10px;
}

h1 {
  font-size: clamp(20px, 2.2vw, 26px);
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 13px;
}

.eyebrow,
.muted,
small,
.metric-card small,
.chart-meta,
.panel-head p,
.view-intro p {
  font-size: 11px;
}

.panel,
.metric-card,
.risk-strip,
.chart-shell,
.preview-box,
.glass-nav {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel,
.chart-shell,
.preview-box {
  padding: 12px;
  border-radius: 14px;
}

.metric-card {
  padding: 10px 12px;
  border-radius: 14px;
}

.metric-card strong {
  font-size: 21px;
  margin-top: 6px;
}

.ticker-compact {
  gap: 6px;
  margin: 6px 0 10px;
}

.ticker-compact .metric-card {
  padding: 9px 10px;
  box-shadow: 0 10px 20px rgba(48, 3, 56, 0.08);
}

.metric-card-quote,
.metric-card-equity,
.metric-card-buy,
.metric-card-sell,
.metric-card-ounce,
.demo-metric-card,
.ounce-ticker-card {
  background: var(--surface-strong);
}

.metric-card-quote {
  border-top: 3px solid #01689C;
}

.metric-card-equity {
  border-top: 3px solid #32B8CB;
}

.metric-card-buy {
  border-top: 3px solid #00AD6F;
}

.metric-card-sell {
  border-top: 3px solid #FBEC70;
}

.metric-card-ounce {
  border-top: 3px solid #300338;
}

button {
  background: #01689C;
  box-shadow: 0 10px 18px rgba(1, 104, 156, 0.18);
}

.ghost,
.ghost-button {
  background: var(--surface-strong);
  box-shadow: none;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--line);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(29, 8, 35, 0.94);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="dark"] .glass-nav {
  background: rgba(23, 5, 28, 0.9);
}

.glass-nav button {
  min-height: 42px;
}

.support-bubble,
.notice-card,
.row,
.report-card,
.position-card,
.auto-order-card,
.chart-callout,
.detail-card {
  border-color: var(--line);
  background: var(--surface-strong);
}

.report-card,
.notice-card {
  padding: 10px 11px;
}

.report-card strong,
.notice-title,
.support-bubble-head strong {
  font-size: 12px;
}

.notice-body,
.support-bubble-body,
.report-card p,
.report-card small {
  font-size: 11px;
  line-height: 1.8;
}

@media (max-width: 820px) {
  .ticker-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-05-24 compact trading terminal polish */
:root {
  --radius: 8px;
  --radius-soft: 10px;
  --depth-shadow: 0 10px 24px rgba(22, 32, 50, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  --depth-shadow-tight: 0 6px 14px rgba(22, 32, 50, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.56);
  --button-shadow: 0 7px 14px rgba(1, 104, 156, 0.18);
  --focus-ring: 0 0 0 3px rgba(50, 184, 203, 0.22);
}

html[data-theme="light"] {
  --bg: #f4f7f6;
  --bg-soft: #e9f2ef;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --ink: #172033;
  --muted: #607083;
  --line: rgba(23, 32, 51, 0.1);
  --line-strong: rgba(23, 32, 51, 0.18);
  --accent-main: #01689c;
  --accent-alt: #0aa36f;
  --accent-vivid: #26a9bb;
  --accent-soft: rgba(38, 169, 187, 0.1);
  --panel-glow: rgba(251, 236, 112, 0.14);
}

html[data-theme="dark"] {
  --bg: #141819;
  --bg-soft: #1b2225;
  --surface: rgba(29, 36, 39, 0.9);
  --surface-strong: #20282c;
  --ink: #f3f7f5;
  --muted: #aab8ba;
  --line: rgba(232, 241, 239, 0.1);
  --line-strong: rgba(232, 241, 239, 0.18);
  --accent-main: #f3d95b;
  --accent-alt: #28c08a;
  --accent-vivid: #38b9c8;
  --accent-soft: rgba(56, 185, 200, 0.13);
  --panel-glow: rgba(243, 217, 91, 0.1);
  --depth-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --depth-shadow-tight: 0 7px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 220px),
    linear-gradient(90deg, var(--bg-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--bg-line-soft) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.shell {
  width: min(1210px, calc(100% - 16px));
  padding: 8px 0 82px;
}

.topbar {
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 4px 2px 8px;
}

.eyebrow {
  font-size: 10px;
  margin-bottom: 2px;
}

.topbar h1 {
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.35;
  margin: 0;
}

.topbar p,
.view-intro,
.section-note,
.muted,
.message {
  font-size: 11.5px;
  line-height: 1.7;
}

.topbar-status {
  gap: 6px;
}

.panel,
.metric-card,
.row,
.notice-card,
.report-card,
.position-card,
.auto-order-card,
.compact-rule,
.compact-report-card,
.compact-position-card,
.demo-metric-card,
.chart-shell,
.chart-callout,
.detail-card,
.support-bubble {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16)),
    var(--surface-strong);
  box-shadow: var(--depth-shadow-tight);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .row,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .position-card,
html[data-theme="dark"] .auto-order-card,
html[data-theme="dark"] .compact-rule,
html[data-theme="dark"] .compact-report-card,
html[data-theme="dark"] .compact-position-card,
html[data-theme="dark"] .demo-metric-card,
html[data-theme="dark"] .chart-shell,
html[data-theme="dark"] .chart-callout,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .support-bubble {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    var(--surface-strong);
}

.panel {
  padding: 10px;
  margin-bottom: 8px;
}

.panel-head,
.inner-head,
.section-head,
.notice-head,
.compact-rule-head,
.support-bubble-head {
  gap: 8px;
  margin-bottom: 8px;
}

.panel-head h2,
.inner-head h2,
.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.panel-head h2::before,
.inner-head h2::before,
.section-head h2::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(251, 236, 112, 0.95), rgba(50, 184, 203, 0.85)),
    var(--accent-vivid);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 5px 10px rgba(1, 104, 156, 0.14);
}

.panel-head p,
.inner-head p,
.section-head p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.65;
}

.dashboard-grid,
.split,
.form-grid,
.login-grid,
.account-grid,
.support-grid,
.order-grid,
.compact-grid,
.rule-grid,
.position-card-grid {
  gap: 10px;
}

.ticker-compact {
  gap: 7px;
  margin: 4px 0 8px;
}

.metric-card {
  position: relative;
  min-height: 70px;
  padding: 8px 10px 8px 42px;
  overflow: hidden;
}

.metric-card::before,
.demo-metric-card::before {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent-vivid), var(--accent-main));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 15px rgba(1, 104, 156, 0.16);
}

.metric-card-quote::before {
  content: "Au";
}

.metric-card-equity::before {
  content: "Σ";
}

.metric-card-buy::before {
  content: "↗";
  background: linear-gradient(145deg, #26a9bb, var(--buy));
}

.metric-card-sell::before {
  content: "↘";
  background: linear-gradient(145deg, #f06b83, var(--sell));
}

.metric-card-ounce::before {
  content: "oz";
  background: linear-gradient(145deg, #f3d95b, #c9981a);
}

.metric-card strong,
.demo-metric-card strong {
  font-size: 18px;
  line-height: 1.2;
  margin: 3px 0 0;
}

.metric-card span,
.demo-metric-card span {
  font-size: 11px;
  line-height: 1.5;
}

.metric-card small,
.demo-metric-card small {
  font-size: 9.5px;
  line-height: 1.5;
}

.stat-strip {
  gap: 6px;
}

.stat-chip,
.badge,
.ghost,
.ghost-button,
.status-pill,
.chart-pill {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.35;
}

button,
.chip-button,
.small-button,
.mini-actions button,
.panel-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: var(--button-shadow);
}

.small-button,
.mini-actions button,
.panel-actions button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

input,
select,
textarea {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

textarea {
  min-height: 76px;
}

label {
  gap: 4px;
  font-size: 11px;
}

.segmented,
.segmented-2,
.period-switch {
  gap: 5px;
  padding: 4px;
  border-radius: 10px;
}

.segmented label,
.segmented-2 label,
.period-switch button {
  min-height: 32px;
  border-radius: 7px;
  font-size: 11.5px;
  padding: 6px 8px;
}

.row,
.auto-order-row,
.trade-position-row,
.demo-position-row,
.position-row-extended,
.compact-rule,
.compact-report-card {
  gap: 8px;
  padding: 8px 9px;
}

.row-main strong,
.notice-title,
.support-bubble-head strong,
.report-card strong,
.compact-rule strong,
.position-card h3,
.auto-order-card strong {
  font-size: 12px;
  line-height: 1.45;
}

.row-main small,
.notice-body,
.support-bubble-body,
.report-card p,
.report-card small,
.compact-rule small,
.position-card small,
.auto-order-card small {
  font-size: 10.5px;
  line-height: 1.65;
}

.list,
.list-soft {
  gap: 6px;
}

.chart-panel {
  gap: 8px;
}

.chart-shell {
  padding: 8px;
  min-height: 210px;
}

.chart-caption,
.chart-legend {
  font-size: 10.5px;
}

.preview-box {
  min-height: 60px;
  padding: 8px;
  border-radius: 8px;
}

.risk-strip,
.sync-panel {
  border-radius: 8px;
  padding: 8px 9px;
  gap: 8px;
  box-shadow: var(--depth-shadow-tight);
}

.risk-dot {
  width: 9px;
  height: 9px;
}

.glass-nav {
  width: min(620px, calc(100% - 14px));
  bottom: 10px;
  gap: 5px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 30px rgba(22, 32, 50, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

html[data-theme="dark"] .glass-nav {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-nav button {
  min-height: 38px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.25;
  box-shadow: none;
}

.glass-nav button::before {
  display: block;
  margin: 0 auto 1px;
  color: var(--accent-vivid);
  font-size: 12px;
  line-height: 1;
}

.glass-nav button[data-view="trade"]::before {
  content: "◇";
}

.glass-nav button[data-view="accounting"]::before {
  content: "▣";
}

.glass-nav button[data-view="reports"]::before {
  content: "▥";
}

.glass-nav button[data-view="support"]::before {
  content: "◌";
}

.glass-nav button[data-view="demo"]::before {
  content: "△";
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  background:
    linear-gradient(180deg, rgba(244, 247, 246, 0.94), rgba(233, 242, 239, 0.98)),
    var(--bg);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

html[data-theme="dark"] .app-loader {
  background:
    linear-gradient(180deg, rgba(20, 24, 25, 0.96), rgba(27, 34, 37, 0.98)),
    var(--bg);
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader strong {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink);
}

.loader-mark {
  position: relative;
  width: 72px;
  height: 72px;
  transform-style: preserve-3d;
  animation: loader-tilt 1.8s ease-in-out infinite;
}

.loader-mark span {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(50, 184, 203, 0.95), rgba(1, 104, 156, 0.9));
  box-shadow: 0 14px 26px rgba(1, 104, 156, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: loader-pulse 1.8s ease-in-out infinite;
}

.loader-mark span:nth-child(1) {
  transform: rotate(45deg) translateZ(18px);
}

.loader-mark span:nth-child(2) {
  transform: rotate(45deg) scale(0.72) translateZ(34px);
  background: linear-gradient(145deg, rgba(251, 236, 112, 0.95), rgba(10, 163, 111, 0.9));
  animation-delay: 0.16s;
}

.loader-mark span:nth-child(3) {
  transform: rotate(45deg) scale(0.44) translateZ(50px);
  background: linear-gradient(145deg, rgba(240, 107, 131, 0.9), rgba(56, 185, 200, 0.92));
  animation-delay: 0.32s;
}

@keyframes loader-tilt {
  0%,
  100% {
    transform: rotateX(58deg) rotateZ(0deg);
  }

  50% {
    transform: rotateX(58deg) rotateZ(180deg);
  }
}

@keyframes loader-pulse {
  0%,
  100% {
    opacity: 0.86;
    filter: saturate(0.95);
  }

  50% {
    opacity: 1;
    filter: saturate(1.18);
  }
}

@media (max-width: 820px) {
  .shell {
    width: calc(100% - 10px);
    padding: 6px 0 76px;
  }

  .topbar {
    gap: 7px;
    padding-bottom: 6px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .panel {
    padding: 9px;
  }

  .ticker-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .metric-card {
    min-height: 66px;
    padding: 8px 8px 8px 38px;
  }

  .metric-card::before,
  .demo-metric-card::before {
    left: 8px;
    top: 9px;
    width: 22px;
    height: 22px;
  }

  .metric-card strong,
  .demo-metric-card strong {
    font-size: 16px;
  }

  .dashboard-grid,
  .split,
  .form-grid,
  .account-grid,
  .support-grid,
  .order-grid {
    gap: 8px;
  }

  .chart-shell {
    min-height: 185px;
  }

  .glass-nav {
    width: calc(100% - 10px);
    bottom: 8px;
    padding: 5px;
  }

  .glass-nav button {
    min-height: 36px;
    padding: 4px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  body {
    font-size: 12.5px;
  }

  .topbar-status {
    width: 100%;
  }

  .topbar-status > * {
    flex: 1;
    justify-content: center;
  }

  .metric-card {
    padding-left: 34px;
  }

  .metric-card strong,
  .demo-metric-card strong {
    font-size: 15px;
  }

  button,
  input,
  select,
  textarea {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-mark,
  .loader-mark span {
    animation: none;
  }

  .app-loader {
    transition: none;
  }
}

/* Compact font and icon pass after visual smoke test */
:root {
  --font-fa: Tahoma, "Segoe UI", Arial, sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-fa);
}

.topbar h1 {
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 800;
}

.topbar p,
.view-intro,
.section-note,
.muted,
.message {
  font-size: 10.5px;
}

.panel-head h2,
.inner-head h2,
.section-head h2 {
  font-size: 13px;
  font-weight: 800;
}

.panel-head p,
.inner-head p,
.section-head p {
  font-size: 10.5px;
}

.metric-card strong,
.demo-metric-card strong {
  font-size: 16px;
}

.metric-card span,
.demo-metric-card span,
.row-main strong,
.notice-title,
.support-bubble-head strong,
.report-card strong,
.compact-rule strong,
.position-card h3,
.auto-order-card strong {
  font-size: 11px;
}

.row-main small,
.notice-body,
.support-bubble-body,
.report-card p,
.report-card small,
.compact-rule small,
.position-card small,
.auto-order-card small,
.metric-card small,
.demo-metric-card small {
  font-size: 9.5px;
}

.glass-nav button {
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
}

.glass-nav button::before {
  content: none !important;
}

.nav-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(50, 184, 203, 0.18), rgba(1, 104, 156, 0.08));
  border: 1px solid var(--line-strong);
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  border: 2px solid var(--accent-vivid);
}

.nav-icon-trade::before {
  transform: rotate(45deg);
  border-color: var(--accent-vivid);
}

.nav-icon-trade::after {
  inset: 6px 3px;
  border-width: 0;
  border-top: 2px solid var(--accent-main);
  border-bottom: 2px solid var(--accent-main);
}

.nav-icon-accounting::before {
  inset: 3px 4px;
  border-radius: 2px;
}

.nav-icon-accounting::after {
  inset: 6px 5px;
  border-width: 0;
  border-top: 2px solid var(--accent-vivid);
  border-bottom: 2px solid var(--accent-vivid);
}

.nav-icon-reports::before {
  inset: 4px 4px 3px;
  border-width: 0 0 2px 2px;
  border-radius: 0;
}

.nav-icon-reports::after {
  inset: 3px 5px 5px 7px;
  border-width: 0;
  border-left: 2px solid var(--accent-main);
  box-shadow: -4px 3px 0 -1px var(--accent-vivid), 4px -1px 0 -1px var(--accent-vivid);
}

.nav-icon-support::before {
  inset: 3px;
  border-radius: 50%;
  border-color: var(--accent-vivid);
}

.nav-icon-support::after {
  inset: 6px;
  border-width: 0;
  border-radius: 50%;
  background: var(--accent-main);
}

.nav-icon-demo::before {
  inset: 4px 3px 6px;
  border-width: 0;
  border-radius: 0;
  background: var(--accent-vivid);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.nav-icon-demo::after {
  inset: auto 4px 3px;
  height: 2px;
  border-width: 0;
  border-radius: 2px;
  background: var(--accent-main);
}

@media (max-width: 820px) {
  .topbar h1 {
    font-size: 15px;
  }

  .metric-card strong,
  .demo-metric-card strong {
    font-size: 15px;
  }
}
