:root {
  color-scheme: light;
  --ink: #182338;
  --muted: #5f6d84;
  --line: #e5e9f0;
  --blue: #4169e1;
  --canvas: #f6f8fb;
  --navy: #111c33;
  font: 14px/1.6 system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 246px;
  display: flex; flex-direction: column; padding: 26px 16px 18px;
  background: var(--navy); color: #cad3e3;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px 26px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 11px; background: linear-gradient(145deg, #80a3ff, #456ce8);
  color: white; font-size: 20px; font-weight: 700;
}
.sidebar small { color: #aab8cf; }
nav { display: flex; flex-direction: column; gap: 5px; }
nav a { padding: 9px 12px; border-radius: 8px; color: #cad3e3; text-decoration: none; }
nav a:hover { background: #1c2a45; color: white; }
nav a[aria-current="page"] { background: #26385a; color: white; box-shadow: inset 3px 0 #81a3ff; }
.sidebar-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid #28344b; }
.workspace { margin-left: 246px; }
.topbar {
  min-height: 62px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 42px; background: white; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.divider { padding: 0 7px; color: #8290a6; }
.env { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }
.env i { width: 7px; height: 7px; border-radius: 50%; background: #38ad84; box-shadow: 0 0 0 3px #38c99422; }
.content { max-width: 1180px; margin: auto; padding: 38px 42px; }
h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; }
a { color: #3156c7; }
small, time, footer { color: var(--muted); }
.list, .stack, .login-card {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 4px 14px #1a2a4306;
}
article { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
article + article { border-top: 1px solid var(--line); }
form { display: flex; gap: 8px; flex-shrink: 0; }
select, input, button { font: inherit; border-radius: 7px; padding: 7px 10px; }
select, input { border: 1px solid #c7d0df; color: var(--ink); background: white; min-width: 0; }
button { border: 1px solid transparent; background: var(--blue); color: white; cursor: pointer; }
button:hover { background: #3156c7; }
:focus-visible { outline: 2px solid #80a3ff; outline-offset: 2px; }
.notice { color: #075e48; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
footer { display: flex; gap: 20px; justify-content: center; padding: 18px; }
.stack { display: grid; gap: 12px; max-width: 410px; padding: 20px; margin: 16px 0 24px; }
.stack label { display: grid; gap: 4px; }
.stack p { margin: 0; color: var(--muted); }
[role="status"]:empty { display: none; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(155deg, #e8effd, var(--canvas) 65%); }
.login-card { width: min(100%, 410px); padding: 30px; }
.login .brand { padding: 0 0 22px; }
.login .remember-login { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-login input { margin: 0; accent-color: var(--blue); }
.login h1 { margin: 10px 0; }
.login .stack { padding: 0; border: 0; box-shadow: none; margin: 16px 0 0; }
@media (max-width: 720px) {
  .sidebar { position: static; width: auto; padding: 14px 16px; gap: 8px; }
  .brand { padding: 0; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .workspace { margin: 0; }
  .topbar, .content { padding-inline: 16px; }
  .content { padding-block: 24px; }
}
@media (max-width: 480px) { article { flex-wrap: wrap; } }

.user-area { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 8px; cursor: pointer; list-style: none;
}
.user-chip::-webkit-details-marker { display: none; }
.user-chip:hover, .user-area[open] .user-chip { background: #26385a; }
.user-chip::after { content: "⌃"; margin-left: auto; }
.user-chip strong, .user-chip small, .person-main small { display: block; }
.avatar {
  display: grid; place-items: center; flex: 0 0 36px; height: 36px;
  border-radius: 50%; color: #284c9c; background: #e5edff; font-weight: 700;
}
.user-menu {
  position: absolute; bottom: calc(100% + 8px); inset-inline: 0; z-index: 2;
  padding: 5px; border: 1px solid var(--line); border-radius: 10px;
  background: white; box-shadow: 0 8px 24px #111c3329;
}
.user-menu a, .user-menu button {
  display: block; width: 100%; padding: 8px 10px; border: 0;
  text-align: left; text-decoration: none; border-radius: 6px; background: white;
}
.user-menu a:hover, .user-menu button:hover { background: var(--canvas); }
.danger { color: #b42332; }

.page-toolbar, .panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.page-toolbar { margin-bottom: 16px; }
.page-toolbar p { margin: 0; color: var(--muted); }
.page-toolbar button, .secondary { white-space: nowrap; }
.secondary, .remove {
  display: inline-block; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 7px; background: white; text-decoration: none;
}
.secondary { color: var(--ink); }
.secondary:hover, .remove:hover { background: var(--canvas); }
.panel-header, .panel-note { padding: 11px 16px; }
.panel-header { border-bottom: 1px solid var(--line); }
.panel-note { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.person-main { flex: 1; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  background: #edf0f5; color: #495872; font-size: 12px; white-space: nowrap;
}
.badge.admin { color: #284c9c; background: #e5edff; }
.badge.status-pending { color: #834a05; background: #fff0ce; }
.badge.status-resolved { color: #075e48; background: #ddf5eb; }
.person-popover {
  width: min(410px, calc(100% - 32px)); padding: 0;
  border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
  box-shadow: 0 18px 55px #111c3333;
}
.person-popover::backdrop { background: #111c3366; }
.person-popover .stack { margin: 0; border: 0; box-shadow: none; }
.person-popover h2 { margin: 0; font-size: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 740px; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--canvas); color: var(--muted); font-size: 12px; white-space: nowrap; }
td { border-top: 1px solid var(--line); }
td time { white-space: nowrap; }
td.empty { text-align: center; }
.list footer { border-top: 1px solid var(--line); padding: 12px 16px; justify-content: flex-end; }

@media (max-width: 720px) {
  .user-menu { bottom: auto; top: calc(100% + 8px); }
  .user-chip::after { content: "⌄"; }
}

.confirm-remove { background: #b42332; }
.confirm-remove:hover { background: #941d2b; }
.attachment img, .attachment video {
  display: none; position: fixed; z-index: 5;
  width: var(--preview-width, 0px); height: min(200px, 45vh); object-fit: contain;
  border-radius: 8px; background: var(--navy); box-shadow: 0 8px 24px #111c3340;
}
.attachment:hover > [data-src], .attachment:focus-within > [data-src] { display: block; }

.list footer { align-items: center; flex-wrap: wrap; }
.list footer label { margin-right: auto; }

th, td { padding: 7px 9px; vertical-align: middle; }
td { white-space: nowrap; }
.feedback-text {
  display: block; width: clamp(130px, 17vw, 300px);
  overflow: hidden; text-overflow: ellipsis;
}
.feedback-text:focus { white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-list { display: flex; gap: 8px; }
.sort-arrow {
  display: inline-grid; place-items: center; min-width: 22px; height: 24px;
  border-radius: 4px; text-decoration: none; font-size: 14px;
}
.sort-arrow:hover { background: #e5edff; }
.feedback-filters {
  flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white;
}
.feedback-filters label {
  display: grid; gap: 5px; flex: 1 1 140px; font-size: 12px; color: var(--muted);
}
.feedback-filters select, .feedback-filters input[type="date"] {
  width: 100%; height: 37px; background: var(--canvas); border-color: var(--line);
}
.feedback-filters button, .feedback-filters .secondary { min-height: 37px; }

.feedback-content { max-width: none; padding-inline: clamp(12px, 1.5vw, 24px); }
.feedback-content th, .feedback-content td { padding: 6px 7px; }
.feedback-content td:has(.feedback-text) { width: 100%; }
.feedback-text { width: auto; min-width: 105px; max-width: clamp(135px, 28vw, 720px); }
.sort-arrow { min-width: 16px; height: 18px; color: var(--muted); vertical-align: middle; }
.sort-arrow[data-order="asc"] .sort-down,
.sort-arrow[data-order="desc"] .sort-up { opacity: .25; }
.status-editor { position: relative; display: inline-flex; padding: 0; }
.status-editor select {
  appearance: none; background: transparent; color: inherit; border: 0;
  padding: 2px 21px 2px 8px; cursor: pointer; border-radius: inherit;
}
.status-editor svg { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.status-editor:hover { box-shadow: inset 0 0 0 1px currentColor; }

.feedback-filters label { flex: 0 1 150px; }
.feedback-filters label:first-child { flex-basis: 120px; }
.attachment video:fullscreen {
  display: block; width: 100%; height: 100%; border-radius: 0; background: black;
}

.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sidebar-heading .brand { padding: 0; }
.sidebar-toggle {
  display: grid; place-items: center; flex-shrink: 0; padding: 6px;
  background: transparent; color: #cad3e3; border-color: #52617b;
}
.sidebar-toggle:hover { background: #26385a; color: white; }
.sidebar .nav-icon { display: none; }
.sidebar-closed .sidebar {
  width: 66px; padding-inline: 8px; background: white; color: #315478;
  border-right: 1px solid var(--line);
}
.sidebar-closed .sidebar-heading { flex-direction: column; gap: 20px; margin-bottom: 8px; }
.sidebar-closed .brand > div,
.sidebar-closed nav a > span,
.sidebar-closed .user-chip > span:not(.avatar),
.sidebar-closed .user-chip::after { display: none; }
.sidebar-closed .sidebar-toggle { color: #315478; border-color: var(--line); }
.sidebar-closed .sidebar-toggle:hover { background: var(--canvas); }
.sidebar-closed nav a, .sidebar-closed .user-chip {
  display: grid; place-items: center; padding: 0; height: 44px; color: inherit;
}
.sidebar-closed .user-chip .avatar { width: 36px; }
.sidebar-closed .sidebar .nav-icon { display: block; }
.sidebar-closed nav a[aria-current="page"],
.sidebar-closed nav a:hover,
.sidebar-closed .user-chip:hover,
.sidebar-closed .user-area[open] .user-chip { background: #e6eefb; color: #214d85; box-shadow: none; }
.sidebar-closed .sidebar-bottom { border-color: var(--line); }
.sidebar-closed .user-menu { inset-inline: 0 auto; width: 150px; }
.sidebar-closed .workspace { margin-left: 66px; }
@media (max-width: 720px) {
  .sidebar-heading { margin-bottom: 0; }
  .sidebar-closed .sidebar { width: auto; padding: 8px 16px; flex-direction: row; align-items: center; }
  .sidebar-closed .sidebar-heading { flex-direction: row; gap: 8px; margin: 0; }
  .sidebar-closed nav a, .sidebar-closed .user-chip { width: 40px; }
  .sidebar-closed .sidebar-bottom { margin: 0 0 0 auto; padding: 0; border: 0; }
  .sidebar-closed .user-menu { inset-inline: auto 0; }
  .sidebar-closed .workspace { margin-left: 0; }
}
.feedback-content th { position: relative; }
.feedback-content th:not(:last-child), .feedback-content td:not(:last-child) {
  border-right: 1px solid var(--line);
}
.column-resizer {
  position: absolute; z-index: 2; inset: 0 -5px auto auto; width: 10px;
  height: var(--column-resizer-height, 100%);
  padding: 0; border: 0; border-radius: 0; background: transparent;
  cursor: col-resize; touch-action: none;
}
.column-resizer:hover, .column-resizer:active { background: transparent; }
.feedback-content .columns-sized { table-layout: fixed; min-width: 0; }
.feedback-content .columns-sized td:has(.feedback-text) { width: auto; }
.columns-sized .feedback-text { min-width: 0; max-width: none; }
.cell-value { display: block; overflow: hidden; text-overflow: ellipsis; }
.columns-sized td time { display: block; overflow: hidden; text-overflow: ellipsis; }
.columns-sized .attachment-list { flex-wrap: wrap; }

.login .password-field { position: relative; margin-top: -8px; }
.password-field input { width: 100%; padding-inline-end: 44px; }
.password-toggle {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 42px;
  padding: 0; background: transparent; color: var(--muted);
}
.password-toggle:hover { background: #e8effd; color: var(--ink); }
.password-toggle svg { width: 20px; height: 20px; vertical-align: middle; }
.password-toggle[aria-label="显示密码"] .password-slash { display: none; }

.media-viewer main { padding: 16px; text-align: center; }
.media-viewer h1 { margin: 0 0 16px; font-size: 1rem; overflow-wrap: anywhere; }
.media-viewer img, .media-viewer video { max-width: 100%; max-height: calc(100dvh - 72px); }
