/* =========================================================
   从蓉数字科技 · 内容管理后台
   ========================================================= */

:root {
  --a-bg: #f3f6fa;
  --a-panel: #ffffff;
  --a-ink: #0d1f30;
  --a-ink-soft: #5b7085;
  --a-line: #e2eaf1;
  --a-line-soft: #edf3f8;
  --a-accent: #0aa5c9;
  --a-accent-2: #2ed3ff;
  --a-violet: #7c5cff;
  --a-danger: #e2536c;
  --a-sidebar: #071628;
  --a-font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --a-mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  --a-radius: 14px;
  --a-shadow: 0 10px 30px rgba(13, 31, 48, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--a-font);
  background: var(--a-bg);
  color: var(--a-ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

::selection { background: rgba(46, 211, 255, 0.3); }

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

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-aside {
  position: relative;
  overflow: hidden;
  padding: 46px 56px;
  display: flex;
  flex-direction: column;
  color: #eaf8ff;
  background:
    radial-gradient(700px 500px at 85% 15%, rgba(46, 211, 255, 0.18), transparent 60%),
    radial-gradient(600px 500px at 0% 90%, rgba(124, 92, 255, 0.2), transparent 60%),
    linear-gradient(160deg, #061426, #04101f);
}

.login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 186, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 186, 224, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.brand-mark {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--a-accent-2);
  background: rgba(46, 211, 255, 0.08);
  border: 1px solid rgba(46, 211, 255, 0.26);
}

.brand-mark svg { width: 30px; height: 30px; }

.login-brand b { display: block; font-size: 17px; letter-spacing: 0.02em; }
.login-brand i {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(160, 200, 225, 0.62);
  margin-top: 4px;
}

.login-copy {
  margin-top: auto;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
  max-width: 470px;
}

.login-kicker {
  font-family: var(--a-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #7fe3ff;
  display: block;
  margin-bottom: 18px;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #ffffff, #a9e6ff 65%, #b7a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-copy p {
  margin: 22px 0 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(180, 214, 234, 0.72);
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  font-size: 12px;
  color: rgba(200, 230, 245, 0.75);
}

.login-points span { display: inline-flex; align-items: center; gap: 8px; }

.login-points i {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(46, 211, 255, 0.4);
  background: rgba(46, 211, 255, 0.13);
  position: relative;
}

.login-points i::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--a-accent-2);
}

.login-orbit {
  position: absolute;
  width: 460px; height: 460px;
  right: -160px; bottom: -180px;
  border-radius: 50%;
  border: 1px solid rgba(46, 211, 255, 0.16);
  box-shadow: inset 0 0 90px rgba(46, 211, 255, 0.07);
}

.login-orbit::after {
  content: "";
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px dashed rgba(124, 92, 255, 0.25);
}

.login-back {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(180, 214, 234, 0.66);
  width: fit-content;
}

.login-back:hover { color: #9fe9ff; }
.login-back svg { width: 16px; height: 16px; }

.login-main {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #f6f9fc;
}

.login-card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 70px rgba(13, 31, 48, 0.1);
  border: 1px solid #e9f0f6;
}

.login-card .login-kicker { color: #0f8cae; margin-bottom: 12px; }

.login-card h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  color: var(--a-ink);
}

.login-tip {
  margin: 10px 0 28px;
  font-size: 12.5px;
  color: #7c8fa1;
  line-height: 1.7;
}

.login-card label {
  display: block;
  margin-bottom: 18px;
}

.login-card label span {
  display: block;
  font-size: 12px;
  color: #4f657a;
  margin-bottom: 8px;
}

.login-card input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dbe6ee;
  border-radius: 10px;
  font-size: 14px;
  color: var(--a-ink);
  background: #f8fbfd;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-card input:focus {
  border-color: #42c5e8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 211, 255, 0.15);
}

.btn-login {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  color: #04121f;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(120deg, #8fe9ff, #2ed3ff 55%, #8c7bff);
  box-shadow: 0 12px 30px rgba(46, 211, 255, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(46, 211, 255, 0.32); }
.btn-login:disabled { opacity: 0.7; cursor: default; transform: none; }
.btn-login svg { width: 18px; height: 18px; }

.login-error {
  min-height: 18px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--a-danger);
  line-height: 1.5;
}

.login-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #9aabba;
  text-align: center;
}

/* ---------------- 后台框架 ---------------- */

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

.sidebar {
  width: 252px;
  flex: 0 0 252px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  color: #dceefb;
  background:
    radial-gradient(400px 300px at 100% 0%, rgba(46, 211, 255, 0.1), transparent 60%),
    linear-gradient(180deg, #07192c, #05101f);
  border-right: 1px solid rgba(126, 186, 224, 0.1);
  z-index: 80;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 22px 22px;
  border-bottom: 1px solid rgba(126, 186, 224, 0.1);
}

.sidebar-brand .brand-mark { width: 38px; height: 38px; flex: 0 0 auto; }
.sidebar-brand .brand-mark svg { width: 26px; height: 26px; }
.sidebar-brand b { display: block; font-size: 15px; }
.sidebar-brand i {
  display: block;
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: rgba(160, 200, 225, 0.5);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 20px;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(150, 190, 214, 0.45);
  padding: 0 10px;
  margin-bottom: 8px;
  font-family: var(--a-mono);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(206, 233, 248, 0.72);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: 0.8; }

.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.nav-item.active {
  background: linear-gradient(90deg, rgba(46, 211, 255, 0.16), rgba(124, 92, 255, 0.1));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--a-accent-2);
}

.nav-item .badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2536c;
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.sidebar-foot {
  padding: 16px 14px 22px;
  border-top: 1px solid rgba(126, 186, 224, 0.1);
  display: grid;
  gap: 6px;
}

.sidebar-foot a,
.sidebar-foot button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(180, 214, 234, 0.6);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s;
}

.sidebar-foot svg { width: 15px; height: 15px; }
.sidebar-foot a:hover, .sidebar-foot button:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

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

.topbar {
  height: 74px;
  flex: 0 0 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--a-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--a-line);
  background: #fff;
  border-radius: 9px;
  color: #4f657a;
  cursor: pointer;
  padding: 0;
  place-items: center;
}

.menu-btn svg { width: 20px; height: 20px; }

.topbar-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--a-ink);
}

.topbar-title span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: #8496a7;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #7c8fa1;
}

.sync-state i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2fbf8f;
}

.sync-state.dirty { color: #c07c1c; }
.sync-state.dirty i { background: #f0a83c; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--a-line);
  background: #fff;
  font-size: 12px;
  color: #4f657a;
}

.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04121f;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #8fe9ff, #2ed3ff);
}

.panel {
  padding: 26px 32px 56px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

/* ---------------- 通用组件 ---------------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head-left h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--a-ink);
}

.page-head-left p {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: #7c8fa1;
  line-height: 1.7;
  max-width: 640px;
}

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

.btn-save {
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  color: #04121f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, #8fe9ff, #2ed3ff 60%, #8c7bff);
  box-shadow: 0 8px 22px rgba(46, 211, 255, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}

.btn-save:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(46, 211, 255, 0.3); }
.btn-save:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-save svg { width: 15px; height: 15px; }

.btn-add, .btn-plain {
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid var(--a-line);
  background: #fff;
  color: #33506a;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.btn-add:hover, .btn-plain:hover { border-color: #9fd9e8; color: #0a7f9f; background: #f7fdff; }
.btn-add svg { width: 15px; height: 15px; }

.btn-danger-plain {
  border-color: #f3d4da;
  color: #c9445c;
  background: #fff;
}

.btn-danger-plain:hover { background: #fff5f7; border-color: #e9aebb; color: #b3344c; }

.card {
  background: var(--a-panel);
  border: 1px solid #e7eef5;
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
}

.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--a-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--a-ink);
}

.card-head span { font-size: 11.5px; color: #8a9dae; }

.card-body { padding: 22px; }

.empty-state {
  padding: 54px 20px;
  text-align: center;
  color: #93a5b6;
  font-size: 13px;
}

.empty-state b { display: block; font-size: 15px; color: #5b7085; margin-bottom: 8px; }

/* 表单 */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label,
.field > span {
  display: block;
  font-size: 12px;
  color: #4f657a;
  margin-bottom: 8px;
  font-weight: 500;
}

.field .hint {
  display: block;
  margin: 6px 0 0;
  font-size: 11px;
  color: #9aabba;
  line-height: 1.6;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #dbe6ee;
  border-radius: 9px;
  background: #f9fbfd;
  padding: 11px 13px;
  font-size: 13px;
  color: var(--a-ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  line-height: 1.6;
}

.field textarea { resize: vertical; min-height: 84px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #42c5e8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 211, 255, 0.13);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.field-grid-3 { grid-template-columns: repeat(3, 1fr); }

.field-wide { grid-column: 1 / -1; }

/* 图片上传 */

.image-field {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.image-preview {
  width: 148px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px dashed #c9dae6;
  background: repeating-conic-gradient(#f4f8fb 0% 25%, #eaf1f6 0% 50%) 50% / 16px 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #93a5b6;
  font-size: 11px;
}

.image-preview img { width: 100%; height: 100%; object-fit: cover; }

.image-actions { display: flex; flex-direction: column; gap: 8px; }
.image-actions .btn-plain { height: 34px; padding: 0 12px; font-size: 12px; }

/* 列表编辑器 */

.editor-list { display: grid; gap: 14px; }

.editor-card {
  border: 1px solid #e7eef5;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.editor-card:hover { border-color: #cfe4ef; }

.editor-card.open { border-color: #bfe6f2; box-shadow: 0 10px 30px rgba(13, 31, 48, 0.05); }

.editor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  background: #fbfdff;
}

.editor-head:hover { background: #f6fbfe; }

.drag-index {
  font-family: var(--a-mono);
  font-size: 10px;
  color: #9aabba;
  width: 22px;
  flex: 0 0 auto;
}

.editor-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-title h5 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--a-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-title .mini-tag {
  font-size: 10px;
  color: #0f8cae;
  background: #edfaff;
  border: 1px solid #d3f0fa;
  padding: 2px 7px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.editor-head-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #8a9dae;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.mini-btn:hover { background: #eef7fb; color: #0a8cae; border-color: #d8ecf5; }
.mini-btn.danger:hover { background: #fff2f5; color: #d0405a; border-color: #f2d2d9; }
.mini-btn svg { width: 15px; height: 15px; }

.chevron { transition: transform 0.22s; }
.editor-card.open .chevron { transform: rotate(180deg); }

.editor-body {
  display: none;
  padding: 20px 18px 6px;
  border-top: 1px solid var(--a-line-soft);
}

.editor-card.open .editor-body { display: block; }

/* 概览 */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.ov-tile {
  position: relative;
  padding: 20px 22px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #e7eef5;
  box-shadow: var(--a-shadow);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.ov-tile:hover {
  transform: translateY(-3px);
  border-color: #bfe6f2;
  box-shadow: 0 16px 36px rgba(13, 31, 48, 0.09);
}

.ov-tile .tile-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #0a8cae;
  background: #eaf9fe;
  border: 1px solid #d3f0fa;
  margin-bottom: 16px;
}

.ov-tile .tile-icon svg { width: 17px; height: 17px; }

.ov-tile .tile-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--a-ink);
  line-height: 1;
  font-family: var(--a-mono);
}

.ov-tile .tile-label {
  margin-top: 8px;
  font-size: 12px;
  color: #7c8fa1;
}

.ov-tile .tile-link {
  position: absolute;
  right: 18px; top: 20px;
  font-size: 10px;
  color: #a9bacb;
  font-family: var(--a-mono);
}

.ov-columns {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
}

.ov-card { border-radius: 13px; }

.message-list { display: grid; gap: 10px; }

.message-item {
  padding: 15px 18px;
  border-radius: 10px;
  border: 1px solid #e7eef5;
  background: #fbfdff;
  transition: border-color 0.18s, background 0.18s;
}

.message-item.unread {
  background: #f8fdff;
  border-left: 3px solid var(--a-accent-2);
  border-color: #d6eef6;
}

.message-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.message-top b { font-size: 13px; color: var(--a-ink); }
.message-top .contact { font-size: 11.5px; color: #0a8cae; }
.message-top time { margin-left: auto; font-size: 11px; color: #9aabba; }
.message-company { font-size: 11px; color: #8496a7; }

.message-text {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #5b7085;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-actions { display: flex; gap: 8px; margin-top: 10px; }

.tiny-btn {
  height: 27px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--a-line);
  background: #fff;
  color: #5b7085;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.16s;
}

.tiny-btn:hover { border-color: #9fd9e8; color: #0a7f9f; }
.tiny-btn.danger:hover { border-color: #e9aebb; color: #c9445c; background: #fff7f9; }

.quick-list { display: grid; gap: 8px; }

.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--a-line-soft);
  border-radius: 9px;
  background: #fbfdff;
  font-size: 12px;
  color: #445b70;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s;
}

.quick-item:hover { border-color: #bfe6f2; background: #f7fdff; color: #0a7f9f; }
.quick-item svg { width: 16px; height: 16px; color: #0a8cae; }
.quick-item span { flex: 1; }
.quick-item em { font-style: normal; color: #a9bacb; font-size: 10px; }

/* 留言页 */

.msg-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--a-line);
}

.segmented button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  color: #7c8fa1;
  cursor: pointer;
}

.segmented button.active { background: #eaf9fe; color: #0a8cae; font-weight: 500; }

.messages-page { display: grid; gap: 12px; }

/* 账号安全 / 接口 */

.settings-card { max-width: 880px; }

/* 首页影像 */

.hero-video-list { display: grid; gap: 20px; }

.hero-video-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: center;
}

.hero-video-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: #33506a;
}

.hero-video-head b { font-weight: 600; }
.hero-video-head span { font-size: 11px; color: #8fa4b6; }

.hero-video-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed #cfe0ec;
  background: linear-gradient(160deg, #0b2236, #071a2c 60%, #0a2a42);
  display: grid;
  place-items: center;
  color: #8fb4cc;
  font-size: 12px;
  text-align: center;
  padding: 16px;
}

.hero-video-preview.has-video { border-style: solid; border-color: #d6e6f0; background: #04101c; }

.hero-video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-side { display: grid; gap: 12px; }
.hero-video-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn-plain.danger { border-color: #f3d4da; color: #c9445c; }
.btn-plain.danger:hover { background: #fff5f7; border-color: #e9aebb; color: #b3344c; }
.btn-plain:disabled { opacity: 0.5; cursor: default; }

.api-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.api-table th,
.api-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--a-line-soft);
  vertical-align: top;
}

.api-table th {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #7c8fa1;
  background: #fafcfe;
  font-weight: 600;
}

.api-table td code {
  font-family: var(--a-mono);
  font-size: 12px;
  color: #0d5c73;
  background: #f0fafd;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.api-method {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: var(--a-mono);
  font-size: 10px;
  font-weight: 600;
}

.api-method.get { background: #e9f7ee; color: #1d8a4e; }
.api-method.post { background: #eaf2ff; color: #2a5cc4; }
.api-method.put { background: #fff5e5; color: #a9701a; }
.api-method.patch { background: #f3ecff; color: #6a44c0; }
.api-method.delete { background: #ffecef; color: #c03a51; }

.api-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f7fbfe;
  border: 1px solid #e3eef5;
  font-size: 11.5px;
  line-height: 1.8;
  color: #5b7085;
}

.api-note code { font-family: var(--a-mono); color: #0d5c73; }

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  padding: 12px 22px;
  border-radius: 9px;
  background: rgba(8, 24, 40, 0.95);
  border: 1px solid rgba(126, 186, 224, 0.28);
  color: #eaf8ff;
  font-size: 13px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100% - 40px);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255, 120, 140, 0.45); }
.toast.success { border-color: rgba(60, 220, 160, 0.45); }

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(7, 20, 36, 0.4);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
}

.loading-box {
  background: #fff;
  border-radius: 14px;
  padding: 26px 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.spinner {
  display: inline-block;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid #e2eaf1;
  border-top-color: var(--a-accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-box p { margin: 12px 0 0; font-size: 12px; color: #7c8fa1; }

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

.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 14, 26, 0.4);
  backdrop-filter: blur(2px);
}

@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .ov-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .login-view { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-main { min-height: 100vh; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
  }

  .sidebar.open { transform: none; }
  .sidebar-mask.show { display: block; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 18px; }
  .panel { padding: 20px 18px 48px; }
  .sync-state { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid-3 { grid-template-columns: 1fr; }
  .hero-video-item { grid-template-columns: 1fr; }
} 

@media (max-width: 620px) {
  .topbar-title span { display: none; }
  .topbar { height: 66px; flex-basis: 66px; gap: 12px; }
  .topbar-title h2 { font-size: 16px; }
  .topbar-right { gap: 8px; }
  .user-chip #usernameLabel { display: none; }
  .overview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ov-tile { padding: 16px; }
  .ov-tile .tile-value { font-size: 24px; }
  .page-head { flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .btn-save { flex: 1; }
  .image-preview { width: 110px; height: 76px; }
  .editor-body { padding: 16px 14px 4px; }
  .card-body { padding: 16px; }
  .card-head { padding: 15px 16px; }
  .api-table { display: block; overflow-x: auto; white-space: nowrap; }
  .login-card { padding: 32px 24px 26px; }
}
