html {
  min-height: 100%;
}

:root {
  --tblr-primary: #206bc4;
  --tblr-primary-rgb: 32, 107, 196;
  --tblr-blue-soft: #eaf2ff;
  --tblr-surface: #ffffff;
  --tblr-text: #172033;
  --tblr-muted: #586273;
  --tblr-border: #dbe4f0;
  --tblr-card-radius: 14px;
  --tblr-radius: 10px;
  --tblr-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  --tblr-success: #2fb344;
  --tblr-danger: #d63939;
  --tblr-warning: #f59f00;
}

body {
  margin: 0;
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(32, 107, 196, .18), transparent 34rem),
    linear-gradient(135deg, #f4f8ff 0%, #eef5ff 42%, #f8fbff 100%);
  color: var(--tblr-text);
}

* {
  min-width: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--tblr-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid rgba(var(--tblr-primary-rgb), .28);
  outline-offset: 2px;
}

.skip-link {
  background: var(--tblr-primary);
  border-radius: 0 0 var(--tblr-radius) var(--tblr-radius);
  color: #fff;
  font-weight: 800;
  left: 16px;
  padding: 8px 12px;
  position: fixed;
  top: -48px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tblr-border);
  padding-top: env(safe-area-inset-top, 0px);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tblr-text);
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #206bc4, #4299e1);
  box-shadow: 0 10px 24px rgba(var(--tblr-primary-rgb), .28);
  color: #fff;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--tblr-muted);
  font-size: .78rem;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.app-nav a {
  align-items: center;
  border-radius: 999px;
  color: var(--tblr-muted);
  display: inline-flex;
  gap: 7px;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 11px;
}

.app-nav a:hover {
  background: rgba(var(--tblr-primary-rgb), .09);
  color: var(--tblr-primary);
  text-decoration: none;
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu summary {
  align-items: center;
  border: 1px solid var(--tblr-border);
  border-radius: 999px;
  color: var(--tblr-primary);
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  font-weight: 800;
  list-style: none;
  min-height: 42px;
  padding: 8px 14px;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__panel {
  background: var(--tblr-surface);
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-card-radius);
  box-shadow: var(--tblr-shadow);
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
}

.mobile-menu nav {
  display: grid;
  gap: 6px;
}

.mobile-menu nav a {
  align-items: center;
  border-radius: var(--tblr-radius);
  color: var(--tblr-text);
  display: inline-flex;
  gap: 8px;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 12px;
}

.mobile-menu nav a:hover {
  background: rgba(var(--tblr-primary-rgb), .09);
  text-decoration: none;
}

.account-bar {
  align-items: center;
  color: var(--tblr-muted);
  display: flex;
  font-size: .9rem;
  gap: 8px;
}

.account-bar form {
  margin: 0;
}

.account-bar button,
.account-bar a {
  background: transparent;
  border: 1px solid var(--tblr-border);
  border-radius: 10px;
  color: var(--tblr-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 38px;
  padding: 6px 10px;
}

.account-bar button:hover,
.account-bar a:hover {
  background: rgba(var(--tblr-primary-rgb), .09);
  text-decoration: none;
}

.account-bar--mobile {
  border-top: 1px solid var(--tblr-border);
  margin-top: 6px;
  padding-top: 10px;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  border: 1px solid var(--tblr-border);
  border-radius: 999px;
  color: var(--tblr-primary);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  min-height: 38px;
  padding: 7px 12px;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::after {
  content: "▾";
  font-size: .74rem;
  margin-left: 6px;
}

.account-menu__panel {
  background: #fff;
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  box-shadow: var(--tblr-shadow);
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
}

.account-menu__panel a,
.account-menu__panel button {
  border: 0;
  border-radius: var(--tblr-radius);
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.account-bar--mobile .account-menu__panel {
  position: static;
  width: 100%;
}

.app-main {
  padding: 26px 0 46px;
}

.app-footer {
  border-top: 1px solid var(--tblr-border);
  color: var(--tblr-muted);
  font-size: .9rem;
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom, 0px));
}

.app-footer .page-shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero-card,
.panel-card,
.status-card {
  background: var(--tblr-surface);
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-card-radius);
  box-shadow: var(--tblr-shadow);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.hero-card h1,
.panel-card h1,
.section-heading h2 {
  margin: 0;
}

.hero-card__text {
  color: var(--tblr-muted);
  margin: 8px 0 0;
  max-width: 760px;
}

/* 统一 Hero 区：左列自上而下为小标题/大标题/内容描述/操作按钮，右列为插画 */
.hero-head {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hero-head > * {
  margin: 0;
}

.hero-head .hero-card__text {
  color: var(--tblr-muted);
  max-width: 760px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.eyebrow {
  color: var(--tblr-primary);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 6px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.status-card {
  color: var(--tblr-text);
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 17px;
}

.status-card strong,
.issue-card strong,
.section-heading h1,
.panel-card h1 {
  overflow-wrap: anywhere;
}

.status-card:hover {
  border-color: var(--tblr-primary);
  text-decoration: none;
}

.status-card__label,
.status-card small,
.meta-line {
  color: var(--tblr-muted);
}

.panel-card {
  margin-top: 16px;
  padding: 20px;
}

.admin-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tblr-border);
  border-radius: 999px;
  box-shadow: var(--tblr-shadow-sm);
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  overflow-x: auto;
  padding: 5px;
}

.admin-tabs a {
  border-radius: 999px;
  color: var(--tblr-muted);
  flex: 0 0 auto;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 15px;
  text-decoration: none;
}

.admin-tabs a:hover {
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
}

.admin-tabs a.is-active {
  background: linear-gradient(135deg, #206bc4, #3b82f6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--tblr-primary-rgb), .22);
}

.auth-card {
  background: var(--tblr-surface);
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-card-radius);
  box-shadow: var(--tblr-shadow);
  margin: 0 auto;
  max-width: 520px;
  padding: 24px;
}

.panel-card--danger {
  border-color: rgba(220, 38, 38, .35);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading p,
.panel-card p {
  color: var(--tblr-muted);
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps-list li {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  padding: 12px;
}

.steps-list span {
  color: var(--tblr-muted);
  display: block;
  font-size: .9rem;
  margin-top: 4px;
}

.empty-state {
  border: 1px dashed var(--tblr-border);
  border-radius: var(--tblr-radius);
  color: var(--tblr-muted);
  padding: 20px;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.form-grid,
.filter-bar {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-bar {
  align-items: end;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(120px, 1fr)) auto;
  margin: 14px 0 18px;
}

.filter-panel {
  margin: 14px 0 18px;
}

.filter-panel summary {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  min-height: 44px;
  padding: 10px 12px;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel[open] summary {
  margin-bottom: 10px;
}

.form-stack label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.form-stack input,
.form-grid input,
.form-grid select,
.form-grid textarea,
.filter-bar input,
.filter-bar select,
.inline-form input,
.inline-form select,
.inline-form textarea {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.filter-bar input,
.filter-bar select,
.filter-bar .btn {
  height: 44px;
  min-height: 44px;
  padding-bottom: 0;
  padding-top: 0;
}

.form-grid label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.form-span-2 {
  grid-column: 1 / -1;
}

.form-actions,
.checkbox-row,
.action-panel,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row-actions summary {
  color: var(--tblr-primary);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.row-actions summary::-webkit-details-marker {
  display: none;
}

.row-actions__panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  min-width: min(620px, 78vw);
}

.user-edit-form {
  align-items: center;
}

.row-actions__panel .inline-form .password-field {
  max-width: 360px;
}

.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-dialog {
  border: 0;
  border-radius: var(--tblr-card-radius);
  box-shadow: 0 24px 72px rgba(15, 23, 42, .28);
  color: var(--tblr-text);
  max-height: min(760px, calc(100vh - 48px));
  max-width: min(760px, calc(100vw - 28px));
  overflow: auto;
  padding: 0;
  width: 100%;
}

.app-dialog::backdrop {
  background: rgba(15, 23, 42, .44);
}

.app-dialog__header,
.app-dialog__body,
.app-dialog__footer {
  padding: 16px 18px;
}

.app-dialog__header {
  align-items: flex-start;
  border-bottom: 1px solid var(--tblr-border);
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.app-dialog__header h2 {
  margin: 0;
}

.app-dialog__close {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--tblr-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  line-height: 1;
  margin: -6px -8px -4px 0;
  width: 36px;
}

.app-dialog__close:hover,
.app-dialog__close:focus-visible {
  background: rgba(177, 31, 75, .08);
  border-color: rgba(177, 31, 75, .18);
  color: var(--tblr-primary);
}

.app-dialog__footer {
  border-top: 1px solid var(--tblr-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  padding: 10px 12px;
}

.detail-grid span {
  color: var(--tblr-muted);
  display: block;
  font-size: .84rem;
  margin-bottom: 4px;
}

.danger-text {
  color: var(--tblr-danger);
}

.btn,
button.btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  overflow-wrap: anywhere;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #206bc4, #3b82f6);
  border-color: #206bc4;
  box-shadow: 0 10px 22px rgba(var(--tblr-primary-rgb), .24);
}

/* 显式覆盖框架默认按钮 hover（避免出现紫红色），统一为更深的蓝色 */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
  background: linear-gradient(135deg, #1b589f, #2f6fd6);
  border-color: #1b589f;
  box-shadow: 0 12px 26px rgba(var(--tblr-primary-rgb), .30);
  text-decoration: none;
}

.btn.is-busy,
button.btn.is-busy {
  cursor: progress;
  opacity: .72;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  padding-right: 70px;
  width: 100%;
}

.password-toggle {
  background: #fff;
  border: 1px solid var(--tblr-border);
  border-radius: 999px;
  color: var(--tblr-primary);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  min-height: 30px;
  padding: 2px 12px;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(var(--tblr-primary-rgb), .09);
}

.ui-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 1rem;
  justify-content: center;
  width: 1rem;
}

.ui-icon svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.checkbox-row label {
  align-items: center;
  border: 1px solid var(--tblr-border);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  padding: 7px 10px;
}

.checkbox-row input {
  width: auto;
}

.field-error {
  color: var(--tblr-danger);
  display: block;
  font-size: .86rem;
  margin-top: 4px;
}

.form-hint,
.empty-text {
  color: var(--tblr-muted);
  font-size: .9rem;
  margin: 6px 0 0;
}

.btn-sm {
  font-size: .86rem;
  padding: 6px 10px;
}

/* 表格内按钮在桌面略小（移动端仍保证 44px 触控目标） */
@media (min-width: 769px) {
  .data-table .btn-sm,
  .table-actions .btn {
    font-size: .8rem;
    min-height: 32px;
    padding: 3px 9px;
  }
}

.compact-heading {
  align-items: center;
  margin-bottom: 10px;
}

.attachment-upload-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.attachment-upload-form input {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

.attachment-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.attachment-list li {
  align-items: center;
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.attachment-list span {
  color: var(--tblr-muted);
  display: block;
  font-size: .86rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.attachment-list strong {
  overflow-wrap: anywhere;
}

/* 附件操作按钮组与预览弹窗 */
.attachment-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.app-dialog--preview {
  max-width: min(920px, calc(100vw - 28px));
  width: 100%;
}

.attachment-preview-image {
  border-radius: var(--tblr-radius);
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.attachment-preview-frame {
  border: 0;
  height: 70vh;
  width: 100%;
}

.attachment-preview-text {
  background: #f8fbff;
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  font-family: Consolas, "Courier New", Courier, monospace;
  font-size: .85rem;
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.comment-list,
.message-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.comment-list li,
.message-list li {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  padding: 12px;
}

.comment-list p,
.message-list p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-meta,
.message-meta,
.message-title span {
  color: var(--tblr-muted);
  font-size: .86rem;
}

.message-list li {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.message-list li.unread {
  background: rgba(177, 31, 75, .06);
  border-color: rgba(177, 31, 75, .22);
}

.message-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-form {
  display: grid;
  gap: 14px;
}

.exercise-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
}

.exercise-list li {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  padding: 12px;
}

.exercise-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.exercise-options label {
  align-items: flex-start;
  display: flex;
  gap: 8px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-bars {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.metric-bar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(90px, .9fr) minmax(120px, 2fr) auto;
}

.metric-bar span,
.metric-bar strong {
  font-size: .9rem;
}

.metric-bar div {
  background: rgba(var(--tblr-primary-rgb), .11);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.metric-bar i {
  background: linear-gradient(90deg, #206bc4, #60a5fa);
  display: block;
  height: 100%;
}

.compact-bars .metric-bar {
  grid-template-columns: 52px minmax(80px, 1fr) auto;
}

.exercise-summary {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.exercise-summary strong {
  color: var(--tblr-primary);
  font-size: 2rem;
}

.exercise-summary span {
  color: var(--tblr-muted);
}

.report-toolbar {
  position: relative;
}

@media print {
  .app-header,
  .app-footer,
  .no-print,
  .illustrated-card__art,
  .illustrated-card::before {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .illustrated-card {
    background: #fff !important;
    display: block;
  }

  .page-shell {
    width: 100%;
  }

  .panel-card,
  .status-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  .data-table {
    font-size: .82rem;
    min-width: 0;
    table-layout: fixed;
  }

  .data-table th,
  .data-table td {
    overflow-wrap: anywhere;
    padding: 6px;
  }
}

.alert {
  border-radius: var(--tblr-radius);
  margin-top: 16px;
  padding: 12px;
  scroll-margin-top: 92px;
}

.alert:focus {
  outline: 2px solid rgba(var(--tblr-primary-rgb), .35);
  outline-offset: 2px;
}

.alert-danger {
  background: rgba(220, 38, 38, .1);
  border: 1px solid rgba(220, 38, 38, .28);
  color: var(--tblr-danger);
}
.app-nav a.is-active,
.mobile-menu nav a.is-active {
  background: linear-gradient(135deg, #206bc4, #3b82f6);
  color: #fff;
}

.alert-warning {
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .3);
  color: #92400e;
}

.alert-success {
  background: rgba(22, 163, 74, .1);
  min-height: 44px;
  padding: 8px 12px;
}

.hint-box {
  background: rgba(var(--tblr-primary-rgb), .07);
  border: 1px solid rgba(var(--tblr-primary-rgb), .18);
  border-radius: var(--tblr-radius);
  color: var(--tblr-muted);
  margin-top: 18px;
  min-height: 44px;
  padding: 9px 14px;
}

.hint-box strong,
.hint-box span {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 720px;
  width: 100%;
}

.table-wrap {
  border: 1px solid var(--tblr-border);
  border-radius: 14px;
  background: #fff;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--tblr-border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f8fbff;
  color: var(--tblr-muted);
  font-size: .78rem;
  letter-spacing: .01em;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: rgba(var(--tblr-primary-rgb), .04);
}

.table-sort-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 6px;
  padding: 0;
  white-space: nowrap;
}

.table-sort-button::after {
  color: #98a2b3;
  content: "↕";
  font-size: .8rem;
}

.table-sort-button[data-sort="asc"]::after {
  content: "↑";
  color: var(--tblr-primary);
}

.table-sort-button[data-sort="desc"]::after {
  content: "↓";
  color: var(--tblr-primary);
}

.table-controls {
  align-items: center;
  color: var(--tblr-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .9rem;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}

.table-mobile-sort {
  align-items: center;
  display: none;
  gap: 6px;
}

.table-mobile-sort select {
  border: 1px solid var(--tblr-border);
  border-radius: 8px;
  min-height: 34px;
  padding: 4px 8px;
}

.pagination-lite {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-lite button,
.pagination-lite .page-link,
.pagination-ellipsis {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tblr-border);
  border-radius: 8px;
  color: var(--tblr-muted);
  display: inline-flex;
  font: inherit;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
  padding: 0 6px;
}

.pagination-lite button:not(:disabled),
.pagination-lite a.page-link {
  cursor: pointer;
}

.pagination-lite button:hover:not(:disabled),
.pagination-lite button.is-active,
.pagination-lite a.page-link:hover,
.pagination-lite .page-link.is-active {
  background: var(--tblr-primary);
  border-color: var(--tblr-primary);
  color: #fff;
  text-decoration: none;
}

.pagination-lite .page-link.is-disabled {
  cursor: default;
  opacity: .5;
}

.ui-tag,
.badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  gap: 4px;
  line-height: 1.2;
  min-height: 24px;
  padding: 4px 9px;
}

.tag-primary,
.badge-primary {
  background: #e8f1ff;
  color: #206bc4;
}

.tag-blue,
.badge-blue {
  background: #e7f5ff;
  color: #1c7ed6;
}

.tag-azure,
.badge-azure {
  background: #e6f8ff;
  color: #1176a6;
}

.tag-success,
.badge-success {
  background: #eaf7ec;
  color: #2fb344;
}

.tag-lime,
.badge-lime {
  background: #f1f8e8;
  color: #74b816;
}

.tag-warning,
.badge-warning {
  background: #fff4de;
  color: #f59f00;
}

.tag-danger,
.badge-danger {
  background: #fdecec;
  color: #d63939;
}

.tag-muted,
.tag-secondary,
.badge-secondary {
  background: #eef1f5;
  color: #667382;
}

.tag-info,
.badge-info {
  background: #e8fbfd;
  color: #0ca5b8;
}

.tag-purple,
.badge-purple {
  background: #f3efff;
  color: #7952b3;
}

.tag-pink,
.badge-pink {
  background: #fff0f6;
  color: #d6336c;
}

.tag-teal,
.badge-teal {
  background: #e6fcf5;
  color: #0ca678;
}

.tag-indigo,
.badge-indigo {
  background: #edf2ff;
  color: #4263eb;
}

.tag-orange,
.badge-orange {
  background: #fff0e6;
  color: #f76707;
}

.issue-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.issue-state-tabs,
.message-state-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  display: flex;
  gap: 6px;
  padding: 5px;
}

.issue-state-tabs a,
.message-state-tabs a {
  align-items: center;
  border-radius: calc(var(--tblr-radius) - 2px);
  color: var(--tblr-muted);
  display: inline-flex;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  text-decoration: none;
}

.issue-state-tabs a:hover,
.message-state-tabs a:hover {
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
}

.issue-state-tabs a.is-active,
.message-state-tabs a.is-active {
  background: rgba(var(--tblr-primary-rgb), .12);
  color: var(--tblr-primary);
  font-weight: 800;
}

.issue-state-tabs strong,
.message-state-tabs strong {
  background: rgba(15, 23, 42, .08);
  border-radius: 999px;
  color: inherit;
  font-size: .82rem;
  min-width: 28px;
  padding: 2px 8px;
  text-align: center;
}

.issue-card {
  background: var(--tblr-surface);
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  color: var(--tblr-text);
  display: grid;
  gap: 6px;
  padding: 14px;
}

.issue-card:hover {
  border-color: var(--tblr-primary);
  text-decoration: none;
}

.issue-card span,
.issue-card small {
  color: var(--tblr-muted);
  overflow-wrap: anywhere;
}

.issue-card__meta {
  font-size: .9rem;
}

.workflow-card {
  align-items: center;
  background: rgba(var(--tblr-primary-rgb), .07);
  border: 1px solid rgba(var(--tblr-primary-rgb), .18);
  border-radius: var(--tblr-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px;
}

.process-steps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.process-steps li {
  align-items: center;
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  color: var(--tblr-muted);
  display: flex;
  gap: 8px;
  padding: 10px;
}

.process-steps span {
  align-items: center;
  background: rgba(var(--tblr-primary-rgb), .1);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.process-steps strong {
  font-size: .9rem;
}

.process-steps li.is-done {
  border-color: rgba(22, 163, 74, .36);
  color: var(--tblr-text);
}

.process-steps li.is-done span {
  background: var(--tblr-success);
  color: #fff;
}

.detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.detail-grid div {
  border: 1px solid var(--tblr-border);
  border-radius: var(--tblr-radius);
  padding: 10px;
}

.detail-grid dt {
  color: var(--tblr-muted);
  font-size: .8rem;
  font-weight: 800;
}

.detail-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.description-block {
  margin: 18px 0;
}

.description-block h2 {
  font-size: 1rem;
  margin: 14px 0 6px;
}

.description-block p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.timeline-list {
  border-left: 3px solid rgba(var(--tblr-primary-rgb), .22);
  list-style: none;
  margin: 12px 0 0;
  padding-left: 18px;
}

.timeline-list li {
  margin-bottom: 14px;
  position: relative;
}

.timeline-list li::before {
  background: var(--tblr-primary);
  border-radius: 999px;
  content: "";
  height: 10px;
  left: -24px;
  position: absolute;
  top: 8px;
  width: 10px;
}

.timeline-list span,
.timeline-list p {
  color: var(--tblr-muted);
  display: block;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .table-mobile-sort {
    display: inline-flex;
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border: 1px solid var(--tblr-border);
    border-radius: var(--tblr-radius);
    margin-bottom: 12px;
    padding: 10px;
  }

  .data-table td {
    border-bottom: none;
    padding: 6px 0;
  }

  .data-table td::before {
    color: var(--tblr-muted);
    content: attr(data-label);
    display: block;
    font-size: .78rem;
    font-weight: 800;
  }
}

@media (max-width: 900px) {
  .illustrated-card {
    grid-template-columns: 1fr;
  }

  .illustrated-card__art {
    justify-self: start;
    max-height: 130px;
  }

  .hero-card,
  .section-heading,
  .app-footer .page-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header__inner {
    align-items: center;
    display: grid;
    gap: 10px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
    justify-self: end;
  }

  .mobile-menu__panel {
    min-width: 180px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
  }

  .account-bar--desktop {
    display: none;
  }

  .account-bar--mobile {
    align-items: stretch;
    flex-direction: column;
  }

  .account-bar--mobile span {
    color: var(--tblr-muted);
    font-weight: 700;
    padding: 0 2px;
  }

  .account-bar--mobile button,
  .account-bar--mobile a {
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .status-grid,
  .steps-list,
  .dashboard-grid,
  .process-steps,
  .form-grid,
  .filter-bar,
  .attachment-upload-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }


  .issue-filter-bar {
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)) auto;
  }
  .form-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .app-main {
    padding-top: 16px;
  }

  .hero-card,
  .panel-card,
  .auth-card,
  .status-card {
    padding: 14px;
  }

  .hero-card h1,
  .panel-card h1 {
    font-size: 1.45rem;
  }

  .form-actions,
  .action-panel,
  .inline-form,
  .attachment-list li,
  .message-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .btn,
  .action-panel .btn,
  .inline-form .btn,
  .attachment-list .btn,
  .message-list .btn {
    width: 100%;
  }

  .metric-bar {
    grid-template-columns: 1fr;
  }

  .metric-bar div {
    width: 100%;
  }

  .process-steps li {
    padding: 8px;
  }
}

.illustrated-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(32, 107, 196, .11), rgba(96, 165, 250, .06)),
    #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 230px);
  overflow: hidden;
  position: relative;
}

.illustrated-card::before {
  background: radial-gradient(circle, rgba(32, 107, 196, .14), transparent 62%);
  content: "";
  height: 260px;
  position: absolute;
  right: -90px;
  top: -110px;
  width: 260px;
}

.illustrated-card__art {
  display: block;
  justify-self: end;
  max-height: 160px;
  max-width: 230px;
  position: relative;
  width: 100%;
}

.illustrated-card > .filter-panel,
.illustrated-card > .empty-state,
.illustrated-card > .issue-state-tabs,
.illustrated-card > .message-state-tabs,
.illustrated-card > .issue-list,
.illustrated-card > .message-list,
.illustrated-card > .table-controls,
.illustrated-card > .alert,
.illustrated-card > form,
.illustrated-card > p {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.stat-icon {
  align-items: center;
  background: var(--tblr-blue-soft);
  border-radius: 13px;
  color: var(--tblr-primary);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin-bottom: 2px;
  width: 38px;
}

/* 移动端触控目标与页头性能降级（Task 24） */
@media (max-width: 768px) {
  .issue-list {
    grid-template-columns: 1fr;
  }

  .app-header {
    backdrop-filter: none;
    background: rgba(255, 255, 255, .97);
  }

  .btn-sm,
  .pagination-lite button,
  .pagination-ellipsis,
  .table-mobile-sort select,
  .row-actions summary {
    min-height: 44px;
  }

  .pagination-lite button,
  .pagination-lite .page-link,
  .pagination-ellipsis {
    min-width: 44px;
  }

  .row-actions summary {
    align-items: center;
    display: inline-flex;
  }

  .password-toggle {
    min-height: 36px;
  }
}

/* 面包屑导航（Task 25） */
.breadcrumb {
  align-items: center;
  color: var(--tblr-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .86rem;
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.breadcrumb li {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.breadcrumb li:not(:last-child)::after {
  color: var(--tblr-border);
  content: "/";
}

.breadcrumb a {
  color: var(--tblr-muted);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--tblr-primary);
}

.breadcrumb [aria-current="page"] {
  color: var(--tblr-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60vw;
}

/* 尊重系统“减少动态效果”偏好（Task 25） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 宽表格折叠次要列（Task：列收口）。被折叠列在桌面宽屏隐藏，移动卡片视图仍逐列展示，详情通过“查看”弹窗补充。 */
@media (min-width: 769px) {
  .data-table th.is-collapsed-col,
  .data-table td.is-collapsed-col {
    display: none;
  }
}


