/* tanker.css — Tanker BD Tool 全局视觉系统（macOS 风格） */
:root {
  --font: "Source Han Sans SC", "Source Han Sans CN", "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --menubar-h: 52px;

  --accent: #2f6df6;
  --accent-hover: #1d5bd4;
  --accent-soft: #eef3ff;
  --ink: #14171e;
  --ink-2: #3a4256;
  --ink-3: #6b7689;
  --line: #e5e7eb;
  --line-soft: #f0f2f5;
  --paper: #ffffff;
  --bg: #f4f7fc;
  --ok: #1f9d57;
  --ok-soft: #e7f6ee;
  --bad: #d23b3b;
  --bad-soft: #fdeaea;
  --warn: #c97a00;
  --warn-soft: #fff5e6;
  --mut: #6b7689;

  /* 旧页面变量别名，保证 admin/config/team 平滑过渡 */
  --pri: var(--accent);
  --card: var(--paper);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

input, select, textarea, button { font-family: inherit; font-size: inherit; }
input::placeholder, textarea::placeholder { color: #b0b0b0; font-style: italic; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部菜单栏 ===== */
.menubar,
body > header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: rgba(20, 22, 28, .78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  color: #f3f4f7;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.menubar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.menubar .nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.menubar .nav a,
.menubar .nav button {
  color: #f3f4f7;
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 7px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: .9;
}

.menubar .nav a:hover,
.menubar .nav button:hover,
body > header > a:hover {
  background: rgba(255, 255, 255, .14);
  opacity: 1;
  text-decoration: none;
}

.menubar h1,
body > header h1 {
  font-size: 15px;
  margin: 0;
  font-weight: 700;
  color: #fff;
}

.menubar .muted,
body > header .muted {
  color: rgba(255, 255, 255, .72);
}

body > header > a,
body > header > button {
  color: #f3f4f7;
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 7px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: .9;
  text-decoration: none;
}

.menubar .spacer { flex: 1; }
.menubar .status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #e5e7eb;
}

/* ===== 布局 ===== */
.app { min-height: calc(100vh - var(--menubar-h)); display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.wrap-narrow { max-width: 520px; }
.page { flex: 1; }

/* ===== 登录/注册分屏 ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
}

.auth-visual {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background:
    radial-gradient(120% 120% at 18% 12%, #eaf1ff 0%, rgba(234, 241, 255, 0) 45%),
    radial-gradient(120% 120% at 85% 88%, #fdeaf3 0%, rgba(253, 234, 243, 0) 50%),
    linear-gradient(135deg, #f4f7fc 0%, #e9eef7 55%, #eef2f8 100%);
}

.auth-visual .globe {
  width: min(420px, 70%);
  height: auto;
  color: var(--accent);
  opacity: .9;
}

.auth-slogan {
  margin-top: 28px;
  text-align: center;
}

.auth-slogan h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
}

.auth-slogan p {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}

.auth-panel {
  width: min(520px, 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}

@media (max-width: 840px) {
  .auth-page { flex-direction: column; }
  .auth-visual { min-height: 240px; padding: 28px; }
  .auth-panel { width: 100%; padding: 28px; }
}

/* ===== 卡片 ===== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.card > h2,
.card > h3,
.card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.card p { margin: 0 0 12px; }

/* ===== 表单 ===== */
.field { margin: 16px 0; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .15s;
}

input:focus,
select:focus,
textarea:focus { border-color: var(--ink-2); }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--ink-2); }

.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }

/* ===== 按钮 ===== */
button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: background .15s, transform .05s;
}

button:hover { background: #333; }
button:active { transform: scale(.98); }
button:disabled { opacity: .5; cursor: not-allowed; }

button.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.ghost:hover { background: var(--line-soft); }

button.danger {
  background: #fff;
  color: var(--bad);
  border: 1px solid #f0c2c2;
}

button.danger:hover { background: var(--bad-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s, opacity .15s;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid #f0c2c2; }
.btn-danger:hover { background: var(--bad-soft); }

/* ===== 行/工具类 ===== */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.text-right { text-align: right; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

td.acts { white-space: nowrap; }

/* ===== 标签/徽章 ===== */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-2);
}

.pill.on { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: var(--bad-soft); color: var(--bad); }

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef1f5;
  color: #46505c;
  margin: 2px 4px 2px 0;
}

.tag.on { background: #e6f6ec; color: var(--ok); }
.tag.off { background: #fdeaea; color: var(--bad); }

/* ===== 提示消息 ===== */
.msg {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  display: none;
  font-size: 13px;
}

.msg.bad { display: block; background: var(--bad-soft); color: var(--bad); }
.msg.ok { display: block; background: var(--ok-soft); color: var(--ok); }
.msg.warn { display: block; background: var(--warn-soft); color: var(--warn); }

/* ===== 仪表盘搜索 ===== */
.hero-search {
  max-width: 760px;
  margin: 32px auto 24px;
  text-align: center;
}

.hs-title {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 12px;
  letter-spacing: .05em;
  font-weight: 500;
}

.hs-row {
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(20, 23, 30, .12);
  border: 1px solid rgba(255, 255, 255, .75);
}

.hs-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 9px;
  background: var(--line-soft);
}

.hs-select {
  border: none;
  outline: none;
  padding: 11px 8px;
  font-size: 13px;
  border-radius: 9px;
  background: var(--line-soft);
  color: var(--ink-2);
  cursor: pointer;
  max-width: 150px;
}

.hs-go {
  border: none;
  background: var(--ink);
  color: #fff;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
}

.hs-go:hover { background: #333; }
.hs-hint { margin-top: 13px; font-size: 12px; color: var(--ink-3); }

/* ===== 结果/内容卡片 ===== */
.res {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.res .title { font-weight: 700; font-size: 14px; color: var(--ink); }
.res .url { color: var(--accent); font-size: 12px; word-break: break-all; font-family: var(--mono); }
.res .snip { margin: 6px 0; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.res .acts { display: flex; gap: 8px; margin-top: 10px; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--line-soft);
  padding: 12px;
  border-radius: 10px;
  max-height: 260px;
  overflow: auto;
  font-size: 12.5px;
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal.open { display: flex; }

.modal-box {
  background: #fff;
  width: min(640px, 92vw);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.modal-box h3 { margin: 0 0 12px; }

/* ===== 业务组件 ===== */
.bal { font-size: 26px; font-weight: 700; }
.qr { max-width: 220px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.note {
  white-space: pre-wrap;
  background: var(--line-soft);
  padding: 12px;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 13px;
}

.gift {
  background: var(--accent-soft);
  color: #1b4bb8;
  padding: 10px 13px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 13px;
}

.empty-state {
  text-align: center;
  color: var(--ink-3);
  padding: 60px 20px;
  font-size: 13px;
}
