/* =========================================================================
   DNS 云解析分发平台 · 设计系统
   Light theme · 主色 #2b6cff · 卡片式 · 8px 栅格
   ========================================================================= */

:root {
  --primary: #2b6cff;
  --primary-dark: #1b53d6;
  --primary-soft: #eef3ff;
  --primary-line: #cfdcff;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --line: #e6eaf2;
  --line-strong: #d6dce8;

  --text: #101828;
  --text-2: #475467;
  --text-3: #8b95a7;

  --green: #0f9d58;
  --green-soft: #e8f8ef;
  --red: #e5484d;
  --red-soft: #fdeced;
  --amber: #b25e09;
  --amber-soft: #fdf3e3;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08), 0 2px 6px rgba(16, 24, 40, .04);
  --sidebar-w: 232px;
  --topbar-h: 62px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

::selection { background: #d9e5ff; }

/* ------------------------------- 布局 ------------------------------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2b6cff, #6a4bff);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(43, 108, 255, .28);
  flex: 0 0 auto;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label {
  font-size: 11px; color: var(--text-3); padding: 12px 10px 6px;
  letter-spacing: .04em; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; cursor: pointer;
  transition: background .14s, color .14s;
  border: 0; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .78; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}

.sidebar-foot {
  margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px;
}
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.mode-dot.live { background: var(--primary); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; position: sticky; top: 0; z-index: 15;
}
.topbar h1 { font-size: 16px; font-weight: 620; }
.topbar .crumb { font-size: 12px; color: var(--text-3); }
.crumb-bar { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.crumb-app { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--line-strong); }
.crumb-bar .crumb { font-size: 13.5px; color: var(--text-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.credit-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff8e8; border: 1px solid #f7e2b8; color: #8a5a00;
  padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.credit-pill svg { width: 14px; height: 14px; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-size: 13px; font-weight: 650;
  border: 1px solid var(--primary-line); text-transform: uppercase;
}

.page { padding: 22px 24px 48px; max-width: 1320px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 19px; letter-spacing: -.02em; }
.page-desc { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.page-head .spacer { margin-left: auto; }

/* ------------------------------- 卡片 ------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 14px; font-weight: 620; }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

.note {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2); font-size: 12.5px;
  padding: 9px 12px; border-radius: var(--radius-sm);
}
.note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--text-3); }

/* ------------------------------ 统计卡 ------------------------------ */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--primary); opacity: .55;
}
.stat.blue::after { background: #2b6cff; }
.stat.green::after { background: var(--green); }
.stat.red::after { background: var(--red); }
.stat.amber::after { background: #e0a020; }
.stat-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-label svg { width: 14px; height: 14px; }
.stat-value {
  font-size: 30px; font-weight: 680; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; margin-top: 6px; line-height: 1.15;
}
.stat-value.blue { color: #2b6cff; }
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }
.stat-value.amber { color: var(--amber); }
.stat-value.small { font-size: 21px; letter-spacing: -.01em; }
.stat-hint { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.stat.alert { border-color: #f6c9cb; background: linear-gradient(180deg, #fff, #fff8f8); }

/* ------------------------------- 按钮 ------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-2); font-size: 13px; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: .15s;
  font-weight: 500;
}
.btn:hover { background: var(--surface-2); border-color: #c3ccdd; color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(43,108,255,.24); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #f3c3c5; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #e9a9ac; color: #b4272c; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-link {
  background: none; border: 0; padding: 0; color: var(--primary);
  font: inherit; cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }

/* ------------------------------- 表单 ------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.hint { font-size: 11.5px; color: var(--text-3); }

.input, .select, .textarea {
  height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font: inherit; font-size: 13px;
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.textarea { height: auto; min-height: 92px; padding: 10px 11px; resize: vertical; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 108, 255, .12);
}
.input::placeholder, .textarea::placeholder { color: #a7b0c0; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a7' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }

.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline .input, .inline .select { width: auto; min-width: 150px; }

.checkbox { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }

/* ------------------------------- 表格 ------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 550; color: var(--text-3); font-size: 12px;
  padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #f0f2f7; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfe; }
.table .num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.table .muted { color: var(--text-3); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 开关（管理端「显示」等布尔项） */
.switch {
  position: relative; width: 38px; height: 22px; padding: 0;
  border-radius: 11px; border: 0; background: #e3e8f0; cursor: pointer;
  transition: background .18s; flex: 0 0 auto;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.24);
  transition: transform .18s;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ------------------------------- 标签 ------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 550; white-space: nowrap;
  background: #f1f3f8; color: var(--text-2); border: 1px solid transparent;
}
.chip-green { background: var(--green-soft); color: #067647; }
.chip-red { background: var(--red-soft); color: #b4272c; }
.chip-blue { background: var(--primary-soft); color: var(--primary-dark); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-gray { background: #f2f4f8; color: var(--text-2); }
.chip-line { background: #fff; border-color: var(--line-strong); color: var(--text-2); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.domain-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px; color: var(--primary-dark);
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  padding: 2px 7px; border-radius: 6px; font-weight: 500;
}
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; }

.copy-btn {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  padding: 2px; display: inline-grid; place-items: center; border-radius: 4px;
}
.copy-btn:hover { background: rgba(43,108,255,.1); color: var(--primary); }
.copy-btn svg { width: 13px; height: 13px; }

/* ------------------------------- 胶囊额度 ------------------------------- */

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  background: #fff; border: 1px solid var(--line-strong); color: var(--text-2);
}
.pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.pill.zero { color: var(--text-3); background: var(--surface-2); }
.pill.zero b { color: var(--text-3); }

/* ------------------------------- Tabs ------------------------------- */

.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tab {
  border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--text-2);
  padding: 12px 4px; margin-right: 16px; cursor: pointer; position: relative;
}
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--primary); border-radius: 2px 2px 0 0;
}

/* ------------------------------- 域名卡片 ------------------------------- */

.domain-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid #f0f2f7;
}
.domain-card:last-child { border-bottom: 0; }
.domain-card:hover { background: #fbfcfe; }
.domain-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.domain-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.domain-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.remark { font-size: 12.5px; color: var(--text-2); }
.domain-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.record-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ------------------------------- 解析记录卡 ------------------------------- */

.rec-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.9fr) auto;
  gap: 16px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid #f0f2f7;
}
.rec-card:last-child { border-bottom: 0; }
.rec-card:hover { background: #fbfcfe; }
.rec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-host {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13.5px; font-weight: 600;
}
.rec-value {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px; color: var(--text-2); word-break: break-all;
}
.rec-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.rec-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------- 空态 ------------------------------- */

.empty {
  padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13px;
}
.empty svg { width: 30px; height: 30px; margin-bottom: 10px; opacity: .5; }
.empty p { margin: 0; }
.empty .btn { margin-top: 12px; }

/* ------------------------------- 下拉菜单 ------------------------------- */

.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 152px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 5px; z-index: 60;
}
.menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; font: inherit; font-size: 13px; color: var(--text-2);
  padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left;
}
.menu button:hover { background: var(--surface-2); color: var(--text); }
.menu button.danger { color: var(--red); }
.menu button.danger:hover { background: var(--red-soft); }
.menu button svg { width: 14px; height: 14px; flex: 0 0 auto; opacity: .8; }
.menu button { white-space: nowrap; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }

/* ------------------------------- 弹窗 ------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .38);
  backdrop-filter: blur(2px); display: grid; place-items: center;
  z-index: 200; padding: 20px; animation: fade .14s ease;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 520px;
  box-shadow: 0 24px 64px rgba(16,24,40,.2); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; animation: pop .16s ease;
}
.modal.wide { max-width: 860px; }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 14px 14px;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }

/* ------------------------------- Toast ------------------------------- */

.toast-stack {
  position: fixed; bottom: 22px; right: 22px; z-index: 400;
  display: flex; flex-direction: column-reverse; gap: 8px; max-width: 340px; pointer-events: none;
}
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary);
  border-radius: 8px; box-shadow: var(--shadow-md); padding: 10px 13px;
  font-size: 13px; color: var(--text); animation: slide .18s ease;
  overflow-wrap: anywhere; line-height: 1.55;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: #e0a020; }
@keyframes slide { from { opacity: 0; transform: translateX(12px) } to { opacity: 1; transform: none } }

/* ------------------------------- 登录页 ------------------------------- */

.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
  background:
    radial-gradient(1100px 520px at 10% -10%, #dfe8ff 0%, transparent 60%),
    radial-gradient(900px 460px at 90% 110%, #e8e3ff 0%, transparent 55%),
    #f7f9ff;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 28px 26px;
  box-shadow: 0 18px 44px -20px rgba(22, 32, 64, .22), var(--shadow-sm);
}
.auth-brand { padding: 0; border: 0; margin-bottom: 22px; }
.auth-copyright {
  position: fixed; left: 0; right: 0; bottom: 16px;
  text-align: center; font-size: 12px; color: var(--text-3);
}
.auth-card h3 { font-size: 20px; margin-bottom: 4px; }
.auth-card .sub { color: var(--text-3); font-size: 13px; margin-bottom: 22px; }
.auth-card .field { margin-bottom: 13px; }
.auth-card .btn { width: 100%; height: 38px; margin-top: 6px; }
.auth-tip {
  margin-top: 16px; font-size: 12px; color: var(--text-3);
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: 8px; padding: 9px 11px; line-height: 1.7;
}
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--text-3); text-align: center; }

/* ------------------------------- 其它 ------------------------------- */

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .spacer { margin-left: auto; }

.list-divider { height: 1px; background: var(--line); margin: 12px 0; }

.trend-chart { width: 100%; height: 168px; display: block; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }

.preview-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); font-size: 12.5px;
}
.preview-list { display: flex; flex-direction: column; gap: 8px; }
.preview-list .mono { color: var(--text-2); }

.quota-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px;
  background: var(--surface);
}
.quota-card .name { font-size: 12.5px; color: var(--text-2); }
.quota-card .val { font-size: 22px; font-weight: 660; font-variant-numeric: tabular-nums; margin-top: 4px; }
.quota-card .bar { height: 4px; border-radius: 2px; background: #eef1f6; margin-top: 9px; overflow: hidden; }
.quota-card .bar span { display: block; height: 100%; background: var(--primary); border-radius: 2px; }
.quota-card .used { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

.settings-section + .settings-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-section h4 { font-size: 13.5px; margin-bottom: 10px; }

/* ------------------------------- 响应式 ------------------------------- */

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-card { grid-template-columns: 1fr auto; }
  .rec-card .rec-value-wrap { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-badge { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .page { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; }
  .topbar h1 { font-size: 15px; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
}

/* ------------------------- 域名流转：接收方选择器 ------------------------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row .mono { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); }

.pick-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); max-height: 232px; overflow-y: auto; padding: 4px;
}
[data-pick] { position: relative; }

.pick-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 9px; border: 0; background: transparent; border-radius: 6px;
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
}
.pick-item:hover { background: var(--primary-soft); }
.pick-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 620;
  background: var(--primary-soft); color: var(--primary-dark);
}
.pick-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-main b { font-size: 13px; font-weight: 560; }
.pick-main .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-empty { padding: 12px 10px; font-size: 12.5px; color: var(--text-3); }

.pick-chosen { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.check-row {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}

/* 用户 ID 徽标（方便对外告知自己的 ID） */
.id-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 13px; background: var(--primary-soft); color: var(--primary-dark);
  border: 1px solid var(--primary-line); font-size: 12px; font-weight: 560;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.id-badge svg { width: 13px; height: 13px; }
.id-badge:hover { background: #e3ecff; }

/* 行内小图标统一尺寸：未显式约束的 SVG 会按默认 300×150 撑爆单元格 */
.hint svg,
.table td svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  vertical-align: -2px;
}

/* 选择器：提示 / 空结果不带浮层边框，改为文档流内一行小字，避免像第二个输入框或压住下方字段 */
.pick-list.is-hint {
  position: static;
  border: 0;
  background: transparent;
  box-shadow: none;
  max-height: none;
  overflow: visible;
  padding: 3px 0 0;
}
.pick-list.is-hint .pick-empty { padding: 4px 2px; }
