:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #185fa5;
  --primary-dark: #0c447c;
  --border: #e5e7eb;
  --sidebar-bg: #12325a;
  --sidebar-text: #b9c9dd;
  --sidebar-active: #1b4b85;
  --green: #0f6e56;
  --amber: #854f0b;
  --gray: #5f5e5a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang HK", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── 布局 ─────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.main-inner {
  width: 100%;
  max-width: 1500px;
  padding: 32px 28px 48px;
}

/* ── 侧边栏 ───────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2f6bb3;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name { font-size: 17px; font-weight: 700; color: #fff; }
.brand-sub { font-size: 12px; color: #7d93b2; margin-top: 1px; }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 2px;
  transition: background .12s ease;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item.active .nav-icon { background: rgba(255,255,255,.16); }

.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-dot.online { background: #5dcaa5; }
.nav-dot.dev    { background: #ef9f27; }
.nav-dot.todo   { background: #5f6b7d; }

.sidebar-footer {
  padding: 14px 18px;
  font-size: 12px;
  color: #5f769a;
  border-top: 1px solid rgba(255,255,255,.08);
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ── 内容区 ───────────────────────────────── */
.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: 24px; font-weight: 700; }

.badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
}
.badge.online { background: #e1f5ee; color: var(--green); }
.badge.dev    { background: #faeeda; color: var(--amber); }
.badge.todo   { background: #f1efe8; color: var(--gray); }

/* 总览卡片 */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.overview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.overview-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }

.overview-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.overview-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #e6f1fb;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overview-name { font-size: 17px; font-weight: 700; }
.overview-desc { font-size: 14px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* 开发中占位 */
.placeholder {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 64px 24px;
  text-align: center;
}
.placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f1efe8;
  color: var(--gray);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.placeholder h2 { font-size: 18px; margin-bottom: 8px; }
.placeholder p { font-size: 14px; color: var(--muted); max-width: 420px; margin: 0 auto; }
.placeholder-note { margin-top: 12px; font-size: 12px !important; }

/* ── 手机端 ───────────────────────────────── */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 24px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .main-inner { padding: 68px 16px 40px; }
  .overview-grid { grid-template-columns: 1fr; }
}

/* ── 发票工具 ─────────────────────────────── */
.invoice-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.invoice-filter label {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.invoice-filter select {
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.invoice-sync { margin-left: auto; font-size: 13.5px; color: var(--muted); }

.unit-list { display: flex; flex-direction: column; gap: 12px; }

.unit-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.unit-main { flex: 1; min-width: 0; }
.unit-title { display: flex; align-items: center; gap: 10px; }
.unit-title h2 { font-size: 17px; font-weight: 700; }
.unit-kind {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.unit-kind.kind-b { background: #e1f5ee; color: var(--green); }
.unit-kind.kind-a { background: #e6f1fb; color: var(--primary-dark); }
.unit-meta { display: flex; gap: 16px; margin-top: 7px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.unit-service { color: var(--primary); }

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease;
}
.btn:hover { background: var(--primary-dark); }

/* ── 发票设置页 ─────────────────────────── */
.settings-saved {
  background: #e1f5ee;
  color: var(--green);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
}
.st-tab {
  padding: 9px 18px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 9px 9px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.st-tab:hover { color: var(--text); background: var(--bg); }
.st-tab.active {
  color: var(--primary-dark);
  font-weight: 600;
  background: var(--card);
  border-bottom: 2px solid var(--primary);
}

.brand-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.brand-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.brand-card-head h2 { font-size: 17px; }
.brand-key {
  font-size: 11px;
  background: #f1efe8;
  color: var(--gray);
  padding: 2px 8px;
  border-radius: 20px;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}
.bf { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.bf input {
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.group-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.group-card-head h2 { font-size: 16px; }
.group-meta { font-size: 13px; color: var(--muted); line-height: 1.7; }
.group-meta strong { color: var(--text); }
.inst-list {
  margin: 6px 0 0 18px;
  columns: 2;
  column-gap: 24px;
}
.inst-list li { font-size: 13px; }

.settings-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.settings-table th, .settings-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.settings-table th { background: var(--bg); font-weight: 600; }
.settings-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.page-head-btn { margin-left: auto; }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-ghost:hover { background: #e6f1fb; }

/* ── 侧边栏子菜单 ───────────────────────── */
.nav-caret {
  font-size: 10px;
  color: #7d93b2;
  transition: transform .15s ease;
  flex-shrink: 0;
  margin-left: 2px;
}
.nav-caret.open { transform: rotate(180deg); }

.nav-sub {
  display: none;
  margin: 2px 0 6px 14px;
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 12px;
}
.nav-sub.open { display: block; }
.nav-sub-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #9db1cc;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}
.nav-sub-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-sub-item.active { color: #fff; font-weight: 600; background: var(--sidebar-active); }

/* ── 批量导出 ───────────────────────────── */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  position: sticky;
  bottom: 12px;
}
.batch-count { font-size: 13px; color: var(--muted); }
.unit-check {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── 筛选栏扩展 ─────────────────────────── */
.filter-bar {
  flex-wrap: wrap;
  gap: 14px 24px;
}
.fb-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-label { font-size: 14px; color: var(--muted); }
.fb-radio {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.fb-radio input { accent-color: var(--primary); }
.fb-group select {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.fb-checks { gap: 14px; }
.fb-check {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.fb-check input { accent-color: var(--primary); }

.unit-btns { display: flex; gap: 8px; }
.unit-btns .btn { padding: 9px 14px; font-size: 13px; }

.fb-hint { font-size: 13px; color: var(--muted); }
.brand-fixed, .brand-follow {
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}
.brand-fixed { background: #faeeda; color: var(--amber); }
.brand-follow { background: #e6f1fb; color: var(--primary-dark); }

/* ── 发票预览弹窗 ───────────────────────── */
.preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 25, 45, 0.55);
  padding: 24px;
}
.preview-modal.open { display: flex; align-items: center; justify-content: center; }
.preview-box {
  width: 100%;
  max-width: 900px;
  height: 92vh;
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.preview-box iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

/* ── 设置页增删改 ───────────────────────── */
.btn-danger {
  background: #fcebeb;
  color: #a32d2d;
  border: 1px solid #f7c1c1;
}
.btn-danger:hover { background: #f7c1c1; color: #791f1f; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }

.add-card {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 16px;
}
.add-summary {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
}
.add-card form { margin-top: 14px; }
.add-card textarea {
  width: 100%;
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
}
.group-edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.group-edit .bf select, .add-card .bf select {
  font-size: 13.5px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

/* ── 设置页只读展示 + 编辑切换 ─────────── */
.brand-view, .group-view { margin-bottom: 6px; }
.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.kv-table th, .kv-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.kv-table th {
  width: 150px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.brand-edit, .job-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.job-edit-form .brand-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ── 品牌图片上传与预览 ─────────────────── */
.brand-img-row { display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.brand-img-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.img-label { font-size: 12.5px; color: var(--muted); }
.brand-img-item img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}
.upload-preview {
  margin-top: 6px;
  width: 90px;
  height: 90px;
  object-fit: contain;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}
.bf input[type="file"] {
  font-size: 12.5px;
  padding: 5px 0;
  border: none;
}

/* ── 社交发布台 ─────────────────────────── */
.poster-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
  align-items: start;
}
.poster-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.poster-form-card .bf { font-size: 13.5px; }
.poster-form-card .bf input[type="text"],
.poster-form-card select,
.poster-form-card textarea {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  resize: vertical;
}
.poster-platforms {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.poster-history {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.poster-history h3 { font-size: 15px; margin-bottom: 10px; }

.poster-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  max-width: 640px;
}
.result-brand { font-size: 14.5px; margin-bottom: 14px; color: var(--muted); }
.result-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.result-item.ok { border-color: #c0dd97; background: #f7fbf0; }
.result-item.fail { border-color: #f7c1c1; background: #fdf3f3; }
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.result-link { font-size: 13.5px; word-break: break-all; }
.result-link a { color: var(--primary); }
.result-err { font-size: 13px; color: #a32d2d; }

@media (max-width: 1000px) {
  .poster-layout { grid-template-columns: 1fr; }
}

/* 登录页 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.login-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 34px 38px; width: 340px; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.login-logo {
  width: 52px; height: 52px; border-radius: 14px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; margin-bottom: 14px;
}
.login-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.login-btn { width: 100%; margin-top: 16px; background: var(--primary); color: #fff; border: none; padding: 11px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-btn:hover { background: var(--primary-dark); }

/* 系统设置 */
.sys-users th, .sys-users td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.sys-users thead th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--bg); }
.sidebar-footer { font-size: 12px; color: var(--muted); padding: 10px 14px; }
.sf-user { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.sf-logout { color: var(--primary); text-decoration: none; display: inline-block; margin-bottom: 6px; }
.sf-logout:hover { text-decoration: underline; }

/* 系统设置：左侧竖排导航（与主侧边栏子菜单同款深蓝样式） */
.sys-layout { display: flex; gap: 18px; align-items: flex-start; }
.sys-nav {
  width: 176px; flex-shrink: 0; padding: 14px 10px;
  background: var(--sidebar-bg); border-radius: 14px;
  position: sticky; top: 16px;
}
.sys-nav-title {
  color: var(--sidebar-text); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; padding: 4px 12px 10px;
}
.sys-nav .nav-sub-item { display: block; cursor: pointer; }
.sys-content { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .sys-layout { flex-direction: column; }
  .sys-nav { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .sys-nav .nav-sub-item { flex: 1; min-width: 120px; text-align: center; }
}

/* 权限勾选：工具 + 子页两级 */
.perm-tool {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.perm-tool .perm-main { font-weight: 700; }
.perm-subs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.perm-subs .pub-chip { font-size: 12px; padding: 4px 10px; opacity: .85; }
.pub-chip {
  display: inline-block; padding: 5px 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--card);
  color: var(--text); cursor: pointer; user-select: none;
}
.pub-chip:hover { border-color: var(--primary); color: var(--primary); }
.pub-chip.sel { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 密钥管理：卡片式 */
.keys-flow { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.keys-flow .st-card { width: 100%; }
.key-status { display: flex; flex-direction: column; gap: 8px; }
.key-status-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.key-status-row:last-child { border-bottom: none; }
.ks-label { color: var(--muted); }
.ks-val { font-weight: 600; color: var(--text); }
.ks-val.mono { font-family: Consolas, monospace; font-size: 12.5px; color: var(--primary-dark); }
.key-used-tags { display: inline-flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.key-edit { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 700px) { .keys-grid { grid-template-columns: 1fr; } }

/* 密钥卡片：key 独立区块 + 用途标签 */
.key-unit { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ku-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ku-name { font-weight: 700; font-size: 14px; color: var(--text); }
.ks-use { color: var(--muted); font-size: 12px; font-weight: 400; }

/* 工具管理 */
.tools-table td { padding: 8px 12px; }
.tool-name-input { width: 220px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.chip-on { background: #e6f1fb; color: var(--primary); border-color: var(--primary); }
.chip-dev { background: #fff7e6; color: #b7791f; border-color: #f0c674; }

/* ── 香港实时天气卡片 ── */
.wx-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #1b4f72 0%, #2874a6 100%);
  color: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 3px 12px rgba(27, 79, 114, .25);
}
.wx-loading, .wx-item { color: #d6eaf8; font-size: 14px; }
.wx-icon { font-size: 46px; line-height: 1; }
.wx-main { display: flex; flex-direction: column; }
.wx-temp { font-size: 30px; font-weight: 700; line-height: 1.1; }
.wx-desc { font-size: 14px; color: #d6eaf8; margin-top: 2px; }
.wx-sub { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: #d6eaf8; white-space: nowrap; }
.wx-warns { margin-left: 14px; border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px; display: flex; flex-direction: column; gap: 4px; }
.wx-warn { font-size: 12.5px; color: #fdebd0; max-width: 420px; }
@media (max-width: 720px) {
  .wx-card { flex-wrap: wrap; }
  .wx-sub { margin-left: 0; align-items: flex-start; }
  .wx-warns { border-left: none; padding-left: 0; margin-left: 0; }
}

/* ── 风球徽标（大字） ── */
.wx-tc {
  display: flex;
  align-items: baseline;
  gap: 3px;
  background: #e74c3c;
  color: #fff;
  border-radius: 10px;
  padding: 6px 14px 6px 12px;
  box-shadow: 0 2px 8px rgba(231, 76, 60, .4);
}
.wx-tc-num { font-size: 34px; font-weight: 800; line-height: 1; }
.wx-tc-label { font-size: 13px; font-weight: 700; }

/* ── 快捷入口（总览页） ── */
.ql-block { margin-bottom: 26px; }
.ql-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ql-head h2 { font-size: 18px; }
.ql-hint { font-size: 12.5px; color: var(--muted); }
.ql-form {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; margin-bottom: 12px;
}
.ql-form input {
  flex: 1; min-width: 180px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; color: var(--text);
}
.ql-form input:focus { outline: none; border-color: var(--primary); }
.ql-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ql-card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 42px 12px 14px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ql-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(24,95,165,.12); }
.ql-cover { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.ql-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ql-ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: #e6f1fb; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}
.ql-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-url { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-del {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 24px; height: 24px; border: none; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1;
}
.ql-del:hover { background: #fdeaec; color: #c0392b; }
.ql-new {
  align-items: center; justify-content: center; color: var(--primary);
  border: 1px dashed #b9cfe6; cursor: pointer; font-weight: 600; font-size: 14px;
  min-height: 78px; padding: 14px;
}
.ql-new:hover { background: #f0f6fd; border-color: var(--primary); }
@media (max-width: 600px) {
  .ql-form input { min-width: 100%; }
}

/* ── 快捷入口内嵌页 ── */
body.embed-open { overflow: hidden; }
body.embed-open .main-inner {
  padding: 0; max-width: none; height: 100vh;
  display: flex; flex-direction: column;
}
.embed-bar {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  padding: 10px 14px; background: var(--card);
  border-bottom: 1px solid var(--border);
}
.embed-bar .eb-title {
  font-weight: 700; font-size: 15px; margin-right: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.embed-frame { flex: 1; width: 100%; min-height: 0; border: none; background: #fff; }
.embed-block {
  margin: 20px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 44px 24px; text-align: center;
  overflow-y: auto;
}
.embed-block .ei { font-size: 44px; }
.embed-block h3 { margin: 14px 0 10px; font-size: 19px; }
.embed-block p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 auto 6px; max-width: 640px; }
.embed-block code {
  background: #f1efe8; color: var(--gray); border-radius: 5px;
  padding: 2px 7px; font-size: 12.5px; word-break: break-all;
}
.embed-block .fix-note { font-size: 13px; color: var(--amber); margin-top: 10px; }
.embed-block .btn { margin: 16px 6px 0; }
