/* ================= 拉卡拉快速查询 · 样式 ================= */
:root {
  --primary: #0b5fbe;
  --primary-dark: #084a96;
  --accent: #00a0e9;
  --bg: #eef3fa;
  --card: #ffffff;
  --ink: #16233a;
  --ink-2: #4a5a72;
  --ink-3: #8494aa;
  --line: #dfe8f4;
  --mark: #fff3c4;
  --ok: #0f9d58;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 42, 78, .05), 0 8px 24px rgba(16, 42, 78, .07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
               "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部 ---------- */
.topbar {
  background: linear-gradient(120deg, #0b5fbe 0%, #1478d4 55%, #00a0e9 100%);
  color: #fff;
  padding: 18px 20px 16px;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: #7fd4ff;
  box-shadow: 0 0 0 4px rgba(127, 212, 255, .22);
  flex: none;
}
.title { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.subtitle { font-size: 12.5px; opacity: .82; margin-left: auto; }

/* ---------- 主体 ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* ---------- 页签 ---------- */
.tabs {
  display: flex;
  gap: 8px;
  background: #dfe9f6;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(16, 42, 78, .14);
}

/* ---------- 搜索框 ---------- */
.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 6px 0 14px;
  margin-bottom: 10px;
}
.searchbox:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 160, 233, .14), var(--shadow);
}
.search-icon { width: 17px; height: 17px; flex: none; opacity: .5; }
.searchbox input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15.5px;
  font-family: inherit;
  color: var(--ink);
  padding: 14px 10px;
  min-width: 0;
}
.searchbox input::placeholder { color: var(--ink-3); font-size: 14px; }
.clear-btn {
  border: 0; background: #eef3fa; color: var(--ink-2);
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: 15px; line-height: 1;
  display: none; flex: none;
}
.clear-btn.show { display: block; }
.btn-copy-all {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  margin-right: 6px;
  flex: none;
}
.btn-copy-all:hover { border-color: var(--accent); color: var(--primary); }

/* ---------- 工具行 ---------- */
.toolrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.toolrow select {
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 260px;
}
.count-badge {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.hint { color: var(--ink-3); }
.hint kbd {
  background: #fff; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; font-size: 11px; font-family: inherit;
}

/* ---------- 结果区 ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 240px;
}

.state {
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.9;
}
.state strong { color: var(--ink-2); }

.loadbar {
  height: 3px;
  background: #e6eefa;
  overflow: hidden;
}
.loadbar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .2s;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f9fe;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f5fb;
  vertical-align: top;
}
tbody tr:hover { background: #f7fbff; }
tbody tr:last-child td { border-bottom: 0; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 13px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.num-main { color: var(--primary); font-weight: 600; }
.name { font-weight: 600; color: var(--ink); line-height: 1.55; }
.sub { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }

.chip {
  display: inline-block;
  background: #eef4fd;
  color: #3f6ba8;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11.5px;
  white-space: nowrap;
}
.chip.lv1 { background: #e7f0fd; color: #1f5ba8; }
.chip.lv2 { background: #e8f7ef; color: #16794f; }
.chip.lv3 { background: #fdf2e6; color: #9a5a10; }

/* 外汇局管控 */
.chip.fx-open  { background: #e8f7ef; color: #16794f; }
.chip.fx-limit { background: #fdf2e6; color: #9a5a10; }
.chip.fx-ban   { background: #fdeaea; color: #b3261e; }

/* 地区状态 */
.chip.st-ok  { background: #e8f7ef; color: #16794f; }
.chip.st-his { background: #eef1f6; color: #7b8798; }

.sub.note {
  color: #9a5a10;
  background: #fdf7ec;
  border-left: 2px solid #e8c48a;
  padding: 2px 6px;
  margin-top: 5px;
  border-radius: 0 4px 4px 0;
}

.copy {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.copy:hover { border-color: var(--accent); color: var(--primary); }
.copy.done { border-color: var(--ok); color: var(--ok); }

.col-act { width: 66px; text-align: right; }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 30px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.9;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .subtitle { display: none; }
  .title { font-size: 16.5px; }
  .wrap { padding: 14px 12px 32px; }
  .tab { font-size: 13px; padding: 9px 4px; }
  thead { display: none; }
  tbody tr {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  tbody tr:last-child { border-bottom: 0; }
  tbody td {
    display: block;
    padding: 0;
    border: 0;
    margin-bottom: 5px;
  }
  tbody td:last-child { margin-bottom: 0; }
  .col-act { width: auto; text-align: left; }
  .mono { font-size: 13.5px; }
}
