/* ==========================================================================
   酒店好评生成系统 — 统一设计系统 (Design System)
   ========================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;

  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --ink-50:  #f8fafc;
  --ink-100: #f1f5f9;
  --ink-200: #e2e8f0;
  --ink-300: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-500: #64748b;
  --ink-600: #475569;
  --ink-700: #334155;
  --ink-800: #1e293b;
  --ink-900: #0f172a;

  --success-bg: #ecfdf5; --success-fg: #047857; --success-br: #a7f3d0;
  --danger-bg:  #fef2f2; --danger-fg:  #b91c1c; --danger-br:  #fecaca;
  --warn-bg:    #fffbeb; --warn-fg:    #b45309; --warn-br:    #fde68a;
  --info-bg:    #eff6ff; --info-fg:    #1d4ed8; --info-br:    #bfdbfe;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, .08), 0 2px 6px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, .12), 0 6px 12px -6px rgba(15, 23, 42, .06);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, .18);

  --ring: 0 0 0 3px rgba(99, 102, 241, .18);
  --ease: cubic-bezier(.4, 0, .2, 1);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-800);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 柔和的品牌背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 12% -6%, rgba(99, 102, 241, .10), transparent 62%),
    radial-gradient(680px 400px at 88% 2%, rgba(245, 158, 11, .08), transparent 60%),
    radial-gradient(900px 520px at 50% 106%, rgba(99, 102, 241, .06), transparent 65%);
}

h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--ink-900); font-weight: 650; letter-spacing: -.012em; line-height: 1.35; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.06rem; }
h4 { font-size: .95rem; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

hr {
  border: 0;
  height: 1px;
  margin: 26px 0 22px;
  background: linear-gradient(90deg, var(--ink-200), rgba(226, 232, 240, .25));
}

::selection { background: var(--brand-200); color: var(--brand-800); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); background-clip: content-box; }

/* ---------- 3. Layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 26px 22px 72px; }
.container.narrow { max-width: 480px; }
.container.mid { max-width: 760px; }

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.card > h2:first-child,
.card > h3:first-child,
.card > h4:first-child { margin-top: 0; }

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-100);
}
.card-title h2, .card-title h3, .card-title h4 { margin: 0; }

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

.stack > * + * { margin-top: 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.hidden { display: none !important; }

.small { color: var(--ink-500); font-size: 12.5px; line-height: 1.6; }
.muted { color: var(--ink-500); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ==========================================================================
   4. 登录页 (Login)
   ========================================================================== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-shell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, .6);
}

/* 左侧品牌区 */
.login-aside {
  position: relative;
  padding: 44px 40px;
  color: #fff;
  background: linear-gradient(150deg, var(--brand-700) 0%, var(--brand-600) 46%, #5b52e8 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
}

.login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(420px 260px at 88% 8%, rgba(255, 255, 255, .20), transparent 62%),
    radial-gradient(360px 300px at 6% 96%, rgba(251, 191, 36, .26), transparent 62%);
}

.login-aside::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 44px solid rgba(255, 255, 255, .07);
  z-index: -1;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}

.brand-badge {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
  font-size: 20px;
  line-height: 1;
}

.login-aside .brand-mark .brand-badge { background: rgba(255,255,255,.2); }

.aside-headline {
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -.02em;
  margin: 34px 0 12px;
}

.aside-sub {
  font-size: .93rem;
  color: rgba(255, 255, 255, .82);
  max-width: 34ch;
  line-height: 1.75;
  margin: 0;
}

.aside-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }

.aside-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  color: rgba(255, 255, 255, .93);
}

.aside-points .dot {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  margin-top: 2px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  font-size: 11px;
}

.aside-foot { font-size: .78rem; color: rgba(255, 255, 255, .62); margin-top: 30px; }

/* 右侧表单区 */
.login-main {
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.login-main h2 { font-size: 1.5rem; margin-bottom: 6px; }
.login-main .login-lead { color: var(--ink-500); font-size: .875rem; margin: 0 0 26px; }

.login-form { display: grid; gap: 16px; }

/* ---------- 5. 表单元素 ---------- */
.field { display: grid; gap: 7px; }
.field > label,
label.field-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: .005em;
}

input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="email"], input[type="url"], input:not([type]), textarea, select {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-900);
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

textarea { resize: vertical; min-height: 74px; line-height: 1.65; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

input::placeholder, textarea::placeholder { color: var(--ink-400); }

input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--ink-400); }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
  background: #fff;
}

input:disabled, textarea:disabled, select:disabled { background: var(--ink-100); color: var(--ink-500); cursor: not-allowed; }

input[type="file"] {
  padding: 9px 11px;
  font-size: 13px;
  background: var(--ink-50);
  border: 1px dashed var(--ink-300);
  cursor: pointer;
  width: auto;
  max-width: 100%;
}
input[type="file"]:hover { border-color: var(--brand-400); background: var(--brand-50); }
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-100);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background .16s var(--ease);
}
input[type="file"]::file-selector-button:hover { background: var(--brand-200); }

input[type="color"] {
  width: 46px; height: 38px;
  padding: 3px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--brand-600);
  cursor: pointer;
  flex: 0 0 auto;
}

label { font-size: .875rem; color: var(--ink-700); }
label > input[type="checkbox"], label > input[type="radio"] { margin-right: 6px; vertical-align: -2px; }

/* ---------- 6. 按钮 ---------- */
button {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .005em;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(79, 70, 229, .28);
  transition: transform .12s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease), background .16s var(--ease);
}

button:hover:not(:disabled) { filter: brightness(1.07); box-shadow: 0 4px 12px -2px rgba(79, 70, 229, .40); }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 2px rgba(79, 70, 229, .30); }
button:focus-visible { outline: none; box-shadow: var(--ring), 0 1px 2px rgba(79, 70, 229, .3); }

button:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.35); box-shadow: none; }

/* 次要按钮 */
button.secondary {
  color: var(--ink-700);
  background: #fff;
  border-color: var(--ink-300);
  box-shadow: var(--shadow-xs);
}
button.secondary:hover:not(:disabled) { background: var(--ink-50); border-color: var(--ink-400); filter: none; box-shadow: var(--shadow-sm); }

/* 幽灵按钮 */
button.ghost {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-100);
  box-shadow: none;
}
button.ghost:hover:not(:disabled) { background: var(--brand-100); filter: none; }

/* 危险按钮 */
button.danger, .danger {
  color: var(--danger-fg);
  background: var(--danger-bg);
  border-color: var(--danger-br);
  box-shadow: none;
}
button.danger:hover:not(:disabled), .danger:hover:not(:disabled) { background: #fee2e2; border-color: #fca5a5; filter: none; }

/* 按钮尺寸 */
button.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
button.xs { padding: 4px 9px;  font-size: 11.5px; border-radius: 6px; font-weight: 600; }
button.block { display: block; width: 100%; }
button.lg { padding: 13px 22px; font-size: 15px; border-radius: 10px; }

button.link {
  padding: 0;
  color: var(--brand-600);
  background: none;
  border: 0;
  box-shadow: none;
  font-weight: 600;
}
button.link:hover:not(:disabled) { text-decoration: underline; background: none; filter: none; box-shadow: none; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(79, 70, 229, .28);
  text-decoration: none;
  transition: filter .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-link:hover { filter: brightness(1.07); text-decoration: none; box-shadow: 0 4px 12px -2px rgba(79, 70, 229, .4); }
.btn-link.secondary { color: var(--ink-700); background: #fff; border: 1px solid var(--ink-300); box-shadow: var(--shadow-xs); }
.btn-link.secondary:hover { background: var(--ink-50); filter: none; }

/* ---------- 7. 顶部栏 / 导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ink-200);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar .brand-mark { color: var(--ink-900); font-size: .99rem; }
.topbar .brand-mark .brand-badge {
  width: 34px; height: 34px; flex-basis: 34px;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-500), var(--brand-700));
  border: 0;
  box-shadow: 0 2px 8px -1px rgba(79, 70, 229, .45);
}

.topbar .brand-sub { font-size: 11.5px; font-weight: 500; color: var(--ink-500); margin-left: 2px; }
.topbar .spacer { flex: 1 1 auto; }

/* 分页标签 */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 11px;
}

.tab-btn {
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.tab-btn:hover:not(:disabled) { color: var(--ink-900); background: rgba(255, 255, 255, .7); filter: none; box-shadow: none; }
.tab-btn.active {
  color: var(--brand-700);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.tab-btn.active:hover { filter: none; }

/* ---------- 8. 关键词标签 ---------- */
.keyword-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.keyword-grid:empty::after {
  content: "暂无可选项";
  color: var(--ink-400);
  font-size: 13px;
}

.kw-btn {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: 999px;
  box-shadow: none;
  transition: all .16s var(--ease);
}
.kw-btn:hover:not(:disabled) {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-300);
  filter: none;
  box-shadow: 0 2px 6px -1px rgba(99, 102, 241, .2);
}
.kw-btn.active {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  border-color: transparent;
  box-shadow: 0 3px 10px -2px rgba(79, 70, 229, .5);
}
.kw-btn.active:hover { filter: brightness(1.06); }

/* 正在浏览的分类（区别于已选中）：虚线描边，提示“下方词条属于它” */
.kw-btn.browsing {
  box-shadow: 0 0 0 2px var(--brand-200), 0 3px 10px -2px rgba(79, 70, 229, .35);
}
.kw-btn.browsing:not(.active) {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-300);
  outline: 2px dashed var(--brand-400);
  outline-offset: 2px;
}

/* 已选关键词汇总（可点击取消） */
.selected-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
}
.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-800);
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.selected-chip:hover {
  background: #fff5f5;
  border-color: #fca5a5;
  color: var(--danger-fg);
}
.selected-chip .chip-tag {
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  background: var(--ink-100);
  border-radius: 999px;
}
.selected-chip .chip-x {
  font-size: 15px;
  line-height: 1;
  opacity: .55;
}
.selected-chip:hover .chip-x { opacity: 1; color: var(--danger-fg); }

/* 微信内打开提示条 */
.wechat-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
}
.wechat-banner span { flex: 1 1 auto; }
.wechat-banner button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #92400e;
  cursor: pointer;
  padding: 0 2px;
}

/* 独立的"开放给用户"开关 */
.kw-toggle {
  padding: 8px 12px;
  margin: 4px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s var(--ease);
}
.kw-toggle.on {
  color: var(--success-fg);
  background: var(--success-bg);
  border-color: var(--success-br);
}
.kw-toggle.off {
  color: var(--ink-500);
  background: var(--ink-100);
  border-color: var(--ink-200);
}
.kw-toggle:hover { filter: brightness(.97); }

/* 列表项 / 自定义词条 */
.list-item {
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.7;
}
.list-item > div:first-child { margin-bottom: 8px; }
.list-item .row { margin-top: 12px; }

.custom-keyword-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  margin: 4px 4px 4px 0;
  font-size: 13px;
  color: var(--brand-800);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
}
.custom-keyword-item > span { white-space: nowrap; }

/* ---------- 9. 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--ink-200); border-radius: var(--radius); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  background: #fff;
}

thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  color: var(--ink-700);
  border-bottom: 1px solid var(--ink-100);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover { background: var(--brand-50); }
tbody td:first-child { color: var(--ink-400); font-variant-numeric: tabular-nums; }

/* ---------- 10. 徽章 / 状态 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.7;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.ok    { color: var(--success-fg); background: var(--success-bg); border-color: var(--success-br); }
.badge.err   { color: var(--danger-fg);  background: var(--danger-bg);  border-color: var(--danger-br); }
.badge.warn  { color: var(--warn-fg);    background: var(--warn-bg);    border-color: var(--warn-br); }
.badge.info  { color: var(--info-fg);    background: var(--info-bg);    border-color: var(--info-br); }
.badge.gray  { color: var(--ink-600);    background: var(--ink-100);    border-color: var(--ink-200); }

/* 提示条 */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.alert.info   { color: var(--info-fg);    background: var(--info-bg);    border-color: var(--info-br); }
.alert.ok     { color: var(--success-fg); background: var(--success-bg); border-color: var(--success-br); }
.alert.err    { color: var(--danger-fg);  background: var(--danger-bg);  border-color: var(--danger-br); }
.alert.warn   { color: var(--warn-fg);    background: var(--warn-bg);    border-color: var(--warn-br); }

/* 空状态 */
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-400);
  font-size: 13.5px;
  background: var(--ink-50);
  border: 1px dashed var(--ink-300);
  border-radius: var(--radius);
}
.empty::before { content: "—"; display: block; font-size: 20px; margin-bottom: 6px; color: var(--ink-300); }
tbody:empty::after {
  content: "暂无数据";
  display: table-row;
}

/* ---------- 11. Logo / 图片 ---------- */
.logo {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--ink-200);
  background: var(--ink-50);
  box-shadow: var(--shadow-sm);
}
.logo.sm { width: 56px; height: 56px; border-radius: 10px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }

.photo-item {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  max-width: 340px;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.photo-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.photo-item img {
  width: min(78vw, 300px);
  height: min(78vw, 300px);
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin-bottom: 8px;
  background: var(--ink-100);
}
.photo-hint { font-size: 12.5px; color: var(--ink-500); text-align: center; }

/* ---------- 12. 进度条 ---------- */
.progress-wrap {
  width: 100%;
  height: 8px;
  margin: 10px 0;
  background: var(--ink-200);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-400));
  transition: width .25s var(--ease);
}

/* 上传状态行 */
.upload-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-500);
}
.upload-status .file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  color: var(--ink-700);
}
.upload-status .saved {
  color: var(--success-fg);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 13. 二维码展示 ---------- */
.qr-cat-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  margin: 8px 0;
  background: linear-gradient(160deg, #fff7fb, #fff);
  border: 1px solid #ffd3e1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.qr-cat-head, .qr-cat-foot { font-size: 13px; font-weight: 600; color: #b54b7d; }
.qr-cat-img {
  border-radius: 10px;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px -6px rgba(181, 75, 125, .35);
  background: #fff;
}

/* ---------- 14. 登录卡片（旧结构兼容 / 独立页） ---------- */
#loginCard, #aLogin {
  max-width: 100%;
}

/* ---------- 15. 用户端 ---------- */
.hero {
  text-align: center;
  padding: 28px 22px;
  background: linear-gradient(165deg, #fff, var(--brand-50));
  border: 1px solid var(--brand-100);
}
.hero .logo { margin: 0 auto 14px; display: block; }
.hero h2 { margin-bottom: 6px; }

.step-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: .95rem;
  font-weight: 650;
  color: var(--ink-800);
}
.step-label .step-no {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-500), var(--brand-700));
  border-radius: 50%;
  box-shadow: 0 2px 6px -1px rgba(79, 70, 229, .45);
}

/* ---------- 16. 工具类 ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.flex-1 { flex: 1 1 auto; }

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--ink-400);
  font-size: 12px;
}
.divider-text::before, .divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink-200);
}

/* ---------- 17. 页脚 ---------- */
.page-foot {
  margin-top: 34px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-400);
}

/* ---------- 18. 响应式 ---------- */
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; max-width: 520px; }
  .login-aside { padding: 30px 28px; }
  .aside-headline { font-size: 1.4rem; margin: 20px 0 10px; }
  .aside-points { display: none; }
  .aside-foot { display: none; }
  .login-main { padding: 32px 26px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 16px 14px 56px; }
  .card { padding: 18px 16px; border-radius: var(--radius); }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .topbar .brand-sub { display: none; }
  .tabs { display: flex; width: 100%; }
  .tab-btn { flex: 1; padding: 8px 6px; font-size: 13px; }
  .row { gap: 8px; }
  .row > input, .row > select { flex: 1 1 100%; }
  .row > button { flex: 0 0 auto; }
  .photo-item { max-width: 100%; }
  .photo-item img { width: 100%; height: auto; }
  .login-page { padding: 0; }
  .login-shell { border-radius: 0; min-height: 100vh; box-shadow: none; }
}

/* ---------- 19. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* 卡片入场 */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.card, .login-shell { animation: rise .34s var(--ease) both; }
.card:nth-child(2) { animation-delay: .04s; }
.card:nth-child(3) { animation-delay: .08s; }
