/* ===== 安心签到运维后台 · 品牌化样式 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --violet: #7C3AED;
  --violet-deep: #5B21B6;
  --violet-soft: #F5F0FF;
  --pink: #EC4899;
  --grad: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --bg: #F6F5FA;
  --card: #FFFFFF;
  --sidebar-bg: #191332;
  --sidebar-text: #B7B0CE;
  --sidebar-active: #2A2150;
  --text: #23202E;
  --muted: #75708A;
  --border: #E9E5F2;
  --danger: #DC2626;
  --radius: 12px;
  --shadow-sm: 0 1px 4px rgba(46,28,96,.06);
  --shadow-md: 0 6px 20px rgba(46,28,96,.10);
  --ring: 0 0 0 3px rgba(124,58,237,.25);
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 6px; }
.info { color: var(--muted); font-size: 13px; margin-left: 10px; }
.note {
  background: #FFF9E8; border: 1px solid #F5E3A8; border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #7A5B12; margin-top: 12px; line-height: 1.7;
}
.note code { background: #FBEECC; padding: 1px 5px; border-radius: 4px; font-family: Consolas, monospace; }

/* ===== 通用控件 ===== */
.control, .field input, .field textarea, select, input[type=text], input[type=password], input[type=number], textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.control:focus, .field input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,58,237,.12); outline: none;
}
select { width: auto; min-width: 200px; }
textarea { width: 100%; font-family: Consolas, monospace; font-size: 13px; resize: vertical; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.num-input { width: 64px; }
button {
  padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px;
  font-family: inherit; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
button.primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(139,92,246,.28); }
button.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(139,92,246,.36); }
button.primary:active { transform: none; }
button.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
button.ghost:hover { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.row-label { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.summary-link { cursor: pointer; color: var(--violet); font-size: 13px; margin-bottom: 8px; user-select: none; }
details[open] .summary-link { margin-bottom: 8px; }
details > textarea { margin-bottom: 10px; }

/* ===== 登录页 ===== */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background:
  radial-gradient(900px 500px at 15% 0%, rgba(139,92,246,.20) 0%, transparent 60%),
  radial-gradient(800px 480px at 90% 100%, rgba(236,72,153,.18) 0%, transparent 60%),
  linear-gradient(160deg, #1A1433 0%, #2A1E4A 50%, #3A2158 100%); }
.login-panel { display: flex; background: rgba(255,255,255,.96); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.35); max-width: 820px; width: 100%; }
.login-side { width: 46%; background: linear-gradient(160deg, #241B47 0%, #3B2470 60%, #5A2E8A 100%); padding: 44px 36px; display: flex; flex-direction: column; justify-content: center; color: #fff; position: relative; overflow: hidden; }
.login-side::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 80% 20%, rgba(236,72,153,.35), transparent 60%); }
.login-logo { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.35); margin-bottom: 22px; position: relative; z-index: 1; }
.login-side-title { font-size: 26px; font-weight: 800; letter-spacing: 1px; position: relative; z-index: 1; }
.login-side-sub { font-size: 14px; opacity: .85; margin-top: 6px; position: relative; z-index: 1; }
.login-side-desc { font-size: 12.5px; opacity: .65; margin-top: 18px; line-height: 1.8; position: relative; z-index: 1; }
.login-card { width: 54%; padding: 44px 40px; max-height: calc(100vh - 36px); overflow-y: auto; }
.login-card-head h1 { font-size: 22px; font-weight: 700; }
.login-card-head .sub { color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-card .hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; line-height: 1.7; }
.login-forgot { text-align: right; margin: -4px 0 2px; }
.login-forgot a { color: var(--violet); font-size: 13px; text-decoration: none; cursor: pointer; }
.login-forgot a:hover { text-decoration: underline; }
.pwd-flow { font-size: 12px; color: var(--muted); line-height: 1.65; margin: -8px 0 14px; }
.pwd-modal-card { width: 440px; }
/* 验证码步骤 */
.verify-note { display: flex; align-items: center; gap: 8px; background: var(--violet-soft); border: 1px solid #D8CFF0; border-radius: 10px; padding: 10px 12px; margin: 14px 0 12px; }
.verify-note svg { width: 16px; height: 16px; stroke: var(--violet); flex-shrink: 0; }
.verify-note p { font-size: 13px; color: var(--violet-deep); line-height: 1.6; margin: 0; }
#verify-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
#verify-block .btn-block + .btn-block { margin-top: 8px; }
#resend-btn { background: transparent; border: none; color: var(--violet); font-size: 13px; padding: 8px; }
#resend-btn:hover { background: var(--violet-soft); }
#resend-btn:disabled { color: var(--muted); opacity: .7; }
.verify-alt { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.verify-alt a { color: var(--violet); text-decoration: none; margin-left: 2px; cursor: pointer; }
.verify-alt a:hover { text-decoration: underline; }
.remember-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.remember-row input { width: 15px; height: 15px; accent-color: var(--violet); cursor: pointer; }
@media (max-width: 720px) {
  .login-side { display: none; }
  .login-card { width: 100%; }
}

/* ===== 主布局 ===== */
#main-view { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 232px; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex;
  flex-direction: column; flex-shrink: 0; transition: width .22s ease;
}
.sidebar.collapsed { width: 64px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); min-height: 62px; }
.side-brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.3); flex-shrink: 0; }
.side-brand .brand-text { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; }
.side-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.side-group {
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: rgba(183,176,206,.55); padding: 12px 14px 6px; font-weight: 600;
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .side-group { display: none; }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  cursor: pointer; font-size: 14px; color: var(--sidebar-text); margin-bottom: 4px; transition: all .15s; white-space: nowrap;
}
.side-item svg { width: 19px; height: 19px; stroke: currentColor; flex-shrink: 0; }
.side-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-item.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(139,92,246,.35); }
.side-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 9px; font-size: 12px; }
.side-foot-dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); flex-shrink: 0; }
.sidebar.collapsed .side-brand { justify-content: center; padding: 18px 0; }
.sidebar.collapsed .brand-text, .sidebar.collapsed .side-item span, .sidebar.collapsed .side-footer .brand-text { display: none; }
.sidebar.collapsed .side-item { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .side-footer { justify-content: center; padding: 14px 0; }

/* ===== 主区域 ===== */
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: var(--card); border-bottom: 1px solid var(--border); display: flex;
  align-items: center; padding: 0 20px; gap: 14px; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.icon-btn {
  background: transparent; border: 1px solid var(--border); padding: 7px; border-radius: 8px; color: var(--muted); width: 36px; height: 36px;
}
.icon-btn:hover { color: var(--violet); border-color: var(--violet); background: var(--violet-soft); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; }
.page-title { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 600; color: var(--violet-deep); }
.user-divider { width: 1px; height: 18px; background: var(--border); margin: 0 6px; }

/* ===== 内容区 ===== */
.content { flex: 1; overflow-y: auto; padding: 22px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 统计卡 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
/* 看板指标行：数字顶对齐，单行不溢出背景 */
.dash-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.ops-kpi-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.kpi-row .stat-card {
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
  padding: 14px 14px 12px;
}
.kpi-row .stat-body {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.kpi-row .stat-body .num {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 28px;
  height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.kpi-row .stat-body .label {
  margin-top: 2px;
  line-height: 1.35;
}
.kpi-row .stat-body .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-row .stat-body .sub:empty { display: none; }
.kpi-row .status-bar { margin-top: 6px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-val { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-card .stat-label { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat-val.stat-ok { color: #047857; }
.stat-val.stat-warn { color: #F59E0B; }
.stat-val.stat-bad { color: #EF4444; }
.stat-val.stat-severe { color: #B91C1C; }
.stat-val.stat-muted { color: var(--muted); }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { border-color: var(--violet); }
.stat-body .num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-body .num.num-err { color: #EF4444; font-size: 20px; }
.stat-body .sub { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.4; }
.stat-body .label { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.status-bar {
  display: flex; height: 6px; border-radius: 999px; overflow: hidden;
  background: #F0EDF8; margin-top: 8px; width: 100%;
}
.status-bar span { display: block; height: 100%; min-width: 2px; }
.status-bar .st-paid { background: #10B981; }
.status-bar .st-pending { background: #F59E0B; }
.status-bar .st-refunded { background: #94A3B8; }
.status-bar .st-cancelled { background: #EF4444; }

/* 状态标签 */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.tag-ok { color: #047857; background: #D1FAE5; }
.tag-warn { color: #B45309; background: #FEF3C7; }
.tag-info { color: #1D4ED8; background: #DBEAFE; }
.feedback-reply-item-user {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.tag-bad { color: #B91C1C; background: #FEE2E2; }
.tag-severe { color: #fff; background: #DC2626; }
.tag-inactive { color: #6B7280; background: #F3F4F6; }
.contact-cell { font-size: 12.5px; line-height: 1.7; }
.tel-link { color: var(--violet); text-decoration: none; font-weight: 600; }
.tel-link:hover { text-decoration: underline; }
.mono { font-family: Consolas, monospace; font-size: 12.5px; }
.strong { font-weight: 700; color: #EF4444; }
.muted { color: var(--muted); }

/* 面板 */
.panel { background: var(--card); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-tag { font-size: 12px; color: var(--muted); background: var(--violet-soft); padding: 3px 10px; border-radius: 999px; }
.chart { width: 100%; height: 260px; }

/* 巡检速查 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-item { background: #FCFBFE; border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; transition: all .16s; }
.quick-item:hover { border-color: var(--violet); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.quick-item b { display: block; font-size: 13.5px; margin-bottom: 5px; color: var(--violet-deep); }
.quick-item span { font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 1080px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .quick-grid { grid-template-columns: 1fr; } }

/* 查询条件 */
.fields-wrap { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.cond-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cond-row select, .cond-row input { width: auto; }
.cond-row .cond-field { min-width: 160px; }
.cond-row .cond-op { min-width: 130px; }
.cond-row .cond-val { min-width: 180px; flex: 1; }
.cond-row .del-cond { background: #FEE2E2; color: var(--danger); border: none; padding: 7px 12px; border-radius: 7px; }
.cond-row .del-cond:hover { background: #FECACA; }

/* 表格 */
.table-wrap { overflow: auto; max-height: 500px; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: var(--violet-soft); position: sticky; top: 0; font-weight: 700; color: var(--violet-deep); z-index: 1; }
tr:hover td { background: #F9F7FD; }
tbody tr:last-child td { border-bottom: none; }
.empty { color: var(--muted); text-align: center; padding: 34px 20px; }
.empty::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%; background: var(--violet-soft); }
.table-wrap pre { margin: 0; padding: 14px; background: #F9F7FD; border-radius: 8px; white-space: pre-wrap; font-family: Consolas, monospace; font-size: 13px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(20,14,40,.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: var(--card); border-radius: 16px; padding: 28px 30px; width: 380px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-card h3 { margin-bottom: 18px; font-size: 17px; }
.modal-actions { justify-content: flex-end; margin-top: 18px; }

/* 登录安全：备用码 */
.recovery-box { padding: 2px 0 6px; }
#recovery-status { font-size: 14px; color: var(--violet-deep); line-height: 1.7; margin: 0 0 8px; }
.recovery-tip { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }
.recovery-modal-card { width: 440px; }
.recovery-modal-tip { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.recovery-code { font-family: Consolas, monospace; font-size: 15px; letter-spacing: 1.5px; text-align: center; padding: 10px 8px; background: var(--violet-soft); border: 1px solid #D8CFF0; border-radius: 10px; color: var(--violet-deep); font-weight: 600; user-select: all; }

/* 台账与运维行 */
.vip-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.vip-form-grid .span-2 { grid-column: 1 / -1; }
.vip-tier-grid { display: flex; flex-direction: column; gap: 14px; }
.vip-tier-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #FCFBFE; }
.vip-tier-card h4 { margin: 0 0 10px; font-size: 14px; }
.vip-preview { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 800px) { .vip-form-grid { grid-template-columns: 1fr; } .vip-form-grid .span-2 { grid-column: auto; } }

.ledger-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.ledger-row input.key { width: 190px; }
.ledger-row input.val { flex: 1; min-width: 200px; }
.ledger-row input.desc { width: 230px; }
.ledger-row button { background: #FEE2E2; color: var(--danger); border: none; padding: 7px 12px; border-radius: 7px; }
.ledger-row button:hover { background: #FECACA; }
#ops-params-form .ledger-row label { font-size: 13px; color: var(--muted); }
#ops-params-form select, #ops-params-form input, #ops-params-form textarea { padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; }
#ops-fn-config .ledger-row input.val { flex: none; }
#ops-fn-config .ledger-row > b { font-size: 13px; color: var(--violet-deep); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8D3E8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C4BCE0; }
::-webkit-scrollbar-track { background: transparent; }

/* 窄屏折叠 */
@media (max-width: 900px) {
  .sidebar:not(.collapsed) { width: 200px; }
}
@media (max-width: 640px) {
  .sidebar { position: fixed; z-index: 90; height: 100%; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar.collapsed { transform: translateX(-100%); }
  .content { padding: 14px; }
  .user-name { display: none; }
  .modal-scroll { overscroll-behavior: contain; }
}

/* 常用场景芯片 */
.scene-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 4px 0 10px; padding: 10px 12px; background: #FCFBFE;
  border: 1px dashed var(--border); border-radius: 10px;
}
.scene-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.scene-chip {
  padding: 5px 12px; font-size: 12.5px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); color: var(--violet-deep);
  cursor: pointer; transition: all .15s;
}
.scene-chip:hover, .scene-chip.active {
  background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep);
}
#vip-member-choices { flex-direction: column; align-items: stretch; }
.vip-member-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border-radius: 10px; text-align: left; white-space: normal; line-height: 1.45;
}
.vip-member-pick-meta { font-size: 12px; color: var(--muted); word-break: break-all; }
.cond-row .cond-enum { min-width: 160px; }

/* 用户快查弹层 */
.user-modal-card {
  width: min(860px, 96vw); max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column; padding: 0;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto; gap: 12px;
  padding: 18px 24px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; }
.modal-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.modal-kbd {
  font-family: inherit; font-size: 11px; line-height: 1.4; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
  background: #F7F5FB;
}
.modal-scroll {
  overflow: auto; min-height: 0; flex: 1 1 auto;
  padding: 14px 24px 22px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.chunk-more { margin-top: 8px; }
.user-matches { margin-bottom: 12px; }
.user-modal-body { font-size: 13.5px; }
.user-block {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 12px; background: #FCFBFE;
}
.user-block h4 {
  font-size: 13px; color: var(--violet-deep); margin: 0 0 10px; font-weight: 700;
}
.kv-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 14px;
}
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv span { font-size: 12px; color: var(--muted); }
.kv b { font-weight: 600; word-break: break-all; }
.timeline { margin: 0; padding-left: 18px; }
.timeline li { margin: 4px 0; color: var(--text); }
.user-block .table-wrap, .user-block table { max-height: none; border: none; }
.user-block table { font-size: 12.5px; }
.user-detail-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
  position: sticky; top: 0; background: #fff; padding: 6px 0; z-index: 2;
  border-bottom: 1px solid var(--border);
}
.user-detail-nav a {
  font-size: 12px; color: var(--violet-deep); text-decoration: none;
  padding: 4px 10px; border-radius: 999px; background: var(--violet-soft);
}
.user-detail-nav a:hover { background: #EDE4FF; }
.feedback-modal-card {
  width: min(640px, 96vw); max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column; padding: 0;
}
.feedback-flow-hint {
  margin: 0 0 12px; font-size: 12.5px; line-height: 1.45;
  padding: 8px 10px; border-radius: 8px; background: var(--violet-soft, #F3EEFF);
}
.feedback-reply-history { margin-bottom: 14px; }
.feedback-reply-timeline {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px;
}
.feedback-reply-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  background: #fff;
}
.feedback-reply-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px;
  font-size: 12px;
}
.feedback-reply-content {
  margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.5;
  color: var(--text); user-select: text;
}
.feedback-reply-images {
  margin-top: 8px;
}
.feedback-reply-images .feedback-image-thumb {
  width: 88px; height: 88px;
}
.feedback-template-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px;
}
.feedback-template-chips button {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--violet-deep);
  cursor: pointer;
}
.feedback-template-chips button:hover {
  background: var(--violet-soft, #F3EEFF);
}
.feedback-images-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.feedback-image-thumb {
  display: block; width: 112px; height: 112px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: #F3F0FA;
  padding: 0; cursor: zoom-in;
}
.feedback-image-thumb:hover { box-shadow: var(--ring); }
.feedback-image-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.feedback-lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(16, 12, 28, .88);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 64px;
}
.feedback-lightbox.hidden { display: none !important; }
.feedback-lightbox img {
  max-width: min(92vw, 1100px); max-height: 86vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  background: #111;
}
.feedback-lightbox-close {
  position: absolute; top: 16px; right: 18px;
  width: 40px; height: 40px; border: none; border-radius: 20px;
  background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer;
}
.feedback-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 22px;
  background: rgba(255,255,255,.14); color: #fff; font-size: 32px; line-height: 1;
  cursor: pointer;
}
.feedback-lightbox-nav.prev { left: 16px; }
.feedback-lightbox-nav.next { right: 16px; }
.feedback-lightbox-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; opacity: .9;
}

.term {
  border-bottom: 1px dashed #C4A035; cursor: help; color: #7A5B12;
}
.followup-btn {
  background: transparent; border: none; padding: 0; cursor: pointer;
  font-family: inherit;
}
.followup-btn:hover .tag { box-shadow: 0 0 0 2px rgba(124,58,237,.2); }
.user-link { cursor: pointer; color: var(--violet-deep); }
.user-link:hover { text-decoration: underline; }
