/* ============================================================
 * 模拟炒股系统 - macOS 风格视觉规范
 * 基于 Apple HIG / macOS Sequoia 审美
 * ============================================================ */

:root {
  /* macOS 系统色 */
  --bg-float: #F5F5F7;
  --bg-sidebar: #FAFAFC;
  --bg-card: #FFFFFF;
  --color-primary: #0071E3;       /* 苹果蓝 */
  --color-primary-hover: #0A84FF;
  --color-primary-subtle: #E8F1FD;
  --color-text: #1D1D1F;
  --color-text-2: #86868B;        /* macOS 二级灰 */
  --color-up: #FF453A;            /* macOS 系统红 */
  --color-down: #30D158;           /* macOS 系统绿 */
  --color-border: rgba(0,0,0,0.06);
  --color-danger: #FF3B30;
  --color-warn: #FF9F0A;

  /* 阴影：更柔和扩散 */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-pop: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);

  --radius-card: 24px;
  --radius-btn: 999px;
  --radius-input: 12px;

  --font-zh: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Mono", "PingFang SC", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-float);
  color: var(--color-text);
  font-family: var(--font-zh);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; font-family: var(--font-num); letter-spacing: -0.02em; }
.up   { color: var(--color-up); }
.down { color: var(--color-down); }
.flat { color: var(--color-text-2); }

/* ---------- 卡片：更大圆角、更柔阴影 ---------- */
.card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.6);
}
.card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ---------- 按钮：胶囊、轻微高光 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 20px;
  border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: all .18s cubic-bezier(.2,.8,.2,1);
  font-family: var(--font-zh);
}
.btn-primary {
  background: linear-gradient(180deg, #0A84FF 0%, #0071E3 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,113,227,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,113,227,0.35), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: #B8D7F5; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: rgba(255,255,255,0.7); color: var(--color-primary);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
}
.btn-ghost:hover { background: #fff; border-color: rgba(0,113,227,0.3); }
.btn-danger-text { background: transparent; color: var(--color-danger); }
.btn-danger-text:hover { background: rgba(255,59,48,0.06); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 32px; font-size: 15px; width: 100%; font-weight: 600; }

/* ---------- 输入框：更柔和 ---------- */
.input {
  height: 40px; padding: 0 16px;
  background: rgba(118,118,128,0.08);
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  font-size: 15px; font-family: var(--font-zh);
  color: var(--color-text);
  outline: none;
  width: 100%;
  transition: all .15s;
}
.input:focus { background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(0,113,227,0.1); }
.input::placeholder { color: #AEAEB2; }
.input-num { font-family: var(--font-num); text-align: right; }

/* ---------- 表格：更宽松 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 500; font-size: 12px;
  color: var(--color-text-2);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.table td {
  padding: 0 12px; height: 56px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 15px;
}
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover { background: rgba(0,113,227,0.03); }
.table .td-num { text-align: right; font-family: var(--font-num); }
.table th.td-num { text-align: right; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.badge-open   { background: rgba(48,209,88,0.12); color: #1D7A3D; }
.badge-close  { background: rgba(142,142,147,0.12); color: #6E6E73; }
.badge-warn   { background: rgba(255,159,10,0.12); color: #B25000; }
.badge-pause  { background: rgba(255,69,58,0.12); color: #D70015; }
.badge-stop   { background: rgba(142,142,147,0.12); color: #8E8E93; }

/* ---------- Toast：macOS 通知风 ---------- */
#toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: rgba(30,30,32,0.85); color: #fff;
  padding: 10px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500; z-index: 9999;
  opacity: 0; transition: all .25s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn .15s ease;
}
.modal-mask.show { display: flex; }
.modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(40px);
  border-radius: 20px;
  width: 420px; padding: 28px;
  box-shadow: var(--shadow-pop);
  animation: popIn .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn  { from { transform: scale(0.96); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.02em; }
.modal .body { font-size: 14px; color: var(--color-text-2); margin-bottom: 20px; line-height: 1.6; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 顶栏：macOS 毛玻璃 ---------- */
.topbar {
  height: 60px;
  background: rgba(245,245,247,0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex; align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 100;
}
.topbar .logo { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.topbar .logo span.dot { color: var(--color-primary); }
.topbar .nav {
  display: flex; gap: 2px; margin-left: 40px;
  background: rgba(118,118,128,0.08); padding: 3px; border-radius: 999px;
}
.topbar .nav button {
  border: none; background: transparent;
  padding: 5px 16px; border-radius: 999px;
  font-size: 13px; cursor: pointer; color: var(--color-text-2);
  font-family: var(--font-zh);
  transition: all .15s;
}
.topbar .nav button.active { background: #fff; color: var(--color-text); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }

/* ---------- 三栏布局 ---------- */
.player-layout {
  display: grid;
  grid-template-columns: 230px 1fr 340px;
  min-height: calc(100vh - 60px);
}
.player-layout .sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(0,0,0,0.05);
  padding: 20px 14px;
}
.player-layout .main { padding: 28px; max-width: 1680px; width: 100%; margin: 0 auto; }
.player-layout .panel {
  background: rgba(250,250,252,0.85);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0,0,0,0.05);
  padding: 24px;
  position: sticky; top: 60px; height: calc(100vh - 60px);
  overflow-y: auto;
}

/* ---------- 侧边导航 ---------- */
.side-section { font-size: 11px; color: var(--color-text-2); padding: 18px 12px 6px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 14px; color: var(--color-text); cursor: pointer;
  margin-bottom: 2px;
  transition: all .12s;
}
.side-item:hover { background: rgba(0,0,0,0.04); }
.side-item.active { background: var(--color-primary-subtle); color: var(--color-primary); font-weight: 500; }
.side-item .ico { width: 18px; text-align: center; opacity: 0.8; }

/* ---------- 侧边栏菜单编辑（重命名 / 显隐 / 拖拽排序） ---------- */
.sidebar-tools { display: flex; justify-content: flex-end; padding: 0 2px 8px; }
.sidebar-tip {
  display: none; margin: 0 0 10px; padding: 8px 10px;
  border-radius: 10px; background: var(--color-primary-subtle); color: #0A5FBF;
  font-size: 11.5px; line-height: 1.6;
}
.sidebar.editing .sidebar-tip { display: block; }
.sidebar.editing { background: linear-gradient(180deg, rgba(0,113,227,0.06), rgba(0,113,227,0.01) 140px, var(--bg-sidebar) 240px); }
.side-edit-btn {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.72);
  color: var(--color-text-2); font-size: 14px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.side-edit-btn:hover { background: #fff; color: var(--color-primary); border-color: rgba(0,113,227,0.30); }
.side-edit-btn.on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.side-drag, .side-eye { display: none; }
.sidebar.editing .side-drag, .sidebar.editing .side-eye {
  display: inline-flex; align-items: center; justify-content: center;
}
.side-drag {
  width: 18px; height: 26px; margin-left: -4px; color: #8E8E93;
  font-size: 14px; line-height: 1; letter-spacing: -1px;
  border-radius: 7px; cursor: grab; touch-action: none;
}
.side-drag:hover { background: rgba(118,118,128,0.14); color: var(--color-text); }
.side-drag:active { cursor: grabbing; }
.side-eye {
  margin-left: auto; flex: 0 0 auto;
  width: 26px; height: 26px; border: none; border-radius: 8px; cursor: pointer;
  background: rgba(118,118,128,0.10); color: var(--color-text); font-size: 12px; line-height: 1;
}
.side-eye:hover { background: rgba(118,118,128,0.20); }
.sidebar.editing .side-item { cursor: default; }
.sidebar.editing .side-section { cursor: grab; touch-action: none; }
.sidebar.editing .side-section .txt { border-bottom: 1px dashed rgba(0,0,0,0.22); }

/* 隐藏的菜单：平时不渲染，编辑态半透明保留以便恢复 */
.side-item.nav-hidden { display: none; }
.sidebar.editing .side-item.nav-hidden { display: flex; opacity: 0.42; }

.side-rename {
  flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 8px;
  border: 1px solid var(--color-primary); border-radius: 8px;
  background: #fff; color: var(--color-text); font-family: var(--font-zh); font-size: 13.5px;
  outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.side-item.dragging, .side-section.dragging {
  opacity: 0.96; background: #fff; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

/* ---------- 登录页：macOS 玻璃拟态 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 800px at 20% 10%, #E8F1FD 0%, transparent 50%),
              radial-gradient(1000px 700px at 80% 90%, #FFE8EC 0%, transparent 50%),
              var(--bg-float);
}
.login-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 28px;
  width: 400px; padding: 44px;
  box-shadow: var(--shadow-pop);
  border: 1px solid rgba(255,255,255,0.8);
}
.login-card .event-tag {
  display: inline-block; font-size: 12px; color: var(--color-primary);
  background: var(--color-primary-subtle); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; font-weight: 500;
}
.login-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.login-card .sub { font-size: 14px; color: var(--color-text-2); margin-bottom: 30px; }
.login-card .field { margin-bottom: 14px; }
.login-card .field label { display: block; font-size: 13px; color: var(--color-text-2); margin-bottom: 6px; font-weight: 500; }
.login-card .err { color: var(--color-danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ---------- 行情列表 ---------- */
.stock-row {
  display: grid; grid-template-columns: 1fr 110px 110px 100px;
  gap: 16px; align-items: center;
  padding: 0 14px; height: 56px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer; border-radius: 10px;
  transition: background .12s;
}
.stock-row:hover { background: rgba(0,113,227,0.04); }
.stock-row.selected { background: var(--color-primary-subtle); }
.stock-row .name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.stock-row .name .code { display: block; font-size: 12px; color: var(--color-text-2); font-weight: 400; margin-top: 1px; }
.stock-row .v { text-align: right; font-family: var(--font-num); font-size: 15px; font-weight: 500; }

/* ---------- 控盘台统计卡 ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px;
}
.stat-card .label { font-size: 13px; color: var(--color-text-2); margin-bottom: 10px; font-weight: 500; }
.stat-card .value { font-size: 30px; font-weight: 700; font-family: var(--font-num); letter-spacing: -0.03em; }
.stat-card .delta { font-size: 12px; margin-top: 6px; }

/* ---------- Seg 控件 ---------- */
.seg {
  display: inline-flex; background: rgba(118,118,128,0.08); padding: 3px; border-radius: 999px;
}
.seg button {
  border: none; background: transparent; padding: 6px 18px;
  border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--color-text-2);
  font-family: var(--font-zh); font-weight: 500;
  transition: all .15s;
}
.seg button.active { background: #fff; color: var(--color-text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ---------- 杂项 ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-2 { color: var(--color-text-2); font-size: 13px; }
.divider { height: 1px; background: rgba(0,0,0,0.06); margin: 20px 0; }
.empty { text-align: center; color: var(--color-text-2); padding: 40px 0; font-size: 14px; }

/* ============================================================
 * 扩展样式：登录提示、控盘台、表单、改密弹窗
 * ============================================================ */

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

.login-card .hint {
  margin-top: 18px; font-size: 12px; color: var(--color-text-2);
  line-height: 1.7; background: rgba(118,118,128,0.06);
  padding: 12px 14px; border-radius: 12px;
}
.login-card .hint b { color: var(--color-text); font-weight: 600; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  background: rgba(118,118,128,0.10); font-size: 13px;
}
.user-chip .role { color: var(--color-text-2); font-size: 12px; }

/* ---------- 控盘台布局 ---------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 60px); }
.admin-layout .sidebar { background: var(--bg-sidebar); border-right: 1px solid rgba(0,0,0,0.05); padding: 20px 14px; }
.admin-main { padding: 28px; max-width: 1680px; width: 100%; margin: 0 auto; }
.admin-main .view { display: none; }
.admin-main .view.active { display: block; }

.page-title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.page-sub { font-size: 13px; color: var(--color-text-2); margin-top: 6px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13px; color: var(--color-text-2); margin-bottom: 6px; font-weight: 500; }
.form-field .input, .form-field select.input { width: 100%; }
select.input { appearance: none; cursor: pointer; }
textarea.input { height: auto; padding: 12px 16px; line-height: 1.6; resize: vertical; font-family: var(--font-zh); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .form-field { min-width: 150px; }

/* ---------- 数据表 ---------- */
.table-wrap { overflow-x: auto; }
.table td .mini { font-size: 12px; color: var(--color-text-2); margin-top: 2px; }
.table td.strong { font-weight: 600; }
.table-scroll { max-height: 520px; overflow-y: auto; }
.table tr.selected td { background: var(--color-primary-subtle); }
.table tr:hover td { background: rgba(0,113,227,0.02); }

/* ---------- 状态点 ---------- */
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #8E8E93; }
.status-dot.on::before { background: var(--color-down); }
.status-dot.off::before { background: #AEAEB2; }
.status-dot.pause::before { background: var(--color-warn); }
.status-dot.danger::before { background: var(--color-danger); }

.badge-locked { background: rgba(255,69,58,0.12); color: #D70015; }
.badge-flat   { background: rgba(142,142,147,0.12); color: #6E6E73; }
.badge-blue   { background: var(--color-primary-subtle); color: #0A5FBF; }

/* ---------- 小按钮 ---------- */
.btn-mini {
  height: 28px; padding: 0 12px; font-size: 12px; border-radius: 999px;
  background: rgba(118,118,128,0.10); color: var(--color-text);
  border: none; cursor: pointer; font-family: var(--font-zh); transition: all .15s;
}
.btn-mini:hover { background: rgba(118,118,128,0.18); }
.btn-mini.primary { background: var(--color-primary-subtle); color: #0A5FBF; }
.btn-mini.primary:hover { background: rgba(0,113,227,0.18); }
.btn-mini.danger { background: rgba(255,59,48,0.10); color: var(--color-danger); }
.btn-mini.danger:hover { background: rgba(255,59,48,0.18); }
.btn-mini:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 空状态与加载 ---------- */
.loading-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(0,0,0,0.05), rgba(0,0,0,0.09), rgba(0,0,0,0.05)); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 10px 0; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.empty-state { text-align: center; color: var(--color-text-2); padding: 40px 0; font-size: 14px; }

/* ---------- 公告 ---------- */
.notice-item { border-bottom: 1px solid rgba(0,0,0,0.05); padding: 18px 0; }
.notice-item:last-child { border-bottom: none; }
.notice-item .title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.notice-item .content { font-size: 14px; color: var(--color-text-2); line-height: 1.7; margin-top: 8px; }

/* ---------- 改密弹窗 ---------- */
.pw-modal .field { margin-bottom: 14px; }
.pw-modal label { display: block; font-size: 13px; color: var(--color-text-2); margin-bottom: 6px; font-weight: 500; }
.pw-modal .err { color: var(--color-danger); font-size: 13px; min-height: 18px; }
.pw-modal .actions { margin-top: 18px; }
.pw-note { font-size: 13px; color: var(--color-text-2); line-height: 1.7; margin-bottom: 18px; }

/* ---------- 挂单确认 ---------- */
.confirm-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.confirm-row span:last-child { font-family: var(--font-num); font-weight: 600; }

.mono { font-family: var(--font-num); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-4 { margin-top: 4px; }
.mb-4 { margin-bottom: 4px; }
.gap-8 { gap: 8px; }
.flex { display: flex; align-items: center; }
/* ============================================================
 * 顶栏头像、设置面板、关于、个人中心
 * ============================================================ */

.btn-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 15px;
  background: rgba(118,118,128,0.10); color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.btn-icon:hover { background: rgba(118,118,128,0.20); }

.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; padding: 0;
  cursor: pointer; overflow: hidden; color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.14);
  transition: transform .15s, box-shadow .15s;
}
.avatar-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn.active { box-shadow: 0 0 0 3px rgba(0,113,227,0.20); }

/* ---------- 头像菜单 ---------- */
.user-menu {
  position: fixed; top: 70px; right: 16px; z-index: 1200;
  width: 246px; padding: 8px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.06);
  opacity: 0; transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.2,.8,.2,1);
}
.user-menu.show { opacity: 1; transform: none; pointer-events: auto; }
.user-menu-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 12px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.user-menu-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: 0 0 42px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%);
  color: #fff; font-size: 16px; font-weight: 600;
}
.user-menu-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-menu-id { min-width: 0; }
.user-menu-id .name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-id .meta { font-size: 12px; color: var(--color-text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: none; border-radius: 12px;
  background: transparent; color: var(--color-text);
  font-family: var(--font-zh); font-size: 14px; text-align: left; cursor: pointer;
  transition: background .14s;
}
.user-menu-item:hover { background: rgba(0,113,227,0.08); }
.user-menu-item .ico { width: 20px; text-align: center; font-size: 15px; opacity: .85; }
.user-menu-item.danger { color: var(--color-danger); }
.user-menu-item.danger:hover { background: rgba(255,59,48,0.10); }
.user-menu-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 6px 4px; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex: 0 0 88px;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 600; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-lg { width: 700px; max-width: 92vw; max-height: 86vh; overflow-y: auto; }
.modal-md { width: 560px; max-width: 92vw; max-height: 86vh; overflow-y: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.tabs button {
  border: none; background: transparent; padding: 10px 16px; font-size: 14px; cursor: pointer;
  color: var(--color-text-2); border-bottom: 2px solid transparent; font-family: var(--font-zh);
  transition: color .15s;
}
.tabs button.active { color: var(--color-text); font-weight: 600; border-bottom-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.setting-row {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .label { font-size: 14px; font-weight: 500; }
.setting-row .desc { font-size: 12px; color: var(--color-text-2); margin-top: 3px; }
.setting-row .control { flex: 0 0 auto; }
.setting-row select.input { width: 150px; height: 36px; }

.switch {
  position: relative; width: 46px; height: 28px; border-radius: 999px;
  background: #D2D2D7; border: none; cursor: pointer; transition: background .2s; padding: 0;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.22); transition: left .2s;
}
.switch.on { background: #34C759; }
.switch.on::after { left: 20px; }

.about-hero { display: flex; gap: 18px; align-items: center; padding: 4px 0 18px; }
.about-hero .name { font-size: 20px; font-weight: 600; }
.about-hero .title { font-size: 13px; color: var(--color-text-2); margin-top: 4px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(118,118,128,0.10); }
.tag.blue { background: var(--color-primary-subtle); color: #0A5FBF; }

.about-section { margin-top: 20px; }
.about-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.about-section p { font-size: 13px; color: var(--color-text-2); line-height: 1.85; }
.about-list { list-style: none; }
.about-list li { font-size: 13px; color: var(--color-text-2); line-height: 1.95; padding-left: 14px; position: relative; }
.about-list li::before { content: '·'; position: absolute; left: 2px; }
.contact-box { background: rgba(118,118,128,0.06); border-radius: 14px; padding: 14px 16px; margin-top: 10px; }
.contact-box .row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.contact-box .row span:first-child { color: var(--color-text-2); }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.profile-grid .full { grid-column: 1 / -1; }
.readonly-box { background: rgba(118,118,128,0.06); border-radius: 12px; padding: 11px 14px; font-size: 13px; }
.readonly-box .k { font-size: 12px; color: var(--color-text-2); margin-bottom: 3px; }
.profile-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }

body.compact .table td { height: 44px; font-size: 14px; }
body.compact .stock-row { height: 46px; }
body.compact .card { padding: 18px 22px; }
body.compact .stat-card .value { font-size: 26px; }

.theme-note { font-size: 12px; color: var(--color-text-2); margin-top: 10px; }
/* ---------- 记住密码 ---------- */
.check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--color-text);
  cursor: pointer; user-select: none; padding: 2px 0 10px;
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer;
}
.check-row .hint-text { margin-left: auto; font-size: 12px; color: var(--color-text-2); }
/* ---------- 关于平台弹窗 ---------- */
.modal-about {
  width: 880px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.about-block + .about-block { margin-top: 30px; }
.about-block-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--color-text-2); margin-bottom: 12px;
}
.about-block-title::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.07); }
.about-note { margin-top: 12px; font-size: 12.5px; line-height: 1.95; color: var(--color-text-2); }

/* 组委会：iOS 分组列表 */
.people-list { background: rgba(118,118,128,0.05); border-radius: 18px; overflow: hidden; }
.people-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; }
.people-row + .people-row { box-shadow: inset 0 1px 0 rgba(0,0,0,0.05); }
.people-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%);
  color: #fff; font-size: 15px; font-weight: 600;
}
.people-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.people-role { margin-left: auto; font-size: 13px; color: var(--color-text-2); white-space: nowrap; }

/* 系统开发者 */
.dev-card { background: rgba(118,118,128,0.04); border-radius: 20px; padding: 24px 24px 26px; }
.dev-badge {
  display: inline-block; margin-left: 10px; vertical-align: 2px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 11px; border-radius: 999px;
  background: var(--color-primary-subtle); color: #0A5FBF;
}
.about-hero { display: flex; gap: 20px; align-items: center; padding: 2px 0 20px; }
.about-hero .name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.about-hero .title { font-size: 13.5px; color: var(--color-text-2); margin-top: 6px; line-height: 1.8; }
.dev-card .tag-list { margin-top: 12px; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 36px;
  align-items: start;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 22px;
}
.about-section { margin-top: 22px; }
.about-section:first-child { margin-top: 0; }
.about-section h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.about-section p { font-size: 13.5px; color: var(--color-text-2); line-height: 2.05; }
.about-list li { font-size: 13.5px; line-height: 2.05; padding-left: 16px; margin-bottom: 10px; }
.about-list li b { color: var(--color-text); font-weight: 600; }
.contact-box { background: rgba(255,255,255,0.75); border-radius: 16px; padding: 16px 18px; margin-top: 12px; }
.contact-box .row { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; padding: 10px 0; }
.contact-box .row span:first-child { color: var(--color-text-2); }
.contact-box .row + .row { box-shadow: inset 0 1px 0 rgba(0,0,0,0.05); }
.theme-note { font-size: 12.5px; color: var(--color-text-2); margin-top: 16px; line-height: 1.95; }
/* ---------- 账号管理：头像、密码列、角色选择 ---------- */
.avatar-sm {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%);
  color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pwd-cell { display: flex; align-items: center; gap: 6px; }
.pwd-cell .mono { font-size: 13px; letter-spacing: 0.06em; }
.eye-btn {
  width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(118,118,128,0.10); font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.eye-btn:hover { background: rgba(118,118,128,0.22); }
.eye-btn:disabled { opacity: .35; cursor: not-allowed; }

.role-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.role-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(118,118,128,0.08); font-size: 13px; user-select: none;
  transition: background .15s;
}
.role-item:hover { background: rgba(118,118,128,0.16); }
.role-item input { width: 15px; height: 15px; accent-color: var(--color-primary); cursor: pointer; }
.role-item:has(input:checked) { background: var(--color-primary-subtle); color: #0A5FBF; font-weight: 500; }

.table td .btn-mini + .btn-mini { margin-left: 4px; }
/* ============================================================
 * PC 横屏登录页（Mac 风格双栏卡片）
 * ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background:
    radial-gradient(1200px 800px at 18% 8%, #E8F1FD 0%, transparent 52%),
    radial-gradient(1000px 700px at 82% 92%, #FFE8EC 0%, transparent 52%),
    var(--bg-float);
}
.login-shell {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  width: min(980px, 94vw);
  min-height: 580px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: var(--shadow-pop);
}

/* 左侧品牌栏 */
.login-brand {
  padding: 56px 52px;
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, #EAF3FE 0%, #F5F8FC 52%, #FFFFFF 100%);
  border-right: 1px solid rgba(0,0,0,0.05);
}
/* 图标 +（峰会标签 / 系统名）横向组合 */
.login-brand .brand-head {
  display: flex; align-items: center; gap: 20px;
}
.login-brand .brand-head-text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0;
}
.login-brand .logo-mark {
  flex: none;
  width: 88px; height: 88px; border-radius: 24px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%);
  color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: 0 12px 28px rgba(0,113,227,0.26);
}
.login-brand .logo-mark img { width: 100%; height: 100%; display: block; }
.login-brand h1 {
  font-size: 34px; font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.15;
}
.login-brand .brand-sub {
  margin-top: 24px; font-size: 14px; line-height: 1.95; color: var(--color-text-2);
}
.login-brand .brand-pills {
  margin-top: auto; padding-top: 32px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.login-brand .brand-pills .tag { font-size: 12.5px; padding: 6px 13px; }
.login-brand .brand-foot {
  margin-top: 20px; font-size: 12px; color: var(--color-text-2); line-height: 1.7;
}
.login-brand .event-tag {
  display: inline-block; align-self: flex-start; max-width: 100%;
  font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 999px;
  background: rgba(0,113,227,0.10); color: #0A5FBF;
}
.login-brand .event-tag.warn { background: rgba(255,59,48,0.10); color: var(--color-danger); }

/* 右侧表单栏 */
.login-body {
  position: relative;
  padding: 56px 52px;
  background: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.login-body h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.025em; }
.login-body .login-desc { font-size: 13px; color: var(--color-text-2); margin: 10px 0 30px; }
.login-body .field { margin-bottom: 16px; }
.login-body .field label {
  display: block; font-size: 13px; font-weight: 500; color: var(--color-text-2); margin-bottom: 7px;
}
.login-body .input { height: 44px; }
.login-body .check-row { padding: 0 0 14px; }
.login-body .err { color: var(--color-danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.login-body .login-hint {
  margin-top: 20px; padding: 13px 15px; border-radius: 12px;
  background: rgba(118,118,128,0.07);
  font-size: 12px; line-height: 1.85; color: var(--color-text-2);
}
.login-body .login-hint b { color: var(--color-text); font-weight: 600; }
/* 右侧顶部入口：圆角胶囊按钮 */
.login-body .login-alt {
  position: absolute; top: 34px; right: 44px; font-size: 13px; text-align: right;
}
.login-body .login-alt a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 18px;
  border-radius: 999px;
  background: rgba(118,118,128,0.09);
  border: 1px solid rgba(0,0,0,0.05);
  color: var(--color-text);
  font-size: 13px; font-weight: 500; line-height: 1;
  text-decoration: none;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.login-body .login-alt a:hover {
  background: var(--color-primary-subtle);
  border-color: rgba(0,113,227,0.28);
  color: #0A5FBF;
  text-decoration: none;
  transform: translateY(-1px);
}
.login-body .login-alt a:active { transform: none; opacity: .8; }

/* ============================================================
 * 移动端适配（iPhone 风格）
 * 全部规则都放在媒体查询内，PC（≥1025px）布局与样式保持不变
 * ============================================================ */
@media (max-width: 1024px) {
  /* 防止 iOS 自动放大字号 */
  html { -webkit-text-size-adjust: 100%; }

  /* ---------- 控件：加大触摸目标，贴近 iOS 44pt ---------- */
  .btn { height: 44px; padding: 0 24px; font-size: 15px; font-weight: 600; }
  .btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
  .btn-lg { height: 52px; font-size: 17px; }
  .btn-mini { height: 34px; padding: 0 16px; font-size: 13px; border-radius: 999px; }
  .btn-icon, .avatar-btn { width: 40px; height: 40px; font-size: 17px; }
  .input { height: 46px; border-radius: 13px; font-size: 15px; }
  .login-body .input { height: 48px; }
  .badge { height: 26px; padding: 0 12px; font-size: 12.5px; }
  .check-row { font-size: 14px; }
  .check-row input[type="checkbox"] { width: 20px; height: 20px; }
  .seg { padding: 4px; }
  .seg button { min-height: 36px; padding: 0 18px; font-size: 14px; }

  /* 触摸反馈：按下变淡，并去掉触摸屏上会「粘住」的 hover 抬升 */
  .btn-primary:hover { transform: none; box-shadow: 0 1px 3px rgba(0,113,227,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
  .btn:active, .btn-mini:active, .btn-icon:active, .avatar-btn:active,
  .side-item:active, .stock-row:active, .seg button:active, .topbar .nav button:active { opacity: 0.72; }

  /* ---------- 顶栏：两行结构，导航等宽分段 ---------- */
  .topbar {
    height: auto; min-height: 58px;
    padding: 10px 14px; row-gap: 10px; column-gap: 8px;
    flex-wrap: wrap;
  }
  .topbar .logo { order: 1; font-size: 15px; }
  .topbar .right { order: 2; margin-left: auto; gap: 8px; font-size: 13px; }
  .topbar .nav { order: 3; width: 100%; margin-left: 0; padding: 4px; }
  .topbar .nav button {
    flex: 1 1 0; min-height: 36px; padding: 0 8px;
    font-size: 14px; font-weight: 500;
  }
  .topbar .user-chip { height: 32px; padding: 0 12px; font-size: 13px; max-width: 38vw; }
  .topbar .user-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .user-chip .role { font-size: 12px; white-space: nowrap; }
  .topbar .btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }

  /* ---------- 主体：侧栏变为顶部标签，内容区占满整行 ---------- */
  .admin-layout, .player-layout { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .admin-layout .sidebar, .player-layout .sidebar {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px;
    border-right: none; border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .sidebar .side-section { display: none; }
  .sidebar .side-item {
    flex: 0 0 auto; margin-bottom: 0;
    min-height: 40px; padding: 0 16px;
    font-size: 14px; font-weight: 500;
    background: rgba(118,118,128,0.10);
  }
  .sidebar .side-item.active { background: var(--color-primary-subtle); color: var(--color-primary); font-weight: 600; }
  .sidebar .side-item .ico { width: auto; }
  .player-layout .sidebar > .card { flex: 1 1 100%; margin: 0 0 8px; }

  .admin-main, .player-layout .main { padding: 18px 16px 28px; }

  /* 下单面板不再固定吸顶，改为跟随页面滚动 */
  .player-layout .panel {
    position: static; height: auto; overflow: visible;
    border-left: none; border-top: 1px solid rgba(0,0,0,0.05);
    padding: 20px 16px 32px;
  }

  /* ---------- 卡片、统计卡与页面标题 ---------- */
  .card { padding: 20px 18px; border-radius: 20px; }
  body.compact .card { padding: 20px 18px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .stat-card .label { font-size: 13px; }
  .stat-card .value { font-size: 26px; }
  body.compact .stat-card .value { font-size: 26px; }
  .page-title { font-size: 21px; }
  .card-title { flex-wrap: wrap; gap: 8px; font-size: 18px; }
  .row-between:has(.page-title) { flex-direction: column; align-items: flex-start; gap: 10px; }
  .toolbar .input { width: 100% !important; }
  .form-grid, .profile-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid { gap: 0; padding-top: 18px; }
  .about-block + .about-block { margin-top: 24px; }
  .people-row { padding: 14px 16px; }
  .people-avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 16px; }
  .dev-card { padding: 20px 18px 22px; border-radius: 18px; }
  .about-section p, .about-list li { font-size: 14px; line-height: 2; }
  .inline-form .form-field { min-width: 100%; }

  /* ---------- 表单与弹窗按钮：整行宽，符合 iOS 操作习惯 ---------- */
  .form-actions { flex-direction: column; gap: 10px; }
  .form-actions .btn { width: 100%; }
  .modal .actions { flex-direction: column; gap: 10px; }
  .modal .actions .btn { width: 100%; height: 48px; font-size: 16px; }

  /* 头像菜单：放大到 iOS 列表的触摸尺寸 */
  .user-menu { width: min(280px, calc(100vw - 24px)); border-radius: 20px; padding: 10px; }
  .user-menu-item { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .user-menu-avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
  .user-menu-head { padding: 10px 12px 14px; }

  /* ---------- 行情列表：收起成交量列，行更高更好点 ---------- */
  .stock-row {
    grid-template-columns: minmax(0, 1fr) 84px 74px; gap: 10px;
    padding: 0 14px; height: 64px;
  }
  .stock-row .name { font-size: 16px; }
  .stock-row .v { font-size: 16px; }
  .stock-row > div:nth-child(4) { display: none; }

  /* ---------- 公告 ---------- */
  .notice-item { padding: 20px 0; }
  .notice-item .title { font-size: 17px; }

  /* ---------- 数据表：容器横向滚动，按列数给最小宽度，避免被挤成一列一个字
     不支持 :has() 的旧浏览器会退化为统一的 520px，仍然可用 ---------- */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table { min-width: 520px; }
  .table:not(:has(th:nth-child(5))) { min-width: 0; }
  .table:has(th:nth-child(7)) { min-width: 680px; }
  .table:has(th:nth-child(9)) { min-width: 840px; }
  .table th { padding: 0 12px 12px; font-size: 12.5px; }
  .table td { padding: 0 12px; height: 52px; font-size: 15px; }
  body.compact .table td { height: 50px; }

  /* ---------- 弹窗：铺满窄屏，内容超高时内部滚动 ---------- */
  .modal-mask { padding: 12px; }
  .modal, .modal-lg, .modal-md, .modal-about {
    width: calc(100vw - 24px); max-width: none;
    max-height: 88vh; overflow-y: auto;
    padding: 22px 18px; border-radius: 22px;
  }
}

@media (max-width: 560px) {
  .topbar .logo { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .badge { height: 24px; padding: 0 10px; font-size: 12px; }
  .admin-main, .player-layout .main { padding: 16px 14px 24px; }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 12.5px; }
  .card { padding: 18px 16px; }
  .stat-grid { gap: 12px; }
  .stat-card .label { font-size: 12.5px; margin-bottom: 8px; }
  .stat-card .value { font-size: 24px; }
  .sidebar .side-item { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
  .btn { height: 42px; padding: 0 20px; }
  .btn-lg { height: 50px; font-size: 16.5px; }
  .stock-row { height: 62px; grid-template-columns: minmax(0, 1fr) 78px 70px; }
  .table td { height: 50px; }
}

/* 窄屏兜底：单栏登录页（保留居中的精简品牌头，更像 App 登录页） */
@media (max-width: 880px) {
  .login-wrap { align-items: flex-start; padding: 24px 16px; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; width: min(460px, 100%); }
  .login-brand {
    align-items: center; text-align: center;
    padding: 30px 22px 6px;
    background: linear-gradient(180deg, #EAF3FE 0%, #FFFFFF 88%);
    border-right: none;
  }
  .login-brand .brand-head { justify-content: center; }
  .login-brand .brand-head-text { align-items: center; }
  .login-brand h1 { font-size: 26px; }
  .login-brand .brand-sub { margin-top: 12px; text-align: center; }
  .login-brand .brand-pills, .login-brand .brand-foot { display: none; }
  .login-body { padding: 26px 24px 34px; }
  .login-body .login-alt { position: static; margin-bottom: 16px; text-align: right; }
  .login-body .login-alt a { height: 40px; padding: 0 20px; font-size: 14px; }
}
