:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --ring: rgba(37, 99, 235, 0.15);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

html, body {
  background: linear-gradient(180deg, #f8f9fd 0%, #f2f5fb 100%);
  color: var(--text);
  font-size: 20px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  padding-bottom: 30px;
  transition: background .45s ease, color .45s ease;
}

.page-shell {
  animation: pageEnter .45s ease both;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar {
  border-radius: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: background .35s ease, box-shadow .35s ease;
  min-height: 76px;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 26px;
  height: 76px;
  line-height: 46px;
}

.navbar-nav > li > a {
  font-weight: 500;
  font-size: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav:not(.navbar-right) > li > a {
  margin: 12px 6px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  font-weight: 600;
  letter-spacing: .2px;
}

.navbar-nav:not(.navbar-right) > li > a:hover,
.navbar-nav:not(.navbar-right) > li > a:focus {
  background: rgba(255, 255, 255, 0.65) !important;
  border-color: rgba(37, 99, 235, 0.30);
  color: #1d4ed8 !important;
}

.navbar-nav.navbar-right > li > a {
  margin: 0 0 0 8px;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.52);
  font-size: 16px;
  line-height: 1.2;
}

.navbar .navbar-nav.navbar-right {
  display: flex;
  align-items: center;
  min-height: 76px;
}

.navbar .navbar-nav.navbar-right > li {
  float: none;
}

.jumbotron {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.panel {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.panel-body {
  padding: 22px;
}

.page-title {
  font-size: 40px;
  font-weight: 800;
  margin: 6px 0 6px;
}

.page-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 18px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.table {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.table > thead > tr > th {
  font-size: 17px;
  background: #f3f6fb;
  border-bottom: 0;
  padding: 14px 12px;
}

.table > tbody > tr > td {
  font-size: 16px;
  vertical-align: middle;
  padding: 14px 12px;
}

.chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 14px;
  background: #e6efff;
  color: #1d4ed8;
}

.strategy-chip {
  font-size: 17px;
  font-weight: 700;
  padding: 8px 14px;
}

.strategy-notes {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 15px;
  color: #4b5563;
}

.panel-heading {
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
  font-size: 22px;
  font-weight: 700;
}

.btn {
  border-radius: 10px;
  font-size: 18px;
  min-height: 44px;
  padding: 10px 16px;
  transition: all .25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.is-pressing,
.btn:active {
  transform: scale(.98);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .85;
}

.btn-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-control {
  border-radius: 10px;
  border: 1px solid #dbe2ee;
  box-shadow: none;
  height: 52px;
  font-size: 20px;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

textarea.form-control {
  min-height: 180px;
  height: auto;
  line-height: 1.6;
  padding: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-control:focus {
  border-color: #87aef8;
  box-shadow: 0 0 0 4px var(--ring);
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .30), transparent 36%),
    radial-gradient(circle at 85% 20%, rgba(79, 70, 229, .25), transparent 35%),
    radial-gradient(circle at 50% 85%, rgba(14, 165, 233, .22), transparent 40%),
    linear-gradient(135deg, #eef3ff 0%, #f7f9ff 50%, #ecf8ff 100%);
}

.auth-card {
  width: 33vw;
  min-width: 460px;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 34px;
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.auth-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 64px rgba(17, 24, 39, 0.22);
}

.auth-card h3 {
  font-size: 42px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 22px;
}

.auth-card label {
  font-size: 20px;
}

.auth-card .btn-link {
  font-size: 18px;
}

.home-card {
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid rgba(17, 24, 39, .10);
  border-radius: 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.16);
}

.module-btn {
  box-shadow: 0 12px 22px rgba(17, 24, 39, .18);
}

.module-grid .col-sm-6 {
  margin-bottom: 16px;
}

.module-grid {
  display: flex;
  flex-wrap: wrap;
}

.module-grid > [class*="col-"] {
  display: flex;
}

.card-2col {
  min-height: 255px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 88px;
}

.module-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.1;
}

.home-card .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-card .module-btn {
  margin-top: auto;
}

.module-meta {
  display: flex;
  gap: 16px;
  color: #6b7280;
  font-size: 14px;
  margin: 12px 0 14px;
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
  border: 1px dashed #dbe2ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}

.empty-state i {
  font-size: 34px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.empty-state-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-desc {
  color: #6b7280;
  margin-bottom: 14px;
}

.alert {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  font-size: 16px;
  padding: 12px 14px;
}

.alert-success {
  background: linear-gradient(180deg, #ecfdf3 0%, #def7e9 100%);
  color: #065f46;
}

.alert-danger {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #9f1239;
}

.alert-info {
  background: linear-gradient(180deg, #eff6ff 0%, #e1efff 100%);
  color: #1e3a8a;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 12px;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 120%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: skeletonShimmer 1.2s infinite;
}

@keyframes skeletonShimmer {
  100% { left: 130%; }
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}

.skeleton-chart {
  height: 280px;
}

.hero-mono {
  margin-bottom: 18px;
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .12);
}

.mono-stat-box {
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 18px;
  display: inline-block;
  min-width: 180px;
}

.mono-stat-label {
  font-size: 14px;
  opacity: .78;
}

.mono-stat-value {
  font-size: 34px;
  font-weight: 800;
  margin: 8px 0;
}

.mono-stat-sub {
  font-size: 13px;
  opacity: .7;
}

.chat-log {
  max-height: 420px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.chat-row {
  margin-bottom: 10px;
  display: flex;
}

.chat-row.me {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 76%;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.5;
  background: #eef2ff;
}

.chat-row.me .chat-bubble {
  background: #2563eb;
  color: #fff;
}

#theme_toggle {
  margin-top: 0;
}

.risk-score-grid {
  margin-bottom: 6px;
}

.risk-score-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  min-height: 120px;
}

.risk-score-label {
  color: #6b7280;
  font-size: 15px;
}

.risk-score-value {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
}

.risk-list {
  line-height: 1.8;
}

.risk-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.result-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
  margin-bottom: 12px;
}

.result-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  font-weight: 700;
  font-size: 16px;
}

.result-card-head i {
  color: #2563eb;
}

.result-card-body {
  padding: 10px 14px 12px;
}

.amount-bars {
  margin-bottom: 8px;
}

.amount-bar-item {
  margin-bottom: 8px;
}

.amount-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 4px;
}

.amount-progress {
  margin-bottom: 0;
  height: 8px;
  background: #e8eefc;
  border-radius: 999px;
}

.amount-progress .progress-bar {
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

.result-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.result-kv-row:last-child {
  border-bottom: 0;
}

.result-k {
  color: #6b7280;
  font-size: 15px;
}

.result-v {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.result-v-warn {
  font-size: 18px;
  color: #b45309;
}

.strategy-card .result-card-body {
  padding-top: 14px;
}

.strategy-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.strategy-timeline > li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.strategy-dot {
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.16);
  flex-shrink: 0;
}

.strategy-text {
  font-size: 16px;
  line-height: 1.75;
  color: #1f2937;
}

.diff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.diff-row:last-child {
  border-bottom: 0;
}

.diff-name {
  font-size: 15px;
  color: #4b5563;
  min-width: 110px;
}

.diff-values {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.diff-prev,
.diff-curr {
  font-size: 14px;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.diff-delta {
  font-size: 14px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}

.diff-delta.up {
  background: #ecfdf3;
  color: #166534;
}

.diff-delta.down {
  background: #fff1f2;
  color: #9f1239;
}

.stock-signal-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.stock-signal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 18px;
}

.stock-light {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.18);
}

.stock-light-green {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.stock-light-yellow {
  background: #eab308;
  box-shadow: 0 0 0 5px rgba(234, 179, 8, 0.18);
}

.stock-light-red {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18);
}

.stock-kpi-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 10px;
}

.stock-kpi-label {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 6px;
}

.stock-kpi-value {
  font-size: 20px;
  font-weight: 700;
  word-break: break-word;
}

.stock-reason-box {
  margin-top: 6px;
  margin-bottom: 0;
}

.risk-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.risk-export-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 14px;
}

.score-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.score-explain-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.score-explain-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
}

.score-progress {
  margin-bottom: 8px;
  background: #eef2ff;
}

.score-progress .progress-bar {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.score-explain-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.theme-dark {
  background: linear-gradient(180deg, #090f1a 0%, #0f172a 100%);
  color: #e5e7eb;
}

.theme-dark .navbar {
  background: rgba(16, 23, 38, 0.80);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.theme-dark .navbar a {
  color: #e5e7eb !important;
}

.theme-dark .navbar-nav:not(.navbar-right) > li > a {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.30);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
}

.theme-dark .navbar-nav:not(.navbar-right) > li > a:hover,
.theme-dark .navbar-nav:not(.navbar-right) > li > a:focus {
  background: rgba(30, 41, 59, 0.82) !important;
  border-color: rgba(96, 165, 250, 0.5);
}

.theme-dark .navbar-nav.navbar-right > li > a {
  background: rgba(15, 23, 42, 0.66);
  border-color: rgba(148, 163, 184, 0.28);
}

.theme-dark .panel {
  background: #111827;
  color: #e5e7eb;
}

.theme-dark .alert {
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}

.theme-dark .alert-success {
  background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
  color: #d1fae5;
}

.theme-dark .alert-danger {
  background: linear-gradient(180deg, #7f1d1d 0%, #991b1b 100%);
  color: #fee2e2;
}

.theme-dark .alert-info {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #dbeafe;
}

.theme-dark .table {
  background: #0f172a;
}

.theme-dark .table > thead > tr > th {
  background: #111827;
  color: #d1d5db;
}

.theme-dark .table > tbody > tr > td {
  color: #d1d5db;
  border-color: #253247;
}

.theme-dark .panel-heading {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

.theme-dark .form-control {
  background: #0b1220;
  border-color: #243247;
  color: #e5e7eb;
}

.theme-dark .chat-log {
  background: #0b1220;
  border-color: #23324a;
}

.theme-dark .risk-score-card {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-color: #2c3d55;
}

.theme-dark .risk-score-label {
  color: #94a3b8;
}

.theme-dark .score-explain-item {
  background: #0f172a;
  border-color: #2c3d55;
}

.theme-dark .result-card {
  background: #0f172a;
  border-color: #2c3d55;
}

.theme-dark .result-card-head {
  border-bottom-color: #243247;
}

.theme-dark .result-kv-row {
  border-bottom-color: #253247;
}

.theme-dark .result-k {
  color: #94a3b8;
}

.theme-dark .amount-bar-top {
  color: #9ca3af;
}

.theme-dark .amount-progress {
  background: #1f2937;
}

.theme-dark .result-v {
  color: #e5e7eb;
}

.theme-dark .result-v-warn {
  color: #fbbf24;
}

.theme-dark .strategy-text {
  color: #d1d5db;
}

.theme-dark .diff-row {
  border-bottom-color: #253247;
}

.theme-dark .diff-name,
.theme-dark .diff-prev,
.theme-dark .diff-curr {
  color: #9ca3af;
}

.theme-dark .diff-prev,
.theme-dark .diff-curr {
  background: #1f2937;
}

.theme-dark .diff-delta {
  background: #312e81;
  color: #c7d2fe;
}

.theme-dark .stock-signal-wrap,
.theme-dark .stock-kpi-card {
  background: #0f172a;
  border-color: #2c3d55;
}

.theme-dark .stock-kpi-label {
  color: #94a3b8;
}

.theme-dark .score-progress {
  background: #1f2937;
}

.theme-dark .score-explain-desc {
  color: #9ca3af;
}

.theme-dark .text-muted {
  color: #9ca3af;
}

.theme-dark .empty-state {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-color: #243247;
}

.theme-dark .empty-state i {
  color: #94a3b8;
}

.theme-dark .empty-state-desc {
  color: #9ca3af;
}

.theme-dark .skeleton {
  background: #1f2937;
}

.text-muted {
  color: var(--muted);
}

body.home-mono {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f5 100%);
  color: #111;
}

body.home-mono .navbar {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

body.home-mono .panel {
  background: #fff;
  border: 1px solid #efefef;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .08);
}

body.home-mono .panel-heading {
  background: #fff !important;
  border-bottom: 1px solid #f1f1f1;
}

body.home-mono .btn-primary {
  background: #111;
  border-color: #111;
}

/* 深色模式与 home-mono 同时存在时，覆盖 home-mono 的浅色固定样式 */
body.theme-dark.home-mono {
  background: linear-gradient(180deg, #090f1a 0%, #0f172a 100%);
  color: #e5e7eb;
}

body.theme-dark.home-mono .navbar {
  background: rgba(16, 23, 38, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
}

body.theme-dark.home-mono .panel {
  background: #111827;
  border: 1px solid #253247;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}

body.theme-dark.home-mono .panel-heading {
  background: #0f172a !important;
  border-bottom: 1px solid #1f2c42;
  color: #e5e7eb !important;
}

body.theme-dark.home-mono .mono-stat-box {
  background: #0b1220;
  color: #e5e7eb;
}

body.theme-dark.home-mono .text-muted {
  color: #9ca3af;
}

body.theme-dark.home-mono .btn-primary {
  background: #2563eb;
  border-color: #2563eb;
}

.home-intro-panel {
  margin-top: 12px;
}

.home-intro-text {
  font-size: 16px;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 8px;
}

.home-intro-layout {
  display: flex;
  align-items: stretch;
}

.intro-mini-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  margin-bottom: 10px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.intro-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  border-color: rgba(37, 99, 235, 0.28);
}

.intro-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: 15px;
  flex-shrink: 0;
}

.intro-mini-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.intro-mini-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.theme-dark .home-intro-text,
body.theme-dark.home-mono .home-intro-text {
  color: #9ca3af;
}

.theme-dark .intro-mini-card,
body.theme-dark.home-mono .intro-mini-card {
  background: #0f172a;
  border-color: #2c3d55;
}

.theme-dark .intro-mini-card:hover,
body.theme-dark.home-mono .intro-mini-card:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, .34);
  border-color: rgba(96, 165, 250, 0.45);
}

.theme-dark .intro-mini-icon,
body.theme-dark.home-mono .intro-mini-icon {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

.theme-dark .intro-mini-desc,
body.theme-dark.home-mono .intro-mini-desc {
  color: #9ca3af;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.signal-cell {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.signal-cell.active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.signal-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #374151;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.signal-dot.buy { background: #22c55e; }
.signal-dot.add { background: #3b82f6; }
.signal-dot.reduce { background: #f59e0b; }
.signal-dot.hold { background: #9ca3af; }

.signal-score {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.theme-dark .signal-cell {
  background: #0f172a;
  border-color: #2c3d55;
}

.theme-dark .signal-name {
  color: #d1d5db;
}

.sim-chart-wrap {
  margin-top: 12px;
  max-width: 920px;
}

.sim-chart-skeleton {
  height: 170px;
}

#sim_trade_chart {
  width: 100% !important;
  max-height: 220px;
}

@media (max-width: 1100px) {
  .auth-card {
    width: 88vw;
    min-width: 0;
  }
  html, body {
    font-size: 18px;
  }
  .page-title {
    font-size: 34px;
  }
  .panel-body {
    padding: 18px;
  }
}

@media (max-width: 767px) {
  .sim-chart-wrap {
    max-width: 100%;
  }
  .sim-chart-skeleton {
    height: 140px;
  }
  #sim_trade_chart {
    max-height: 180px;
  }
  .signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .risk-result-grid {
    grid-template-columns: 1fr;
  }
  .score-explain-grid {
    grid-template-columns: 1fr;
  }
  .navbar-header {
    width: 100%;
  }
  .nav-wrap {
    display: none;
    width: 100%;
    clear: both;
    padding-top: 8px;
  }
  .nav-wrap.open {
    display: block;
    animation: navDrop .25s ease both;
  }
  .nav-wrap .navbar-nav {
    float: none !important;
    margin: 0;
  }
  .nav-wrap .navbar-nav > li {
    float: none;
  }
  .nav-wrap .navbar-nav > li > a {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
  }
  .navbar-nav:not(.navbar-right) > li > a,
  .navbar-nav.navbar-right > li > a {
    margin: 6px 0;
  }
  .navbar .navbar-nav.navbar-right {
    display: block;
    min-height: 0;
  }
  .module-title {
    font-size: 24px;
  }
  .card-2col {
    min-height: 220px;
  }
  .home-intro-layout {
    display: block;
  }
}

@keyframes navDrop {
  from { opacity: .2; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

