:root {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #111827;
  --surface-2: #151f32;
  --surface-3: #1b2940;
  --line: #273449;
  --line-soft: #223047;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --faint: #64748b;
  --red: #ef4444;
  --green: #22c55e;
  --amber: #f59e0b;
  --blue: #38bdf8;
  --cyan: #2dd4bf;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.08), transparent 26rem),
    linear-gradient(180deg, #0b1020 0%, #0f172a 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.auth-loading #app,
body.auth-required #app,
body.auth-loading .console-panel,
body.auth-required .console-panel,
body.auth-loading .drawer,
body.auth-required .drawer {
  display: none;
}

body.authenticated #loginScreen {
  display: none;
}

body.auth-loading #loginScreen {
  opacity: 0.72;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-brand {
  padding: 0 0 8px;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.login-card input {
  height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  outline: none;
}

.login-card input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.login-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.login-message.error {
  color: #fecaca;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: rgba(9, 14, 27, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(45, 212, 191, 0.08));
  color: var(--blue);
  font-weight: 800;
}

.brand-title {
  font-size: 15px;
  font-weight: 760;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
}

.shell {
  min-width: 0;
  padding: 18px 22px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  min-height: 64px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 680;
}

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

h1 {
  margin-top: 2px;
  font-size: 24px;
}

h2 {
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 31, 50, 0.8);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.trigger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.badge.watch {
  border-color: rgba(56, 189, 248, 0.34);
  color: #bae6fd;
}

.badge.reject {
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

.button,
.job-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

.button {
  height: 36px;
  padding: 0 14px;
}

.button.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.button.primary {
  border-color: rgba(56, 189, 248, 0.36);
  background: #0e7490;
}

.button.ghost {
  background: rgba(21, 31, 50, 0.62);
  color: var(--muted);
}

.button:hover,
.job-button:hover,
.icon-button:hover {
  border-color: rgba(56, 189, 248, 0.42);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

.metric {
  min-height: 112px;
  padding: 16px;
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 31px;
}

.metric.risk strong {
  color: var(--amber);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel.full {
  min-height: calc(100vh - 116px);
}

.panel.wide {
  grid-row: span 2;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sector-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.custom-stock-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 120px;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

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

.candidate-list,
.sector-list,
.health-list {
  display: grid;
  gap: 8px;
}

.candidate-card,
.sector-row,
.health-row,
.intraday-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.62);
}

.candidate-card {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px 150px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.stock-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-name strong {
  font-size: 14px;
}

.stock-name span {
  color: var(--muted);
  font-size: 12px;
}

.score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score strong {
  min-width: 38px;
  font-size: 18px;
}

.bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #243044;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.sector-row,
.health-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.sector-row small,
.health-row small {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

th,
td {
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

td {
  color: #dbe4f0;
  font-size: 13px;
}

tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

tr.selected-row td {
  background: rgba(45, 212, 191, 0.08);
}

.sector-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.num {
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--red);
}

.down {
  color: var(--green);
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.segment {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segment.active {
  background: var(--surface-3);
  color: var(--text);
}

.intraday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.holding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.intraday-card {
  padding: 12px;
}

.holding-card {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.62);
}

.holding-price-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.holding-price-row div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
}

.holding-price-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.holding-price-row strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.checklist {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.check {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.check.pass {
  color: #a7f3d0;
}

.check.fail {
  color: #fecaca;
}

.risk-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: var(--text);
  padding: 0 10px;
}

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

.intraday-controls {
  display: grid;
  grid-template-columns: 150px 120px minmax(220px, 1fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.holding-form {
  display: grid;
  grid-template-columns: 110px 140px 110px 110px 120px 110px 120px minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

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

.requirement {
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
}

.requirement strong {
  display: block;
  font-size: 13px;
}

.requirement span {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 11px;
}

.requirement p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.intraday-reason {
  margin-top: 10px;
  line-height: 1.55;
}

.intraday-reason-block {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.52);
}

.intraday-reason-block.reject {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.18);
}

.intraday-reason-block.watch {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(120, 53, 15, 0.14);
}

.intraday-reason-block.trigger {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(20, 83, 75, 0.16);
}

.intraday-reason-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.intraday-reason-title span {
  color: var(--muted);
  font-size: 11px;
}

.intraday-reason-title strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.intraday-reason-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.intraday-reason-tags span {
  padding: 4px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.62);
  font-size: 11px;
  line-height: 1.35;
}

.warning-note {
  margin-top: 8px;
  color: #fde68a;
  font-size: 12px;
  line-height: 1.5;
}

.snapshot-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.snapshot-strip span {
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.result-tile {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.62);
}

.result-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

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

.data-status-grid {
  display: grid;
  grid-template-columns: 140px 180px minmax(240px, 1fr) 190px;
  gap: 10px;
  margin-bottom: 14px;
}

.data-status-card,
.data-subpanel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
}

.data-status-card {
  min-width: 0;
  padding: 12px;
}

.data-status-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.data-status-card strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}

.data-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.data-subpanel {
  padding: 12px;
}

.panel-head.compact {
  min-height: 28px;
  margin-bottom: 10px;
}

.panel-head.compact h3 {
  font-size: 15px;
}

.workflow-progress {
  display: grid;
  gap: 8px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.48);
}

.workflow-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-step strong {
  display: block;
  font-size: 13px;
}

.workflow-step p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-step.running {
  border-color: rgba(56, 189, 248, 0.55);
}

.workflow-step.running > span {
  border-color: var(--blue);
  color: #bae6fd;
}

.workflow-step.ok {
  border-color: rgba(45, 212, 191, 0.38);
}

.workflow-step.ok > span {
  border-color: var(--cyan);
  color: #ccfbf1;
}

.workflow-step.failed {
  border-color: rgba(248, 113, 113, 0.48);
}

.workflow-step.failed > span {
  border-color: #f87171;
  color: #fecaca;
}

.data-count-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.data-count {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.48);
  color: var(--muted);
  font-size: 12px;
}

.data-count strong {
  color: var(--text);
}

.mini-log {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.mini-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px minmax(150px, auto);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.mini-log-row span {
  overflow-wrap: anywhere;
}

.mini-log-row strong {
  color: var(--text);
}

.mini-log-row small {
  color: var(--faint);
  text-align: right;
}

.job-button {
  height: 46px;
}

.job-button.primary-job {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(13, 148, 136, 0.32);
  color: #ccfbf1;
  font-weight: 720;
}

.job-log {
  display: grid;
  gap: 8px;
}

.task-center-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.35fr);
  gap: 12px;
  margin-bottom: 14px;
}

.task-settings-form,
.task-rule-form {
  display: grid;
  gap: 10px;
}

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

.task-rule-form label:first-of-type {
  grid-column: 1 / -1;
}

.task-rule-switches {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 12px;
}

.check-label {
  display: inline-flex;
  grid-template-columns: none;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}

.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  grid-column: 1 / -1;
  gap: 8px;
}

.hidden-field {
  display: none;
}

.task-table-wrap table {
  min-width: 1020px;
}

.job-entry {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  width: min(620px, 100vw);
  height: 100vh;
  transform: translateX(104%);
  transition: transform 180ms ease;
  border-left: 1px solid var(--line);
  background: rgba(13, 19, 33, 0.98);
  box-shadow: var(--shadow);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  width: 34px;
  height: 34px;
  font-size: 22px;
}

.drawer-body {
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 16px;
}

.console-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  width: min(520px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 8px;
  background: rgba(9, 14, 27, 0.96);
  box-shadow: var(--shadow);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.98);
}

.console-head strong {
  display: block;
  font-size: 12px;
}

.console-head span {
  color: var(--muted);
  font-size: 11px;
}

.console-head span.running {
  color: #a7f3d0;
}

.console-toggle {
  width: 26px;
  height: 26px;
  font-size: 16px;
}

.console-body {
  display: grid;
  align-content: start;
  gap: 4px;
  height: 220px;
  overflow: auto;
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.console-panel.collapsed .console-body {
  display: none;
}

.console-line {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.console-line time {
  color: var(--faint);
}

.console-line span {
  color: var(--blue);
}

.console-line p {
  overflow-wrap: anywhere;
  color: #cbd5e1;
}

.console-line.ok p {
  color: #a7f3d0;
}

.console-line.warn p {
  color: #fde68a;
}

.console-line.error p {
  color: #fecaca;
}

.detail-grid {
  display: grid;
  gap: 12px;
}

.detail-card {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.62);
}

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

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.kv strong {
  color: var(--text);
}

.sparkline {
  width: 100%;
  height: 132px;
  margin-top: 10px;
}

.score-detail-grid {
  display: grid;
  gap: 10px;
}

.score-detail {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.48);
}

.score-detail-head,
.score-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.score-detail-head {
  min-height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
}

.score-detail-head strong {
  font-size: 13px;
}

.score-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.score-detail-items {
  display: grid;
}

.score-detail-row {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.score-detail-row + .score-detail-row {
  border-top: 1px solid rgba(34, 48, 71, 0.6);
}

.score-detail-row strong {
  color: var(--text);
  font-weight: 650;
}

.score-detail-row.pass span::before,
.score-detail-row.fail span::before {
  display: inline-block;
  width: 14px;
  margin-right: 4px;
}

.score-detail-row.pass span::before {
  content: "✓";
  color: var(--cyan);
}

.score-detail-row.fail span::before {
  content: "×";
  color: #fca5a5;
}

@media (max-width: 980px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .dashboard-grid,
  .metric-grid,
  .risk-layout,
  .data-layout,
  .data-status-grid,
  .task-center-layout,
  .task-rule-form,
  .custom-stock-form,
  .intraday-controls,
  .holding-form,
  .holding-price-row {
    grid-template-columns: 1fr;
  }

  .candidate-card {
    grid-template-columns: 1fr;
  }
}
