/* ============================================================
   个人信息管理中心 — 主站样式
   设计语言：墨岩 · 金融终端 (Ink & Ledger)
   深墨蓝锚定 · 铜金强调 · 暖白纸感 · 等宽数字

   本文件为纯视觉层：保留所有 HTML/JS 依赖的类名与 id，
   不参与任何业务逻辑。
   ============================================================ */

/* ---------------- 设计令牌 ---------------- */
:root {
  /* 文字：由深到浅四级 */
  --ink:    #152238;
  --ink-2:  #41556e;
  --ink-3:  #7a8899;
  --ink-4:  #a9b4c1;

  /* 面：暖纸底 / 白卡 / 浅面板 */
  --paper:    #f7f6f3;
  --surface:  #ffffff;
  --paper-2:  #f2f4f7;
  --paper-3:  #ebeeF3;

  /* 线：暖灰边框 */
  --rule:   #e4e2dc;
  --rule-2: #d3d7de;

  /* 品牌：深墨蓝 */
  --navy:   #12263a;
  --navy-2: #1e3a57;
  --navy-3: #2a5075;

  /* 强调：铜金 */
  --gold:   #b4842f;
  --gold-2: #d8a94b;
  --gold-bg:#fbf5e9;
  --gold-rule:#e8d6ae;

  /* 语义色：中国股市习惯 涨/热=红，跌=绿 */
  --blue:  #2a6fb5;
  --blue-bg:#eef4fb;
  --blue-rule:#cfe0f3;
  --ok:    #1d8a5a;
  --ok-bg: #eaf6f0;
  --ok-rule:#c5e5d5;
  --warn:  #b77a16;
  --warn-bg:#fdf5e6;
  --warn-rule:#eddcb4;
  --red:   #c0392b;
  --red-bg:#fbeeec;
  --red-rule:#f2ccc6;
  --hot:   #c0392b;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
               Consolas, "Liberation Mono", monospace;

  /* 形状 */
  --r:    10px;
  --r-sm: 7px;
  --r-xs: 4px;

  /* 层次 */
  --shadow:   0 1px 2px rgba(18, 38, 58, .05);
  --shadow-2: 0 2px 10px rgba(18, 38, 58, .07);
  --shadow-3: 0 10px 34px rgba(18, 38, 58, .14);
  --shadow-nav: 0 1px 0 rgba(255, 255, 255, .06), 0 4px 18px rgba(10, 22, 36, .22);

  --ease: cubic-bezier(.2, .6, .3, 1);
}

/* ---------------- 基础 ---------------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  /* 极淡的纸纹：斜向网格，几乎不可见，只为去掉纯色的塑料感 */
  background-image:
    linear-gradient(to right, rgba(18, 38, 58, .022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 38, 58, .022) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection { background: rgba(180, 132, 47, .22); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   顶栏（管理员中心；个人中心/热点分析见 nav.css 的 .pc-topbar）
   ============================================================ */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 62%, var(--navy-3) 100%);
  box-shadow: var(--shadow-nav);
}

.topbar::after {
  /* 顶栏底缘的铜金细线，品牌锚点 */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-2) 30%, transparent 72%);
  opacity: .85;
}

.topbar-left,
.topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topbar-title {
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

.topbar .brand-logo.sm {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #22190a;
  background: linear-gradient(140deg, var(--gold-2), var(--gold));
  box-shadow: 0 2px 6px rgba(180, 132, 47, .4);
}

.user-email {
  color: rgba(255, 255, 255, .78);
  font-size: 12.5px;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.topbar .btn-ghost {
  border-color: rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .06);
}
.topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

/* ============================================================
   布局
   ============================================================ */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-container { max-width: 1400px; }

.page-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: -.015em;
}

.page-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--rule-2);
}

/* 标题左侧的铜金竖条：卡片视觉锚点 */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, rgba(180, 132, 47, .18));
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 22px 14px;
}

.card-head h2 {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: -.005em;
}
.tip-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
}
.tip-text .tip-code {
  display: inline-block;
  padding: 3px 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
}
.last-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.last-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.last-foot.last-foot-clear {
  justify-content: flex-end;
}
.last-title {
  font-size: 15.5px;
  font-weight: 400;
  color: var(--navy);
}

.card-body { padding: 4px 22px 20px; }
.card-body + .card-body { padding-top: 0; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}

/* 风控参数按钮行：与「策略运行状态」卡片按钮行视觉一致（无背景、无上边框，水平居中） */
.params-actions {
  background: transparent;
  border-top: none;
}

/* 风控参数锁定态：输入框置灰 */
.card.is-locked .card-body input { background: var(--paper-2); color: var(--ink-2); }
.card.is-locked .card-body input:focus {
  border-color: var(--rule-2);
  box-shadow: none;
}

.head-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--gold-bg);
  border: 1px solid var(--gold-rule);
  color: var(--gold);
}

.card-tag.tag-gray { background: var(--paper-2); border-color: var(--rule-2); color: var(--ink-3); }
.card-tag.tag-green { background: var(--ok-bg); border-color: var(--ok-rule); color: var(--ok); }

/* 实时同步指示 */
.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(29, 138, 90, .16);
  animation: livePulse 2s var(--ease) infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ============================================================
   表单
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field label,
.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .02em;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="time"],
input[type="date"],
input[type="search"],
select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}

input::placeholder { color: var(--ink-4); }

input:hover:not([readonly]),
select:hover { border-color: var(--ink-4); }

input:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 111, 181, .14);
}

input[readonly] {
  background: var(--paper-2);
  color: var(--ink-2);
  cursor: default;
}

input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a8899' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* 数值 + 单位 */
.unit-row { position: relative; display: flex; align-items: center; }

.unit-row input { padding-right: 42px; }

.unit {
  position: absolute;
  right: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  pointer-events: none;
}

.code-row { display: flex; align-items: center; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: none; }

/* 股票联想下拉：输入框包裹层相对定位，下拉列表绝对定位在其下方 */
.stock-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.stock-input-wrap input { width: 100%; }
.stock-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}
.stock-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.stock-suggest-item:hover,
.stock-suggest-item.active { background: var(--paper-2); }
.stock-suggest-code { color: var(--ink-1); font-variant-numeric: tabular-nums; }
.stock-suggest-name { color: var(--ink-2); }

.field-tip,
.hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
}

.field-hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--warn); }

.req { color: var(--red); }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), box-shadow .16s var(--ease), transform .08s var(--ease);
}

.btn[hidden] { display: none !important; }

.btn:hover { background: var(--paper-2); border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border-color: var(--navy);
  box-shadow: 0 1px 2px rgba(18, 38, 58, .18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--navy-3), var(--navy-2));
  border-color: var(--navy);
}
.btn-primary:active { box-shadow: none; }

.btn-outline {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: var(--gold-rule);
}
.btn-outline:hover { background: #f8efdc; border-color: var(--gold); }

.btn-ghost { color: var(--ink-2); background: transparent; border-color: var(--rule-2); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); border-color: var(--ink-4); }

.btn-danger { color: #fff; background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #a93226; border-color: #a93226; }

.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }

.btn-block { width: 100%; height: 42px; font-size: 14.5px; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   消息 / 提示
   ============================================================ */
.msg {
  margin: 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
}
.msg.center { text-align: center; }
.msg.success { color: var(--ok); }
.msg.error { color: var(--red); }

/* ============================================================
   资金账号
   ============================================================ */
.fund-bound {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(120deg, var(--blue-bg), #f5f9fd);
  border: 1px solid var(--blue-rule);
  border-radius: var(--r-sm);
}

.fund-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.fund-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.fund-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--navy);
  word-break: break-all;
}

.fund-edit { margin-top: 12px; }

.fund-tip {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-rule);
  border-radius: var(--r-sm);
}

/* ============================================================
   策略运行状态
   ============================================================ */
.strategy-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.strategy-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-4);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.strategy-dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(29, 138, 90, .16);
  animation: livePulse 1.6s var(--ease) infinite;
}
.strategy-dot.off { background: var(--ink-4); box-shadow: 0 0 0 3px rgba(122, 136, 153, .14); }

.strategy-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   信息栅格（账号状态）
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
}

.info-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.info-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
  word-break: break-all;
}
.info-value.on { color: var(--ok); }
.info-value.off { color: var(--red); }

/* ============================================================
   管理员表格
   ============================================================ */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.admin-table-wrap {
  padding: 0 0 4px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  white-space: nowrap;
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink-2);
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule-2);
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: middle;
}

.admin-table tbody tr:nth-child(even) { background: #fafbfc; }
.admin-table tbody tr:hover { background: var(--blue-bg); }
.admin-table tbody tr:last-child td { border-bottom: 0; }

.admin-table .u-email {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table .u-name { font-weight: 600; color: var(--ink); }
.admin-table .u-fund { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.admin-table td.num,
.admin-table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.admin-table .muted { color: var(--ink-4); }

/* 表内开关 */
.admin-table .switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.admin-table .switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.admin-table .slider {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: var(--rule-2);
  position: relative;
  transition: background .18s var(--ease);
  flex: none;
}
.admin-table .slider::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 38, 58, .25);
  transition: transform .18s var(--ease);
}
.admin-table .switch input:checked + .slider { background: var(--ok); }
.admin-table .switch input:checked + .slider::after { transform: translateX(16px); }
.admin-table .switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(42, 111, 181, .25); }

.sw-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  min-width: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  color: var(--ink-3);
}
.status-pill.on { background: var(--ok-bg); border-color: var(--ok-rule); color: var(--ok); }
.status-pill.off { background: var(--paper-2); border-color: var(--rule-2); color: var(--ink-3); }

.op-cell { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 38, 58, .42);
  backdrop-filter: blur(3px);
  animation: fadeIn .16s var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: popIn .18s var(--ease);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.modal-card.form-card { max-width: 560px; }

.modal-title {
  padding: 16px 20px;
  font-size: 15.5px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 70%, var(--navy-3) 100%);
}

.modal-text {
  padding: 18px 20px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* 手动操作类弹窗：正文居中 */
.modal-text.center { text-align: center; }

/* 弹窗中的股票代码：仅加粗，其余样式随正文 */
.modal-code { font-weight: 800; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}

/* 双按钮弹窗（确定 / 取消）：居中排布，等宽对齐 */
.modal-foot.two { justify-content: center; }
.modal-foot.two .btn { min-width: 104px; justify-content: center; text-align: center; }
@media (max-width: 400px) {
  .modal-foot.two .btn { flex: 1; min-width: 0; }
}

/* 管理员用户表单 */
.user-form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row input, .form-row select { height: 36px; }

/* ============================================================
   登录 / 管理员登录（左右分栏）
   ============================================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--paper);
  background-image: none;
}

.auth-shell {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  min-height: 480px;
}

/* 左：品牌区 */
.auth-aside {
  position: relative;
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(216, 169, 75, .20), transparent 58%),
    linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 55%, #22466b 100%);
  overflow: hidden;
}

.auth-aside::before {
  /* 极淡账表网格纹理 */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(216, 169, 75, .28);
  box-shadow: inset 0 0 0 1px rgba(216, 169, 75, .12);
  pointer-events: none;
}

.aside-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #241a08;
  background: linear-gradient(140deg, var(--gold-2), var(--gold));
  box-shadow: 0 4px 14px rgba(180, 132, 47, .42);
}

.aside-title {
  position: relative;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  margin-top: 6px;
}

.aside-sub {
  position: relative;
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .04em;
}

.aside-rule {
  position: relative;
  width: 46px;
  height: 2px;
  margin: 8px 0 4px;
  background: linear-gradient(90deg, var(--gold-2), transparent);
  border-radius: 2px;
}

.aside-points {
  position: relative;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aside-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.8px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.5;
}

.aside-points li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gold-2);
}

.aside-foot {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .42);
  text-transform: uppercase;
}

/* 右：表单区 */
.auth-main {
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: var(--surface);
}

.auth-head h2 {
  font-size: 19px;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: -.01em;
}

.auth-head p {
  margin: 4px 0 0;
  font-size: 12.8px;
  color: var(--ink-3);
}

.auth-main .form { display: flex; flex-direction: column; gap: 15px; }

.auth-main .field input { height: 40px; }

.auth-main .btn-primary { margin-top: 4px; }

.admin-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.admin-link:hover { color: var(--gold); text-decoration: none; }

/* 兼容旧结构：若页面仍是 .auth-card（未升级），也保持可读 */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 30px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .container { padding: 20px 14px 44px; gap: 16px; }
  .page-title { font-size: 19px; }
  .grid-2 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .card-head { padding: 15px 16px 12px; }
  .card-body { padding: 2px 16px 16px; }
  .card-foot { padding: 12px 16px; }
  /* 资金账号与「修改」按钮在移动端也保持同一行：账号区可收缩，按钮不被挤压 */
  .fund-bound { flex-direction: row; align-items: center; gap: 10px; }
  .fund-info { min-width: 0; }
  .fund-bound .btn { flex: none; }
  .fund-value { font-size: 16px; letter-spacing: 0; white-space: nowrap; }
  .strategy-actions .btn { flex: 1; }
  /* 风控参数默认态「修改」按钮：与策略运行状态按钮一致，宽度自适应（不再固定 70%） */
  .card-foot #editParamsBtn { flex: 1; }
  /* 风控参数编辑态的「保存参数 / 取消」与策略按钮同一处理：各占半行 */
  .card-foot #saveParamsBtn,
  .card-foot #cancelParamsBtn { flex: 1 1 0; }
  /* 自动操作卡片「关闭自动 / 开启自动」按钮：与策略运行状态按钮一致，宽度自适应 */
  .code-row #closeAutoBtn,
  .code-row #openAutoBtn { flex: 1; }
  /* 手动操作卡片「清空」按钮：独占一行，宽度自适应 */
  .last-foot-clear #clearGupiaoBtn { flex: 1; }

  .auth-body { padding: 0; align-items: stretch; }
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .auth-aside { padding: 30px 22px 26px; min-height: auto; }
  .aside-title { font-size: 22px; }
  .aside-points { margin-top: 18px; gap: 8px; }
  .auth-main { padding: 26px 22px 34px; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 14px; }
  .user-email { display: none; }
  .aside-foot { display: none; }
}

/* ============================================================
   动效降级
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   打印
   ============================================================ */
@media print {
  .topbar, .pc-topbar, .modal-mask, .card-foot, .strategy-actions { display: none !important; }
  body { background: #fff; background-image: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ============================================================
   manual 操作中心：红/绿风格互换（仅限本页 page-manual 作用域）
   ① btn-danger(红) → 绿系；② card-tag.tag-green(绿) → 红系；
   ③ info-value.on(绿) → 红系。复用 :root 令牌，不影响其它页面。
   ============================================================ */
.page-manual .btn-danger {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}
.page-manual .btn-danger:hover {
  background: #157a4c;
  border-color: #157a4c;
}
.page-manual .card-tag.tag-green {
  background: var(--red-bg);
  border-color: var(--red-rule);
  color: var(--red);
}
.page-manual .info-value.on {
  color: var(--red);
}
.page-manual .tip-text {
  color: var(--red);
}
.page-manual .tip-text .tip-code {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-rule);
}

/* 页脚（与 heatmap 看板 footer 设计一致） */
.footer {
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 11.8px;
  line-height: 1.7;
  color: var(--ink-4);
  text-align: center;
}
