:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --panel: #ffffff;
  --ink: #18212f;
  --muted: #687386;
  --line: #dce3ec;
  --accent: #1660d4;
  --accent-dark: #101f3d;
  --mint: #27d3a2;
  --danger: #c83232;
  --orange: #c66a1a;
  --yellow: #a78116;
  --green: #16845c;
  --ease-soft: cubic-bezier(.2, .8, .2, 1);
  --float-shadow: 0 18px 46px rgba(33, 49, 73, .11);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
[v-cloak] { display: none; }
button, input, select, textarea {
  font: inherit;
}
button {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .16s var(--ease-soft), box-shadow .16s var(--ease-soft), background-color .16s ease, border-color .16s ease, color .16s ease;
}
button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 96, 212, .16);
}
button:active:not(:disabled) {
  transform: translateY(0) scale(.985);
  box-shadow: 0 5px 12px rgba(22, 96, 212, .12);
}
button:disabled { opacity: .55; cursor: wait; }
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.secondary {
  background: #e8eef7;
  color: var(--ink);
}
button.danger-btn {
  background: #fdeaea;
  color: var(--danger);
}
button.small { padding: 6px 10px; font-size: 13px; }
.language-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(220, 227, 236, .9);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
}
.language-switch.inside {
  background: var(--panel);
}
.language-switch button {
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  border-radius: 5px;
  font-size: 13px;
}
.language-switch button.active {
  background: var(--accent);
  color: white;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3.2vw, 38px);
  background:
    radial-gradient(circle at 24% 18%, rgba(39, 211, 162, .22), transparent 30%),
    radial-gradient(circle at 84% 72%, rgba(22, 96, 212, .2), transparent 28%),
    linear-gradient(135deg, rgba(13, 23, 38, .98), rgba(15, 28, 50, .96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 76px);
}
.login-card {
  width: min(960px, 100%);
  min-height: min(480px, calc(100dvh - clamp(28px, 6.4vw, 76px)));
  max-height: calc(100dvh - clamp(28px, 6.4vw, 76px));
  background: rgba(255, 255, 255, .985);
  border: 1px solid rgba(220, 227, 236, .86);
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .36);
  animation: liftIn .46s var(--ease-soft) both;
}
.login-hero {
  position: relative;
  min-height: 0;
  padding: clamp(18px, 2.4vw, 28px);
  background:
    radial-gradient(circle at 70% 45%, rgba(39, 211, 162, .12), transparent 28%),
    linear-gradient(160deg, rgba(22, 96, 212, .24), rgba(39, 211, 162, .1)),
    #101722;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-signal-pips {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  gap: 7px;
}
.login-signal-pips i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(39, 211, 162, .38);
  animation: signalPop 2.4s ease-in-out infinite;
}
.login-signal-pips i:nth-child(2) {
  animation-delay: .32s;
  background: #94bdf8;
}
.login-signal-pips i:nth-child(3) {
  animation-delay: .64s;
  background: #f6d15e;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.12));
  pointer-events: none;
}
.login-hero > * {
  position: relative;
  z-index: 1;
}
.login-form {
  display: grid;
  gap: clamp(10px, 1.3vh, 13px);
  padding: clamp(20px, 2.7vw, 32px) clamp(20px, 2.8vw, 32px);
  align-content: center;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.login-form h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}
.login-form p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.radar-logo-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 211, 162, .12), rgba(157, 184, 255, .05) 62%, transparent 64%);
  box-shadow: inset 0 0 0 1px rgba(157, 184, 255, .14), 0 16px 34px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.radar-logo-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg, rgba(39, 211, 162, .72) 0deg, rgba(39, 211, 162, .24) 42deg, transparent 72deg 360deg);
  clip-path: circle(50% at 50% 50%);
  animation: radarSweep 2.2s linear infinite;
  z-index: 2;
  pointer-events: none;
}
.radar-logo-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(39, 211, 162, .25);
  box-shadow: inset 0 0 0 11px rgba(10, 31, 51, .2);
  pointer-events: none;
  z-index: 3;
}
.radar-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 0;
  filter: none;
  opacity: 0;
  position: relative;
  z-index: 1;
}
@keyframes radarSweep {
  to {
    transform: rotate(360deg);
  }
}
.brand-row.large {
  align-items: center;
  gap: 14px;
}
.brand-row.large .radar-logo-frame {
  width: 72px;
  height: 72px;
}
.brand-row.large .radar-logo {
  width: 66px;
  height: 66px;
}
.brand-row h1, .sidebar h1 {
  margin: 0;
  letter-spacing: 0;
}
.brand-row h1 {
  display: grid;
  gap: 1px;
  font-weight: 800;
  color: #fff;
}
.brand-row h1 span {
  display: block;
}
.brand-row.large h1 {
  font-size: clamp(26px, 3.1vw, 31px);
  line-height: .94;
  letter-spacing: .02em;
}
.brand-row.large p {
  color: #d7e4f6;
  margin: 6px 0 0;
  max-width: 340px;
  line-height: 1.45;
}
.login-radar-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(118px, 19vh, 168px);
}
.login-radar-stage::before,
.login-radar-stage::after,
.radar-rings {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 1px solid rgba(157, 184, 255, .22);
}
.login-radar-stage::before {
  width: 220px;
  height: 220px;
  border-color: rgba(39, 211, 162, .12);
}
.login-radar-stage::after {
  width: 126px;
  height: 126px;
  border-color: rgba(255, 255, 255, .13);
}
.radar-rings {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(157, 184, 255, .16) calc(50% - 1px), rgba(157, 184, 255, .16) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(157, 184, 255, .16) calc(50% - 1px), rgba(157, 184, 255, .16) calc(50% + 1px), transparent calc(50% + 1px));
}
.radar-rings::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg, rgba(39, 211, 162, .68) 0deg, rgba(39, 211, 162, .28) 45deg, transparent 82deg 360deg);
  clip-path: circle(50% at 50% 50%);
  animation: radarSweep 2.2s linear infinite;
}
.radar-buddy {
  position: absolute;
  right: calc(50% - 88px);
  bottom: calc(50% - 78px);
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 9px 9px 9px 3px;
  background: linear-gradient(145deg, #ffffff, #d9fff4);
  border: 1px solid rgba(39, 211, 162, .58);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  animation: buddyFloat 3.4s ease-in-out infinite;
}
.radar-buddy::before,
.radar-buddy::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #0f6f56;
}
.radar-buddy::before {
  left: 7px;
}
.radar-buddy::after {
  right: 7px;
}
.radar-buddy span {
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 10px;
  height: 5px;
  border-bottom: 2px solid #0f6f56;
  border-radius: 0 0 999px 999px;
}
.login-radar-mark {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
}
.signal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.signal-board div {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 10px;
  backdrop-filter: blur(10px);
}
.signal-board span,
.signal-board small {
  display: block;
  color: #aebbd0;
  font-size: 12px;
}
.signal-board strong {
  display: block;
  margin: 5px 0 2px;
  font-size: 21px;
  color: white;
}
.login-form p, .sidebar p, .topbar p, .list p {
  color: var(--muted);
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 6px;
  padding: 10px;
}
.login-form input {
  height: 40px;
  border-radius: 8px;
  border-color: #d7e1ed;
  background: #fbfdff;
  font-size: 15px;
}
.login-form input:focus {
  outline: 2px solid rgba(22, 96, 212, .16);
  border-color: var(--accent);
}
.login-form button[type="submit"] {
  height: 42px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(22, 96, 212, .22);
}
textarea { min-height: 88px; resize: vertical; }
form { display: grid; gap: 14px; }
.error {
  color: var(--danger);
  font-size: 14px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns .18s ease;
}
.app-shell.collapsed {
  grid-template-columns: 76px 1fr;
}
.sidebar {
  background: linear-gradient(180deg, #101722, #162238);
  color: white;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 14px 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}
.brand-block {
  position: relative;
  padding: 4px 38px 14px 0;
  border-bottom: 1px solid #273448;
}
.brand-block .brand-row {
  gap: 12px;
}
.brand-block .radar-logo-frame {
  width: 64px;
  height: 64px;
  margin-left: -4px;
}
.brand-block .radar-logo-frame::before {
  inset: 5px;
  z-index: 4;
}
.brand-block .radar-logo-frame::after {
  inset: 5px;
  box-shadow: inset 0 0 0 4px rgba(10, 31, 51, .12);
}
.brand-block .radar-logo {
  width: 58px;
  height: 58px;
}
.brand-block h1 {
  font-size: 22px;
  line-height: .96;
  letter-spacing: .03em;
  word-break: normal;
}
.brand-block p {
  margin: 5px 0 0;
  font-size: 13px;
}
.user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.user-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-logout {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 5px;
  border-color: #34445b;
  background: transparent;
  color: #d8e4f2;
  font-size: 12px;
  line-height: 1;
}
.inline-logout:hover {
  background: rgba(255, 255, 255, .08);
  color: white;
}
.collapse-btn {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: #233045;
  color: #c8d3e0;
}
.sidebar p { color: #aeb9c7; }
.main-nav {
  display: grid;
  gap: 5px;
  align-content: start;
  overflow-y: auto;
  padding: 2px 0;
  min-height: 0;
}
.main-nav button {
  text-align: left;
  background: transparent;
  color: #c8d3e0;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  padding: 9px 10px;
  transition: transform .16s var(--ease-soft), background-color .16s ease, color .16s ease;
}
.main-nav button:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateX(2px);
  box-shadow: none;
}
.main-nav b {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: white;
}
.main-nav svg {
  width: 18px;
  height: 18px;
}
.main-nav button.active {
  background: #233045;
  color: white;
  box-shadow: inset 3px 0 0 var(--mint);
}
.main-nav button.active b {
  background: rgba(39, 211, 162, .16);
  color: var(--mint);
}
.nav-group {
  display: grid;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
}
.nav-group.active {
  background: rgba(35, 48, 69, .46);
}
.nav-group-head {
  color: #d7e2f0;
}
.nav-group-head b {
  color: #d7e2f0;
}
.nav-children {
  display: none;
  gap: 3px;
  padding-left: 18px;
  border-left: 1px solid #2a374b;
  margin-left: 19px;
}
.nav-group.open .nav-children {
  display: grid;
}
.main-nav .nav-child {
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 7px 8px;
}
.main-nav .nav-child b {
  width: 24px;
  height: 24px;
}
.main-nav .nav-child svg {
  width: 15px;
  height: 15px;
}
.main-nav small {
  color: #8796aa;
  font-size: 12px;
  line-height: 1.2;
}
.main-nav span {
  line-height: 1.25;
}
.nav-separator {
  height: 1px;
  background: #273448;
  margin: 8px 6px;
}
.main-nav button.active small {
  color: #c5d4e8;
}
.app-shell.collapsed .brand-row div,
.app-shell.collapsed .main-nav span,
.app-shell.collapsed .main-nav small {
  display: none;
}
.app-shell.collapsed .brand-row {
  justify-content: center;
}
.app-shell.collapsed .radar-logo-frame {
  width: 56px;
  height: 56px;
  margin-left: 0;
}
.app-shell.collapsed .radar-logo-frame::before {
  inset: 4px;
}
.app-shell.collapsed .radar-logo-frame::after {
  inset: 4px;
  box-shadow: inset 0 0 0 3px rgba(10, 31, 51, .12);
}
.app-shell.collapsed .radar-logo {
  width: 50px;
  height: 50px;
}
.app-shell.collapsed .brand-block {
  padding: 0 0 52px;
}
.app-shell.collapsed .collapse-btn {
  left: 50%;
  right: auto;
  top: 64px;
  transform: translateX(-50%);
}
.app-shell.collapsed .main-nav button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px;
}
.app-shell.collapsed .nav-group {
  padding: 2px 0;
  background: transparent;
}
.app-shell.collapsed .nav-children {
  padding-left: 0;
  margin-left: 0;
  border-left: 0;
  gap: 6px;
}
.app-shell.collapsed .nav-separator {
  margin: 8px 12px;
}
.app-shell.collapsed .main-nav b {
  grid-row: auto;
}
.content {
  position: relative;
  padding: 28px;
  min-width: 0;
  overflow: clip;
}
.content > *:not(.ambient-signals) {
  position: relative;
  z-index: 1;
}
.ambient-signals {
  pointer-events: none;
  position: fixed;
  inset: 0 0 auto auto;
  z-index: 0;
  width: min(520px, 42vw);
  height: min(360px, 34vh);
  opacity: .7;
  overflow: hidden;
}
.ambient-signals i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(39, 211, 162, .64);
  box-shadow: 0 0 0 8px rgba(39, 211, 162, .08);
  animation: driftSignal 8s ease-in-out infinite;
}
.ambient-signals i:nth-child(1) {
  top: 28px;
  right: 76px;
}
.ambient-signals i:nth-child(2) {
  top: 126px;
  right: 220px;
  width: 7px;
  height: 7px;
  background: rgba(22, 96, 212, .54);
  box-shadow: 0 0 0 7px rgba(22, 96, 212, .08);
  animation-delay: -2.2s;
}
.ambient-signals i:nth-child(3) {
  top: 232px;
  right: 128px;
  width: 6px;
  height: 6px;
  background: rgba(246, 209, 94, .68);
  box-shadow: 0 0 0 6px rgba(246, 209, 94, .12);
  animation-delay: -4s;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  animation: slideFadeIn .36s var(--ease-soft) both;
}
.topbar h2 {
  font-size: 26px;
}
.page-title-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.page-title-line h2 {
  flex: 0 0 auto;
}
.page-title-line span {
  min-width: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.page-title-line .dashboard-motto {
  align-self: center;
  border-left: 3px solid var(--accent);
  background: #f0fbf8;
  color: #0f6f56;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  padding: 7px 10px;
  white-space: nowrap;
}
.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.top-alert-card {
  align-items: center;
  background: #fff7f7;
  border-color: rgba(200, 50, 50, .25);
  color: var(--danger);
  display: inline-flex;
  gap: 12px;
  min-height: 54px;
  padding: 10px 16px;
}
.top-alert-card:hover {
  background: #fff0f0;
}
.top-alert-card span {
  color: #8a3840;
  font-size: 14px;
  font-weight: 700;
}
.top-alert-card strong {
  font-size: 24px;
  line-height: 1;
}
.topbar h2, .panel h3 {
  margin: 0;
}
.stack {
  display: grid;
  gap: 18px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.metrics article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(24, 33, 47, .05);
  transition: transform .2s var(--ease-soft), box-shadow .2s var(--ease-soft), border-color .2s ease, background-color .2s ease;
}
.metrics article {
  padding: 18px;
  display: grid;
  gap: 8px;
  animation: riseIn .38s var(--ease-soft) both;
}
.metrics article:hover,
.panel:hover {
  border-color: #c8d8ea;
  box-shadow: var(--float-shadow);
  transform: translateY(-2px);
}
.metrics span {
  color: var(--muted);
  font-size: 13px;
}
.metrics strong {
  font-size: 24px;
}
.currency-value-stack {
  display: grid;
  gap: 4px;
}
.currency-value-stack strong {
  align-items: baseline;
  display: flex;
  gap: 6px;
  line-height: 1.08;
}
.currency-value-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.panel {
  padding: 18px;
  min-width: 0;
  animation: riseIn .4s var(--ease-soft) both;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.compact-form {
  align-self: start;
}
.compact-form textarea {
  min-height: 72px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(6px);
  animation: fadeIn .18s ease both;
}
.modal-card {
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 78px rgba(15, 23, 42, .28);
  animation: modalPop .24s var(--ease-soft) both;
}
.position-modal-backdrop {
  z-index: 1200;
  place-items: start center;
  padding-top: clamp(72px, 10vh, 120px);
  padding-bottom: 24px;
}
.position-modal-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
}
.risk-scan-backdrop {
  z-index: 1200;
}
.rule-modal {
  width: min(860px, 100%);
}
.risk-scan-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
}
.red-alert-modal {
  width: min(900px, 100%);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
}
.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.risk-scan-subject {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.risk-scan-subject span {
  color: var(--muted);
}
.risk-scan-legend {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: #3a4658;
  font-size: 12px;
}
.risk-scan-legend strong {
  color: var(--ink);
}
.risk-scan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.risk-source-notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #f1d8a8;
  border-radius: 8px;
  background: #fff8eb;
  color: #73510b;
  font-weight: 700;
  line-height: 1.5;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}
.legend-dot.red { background: var(--danger); }
.legend-dot.orange { background: var(--orange); }
.legend-dot.yellow { background: var(--yellow); }
.legend-dot.gray { background: #8792a2; }
.legend-dot.green { background: var(--green); }
.risk-scan-button {
  white-space: nowrap;
}
.risk-scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.risk-scan-button.ai {
  background: #162033;
  border-color: #162033;
  color: #ffffff;
}
.risk-scan-table th:nth-child(1),
.risk-scan-table td:nth-child(1) {
  width: 16%;
  min-width: 132px;
}
.risk-scan-table th:nth-child(2),
.risk-scan-table td:nth-child(2) {
  width: 28%;
  min-width: 210px;
}
.risk-scan-table th:nth-child(3),
.risk-scan-table td:nth-child(3) {
  width: 16%;
  min-width: 150px;
}
.risk-scan-table th:nth-child(4),
.risk-scan-table td:nth-child(4) {
  width: 22%;
  min-width: 190px;
}
.risk-scan-row {
  cursor: pointer;
}
.risk-scan-row:hover,
.risk-scan-row.active {
  background: #f7faff;
}
.risk-scan-row td:first-child strong {
  font-size: 20px;
  color: var(--ink);
}
.risk-scan-row td:nth-child(2) strong,
.risk-scan-row td:nth-child(3) strong,
.risk-scan-row td:nth-child(4) strong,
.risk-scan-row td:nth-child(5) strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
}
.risk-scan-row p,
.risk-scan-row td:nth-child(3) span,
.risk-scan-row td:nth-child(3) a,
.risk-scan-row td:nth-child(3) small,
.risk-scan-row td:nth-child(4) span,
.risk-scan-row td:nth-child(5) span {
  display: block;
  margin: 6px 0 0;
  color: #3a4658;
  line-height: 1.55;
}
.risk-scan-row td:nth-child(3) small {
  color: var(--muted);
  font-size: 12px;
}
.source-pill {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #eef2f7;
  color: #3a4658;
  font-size: 12px;
  font-weight: 900;
}
.source-pill.collected {
  border-color: #b9eadb;
  background: #e8f8f2;
  color: #0b6b4d;
}
.source-pill.manual,
.source-pill.system {
  border-color: #d7e2f2;
  background: #f4f7fb;
  color: #34445c;
}
.source-pill.rule {
  border-color: #f4d4b8;
  background: #fff0e3;
  color: #9a4b0f;
}
.source-pill.estimate {
  border-color: #f1d8a8;
  background: #fff8eb;
  color: #73510b;
}
.risk-scan-row td:nth-child(4) .impact-text,
.risk-scan-detail .impact-text {
  font-weight: 800;
}
.risk-event-popover {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  border: 1px solid #c9d7e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  pointer-events: none;
}
.risk-event-popover .popover-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.risk-event-popover .popover-head strong {
  color: var(--ink);
  line-height: 1.35;
}
.risk-event-popover p {
  margin: 0;
  color: #3a4658;
  line-height: 1.5;
}
.risk-event-popover dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  font-size: 12px;
}
.risk-event-popover dt {
  color: var(--muted);
  font-weight: 800;
}
.risk-event-popover dd {
  margin: 0;
  color: #243044;
}
.impact-text.positive {
  color: var(--green);
}
.impact-text.negative {
  color: var(--danger);
}
.impact-text.neutral {
  color: #566274;
}
.risk-scan-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.risk-scan-detail h4 {
  margin: 4px 0 8px;
}
.risk-scan-detail p {
  margin: 0;
  color: #3a4658;
  line-height: 1.55;
}
.risk-scan-detail dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 10px;
  margin: 0;
}
.risk-scan-detail dt {
  color: var(--muted);
}
.risk-scan-detail dd {
  margin: 0;
}
.job-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.compact-input {
  min-width: 120px;
  padding: 8px 10px;
}
.tiny-input {
  min-width: 72px;
  padding: 8px 10px;
}
.job-metadata-row td {
  background: rgba(248, 250, 252, 0.9);
}
.gemini-config-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
}
.gemini-config-grid label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.gemini-config-grid input {
  min-width: 0;
}
.gemini-config-grid .checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
.gemini-config-grid .checkbox-line input {
  width: auto;
}
.gemini-config-grid .muted {
  grid-column: 1 / -1;
  margin: 0;
}
.settings-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.settings-overview article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.settings-overview span,
.settings-overview strong {
  display: block;
}
.settings-overview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.settings-overview strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
}
.settings-grid.single {
  grid-template-columns: minmax(0, 1fr);
}
.admin-user-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.account-directory {
  display: grid;
  gap: 10px;
}
.account-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
}
.account-row.active {
  border-color: rgba(22, 96, 212, .38);
  background: #eef6ff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.account-row strong,
.account-row small {
  display: block;
}
.account-row small {
  margin-top: 4px;
  color: var(--muted);
}
.account-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.account-meta small {
  margin-top: 0;
  max-width: 220px;
  text-align: right;
}
.user-editor {
  gap: 18px;
}
.admin-editor-section {
  display: grid;
  gap: 12px;
}
.admin-editor-section h4 {
  margin: 0;
  font-size: 14px;
}
.admin-form-grid,
.permission-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.permission-group {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.permission-group > strong {
  font-size: 13px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.permission-check input {
  width: 16px;
  height: 16px;
}
.permission-pill {
  display: inline-flex;
  align-items: center;
  margin: 2px 4px 2px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1f5f9f;
  font-size: 12px;
  font-weight: 800;
}
.setting-card {
  display: grid;
  align-content: start;
  gap: 16px;
}
.setting-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.setting-card-head h3 {
  margin: 4px 0 0;
}
.setting-card-head p {
  max-width: 660px;
  margin: 6px 0 0;
  color: var(--muted);
}
.security-card {
  min-height: 100%;
}
.setting-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.setting-switch input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}
.setting-switch strong,
.setting-switch small {
  display: block;
}
.setting-switch small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}
.device-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.device-summary.empty {
  background: #fffaf0;
}
.device-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-grid {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}
.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.detail-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.login-log-card {
  grid-column: 1 / -1;
}
.login-log-list {
  display: grid;
  gap: 10px;
}
.login-log-row {
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(0, .58fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.login-log-status {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 6px;
}
.login-log-status strong {
  color: var(--ink);
}
.login-log-status small {
  color: var(--muted);
}
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.segmented button {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}
.segmented button.active {
  background: var(--accent);
  color: white;
}
.segmented.wide {
  justify-self: start;
}
.segmented.wide button {
  min-width: 96px;
}
.grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.asset-search {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.asset-search input {
  padding: 12px 14px;
  font-size: 15px;
}
.position-asset-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(320px, 1.4fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.position-asset-picker label {
  margin: 0;
}
.position-asset-meta {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.chart {
  height: 280px;
}
.market-breadth-panel {
  border-left: 4px solid #1f75d8;
}
.market-breadth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.market-breadth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  min-width: 0;
}
.breadth-title h4 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}
.breadth-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.breadth-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.breadth-counts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
}
.breadth-counts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.breadth-counts strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.breadth-counts .up strong {
  color: #14815f;
}
.breadth-counts .down strong {
  color: #c63333;
}
.breadth-index-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #f8fbff;
}
.breadth-index-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto auto;
  gap: 10px;
  align-items: center;
}
.breadth-index-row span {
  min-width: 0;
}
.breadth-index-row strong,
.breadth-index-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadth-index-row strong {
  color: var(--ink);
  font-size: 13px;
}
.breadth-index-row small {
  color: var(--muted);
  font-size: 12px;
}
.breadth-index-row b {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.breadth-index-row em {
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.breadth-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.breadth-bars h5 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.breadth-bar-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}
.breadth-bar {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) minmax(54px, .7fr) 24px;
  gap: 8px;
  align-items: center;
}
.breadth-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
}
.breadth-bar b {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}
.breadth-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.breadth-bar.up i {
  background: linear-gradient(90deg, #22c58b, #66d7a9);
}
.breadth-bar.down i {
  background: linear-gradient(90deg, #e95f5f, #f2a4a4);
}
.breadth-bar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}
.global-index-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.section-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}
.section-title p {
  margin: 6px 0 0;
}
.global-index-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.global-index-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  min-width: 0;
}
.global-index-card h5 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}
.index-list {
  display: grid;
  gap: 8px;
}
.index-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #e7edf5;
  color: var(--text);
  text-decoration: none;
}
.index-row:first-child {
  border-top: 0;
}
.index-row span {
  min-width: 0;
}
.index-row strong,
.index-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.index-row strong {
  color: var(--ink);
  font-size: 14px;
}
.index-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.index-row b {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.mini-sparkline {
  width: 92px;
  height: 28px;
  display: block;
  overflow: visible;
}
.mini-sparkline polyline {
  fill: none;
  stroke: #6f7d90;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: drawLine .72s var(--ease-soft) forwards;
}
.mini-sparkline polyline.positive {
  stroke: #16845c;
}
.mini-sparkline polyline.negative,
.mini-sparkline polyline.danger {
  stroke: #c83232;
}
.table-sparkline {
  width: 104px;
  height: 32px;
}
.mini-trend-cell {
  display: grid;
  gap: 3px;
  min-width: 118px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.mini-trend-cell.positive {
  color: #16845c;
}
.mini-trend-cell.negative {
  color: #c83232;
}
.mini-trend-cell.flat {
  color: #687386;
}
.index-row em {
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.dashboard-command {
  display: grid;
  gap: 18px;
}
.command-hero,
.command-metrics article,
.command-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(33, 49, 73, 0.08);
}
.command-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  min-height: 132px;
  animation: liftIn .42s var(--ease-soft) both;
}
.eyebrow {
  display: inline-flex;
  color: #1f75d8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.command-hero h2 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.08;
}
.command-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.sync-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 360px;
}
.sync-cluster em {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}
.sync-chip {
  display: inline-grid;
  gap: 2px;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f6fb;
  color: var(--muted);
}
.sync-chip b {
  color: var(--ink);
  font-size: 13px;
}
.sync-chip small {
  font-size: 11px;
  font-weight: 800;
}
.sync-chip.ok {
  background: #eaf8f3;
  color: #138461;
}
.sync-chip.partial {
  background: #fff6de;
  color: #a66b00;
}
.sync-chip.failed {
  background: #fdecec;
  color: #bc2f2f;
}
.command-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.command-metrics article {
  display: grid;
  gap: 10px;
  min-height: 128px;
  padding: 18px;
  animation: riseIn .36s var(--ease-soft) both;
}
.command-metrics article:nth-child(2),
.scan-color-card:nth-child(2),
.market-breadth-card:nth-child(2),
.global-index-card:nth-child(2) {
  animation-delay: .04s;
}
.command-metrics article:nth-child(3),
.scan-color-card:nth-child(3),
.market-breadth-card:nth-child(3),
.global-index-card:nth-child(3) {
  animation-delay: .08s;
}
.command-metrics article:nth-child(4),
.scan-color-card:nth-child(4),
.market-breadth-card:nth-child(4),
.global-index-card:nth-child(4) {
  animation-delay: .12s;
}
.command-metrics span {
  color: var(--muted);
  font-weight: 800;
}
.command-metrics strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}
.command-metrics small {
  color: var(--muted);
  font-size: 13px;
}
.command-metrics .alert-metric strong {
  color: var(--danger);
}
.command-panel {
  padding: 22px 24px;
}
.hourly-scan-panel {
  display: grid;
  gap: 16px;
}
.scan-panel-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}
.scan-last-run {
  max-width: 260px;
  line-height: 1.35;
}
.scan-now-button {
  white-space: nowrap;
  padding: 8px 12px;
}
.ai-scan-button {
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}
.scan-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.scan-color-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
  animation: riseIn .36s var(--ease-soft) both;
  transition: transform .18s var(--ease-soft), box-shadow .18s var(--ease-soft), border-color .18s ease, background-color .18s ease;
}
.scan-color-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(33, 49, 73, .11);
}
.scan-color-card.active {
  outline: 2px solid #1f75d8;
  outline-offset: 1px;
  background: #f3f8ff;
}
.scan-color-card span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #3a4658;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.scan-color-card strong {
  font-size: 30px;
  line-height: 1;
}
.scan-color-card small {
  color: var(--muted);
  font-weight: 800;
}
.scan-color-card.red strong { color: var(--danger); }
.scan-color-card.orange strong { color: var(--orange); }
.scan-color-card.yellow strong { color: #a66b00; }
.scan-color-card.gray strong { color: #566274; }
.scan-color-card.green strong { color: var(--green); }
.scan-stock-list {
  display: grid;
  gap: 8px;
}
.section-title.compact {
  margin-bottom: 2px;
}
.scan-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  transition: transform .16s var(--ease-soft), box-shadow .16s var(--ease-soft), background-color .16s ease;
}
.scan-stock-row:hover {
  background: #f7faff;
  box-shadow: 0 8px 20px rgba(33, 49, 73, .08);
  transform: translateX(2px);
}
.scan-stock-row span {
  display: grid;
  gap: 3px;
}
.scan-stock-row small {
  color: var(--muted);
  font-weight: 800;
}
.scan-stock-row b {
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f7;
  text-align: center;
}
.command-panel.risk-temperature-panel,
.command-panel.market-breadth-panel {
  border-left-width: 1px;
}
.command-indicators {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.command-indicators .indicator-card {
  min-height: 178px;
  padding-bottom: 42px;
}
.command-indicators .mini-sparkline {
  width: 100%;
  height: 30px;
  margin: 4px 0 8px;
}
.timeline-filter.compact {
  align-items: end;
  gap: 8px;
}
.timeline-filter.compact label {
  min-width: 128px;
}
.timeline-filter.compact label:nth-of-type(5) {
  display: none;
}
.command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 18px;
  align-items: start;
}
.command-wide-panel {
  grid-column: 1 / -1;
}
.command-breadth-grid {
  grid-template-columns: repeat(2, minmax(360px, 1fr));
}
.command-breadth-grid .market-breadth-card {
  padding: 16px;
}
.command-breadth-grid .breadth-title h4 {
  font-size: 18px;
}
.command-breadth-grid .breadth-counts strong {
  font-size: 22px;
}
.command-breadth-grid .breadth-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-global {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.compact-global .global-index-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.compact-global .global-index-card {
  padding: 12px;
}
.compact-global .global-index-card h5 {
  margin-bottom: 8px;
  font-size: 14px;
}
.compact-global .index-list {
  gap: 0;
}
.compact-global .index-row {
  grid-template-columns: minmax(132px, 1.45fr) 84px minmax(72px, .55fr) minmax(92px, .75fr);
  gap: 8px;
  min-height: 42px;
  padding: 7px 0;
}
.compact-global .index-row strong {
  font-size: 13px;
  line-height: 1.2;
}
.compact-global .index-row small {
  margin-top: 2px;
  font-size: 11px;
}
.compact-global .index-row b,
.compact-global .index-row em {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compact-global .mini-sparkline {
  width: 84px;
  height: 24px;
}
.action-panel {
  min-height: 100%;
}
.action-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.action-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.action-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.action-item strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.action-item p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.action-item small {
  color: var(--muted);
}
.red-alert-list {
  display: grid;
  gap: 10px;
}
.red-alert-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafa;
}
.red-alert-row div {
  display: grid;
  gap: 4px;
}
.red-alert-row p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}
.red-alert-row small,
.red-alert-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.action-buttons {
  grid-column: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.portfolio-exposure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.portfolio-exposure-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.exposure-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.exposure-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}
.exposure-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.exposure-head strong {
  white-space: nowrap;
  color: var(--ink);
  font-size: 18px;
}
.exposure-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.exposure-list button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #e5ecf5;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}
.exposure-list button:hover {
  color: var(--blue);
}
.exposure-list em {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8eef7;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.exposure-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exposure-list b {
  color: var(--muted);
  font-size: 13px;
}
.market-allocation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.market-allocation-card .panel-head {
  align-items: start;
}
.market-allocation-card .panel-head strong {
  white-space: nowrap;
  font-size: 18px;
  color: var(--ink);
}
.allocation-chart {
  height: 260px;
  margin-top: 14px;
}
.allocation-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
}
.allocation-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.allocation-list em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.allocation-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.allocation-list strong {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}
.allocation-list small {
  color: var(--muted);
  min-width: 48px;
  text-align: right;
}
.candle-chart {
  height: 520px;
  margin-top: 0;
}
.asset-detail-panel {
  padding: 0;
  overflow: hidden;
}
.asset-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}
.asset-title-block {
  min-width: 0;
}
.asset-title-block h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}
.asset-title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.asset-price-head {
  display: grid;
  justify-items: end;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.asset-price-head strong {
  color: var(--danger);
  font-size: 30px;
  line-height: 1;
}
.asset-price-head span {
  font-weight: 900;
}
.asset-price-head small {
  color: var(--muted);
  font-size: 12px;
}
.asset-terminal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 14px;
  align-items: start;
  padding: 14px;
}
.asset-main-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.asset-detail-grid {
  display: grid;
  gap: 8px;
  margin-top: 0;
}
.asset-detail-grid.linked {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.asset-detail-grid > * {
  min-width: 0;
}
.candle-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
  padding: 10px;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
}
.chart-toolbar strong {
  color: var(--ink);
  font-size: 15px;
}
.chart-title-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.chip-inline-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #687386;
  font-size: 12px;
}
.chip-inline-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  padding: 4px 6px;
  white-space: nowrap;
}
.chip-inline-stats b {
  color: var(--ink);
}
.chip-inline-stats b.danger {
  color: #c83232;
}
.chip-inline-switch {
  padding: 5px 8px;
}
.chart-toolbar .segmented {
  flex: 0 0 auto;
}
.chart-toolbar .segmented button {
  border-radius: 0;
  padding: 6px 10px;
}
.quote-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.quote-sidebar {
  border: 1px solid #c8d7ea;
  border-radius: 8px;
  background: #fbfdff;
  min-width: 0;
  overflow: hidden;
}
.quote-sidebar-trading {
  position: sticky;
  top: 12px;
}
.quote-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f4f8ff;
}
.quote-sidebar-head strong {
  color: var(--ink);
  font-size: 15px;
}
.quote-sidebar-head.mini {
  padding: 10px 12px;
  background: #ffffff;
}
.quote-price-line {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.quote-price-line strong {
  color: var(--danger);
  font-size: 28px;
  line-height: 1;
}
.quote-price-line span {
  font-weight: 800;
}
.quote-snapshot.compact {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 0;
}
.quote-snapshot.compact article {
  border-width: 0 1px 1px 0;
  border-radius: 0;
  background: transparent;
  padding: 11px 12px;
}
.quote-snapshot.compact article:nth-child(2n) {
  border-right: 0;
}
.quote-snapshot.compact article:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.quote-snapshot article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 14px;
  min-width: 0;
}
.quote-snapshot span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.quote-snapshot strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-snapshot strong.positive {
  color: #16845c;
}
.quote-snapshot strong.negative {
  color: #c83232;
}
.holding-summary-card {
  border-top: 1px solid var(--line);
  background: #ffffff;
}
.holding-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.holding-metrics article {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}
.holding-metrics article:nth-child(2n),
.holding-metrics article.wide {
  border-right: 0;
}
.holding-metrics article.wide {
  grid-column: 1 / -1;
}
.holding-metrics span,
.quote-source-line span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}
.holding-metrics strong {
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.holding-metrics strong.positive {
  color: #16845c;
}
.holding-metrics strong.negative {
  color: #c83232;
}
.holding-notes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
}
.holding-notes dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.holding-notes dd {
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.45;
}
.holding-empty {
  padding: 12px;
}
.quote-source-line {
  border-top: 1px solid var(--line);
  padding: 12px;
}
.quote-source-line a,
.quote-source-line strong {
  color: var(--accent);
  font-weight: 900;
  word-break: break-all;
}
.asset-risk-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}
.panel-head.compact {
  margin-bottom: 10px;
}
.asset-risk-list {
  display: grid;
  gap: 8px;
}
.asset-risk-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}
.asset-risk-list strong {
  color: var(--ink);
}
.asset-risk-list p {
  margin: 4px 0;
  color: #41506a;
  line-height: 1.4;
}
.asset-risk-list small {
  color: var(--muted);
  font-size: 12px;
}
.asset-risk-list a {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}
.chip-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfdff;
  min-width: 0;
  margin-top: 44px;
}
.chip-section.inactive {
  cursor: pointer;
  border-style: dashed;
  background: #f8fbff;
}
.chip-section.inactive:hover {
  border-color: var(--accent);
  background: #f4f8ff;
}
.chip-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}
.chip-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fbff;
}
.chip-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.chip-metrics strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}
.chip-chart {
  height: 235px;
  margin-top: 8px;
}
.timeline {
  min-height: 240px;
  overflow-x: auto;
}
.macro-timeline-panel {
  overflow: hidden;
}
.macro-timeline {
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.timeline-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.timeline-filter label {
  min-width: 150px;
}
.timeline-filter input,
.timeline-filter select {
  height: 38px;
  padding: 8px 10px;
}
.macro-timeline.dragging {
  cursor: grabbing;
}
.macro-timeline-chart {
  min-width: 1500px;
  height: 280px;
}
.timeline-event-dot {
  cursor: pointer;
}
.timeline-event-dot:hover {
  stroke: #18212f;
  stroke-width: 2px;
}
.macro-tooltip {
  position: fixed;
  z-index: 1000;
  display: none;
  width: min(340px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  color: var(--text);
  pointer-events: auto;
}
.macro-tooltip.visible {
  display: block;
}
.macro-tooltip strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}
.macro-tooltip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.macro-tooltip dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  margin: 10px 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.macro-tooltip dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.macro-tooltip dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.macro-tooltip a,
.macro-tooltip div span {
  display: inline-flex;
  margin-top: 10px;
  font-size: 13px;
}
.macro-tooltip a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}
.risk-temperature-panel {
  border-left: 4px solid #27d3a2;
}
.market-risk-gauge {
  display: grid;
  grid-template-columns: 96px minmax(120px, auto);
  align-items: center;
  gap: 12px;
  min-width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.gauge-arc {
  position: relative;
  width: 96px;
  height: 52px;
  overflow: hidden;
}
.gauge-arc::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(from 270deg, #42c77d 0deg 45deg, #f2c84b 45deg 90deg, #e68a2e 90deg 135deg, #ce3434 135deg 180deg, transparent 180deg 360deg);
}
.gauge-arc::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f8fafc;
}
.gauge-needle {
  position: absolute;
  left: 47px;
  bottom: 4px;
  z-index: 2;
  width: 2px;
  height: 42px;
  border-radius: 999px;
  background: #172033;
  transform-origin: 50% 100%;
  transition: transform .25s ease;
}
.gauge-center {
  position: absolute;
  left: 41px;
  bottom: 0;
  z-index: 3;
  width: 14px;
  height: 14px;
  border: 3px solid #172033;
  border-radius: 50%;
  background: #ffffff;
}
.gauge-copy {
  display: grid;
  gap: 4px;
}
.gauge-copy strong {
  color: var(--ink);
  font-size: 18px;
}
.gauge-copy small {
  color: var(--muted);
  font-weight: 800;
}
.market-risk-gauge.gray .gauge-copy strong { color: #16845c; }
.market-risk-gauge.yellow .gauge-copy strong { color: #a78116; }
.market-risk-gauge.orange .gauge-copy strong { color: #c66a1a; }
.market-risk-gauge.red .gauge-copy strong { color: var(--danger); }
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.indicator-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  outline: none;
}
.indicator-card.yellow { border-color: #ead68a; background: #fffdf2; }
.indicator-card.orange { border-color: #f0b47e; background: #fff7ef; }
.indicator-card.red { border-color: #ee9b9b; background: #fff2f2; }
.indicator-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.indicator-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.indicator-card strong {
  font-size: 20px;
  color: var(--text);
}
.indicator-card p {
  margin: 8px 0 4px;
  min-height: 38px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}
.indicator-card small {
  display: block;
  color: var(--muted);
}
.indicator-card a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.indicator-info {
  position: absolute;
  right: 10px;
  bottom: 10px;
}
.info-trigger {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  background: #e8eef7;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.info-trigger:hover,
.info-trigger:focus {
  background: var(--accent);
  color: white;
  outline: none;
}
.indicator-report {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 32px));
  display: none !important;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(24, 33, 47, .2);
  color: var(--ink);
}
.indicator-report::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.info-trigger:hover + .indicator-report,
.info-trigger:focus + .indicator-report {
  display: block !important;
}
.indicator-info:has(.info-trigger:hover),
.indicator-info:has(.info-trigger:focus) {
  z-index: 30;
}
.indicator-report strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}
.indicator-report p {
  min-height: 0;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.indicator-report dl {
  margin: 0;
  display: grid;
  gap: 6px;
}
.indicator-report dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.indicator-report dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.indicator-report small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.timeline-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}
.dot.cn { background: #1660d4; }
.dot.th { background: #27d3a2; }
.dot.us { background: #c66a1a; }
.dot.holding { background: #c83232; }
.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.list article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.list article:last-child { border-bottom: 0; }
.list strong { display: block; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: #eef2f6;
  color: #566274;
}
.badge.red, .danger { color: var(--danger); }
.badge.red { background: #fdeaea; }
.badge.orange { background: #fff1e5; color: var(--orange); }
.badge.yellow { background: #fff8dc; color: var(--yellow); }
.badge.gray { background: #eef2f6; color: #566274; }
.positive { color: var(--green); }
.negative { color: var(--danger); }
.muted { color: var(--muted); }
.table-wrap {
  overflow-x: auto;
}
.table-price {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.trading-panel {
  align-content: start;
}
.trading-form .wide {
  grid-column: 1 / -1;
}
.trading-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.trading-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.trading-row strong {
  color: var(--ink);
}
.trading-row span {
  color: var(--muted);
  line-height: 1.45;
}
.toggle-line {
  align-items: center;
  grid-template-columns: 1fr auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align: top;
}
tbody tr {
  transition: background-color .16s ease, transform .16s var(--ease-soft), box-shadow .16s var(--ease-soft);
}
tbody tr:hover {
  box-shadow: inset 3px 0 0 rgba(39, 211, 162, .45);
}
td .small {
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 600;
}
.clickable-row {
  cursor: pointer;
}
.clickable-row:hover {
  background: #f7faff;
  transform: translateX(2px);
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes signalPop {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(39, 211, 162, .32);
  }
  50% {
    transform: translateY(-3px) scale(1.12);
    box-shadow: 0 0 0 8px rgba(39, 211, 162, 0);
  }
}
@keyframes driftSignal {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    opacity: .55;
  }
  50% {
    transform: translate3d(-18px, 12px, 0);
    opacity: .95;
  }
}
@keyframes buddyFloat {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-7px) rotate(3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 900px) {
  .settings-overview,
  .settings-grid,
  .admin-user-grid,
  .login-log-row {
    grid-template-columns: 1fr;
  }
  .setting-card-head {
    flex-direction: column;
  }
  .detail-grid {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .risk-scan-subject,
  .risk-scan-detail {
    grid-template-columns: 1fr;
  }
  .risk-scan-subject {
    flex-direction: column;
  }
  .risk-scan-detail dl {
    grid-template-columns: 88px 1fr;
  }
  .login-shell {
    align-items: start;
  }
  .login-card {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }
  .login-hero {
    min-height: auto;
    gap: 18px;
    padding: clamp(18px, 5vw, 26px);
  }
  .login-radar-stage {
    min-height: 140px;
  }
  .login-radar-stage::before {
    width: 210px;
    height: 210px;
  }
  .login-radar-stage::after,
  .radar-rings {
    width: 140px;
    height: 140px;
  }
  .login-radar-mark {
    width: 96px;
    height: 96px;
  }
  .brand-row.large .radar-logo-frame {
    width: 70px;
    height: 70px;
  }
  .brand-row.large .radar-logo {
    width: 64px;
    height: 64px;
  }
  .login-form {
    padding: clamp(20px, 6vw, 28px);
    overflow-y: visible;
  }
  .signal-board {
    grid-template-columns: 1fr;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }
  .metrics, .grid.two, .form-grid, .indicator-grid, .market-breadth-grid, .global-index-grid, .market-allocation-grid, .asset-search, .position-asset-picker, .asset-terminal, .asset-detail-grid.linked, .quote-snapshot,
  .command-metrics, .command-grid, .command-indicators, .command-breadth-grid, .compact-global .global-index-grid, .portfolio-exposure-grid, .scan-color-grid, .trading-grid {
    grid-template-columns: 1fr;
  }
  .market-risk-gauge {
    width: 100%;
    min-width: 0;
  }
  .asset-detail-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .asset-price-head {
    justify-items: start;
    text-align: left;
  }
  .quote-sidebar-trading {
    position: static;
  }
  .asset-risk-list article {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .asset-risk-list a {
    grid-column: 2;
  }
  .chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .chart-toolbar .segmented {
    width: 100%;
    overflow-x: auto;
  }
  .candle-chart {
    height: 420px;
  }
  .command-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }
  .command-hero h2 {
    font-size: 28px;
  }
  .sync-cluster {
    justify-content: flex-start;
    min-width: 0;
  }
  .sync-cluster em {
    text-align: left;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-title-line {
    align-items: baseline;
    flex-wrap: wrap;
  }
  .page-title-line .dashboard-motto {
    white-space: normal;
  }
  .setting-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .login-card {
    min-height: min(440px, calc(100dvh - 28px));
    max-height: calc(100dvh - 28px);
  }
  .brand-row.large .radar-logo-frame {
    width: 76px;
    height: 76px;
  }
  .brand-row.large .radar-logo {
    width: 70px;
    height: 70px;
  }
  .brand-row.large h1 {
    font-size: 32px;
  }
  .brand-row.large p {
    margin-top: 8px;
  }
  .login-radar-stage {
    min-height: 118px;
  }
  .login-radar-stage::before {
    width: 210px;
    height: 210px;
  }
  .login-radar-stage::after,
  .radar-rings {
    width: 138px;
    height: 138px;
  }
  .signal-board div {
    padding: 10px;
  }
  .signal-board strong {
    font-size: 21px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 10px;
  }
  .login-card {
    border-radius: 10px;
  }
  .brand-row.large {
    gap: 12px;
  }
  .brand-row.large .radar-logo-frame {
    width: 70px;
    height: 70px;
  }
  .brand-row.large .radar-logo {
    width: 64px;
    height: 64px;
  }
  .brand-row.large h1 {
    font-size: 28px;
  }
  .login-radar-stage {
    min-height: 120px;
  }
  .login-radar-stage::before {
    width: 180px;
    height: 180px;
  }
  .login-radar-stage::after,
  .radar-rings {
    width: 120px;
    height: 120px;
  }
}
