:root {
  /* ── 深色科技主题（Cognitive Dark）── */
  --bg: #070c18;
  --panel: #0d1628;
  --panel-2: #16223a;
  --text: #d9e6f7;
  --sub: #7e96b8;
  --line: #1f3050;
  --primary: #00e08b;        /* 霓虹绿（埃塞） */
  --primary-2: rgba(0,224,139,0.12);
  --primary-rgb: 0,224,139;
  --gold: #ffc14d;
  --gold-2: rgba(255,193,77,0.12);
  --red: #ff5d5d;
  --red-bg: rgba(255,93,93,0.12);
  --good: #00e08b;
  --bad: #ff5d5d;
  /* 别名：兼容历史样式引用 */
  --card: var(--panel);
  --border: var(--line);
  --surface: var(--panel-2);
  --glow: 0 0 12px rgba(var(--primary-rgb), 0.35);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 2px 8px rgba(0,0,0,0.35), 0 10px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.5), 0 0 24px rgba(var(--primary-rgb), 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
  --nav-h: 58px;             /* 移动端底部导航高度 */
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(var(--primary-rgb), 0.07), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(64,144,255,0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 科技网格背景（叠加在主内容区） */
main {
  background-image:
    linear-gradient(rgba(126,150,184,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126,150,184,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}

::selection { background: rgba(var(--primary-rgb), 0.3); }

/* 细滚动条 */
main::-webkit-scrollbar, .sidebar::-webkit-scrollbar,
.watchlist-search-drop::-webkit-scrollbar, .city-table-wrap::-webkit-scrollbar {
  width: 8px; height: 8px;
}
main::-webkit-scrollbar-thumb, .watchlist-search-drop::-webkit-scrollbar-thumb,
.city-table-wrap::-webkit-scrollbar-thumb {
  background: #2a3d5f; border-radius: 4px;
}
main::-webkit-scrollbar-thumb:hover { background: #3a5480; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

:is(button, .nav, .subtab, input, select, textarea):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: linear-gradient(180deg, #0e1f30 0%, #0b1826 60%, #0a1522 100%);
  color: #e8edf3;
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a6b4a, #c8921a);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0;
  flex-shrink: 0;
  color: #fff;
}

.brand h1 { font-size: 16px; margin: 0; line-height: 1.3; }
.brand p { margin: 2px 0 0; color: #7a95b0; font-size: 11px; }

nav { padding: 12px 10px 0; display: flex; flex-direction: column; gap: 2px; }

.nav {
  position: relative;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9fb8cc;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.nav:hover { background: rgba(255,255,255,0.06); color: #e8edf3; transform: translateX(2px); }
.nav.active { background: rgba(26,107,74,0.35); color: #4dd9a0; font-weight: 600; }
.nav.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #4dd9a0;
}

.side-note {
  margin-top: auto;
  padding: 16px 16px 0;
  color: #5a7a90;
  font-size: 11px;
  line-height: 1.8;
}
.dot-green { color: #4dd9a0; }
.ui-version {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 10px;
  color: var(--primary);
  font-size: 10px;
  letter-spacing: 0.5px;
}
.brand { position: relative; }
.brand-ver {
  position: absolute;
  top: 10px;
  right: 12px;
  margin-top: 0;
  background: rgba(var(--primary-rgb), 0.10);
}
.top-ver { display: none; margin-top: 0; align-self: center; }
@media (max-width: 860px) {
  .top-ver { display: inline-block; }
}

/* ── Main content ── */
main {
  flex: 1;
  min-width: 0;
  padding: 64px 32px 28px; /* 顶部留出固定的国家/语言控件高度 */
  overflow: auto;
}

.view { display: none; max-width: 1100px; }
.view.active { display: block; }

/* 子Tab导航栏 */
.subtabs {
  display: flex;
  gap: 6px;
  padding: 14px 0 12px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.subtab {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--sub);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.subtab:hover { border-color: var(--primary); color: var(--primary); }
.subtab.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3); }
body.country-ao .subtab.active { background: #cc2020; border-color: #cc2020; }

/* 子视图：默认隐藏，激活时独立显示 */
.subview { display: none; }
.subview.active { display: block; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h2 { margin: 0 0 4px; font-size: 22px; }
.topbar p { margin: 0; color: var(--sub); font-size: 13px; }

/* ── Forms ── */
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 18px;
}
.search-row:has(select) { grid-template-columns: 1fr 170px auto; }

input, select, textarea {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input, select { height: 44px; }
textarea { padding: 10px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-2);
}

button {
  border: 0;
  border-radius: 8px;
  height: 44px;
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}
button:hover { opacity: 0.92; box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.28); }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
button.ghost {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--primary);
}
button.ghost:hover { border-color: var(--primary); box-shadow: none; opacity: 1; background: var(--primary-2); }

/* ── Advisor ── */
.advisor-row { grid-template-columns: 1fr auto; align-items: end; }
.advisor-row textarea { min-height: 80px; }
.advisor-row button { height: auto; min-height: 80px; padding: 0 24px; }

.quick-asks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}
.quick-asks .label { color: var(--sub); font-size: 12px; }
.chip-btn {
  height: 32px;
  padding: 0 12px;
  background: var(--primary-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
}
.chip-btn:hover { background: var(--primary); color: #fff; }

.badge-row { display: flex; gap: 8px; flex-shrink: 0; }
.badge { background: #e2e8f0; color: #5a7290; border-radius: 12px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.badge-green { background: #d0f5e8; color: #1a6b4a; }
.badge-orange { background: #fff0cc; color: #b07800; }

/* ── Answer/Card ── */
.answer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.muted { color: var(--sub); }

.ref-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ref-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
}
.ref-card .ref-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ref-card .ref-score { color: var(--primary); font-weight: 700; }
.ref-card .ref-name { color: var(--sub); font-weight: 600; font-size: 11px; }
.ref-card .ref-content { color: var(--text); line-height: 1.6; }
.ref-online { border-left-color: var(--gold); }
/* 非官方媒体参考：琥珀色区分官方引用 */
.media-refs-head { font-size: 12px; color: #ffc14d; margin: 12px 0 6px; line-height: 1.6; }
.ref-media { border-left-color: #ffc14d; background: rgba(255,193,77,0.05); }
.ref-media .media-tag { color: #ffc14d; font-weight: 700; }

.online-notice {
  background: var(--gold-2);
  border: 1px solid #e8c070;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gold);
}
.online-notice.hidden { display: none; }

/* ── Guide ── */
.guide-container { display: flex; flex-direction: column; gap: 16px; }
.guide-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.guide-step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.guide-step-header:hover { background: var(--panel-2); }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.step-icon { font-size: 20px; }
.step-title { font-weight: 700; font-size: 15px; flex: 1; }
.step-summary { color: var(--sub); font-size: 12px; }
.step-chevron { color: var(--sub); transition: transform 0.2s; }
.guide-step.open .step-chevron { transform: rotate(90deg); }
.guide-step-body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}
.guide-step.open .guide-step-body { display: block; }
.task-list { list-style: none; padding: 0; margin: 12px 0; }
.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--panel-2);
  font-size: 13px;
  line-height: 1.6;
}
.task-list li::before { content: "◆"; color: var(--primary); font-size: 8px; margin-top: 5px; flex-shrink: 0; }
.guide-legal { background: var(--primary-2); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--primary); margin-top: 8px; }
.guide-tip { background: var(--gold-2); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: #8b6200; margin-top: 8px; }

/* ── Sectors ── */
.sector-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.sector-tab { height: 36px; padding: 0 16px; border-radius: 18px; font-size: 13px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); color: var(--sub); }
.sector-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sector-tab.prohibited.active { background: var(--red); border-color: var(--red); }
.sector-tab.restricted.active { background: var(--gold); border-color: var(--gold); }
.sector-tab.encouraged.active { background: var(--good); border-color: var(--good); }

.sector-summary { display: flex; gap: 12px; margin-bottom: 18px; }
.stat-pill { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; flex: 1; text-align: center; }
.stat-pill .stat-num { font-size: 24px; font-weight: 800; }
.stat-pill .stat-label { font-size: 11px; color: var(--sub); margin-top: 2px; }
.stat-pill.prohibited .stat-num { color: var(--red); }
.stat-pill.restricted .stat-num { color: var(--gold); }
.stat-pill.encouraged .stat-num { color: var(--good); }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sector-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
}
.sector-card.prohibited { border-top-color: var(--red); }
.sector-card.restricted { border-top-color: var(--gold); }
.sector-card.encouraged { border-top-color: var(--good); }
.sector-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sector-card h3 { margin: 0; font-size: 14px; font-weight: 700; }
.sector-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sector-status.prohibited { background: var(--red-bg); color: var(--red); }
.sector-status.restricted { background: var(--gold-2); color: var(--gold); }
.sector-status.encouraged { background: var(--primary-2); color: var(--primary); }
.sector-card .detail { font-size: 12px; color: var(--sub); line-height: 1.6; margin: 6px 0; }
.sector-card .incentive { font-size: 12px; color: var(--good); background: var(--primary-2); border-radius: 5px; padding: 5px 8px; margin-top: 6px; }
.sector-card .law-ref { font-size: 11px; color: var(--primary); margin-top: 6px; font-weight: 600; }
.category-tag { font-size: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: var(--sub); margin-top: 4px; display: inline-block; }

/* ── Grid / Cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 14px; }
.card p { margin: 0; color: var(--sub); font-size: 12px; line-height: 1.65; }
.card .meta { margin-top: 10px; font-size: 11px; color: var(--primary); font-weight: 700; }

/* ── Tax breakdown ── */
.tax-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tax-panel-header { background: #0d1b2a; color: #e8edf3; padding: 10px 14px; font-size: 13px; font-weight: 700; }
.tax-disclaimer { font-weight: 400; font-size: 11px; color: #7a95b0; }
.tax-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tax-table th { background: var(--panel-2); padding: 8px 12px; text-align: left; font-weight: 700; color: var(--sub); border-bottom: 1px solid var(--line); }
.tax-table td { padding: 7px 12px; border-bottom: 1px solid var(--panel-2); vertical-align: top; }
.tax-table tr:last-child td { border-bottom: none; }
.tax-name { font-weight: 600; }
.tax-rate { color: var(--red); font-weight: 700; white-space: nowrap; }
.tax-amount { font-weight: 700; white-space: nowrap; }
.tax-note { color: var(--sub); font-size: 11px; }
.total-row td { background: #fff8e0; font-weight: 700; }
.landed-row td { background: #e8f5ec; font-weight: 700; color: var(--good); }

/* ── Tax Calc Panel ── */
.tax-calc-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 600px; }
.tax-type-switch { display: flex; gap: 10px; margin-bottom: 20px; }
.tax-type-btn { height: 40px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--sub); font-weight: 600; padding: 0 20px; }
.tax-type-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.calc-form { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.calc-form label { color: var(--sub); font-size: 13px; white-space: nowrap; }
.calc-form input { flex: 1; }
.tax-result { background: var(--primary-2); border: 1px solid #b0dcc8; border-radius: 8px; padding: 16px; }
.tax-result.hidden { display: none; }
.tax-result .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #c0dfd4; font-size: 13px; }
.tax-result .row:last-child { border-bottom: none; }
.tax-result .row strong { font-weight: 700; }
.tax-bracket-note { margin-top: 16px; background: var(--panel-2); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--sub); line-height: 1.8; }

/* ── Customs freight row ── */
.customs-freight-row { display: flex; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; align-items: flex-end; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }
.freight-field { display: flex; flex-direction: column; gap: 3px; min-width: 160px; flex: 1; }
.freight-field label { font-size: 11px; color: var(--sub); }
.freight-field input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.comesa-badge { display: inline-block; background: var(--primary-2); color: var(--primary); border: 1px solid var(--primary); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.tax-panel-basis { font-size: 11px; color: var(--sub); margin-top: 4px; }

/* ── Local Life ── */
.local-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.local-tab { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 20px; font-size: 14px; cursor: pointer; transition: all .15s; }
.local-tab:hover { border-color: var(--primary); color: var(--primary); }
.local-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.local-post-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.local-post-form h4 { margin: 0 0 14px; font-size: 15px; }
.local-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.local-form-grid label { font-size: 12px; color: var(--sub); display: block; margin-bottom: 3px; }
.local-form-grid input, .local-form-grid textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 7px 10px; font-size: 13px; }
.local-form-grid textarea { resize: vertical; font-family: inherit; }
.lf-full { grid-column: 1 / -1; }
.local-form-btns { display: flex; gap: 8px; margin-top: 14px; }
.local-listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.listing-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; position: relative; }
.listing-card h4 { margin: 0; font-size: 15px; color: var(--text); padding-right: 24px; }
.listing-card .lc-price { font-size: 14px; color: var(--primary); font-weight: 600; }
.listing-card .lc-loc { font-size: 12px; color: var(--sub); }
.listing-card .lc-desc { font-size: 13px; color: var(--text); line-height: 1.5; }
.listing-card .lc-contact { font-size: 13px; background: var(--primary-2); color: var(--primary); border-radius: 6px; padding: 6px 10px; margin-top: 4px; word-break: break-all; }
.listing-card .lc-date { font-size: 11px; color: var(--sub); margin-top: 4px; }
.listing-card .lc-del { position: absolute; top: 12px; right: 12px; background: none; border: none; cursor: pointer; color: var(--sub); font-size: 16px; padding: 2px; }
.listing-card .lc-del:hover { color: var(--red); }
.local-empty { text-align: center; padding: 40px; color: var(--sub); grid-column: 1/-1; }

/* ── Market ── */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.quote {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.quote b { display: block; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.quote .price { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.quote .change { font-size: 12px; font-weight: 700; }
.quote .unit { font-size: 10px; color: var(--sub); margin-top: 4px; }
.up { color: var(--bad); }    /* 红涨（中国习惯） */
.down { color: var(--good); } /* 绿跌 */
.market-time { margin-top: 12px; font-size: 11px; color: var(--sub); }

/* ── Ship ── */
.ship-hint { background: var(--panel-2); border-radius: 8px; padding: 12px 16px; font-size: 12px; color: var(--sub); line-height: 1.8; margin-top: 8px; }

/* ── News ── */
.news-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.chip { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); color: var(--sub); cursor: pointer; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.news-grid { display: flex; flex-direction: column; gap: 10px; }
.news-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.news-card h3 { margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.news-card .summary { color: var(--sub); font-size: 12px; line-height: 1.65; margin: 0 0 10px; }
.news-card .meta { display: flex; gap: 12px; font-size: 11px; color: var(--sub); }
.news-card .tag { background: var(--primary-2); color: var(--primary); border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.pager button { background: var(--panel); border: 1px solid var(--line); color: var(--primary); font-weight: 600; }
.page-info { font-size: 12px; color: var(--sub); }

/* ── Progress bar ── */
.progress-bar-wrap { position: relative; background: var(--panel-2); border-radius: 6px; height: 28px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.progress-bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, var(--primary), #2dd4a0); border-radius: 6px; transition: width 0.4s; }
.progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.hidden { display: none !important; }

/* ── Status box ── */
.status-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--panel-2); font-size: 13px; gap: 14px; }
.row:last-child { border-bottom: none; }
.row > span:first-child { flex-shrink: 0; }  /* 标签不因长值被挤成竖排 */
.row > :last-child { text-align: right; }
.row span { color: var(--sub); }
.row strong { font-weight: 700; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a2332;
  color: #e8edf3;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── HS customs card ── */
.customs-card .hs-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hs-code { background: #0d1b2a; color: #4dd9a0; border-radius: 5px; padding: 2px 8px; font-size: 13px; font-weight: 800; font-family: monospace; }
.hs-tag { background: var(--panel-2); color: var(--sub); border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.hs-name-en { font-size: 11px; color: var(--sub); margin: 3px 0 0; }

/* ── K线图面板 ── */
.chart-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.chart-symbol-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.symbol-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.symbol-btn:hover { border-color: var(--primary); color: var(--primary); }
.symbol-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chart-period-bar { display: flex; gap: 4px; margin-bottom: 10px; }
.period-btn { background: transparent; border: 1px solid var(--line); color: var(--sub); border-radius: 5px; padding: 3px 10px; font-size: 12px; cursor: pointer; transition: all .15s; }
.period-btn:hover { border-color: var(--primary); color: var(--primary); }
.period-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chart-msg { font-size: 12px; margin-top: 6px; text-align: center; }

/* ── 自选股 ── */
.watchlist-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 20px; box-shadow: var(--shadow); }
.watchlist-panel h3 { margin: 0 0 4px; font-size: 15px; }
.watchlist-add-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.watchlist-add-row input { flex: 1; min-width: 120px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.watchlist-items { display: flex; flex-wrap: wrap; gap: 8px; }
.watchlist-tag { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.watchlist-tag:hover { border-color: var(--primary); }
.watchlist-tag.active { border-color: var(--primary); color: var(--primary); }
.watchlist-tag .rm { color: var(--sub); margin-left: 4px; font-size: 15px; line-height: 1; }
.watchlist-tag .rm:hover { color: #c0392b; }
.watchlist-search-wrap { position: relative; flex: 1; min-width: 200px; }
.watchlist-search-wrap input { width: 100%; box-sizing: border-box; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.watchlist-search-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-lg); z-index: 100; max-height: 240px; overflow-y: auto; }
.watchlist-search-drop.hidden { display: none; }
.watchlist-search-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 13px; }
.watchlist-search-item:last-child { border-bottom: none; }
.watchlist-search-item:hover { background: var(--panel-2); }
.watchlist-search-item .si-name { flex: 1; }
.watchlist-search-item .si-code { font-weight: 600; color: var(--primary); white-space: nowrap; }
.watchlist-search-item .si-exch { font-size: 11px; color: var(--sub); white-space: nowrap; }

/* ── 新闻重要性 ── */
.news-card.major { border-left: 3px solid var(--gold); }
.news-importance { font-size: 10px; background: var(--gold); color: #000; border-radius: 3px; padding: 1px 5px; margin-right: 4px; font-weight: 700; }
.news-expand-btn { background: transparent; border: none; color: var(--primary); font-size: 12px; cursor: pointer; padding: 2px 0; }
.news-expand-btn:hover { text-decoration: underline; }

/* ── 进口禁令横幅 ── */
.import-banner { font-size: 12px; line-height: 1.5; border-radius: 6px; padding: 8px 12px; margin: 6px 0 10px; }
.import-banner.import-ban { background: #fdeeea; border-left: 4px solid #e74c3c; color: #a93226; }
.import-banner.import-ok  { background: #e9f7ef; border-left: 4px solid #27ae60; color: #1e8449; }

/* ── 税务抵扣面板 ── */
.deduct-toggle { width: 100%; margin: 8px 0 0; background: transparent; border: 1px dashed var(--border); border-radius: 6px; color: var(--primary); font-size: 13px; padding: 7px; cursor: pointer; text-align: left; height: auto; font-weight: 600; }
.deduct-toggle:hover { background: var(--primary-2); box-shadow: none; opacity: 1; }
.deduct-panel { margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.deduct-notice { font-size: 12px; color: var(--sub); background: rgba(255,200,0,.06); border-left: 3px solid var(--gold); padding: 7px 10px; border-radius: 4px; margin-bottom: 10px; line-height: 1.6; }
.deduct-item { margin-bottom: 10px; }
.deduct-check { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
.deduct-check input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); flex-shrink: 0; }
.d-amt { width: 100%; margin-top: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; color: var(--text); font-size: 13px; }
.d-amt:focus { outline: none; border-color: var(--primary); }
.deduct-law { font-size: 11px; color: var(--sub); margin-top: 3px; line-height: 1.5; padding-left: 22px; }
.deduct-divider { font-size: 11px; color: var(--sub); margin: 12px 0 8px; text-align: center; }
.deduct-special-row { margin-bottom: 10px; padding: 8px 10px; background: rgba(var(--primary-rgb, 41,128,185),.08); border-radius: 6px; border-left: 3px solid var(--primary); }
.deduct-special { font-weight: 600; color: var(--text); }
/* Deduction result rows */
.deduct-result-title { font-size: 12px; font-weight: 600; color: var(--sub); margin: 12px 0 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.deduct-result-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; margin-bottom: 5px; }
.dr-name { color: var(--text); }
.dr-amt  { color: var(--good); font-weight: 600; white-space: nowrap; }
.dr-law  { grid-column: 1 / -1; color: var(--sub); font-size: 11px; padding-left: 4px; }
.deduct-result-total { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; color: var(--good); }

/* ── 右上角：国家 + 语言下拉控件 ─────────────────────────────────────────────── */
#topRightControls {
  position: fixed;
  top: 10px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.tr-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tr-label {
  font-size: 10px;
  color: var(--sub);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  user-select: none;
}

.tr-dropdown {
  position: relative;
}

.tr-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  white-space: nowrap;
}
.tr-btn:hover { background: var(--panel-2); }

.tr-caret {
  font-size: 10px;
  color: var(--sub);
  transition: transform 0.18s;
  line-height: 1;
}
.tr-dropdown.open .tr-caret { transform: rotate(180deg); }

.tr-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  min-width: 148px;
  z-index: 1100;
}
.tr-dropdown.open .tr-menu { display: block; }

/* Items inside the dropdown menus */
.tr-menu .country-btn,
.tr-menu .lang-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sub);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.tr-menu .country-btn:hover,
.tr-menu .lang-btn:hover { background: var(--panel-2); color: var(--text); }

/* Language active item */
.tr-menu .lang-btn.active { background: var(--primary); color: #fff; font-weight: 600; }
body.country-ao .tr-menu .lang-btn.active { background: #cc2020; }

/* Country active items in dropdown（深色霓虹） */
.tr-menu .country-btn[data-country="ET"].active { background: rgba(0,224,139,0.15); color: #33f0ad; font-weight: 700; }
.tr-menu .country-btn[data-country="AO"].active { background: rgba(255,82,82,0.15); color: #ff8a8a; font-weight: 700; }
.tr-menu .country-btn[data-country="AE"].active { background: rgba(255,196,61,0.15); color: #ffd24d; font-weight: 700; }
.tr-menu .country-btn[data-country="CN"].active { background: rgba(255,77,61,0.15); color: #ff8a7a; font-weight: 700; }
.tr-menu .country-btn[data-country="DJ"].active { background: rgba(56,182,255,0.15); color: #6ec8ff; font-weight: 700; }
.tr-menu .country-btn[data-country="TR"].active { background: rgba(227,10,23,0.15); color: #ff8a8a; font-weight: 700; }
.tr-menu .country-btn[data-country="KZ"].active { background: rgba(0,175,202,0.15); color: #5fd6e8; font-weight: 700; }

/* Angola theme */
body.country-ao { --primary: #ff5252; --primary-2: rgba(255,82,82,0.12); --gold: #ffb020; --primary-rgb: 255,82,82; }
body.country-ao .nav.active { background: rgba(255,82,82,0.22); color: #ff8a8a; }
body.country-ao .nav.active::before { background: #ff8a8a; }
body.country-ao .mark { background: linear-gradient(135deg, #cc2020, #e8a000); }
body.country-ao .subtab.active { background: #c23434; border-color: #c23434; }
body.country-ao .tr-menu .lang-btn.active { background: #c23434; }

/* 迪拜 UAE 主题 */
body.country-ae { --primary: #eebc2e; --primary-2: rgba(238,188,46,0.12); --gold: #eebc2e; --primary-rgb: 238,188,46; }
body.country-ae .nav.active { background: rgba(238,188,46,0.20); color: #ffd96e; }
body.country-ae .nav.active::before { background: #ffd96e; }
body.country-ae .mark { background: linear-gradient(135deg, #005f3e, #c8a000); }
body.country-ae .subtab.active { background: #b89016; border-color: #b89016; }
body.country-ae .tr-menu .lang-btn.active { background: #b89016; }

/* 中国主题 */
body.country-cn { --primary: #ff5540; --primary-2: rgba(255,85,64,0.12); --gold: #ffde00; --primary-rgb: 255,85,64; }
body.country-cn .nav.active { background: rgba(255,85,64,0.22); color: #ff8a7a; }
body.country-cn .nav.active::before { background: #ff8a7a; }
body.country-cn .mark { background: linear-gradient(135deg, #de2910, #ffde00); }
body.country-cn .subtab.active { background: #cc3a28; border-color: #cc3a28; }
body.country-cn .tr-menu .lang-btn.active { background: #cc3a28; }

/* 吉布提主题 */
body.country-dj { --primary: #38b6ff; --primary-2: rgba(56,182,255,0.12); --gold: #6ab04c; --primary-rgb: 56,182,255; }
body.country-dj .nav.active { background: rgba(56,182,255,0.22); color: #6ec8ff; }
body.country-dj .nav.active::before { background: #6ec8ff; }
body.country-dj .mark { background: linear-gradient(135deg, #1e78be, #6ab04c); }
body.country-dj .subtab.active { background: #1e78be; border-color: #1e78be; }
body.country-dj .tr-menu .lang-btn.active { background: #1e78be; }

/* ── 安哥拉税表面板 ── */
.ao-tax-badge {
  display: inline-block;
  background: #cc2020;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════
   国家概况 (Country Overview)
   ═══════════════════════════════════════ */
.overview-content { padding: 0 0 40px; }

.overview-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 28px 24px 24px;
  background: linear-gradient(135deg, var(--primary-2), var(--panel));
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.overview-flag { font-size: 64px; line-height: 1; }
.overview-country-name { font-size: 28px; font-weight: 800; margin: 0 0 4px; color: var(--text); }
.overview-sub { font-size: 14px; color: var(--sub); margin: 2px 0; }
.overview-currency { font-size: 13px; color: var(--sub); margin: 4px 0 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 24px 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-icon { font-size: 22px; margin-bottom: 6px; }
.stat-label { font-size: 11px; color: var(--sub); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1.2; margin-bottom: 4px; }
.stat-note { font-size: 11px; color: var(--sub); }

.overview-section { padding: 0 24px 24px; }
.section-heading {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.city-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.city-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.city-table thead th {
  background: var(--primary-2);
  color: var(--sub);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
}
.city-table tbody tr:nth-child(even) { background: var(--bg); }
.city-table tbody tr:hover { background: var(--primary-2); }
.city-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rank-num { font-size: 15px; font-weight: 800; color: var(--primary); width: 36px; text-align: center; }
.gdp-val { font-weight: 700; color: var(--text); }
.pop-val { color: var(--sub); }
.city-note { color: var(--sub); font-size: 12px; max-width: 280px; }

.overview-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.info-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.info-card p { font-size: 13px; color: var(--sub); line-height: 1.7; margin: 0; }

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-2col { grid-template-columns: 1fr; }
  .city-note { display: none; }
}

/* ═══════════════════════════════════════
   景点 (Attractions)
   ═══════════════════════════════════════ */
.attractions-panel { padding: 8px 0 40px; }
.attraction-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}
.attraction-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.1); }
.attraction-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.attraction-emoji { font-size: 32px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.attraction-name { font-size: 17px; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.attraction-cat {
  display: inline-block;
  background: var(--primary-2);
  color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  letter-spacing: 0.3px;
}
.attraction-desc { font-size: 13.5px; color: var(--sub); line-height: 1.75; margin: 0 0 14px; }
.attraction-details { display: flex; flex-direction: column; gap: 6px; }
.att-row { font-size: 12.5px; color: var(--sub); display: flex; gap: 8px; align-items: baseline; }
.att-row span { flex: 1; }
.ticket-row { color: var(--text); }
.ticket-row span { color: var(--text); }
.hotel-row span { color: var(--text); }

/* ── 用户认证弹窗 ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff; border-radius: 16px; padding: 28px 32px;
  width: 360px; max-width: 94vw; position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,0.22);
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 18px;
  color: var(--sub); cursor: pointer; padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }
.modal-tabs { display: flex; gap: 0; margin-bottom: 22px; border-bottom: 2px solid var(--line); }
.modal-tab {
  background: none; border: none; padding: 8px 14px;
  font-size: 14px; font-weight: 600; color: var(--sub);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 12.5px; color: var(--sub); margin-bottom: 5px; font-weight: 600; }
.auth-field input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.auth-field input:focus { border-color: var(--primary); }
.auth-submit {
  width: 100%; padding: 11px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 15px;
  font-weight: 700; cursor: pointer; margin-top: 4px;
  transition: opacity 0.2s;
}
.auth-submit:hover { opacity: 0.88; }
.auth-tip { text-align: center; font-size: 12.5px; color: var(--sub); margin-top: 12px; }
.auth-tip a { color: var(--primary); text-decoration: none; }
.auth-note {
  font-size: 12px; color: var(--sub); background: var(--primary-2);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; line-height: 1.6;
}

/* ── 实名认证标识 ─────────────────────────────────────────────── */
.lc-verified {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  color: #2a7a2a; background: #eafaea;
  border: 1px solid #b2e0b2;
  border-radius: 6px; padding: 2px 8px;
  margin-bottom: 7px;
}

/* ── 用户按钮 ─────────────────────────────────────────────────── */
.user-btn {
  font-size: 12.5px; white-space: nowrap;
  background: var(--primary-2); color: var(--primary);
  border: 1.5px solid var(--primary); border-radius: 8px;
  padding: 5px 12px; font-weight: 700; cursor: pointer;
}
.user-btn:hover { background: var(--primary); color: #fff; }

/* ═══════════════════════════════════════
   视图切换动画 & 卡片交互
   ═══════════════════════════════════════ */
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view.active, .subview.active { animation: viewFadeIn 0.28s ease both; }

.card, .sector-card, .news-card, .listing-card, .quote {
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.card:hover, .sector-card:hover, .news-card:hover, .listing-card:hover, .quote:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.quote .price { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════
   加载状态：spinner / 打字点 / 骨架屏
   ═══════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(var(--primary-rgb), 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
button .spinner { border-color: rgba(255,255,255,0.35); border-top-color: #fff; margin-right: 6px; }

@keyframes dotPulse {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.typing-dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: -1px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--panel-2) 25%, #f6f9fc 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════
   AI 回答 Markdown 渲染
   ═══════════════════════════════════════ */
.answer.md { white-space: normal; }
.answer.md h3, .answer.md h4 {
  margin: 14px 0 8px;
  font-size: 15px;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--panel-2);
}
.answer.md h4 { font-size: 14px; border-bottom: none; margin: 12px 0 6px; }
.answer.md h3:first-child, .answer.md h4:first-child { margin-top: 0; }
.answer.md p { margin: 8px 0; }
.answer.md ul, .answer.md ol { margin: 8px 0; padding-left: 22px; }
.answer.md li { margin: 4px 0; line-height: 1.7; }
.answer.md code {
  background: var(--panel-2);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--primary);
}
.answer.md strong { color: var(--text); }
.answer.md blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--primary);
  background: var(--primary-2);
  border-radius: 0 6px 6px 0;
  color: var(--sub);
}
.answer.md hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
.answer.md table { border-collapse: collapse; margin: 10px 0; font-size: 13px; width: 100%; }
.answer.md th, .answer.md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.answer.md th { background: var(--panel-2); font-weight: 700; }

/* ═══════════════════════════════════════
   展开/收起（法律检索、新闻摘要）
   ═══════════════════════════════════════ */
.expandable .x-full { display: none; }
.expandable.expanded .x-full { display: inline; }
.expandable.expanded .x-preview { display: none; }

/* ═══════════════════════════════════════
   Toast 分级
   ═══════════════════════════════════════ */
.toast { box-shadow: var(--shadow-lg); max-width: 86vw; text-align: center; }
.toast.success { background: #14532d; }
.toast.error { background: #7f1d1d; }

/* ═══════════════════════════════════════
   移动端适配（≤860px）：底部导航 + 单列布局
   ═══════════════════════════════════════ */
@media (max-width: 860px) {
  body { flex-direction: column; }

  /* 主内容优先，底部留出导航高度 */
  main {
    order: 1;
    flex: 1;
    padding: 60px 14px 20px;
    -webkit-overflow-scrolling: touch;
  }

  /* 侧边栏 → 底部导航栏 */
  .sidebar {
    order: 2;
    width: 100%;
    min-width: 0;
    flex-direction: row;
    padding: 0;
    overflow: visible;
    border-top: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
  }
  .brand, .side-note { display: none; }
  nav {
    flex-direction: row;
    width: 100%;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    gap: 2px;
  }
  .nav {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 10px;
    line-height: 1.3;
    padding: 6px 1px;
    white-space: normal;
    overflow: hidden;
  }
  .nav:hover { transform: none; }
  .nav.active::before {
    left: 20%; right: 20%; width: auto;
    top: -6px; bottom: auto; height: 3px;
    border-radius: 0 0 3px 3px;
  }

  /* 右上角控件更紧凑 */
  #topRightControls { top: 8px; right: 8px; gap: 6px; }
  .tr-label { display: none; }
  .tr-btn { padding: 6px 10px; font-size: 12px; }

  /* 表单/搜索行改单列 */
  .search-row, .search-row:has(select) { grid-template-columns: 1fr; }
  .advisor-row button { min-height: 46px; }
  .calc-form { flex-wrap: wrap; }
  .calc-form input { min-width: 0; flex: 1 1 140px; }

  /* 标签行横向滚动，不换行堆叠 */
  .subtabs, .local-tabs, .news-filters, .sector-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }
  .subtabs::-webkit-scrollbar, .local-tabs::-webkit-scrollbar,
  .news-filters::-webkit-scrollbar, .sector-tabs::-webkit-scrollbar { display: none; }
  .subtab, .local-tab, .chip, .sector-tab { flex-shrink: 0; }

  .topbar { flex-wrap: wrap; margin-bottom: 16px; }
  .topbar h2 { font-size: 19px; }

  .sector-summary { flex-wrap: wrap; }
  .stat-pill { min-width: 90px; }
  .local-form-grid { grid-template-columns: 1fr; }
  .overview-hero { padding: 20px 16px 16px; gap: 14px; }
  .overview-flag { font-size: 48px; }
  .overview-country-name { font-size: 22px; }
  .stats-grid { padding: 0 8px 16px; gap: 10px; }
  .overview-section { padding: 0 8px 16px; }

  /* 弹窗 */
  .modal-box { padding: 22px 20px; }

  /* 图表高度收窄 */
  #marketChart { height: 300px !important; }
}

@media (max-width: 480px) {
  main { padding: 56px 10px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid, .sector-grid, .local-listings { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: repeat(2, 1fr); }
  .quote .price { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   深色科技主题 · 总覆盖层（置于文件末尾，优先级最高）
   ═══════════════════════════════════════════════════════════ */

/* ── 侧边栏融入深空背景 ── */
.sidebar {
  background: linear-gradient(180deg, #0a1426 0%, #081120 60%, #060d1a 100%);
  border-right: 1px solid var(--line);
}
.brand h1 { text-shadow: 0 0 14px rgba(var(--primary-rgb), 0.35); }
.mark { box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.35); }

/* ── 实色主按钮：霓虹底 + 深色文字（白字在霓虹上看不清） ── */
button { color: #041018; }
button.ghost { color: var(--primary); }
.nav { color: #9fb8cc; }
.nav:hover { color: #e8edf3; }
.subtab.active, .sector-tab.active, .local-tab.active, .tax-type-btn.active,
.chip.active, .symbol-btn.active, .period-btn.active,
.tr-menu .lang-btn.active, .auth-submit, .step-num {
  color: #041018;
}
.chip-btn { color: var(--primary); }
.chip-btn:hover { background: var(--primary); color: #041018; }
.user-btn { color: var(--primary); }
.user-btn:hover { background: var(--primary); color: #041018; }
.pager button { color: var(--primary); }
.news-expand-btn { color: var(--primary); background: transparent; }
.deduct-toggle { color: var(--primary); }
.modal-tab { background: transparent; }
.modal-close { background: transparent; }
.lc-del { background: transparent; }

/* ── 徽章 ── */
.badge { background: var(--panel-2); color: var(--sub); }
.badge-green { background: rgba(0,224,139,0.15); color: #33f0ad; }
.badge-orange { background: rgba(255,193,77,0.15); color: #ffc14d; }

/* ── 卡片玻璃质感 + 霓虹描边悬停 ── */
.card, .sector-card, .news-card, .listing-card, .quote, .chart-panel,
.watchlist-panel, .tax-calc-panel, .status-box, .local-post-form,
.guide-step, .stat-card, .info-card, .attraction-card, .skeleton-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0) 40%), var(--panel);
}
.card:hover, .sector-card:hover, .news-card:hover, .listing-card:hover, .quote:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 0 22px rgba(var(--primary-rgb), 0.12), 0 12px 32px rgba(0,0,0,0.45);
}

/* ── 数字发光（KPI/行情） ── */
.stat-num, .stat-value, .quote .price {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(var(--primary-rgb), 0.3);
}
.topbar h2 { text-shadow: 0 0 18px rgba(var(--primary-rgb), 0.2); }

/* ── 表格/税单深色 ── */
.total-row td { background: rgba(255,193,77,0.10); color: #ffd27a; }
.landed-row td { background: rgba(0,224,139,0.10); }
.tax-result { border-color: rgba(var(--primary-rgb), 0.3); }
.tax-result .row { border-bottom-color: rgba(var(--primary-rgb), 0.15); }
.tax-panel-header { background: #0a1426; border-bottom: 1px solid var(--line); }

/* ── 提示/横幅 ── */
.import-banner.import-ban { background: rgba(231,76,60,0.12); border-left: 4px solid #ff5d5d; color: #ffa8a0; }
.import-banner.import-ok  { background: rgba(0,224,139,0.10); border-left: 4px solid #00e08b; color: #7ceec0; }
.guide-tip { color: #ffd27a; }
.online-notice { border-color: rgba(255,193,77,0.4); color: #ffc14d; }
.deduct-notice { background: rgba(255,193,77,0.08); }

/* ── 骨架屏深色微光 ── */
.skeleton-line {
  background: linear-gradient(90deg, var(--panel-2) 25%, #21304e 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
}

/* ── 弹窗 ── */
.modal-overlay { background: rgba(2,6,14,0.7); backdrop-filter: blur(4px); }
.modal-box { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.1), 0 24px 64px rgba(0,0,0,0.6); }

/* ── 实名徽章 ── */
.lc-verified { color: #33f0ad; background: rgba(0,224,139,0.12); border-color: rgba(0,224,139,0.35); }

/* ── Toast ── */
.toast { background: #17233c; border: 1px solid var(--line); }
.toast.success { background: #0b3524; border-color: rgba(0,224,139,0.4); }
.toast.error { background: #3c1520; border-color: rgba(255,93,93,0.4); }

/* ── 输入框 ── */
input, select, textarea { background: rgba(10,18,34,0.7); }
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18), 0 0 16px rgba(var(--primary-rgb), 0.12);
}

/* ═══════════════════════════════════════
   全球驾驶舱：左资讯 · 中3D地球 · 右行情
   ═══════════════════════════════════════ */
#view-market-news { max-width: 1500px; }
.cockpit {
  display: grid;
  grid-template-columns: 310px 1fr 270px;
  gap: 14px;
  height: calc(100vh - 190px);
  min-height: 460px;
}
/* 贾维斯全息面板：半透明玻璃 + 青色光边 + 四角标记 */
.cockpit-col {
  position: relative;
  background: linear-gradient(180deg, rgba(0,229,255,0.045), rgba(10,18,34,0.38) 45%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,229,255,0.22);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(0,229,255,0.045), 0 0 20px rgba(0,229,255,0.06);
  overflow-y: auto;
  overflow-x: hidden;
}
.cockpit-col::before, .cockpit-col::after,
.cockpit-globe-wrap::before, .cockpit-globe-wrap::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 6;
}
.cockpit-col::before, .cockpit-globe-wrap::before {
  top: -1px; left: -1px;
  border-top: 2px solid rgba(0,229,255,0.75);
  border-left: 2px solid rgba(0,229,255,0.75);
  border-top-left-radius: var(--radius);
}
.cockpit-col::after, .cockpit-globe-wrap::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid rgba(0,229,255,0.75);
  border-right: 2px solid rgba(0,229,255,0.75);
  border-bottom-right-radius: var(--radius);
}
.cockpit-col::-webkit-scrollbar { width: 6px; }
.cockpit-col::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.25); border-radius: 3px; }
.cockpit-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(7,16,30,0.45);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,229,255,0.22);
  text-shadow: 0 0 12px rgba(0,229,255,0.35);
  letter-spacing: 1px;
}
.cp-reset {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--primary-2);
  color: var(--primary);
}
.cp-news-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31,48,80,0.5);
  border-left: 2px solid transparent;
  cursor: default;
  transition: background 0.15s, border-color 0.15s;
}
.cp-news-item:hover { background: rgba(var(--primary-rgb), 0.06); border-left-color: var(--primary); }
.cp-news-title { font-size: 12.5px; line-height: 1.55; color: var(--text); }
.cp-news-meta { margin-top: 4px; font-size: 10.5px; color: var(--sub); }
.cp-news-empty { padding: 24px 14px; text-align: center; font-size: 12px; color: var(--sub); }

.cockpit-globe-wrap {
  position: relative;
  border: 1px solid rgba(0,229,255,0.16);
  border-radius: var(--radius);
  background: radial-gradient(560px 440px at 50% 46%, rgba(0,229,255,0.05), transparent 72%);
  overflow: hidden;
}
#globe3d { position: absolute; inset: 0; }
.cockpit-globe-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  color: #7fd8e8;
  background: rgba(7,16,30,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 14px;
  padding: 4px 14px;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(0,229,255,0.4);
}
.holo-tip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  font-size: 12px;
  color: #bfefff;
  background: rgba(7,16,30,0.85);
  border: 1px solid rgba(0,229,255,0.45);
  border-radius: 6px;
  padding: 5px 10px;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(0,229,255,0.25);
}
.holo-tip.hidden { display: none; }
.cp-quote {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31,48,80,0.5);
}
.cp-quote-name { font-size: 11.5px; color: var(--sub); }
.cp-quote-price {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
  text-shadow: 0 0 12px rgba(var(--primary-rgb), 0.25);
}
.cp-quote-chg { font-size: 11px; font-weight: 700; }

@media (max-width: 1150px) {
  .cockpit { grid-template-columns: 260px 1fr 230px; }
}
@media (max-width: 860px) {
  .cockpit {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .cockpit-globe-wrap { order: 1; height: 320px; }
  .cockpit-news { order: 2; max-height: 340px; }
  .cockpit-market { order: 3; max-height: 300px; }
  .cp-quote { display: flex; align-items: baseline; gap: 10px; }
  .cp-quote-name { flex: 1; }
  .cp-quote-price { font-size: 15px; }
}

/* ═══════════════════════════════════════
   语音助手：悬浮麦克风 + 状态条
   ═══════════════════════════════════════ */
.voice-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.95), rgba(var(--primary-rgb), 0.55));
  border: 1px solid rgba(var(--primary-rgb), 0.6);
  box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.45), 0 8px 24px rgba(0,0,0,0.5);
}
.voice-fab:hover { transform: scale(1.06); opacity: 1; }
.voice-fab:active { transform: scale(0.97); }
.voice-fab.off { filter: grayscale(0.85); opacity: 0.55; }
@keyframes voicePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,107,0.55), 0 0 24px rgba(255,107,107,0.5); }
  70%  { box-shadow: 0 0 0 20px rgba(255,107,107,0), 0 0 24px rgba(255,107,107,0.5); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,107,0), 0 0 24px rgba(255,107,107,0.5); }
}
.voice-fab.rec {
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #d63030);
  border-color: rgba(255,107,107,0.7);
  animation: voicePulse 1.2s ease-out infinite;
}
.voice-status {
  position: fixed;
  right: 24px;
  bottom: 94px;
  z-index: 1200;
  max-width: 340px;
  background: rgba(13,22,40,0.94);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
}
.voice-status.rec { border-color: rgba(255,107,107,0.6); }
.voice-status.busy, .voice-status.speak { border-color: rgba(var(--primary-rgb), 0.5); }
.voice-status.ok { border-color: rgba(var(--primary-rgb), 0.5); color: #bfe8d8; }
.voice-status.hidden { display: none; }

@media (max-width: 860px) {
  .voice-fab {
    right: 14px;
    bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    font-size: 21px;
  }
  .voice-status {
    right: 14px;
    left: 14px;
    max-width: none;
    bottom: calc(var(--nav-h) + 80px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════
   阿姆哈拉语（Ge'ez 文字）排版
   ═══════════════════════════════════════ */
body.lang-am,
body.lang-am input, body.lang-am textarea, body.lang-am select, body.lang-am button {
  font-family: -apple-system, "Noto Sans Ethiopic", "Kefa", "Abyssinica SIL",
               BlinkMacSystemFont, "PingFang SC", sans-serif;
}
body.lang-am { line-height: 1.65; }
body.lang-am .answer { line-height: 2.0; }
body.lang-am .nav, body.lang-am .subtab { letter-spacing: 0; }

/* 新闻原文链接 */
.news-link { color: inherit; text-decoration: none; }
.news-link:hover { color: var(--primary); text-decoration: underline; }
.cp-clickable { cursor: pointer; }

/* ═══ 驾驶舱跑马灯（贾维斯风） ═══ */
.cockpit-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
  height: 38px;
  border: 1px solid rgba(0,229,255,0.22);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0,229,255,0.07), rgba(10,18,34,0.4));
  overflow: hidden;
}
.cockpit-ticker.hidden { display: none; }
.ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: #ffc14d;
  border-right: 1px solid rgba(0,229,255,0.22);
  text-shadow: 0 0 10px rgba(255,193,77,0.5);
  white-space: nowrap;
}
.ticker-track { flex: 1; overflow: hidden; }
.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: tickerScroll var(--ticker-secs, 60s) linear infinite;
  font-size: 12.5px;
  color: #9fd8e8;
}
.ticker-track:hover .ticker-content { animation-play-state: paused; }
.ticker-content a { color: inherit; text-decoration: none; }
.ticker-content a:hover { color: var(--primary); }
.ticker-sep { color: rgba(0,229,255,0.5); margin: 0 18px; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ═══ 自动播放引导弹窗 ═══ */
.autoplay-box { width: 460px; max-height: 82vh; overflow-y: auto; }
.ap-title { margin: 0 0 14px; font-size: 17px; text-shadow: 0 0 14px rgba(var(--primary-rgb), 0.3); }
.ap-body { font-size: 13px; line-height: 1.8; color: var(--text); }
.ap-body h5 {
  margin: 14px 0 6px;
  font-size: 13.5px;
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: 8px;
}
.ap-body h5:first-child { margin-top: 0; }
.ap-body ol { margin: 4px 0 8px; padding-left: 22px; }
.ap-body li { margin: 3px 0; }
.ap-body .ap-tip {
  background: var(--gold-2);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 12.5px;
  color: #ffd27a;
}
.ap-nomore {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 10px;
  font-size: 12.5px;
  color: var(--sub);
  cursor: pointer;
}
.ap-nomore input { accent-color: var(--primary); }
.voice-status.rec { cursor: pointer; }

/* 土耳其主题（新月红） */
body.country-tr { --primary: #ff4a55; --primary-2: rgba(255,74,85,0.12); --gold: #ffc14d; --primary-rgb: 255,74,85; }
body.country-tr .nav.active { background: rgba(255,74,85,0.22); color: #ff9aa0; }
body.country-tr .nav.active::before { background: #ff9aa0; }
body.country-tr .mark { background: linear-gradient(135deg, #e30a17, #ff8a5c); }
body.country-tr .subtab.active { background: #c62834; border-color: #c62834; }
body.country-tr .tr-menu .lang-btn.active { background: #c62834; }

/* 哈萨克斯坦主题（青金） */
body.country-kz { --primary: #27c8dd; --primary-2: rgba(39,200,221,0.12); --gold: #ffd24d; --primary-rgb: 39,200,221; }
body.country-kz .nav.active { background: rgba(39,200,221,0.22); color: #7fe2f0; }
body.country-kz .nav.active::before { background: #7fe2f0; }
body.country-kz .mark { background: linear-gradient(135deg, #00afca, #ffd24d); }
body.country-kz .subtab.active { background: #1b98ab; border-color: #1b98ab; }
body.country-kz .tr-menu .lang-btn.active { background: #1b98ab; }

/* ═══ 海关 AI 引导式归类对话 ═══ */
.customs-ai-chat {
  margin: 0 0 14px; padding: 14px; max-height: 460px; overflow-y: auto;
  background: linear-gradient(180deg, rgba(0,229,255,0.04), rgba(10,18,34,0.35));
  border: 1px solid rgba(0,229,255,0.2); border-radius: var(--radius);
}
.customs-ai-chat.hidden { display: none; }
.cg-msg { margin: 6px 0; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.7; max-width: 88%; }
.cg-user { background: var(--primary); color: #041018; margin-left: auto; border-bottom-right-radius: 4px; }
.cg-ai { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cg-ai .answer.md { background: transparent; border: none; padding: 0; }

/* ═══ 新手引导浮层 ═══ */
.onboard-overlay {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: rgba(4,8,18,0.82); backdrop-filter: blur(6px); animation: fadeIn .3s ease;
}
.onboard-card {
  width: min(520px, 92vw); padding: 30px 28px; border-radius: 18px;
  background: linear-gradient(165deg, rgba(14,24,44,0.98), rgba(8,14,28,0.98));
  border: 1px solid rgba(0,229,255,0.3); box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(0,229,255,0.08);
}
.onboard-title { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.onboard-sub { color: var(--sub); font-size: 13.5px; margin-bottom: 18px; }
.onboard-feats { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.onboard-feat { display: flex; gap: 12px; align-items: flex-start; }
.onboard-feat > span { font-size: 26px; line-height: 1.2; }
.onboard-feat b { font-size: 14.5px; }
.onboard-feat p { margin: 3px 0 0; color: var(--sub); font-size: 12.5px; line-height: 1.6; }
.onboard-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.onboard-go {
  flex: 1; min-width: 180px; padding: 12px 18px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: #041018; font-weight: 800; font-size: 14.5px;
}
.onboard-skip {
  padding: 12px 16px; border-radius: 10px; cursor: pointer; font-size: 13.5px;
  background: transparent; border: 1px solid var(--line); color: var(--sub);
}

/* ═══ 资讯 AI 解读 ═══ */
.news-ai-btn {
  margin-left: auto; padding: 3px 10px; border-radius: 20px; cursor: pointer; font-size: 12px;
  background: rgba(0,229,255,0.12); border: 1px solid rgba(0,229,255,0.35); color: var(--primary); font-weight: 700;
}
.news-ai-btn:hover { background: rgba(0,229,255,0.22); }
.ni-overlay {
  position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center;
  background: rgba(4,8,18,0.8); backdrop-filter: blur(5px); padding: 20px;
}
.ni-card {
  width: min(680px, 96vw); max-height: 88vh; overflow-y: auto; padding: 22px 24px; border-radius: 16px;
  background: linear-gradient(165deg, rgba(14,24,44,0.99), rgba(8,14,28,0.99));
  border: 1px solid rgba(0,229,255,0.28); box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.ni-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ni-title { font-size: 17px; font-weight: 800; }
.ni-close { background: none; border: none; color: var(--sub); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.ni-article { font-size: 14px; color: var(--sub); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.ni-src { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.ni-body .answer.md { background: transparent; border: none; padding: 0; }
.ni-disclaimer { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: rgba(200,146,26,0.1); border: 1px solid rgba(200,146,26,0.3); color: var(--gold); font-size: 12.5px; line-height: 1.6; }
.ni-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ═══ 实时连续对话 FAB（叠在麦克风上方）═══ */
.voice-fab-rt {
  bottom: 92px;              /* 麦克风(58px高+24px底)之上 */
  width: 50px; height: 50px; font-size: 21px;
  right: 28px;
  background: radial-gradient(circle at 30% 30%, rgba(122,90,248,0.95), rgba(122,90,248,0.55));
  border-color: rgba(122,90,248,0.6);
  box-shadow: 0 0 20px rgba(122,90,248,0.4), 0 8px 20px rgba(0,0,0,0.5);
}
@keyframes rtPulse {
  0%   { box-shadow: 0 0 0 0 rgba(122,90,248,0.55), 0 0 20px rgba(122,90,248,0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(122,90,248,0), 0 0 20px rgba(122,90,248,0.5); }
  100% { box-shadow: 0 0 0 0 rgba(122,90,248,0), 0 0 20px rgba(122,90,248,0.5); }
}
.voice-fab-rt.active {
  background: radial-gradient(circle at 30% 30%, #9b7bff, #6a3ff0);
  animation: rtPulse 1.4s ease-out infinite;
}

/* ═══ 顾问多轮上下文提示条 ═══ */
.advisor-ctx {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 7px 12px; border-radius: 10px; font-size: 12.5px; color: var(--sub);
  background: rgba(0,229,255,0.06); border: 1px dashed rgba(0,229,255,0.3);
}
.advisor-ctx.hidden { display: none; }
.adv-ctx-clear {
  margin-left: auto; padding: 3px 10px; border-radius: 14px; cursor: pointer; font-size: 12px;
  background: transparent; border: 1px solid var(--line); color: var(--sub);
}
.adv-ctx-clear:hover { color: var(--primary); border-color: var(--primary); }

/* ═══ 店主经验库 ═══ */
.exp-box { border-color: rgba(255,196,0,0.25); }
.exp-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.exp-form-row { display: flex; gap: 10px; }
.exp-form input, .exp-form textarea, .exp-form select {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; color: var(--fg); font-size: 13.5px; font-family: inherit;
}
.exp-form textarea { resize: vertical; line-height: 1.7; }
.exp-form button {
  align-self: flex-start; padding: 9px 22px; border-radius: 8px; cursor: pointer; font-weight: 700;
  background: linear-gradient(135deg, rgba(255,196,0,0.85), rgba(255,150,0,0.75)); border: none; color: #221a00;
}
.exp-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.exp-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exp-item-preview { font-size: 12.5px; color: var(--sub); margin-top: 5px; line-height: 1.6; }
.exp-del { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 14px; opacity: 0.6; }
.exp-del:hover { opacity: 1; }
.exp-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700;
  background: rgba(255,196,0,0.15); border: 1px solid rgba(255,196,0,0.4); color: #ffc400;
}

/* 经验库锁定态 */
.exp-lock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed rgba(255,196,0,0.4); border-radius: 10px; font-size: 13px; color: var(--sub); }
.exp-lock input { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; color: var(--fg); width: 180px; }
.exp-lock button { padding: 7px 18px; border-radius: 8px; cursor: pointer; font-weight: 700; background: rgba(255,196,0,0.2); border: 1px solid rgba(255,196,0,0.5); color: #ffc400; }
.exp-lock.hidden, #expPanel.hidden { display: none; }

/* ═══ 资讯页置顶汇率条(HornAdvisor) ═══ */
.fx-bar {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(10,18,34,0.6));
  border: 1px solid rgba(0,229,255,0.25);
}
.fx-item { display: flex; align-items: baseline; gap: 8px; }
.fx-flag { font-size: 18px; }
.fx-pair { font-weight: 800; font-size: 13px; color: var(--sub); }
.fx-rate { font-size: 22px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.fx-note { font-size: 11.5px; color: var(--sub); }

/* ═══ 单据翻译生成 ═══ */
.docgen-panel { margin: 4px 0 14px; padding: 16px; border-radius: 12px; background: rgba(255,196,0,0.05); border: 1px solid rgba(255,196,0,0.25); }
.docgen-panel.hidden { display: none; }
.docgen-head { display: flex; align-items: center; justify-content: space-between; }
.docgen-panel textarea { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--fg); font-size: 13px; line-height: 1.7; font-family: inherit; resize: vertical; }
.docgen-panel select { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--fg); }
#docGenRun { margin-top: 10px; padding: 9px 22px; border-radius: 8px; cursor: pointer; font-weight: 700; background: linear-gradient(135deg,rgba(255,196,0,.85),rgba(255,150,0,.75)); border: none; color: #221a00; }
.docgen-actions { display: flex; gap: 10px; margin: 12px 0; }
.doc-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }
.doc-tables { background: #fff; color: #111; padding: 16px; border-radius: 8px; overflow-x: auto; }
.doc-tables h3 { color: #111; font-size: 14px; margin: 14px 0 4px; }
.doc-tables table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.doc-tables th, .doc-tables td { border: 1px solid #999; padding: 4px 7px; text-align: left; }
.doc-tables .total-row td { background: #f0f0f0; }
.doc-tables .doc-meta-grid { color: #333; }

/* 报关记录管理 */
.decl-box { border-color: rgba(0,229,255,0.25); }
.decl-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decl-file-row label { cursor: pointer; }
.decl-view { text-decoration: none; }
