:root {
  --bg: #0f141c;
  --panel: #171d27;
  --line: #2a3342;
  --text: #e8eef8;
  --muted: #8a97ab;
  --accent: #2f6fe0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 220px;
  background: #121820; border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 6px;
}
.brand { font-weight: 700; font-size: 18px; margin-bottom: 18px; color: #fff; }
.sidebar a {
  color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 8px;
}
.sidebar a:hover, .sidebar a.on { background: #1c2634; color: #fff; }
.main { margin-left: 220px; min-height: 100vh; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 600; }
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: #121820; border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 12px 6px 6px; cursor: pointer;
  font-size: 13px; line-height: 1;
}
.user-trigger:hover, .user-menu.open .user-trigger {
  border-color: #4a5a72; background: #1c2634;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #5b8ff9, #2f6fe0);
  color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chevron { color: var(--muted); transition: transform .15s ease; }
.user-menu.open .user-chevron { transform: rotate(180deg); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 8px; z-index: 100;
}
.user-dropdown-head {
  display: flex; flex-direction: column; gap: 4px; padding: 8px 10px;
}
.user-dropdown-label { color: var(--muted); font-size: 11px; }
.user-dropdown-head strong { font-size: 14px; font-weight: 600; }
.user-dropdown-divider { height: 1px; background: var(--line); margin: 4px 0; }
.user-dropdown-item {
  display: block; padding: 9px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 13px;
}
.user-dropdown-item:hover { background: #1c2634; color: #fff; }
button.user-dropdown-item {
  width: 100%; border: none; background: none; cursor: pointer;
  text-align: left; font-family: inherit;
}
.user-dropdown-item.danger { color: #ff8a8a; }
.user-dropdown-item.danger:hover { background: rgba(192,57,43,.18); color: #ffb3b3; }
.modal .form-error {
  color: #ff6b6b; font-size: 13px; margin: 0 0 10px;
}
.modal .hint { margin: 8px 0 0; }
.content { padding: 28px 32px 64px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 28px; margin-top: 8px; font-weight: 700; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.panel h3 { margin: 0 0 16px; font-size: 15px; }
form { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; align-items: center; }
input, select, textarea, button {
  background: #10161f; border: 1px solid var(--line); color: #fff;
  border-radius: 8px; padding: 9px 12px; font-size: 13px;
}
button, .btn {
  background: var(--accent); border: none; color: #fff; cursor: pointer;
  padding: 9px 18px; border-radius: 8px; line-height: 1.4;
}
.btn-primary { background: var(--accent); }
.btn-danger { background: #c0392b; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn-ghost:hover { border-color: #4a5a72; background: rgba(255,255,255,.04); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-warn { background: #c47d1a; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.toolbar .spacer { flex: 1; min-width: 8px; }
.toolbar input, .toolbar select { min-width: 180px; }
.ops { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ops form { margin: 0; display: inline-flex; }
td > form { display: inline-flex; margin: 0; }

.user-page .panel { padding: 0; overflow: hidden; }
.user-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.user-toolbar .filter-group {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px; flex: 1 1 520px; margin: 0; min-width: 0;
}
.user-toolbar .filter-actions {
  display: flex; align-items: center; gap: 12px;
}
.user-toolbar > .btn-primary {
  flex: 0 0 auto; margin-left: auto;
}
.user-toolbar .filter-group input { width: 280px; min-width: 200px; height: 40px; box-sizing: border-box; }
.user-toolbar select { min-width: 148px; height: 40px; }
.user-toolbar .btn,
.user-toolbar button {
  height: 40px; padding: 0 20px; white-space: nowrap;
}
.user-list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 28px 6px;
}
.user-list-head h3 { margin: 0; font-size: 15px; }
.table-wrap { overflow-x: auto; padding: 8px 16px 20px; }
.table-wrap table { min-width: 960px; }
.table-wrap th, .table-wrap td { padding: 18px 16px; }
.table-wrap tbody tr:hover { background: rgba(255,255,255,.025); }
.table-wrap tbody tr.is-off { opacity: .72; }
.col-id { width: 72px; color: var(--muted); }
.col-avatar {
  width: 64px;
  text-align: center;
  vertical-align: middle;
}
.col-nickname {
  min-width: 120px;
  max-width: 200px;
  vertical-align: middle;
}
.user-avatar-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  background: #121820;
  border: 1px solid #2a3344;
}
.avatar-upload .cover-upload-card {
  border-radius: 50%;
}
.avatar-upload .cover-upload-trigger {
  border-radius: 50%;
}
.avatar-upload .cover-upload-preview,
.avatar-upload .cover-upload-preview img {
  border-radius: 50%;
}
.col-time { white-space: nowrap; color: var(--muted); }
.col-ops { min-width: 420px; width: 420px; text-align: right; }
.cell-phone { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.table-ops {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; flex-wrap: wrap;
}
.table-ops .ops-group {
  display: flex; align-items: center; gap: 6px;
}
.table-ops form,
.ops-form {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0;
  vertical-align: middle;
}
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-ops button,
.btn-link {
  background: transparent !important;
  border: none !important;
  box-shadow: none;
  color: #8fb4ff;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  font-family: inherit;
  height: auto;
  min-width: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.table-ops button:hover,
.btn-link:hover { background: rgba(47,111,224,.14) !important; color: #fff; }
.btn-link.warn,
.table-ops .warn { color: #e8b86d; }
.btn-link.warn:hover,
.table-ops .warn:hover { background: rgba(196,125,26,.16) !important; color: #ffd48a; }
.btn-link.muted,
.table-ops .muted { color: var(--muted); }
.btn-link.muted:hover,
.table-ops .muted:hover { background: rgba(255,255,255,.06) !important; color: #fff; }
.btn-link.ok,
.table-ops .ok { color: #3ecf8e; }
.btn-link.ok:hover,
.table-ops .ok:hover { background: rgba(62,207,142,.14) !important; color: #6ee8b0; }
.btn-link.danger,
.table-ops .danger { color: #ff8a8a; }
.btn-link.danger:hover,
.table-ops .danger:hover { background: rgba(192,57,43,.16) !important; color: #ffb0b0; }
.btn-split {
  width: 1px; height: 16px; flex-shrink: 0;
  background: var(--line); margin: 0 10px;
}
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px;
}
.badge-ok { background: rgba(62,207,142,.15); color: #3ecf8e; }
.badge-off { background: rgba(255,123,123,.15); color: #ff7b7b; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-mask[hidden] { display: none; }
.modal {
  width: 420px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px;
  max-height: calc(100vh - 48px); overflow: auto;
}
.modal.modal-lg { width: 560px; }
.modal.modal-xl {
  width: min(1360px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  min-height: min(820px, calc(100vh - 28px));
  padding: 22px 28px 18px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 28px);
  overflow: hidden;
}
.modal.modal-xl form {
  display: flex; flex-direction: column; min-height: 0; flex: 1;
  overflow: hidden;
}
.modal.modal-xl > h3,
.modal.modal-xl form > h3 {
  flex-shrink: 0;
}
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.modal input, .modal select, .modal textarea { width: 100%; box-sizing: border-box; }
.modal textarea { resize: vertical; min-height: 120px; }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
  align-items: start;
}
.modal-grid > div { min-width: 0; }
.modal-grid-3 {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 1.3fr;
  gap: 0 14px;
}
.feed-edit-meta {
  flex-shrink: 0;
  padding-bottom: 4px;
}
.feed-edit-meta > label:first-of-type { margin-top: 0; }
.feed-edit-meta .modal-grid label,
.feed-edit-meta .modal-grid-3 label {
  margin-top: 8px;
}
.cover-upload {
  position: relative;
}
.cover-upload-card {
  position: relative;
  width: 148px;
  height: 148px;
  border: 1px dashed #434f63;
  border-radius: 10px;
  background: #121820;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.cover-upload-card:hover {
  border-color: #5b8ff9;
}
.cover-upload-card.is-dragover {
  border-color: var(--accent);
  background: rgba(47, 111, 224, .1);
  box-shadow: 0 0 0 2px rgba(47, 111, 224, .25);
}
.cover-upload-card.is-uploading {
  pointer-events: none;
}
.cover-upload-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}
.cover-upload-trigger:focus {
  outline: none;
}
.cover-upload-trigger:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(47, 111, 224, .45);
}
.cover-upload-svg {
  width: 36px;
  height: 36px;
  color: #8a97ab;
  margin-bottom: 2px;
}
.cover-upload-title {
  color: #c9d4e4;
  font-size: 13px;
  font-weight: 500;
}
.cover-upload-tip {
  font-size: 11px;
  color: var(--muted);
}
.cover-upload-preview {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.cover-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-upload-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  transition: opacity .2s ease;
}
.cover-upload-preview:hover .cover-upload-actions {
  opacity: 1;
}
.cover-upload-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.cover-upload-btn svg {
  width: 16px;
  height: 16px;
}
.cover-upload-btn:hover {
  background: rgba(255, 255, 255, .24);
  transform: translateY(-1px);
}
.cover-upload-btn.danger:hover {
  background: rgba(220, 53, 69, .85);
}
.cover-upload-loading[hidden] {
  display: none !important;
}
.cover-upload-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 20, 28, .82);
  color: #c9d4e4;
  font-size: 12px;
}
.cover-upload-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cover-upload-spin .75s linear infinite;
}
@keyframes cover-upload-spin {
  to { transform: rotate(360deg); }
}
.cover-preview-mask {
  z-index: 1200;
}
.cover-preview-box {
  position: relative;
  max-width: min(92vw, 960px);
  max-height: min(88vh, 720px);
  padding: 8px;
  background: #121820;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}
.cover-preview-box img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 32px);
  border-radius: 8px;
}
.cover-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #1c2634;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-preview-close:hover {
  background: #2a3545;
}
.modal-body-editor {
  display: flex; flex-direction: column; flex: 1 1 auto;
  min-height: 0; margin-top: 6px;
  overflow: hidden;
}
.modal-body-editor label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-shrink: 0; margin-top: 4px;
}
.modal-body-editor .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.modal-body-editor textarea {
  flex: 1 1 auto;
  min-height: 360px;
  width: 100%;
  resize: vertical;
  line-height: 1.75; font-size: 14px; padding: 14px 16px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
  overflow: auto;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
@media (max-width: 1280px) {
  .modal.modal-xl { width: calc(100vw - 32px); }
}
@media (max-width: 960px) {
  .modal.modal-xl {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-height: min(640px, calc(100vh - 20px));
    max-height: calc(100vh - 20px);
    padding: 18px 16px 14px;
    overflow: auto;
  }
  .modal.modal-xl form { overflow: visible; }
  .modal-grid,
  .modal-grid-3 { grid-template-columns: 1fr 1fr; }
  .modal-body-editor { min-height: 280px; overflow: visible; }
  .modal-body-editor textarea { min-height: 260px; }
}
@media (max-width: 640px) {
  .modal-grid,
  .modal-grid-3 { grid-template-columns: 1fr; }
}
.confirm-msg {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7;
}
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-box {
  width: 360px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px;
}
.login-box h2 { margin: 0 0 18px; text-align: center; }
.login-box label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.login-box input { width: 100%; }
.login-box button { width: 100%; margin-top: 16px; padding: 12px; }
.error { color: #ff6b6b; font-size: 13px; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 12px; text-align: center; }
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 180px; }
  .main { margin-left: 180px; }
}

/* Dashboard */
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash-hero {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  background: linear-gradient(135deg, #1a2433 0%, #172033 55%, #15263a 100%);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
}
.dash-eyebrow { color: #7ea2e8; font-size: 12px; margin-bottom: 6px; letter-spacing: .04em; }
.dash-title { margin: 0; font-size: 22px; font-weight: 700; }
.dash-sub { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dash-hero-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.pill {
  background: rgba(47, 111, 224, .16); color: #c9dbff; border: 1px solid #2d4f86;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; white-space: nowrap;
}
.pill.muted { background: rgba(255,255,255,.04); color: var(--muted); border-color: var(--line); }
.cards-5 { grid-template-columns: repeat(5, 1fr); }
.card .num { font-size: 22px; }
.card-foot { margin-top: 10px; color: var(--muted); font-size: 12px; }
/* 盈亏：正红负绿（A股习惯） */
.card-foot.up, .up { color: #ff7b7b; }
.card-foot.down, .down { color: #3ecf8e; }
.dash .panel { margin-bottom: 0; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px;
}
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head a { color: var(--muted); text-decoration: none; }
.panel-head a:hover { color: #fff; }
.muted-sm { color: var(--muted); font-size: 12px; }
.chart-panel { min-height: 280px; }
.bars {
  display: flex; align-items: flex-end; gap: 6px; height: 200px;
  padding: 8px 4px 0; border-top: 1px solid transparent;
}
.bar-col {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px;
}
.bar {
  width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #5b8ff9, #2f6fe0);
  min-height: 4px;
}
.bars-accent .bar { background: linear-gradient(180deg, #5ee0b4, #2aa876); }
.bar-val { font-size: 11px; color: var(--muted); line-height: 1; }
.bar-label { font-size: 10px; color: var(--muted); transform: scale(.95); }
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.quick-card {
  display: block; text-decoration: none; color: inherit;
  background: #121820; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  transition: border-color .15s, transform .15s;
}
.quick-card:hover { border-color: #3b6fbf; transform: translateY(-1px); }
.quick-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.quick-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
table.compact th, table.compact td { padding: 8px 6px; font-size: 12px; }
.clip { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-hint { color: var(--muted); font-size: 13px; margin: 8px 0; text-align: center; }
@media (max-width: 1400px) {
  .cards-5 { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; }
  .dash-hero-meta { align-items: flex-start; }
}
@media (max-width: 960px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 动态资讯 */
.feed-page { display: flex; flex-direction: column; gap: 4px; }
.feed-module { padding: 0; overflow: hidden; }
.feed-module-head {
  padding: 18px 22px 8px;
  margin-bottom: 0;
  align-items: flex-start;
}
.feed-module-head h3 { font-size: 16px; margin-bottom: 4px; }
.feed-form {
  padding: 16px 22px 8px;
  border-bottom: 1px solid var(--line);
}
.feed-form .field {
  display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; min-width: 140px;
}
.feed-form .field.grow { flex: 2 1 260px; }
.feed-form .field.narrow { flex: 0 1 110px; min-width: 90px; }
.feed-form .field.block { width: 100%; margin-bottom: 12px; }
.feed-form .field label { font-size: 12px; color: var(--muted); line-height: 1.2; }
.feed-form .field input,
.feed-form .field select,
.feed-form .field textarea { width: 100%; }
.feed-form-actions { margin-bottom: 8px; }
.feed-table { padding: 4px 10px 12px; }
.feed-table table { min-width: 720px; }
.feed-table .col-sort { width: 56px; color: var(--muted); }
.feed-table .col-cover { width: 72px; vertical-align: middle; }
.feed-table .feed-cover-thumb {
  display: block;
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
}
.feed-table .cell-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }
.feed-table .cell-muted {
  color: var(--muted); max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-table tbody tr.is-editing { background: rgba(47,111,224,.08); }
.feed-table td.empty-hint { text-align: center; padding: 28px 12px; }
.feed-toolbar { border-bottom: 1px solid var(--line); }
.feed-module .user-list-head { padding-top: 18px; }

.toast {
  position: fixed; top: 24px; left: 50%; z-index: 1000;
  transform: translateX(-50%) translateY(-12px);
  padding: 12px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast:not([hidden]) {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.toast-success {
  background: #1a3d2e; border: 1px solid #2d6a4f; color: #95d5b2;
}
.toast-error {
  background: #3d1a1a; border: 1px solid #6a2d2d; color: #f5a5a5;
}

/* 持仓管理 */
.holding-page .holding-summary { margin-bottom: 20px; }
.holding-page .holding-summary .v { font-size: 22px; }
.holding-page .holding-user-name {
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}
.holding-page .panel { padding: 0; overflow: hidden; }
.holding-toolbar .filter-group .holding-user-combobox {
  position: relative;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
}
.holding-toolbar .user-combobox-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
}
.user-combobox-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #121820; border: 1px solid var(--line); border-radius: 10px;
  max-height: 280px; overflow: auto; z-index: 60;
  box-shadow: 0 12px 28px rgba(0,0,0,.35); padding: 6px;
}
.user-combobox-item {
  width: 100%; display: block;
  background: transparent !important; border: none !important;
  color: var(--text); text-align: left; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.user-combobox-item:hover { background: rgba(47,111,224,.14) !important; }
.holding-page .table-wrap table { min-width: 1080px; }
.holding-page .col-ops {
  min-width: 140px;
  width: 140px;
  text-align: right;
  white-space: nowrap;
}
.holding-ops {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.holding-ops .btn-link {
  padding: 6px 10px;
}
.holding-page .cell-code {
  font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.holding-page .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 盈亏：正红负绿（A股习惯） */
.holding-page .up { color: #ff7b7b; }
.holding-page .down { color: #3ecf8e; }
.badge-mkt {
  background: rgba(47,111,224,.14); color: #8fb4ff;
  border-radius: 6px; padding: 2px 8px; font-size: 12px;
}
.holding-search { position: relative; }
.holding-search-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #121820; border: 1px solid var(--line); border-radius: 10px;
  max-height: 280px; overflow: auto; z-index: 60;
  box-shadow: 0 12px 28px rgba(0,0,0,.35); padding: 6px;
}
.holding-search-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent !important; border: none !important;
  color: var(--text); text-align: left; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.holding-search-item:hover { background: rgba(47,111,224,.14) !important; }
.holding-search-code {
  flex: 0 0 88px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.holding-search-name {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted);
}
.holding-last-row { display: flex; gap: 8px; align-items: center; }
.holding-last-row input { flex: 1 1 auto; min-width: 0; }
.holding-last-row .btn-sm {
  flex: 0 0 auto; height: 38px; padding: 0 12px; white-space: nowrap;
}
#holdingModal .modal-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
#holdingModal .hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .holding-summary { grid-template-columns: 1fr 1fr; }
  #holdingModal .modal-grid-3 { grid-template-columns: 1fr; }
}

/* 期权激励 */
.esop-page .esop-summary { margin-bottom: 20px; }
.esop-page .esop-summary .v { font-size: 22px; }
.esop-page .esop-user-name {
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}
.esop-page .esop-vest-split {
  display: flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums;
}
.esop-page .esop-vest-split .sep { color: var(--muted); font-weight: 400; }
.esop-page .esop-vest-split .muted-val { color: var(--muted); font-weight: 600; }
.esop-page .num { font-variant-numeric: tabular-nums; }
.esop-page .esop-vest-split .vested { color: #3ecf8e; font-weight: 700; }
.esop-page .panel { padding: 0; overflow: hidden; }
.esop-toolbar .filter-group {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  flex: 1 1 280px; margin: 0; min-width: 0;
}
.esop-toolbar .filter-group .esop-user-combobox {
  position: relative;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
}
.esop-toolbar .user-combobox-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
}
.esop-section {
  padding: 0 0 8px;
  border-top: 1px solid var(--line);
}
.esop-section .user-list-head { padding-top: 22px; }
.esop-section-last { padding-bottom: 8px; }
.esop-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 28px 20px;
}
.esop-metrics-grid .field {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.esop-metrics-grid .field label {
  font-size: 12px; color: var(--muted); line-height: 1.2;
}
.esop-metrics-grid .field input { width: 100%; box-sizing: border-box; }
.esop-metrics-grid .field input[readonly] {
  background: rgba(47, 111, 224, .1);
  border-color: rgba(47, 111, 224, .28);
  color: var(--text);
  cursor: default;
}
.esop-metrics-grid .field input.esop-invalid {
  border-color: #e85d5d;
}
.esop-vest-hint {
  margin: -8px 28px 16px;
  font-size: 12px;
  line-height: 1.4;
}
.esop-vest-hint.esop-invalid { color: #e85d5d; }
.esop-grant-wrap { padding-top: 0; }
.esop-grant-table { min-width: 860px; }
.esop-grant-table th.col-idx,
.esop-grant-table td.col-idx {
  width: 44px; text-align: center; color: var(--muted);
}
.esop-grant-table td { vertical-align: middle; }
.esop-grant-table input,
.esop-grant-table select {
  width: 100%; box-sizing: border-box; min-width: 0;
}
.esop-grant-table .col-ops {
  width: 72px; text-align: right; white-space: nowrap;
}
.esop-grant-actions {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 28px 20px;
}
.esop-policy-box { padding: 8px 28px 0; }
.esop-policy-box textarea {
  width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical;
  line-height: 1.55;
}
.esop-footer-actions {
  display: flex; justify-content: flex-end;
  padding: 16px 28px 24px;
}
.esop-plan-bar {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 28px 0;
  border-top: 1px solid var(--line);
}
.esop-plan-panel {
  padding: 0 0 8px;
  border-top: 1px solid var(--line);
}
.esop-plan-head { padding: 16px 28px 0; }
.esop-plan-tabs-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 28px 0;
}
.esop-plan-tabs {
  display: flex; flex-wrap: wrap; gap: 10px;
  flex: 1 1 auto; min-width: 0;
}
.esop-plan-ops {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.esop-plan-actions-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 20px 28px 20px;
}
.esop-plan-add-btn {
  flex-shrink: 0;
  min-height: 42px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1.3;
}
.esop-plan-tab {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none;
  background: rgba(255,255,255,0.02); transition: border-color .15s, color .15s, background .15s;
  box-sizing: border-box;
}
.esop-plan-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.esop-plan-tab.on {
  color: #fff; border-color: #3ecf8e; background: rgba(62,207,142,0.12); font-weight: 600;
}
.esop-plan-hint { margin: 0; padding-bottom: 6px; }
.esop-inline-form {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
}
.esop-section-first { border-top: none; }
.esop-empty-hint {
  padding: 40px 28px 48px; text-align: center; color: var(--muted);
}
.esop-empty-hint p { margin: 0 0 16px; }
@media (max-width: 900px) {
  .esop-summary { grid-template-columns: 1fr 1fr; }
  .esop-metrics-grid { grid-template-columns: 1fr 1fr; padding-left: 16px; padding-right: 16px; }
  .esop-toolbar .filter-group .esop-user-combobox {
    width: 100%; min-width: 0; max-width: none; flex: 1 1 100%;
  }
  .esop-grant-actions,
  .esop-policy-box,
  .esop-footer-actions,
  .esop-plan-head,
  .esop-plan-tabs-bar,
  .esop-plan-actions-bar { padding-left: 16px; padding-right: 16px; }
}
