

:root {
  --hub-rule: linear-gradient(90deg, transparent, var(--gold), transparent);
  --hub-locked: #8a93a6;
  --hub-vip: #7a5cff;
  --hub-vip-soft: #f0edff;
}

html[data-theme="dark"] {
  --hub-locked: #6d7688;
  --hub-vip: #a893ff;
  --hub-vip-soft: #1e1a33;
}



.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--bg);
}

.auth-aside {
  position: relative;
  padding: 56px 48px;
  background: linear-gradient(160deg, var(--navy) 0%, #071c42 100%);
  color: #f4f8ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}


.auth-tape {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  font-size: 13px;
  line-height: 2.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  animation: tape-drift 90s linear infinite;
}

@keyframes tape-drift { to { transform: translateY(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .auth-tape { animation: none; }
}

.auth-aside-inner { position: relative; z-index: 2; }
.auth-aside h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: -0.01em; }
.auth-aside p { margin: 0; color: #b9cbeb; font-size: 14px; line-height: 2; max-width: 42ch; }

.auth-rule { height: 1px; background: var(--hub-rule); margin: 28px 0; opacity: 0.7; }

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 2; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: #cfdcf3; }
.auth-points b { color: #fff; font-weight: 700; }
.auth-points .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-top: 8px; flex: none; }

.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card .auth-sub { margin: 0 0 26px; color: var(--muted); font-size: 13px; line-height: 1.9; }

.auth-field { display: block; margin-bottom: 16px; }
.auth-field > span:first-child { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 43, 97, .12);
}


.password-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0 !important;
}
.password-input-wrap > input {
  flex: 1 1 auto;
  min-width: 0;
}
.password-visibility-toggle {
  
  order: -1;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.password-visibility-toggle:hover {
  color: var(--navy);
  background: color-mix(in srgb, var(--navy) 8%, transparent);
}
.password-visibility-toggle:focus-visible {
  outline: none;
  color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 43, 97, .14);
}
.password-eye {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.password-eye-closed { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-eye-open { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-eye-closed { display: block; }

.auth-submit {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
}
.auth-submit:hover { background: var(--navy-2); }
.auth-submit:disabled { opacity: .6; cursor: progress; }

.auth-error {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  line-height: 1.8;
  border: 1px solid color-mix(in srgb, var(--red) 22%, transparent);
}
.auth-error:empty { display: none; }

.auth-note { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 2; text-align: center; }

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-aside { padding: 36px 24px; }
  .auth-aside h1 { font-size: 26px; }
  .auth-points { display: none; }
}



.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.account-chip .who { display: flex; flex-direction: column; line-height: 1.35; }
.account-chip .who strong { font-size: 13px; }
.account-chip .who span { font-size: 10px; color: var(--muted); }

.role-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.role-pill.guest  { background: var(--panel-2);   color: var(--muted); border-color: var(--line); }
.role-pill.member { background: var(--gold-soft); color: #8a6100; }
.role-pill.vip    { background: var(--hub-vip-soft); color: var(--hub-vip); }
.role-pill.admin  { background: var(--green-soft); color: var(--green); }

.status-pill { font-size: 10px; padding: 3px 9px; border-radius: 999px; }
.status-pill.active    { background: var(--green-soft); color: var(--green); }
.status-pill.suspended { background: var(--red-soft);   color: var(--red); }
.status-pill.pending   { background: var(--gold-soft);  color: #8a6100; }



.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.section-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: right;
  transition: transform .16s ease, border-color .16s ease;
}
.section-card:hover { transform: translateY(-2px); border-color: var(--navy); }
.section-card:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }


.section-card.locked { border-style: dashed; }
.section-card.locked:hover { transform: none; border-color: var(--line); }

.section-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-card .glyph { font-size: 22px; color: var(--gold); }
.section-card h3 { margin: 0; font-size: 17px; }
.section-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.95; }

.section-card .gate {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--hub-locked);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.section-card .open { color: var(--green); font-weight: 700; }



.admin-table td .cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.mini-button {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
.mini-button:hover { border-color: var(--navy); color: var(--navy); }
.mini-button.danger:hover { border-color: var(--red); color: var(--red); }



.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 20, 44, .48);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(6, 18, 40, .3);
  padding: 24px;
}
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .modal-sub { margin: 0 0 20px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-start; gap: 10px; margin-top: 22px; }

.modal select,
.modal input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--text);
}
.modal select:focus, .modal input:focus { outline: none; border-color: var(--navy); }

@media (max-width: 560px) { .modal-grid { grid-template-columns: 1fr; } }



.rule-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rule-row:last-child { border-bottom: 0; }
.rule-row .rule-name { font-weight: 700; font-size: 14px; }
.rule-row .rule-note { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.8; }
.rule-row select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.rule-row.frozen { opacity: .76; background: color-mix(in srgb, var(--panel-2) 82%, transparent); }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.switch input { width: 16px; height: 16px; accent-color: var(--navy); }

@media (max-width: 640px) {
  .rule-row { grid-template-columns: 1fr; gap: 8px; }
}




.spark { width: 100%; height: 190px; display: block; }
.spark .grid-line { stroke: var(--line); stroke-width: 1; }
.spark .area { fill: var(--navy); opacity: .10; }
.spark .line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .point { fill: var(--gold); }
.spark .tick { fill: var(--muted); font-size: 10px; }

.bar-row { display: grid; grid-template-columns: 120px 1fr 68px; gap: 12px; align-items: center; padding: 7px 0; }
.bar-row .bar-track { height: 9px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar-row .bar-fill { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.bar-row .bar-value { text-align: left; font-size: 12px; color: var(--muted); }



.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-block { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); }
.stat-block span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.stat-block strong { font-size: 22px; }

.section-stack { display: grid; gap: 18px; }
.hidden { display: none !important; }
.grow { flex: 1; }

.empty-state { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; line-height: 2; }

.audit-line { display: grid; grid-template-columns: 130px 110px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.audit-line:last-child { border-bottom: 0; }
.audit-line .when { color: var(--muted); }
.audit-line .who { font-weight: 700; }
.audit-line .what { color: var(--muted); }

@media (max-width: 640px) {
  .audit-line { grid-template-columns: 1fr; gap: 3px; }
}


:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }



.home-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr);
  gap: 28px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--navy) 18%, var(--line));
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(242,173,22,.25), transparent 28%),
    linear-gradient(135deg, #0b2b61, #102f67 58%, #071c42);
  box-shadow: 0 20px 50px rgba(8,31,70,.18);
}
.home-hero::after { content: ''; position: absolute; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; left: -110px; bottom: -190px; }
.home-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.home-eyebrow { display: inline-block; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .03em; margin-bottom: 8px; }
.home-hero h2 { margin: 0 0 12px; font-size: clamp(25px, 3vw, 42px); line-height: 1.45; letter-spacing: -.03em; }
.home-hero p { margin: 0; max-width: 68ch; color: #cbd9f2; font-size: 13px; line-height: 2.05; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; min-height: 42px; }
.hero-button { display: inline-flex; align-items: center; justify-content: center; min-width: 140px; }
.home-hero .primary-button { background: var(--gold); color: #122448; box-shadow: none; font-weight: 800; }
.home-hero .secondary-button { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; }
.hero-summary { position: relative; z-index: 1; display: grid; gap: 10px; }
.hero-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.07); backdrop-filter: blur(4px); }
.hero-summary span { color: #bdcdea; font-size: 11px; }
.hero-summary strong { color: #fff; font-size: 17px; }

.home-section { display: grid; gap: 14px; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 0 2px; }
.home-section-head h2 { margin: 0; font-size: 20px; }
.home-section-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.home-section-head.compact { align-items: center; }
.home-asof { color: var(--muted); font-size: 11px; }

.report-card { min-height: 282px; justify-content: space-between; padding: 22px; }
.report-card-top { display: flex; align-items: center; justify-content: space-between; }
.report-glyph { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--gold-soft); color: #b67800; font-size: 23px; }
.report-access { padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.report-access.open { background: var(--green-soft); color: var(--green); }
.report-access.locked-access { background: var(--panel-2); color: var(--hub-locked); border: 1px solid var(--line); }
.report-card h3 { margin: 3px 0 8px; font-size: 19px; }
.report-card p { min-height: 70px; font-size: 11px; line-height: 2.05; }
.report-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.report-tags span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel-2); font-size: 9px; }
.report-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.report-card-footer span { color: var(--muted); font-size: 10px; }
.report-card-footer strong { color: var(--navy); font-size: 10px; }
.report-card.locked .report-card-footer strong { color: var(--hub-locked); }

.home-kpis { margin-bottom: 0; }
.home-analysis-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 14px; }
.home-panel { min-height: 290px; }
.freshness-panel { grid-column: 1 / -1; min-height: 0; }
.breakdown-fill.positive { background: linear-gradient(90deg, #27a96e, #79d3a6); }
.breakdown-fill.negative { background: linear-gradient(90deg, #de5963, #f09aa1); }
.insight-list { display: grid; gap: 10px; padding: 14px; }
.insight-item { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.insight-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-weight: 900; }
.insight-item.positive .insight-icon { color: var(--green); background: var(--green-soft); }
.insight-item.warning .insight-icon { color: #a46c00; background: var(--gold-soft); }
.insight-item strong, .insight-item small { display: block; }
.insight-item strong { font-size: 11px; margin-bottom: 5px; }
.insight-item small { color: var(--muted); font-size: 10px; }
.freshness-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.freshness-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.freshness-row:hover { border-color: color-mix(in srgb, var(--navy) 45%, var(--line)); }
.freshness-state { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); }
.freshness-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.freshness-state.fresh i { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent); }
.freshness-copy strong, .freshness-copy small { display: block; }
.freshness-copy strong { font-size: 11px; margin-bottom: 5px; }
.freshness-copy small { color: var(--muted); font-size: 9px; line-height: 1.7; }
.freshness-time { direction: rtl; color: var(--muted); font-size: 10px; white-space: nowrap; }

@media (max-width: 1100px) {
  .home-hero { grid-template-columns: 1fr; }
  .hero-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-summary > div { flex-direction: column; align-items: flex-start; }
  .home-analysis-grid { grid-template-columns: 1fr; }
  .freshness-panel { grid-column: auto; }
  .freshness-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .home-hero { padding: 22px 18px; border-radius: 18px; }
  .home-hero h2 { font-size: 27px; }
  .hero-summary { grid-template-columns: 1fr; }
  .hero-summary > div { flex-direction: row; align-items: center; }
  .hero-actions a { flex: 1; }
  .home-section-head { align-items: flex-start; flex-direction: column; }
  .report-card { min-height: 0; }
  .report-card p { min-height: 0; }
  .freshness-row { grid-template-columns: 20px 1fr; }
  .freshness-time { grid-column: 2; }
}

.locked-freshness { opacity: .72; cursor: not-allowed; }


.report-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.report-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.report-health i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.report-health.fresh, .report-health.ready { color: var(--green); background: var(--green-soft); border-color: transparent; }
.report-health.stale { color: #a86e00; background: var(--gold-soft); border-color: transparent; }
.report-health.old { color: var(--red); background: var(--red-soft); border-color: transparent; }
.report-health.loading, .report-health.unavailable { color: var(--muted); }
.report-card-footer > span { display: grid; gap: 3px; min-width: 0; }
.report-card-footer > span b { color: var(--text); font-size: 10px; font-weight: 700; }
.report-card-footer > span small { color: var(--muted); font-size: 9px; }
.freshness-state.stale i { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent); }
.freshness-state.old i { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); }
.freshness-state.unavailable i { background: var(--muted); }


.report-card.favorite-card { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.report-favorite {
  margin-inline-start: auto;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}


.quality-panel { overflow: hidden; }
.quality-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.quality-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.quality-stat span { color: var(--muted); font-size: 10px; }
.quality-stat strong { font-size: 20px; }
.quality-stat.pass strong { color: var(--green); }
.quality-stat.warn strong { color: #a86e00; }
.quality-stat.fail strong { color: var(--red); }
.quality-meta { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 10px; }
.quality-table td { vertical-align: top; line-height: 1.8; }
.quality-table th:nth-child(1) { width: 76px; }
.quality-table th:nth-child(2) { width: 130px; }
.quality-table th:nth-child(3) { min-width: 210px; }
.quality-table th:nth-child(5) { min-width: 220px; }
.quality-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}
.quality-pill.pass { color: var(--green); background: var(--green-soft); }
.quality-pill.warn { color: #9a6800; background: var(--gold-soft); }
.quality-pill.fail { color: var(--red); background: var(--red-soft); }
.quality-pill.info { color: var(--muted); background: var(--panel-2); }
.quality-key { display: block; direction: ltr; text-align: right; color: var(--muted); font-size: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 4px; }
.quality-observed { max-width: 360px; overflow-wrap: anywhere; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }

@media (max-width: 900px) {
  .quality-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .quality-summary { grid-template-columns: 1fr; }
}


.watchlist-preview-section { scroll-margin-top: 16px; }
.watchlist-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.watch-preview-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.watch-preview-item:hover { transform: translateY(-1px); border-color: var(--gold); box-shadow: var(--shadow); }
.watch-preview-star { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #b67800; background: var(--gold-soft); font-size: 17px; }
.watch-preview-item span strong, .watch-preview-item span small { display: block; }
.watch-preview-item span > strong { font-size: 11px; }
.watch-preview-item span > small { margin-top: 4px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-preview-value { text-align: left; min-width: 84px; }
.watch-preview-value strong { color: var(--navy); font-size: 12px !important; }

.watchlist-hero-panel { overflow: hidden; }
.watchlist-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.watchlist-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.watchlist-stat span { color: var(--muted); font-size: 10px; }
.watchlist-stat strong { color: var(--navy); font-size: 20px; }
.watchlist-table td { vertical-align: middle; }
.watchlist-table td.numeric strong, .watchlist-table td.numeric small { display: block; }
.watchlist-table td.numeric small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.watchlist-report { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.watchlist-report.bonds { color: #315fa8; background: color-mix(in srgb, #315fa8 12%, transparent); }
.watchlist-report.commodity { color: #9a6800; background: var(--gold-soft); }
.watchlist-report.gold { color: #8b4db6; background: color-mix(in srgb, #8b4db6 12%, transparent); }

.watchlist-report.equity { color: #2f7d51; background: color-mix(in srgb, #2f7d51 12%, transparent); }
.watchlist-report.options { color: #b06a1f; background: color-mix(in srgb, #b06a1f 12%, transparent); }
.watchlist-report.covered { color: #a1512f; background: color-mix(in srgb, #a1512f 12%, transparent); }
.watchlist-report.ime { color: #1f7a8c; background: color-mix(in srgb, #1f7a8c 12%, transparent); }
.watchlist-report.funds { color: #5a5fb0; background: color-mix(in srgb, #5a5fb0 12%, transparent); }
.watch-note { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.row-actions { display: flex; gap: 5px; align-items: center; flex-wrap: nowrap; }
.mini-button.danger { color: var(--red); }

@media (max-width: 1100px) {
  .watchlist-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watchlist-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .watchlist-preview { grid-template-columns: 1fr; }
  .watchlist-summary { grid-template-columns: 1fr 1fr; }
}


.global-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 620px;
  min-width: 280px;
  margin-inline: 14px;
}
.global-search > input {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 68px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.global-search > input:focus {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent), var(--shadow);
}
.global-search-icon {
  position: absolute;
  z-index: 2;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy);
  font-size: 22px;
  pointer-events: none;
}
.global-search > kbd {
  position: absolute;
  z-index: 2;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  direction: ltr;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  pointer-events: none;
}
.global-search-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  inset-inline: 0;
  max-height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(7, 22, 50, .24);
}
.global-search-panel[hidden] { display: none; }
.global-search-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.global-search-head button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 18px;
}
.global-search-results { max-height: min(560px, calc(100vh - 165px)); overflow: auto; padding: 7px; }
.search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
}
.search-result:hover, .search-result.keyboard-active {
  border-color: var(--line);
  background: var(--panel-2);
}
.search-result-glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--navy);
  background: color-mix(in srgb, var(--navy) 9%, transparent);
  font-weight: 900;
}
.search-result-copy { min-width: 0; }
.search-result-copy strong, .search-result-copy small { display: block; }
.search-result-copy strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-meta { display: flex; align-items: center; gap: 6px; }
.search-result-report { padding: 4px 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 8px; font-weight: 800; white-space: nowrap; }
.search-result-metrics { min-width: 90px; text-align: left; }
.search-result-metrics strong, .search-result-metrics small { display: block; }
.search-result-metrics strong { color: var(--navy); font-size: 10px; direction: ltr; }
.search-result-metrics small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.search-watch-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 17px;
}
.search-watch-button.watched { color: #b67800; background: var(--gold-soft); border-color: transparent; }
.search-empty { min-height: 130px; display: grid; place-items: center; padding: 20px; color: var(--muted); font-size: 11px; text-align: center; line-height: 2; }


.personal-home-section { scroll-margin-top: 18px; }
.personal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.personal-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.personal-stat span { color: var(--muted); font-size: 10px; }
.personal-stat strong { color: var(--navy); font-size: 22px; }
.personal-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.personal-panel { min-height: 230px; }
.personal-link-list { display: grid; gap: 1px; padding: 7px; }
.personal-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
}
.personal-link:hover { background: var(--panel-2); }
.personal-link-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--navy); background: color-mix(in srgb, var(--navy) 9%, transparent); }
.personal-link-copy { min-width: 0; }
.personal-link-copy strong, .personal-link-copy small { display: block; }
.personal-link-copy strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personal-link-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personal-link-time { color: var(--muted); font-size: 9px; white-space: nowrap; }


@media (max-width: 1023px) {
  .global-search { order: 3; flex-basis: 100%; max-width: none; margin: 8px 0 0; }
  .topbar { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .personal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .global-search { min-width: 0; width: 100%; }
  .global-search > kbd { display: none; }
  .global-search > input { padding-inline-end: 42px; }
  .global-search-panel { position: fixed; inset: 78px 10px auto; max-height: calc(100vh - 96px); }
  .global-search-results { max-height: calc(100vh - 150px); }
  .search-result { grid-template-columns: 34px minmax(0, 1fr) 32px; }
  .search-result-metrics { display: none; }
  .search-result-meta { grid-column: 2; }
  .personal-summary { grid-template-columns: 1fr 1fr; }
  .personal-stat { min-height: 62px; padding: 11px 12px; }
  .personal-stat strong { font-size: 18px; }
}
.search-result-copy { min-width: 0; color: inherit; text-decoration: none; }


.announcement-banner{margin:0 1.25rem 1rem;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--line);font-weight:700}
.announcement-banner.info{background:color-mix(in srgb,var(--accent) 10%,var(--surface));color:var(--text)}
.announcement-banner.warning{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.35)}
.announcement-banner.critical{background:rgba(220,38,38,.12);border-color:rgba(220,38,38,.35)}
.alert-bell{position:relative}.alert-bell span{position:absolute;inset-block-start:-5px;inset-inline-start:-5px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#dc2626;color:#fff;font-size:10px;line-height:18px;text-align:center}
.select-cell{width:38px;text-align:center}.select-cell input{width:16px;height:16px}
.comparison-editor,.alert-editor,.announcement-editor{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.comparison-editor{display:grid;grid-template-columns:minmax(180px,1fr) minmax(260px,2fr) auto}.comparison-editor select[multiple]{min-height:150px;padding:.5rem}
.comparison-table td small,.alert-rules td small{display:block;color:var(--muted);margin-top:.25rem}
.alert-editor .inline-search{max-width:145px}.check-label{display:inline-flex;gap:.4rem;align-items:center;white-space:nowrap}
.alert-event-list{display:grid;gap:.65rem;max-height:480px;overflow:auto}.alert-event{display:grid;grid-template-columns:auto 1fr;gap:.65rem;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.alert-event.unread{border-inline-start:4px solid var(--accent)}.alert-event.read{opacity:.7}.alert-event p{margin:.25rem 0;color:var(--muted)}.alert-event small{color:var(--muted)}
.operations-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem;margin-bottom:1rem}.operation-card{padding:.85rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);display:grid;gap:.35rem}.operation-card span{color:var(--muted);font-size:.82rem}.operation-card strong{font-size:1.05rem}.operation-card.down,.operation-card.error{border-color:rgba(220,38,38,.5)}.operation-card.warning{border-color:rgba(245,158,11,.5)}
.announcement-editor .grow{flex:1;min-width:280px}
@media(max-width:780px){.comparison-editor{grid-template-columns:1fr}.comparison-editor .primary-button{width:100%}.alert-editor>*{flex:1 1 140px}.announcement-editor .grow{min-width:100%}}


.home-visual-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1.25fr) repeat(2, minmax(230px, .72fr));
  gap: 14px;
  align-items: stretch;
}
.visual-card { min-height: 260px; }
.coverage-visual-card { grid-row: span 2; }
.strategy-visual-card { grid-column: 2 / -1; min-height: 210px; }
.coverage-visual { display: grid; gap: 16px; padding: 18px; }
.coverage-row { display: grid; grid-template-columns: 110px minmax(90px, 1fr) auto; gap: 12px; align-items: center; }
.coverage-label { display: grid; gap: 4px; }
.coverage-label strong { color: var(--navy); font-size: 12px; }
.coverage-label small { color: var(--muted); font-size: 9px; }
.coverage-track { height: 14px; border-radius: 999px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.coverage-fill { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--navy-2), #6f9be1); }
.coverage-fill.gold { background: linear-gradient(90deg, #b97800, #f4c54f); }
.coverage-fill.purple { background: linear-gradient(90deg, #7141a6, #b685e0); }
.coverage-count { min-width: 54px; text-align: left; color: var(--text); font-weight: 900; font-size: 16px; }
.ring-visual-body { display: grid; grid-template-columns: 126px 1fr; gap: 16px; align-items: center; padding: 18px; }
.metric-ring {
  --progress: 0;
  width: 126px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--green) calc(var(--progress) * 1%), var(--line) 0);
  position: relative;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 75%, transparent);
}
.metric-ring::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.metric-ring.gold-ring { background: conic-gradient(var(--gold) calc(var(--progress) * 1%), var(--line) 0); }
.metric-ring > span { position: relative; z-index: 1; display: grid; place-items: center; gap: 3px; text-align: center; }
.metric-ring strong { font-size: 22px; color: var(--navy); }
.metric-ring small { color: var(--muted); font-size: 9px; }
.visual-legend { display: grid; gap: 9px; }
.visual-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 10px; }
.visual-legend-row:last-child { border-bottom: 0; }
.visual-legend-row span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.visual-legend-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.visual-legend-row i.warn { background: var(--gold); }
.visual-legend-row i.bad { background: var(--red); }
.visual-legend-row strong { color: var(--text); }
.strategy-visual { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 18px; align-items: end; }
.strategy-metric { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.strategy-copy { display: grid; gap: 5px; }
.strategy-copy strong { font-size: 12px; color: var(--navy); }
.strategy-copy small { font-size: 9px; color: var(--muted); }
.strategy-value { font-size: 20px; font-weight: 900; }
.strategy-track { grid-column: 1 / -1; height: 16px; overflow: hidden; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); }
.strategy-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #75c89c); }
.strategy-fill.risk-free { background: linear-gradient(90deg, var(--navy-2), #79a4e6); }
.visual-note { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.9; }
@media (max-width: 1180px) {
  .home-visual-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .coverage-visual-card { grid-row: auto; }
  .strategy-visual-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .home-visual-grid { grid-template-columns: 1fr; }
  .strategy-visual-card { grid-column: auto; }
  .ring-visual-body { grid-template-columns: 112px 1fr; }
  .metric-ring { width: 112px; }
  .coverage-row { grid-template-columns: 92px minmax(70px,1fr) auto; }
  .strategy-visual { grid-template-columns: 1fr; }
}



.module-kpi-grid { margin: 0; }
.module-visual-panel { overflow: hidden; }
.module-breakdown { display: grid; gap: .72rem; padding: .2rem 0; }
.module-breakdown-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 52px; gap: .8rem; align-items: center; }
.module-breakdown-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.module-breakdown-track { height: 11px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.module-breakdown-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.module-breakdown-row strong { text-align: left; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .module-breakdown-row { grid-template-columns: 100px 1fr 42px; gap: .5rem; } }


.v2-market-page { padding-bottom: 52px; }
.v2-brand { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; border-radius:15px; color:var(--navy); background:var(--gold-soft); }
.v2-brand strong { font-size:20px; line-height:1; }
.v2-brand small { margin-top:3px; font-size:7px; letter-spacing:.15em; }
.v2-topbar { position:sticky; top:0; z-index:18; padding:10px 0; background:color-mix(in srgb,var(--bg) 88%,transparent); backdrop-filter:blur(12px); }
.v2-search-trigger { min-width:300px; max-width:460px; min-height:42px; display:grid; grid-template-columns:26px minmax(0,1fr) auto; align-items:center; gap:8px; padding:0 11px; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--muted); text-align:right; box-shadow:var(--shadow); }
.v2-search-trigger span { font-size:20px; color:var(--navy); }
.v2-search-trigger b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:500; }
.v2-search-trigger kbd { direction:ltr; padding:3px 7px; border:1px solid var(--line); border-bottom-width:2px; border-radius:7px; background:var(--panel-2); font-size:8px; }
.v2-filter-panel { padding:0; overflow:visible; }
.v2-filter-head { min-height:54px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 14px; border-bottom:1px solid var(--line); }
.v2-filter-head > div { display:grid; gap:3px; }
.v2-filter-head strong { font-size:12px; }
.v2-filter-head span { color:var(--muted); font-size:9px; }
.filter-toggle { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:var(--panel-2); color:var(--text); font-size:9px; }
.filter-toggle b { font-size:14px; }
.v2-filter-body { padding:14px; }
.v2-filter-body[hidden] { display:none; }
.v2-form-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:11px; align-items:end; }
.v2-form-grid .field-search { grid-column:span 2; }
.input-shell { position:relative; min-width:0; }
.input-shell > i { position:absolute; inset-inline-start:12px; top:50%; transform:translateY(-50%); color:var(--navy); font-style:normal; font-size:18px; pointer-events:none; }
.input-shell > input { padding-inline-start:38px !important; padding-inline-end:36px !important; }
.input-shell > button { position:absolute; inset-inline-end:7px; top:50%; transform:translateY(-50%); width:27px; height:27px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:19px; }
.v2-form-grid .field input,.v2-form-grid .field select { min-height:42px; padding:0 12px; border-radius:10px; background:var(--panel); }
.v2-filter-actions { margin-top:12px; align-items:center; flex-wrap:wrap; }
.active-filter-count { margin-inline-start:auto; padding:6px 10px; border-radius:999px; background:var(--panel-2); color:var(--muted); font-size:9px; }
.module-status-banner { min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; padding:9px 14px; border:1px solid color-mix(in srgb,var(--green) 25%,var(--line)); border-radius:11px; background:color-mix(in srgb,var(--green-soft) 55%,var(--panel)); }
.module-status-banner strong { font-size:10px; }
.module-status-banner span { color:var(--muted); font-size:9px; }
.module-status-banner.warn { border-color:color-mix(in srgb,var(--warning) 35%,var(--line)); }
.module-status-banner.error { border-color:color-mix(in srgb,var(--red) 35%,var(--line)); background:var(--red-soft); }
.v2-kpi-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.v2-kpi-grid .kpi-card { min-height:104px; }
.v2-insight-grid { display:grid; grid-template-columns:1.2fr .8fr 1fr; gap:14px; margin-bottom:14px; }
.v2-insight-grid > .panel { min-height:280px; }
.v2-insight-grid .module-breakdown,.breadth-visual,.special-insight { padding:16px; }
.breadth-visual { display:grid; gap:22px; align-content:center; min-height:210px; }
.breadth-bar { height:22px; display:flex; overflow:hidden; border-radius:999px; background:var(--panel-2); border:1px solid var(--line); direction:ltr; }
.breadth-bar i { display:block; height:100%; min-width:2px; }
.breadth-bar .positive { background:var(--green); }.breadth-bar .negative { background:var(--red); }.breadth-bar .neutral { background:var(--warning); }
.breadth-legend { display:grid; gap:10px; }
.breadth-legend > span { display:grid; grid-template-columns:10px 1fr auto; gap:8px; align-items:center; padding-bottom:8px; border-bottom:1px dashed var(--line); }
.breadth-legend i { width:8px; height:8px; border-radius:50%; }.breadth-legend i.positive{background:var(--green)}.breadth-legend i.negative{background:var(--red)}.breadth-legend i.neutral{background:var(--warning)}
.breadth-legend b { color:var(--muted); font-size:9px; }.breadth-legend strong { font-size:12px; }
.insight-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.insight-metrics > div { display:grid; gap:8px; min-height:78px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--panel-2); }
.insight-metrics span { color:var(--muted); font-size:9px; }.insight-metrics strong { font-size:15px; direction:ltr; text-align:right; }
.insight-note { margin:14px 0 0; color:var(--muted); font-size:9px; line-height:1.9; }
.allocation-row { display:grid; grid-template-columns:70px 1fr 60px; gap:9px; align-items:center; margin-bottom:12px; font-size:9px; }
.allocation-row > i { height:9px; overflow:hidden; border-radius:999px; background:var(--panel-2); border:1px solid var(--line); }
.allocation-row > i b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--navy),var(--gold)); }
.allocation-row strong { direction:ltr; text-align:left; }
.v2-market-table .sort-head { display:inline-flex; align-items:center; gap:6px; padding:0; border:0; background:transparent; color:inherit; font-weight:inherit; }
.v2-market-table .sort-head span { color:var(--gold); }
.symbol-link { display:grid; gap:3px; min-width:86px; }
.symbol-link strong { color:var(--navy); font-size:11px; }.symbol-link small { color:var(--muted); font-size:7px; font-weight:400; }
.dense-table .v2-market-table tbody td { padding-block:5px; }.dense-table .symbol-link small { display:none; }
.mobile-bottom-nav { display:none; }
.market-ticker { position:fixed; z-index:48; inset-inline:0; bottom:0; height:42px; display:flex; align-items:center; gap:0; overflow:auto hidden; background:color-mix(in srgb,var(--panel) 96%,transparent); border-top:1px solid var(--line); box-shadow:0 -7px 20px rgba(8,20,44,.08); direction:rtl; scrollbar-width:none; }
.market-ticker::-webkit-scrollbar { display:none; }
.ticker-status { padding:0 16px; color:var(--muted); font-size:9px; white-space:nowrap; }
.ticker-live { align-self:stretch; display:inline-flex; align-items:center; gap:6px; padding:0 14px; background:var(--navy); color:var(--on-accent); font-size:9px; white-space:nowrap; }
.ticker-live i { width:7px;height:7px;border-radius:50%;background:#55e5a8;box-shadow:0 0 0 4px rgba(85,229,168,.16); }
.ticker-item { min-width:175px; height:100%; display:grid; grid-template-columns:1fr auto; grid-template-rows:1fr 1fr; align-items:center; gap:0 9px; padding:4px 14px; border-inline-end:1px solid var(--line); white-space:nowrap; }
.ticker-item b { grid-row:1/-1; color:var(--muted); font-size:8px; align-self:center; }.ticker-item strong { font-size:10px; direction:ltr; text-align:left; }.ticker-item small { font-size:7px; direction:ltr; text-align:left; }


.global-search { flex:1 1 340px; width:min(100%,620px); min-width:220px; max-width:620px; margin-inline:10px; }
.global-search > input { height:42px; min-height:42px; max-height:42px; padding-inline-start:42px; padding-inline-end:72px; line-height:1.4; }
.global-search-icon { inset-inline-start:13px; font-size:18px; }
.global-search > kbd { inset-inline-end:9px; max-width:58px; overflow:hidden; }


.admin-form-grid,.member-form-grid,.alert-form-grid { display:grid; grid-template-columns:repeat(3,minmax(170px,1fr)); gap:12px; align-items:end; }
.admin-form-grid .field,.member-form-grid .field,.alert-form-grid .field { min-width:0; }
.admin-form-grid input,.admin-form-grid select,.admin-form-grid textarea,
.member-form-grid input,.member-form-grid select,.member-form-grid textarea,
.alert-form-grid input,.alert-form-grid select,.alert-form-grid textarea { width:100%; min-height:42px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--text); outline:none; }
.admin-form-grid textarea,.member-form-grid textarea,.alert-form-grid textarea { min-height:92px; resize:vertical; }
.rule-row { min-height:62px; padding:10px 12px !important; border-bottom:1px solid var(--line); }
.rule-row > div:first-child { padding-inline:4px; }
.admin-workspace-panel,
#viewStats { scroll-margin-top:86px; }
.admin-back-link { margin-top:auto; border-top:1px solid var(--line); }
.role-permission-toolbar { display:grid; grid-template-columns:minmax(240px,340px) 1fr; gap:14px; align-items:end; padding:16px; border-bottom:1px solid var(--line); background:var(--panel-2); }
.role-selector-field select { min-height:44px; font-weight:700; }
.role-permission-summary { min-height:44px; display:flex; align-items:center; padding:10px 12px; border:1px dashed var(--line); border-radius:10px; color:var(--muted); font-size:10px; line-height:1.8; background:var(--panel); }
.role-permission-board { padding:0 14px; }
.role-first-empty { min-height:120px; display:grid; place-items:center; text-align:center; }
.role-permission-row { grid-template-columns:minmax(0,1fr) minmax(150px,190px); }
.role-permission-row .rule-copy { min-width:0; }
.permission-switch { justify-content:flex-end; min-height:38px; padding:7px 10px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.permission-switch input { width:18px; height:18px; }
.role-permission-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.role-permission-footer .primary-button:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width:1280px) {
  .v2-form-grid { grid-template-columns:repeat(3,minmax(150px,1fr)); }
  .v2-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .v2-insight-grid { grid-template-columns:1fr 1fr; }.v2-insight-grid > :first-child { grid-column:1/-1; }
  .v2-search-trigger { min-width:240px; }
}
@media (max-width:900px) {
  
  .v2-market-page { padding-bottom:calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); }
  .v2-sidebar { display:none; }
  .v2-main { margin-right:0; padding:12px 12px 20px; }
  .v2-topbar { position:static; margin:0; padding:4px 0 10px; }
  .v2-topbar .title-wrap { width:100%; align-items:flex-start; justify-content:space-between; }
  .v2-topbar .topbar-actions { width:100%; display:grid; grid-template-columns:minmax(0,1fr) 42px; }
  .v2-topbar .clock-box,.v2-topbar #exportButton { display:none; }
  .v2-search-trigger { width:100%; min-width:0; max-width:none; }
  .v2-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.v2-form-grid .field-search { grid-column:1/-1; }
  .v2-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v2-insight-grid { grid-template-columns:1fr; }.v2-insight-grid > :first-child { grid-column:auto; }
  
  .mobile-bottom-nav { position:fixed; z-index:78; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); inset-inline:0; bottom:0; min-height:58px; padding:5px 7px calc(5px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:color-mix(in srgb,var(--panel) 97%,transparent); box-shadow:0 -8px 24px rgba(8,20,44,.12); }
  .mobile-bottom-nav a,.mobile-bottom-nav button { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:0; border-radius:10px; background:transparent; color:var(--muted); }
  .mobile-bottom-nav a.active { color:var(--navy); background:var(--gold-soft); }
  .mobile-bottom-nav span { font-size:18px; line-height:1; }.mobile-bottom-nav small { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:7px; }
  .market-ticker { bottom:0; }
  .global-search { order:3; flex-basis:100%; width:100%; max-width:none; min-width:0; margin:8px 0 0; }
  .admin-form-grid,.member-form-grid,.alert-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .role-permission-toolbar { grid-template-columns:1fr; }
  .role-permission-row { grid-template-columns:1fr; }
  .permission-switch { justify-content:flex-start; }
}
@media (max-width:560px) {
  .v2-main { padding-inline:9px; }
  .v2-filter-head { align-items:flex-start; }
  .v2-filter-head > div span { display:none; }
  .v2-filter-body { padding:10px; }
  .v2-form-grid { grid-template-columns:1fr; gap:9px; }.v2-form-grid .field-search { grid-column:auto; }
  .v2-kpi-grid { grid-template-columns:1fr 1fr; gap:8px; }.v2-kpi-grid .kpi-card { min-height:92px; padding:11px; }.v2-kpi-grid .kpi-icon { width:31px;height:31px;flex-basis:31px;font-size:15px; }.v2-kpi-grid .kpi-card strong { font-size:16px; }
  .title-wrap h1 { font-size:23px; }.title-wrap p { max-width:250px; font-size:10px; }
  .connection-badge { padding:5px 7px; font-size:8px; }
  .v2-search-trigger b { font-size:9px; }.v2-search-trigger kbd { display:none; }
  .module-status-banner { align-items:flex-start; flex-direction:column; gap:3px; }
  .insight-metrics { grid-template-columns:1fr 1fr; }
  .v2-market-table { min-width:760px; }
  .global-search > input { font-size:10px; padding-inline-end:40px; }
  .global-search > kbd { display:none; }
  .global-search-panel { inset:64px 8px auto; max-height:calc(100vh - 124px); }
  .admin-form-grid,.member-form-grid,.alert-form-grid { grid-template-columns:1fr; }
  .role-permission-toolbar { padding:12px; }
  .role-permission-footer { align-items:stretch; flex-direction:column; }
  .role-permission-footer .primary-button { width:100%; }
}


.symbol-hero { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; align-items:center; gap:22px; min-height:112px; margin-bottom:12px; padding:18px 20px; overflow:visible; }
.symbol-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.symbol-identity > a { color:var(--navy); font-size:9px; font-weight:800; }.symbol-identity > span { color:var(--muted); }
.symbol-identity h1 { margin:0; font-size:30px; color:var(--navy); }.symbol-identity p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.symbol-price { display:grid; gap:4px; min-width:180px; padding-inline:22px; border-inline:1px solid var(--line); }
.symbol-price span { color:var(--muted); font-size:9px; }.symbol-price strong { direction:ltr; text-align:right; font-size:25px; }.symbol-price small { direction:ltr; text-align:right; font-size:10px; }
.symbol-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.symbol-tabs { position:sticky; top:73px; z-index:16; display:flex; gap:5px; margin-bottom:14px; padding:7px; overflow:auto hidden; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--panel) 96%,transparent); box-shadow:var(--shadow); scrollbar-width:none; }
.symbol-tabs button { min-width:max-content; min-height:36px; padding:0 14px; border:0; border-radius:9px; background:transparent; color:var(--muted); font-size:10px; }
.symbol-tabs button.active { color:var(--navy); background:var(--gold-soft); font-weight:800; }
.symbol-tab { display:none; }.symbol-tab.active { display:block; }
.symbol-kpi-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.symbol-main-grid { display:grid; grid-template-columns:1fr; gap:14px; margin-bottom:14px; }
.symbol-secondary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.symbol-chart { min-height:330px; padding:14px; }
.symbol-chart svg { width:100%; height:270px; overflow:visible; color:var(--navy); }
.chart-grid line { stroke:var(--line); stroke-width:1; stroke-dasharray:4 6; }.chart-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }.chart-line.positive { stroke:var(--green); }.chart-line.negative { stroke:var(--red); }.chart-area { fill:url(#area); color:var(--navy); }.chart-area.positive { color:var(--green); }.chart-area.negative { color:var(--red); }
.chart-range { display:flex; justify-content:space-between; gap:12px; padding-top:10px; border-top:1px dashed var(--line); color:var(--muted); font-size:9px; }.chart-range b { color:var(--text); direction:ltr; }
.market-depth { display:grid; gap:14px; padding:16px; min-height:auto; align-content:start; }
.depth-side { position:relative; display:grid; grid-template-columns:1fr auto; gap:6px; padding:13px; overflow:hidden; border:1px solid var(--line); border-radius:11px; background:var(--panel-2); }
.depth-side span { color:var(--muted); font-size:9px; }.depth-side strong { direction:ltr; font-size:15px; }.depth-side i { grid-column:1/-1; height:7px; border-radius:999px; }.depth-side.buy i { background:var(--green); }.depth-side.sell i { background:var(--red); }
.depth-center { display:grid; place-items:center; gap:5px; padding:15px; border-block:1px dashed var(--line); }.depth-center span,.depth-center small { color:var(--muted); font-size:8px; }.depth-center strong { font-size:18px; direction:ltr; }
.client-type-grid,.return-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:16px; }
.client-type-grid > div,.return-grid > div { display:grid; gap:8px; min-height:76px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--panel-2); }
.client-type-grid span,.return-grid span { color:var(--muted); font-size:9px; }.client-type-grid strong,.return-grid strong { font-size:13px; direction:ltr; text-align:right; }
.client-type-grid small{color:var(--muted);font-size:9px;line-height:1.7}.client-type-grid .empty-state{grid-column:1/-1;min-height:92px;display:grid;place-items:center}.client-type-grid .client-type-power{grid-column:1/-1;grid-template-columns:1fr auto;align-items:center}.client-type-grid .client-type-power small{grid-column:1/-1}
.symbol-unavailable { min-height:280px; display:grid; place-items:center; align-content:center; gap:10px; padding:30px; text-align:center; }.symbol-unavailable strong { color:var(--navy); font-size:16px; }.symbol-unavailable p { max-width:680px; margin:0; color:var(--muted); font-size:10px; line-height:2; }
.fund-flow { display:flex; justify-content:space-between; gap:12px; margin-top:16px; padding-top:12px; border-top:1px dashed var(--line); color:var(--muted); font-size:9px; }.fund-flow b { color:var(--text); }

.symbol-main-grid > .panel:last-child .table-scroll { overflow-x: visible; }
.symbol-main-grid > .panel:last-child .depth-table { min-width: 100%; table-layout: fixed; }

@media(max-width:1280px){.symbol-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.symbol-secondary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.symbol-secondary-grid>:last-child{grid-column:1/-1}}
@media(max-width:900px){.symbol-hero{grid-template-columns:1fr auto}.symbol-price{grid-row:2;grid-column:1;padding:0;border:0}.symbol-actions{grid-row:2;grid-column:2}.symbol-tabs{top:0}.symbol-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.symbol-main-grid{grid-template-columns:1fr}.symbol-secondary-grid{grid-template-columns:1fr}.symbol-secondary-grid>:last-child{grid-column:auto}}
@media(max-width:560px){.symbol-hero{grid-template-columns:1fr;padding:14px}.symbol-price,.symbol-actions{grid-column:auto;grid-row:auto}.symbol-actions{justify-content:flex-start}.symbol-price{min-width:0}.symbol-tabs{margin-inline:-2px}.symbol-chart{min-height:260px;padding:8px}.symbol-chart svg{height:220px}.chart-range{display:grid;grid-template-columns:1fr 1fr}.symbol-main-grid,.symbol-secondary-grid{gap:10px}.client-type-grid,.return-grid{padding:10px}.symbol-kpi-grid{gap:8px}}


.history-panel { margin-bottom:14px; overflow:hidden; }
.history-panel-head { align-items:end; }
.history-range { display:grid; gap:5px; min-width:130px; }
.history-range span { color:var(--muted); font-size:8px; font-weight:700; }
.history-range select { min-height:38px; padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--text); }
.history-status { padding:0 16px 10px; color:var(--muted); font-size:9px; }
.history-status.warn { color:var(--orange); }
.history-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:0 16px 12px; }
.history-metrics > div { display:grid; gap:5px; min-height:68px; padding:11px; border:1px solid var(--line); border-radius:10px; background:var(--panel-2); }
.history-metrics span { color:var(--muted); font-size:8px; }
.history-metrics strong { direction:ltr; text-align:right; font-size:13px; }
.history-chart { min-height:300px; padding:4px 16px 14px; color:var(--navy); }
.history-chart svg { width:100%; height:250px; overflow:visible; }
.history-grid line { stroke:var(--line); stroke-width:1; stroke-dasharray:5 7; }
.history-line { fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.history-area { fill:url(#historyArea); }
.history-axis { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:8px; color:var(--muted); font-size:8px; }
.history-axis b { color:var(--text); direction:ltr; }
@media(max-width:900px){.history-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.history-chart{min-height:260px}.history-chart svg{height:215px}}
@media(max-width:560px){.history-panel-head{align-items:flex-start;flex-direction:column}.history-range{width:100%}.history-metrics{padding-inline:10px}.history-chart{padding-inline:8px}.history-axis b{display:none}}


.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
.auth-mode-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.auth-mode-tabs button.active {
  background: var(--panel);
  color: var(--navy);
  box-shadow: 0 3px 12px rgba(17, 35, 70, .08);
}
.auth-mode-panel { display: none; }
.auth-mode-panel.active { display: block; }
.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.auth-form-grid .full { grid-column: 1 / -1; }
.auth-success {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  line-height: 1.8;
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
}
.auth-success:empty { display: none; }
#registerPanel { width: min(560px, 100%); }
.auth-card:has(#registerPanel.active) { width: min(560px, 100%); }
@media (max-width: 560px) {
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-form-grid .full { grid-column: auto; }
  .auth-panel { padding: 28px 18px; }
}



.hub-mobile-nav { display:none; }

.watchlist-hero-panel .panel-header { align-items:end; }
.watchlist-hero-panel .panel-actions {
  width:min(100%,920px);
  display:grid;
  grid-template-columns:minmax(150px,220px) minmax(220px,1fr) auto auto;
  align-items:end;
  gap:10px;
}
.watchlist-hero-panel .panel-actions > * { min-width:0; }
input#watchlistSearch.inline-search {
  display:block;
  width:100%;
  min-width:0;
  height:42px;
  min-height:42px;
  max-height:42px;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font:inherit;
  line-height:1.4;
}

@media (max-width:760px) {
  body.hub-root .app-shell > .sidebar { display:none !important; }
  body.hub-root .main-content {
    margin-right:0;
    
    padding:0 10px calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom));
  }
  body.hub-root .topbar { margin-inline:-10px; }
  .hub-mobile-nav {
    position:fixed;
    z-index:75;
    display:grid;
    
    grid-auto-flow:column;
    grid-auto-columns:minmax(0,1fr);
    inset-inline:0;
    
    bottom:0;
    min-height:62px;
    padding:5px 7px;
    border-top:1px solid var(--line);
    background:color-mix(in srgb,var(--panel) 98%,transparent);
    box-shadow:0 -8px 24px rgba(8,20,44,.14);
    backdrop-filter:blur(14px);
  }
  .hub-mobile-nav a {
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    padding:5px 2px;
    border-radius:10px;
    color:var(--muted);
    text-decoration:none;
  }
  .hub-mobile-nav a.active { color:var(--navy); background:var(--gold-soft); }
  .hub-mobile-nav span { font-size:18px; line-height:1; }
  .hub-mobile-nav small {
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:8px;
    font-weight:800;
  }
  .watchlist-hero-panel .panel-header { align-items:stretch; }
  .watchlist-hero-panel .panel-actions {
    width:100%;
    grid-template-columns:1fr 1fr;
  }
  .watchlist-hero-panel .panel-actions .field,
  .watchlist-hero-panel #watchlistSearch { grid-column:1/-1; }
  .watchlist-hero-panel .panel-actions button { width:100%; min-height:42px; }
}

@media (max-width:420px) {
  .watchlist-hero-panel .panel-actions { grid-template-columns:1fr; }
  .watchlist-hero-panel .panel-actions > * { grid-column:1 !important; }
  .hub-mobile-nav small { font-size:7px; }
}



.visually-hidden {
  position:absolute !important; width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important; overflow:hidden !important;
  clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important;
}
.icon-only-toggle {
  width:40px; min-width:40px; height:40px; min-height:40px;
  display:inline-grid; place-items:center; padding:0; border-radius:10px;
}
.icon-only-toggle b { font-size:18px; line-height:1; }


.data-table th, .data-table td,
.table-wrap table th, .table-wrap table td,
.admin-table th, .admin-table td {
  padding:11px 14px;
  line-height:1.65;
  vertical-align:middle;
}
.data-table th:first-child, .data-table td:first-child,
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-inline-start:18px; }
.data-table th:last-child, .data-table td:last-child,
.table-wrap table th:last-child, .table-wrap table td:last-child { padding-inline-end:18px; }
.empty-cell { padding-block:30px !important; text-align:center; color:var(--muted); }

#sectionBars { padding:10px 18px 16px; }
#sectionBars .bar-row {
  display:grid; grid-template-columns:minmax(110px,170px) minmax(120px,1fr) minmax(42px,auto);
  align-items:center; gap:14px; min-height:48px; padding:4px 0;
}
#sectionBars .bar-row > span:first-child { padding-inline:4px 10px; font-weight:700; }
#sectionBars .bar-track { min-width:0; }
#sectionBars .bar-value { padding-inline:8px 2px; text-align:end; font-variant-numeric:tabular-nums; }

.check-control {
  min-height:42px; display:flex; align-items:center; gap:9px;
  padding:8px 11px; border:1px solid var(--line); border-radius:10px;
  background:var(--panel); color:var(--text);
}
.check-control input { width:18px; height:18px; margin:0; accent-color:var(--navy); }
.check-control b { font-size:12px; font-weight:700; }

.sidebar-collapse-toggle {
  position:absolute; inset-inline-end:-17px; top:74px; z-index:4;
  width:34px; min-width:34px; height:34px; min-height:34px;
  display:grid; place-items:center; padding:0; border-radius:50%;
  background:var(--panel); border:1px solid var(--line); box-shadow:var(--shadow);
}
.sidebar-collapse-toggle span { font-size:22px; line-height:1; transform:translateY(-1px); }
.sidebar, .main-content { transition:width .18s ease, margin-right .18s ease, transform .18s ease; }
html.sidebar-collapsed { --sidebar:76px; }
html.sidebar-collapsed .sidebar .brand-mark { margin-inline:auto; }
html.sidebar-collapsed .sidebar .nav-item { justify-content:center; padding-inline:8px; }
html.sidebar-collapsed .sidebar .nav-item > span:not(.nav-icon),
html.sidebar-collapsed .sidebar .sidebar-footer .identity,
html.sidebar-collapsed .sidebar .brand-mark + .brand-copy { display:none !important; }
html.sidebar-collapsed .sidebar .nav-icon { margin:0; }

@media (max-width:1100px) {
  .sidebar-collapse-toggle { display:none; }
  html.sidebar-collapsed { --sidebar:232px; }
}
@media (max-width:700px) {
  #sectionBars { padding-inline:12px; }
  #sectionBars .bar-row { grid-template-columns:minmax(86px,110px) minmax(80px,1fr) 38px; gap:8px; }
  .data-table th, .data-table td, .table-wrap table th, .table-wrap table td { padding:9px 11px; }
}


.ui-icon,
.theme-icon,
.account-chevron,
.sidebar-toggle-icon {
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.icon-button,
.topbar-icon-link {
  display:inline-grid;
  place-items:center;
  flex:0 0 42px;
  min-width:42px;
  min-height:42px;
  line-height:1;
  text-decoration:none;
}
.theme-toggle-button {
  color:#fff !important;
  background:rgba(255,255,255,.1) !important;
  border-color:rgba(255,255,255,.26) !important;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}
.theme-toggle-button:hover,
.theme-toggle-button:focus-visible { background:rgba(255,255,255,.18) !important; }
.theme-toggle-button .theme-icon, .theme-toggle-button .theme-sun, .theme-toggle-button .theme-moon { width:20px; height:20px; flex:0 0 20px; display:none; }
html[data-theme="dark"] .theme-toggle-button .theme-icon-sun,
html[data-theme="dark"] .theme-toggle-button .theme-sun { display:inline-block; }
html[data-theme="dark"] .theme-toggle-button .theme-icon-moon,
html[data-theme="dark"] .theme-toggle-button .theme-moon { display:none; }
html:not([data-theme="dark"]) .theme-toggle-button .theme-icon-sun,
html:not([data-theme="dark"]) .theme-toggle-button .theme-sun { display:none; }
html:not([data-theme="dark"]) .theme-toggle-button .theme-icon-moon,
html:not([data-theme="dark"]) .theme-toggle-button .theme-moon { display:inline-block; }


.topbar .theme-toggle-button {
  color:var(--navy) !important;
  background:var(--panel) !important;
  border-color:var(--line) !important;
  box-shadow:0 5px 16px rgba(11,35,75,.08);
}
.topbar .theme-toggle-button:hover,
.topbar .theme-toggle-button:focus-visible { background:var(--panel-2) !important; }
.sidebar .theme-toggle-button {
  color:#fff !important;
  background:rgba(255,255,255,.1) !important;
  border-color:rgba(255,255,255,.26) !important;
}
.alert-bell[aria-expanded="true"] { color:var(--primary); border-color:color-mix(in srgb,var(--primary) 35%,var(--line)); }


body.hub-root .topbar,
body[data-initial-view="admin"] .topbar {
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(320px,520px) auto;
  align-items:center;
  gap:16px;
}
body.hub-root .topbar .title-wrap,
body[data-initial-view="admin"] .topbar .title-wrap { min-width:0; }
.global-search {
  width:100% !important;
  min-width:0 !important;
  max-width:520px !important;
  margin:0 !important;
  justify-self:center;
}
.global-search > input {
  width:100%;
  height:44px !important;
  min-height:44px !important;
  max-height:44px !important;
  padding-inline-start:44px !important;
  padding-inline-end:82px !important;
  border-radius:13px;
  font-size:11px;
  line-height:1.4;
  background:var(--panel);
  box-shadow:0 7px 22px rgba(9,27,59,.06);
}
.global-search-icon { inset-inline-start:15px !important; }
.global-search > kbd { inset-inline-end:10px !important; }
.topbar-actions { flex-wrap:nowrap; gap:8px; }

.account-chip-button {
  appearance:none;
  cursor:pointer;
  font:inherit;
  text-align:right;
  min-height:44px;
  max-width:245px;
  padding-inline:10px 8px;
}
.account-chip-button:hover,
.account-chip-button:focus-visible {
  border-color:color-mix(in srgb,var(--primary) 42%,var(--line));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 10%,transparent);
  outline:none;
}
.account-chevron { width:16px; height:16px; color:var(--muted); transition:transform .16s ease; }
.account-chip-button:hover .account-chevron { transform:translateX(-2px); color:var(--primary); }


.alert-menu { position:relative; flex:0 0 auto; }
.alert-dropdown {
  position:absolute;
  z-index:78;
  inset-inline-end:0;
  top:calc(100% + 10px);
  width:min(380px,calc(100vw - 24px));
  max-height:min(520px,calc(100vh - 110px));
  display:flex;
  flex-direction:column;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transform:translateY(-6px);
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel);
  box-shadow:0 24px 60px rgba(7,22,50,.22);
  overflow:hidden;
  transition:opacity .14s ease,transform .14s ease,visibility .14s;
}
.alert-menu:hover .alert-dropdown,
.alert-menu:focus-within .alert-dropdown,
.alert-menu.open .alert-dropdown {
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.alert-dropdown > header {
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 14px;
  border-bottom:1px solid var(--line);
}
.alert-dropdown > header > div { display:grid; gap:2px; }
.alert-dropdown > header strong { font-size:13px; }
.alert-dropdown > header small { color:var(--muted); font-size:9px; }
.text-button { border:0; background:transparent; color:var(--primary); font:inherit; font-size:9px; cursor:pointer; padding:5px; }
.alert-preview-list { overflow:auto; padding:6px; }
.alert-preview-item {
  width:100%;
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:9px;
  align-items:start;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--text);
  padding:10px;
  text-align:right;
  cursor:pointer;
}
.alert-preview-item:hover { background:var(--panel-2); }
.alert-preview-item .preview-bell { width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--panel-2); }
.alert-preview-item .preview-copy { min-width:0;display:grid;gap:3px; }
.alert-preview-item strong { font-size:10px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.alert-preview-item p { margin:0;color:var(--muted);font-size:9px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.alert-preview-item time { color:var(--muted);font-size:8px; }
.alert-preview-item.unread { background:color-mix(in srgb,var(--primary) 7%,var(--panel)); }
.alert-preview-item.unread strong { font-weight:900; color:var(--primary); }
.alert-preview-item.unread .preview-bell { background:var(--gold-soft); color:#9a6700; }
.alert-preview-empty { min-height:110px;display:grid;place-items:center;color:var(--muted);font-size:10px;text-align:center;padding:20px; }
.alert-dropdown-footer { display:block;padding:11px 14px;border-top:1px solid var(--line);color:var(--primary);font-size:10px;font-weight:800;text-align:center;text-decoration:none; }
.alert-bell .ui-icon { width:19px;height:19px; }


.modal-title-row { display:flex;align-items:flex-start;justify-content:space-between;gap:14px; }
.modal-title-row .modal-sub { margin-bottom:16px; }
.modal-close-button { width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:var(--panel-2);color:var(--muted);font-size:21px;cursor:pointer; }
.profile-modal { width:min(760px,calc(100vw - 32px)); overflow:visible; }
.profile-summary-strip { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 16px; }
.profile-summary-strip > span { min-width:0;display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--panel-2); }
.profile-summary-strip small { color:var(--muted);font-size:9px; }
.profile-summary-strip strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px; }
.profile-form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-form-grid .auth-field { margin:0;min-width:0; }
.field-state { display:block;margin-top:5px;color:var(--muted);font-size:8px; }
.field-state.verified { color:var(--green); }
.profile-note { margin:14px 0 0;padding:9px 11px;border-radius:10px;background:var(--panel-2);color:var(--muted);font-size:9px;line-height:1.8; }
.profile-actions { align-items:center; }
.member-modal {
  width:min(980px,calc(100vw - 36px));
  max-height:calc(100vh - 32px);
  overflow:hidden;
  padding:22px;
}
.member-modal .member-form-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.member-modal .member-form-grid .auth-field { margin:0;min-width:0; }
.member-modal .member-form-grid .full { grid-column:1/-1; }
.member-modal textarea { min-height:76px;max-height:76px;resize:none; }
.member-modal .modal-actions { margin-top:14px; }
.modal input,
.modal select,
.modal textarea { min-width:0;max-width:100%;box-sizing:border-box; }
.modal input[dir="ltr"],
.modal textarea[dir="ltr"] { text-align:left; }


.v2-filter-grid {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  align-items:stretch;
}
.v2-filter-grid > .field,
.v2-filter-grid > .search-field {
  min-width:0;
  min-height:74px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  margin:0;
}
.v2-filter-grid > .field[hidden],
.v2-filter-grid > .search-field[hidden] { display:none !important; }
.v2-filter-grid .field > span:first-child,
.v2-filter-grid .search-field > span:first-child { min-height:22px;display:flex;align-items:center;margin-bottom:5px; }
.v2-filter-grid input,
.v2-filter-grid select,
.v2-filter-grid .search-control,
.v2-filter-grid .check-control { width:100%;height:42px;min-height:42px;box-sizing:border-box; }
.v2-filter-grid .check-control { justify-content:flex-start; }


.sidebar-collapse-toggle {
  
  inset-inline-end:-18px !important;
  top:78px !important;
  color:var(--navy) !important;
  background:var(--panel) !important;
  border:1px solid color-mix(in srgb,var(--navy) 22%,var(--line)) !important;
  box-shadow:0 8px 24px rgba(5,20,46,.2) !important;
}
.sidebar-collapse-toggle .sidebar-toggle-icon { width:18px;height:18px; }



.ticker-item { min-width:190px; }
.ticker-item strong { font-variant-numeric:tabular-nums; }
.ticker-item[data-format="rial"] strong::after { content:""; }





@media (max-width:1280px) {
  body.hub-root .topbar,
  body[data-initial-view="admin"] .topbar { grid-template-columns:minmax(190px,1fr) minmax(280px,430px); }
  body.hub-root .topbar .topbar-actions,
  body[data-initial-view="admin"] .topbar .topbar-actions { grid-column:1/-1;justify-self:end; }
  .v2-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:900px) {
  body.hub-root .topbar,
  body[data-initial-view="admin"] .topbar { display:flex;align-items:stretch; }
  .global-search { order:3;max-width:none !important; }
  .topbar-actions { width:100%;overflow-x:auto;padding-bottom:2px; }
  .profile-summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-form-grid { grid-template-columns:1fr; }
  .member-modal { overflow:auto; }
  .member-modal .member-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v2-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:600px) {
  .global-search > input { padding-inline-end:42px !important;font-size:10px; }
  .global-search > kbd { display:none; }
  .account-chip-button { max-width:190px; }
  .account-chip-button .who span { display:none; }
  .alert-dropdown { position:fixed;top:66px;inset-inline:10px;width:auto;max-height:calc(100vh - 140px); }
  .profile-summary-strip { grid-template-columns:1fr 1fr; }
  .member-modal .member-form-grid { grid-template-columns:1fr; }
  .v2-filter-grid { grid-template-columns:1fr !important; }
}




.clock-box,
.account-chip,
.alert-menu,
.topbar-actions .icon-button,
.topbar-actions .primary-button,
.topbar-actions .secondary-button {
  flex-shrink: 0;
}


.account-chip .who { min-width: 0; }
.account-chip .who strong,
.account-chip .who span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clock-box strong,
.clock-box span { white-space: nowrap; }


.global-search { min-width: 200px; }


@media (max-width: 1440px) {
  .global-search { order: 3; flex-basis: 100%; max-width: none; margin: 8px 0 0; }
  .topbar { flex-wrap: wrap; }
}



.kpi-value {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.kpi-value strong {
  display: inline;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.kpi-value small {
  display: inline;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}



.global-search { max-width: 760px; }

@media (max-width: 1360px) {
  .global-search { order: 3; flex-basis: 100%; max-width: none; margin: 8px 0 0; }
  .topbar { flex-wrap: wrap; }
}



.ticker-item strong { direction: rtl; text-align: right; }


.kpi-value { direction: rtl; }



.multiselect { position: relative; }
.multiselect-button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  text-align: start;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multiselect-button:hover { border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); }
.multiselect.has-selection .multiselect-button {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.multiselect-panel {
  position: absolute;
  z-index: 60;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  min-width: 100%;
  max-width: 320px;
  max-height: 300px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(8, 20, 44, .16);
}
.multiselect-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.multiselect-option:hover { background: var(--panel-2); }
.multiselect-option input { flex: 0 0 auto; }
.multiselect-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multiselect-clear {
  width: 100%;
  margin-bottom: 6px;
  padding: 5px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.multiselect-clear:hover { color: var(--primary); }
.multiselect-empty { margin: 0; padding: 8px; color: var(--muted); font-size: 11px; }


.range-field { gap: 4px; }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--primary);
}
.range-row output {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: start;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.range-field .range-hint { color: var(--muted); font-size: 10px; }



.v2-filter-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.v2-filter-grid select,
.v2-filter-grid .search-control,
.v2-filter-grid .input-shell,
.v2-filter-grid .multiselect-button,
.v2-filter-grid .check-control {
  width:100%;
  height:42px;
  min-height:42px;
  box-sizing:border-box;
}
input[type="checkbox"], input[type="radio"] {
  inline-size:16px !important;
  block-size:16px !important;
  min-inline-size:16px !important;
  min-block-size:16px !important;
  max-inline-size:16px !important;
  max-block-size:16px !important;
  padding:0 !important;
  margin:0;
  flex:0 0 16px;
  accent-color:var(--primary);
}
.v2-filter-grid input[type="range"], .range-row input[type="range"] {
  height:18px !important;
  min-height:18px !important;
  padding:0 !important;
}
.multiselect-option { min-height:36px; gap:9px; }
.multiselect-option input[type="checkbox"] { inline-size:15px !important; block-size:15px !important; }
.check-control { gap:8px; padding-inline:11px; }
.check-control b { line-height:1.55; }


.topbar-actions .theme-toggle-button + #refreshButton,
.symbol-actions .theme-toggle-button + #refreshSymbol { margin-inline-start:-3px; }
.symbol-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.symbol-actions .icon-button { color:var(--navy);background:var(--panel);border:1px solid var(--line); }


.money-pair { display:inline-flex;flex-direction:row;direction:rtl;align-items:baseline;gap:5px;white-space:nowrap; }
.money-pair .money-number { direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums; }
.money-pair .money-unit { color:var(--muted);font-size:.78em;font-weight:600; }
.numeric { font-variant-numeric:tabular-nums; }


.v2-filter-panel, .module-status-banner, .v2-table-panel, .history-panel,
.v2-insight-grid > .panel, .module-kpi-grid .kpi-card {
  border-radius:15px;
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:0 10px 28px rgba(8,28,63,.055);
}
.v2-filter-grid > .field, .v2-filter-grid > .search-field { min-height:70px; }
.v2-filter-grid .field > span:first-child, .v2-filter-grid .search-field > span:first-child {
  min-height:20px;margin-bottom:5px;font-size:10px;font-weight:700;color:var(--muted);
}
.range-row { display:none !important; } 


.profile-page .profile-layout { display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:16px; }
.profile-page .profile-card { padding:20px; }
.profile-page .profile-form { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.profile-page .profile-form .full { grid-column:1/-1; }
.profile-page .verification-card { display:grid;gap:12px; }
.verification-method { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--panel-2); }
.verification-method > div { min-width:0;display:grid;gap:3px; }
.verification-method strong { font-size:11px; }
.verification-method small { font-size:9px;color:var(--muted);line-height:1.7; }
.verification-method .verified { color:var(--green);font-weight:800; }
.verification-code-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px; }
.profile-meta-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.profile-meta-grid > div { padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--panel-2);display:grid;gap:4px; }
.profile-meta-grid span { color:var(--muted);font-size:9px; }
.profile-meta-grid strong { font-size:11px;overflow-wrap:anywhere; }


@media (min-width:901px) {
  .member-modal { max-height:none !important; overflow:visible !important; }
  .member-modal .member-form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .member-modal textarea { min-height:64px;max-height:64px; }
}



.data-table th .sort-head { width:100%;min-height:34px;display:flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;cursor:pointer;text-align:inherit;padding:0; }
.data-table th .sort-head:hover, .data-table th .sort-head:focus-visible { color:var(--primary);outline:none; }

@media (max-width:900px) {
  .profile-page .profile-layout { grid-template-columns:1fr; }
  .profile-page .profile-form { grid-template-columns:1fr; }
  .profile-page .profile-form .full { grid-column:auto; }
}


:where(.app-shell,.main-content,.section-stack,.home-section,.panel,.panel-body,.filter-panel,.kpi-grid,.v2-form-grid,.table-wrap) > * {
  min-width: 0;
}
:where(.panel,.filter-panel,.home-section,.home-hero,.module-status-banner,.kpi-card,.personal-stat,.filter-summary-box,.trend-insight-box) {
  box-sizing: border-box;
  max-width: 100%;
}
:where(.panel-body,.boxed-data-body) { padding: 16px; }
:where(.panel-body,.home-section,.filter-panel,.module-status-banner) {
  overflow-wrap: anywhere;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}
.data-table { width: 100%; }
.data-table :where(th,td) {
  box-sizing: border-box;
  padding: 10px 12px;
  line-height: 1.65;
  vertical-align: middle;
}
.data-table th { white-space: nowrap; }
.data-table td:not(.numeric):not(.watch-column) { overflow-wrap: anywhere; }
.data-table .numeric { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* see th.numeric in app.css -- the header is prose and stays rtl */
.data-table th.numeric { direction: rtl; }
.data-table .watch-column { width: 48px; min-width: 48px; max-width: 48px; padding-inline: 7px; text-align: center; }
.watch-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; display: grid; place-items: center; }


:where(.field,.auth-field) :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
:where(.inline-search,.small-select,.global-search) :where(input,select),
.multiselect-button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
:where(input[type="checkbox"],input[type="radio"]) {
  inline-size: 16px !important;
  block-size: 16px !important;
  min-inline-size: 16px !important;
  min-block-size: 16px !important;
  max-inline-size: 16px !important;
  max-block-size: 16px !important;
  padding: 0 !important;
}


:where(.section-stack > .home-section,.home-analysis-grid > .panel,.home-visual-grid > .panel,
       .market-visual-grid > .panel,.market-table-panel,.module-history-panel,
       .trend-table-panel,.trends-main-grid > .panel) {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
:where(.kpi-card,.personal-stat,.filter-summary-box,.trend-insight-box) { contain: layout paint style; }


.trends-filter-panel { margin-bottom: 14px; }
.trends-filter-grid { grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; }
.filter-summary-box {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.filter-summary-box span { color: var(--muted); font-size: 10px; }
.filter-summary-box strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.trends-overview { grid-template-columns: repeat(5,minmax(150px,1fr)); margin-block: 14px; }
.trend-market-card { cursor: pointer; transition: border-color .15s ease,transform .15s ease,box-shadow .15s ease; }
.trend-market-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb,var(--primary) 42%,var(--line)); }
.trend-market-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent),var(--shadow); }
.trend-market-card > div { min-width: 0; display: grid; gap: 7px; }


.trends-overview .kpi-card,
.trend-insight-box { justify-content: center; text-align: center; }
.trends-overview .kpi-card > div,
.trend-insight-box { justify-items: center; }
.trends-overview .kpi-card strong,
.trends-overview .kpi-card span,
.trends-overview .kpi-card small,
.trend-insight-box strong,
.trend-insight-box span { text-align: center; }

.trends-overview .kpi-card .money-pair,
.trend-insight-box .money-pair { justify-content: center; }
.trend-market-card strong { overflow-wrap: anywhere; }
.trends-main-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,.75fr); gap: 14px; margin-bottom: 14px; }
.trend-chart-panel,.trend-insight-panel,.trend-table-panel { min-width: 0; }
.trend-chart { min-height: 330px; }
.trend-insight-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 14px; }
.trend-insight-box { min-height: 82px; display: grid; align-content: center; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.trend-insight-box span { color: var(--muted); font-size: 10px; }
.trend-insight-box strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.trend-data-table { min-width: 760px; }


:where(.kpi-card,.personal-stat,.coverage-row,.freshness-row,.insight-item,.symbol-summary-card,.profile-summary-strip>span) :where(strong,span,small,p) {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.money-pair { max-width: 100%; }

@media (max-width: 1180px) {
  .trends-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .trends-main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .trends-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .trends-filter-grid,.trends-overview,.trend-insight-list { grid-template-columns: 1fr; }
  .trend-chart { min-height: 280px; }
  .data-table :where(th,td) { padding: 9px 10px; }
}





.filter-primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  
  gap: 14px;
  align-items: end;
}
.filter-primary .filter-field.wide { grid-column: span 2; }

.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.filter-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.filter-hint {
  display: inline-grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-style: normal;
  cursor: help;
}



.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.filter-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.filter-more:hover { border-color: var(--accent); color: var(--accent); }
.filter-more.has-filters { border-color: var(--accent); color: var(--accent); }
.filter-more-caret { transition: transform .18s ease; font-size: 10px; }
.filter-more.open .filter-more-caret { transform: rotate(180deg); }

.filter-more-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.filter-reset {
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-size: 12px;
}
.filter-reset:hover { color: var(--red); }



.filter-advanced {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}
.filter-advanced[hidden] { display: none; }

.filter-group {
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.filter-group legend {
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
}
.filter-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}


.filter-primary > *,
.filter-group-grid > * { min-width: 0; }
.filter-group-grid .filter-field,
.filter-primary .filter-field { min-width: 0; }
.filter-group-grid select,
.filter-group-grid input,
.filter-primary select,
.filter-primary input { max-width: 100%; }
.filter-group-grid .range-inputs,
.filter-primary .range-inputs { flex-wrap: nowrap; }

@media (max-width: 1180px) {
  .filter-primary,
  .filter-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .filter-primary,
  .filter-group-grid { grid-template-columns: 1fr; }
  .filter-primary .filter-field.wide { grid-column: auto; }
}



.segmented-filter {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented-filter::-webkit-scrollbar { display: none; }
.segmented-filter button {
  flex: 1;
  min-width: 52px;
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.segmented-filter button.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow);
}



.multi-filter { display: flex; flex-direction: column; gap: 7px; }
.multi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.multi-chips:empty { display: none; }

.multi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--text);
  font-size: 11.5px;
}
.multi-remove {
  display: grid;
  place-items: center;
  width: 17px; height: 17px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .12);
  color: inherit;
  font-size: 12px;
  line-height: 1;
}
/* var(--red) alone is a mid-tone red in both themes -- white text on it
   measured 3.53:1 (light) / 2.69:1 (dark), under the 4.5:1 minimum. Darkening
   the hover fill keeps the same hue as everywhere else red is used for
   negative values, without touching that shared token. */
.multi-remove:hover { background: color-mix(in srgb, var(--red) 70%, black); color: #fff; }



.range-filter { display: flex; flex-direction: column; gap: 9px; }

.range-track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}
.range-track::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}
.range-fill {
  position: absolute;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}


.range-track input[type="range"] {
  position: absolute;
  inset-inline: 0;
  width: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.range-track input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(8, 18, 40, .22);
  cursor: grab;
}
.range-track input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--accent);
  cursor: grab;
}
.range-track input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-num {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.range-sep { font-size: 11px; color: var(--muted); }

.range-readout,
.threshold-readout {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}



.threshold-filter { display: flex; flex-direction: column; gap: 8px; }

.threshold-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}
.threshold-foot { display: flex; align-items: center; gap: 10px; }
.threshold-num {
  width: 110px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}



.toggle-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
}
.toggle-filter input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: relative;
  width: 38px; height: 21px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  transition: background .16s ease;
  flex: none;
}
.toggle-track i {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(8, 18, 40, .25);
  transition: transform .16s ease;
}
.toggle-filter input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }

.toggle-filter input:checked + .toggle-track i { transform: translateX(-17px); }
.toggle-filter input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }



.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.filter-chips[hidden] { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 11.5px;
}
.filter-chip:hover { border-color: var(--red); }
.filter-chip:hover .chip-x { color: var(--red); }
.chip-label { color: var(--muted); }
.chip-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip-x { color: var(--muted); font-size: 13px; line-height: 1; }



.column-picker { position: relative; }

.column-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
}
/* has-hidden used to recolour the whole button to --accent, the same
   treatment :hover and :focus-visible use elsewhere in this file -- on a
   board where columns are hidden by default (the common case) that state
   never clears, reading as a stuck hover/focus ring rather than a column
   count. The badge alone already says N columns are hidden; the button
   itself now only reacts to real interaction. */
.column-trigger:hover { border-color: var(--accent); color: var(--accent); }

.column-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--muted);
  color: var(--panel);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}


.column-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 40;
  width: min(320px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(8, 18, 40, .2);
}
.column-panel[hidden] { display: none; }

.column-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}
.column-reset { border: 0; background: none; color: var(--muted); font-size: 11.5px; }
.column-reset:hover { color: var(--accent); }

.column-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.column-preset {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
}
.column-preset:hover { border-color: var(--accent); color: var(--accent); }

.column-list { display: grid; gap: 2px; }
.column-group-label {
  margin: 10px 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.column-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.column-option:hover { background: var(--hover); }
.column-option.locked { opacity: .68; cursor: default; }
.column-lock { margin-inline-start: auto; font-style: normal; font-size: 11px; color: var(--muted); }

.column-panel-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}



@media (max-width: 720px) {
  .filter-primary { grid-template-columns: 1fr; }
  .filter-primary .filter-field.wide { grid-column: auto; }
  .filter-group-grid { grid-template-columns: 1fr; }
  .filter-actions { flex-wrap: wrap; }
  .filter-more { flex: 1; justify-content: center; }
  .column-panel { position: fixed; inset-inline: 12px; top: auto; bottom: 12px; width: auto; }
}



.saved-filters { position: relative; }

.saved-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
}
.saved-trigger:hover,
.saved-trigger.has-sets { border-color: var(--accent); color: var(--accent); }

.saved-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.saved-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 45;
  width: min(340px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(8, 18, 40, .2);
}
.saved-panel[hidden] { display: none; }

.saved-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.saved-new { display: flex; gap: 8px; }
.saved-new input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
}
.saved-new input:disabled { opacity: .55; }

.saved-hint { margin: 7px 0 12px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.saved-empty { margin: 0; padding: 16px 4px; font-size: 11.5px; color: var(--muted); line-height: 1.9; text-align: center; }

.saved-list { display: grid; gap: 4px; max-height: 44vh; overflow-y: auto; }

.saved-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  padding: 2px;
}
.saved-item:hover { background: var(--hover); }
.saved-item.active { background: var(--gold-soft); }

.saved-apply {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  text-align: right;
}
.saved-apply strong { font-size: 12.5px; }
.saved-apply small { font-size: 10.5px; color: var(--muted); }

.saved-item-actions { display: flex; gap: 2px; }
.saved-icon {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.saved-icon:hover { background: var(--panel); color: var(--accent); }
.saved-icon.danger:hover { color: var(--red); }

.filter-head-actions { display: flex; align-items: center; gap: 8px; }


.sort-dir button { min-width: 32px; font-size: 13px; }
.inline-field select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
}


.kpi-card.kpi-up strong { color: var(--green); }
.kpi-card.kpi-down strong { color: var(--red); }

@media (max-width: 720px) {
  .saved-panel { position: fixed; inset-inline: 12px; top: auto; bottom: 12px; width: auto; }
  .filter-head-actions { flex-wrap: wrap; }
}



.column-option {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: default;
}
.column-option > label { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.column-option > label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.column-grip {
  color: var(--muted);
  font-size: 13px;
  cursor: grab;
  line-height: 1;
  letter-spacing: -2px;
}
.column-option.locked .column-grip { visibility: hidden; }
.column-option.dragging { opacity: .45; }


.column-option.drop-above { border-top-color: var(--accent); }
.column-option.drop-below { border-bottom-color: var(--accent); }

.column-move { display: flex; flex-direction: column; gap: 1px; }
.column-nudge {
  width: 20px; height: 14px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
}
.column-nudge:hover:not(:disabled) { background: var(--hover); color: var(--accent); }
.column-nudge:disabled { opacity: .28; }


.data-table thead th { position: relative; }

.col-resize {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 7px;
  cursor: col-resize;
  touch-action: none;
  
  background: transparent;
}
.col-resize:hover,
.col-resize:focus-visible {
  background: linear-gradient(to right, transparent 2px, var(--accent) 2px, var(--accent) 4px, transparent 4px);
  outline: none;
}
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing .data-table { pointer-events: none; }
body.col-resizing .col-resize { pointer-events: auto; }



.data-table { table-layout: auto; }

.saved-default-mark { font-style: normal; color: var(--gold); font-size: 11px; }
.saved-icon.is-default { color: var(--gold); }

@media (max-width: 720px) {
  
  .column-grip { display: none; }
  .column-option { grid-template-columns: 1fr auto auto; }
  .col-resize { display: none; }
}



.v2-filter-panel .v2-filter-body{padding:12px 16px 14px}
.v2-filter-panel .filter-primary{grid-template-columns:minmax(280px,2.2fr) repeat(3,minmax(155px,1fr));gap:12px}
.v2-filter-panel .filter-primary .filter-field.wide{grid-column:auto}
.v2-filter-panel .filter-actions{margin-top:10px;padding-top:10px}
.v2-filter-panel .filter-advanced{gap:10px;margin-top:10px}
.v2-filter-panel .filter-group{padding:10px 12px 12px;border-radius:11px}
.v2-filter-panel .filter-group-grid{grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px}
.v2-filter-panel .range-track{height:20px}
.v2-filter-panel .range-inputs{gap:6px}
.v2-filter-panel .range-num{padding:6px 8px;min-height:36px}
.v2-filter-panel .threshold-num{width:104px;min-height:36px}
.v2-filter-panel .filter-chips{margin-top:8px}


.v2-topbar .workspace-controls{order:-1;flex:0 1 auto}
.v2-topbar .workspace-select{max-width:180px}


.comparison-editor{grid-template-columns:minmax(190px,.65fr) minmax(320px,1.8fr) auto;align-items:stretch;padding:16px}
.comparison-editor .inline-search{height:44px;align-self:start}
.comparison-editor select[multiple]{height:132px;min-height:132px;max-height:132px;border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:8px 12px;line-height:1.8;overflow:auto}
.comparison-editor .primary-button{align-self:end;min-height:44px}


.alert-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;padding:16px}
.alert-form-grid>.primary-button{grid-column:1/-1;justify-self:stretch;width:100%;min-height:44px}
.alert-form-grid .check-field{min-height:68px;justify-content:flex-end}


.announcement-editor{display:grid!important;grid-template-columns:auto minmax(125px,170px) minmax(280px,1fr) auto;align-items:center;gap:10px}
.announcement-editor .grow{min-width:0!important;width:100%}
.announcement-editor input,.announcement-editor select{min-height:42px}

@media(max-width:1180px){
  .v2-filter-panel .filter-primary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v2-filter-panel .filter-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .v2-filter-panel .filter-primary,.v2-filter-panel .filter-group-grid{grid-template-columns:1fr}
  .comparison-editor,.alert-form-grid,.announcement-editor{grid-template-columns:1fr!important}
  .comparison-editor .primary-button,.announcement-editor .primary-button{width:100%}
}


.v2-topbar .title-wrap { display:flex; align-items:center; gap:10px; min-width:0; }
.v2-topbar .topbar-actions { display:flex; align-items:center; gap:8px; margin-inline-start:auto; }
.v2-topbar .topbar-actions > * { align-self:center; }
.v2-topbar .clock-box { display:flex; flex-direction:column; justify-content:center; line-height:1.25; text-align:center; }
.v2-topbar .icon-button, .v2-topbar .primary-button.compact { min-height:38px; }


.watchlist-table .watch-name {
  max-width: 35ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .watchlist-table .watch-name { max-width: 22ch; }
}


.saved-views-host { display: flex; align-items: center; }
.saved-views-host .saved-filters { position: relative; }

.saved-views-host .saved-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  inset-inline-start: auto;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow: auto;
  z-index: 40;
}
@media (max-width: 700px) {
  .saved-views-host .saved-trigger-label { display: none; }
}


.filter-field .multi-chips {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


@media (min-width: 1100px) {
  .global-search { width: min(100%, 900px); max-width: 900px; flex: 1 1 520px; }
}




.settings-transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 18px 16px; }
.settings-import-label { cursor: pointer; }
.settings-transfer-status { flex-basis: 100%; margin: 0; font-size: 12px; }
.settings-transfer-status.error { color: var(--down, #c15b52); }


.bonds-bubble { padding: 8px 18px 18px; overflow-x: auto; }
.bonds-bubble svg { display: block; width: 100%; min-width: 560px; height: auto; }
.bond-bubble-dot { transition: fill-opacity .12s ease; pointer-events: none; }
.bond-bubble-hit { fill: transparent; stroke: none; cursor: crosshair; pointer-events: all; }
.bond-bubble-hit:hover { stroke: currentColor; stroke-width: 1; stroke-opacity: .22; }
@media (prefers-reduced-motion: reduce) { .bond-bubble-dot { transition: none; } }


@media (min-width: 1100px) {
  body.hub-root .topbar { flex-wrap: nowrap; align-items: center; }
  body.hub-root .topbar > * { min-width: 0; }
  .global-search {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 320px;
    margin-inline: 20px !important;
  }
  body.hub-root .topbar-actions { flex: 0 0 auto; }
}


.bonds-bubble { position: relative; }
.bubble-tip {
  position: fixed;
  inset: auto auto auto auto;
  z-index: 1000;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: 12px;
  direction: rtl;
  text-align: right;
}
.bubble-tip[hidden] { display: none !important; }
.bubble-tip strong { display: block; font-size: 13px; }
.bubble-tip small { display: block; color: var(--muted); margin-bottom: 6px; overflow-wrap: anywhere; }
.bubble-tip dl { display: grid; gap: 3px; margin: 0; }
.bubble-tip dl > div { display: flex; justify-content: space-between; gap: 12px; }
.bubble-tip dt { color: var(--muted); }
.bubble-tip dd { margin: 0; font-variant-numeric: tabular-nums; }


.bubble-legend-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; justify-content: flex-end; }
.bubble-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.bubble-key { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.bubble-key i { width: 10px; height: 10px; border-radius: 50%; opacity: .55; }

.bubble-key i.is-block { background: none; border: 1px dashed currentColor; opacity: .85; }



.global-search-panel { max-width: 100%; }
.search-result strong,
.search-result small,
.search-result-title { overflow-wrap: anywhere; white-space: normal; }
.global-search-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.global-search-board { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.global-search-board select { min-height: 28px; font-size: 11px; padding: 2px 6px; }


.workspace-controls,
body.platform-v270 .workspace-controls,
body.platform-v270 .topbar-actions .workspace-controls {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch;
  flex-wrap: nowrap;
  width: auto;
  max-width: 100%;
  overflow: hidden;
}

.workspace-controls .workspace-select {
  flex: 1 1 auto;
  min-width: 96px;
  max-width: 200px;
}
.workspace-controls > :not(.workspace-select) { flex: 0 0 auto; }
.workspace-controls .workspace-favorite,
.workspace-controls .workspace-rename,
.workspace-controls .workspace-default,
.workspace-controls .workspace-link,
.workspace-controls .workspace-delete { min-width: 34px; }
@media (max-width: 760px) {
  
  .workspace-controls .workspace-link { display: none; }
  .workspace-controls .workspace-select { min-width: 72px; }
}


@media (min-width: 900px) {
  .global-search-panel {
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: min(760px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }
}

.search-board-tag {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.select-column{width:38px;text-align:center!important}.select-column input{width:16px;height:16px}
.selection-badge{border:1px solid var(--border);border-radius:999px;padding:6px 11px;background:var(--surface-soft);font-size:.8rem;white-space:nowrap}
.bulk-member-grid{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:12px;padding:16px;border-bottom:1px solid var(--border);align-items:end}
.bulk-member-grid .full{grid-column:1/-2}.bulk-message-field textarea{min-height:74px;resize:vertical}
.bulk-channels{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--border);border-radius:9px;padding:9px 11px;grid-column:1/-2}
.bulk-channels legend{padding:0 6px;color:var(--muted);font-size:.75rem}.bulk-channels label{display:flex;align-items:center;gap:5px;font-size:.82rem}
.member-ops-summary{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;padding:16px}
.member-ops-summary>div{border:1px solid var(--border);border-radius:10px;padding:11px;background:var(--surface-soft);display:grid;gap:5px}.member-ops-summary span{font-size:.76rem;color:var(--muted)}.member-ops-summary strong{font-size:.95rem}
.bulk-footer-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bulk-footer-actions>span{margin-inline-end:auto}
@media(max-width:1050px){.bulk-member-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.member-ops-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:620px){.bulk-member-grid,.member-ops-summary{grid-template-columns:1fr}.bulk-member-grid .full,.bulk-channels{grid-column:auto}.bulk-footer-actions>*{width:100%}}


.market-overview-section {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--gold) 16%);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--gold) 9%, transparent) 0, transparent 34%),
    var(--panel);
  box-shadow: 0 18px 40px rgba(8, 24, 55, .06);
}

.market-overview-head { margin: 0; align-items: flex-start; }
.market-overview-head h2 { margin-bottom: 4px; }
.market-overview-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.market-session-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2, var(--bg)); font-size: 12px;
}
.market-session-chip i { width: 8px; height: 8px; border-radius: 50%; background: #d45b5b; box-shadow: 0 0 0 4px rgba(212,91,91,.12); }
.market-session-chip.market-open i { background: #2eae70; box-shadow: 0 0 0 4px rgba(46,174,112,.13); }
.market-session-chip.market-preopen i,
.market-session-chip.market-after i { background: #d7a72d; box-shadow: 0 0 0 4px rgba(215,167,45,.14); }
.market-session-chip strong { color: var(--text); }
.market-session-chip b { color: var(--muted); font-weight: 600; }

.market-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.market-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.market-decision-card {
  min-width: 0;
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 94%, var(--bg) 6%);
}
.market-decision-card > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.market-decision-card > strong,
.market-decision-card > a > strong { display: block; color: var(--text); font-size: 16px; line-height: 1.55; }
.market-decision-card > small,
.market-decision-card > a > small { display: block; color: var(--muted); font-size: 10px; line-height: 1.75; }
.market-decision-card.regime { border-inline-start: 4px solid var(--muted); }
.market-decision-card.regime.strong-demand,
.market-decision-card.regime.positive { border-inline-start-color: var(--green); }
.market-decision-card.regime.strong-supply,
.market-decision-card.regime.negative { border-inline-start-color: var(--red); }
.market-decision-card.regime.balanced { border-inline-start-color: var(--warning); }
.market-decision-card a { min-width: 0; }
.market-decision-card a strong,
.market-decision-card a small { overflow: hidden; text-overflow: ellipsis; }
.market-decision-summary {
  margin: -4px 2px 0;
  padding: 10px 13px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--navy) 5%, transparent);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.market-kpi {
  min-width: 0; min-height: 112px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg) 8%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 6px;
}
.market-kpi.primary { border-color: color-mix(in srgb, var(--navy) 36%, var(--line)); }
.market-kpi > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.market-kpi > strong {
  max-width: 100%; font-size: clamp(18px, 2vw, 27px); line-height: 1.2; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.market-kpi > small { min-height: 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.market-kpi > small.positive, .market-kpi > strong.positive { color: var(--positive, #168657); }
.market-kpi > small.negative, .market-kpi > strong.negative { color: var(--negative, #c24d4d); }

.market-overview-lower { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }
.market-opportunity-card { grid-column: 1 / -1; }
.market-flow-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.market-flow-columns h3 { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.market-rank-list { display: grid; gap: 7px; }
.market-rank-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.4fr) auto; gap: 9px; align-items: center; min-height: 28px; }
.market-rank-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.market-rank-track { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--line) 65%, transparent); overflow: hidden; direction: ltr; }
.market-rank-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--navy); }
.market-rank-track i.positive { background: var(--positive, #168657); }
.market-rank-track i.negative { background: var(--negative, #c24d4d); }
.market-rank-row > strong { min-width: 72px; text-align: left; direction: rtl; font-size: 10px; font-weight: 700; }

.opportunity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.opportunity-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--panel) 95%, var(--bg) 5%); transition: transform .15s ease, border-color .15s ease;
}
.opportunity-item:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--navy) 34%, var(--line)); }
.opportunity-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--navy) 9%, var(--panel)); font-size: 15px; }
.opportunity-copy { min-width: 0; display: grid; gap: 2px; }
.opportunity-copy small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opportunity-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opportunity-value { text-align: left; font-size: 11px; white-space: nowrap; }

.market-assets-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.market-asset-card {
  display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--panel) 94%, var(--bg) 6%);
}
.market-asset-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.market-asset-card header strong { font-size: 13px; }
.market-asset-card header i { width: 7px; height: 7px; border-radius: 50%; background: #8892a6; }
.market-asset-card header i.ready { background: var(--positive, #168657); }
.market-asset-card .asset-primary { font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.market-asset-card footer { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.market-asset-card footer span:last-child { color: var(--text); font-weight: 700; }

@media (max-width: 1180px) {
  .market-decision-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-assets-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .market-overview-section { padding: 12px; border-radius: 16px; }
  .market-overview-head { gap: 10px; }
  .market-overview-meta { justify-content: flex-start; width: 100%; }
  .market-overview-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .market-kpi { min-height: 94px; padding: 10px; }
  .market-decision-strip, .market-overview-lower, .market-flow-columns, .opportunity-grid { grid-template-columns: 1fr; }
  .market-opportunity-card { grid-column: auto; }
  .market-assets-strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 3px; }
  .market-asset-card { flex: 0 0 min(74vw, 245px); scroll-snap-align: start; }
  .market-rank-row { grid-template-columns: minmax(82px, .9fr) minmax(72px, 1.2fr) auto; }
}

@media (max-width: 420px) {
  .market-overview-kpis { grid-template-columns: 1fr; }
}


.market-industry-card { grid-column: 1 / -1; }
.market-industry-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.market-industry-columns h3 { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.side-nav .nav-subitem { margin-inline-start: 7px; opacity: .92; }
.side-nav .nav-subitem .nav-icon { font-size: 11px; }
#market-overview { scroll-margin-top: 18px; }
@media (max-width: 760px) {
  .market-industry-columns { grid-template-columns: 1fr; }
}


.bubble-market { display: grid; gap: 13px; padding: 14px; }
.bubble-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.bubble-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--panel-2) 88%, var(--panel));
}
.bubble-summary span, .bubble-summary small { color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.bubble-summary strong { color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-summary strong.positive { color: var(--green); }
.bubble-summary strong.negative { color: var(--red); }
.bubble-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.bubble-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, transparent), var(--panel-2));
  box-shadow: 0 8px 20px rgba(15, 38, 75, .035);
}
.bubble-card.bubble-positive { border-top-color: color-mix(in srgb, var(--green) 55%, var(--line)); }
.bubble-card.bubble-negative { border-top-color: color-mix(in srgb, var(--red) 55%, var(--line)); }
.bubble-card-head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.bubble-glyph {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #a96f00;
  direction: ltr;
  font-size: 11px;
  font-weight: 900;
}
.bubble-card-head strong, .bubble-card-head small { display: block; min-width: 0; }
.bubble-card-head strong { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble-card-head small { color: var(--muted); margin-top: 3px; font-size: 8px; }
.bubble-state { padding: 4px 7px; border-radius: 999px; font-size: 7.5px; font-weight: 900; white-space: nowrap; }
.bubble-state.positive { color: var(--green); background: var(--green-soft); }
.bubble-state.negative { color: var(--red); background: color-mix(in srgb, var(--red) 11%, transparent); }
.bubble-state.neutral { color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.bubble-value-row { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 12px 0 9px; }
.bubble-main-value { direction: ltr; font-variant-numeric: tabular-nums; font-size: 19px; letter-spacing: -.25px; }
.bubble-main-value.positive { color: var(--green); }
.bubble-main-value.negative { color: var(--red); }
.bubble-value-row small { max-width: 56%; color: var(--muted); text-align: left; font-size: 7.5px; line-height: 1.6; }
.bubble-axis {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--red) 9%, var(--panel-2)) 0 49.5%,
    color-mix(in srgb, var(--green) 9%, var(--panel-2)) 50.5% 100%);
  overflow: hidden;
  direction: ltr;
}
.bubble-zero { position: absolute; z-index: 2; top: -2px; bottom: -2px; left: calc(50% - .5px); width: 1px; background: color-mix(in srgb, var(--ink) 42%, var(--line)); }
.bubble-gauge { position: absolute; top: 2px; bottom: 2px; width: var(--bubble-width); border-radius: 999px; }
.bubble-gauge.positive { left: 50%; background: linear-gradient(90deg, #41b77d, #21a463); }
.bubble-gauge.negative { right: 50%; background: linear-gradient(90deg, #d94955, #ed7881); }
.bubble-gauge.neutral { left: calc(50% - 2px); width: 4px; background: var(--muted); }
.bubble-scale { direction: ltr; display: flex; justify-content: space-between; align-items: center; margin-top: 5px; color: var(--muted); font-size: 7px; }
.bubble-scale b { font-weight: 700; color: color-mix(in srgb, var(--ink) 56%, var(--muted)); }
@media (max-width: 860px) {
  .bubble-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bubble-card-grid { grid-template-columns: 1fr; }
  .bubble-summary { grid-template-columns: 1fr 1fr; }
}
.bubble-summary small.positive { color: var(--green); }
.bubble-summary small.negative { color: var(--red); }


.market-pulse-panel > .market-pulse-grid,
.market-flow-card > .market-flow-columns,
.market-order-card > .market-rank-list,
.market-industry-card > .market-industry-columns,
.market-opportunity-card > .opportunity-grid {
  padding: 14px 16px 16px;
}
.market-flow-columns > section,
.market-industry-columns > section,
.market-rank-list,
.opportunity-grid {
  min-width: 0;
}
.market-rank-row {
  padding-inline: 2px;
}
.market-flow-columns h3,
.market-industry-columns h3 {
  padding-inline: 2px;
}
@media (max-width: 760px) {
  .market-flow-card > .market-flow-columns,
  .market-order-card > .market-rank-list,
  .market-industry-card > .market-industry-columns,
  .market-opportunity-card > .opportunity-grid {
    padding: 12px;
  }
}




.v2-filter-head .filter-toggle { min-width:92px; justify-content:center; padding-inline:12px; font-size:10px; font-weight:750; }
.v2-filter-head .filter-toggle .filter-toggle-label { color:var(--text); font-size:10px; font-weight:750; white-space:nowrap; }
.filter-number-shell { display:flex; align-items:stretch; min-width:0; }
.filter-number-shell .threshold-num { border-start-end-radius:0; border-end-end-radius:0; }
.filter-number-unit { display:inline-flex; align-items:center; justify-content:center; min-width:max-content; padding:0 9px; border:1px solid var(--line); border-inline-start:0; border-radius:8px 0 0 8px; background:var(--panel-2); color:var(--muted); font-size:9px; font-weight:700; white-space:nowrap; }
.range-inputs { flex-wrap:wrap; }
.range-inputs .filter-number-unit { min-height:36px; border-inline-start:1px solid var(--line); border-radius:8px; }
.range-num,.threshold-num { direction:ltr; unicode-bidi:isolate; font-variant-numeric:tabular-nums; }


.v2-insight-grid { align-items:start; }
.v2-insight-grid > .panel { min-width:0; min-height:0; align-self:start; }
.v2-insight-grid .module-breakdown,
.v2-insight-grid .breadth-visual,
.v2-insight-grid .special-insight { padding:18px 20px 20px; }
.v2-insight-grid .empty-state { margin:4px; }
.v2-table-panel .panel-header,
.history-panel .panel-header,
.v2-insight-grid .panel-header { padding-inline:18px; }


body[data-module="equity"] .v2-insight-grid {
  grid-template-columns:minmax(320px,.9fr) minmax(0,1.55fr);
  grid-template-areas:
    "composition special"
    "breadth special";
  align-items:start;
}
body[data-module="equity"] #compositionPanel { grid-area:composition; }
body[data-module="equity"] #breadthPanel { grid-area:breadth; }
body[data-module="equity"] #specialInsightPanel { grid-area:special; }
body[data-module="equity"] #compositionPanel,
body[data-module="equity"] #breadthPanel { min-height:0; }
body[data-module="equity"] #specialInsightPanel { min-height:100%; }
body[data-module="equity"] .breadth-visual { min-height:150px; gap:14px; }


.history-panel-head { align-items:flex-end; }
.history-controls { display:flex; align-items:flex-end; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.history-metric-switch { display:inline-flex; align-items:center; gap:3px; padding:3px; border:1px solid var(--line); border-radius:10px; background:var(--panel-2); }
.history-metric-switch[hidden] { display:none !important; }
.history-metric-switch button { min-height:34px; padding:6px 11px; border:0; border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:9px; font-weight:700; cursor:pointer; white-space:nowrap; }
.history-metric-switch button.active { background:var(--panel); color:var(--primary); box-shadow:var(--shadow); }
.history-metric-switch button:focus-visible { outline:2px solid color-mix(in srgb,var(--primary) 50%,transparent); outline-offset:1px; }


.table-scroll { overflow-anchor:none; scroll-behavior:auto; }
.v2-market-table .watch-column { inline-size:44px; min-inline-size:44px; text-align:center; }


.home-hero-copy { min-width:0; }
.home-hero h2 { max-width:100%; font-size:clamp(27px,3vw,42px); line-height:1.5; overflow-wrap:anywhere; text-wrap:balance; }
.home-hero p { max-width:72ch; line-height:2; }
.home-hero-actions { flex-wrap:wrap; }
.home-hero-actions .hero-button { min-width:150px; justify-content:center; }

@media (max-width:1180px) {
  body[data-module="equity"] .v2-insight-grid {
    grid-template-columns:1fr;
    grid-template-areas:"composition" "breadth" "special";
  }
  body[data-module="equity"] #specialInsightPanel { min-height:0; }
}
@media (max-width:760px) {
  .history-panel-head { align-items:stretch; }
  .history-controls { width:100%; align-items:stretch; }
  .history-metric-switch { flex:1 1 100%; }
  .history-metric-switch button { flex:1; }
  .history-range { flex:1 1 140px; }
  .range-inputs { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
  .range-inputs .filter-number-unit { grid-column:1/-1; justify-self:start; }
}





.v2-filter-head .filter-toggle b {
  width:9px;
  height:9px;
  display:inline-block;
  font-size:0;
  border-inline-end:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .16s ease;
}
.v2-filter-head .filter-toggle.is-open b { transform:rotate(225deg); }


.history-filter-toggle {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-2);
  color:var(--muted);
  font-size:9px;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
}
.history-filter-toggle input {
  position:absolute;
  inline-size:1px;
  block-size:1px;
  opacity:0;
  pointer-events:none;
}
.history-filter-toggle .toggle-track {
  position:relative;
  width:32px;
  height:18px;
  flex:0 0 32px;
  border-radius:999px;
  background:var(--line);
  transition:background .16s ease;
}
.history-filter-toggle .toggle-track i {
  position:absolute;
  top:3px;
  inset-inline-start:3px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--panel);
  box-shadow:0 1px 3px rgba(15,23,42,.18);
  transition:transform .16s ease;
}
.history-filter-toggle input:checked + .toggle-track { background:var(--primary); }
.history-filter-toggle input:checked + .toggle-track i { transform:translateX(-14px); }
.history-filter-toggle input:focus-visible + .toggle-track { outline:2px solid color-mix(in srgb,var(--primary) 45%,transparent); outline-offset:2px; }


.v2-market-table .watch-column {
  inline-size:44px;
  min-inline-size:44px;
}
.v2-market-table th.symbol-column,
.v2-market-table td.symbol-cell {
  min-inline-size:132px;
  max-inline-size:220px;
}
.v2-market-table .symbol-link {
  min-width:0;
  overflow:hidden;
}
.v2-market-table .symbol-link strong,
.v2-market-table .symbol-link small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


body[data-module="options"] .v2-insight-grid {
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.55fr);
  grid-template-areas:
    "composition breadth"
    "special special";
}
body[data-module="options"] #compositionPanel { grid-area:composition; }
body[data-module="options"] #breadthPanel { grid-area:breadth; }
body[data-module="options"] #specialInsightPanel { grid-area:special; }
body[data-module="options"] #specialInsightPanel,
body[data-module="options"] #compositionPanel,
body[data-module="options"] #breadthPanel { min-height:0; }
body[data-module="options"] .special-insight { padding:18px 20px 20px; }

.option-analysis-toolbar {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding:0 0 14px;
  border-bottom:1px solid var(--line);
  margin-bottom:12px;
}
.option-analysis-control {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.option-analysis-control > span {
  color:var(--muted);
  font-size:9px;
  font-weight:750;
}
.option-analysis-switch {
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-2);
}
.option-analysis-switch button {
  min-height:34px;
  border:0;
  border-radius:7px;
  padding:6px 12px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:9px;
  font-weight:750;
  cursor:pointer;
  white-space:nowrap;
}
.option-analysis-switch button.active {
  background:var(--panel);
  color:var(--primary);
  box-shadow:var(--shadow);
}
.option-structure-chart {
  min-height:250px;
  width:100%;
  margin-bottom:18px;
}
.nearest-expiry-head {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  padding-top:4px;
  margin-bottom:10px;
}
.nearest-expiry-head h3 { margin:0 0 3px; font-size:13px; }
.nearest-expiry-head p { margin:0; color:var(--muted); font-size:9px; }
.option-nearest-scroll { max-height:310px; border:1px solid var(--line); border-radius:10px; }
.nearest-expiry-table { min-width:720px; }
.nearest-expiry-table th,
.nearest-expiry-table td { padding-block:10px; }


.history-chart .chart-frame { min-height:280px; }
.history-chart .axis-label { font-size:10px; }

@media (max-width:900px) {
  body[data-module="options"] .v2-insight-grid {
    grid-template-columns:1fr;
    grid-template-areas:"composition" "breadth" "special";
  }
}
@media (max-width:760px) {
  .history-filter-toggle { flex:1 1 100%; justify-content:center; }
  .option-analysis-toolbar { align-items:stretch; }
  .option-analysis-control { width:100%; justify-content:space-between; }
  .option-analysis-switch { flex:1; }
  .option-analysis-switch button { flex:1; padding-inline:8px; }
}



.captcha-field{display:grid;gap:7px;margin:2px 0 12px}.captcha-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted)}
.captcha-refresh{border:0;background:transparent;color:var(--accent);padding:3px 6px;font:inherit}.captcha-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(110px,.72fr);gap:9px;align-items:center}
.captcha-image{height:54px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%);overflow:hidden}.captcha-image svg{width:100%;height:100%;display:block}.captcha-row input{text-align:center;letter-spacing:.18em;text-transform:uppercase;font-weight:800}
.profile-accent-field{grid-column:1/-1}.accent-options{display:flex;gap:10px;flex-wrap:wrap}.accent-choice{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:7px 11px;border:1px solid var(--line);border-radius:11px;background:var(--panel);cursor:pointer}.accent-choice input{position:absolute;opacity:0;pointer-events:none}.accent-choice:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent)}.accent-swatch{width:20px;height:20px;border-radius:50%;border:2px solid rgba(255,255,255,.8);box-shadow:0 0 0 1px var(--line)}.accent-swatch.blue{background:#2458d6}.accent-swatch.green{background:#16845b}.accent-swatch.brown{background:#8b5e3c}
.watch-metric-cell{direction:rtl;text-align:center!important}.watch-metric-cell strong{display:block;direction:ltr;font-variant-numeric:tabular-nums;white-space:nowrap}.watch-metric-cell small{display:block;margin-top:3px;color:var(--muted);font-size:9px;white-space:normal;line-height:1.45}.watch-metric-unit{display:inline-flex;margin-inline-start:3px;color:var(--muted);font-size:8.5px}
@media(max-width:640px){.captcha-row{grid-template-columns:1fr}.captcha-image{height:50px}}


.market-radar-card { overflow: hidden; }
.market-radar-head { align-items: flex-start; gap: 12px; }
.market-radar-filters {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 640px;
}
.market-radar-filters button {
  min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 94%, var(--bg) 6%); color: var(--muted);
  font: inherit; font-size: 9.5px; font-weight: 750; cursor: pointer;
}
.market-radar-filters button:hover,
.market-radar-filters button.active {
  color: var(--navy); border-color: color-mix(in srgb, var(--navy) 35%, var(--line));
  background: color-mix(in srgb, var(--navy) 8%, var(--panel));
}
.market-radar-meta {
  padding: 0 16px 10px; color: var(--muted); font-size: 9.5px; line-height: 1.75;
}
.market-radar-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 16px 16px;
}
.market-radar-item {
  position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--panel) 95%, var(--bg) 5%); transition: transform .15s ease, border-color .15s ease;
}
.market-radar-item:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--navy) 34%, var(--line)); }
.market-radar-item.strong { border-top-color: color-mix(in srgb, var(--positive, #168657) 62%, var(--line)); }
.market-radar-item.good { border-top-color: color-mix(in srgb, var(--navy) 48%, var(--line)); }
.market-radar-main { display: grid; gap: 10px; padding: 11px 12px 10px; color: inherit; text-decoration: none; }
.market-radar-main > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.market-radar-module,
.market-radar-quality {
  display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 999px;
  font-size: 8px; font-weight: 800; white-space: nowrap;
}
.market-radar-module { color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--panel)); }
.market-radar-quality { color: var(--muted); background: var(--panel-2, var(--bg)); border: 1px solid var(--line); }
.market-radar-item.strong .market-radar-quality { color: var(--positive, #168657); background: color-mix(in srgb, var(--positive, #168657) 8%, var(--panel)); }
.market-radar-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.market-radar-title > div { min-width: 0; display: grid; gap: 2px; }
.market-radar-title small { color: var(--muted); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-radar-title strong { color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-radar-title span { color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 12px; }
.market-radar-title b {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--panel)); font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.market-radar-score { height: 5px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--line) 62%, transparent); direction: ltr; }
.market-radar-score i { display: block; height: 100%; border-radius: inherit; background: var(--navy); }
.market-radar-item.strong .market-radar-score i { background: var(--positive, #168657); }
.market-radar-signals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.market-radar-signals > span { min-width: 0; display: grid; gap: 2px; padding: 6px 7px; border-radius: 9px; background: var(--panel-2, var(--bg)); }
.market-radar-signals small { color: var(--muted); font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-radar-signals strong { color: var(--text); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-radar-strategy {
  display: block; padding: 7px 12px 8px; border-top: 1px solid var(--line); color: var(--navy); text-decoration: none;
  font-size: 8.5px; font-weight: 800; text-align: center; background: color-mix(in srgb, var(--navy) 4%, var(--panel));
}
.market-radar-strategy:hover { background: color-mix(in srgb, var(--navy) 9%, var(--panel)); }

@media (max-width: 1260px) {
  .market-radar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .market-radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-radar-filters { justify-content: flex-start; max-width: none; }
}
@media (max-width: 620px) {
  .market-radar-grid { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .market-radar-meta { padding-inline: 12px; }
  .market-radar-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 2px; }
  .market-radar-filters button { flex: 0 0 auto; }
}


.market-symbol-stack { display: grid; gap: 3px; min-width: 0; }
.market-symbol-stack .symbol-link { min-width: 0; }
.market-strategy-link {
  width: fit-content; max-width: 100%; color: var(--navy); text-decoration: none; font-size: 7.5px; font-weight: 800;
  white-space: nowrap; opacity: .82;
}
.market-strategy-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.dense-table .market-strategy-link { display: none; }



@media (min-width:1180px){
  body.hub-root .topbar,
  body[data-initial-view="admin"] .topbar{
    display:grid!important;grid-template-columns:minmax(220px,auto) minmax(320px,1fr) auto!important;
    align-items:center!important;column-gap:14px!important;flex-wrap:nowrap!important;padding-inline:0!important;
  }
  body.hub-root .topbar .title-wrap,body[data-initial-view="admin"] .topbar .title-wrap{grid-column:1;min-width:0;}
  body.hub-root .global-search,body[data-initial-view="admin"] .global-search{grid-column:2;order:0!important;flex:1 1 auto!important;flex-basis:auto!important;width:100%!important;max-width:none!important;min-width:260px!important;margin:0!important;}
  body.hub-root .topbar-actions,body[data-initial-view="admin"] .topbar-actions{grid-column:3!important;width:auto!important;margin:0!important;justify-self:end;overflow:visible!important;}
}
.panel>.panel-header,.admin-workspace-panel>.panel-header{padding:16px 18px;min-height:62px;align-items:center;gap:14px;}
#adminAudit #auditList{padding:4px 18px 12px;}
#adminAudit .audit-line{grid-template-columns:minmax(150px,180px) minmax(100px,130px) minmax(0,1fr);gap:14px;padding:12px 4px;align-items:center;}
#adminAudit .audit-line .what{line-height:1.9;overflow-wrap:anywhere;}#adminAudit .audit-line .who{text-align:center;}
.member-quick-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel-2) 70%,transparent)}
.member-quick-filters button{border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--muted);padding:6px 11px;font:inherit;font-size:10px;cursor:pointer}.member-quick-filters button.active{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
#membersTable th[data-sort="display_name"],#membersTable td.member-display-name,.v2-market-table th.name-column,.v2-market-table td.name-column{text-align:center!important;vertical-align:middle!important;}
.filter-toggle-control{display:inline-flex!important;align-items:center;gap:8px;min-height:38px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel);white-space:nowrap}.filter-toggle-control .toggle-track{margin:0!important;}
.account-session-panel .panel-header{padding-inline:18px;}.profile-session-list{display:grid;gap:9px;padding:4px 18px 18px;}.profile-session-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel-2)}.profile-session-item.current{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:color-mix(in srgb,var(--accent) 5%,var(--panel-2))}.profile-session-item>div{display:grid;gap:4px;min-width:0}.profile-session-item small{color:var(--muted);font-size:10px}.profile-session-time{text-align:left}.profile-session-time strong{font-size:10px}.session-current-badge{display:inline-flex;margin-inline-start:6px;padding:2px 7px;border-radius:999px;background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent);font-size:9px;font-weight:700}
@media(max-width:720px){.profile-session-item{grid-template-columns:1fr}.profile-session-time{text-align:right}#adminAudit .audit-line{grid-template-columns:1fr;gap:3px}.member-quick-filters{padding-inline:12px}}


.data-table th[data-sort="display_name"],
.data-table td.name-column,
.data-table td.watch-name,
.data-table td.member-display-name,
.admin-table th[data-sort="display_name"],
.admin-table td.member-display-name,
.comparison-table th[data-sort="display_name"],
.comparison-table td.name-column,
.watchlist-table th[data-sort="display_name"],
.watchlist-table td.watch-name{
  text-align:center!important;
  vertical-align:middle!important;
}

.captcha-row input{height:54px!important;min-height:54px!important;box-sizing:border-box}
@media(max-width:640px){.captcha-row input{height:50px!important;min-height:50px!important}}

.search-result-copy{min-width:0;display:grid;gap:7px;align-content:center}.search-result-main{min-width:0;color:inherit;text-decoration:none;display:grid;gap:3px}.search-board-options{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.search-board-choice{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:3px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--muted);text-decoration:none;font-size:10px;font-weight:750}.search-board-choice:hover,.search-board-choice:focus-visible{border-color:var(--accent);color:var(--accent);outline:none}.search-board-choice.active{background:color-mix(in srgb,var(--accent) 10%,var(--panel));border-color:color-mix(in srgb,var(--accent) 48%,var(--line));color:var(--accent)}

.admin-kpi-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:10px;padding:14px 18px 18px}.admin-kpi-card{display:grid;gap:6px;min-height:84px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel);align-content:center}.admin-kpi-card span{font-size:10px;color:var(--muted)}.admin-kpi-card strong{font-size:19px}.admin-kpi-card.warning{border-color:#c99239}.admin-kpi-card.error{border-color:#c95c5c}.admin-kpi-card.ok{border-color:#3ca77b}.admin-overview-actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:1200px){.admin-kpi-grid{grid-template-columns:repeat(4,minmax(120px,1fr))}}@media(max-width:720px){.admin-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.data-table th[data-sort="name"],
.data-table th[data-key="name"],
.data-table td[data-key="name"],
.special-table th[data-sort="name"],
.special-table th[data-key="name"],
.special-table td[data-key="name"],
.v2-market-table th[data-sort="name"],
.v2-market-table th[data-key="name"],
.v2-market-table td[data-key="name"]{text-align:center!important;vertical-align:middle!important;}

.table-scroll,.table-wrap{max-height:min(68vh,680px);overflow-x:auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;}
.table-scroll>table thead th,.table-wrap>table thead th{position:sticky;top:0;z-index:7;}

.table-scroll,.table-wrap{overscroll-behavior-x:contain!important;overscroll-behavior-y:auto!important;}
.semantic-name-column,.data-table .semantic-name-column,.special-table .semantic-name-column,.v2-market-table .semantic-name-column{text-align:center!important;vertical-align:middle!important;}
.panel>.panel-header,.admin-workspace-panel>.panel-header,.symbol-tab .panel>.panel-header{padding-inline:18px!important;}
.symbol-actions .theme-toggle-button{color:var(--accent)!important;}
@media(min-width:821px){
  .symbol-tab[data-panel="shareholders"] .table-scroll{overflow-x:visible!important;max-height:none!important;}
  .symbol-tab[data-panel="shareholders"] .data-table{width:100%!important;min-width:0!important;table-layout:auto!important;}
}
.admin-insight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px;}
.admin-insight-panel .panel-header{min-height:56px;}
.admin-insight-body{padding:12px 18px 16px;}
.admin-role-allocation .fund-allocation-row,.admin-service-allocation .fund-allocation-row{grid-template-columns:minmax(92px,auto) minmax(100px,1fr) minmax(70px,auto);}
.admin-section-allocation{padding:12px 18px 16px;display:grid;gap:3px;}
.admin-section-allocation .fund-allocation-row{grid-template-columns:minmax(105px,auto) minmax(100px,1fr) minmax(88px,auto);}
.admin-section-allocation .fund-allocation-row>strong{display:flex;align-items:center;justify-content:flex-start;gap:6px;}
.admin-section-allocation .fund-allocation-row>strong small{color:var(--muted);font-size:9px;}
#visitChart{min-height:260px;padding:8px 12px 12px;}
@media(max-width:820px){.admin-insight-grid{grid-template-columns:1fr}.admin-section-allocation .fund-allocation-row{grid-template-columns:90px 1fr 70px;}}


@media (min-width:1180px){
  body.hub-root .topbar,body[data-initial-view="admin"] .topbar{padding-inline:18px!important;box-sizing:border-box!important;}
}
.search-result-tags{margin-top:1px;display:flex;align-items:flex-start;gap:4px 12px;flex-wrap:wrap}.search-choice-group{display:grid;gap:2px;min-width:0}.search-choice-type{font-size:9.5px;font-weight:800;color:var(--muted);opacity:.85;padding-inline-start:2px}.search-choice-boards{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.search-choice-sep{font-size:10px;font-weight:700;color:var(--muted);opacity:.6}
.search-result-tag{max-width:100%;white-space:nowrap;}
.search-result-tag[data-search-tag-dashboard="commodity"]{color:#9a6800;}
.search-result-tag[data-search-tag-dashboard="funds"]{color:#5a5fb0;}
.search-result-tag[data-search-tag-dashboard="options"],.search-result-tag[data-search-tag-dashboard="gold"]{color:#a45f1d;}
.search-result-tag[data-search-tag-dashboard="bonds"]{color:#315fa8;}
.search-result-tag[data-search-tag-dashboard="ime"]{color:#1f7a8c;}
.search-result-tag[data-search-tag-dashboard="equity"]{color:#2f7d51;}


/* ======================================================================
   v1.0.1 — deterministic column-edge ownership + centered semantic names. */
.strategy-entry-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  min-height:42px;
  line-height:1.2!important;
}
.market-strategy-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1.35;
}
.data-table th[data-key="name"] .sort-head,
.data-table th[data-sort="name"] .sort-head,
.data-table th[data-key="display_name"] .sort-head,
.data-table th[data-sort="display_name"] .sort-head,
.v2-market-table th.name-column .sort-head,
.v2-market-table th[data-key="name"] .sort-head,
.special-table th[data-key="name"] .sort-head{
  width:100%;
  justify-content:center!important;
  text-align:center!important;
}
.data-table td.name-column,.data-table td.semantic-name-column,
.v2-market-table td.name-column,.special-table td.name-column{
  text-align:center!important;
  vertical-align:middle!important;
}
/* In RTL the LEFT edge belongs to that column. Keep the drag target entirely
   inside the owning header so a boundary never resizes its neighbour. */
[dir="rtl"] .data-table th>.col-resize,
html[dir="rtl"] .data-table th>.col-resize,
body[dir="rtl"] .data-table th>.col-resize{
  left:0!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:0!important;
  width:8px!important;
}

/* Recent audit pagination */
.audit-pagination{
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
  padding:12px 18px 16px;border-top:1px solid var(--line);
}
.audit-pagination .audit-page-meta{color:var(--muted);font-size:10px;min-width:130px;text-align:center}
.audit-pagination .mini-button{min-width:38px;justify-content:center}
.audit-pagination .audit-page-number.active{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
@media(max-width:560px){.audit-pagination{padding-inline:12px}.audit-pagination .audit-page-meta{width:100%;order:-1}}


/* v1.0.2 — Home discovery alignment and RTL progress direction.
   Desktop supporting market panels are peers: one row, identical width.
   Progress/ranking bars originate at the RTL reading edge (right) rather than
   appearing visually reversed. */
@media (min-width: 1181px) {
  .market-overview-lower {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
  .market-overview-lower > .panel { min-width: 0; height: 100%; }
  .market-industry-card { grid-column: auto; }
}
.coverage-track,
.strategy-track,
.market-rank-track,
.market-radar-score {
  display: flex;
  direction: rtl;
  justify-content: flex-start;
}
.coverage-track > i,
.strategy-track > i,
.market-rank-track > i,
.market-radar-score > i { flex: 0 0 auto; }

/* v1.0.5 password recovery */
.auth-inline-actions{display:flex;justify-content:center;margin-top:10px}
.auth-link-button{appearance:none;border:0;background:transparent;color:var(--accent);font:inherit;font-weight:700;cursor:pointer;padding:6px 8px;border-radius:8px}
.auth-link-button:hover,.auth-link-button:focus-visible{background:color-mix(in srgb,var(--accent) 9%,transparent);outline:none}
.auth-panel-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.auth-panel-title-row .auth-sub{margin-bottom:18px}
.auth-card:has(#forgotPanel.active){width:min(480px,100%)}
.auth-recovery-badge{padding:10px 12px;margin:0 0 14px;border:1px solid var(--border);border-radius:12px;background:var(--panel-soft);color:var(--muted);font-size:12px;line-height:1.8}
.auth-recovery-resend{display:block;margin:8px auto 0}
@media(max-width:560px){.auth-panel-title-row{display:block}.auth-panel-title-row .auth-link-button{padding-inline:0;margin-bottom:8px}}

/* v1.0.5 strategy intelligence */
.strategy-decision-panel{margin:12px 0 16px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--panel-soft)}
.strategy-decision-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}.strategy-decision-head h3{margin:0;font-size:15px}.strategy-decision-head p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.7}.strategy-decision-score{font-size:24px;font-weight:900;color:var(--accent);white-space:nowrap}
.strategy-score-components{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.strategy-score-component{padding:9px;border:1px solid var(--border);border-radius:12px;background:var(--panel)}.strategy-score-component span{display:block;font-size:10px;color:var(--muted);margin-bottom:6px}.strategy-score-component strong{display:block;font-size:13px}.strategy-score-track{height:5px;background:var(--surface-2);border-radius:999px;overflow:hidden;margin-top:6px}.strategy-score-track i{display:block;height:100%;width:var(--score);background:var(--accent);border-radius:inherit}
.strategy-decision-notes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.strategy-decision-notes div{padding:9px 10px;border-radius:11px;background:var(--panel);border:1px solid var(--border);font-size:11px;line-height:1.8}.strategy-decision-notes b{margin-inline-end:6px}.strategy-decision-notes .risk{color:var(--negative)}
.strategy-evidence-panel{margin-top:14px}.strategy-evidence-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:14px 16px 0}.strategy-evidence-kpis article{padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:var(--panel-soft)}.strategy-evidence-kpis span{display:block;color:var(--muted);font-size:10px}.strategy-evidence-kpis strong{display:block;margin-top:5px;font-size:15px}.strategy-evidence-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px 16px 16px}.strategy-evidence-grid>article{border:1px solid var(--border);border-radius:14px;padding:12px;background:var(--panel-soft)}.strategy-evidence-grid h3{margin:0 0 10px;font-size:13px}
.strategy-replay-table table,.strategy-stress-grid table{width:100%;border-collapse:collapse;font-size:11px}.strategy-replay-table th,.strategy-replay-table td,.strategy-stress-grid th,.strategy-stress-grid td{padding:7px 8px;border-bottom:1px solid var(--border);text-align:center}.strategy-stress-grid td.positive{background:color-mix(in srgb,var(--positive) 10%,transparent)}.strategy-stress-grid td.negative{background:color-mix(in srgb,var(--negative) 9%,transparent)}.strategy-stress-grid td.neutral{background:var(--panel)}
.strategy-saved-track{margin-top:10px;padding:9px 12px;border:1px dashed var(--border);border-radius:12px;color:var(--muted);font-size:11px}.strategy-saved-track strong{color:var(--text)}
@media(max-width:1250px){.strategy-score-components{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.strategy-evidence-grid{grid-template-columns:1fr}.strategy-evidence-kpis{grid-template-columns:repeat(2,1fr)}.strategy-decision-notes{grid-template-columns:1fr}}
@media(max-width:560px){.strategy-score-components{grid-template-columns:repeat(2,1fr)}.strategy-evidence-kpis{grid-template-columns:1fr}.strategy-decision-head{display:block}.strategy-decision-score{margin-top:6px}}

/* v1.0.6 — Pro Terminal, smart watchlist, feature rollout */
.workspace-terminal-panel{display:grid;gap:14px}.workspace-terminal-header{align-items:flex-start}.workspace-layout-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.workspace-layout-actions .small-select{min-width:180px}.workspace-terminal-controls{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--border)}.watchlist-mode-group{display:inline-flex;gap:4px;padding:4px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}.segment-button{border:0;background:transparent;color:var(--muted);padding:7px 12px;border-radius:8px;cursor:pointer;font:inherit}.segment-button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px rgb(0 0 0/.08)}.workspace-widget-toggles{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.workspace-widget-toggles label{display:inline-flex;gap:6px;align-items:center;color:var(--muted);font-size:.88rem}.workspace-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.workspace-quick-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;text-decoration:none;color:var(--text);background:var(--surface-soft)}.workspace-quick-card>span{font-size:1.25rem}.workspace-quick-card div{display:grid;gap:2px}.workspace-quick-card small{color:var(--muted)}.workspace-compact .watchlist-hero-panel{padding-block:12px}.workspace-compact .watchlist-table th,.workspace-compact .watchlist-table td{padding-block:7px}.workspace-compact .watchlist-stat{padding:8px 10px}.alert-channel-field{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0;padding:8px 10px;border:1px solid var(--border);border-radius:10px}.alert-channel-field legend{padding-inline:6px;color:var(--muted);font-size:.8rem}.alert-channel-field small{flex-basis:100%;color:var(--muted);font-size:.75rem}.alert-channel-badges{display:flex;gap:4px;flex-wrap:wrap}.alert-channel-badges span{padding:2px 7px;border:1px solid var(--border);border-radius:999px;font-size:.72rem;color:var(--muted);white-space:nowrap}.feature-flags-table td:first-child strong,.feature-flags-table td:first-child small{display:block}.feature-flags-table td:first-child small{margin-top:3px;color:var(--muted);max-width:420px}.switch-line{display:inline-flex;align-items:center;gap:6px}.feature-rollout{display:inline-flex;align-items:center;gap:4px}.feature-rollout input{width:72px}.feature-role-set{display:flex;gap:8px;flex-wrap:wrap}.feature-role-set label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-size:.82rem}.feature-flags-note{margin:10px 0 0}.feature-flags-panel .table-scroll{max-height:360px}
@media(max-width:900px){.workspace-quick-grid{grid-template-columns:1fr}.workspace-terminal-controls{align-items:flex-start}.workspace-widget-toggles{width:100%}}
@media(max-width:640px){.workspace-layout-actions{width:100%}.workspace-layout-actions .small-select{width:100%}.watchlist-mode-group{width:100%;display:grid;grid-template-columns:repeat(4,1fr)}.segment-button{padding-inline:5px}.workspace-widget-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.feature-role-set{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v1.0.7 — market-overview readability.
   The three-column desktop override made the activity card's three inner
   rankings only ~170px wide and caused labels, bars and values to collide.
   Keep flow/order side by side and give the activity comparison the full row. */
@media (min-width: 1181px) {
  .market-overview-lower { grid-template-columns: 1.12fr .88fr; align-items: stretch; }
  .market-industry-card { grid-column: 1 / -1; }
  .market-overview-lower > .panel { min-width: 0; height: auto; }
}
.market-rank-row {
  grid-template-columns: minmax(82px, .9fr) minmax(64px, 1.15fr) minmax(96px, auto);
  column-gap: 10px;
}
.market-rank-row > strong {
  min-width: 96px;
  /* The earlier .market-rank-row > strong rule (this file) sets
     direction: rtl -- correct for the row's label, wrong for a number.
     unicode-bidi: isolate alone does not override an inherited direction,
     so a negative value ("−804.75") still rendered minus-last ("804.75−").
     This must win: it is the rule this file parses last. */
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.market-rank-track { min-width: 48px; }
@media (max-width: 980px) {
  .market-flow-columns, .market-industry-columns { grid-template-columns: 1fr; }
  .market-rank-row { grid-template-columns: minmax(86px, 1fr) minmax(70px, 1.2fr) minmax(92px, auto); }
}


/* --- scroll chaining: keep the wheel inside these scrollers (see .table-wrap) --- */
.alert-event-list{overscroll-behavior:contain}

/* The password pair lives in its own form so Chrome does not treat
   #globalSearchInput as its username field. Keep it layout-neutral. */
.password-form { margin: 0; }

/* ---------------------------------------------- fundamental (Codal) board -- */
/* Replaces the two raw-row tables that used to sit in the بنیادی tab. Every
   figure arriving here is already in rial, so nothing in this block implies a
   unit the number does not carry. */
.company-fundamental-stack { display:flex; flex-direction:column; gap:18px; }
.company-fundamental-stack > section { display:flex; flex-direction:column; gap:11px; }
.company-fundamental-stack > section > header { display:flex; flex-direction:column; gap:3px; }
.company-fundamental-stack > section > header h3 { margin:0; font-size:13px; font-weight:800; color:var(--text); }
.company-fundamental-stack > section > header p { margin:0; font-size:11px; color:var(--muted); line-height:1.8; }

.fundamental-tiles {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(148px, 1fr));
  gap:9px;
}
.fundamental-tile {
  display:flex; flex-direction:column; gap:5px;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--panel-2);
}
.fundamental-tile > span { font-size:10.5px; color:var(--muted); font-weight:600; }
.fundamental-tile > strong { font-size:15px; font-weight:800; color:var(--text); }
.fundamental-tile > small { font-size:10.5px; font-weight:700; font-variant-numeric:tabular-nums; }

/* The metric switcher mirrors .symbol-tabs so the two rows of tabs on this page
   do not read as two different controls. */
.fundamental-metric-tabs {
  display:flex; flex-wrap:wrap; gap:6px;
  padding:7px; border-radius:11px;
  background:var(--panel-2);
  border:1px solid var(--line);
}
.fundamental-metric-tab {
  min-height:32px; padding:0 12px;
  border:0; border-radius:8px;
  background:transparent; color:var(--muted);
  font-size:10.5px; font-weight:700; font-family:inherit;
  cursor:pointer;
}
.fundamental-metric-tab:hover { color:var(--text); background:var(--panel); }
.fundamental-metric-tab.active { color:var(--navy); background:var(--gold-soft); font-weight:800; }
.fundamental-metric-tab:focus-visible { outline:2px solid var(--navy); outline-offset:2px; }

/* No `contain` here on purpose: the shared chart tooltip is document-level and
   fixed, and a containing block on the host reintroduces the hover offset that
   chart.js already works around. */
.fundamental-chart { min-height:248px; width:100%; }

/* The period values sit under the bars, as in the reference layout. It scrolls
   with the chart rather than wrapping, so a value stays under its own bar. */
.fundamental-value-row {
  display:flex; gap:4px;
  overflow-x:auto;
  padding-top:9px;
  border-top:1px solid var(--line);
}
.fundamental-value-row > span {
  flex:1 0 auto; min-width:62px;
  display:flex; flex-direction:column; gap:3px;
  text-align:center;
  font-size:11px; font-weight:700; color:var(--text);
  font-variant-numeric:tabular-nums;
}
.fundamental-value-row > span b {
  font-size:10px; font-weight:600; color:var(--muted);
  direction:ltr; unicode-bidi:isolate;
}

.fundamental-table th, .fundamental-table td { white-space:nowrap; }
.fundamental-table td.numeric { font-variant-numeric:tabular-nums; }

@media (max-width:720px) {
  .fundamental-tiles { grid-template-columns:1fr 1fr; gap:7px; }
  .fundamental-tile { padding:10px; }
  .fundamental-tile > strong { font-size:13.5px; }
  .fundamental-chart { min-height:212px; }
  .fundamental-metric-tab { min-height:30px; padding:0 10px; font-size:10px; }
}


/* Series picker over the symbol history chart. Mirrors .fundamental-metric-tab
   so the two pickers on this page read as one control family. */
.chart-metric-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 2px; }
.chart-metric-tabs:empty { display:none; }
.chart-metric-tab {
  min-height:30px; padding:0 11px; border:1px solid var(--line); border-radius:8px;
  background:var(--panel-2); color:var(--muted);
  font-size:10.5px; font-weight:700; font-family:inherit; cursor:pointer;
}
.chart-metric-tab:hover { color:var(--text); }
.chart-metric-tab.active { color:var(--navy); background:var(--gold-soft); border-color:var(--gold-soft); font-weight:800; }
.chart-metric-tab:focus-visible { outline:2px solid var(--navy); outline-offset:2px; }
