@media (max-width: 860px) {
  .filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .filter-chip {
    width: 100%;
    padding: 0 4px;
    white-space: nowrap;
  }
}

@media (max-width: 800px) {
  #adminChangePassword::after { content: "改密"; }
  #adminLogout::after { content: "退出"; }
}

/*
 * DataFlow product theme
 * Adapted from the local Awesome DESIGN.md Airtable reference.
 * The existing styles keep structural behavior; this layer owns visual tokens.
 */

:root {
  --ink: #181d26;
  --body: #333840;
  --muted: #606872;
  --soft: #68717b;
  --line: #dde2e7;
  --line-strong: #c5cbd2;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f3;
  --canvas: #101613;
  --accent: #08795d;
  --accent-dark: #065b46;
  --accent-soft: #e3f3ed;
  --violet: #5667c9;
  --danger: #b93843;
  --warning: #9a6515;
  --signature-forest: #0a2e0e;
  --signature-coral: #aa2d00;
  --signature-cream: #f5e9d4;
  --topbar-height: 72px;
  --left-width: 286px;
  --right-width: 320px;
  --shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  font-synthesis: none;
}

body {
  color: var(--body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #c9e9dd;
  color: var(--ink);
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid rgba(8, 121, 93, .58);
  outline-offset: 2px;
}

input,
textarea {
  border-color: var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #68717b;
  opacity: 1;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 121, 93, .11);
}

.button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

.button:hover:not(:disabled) {
  transform: none;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.button-primary:hover:not(:disabled) {
  border-color: #0d1218;
  background: #0d1218;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled) {
  border-color: #929aa4;
  background: var(--surface-2);
}

.button-quiet {
  color: var(--muted);
}

.button-quiet:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--ink);
}

.text-button {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-color: var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.danger-hover:hover:not(:disabled) {
  border-color: #e5b8bd;
  background: #fff2f3;
  color: var(--danger);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.brand {
  gap: 10px;
  font-weight: 680;
  letter-spacing: -.025em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 9px;
  background: var(--ink);
}

.brand-mark i {
  background: #9ce6d0;
}

/* Login */

.login-shell {
  grid-template-columns: minmax(430px, .88fr) minmax(540px, 1.12fr);
  background: var(--surface);
}

.login-card {
  width: min(460px, calc(100% - 72px));
  padding: 56px 8px;
}

.brand-large {
  margin-bottom: 76px;
  font-size: 22px;
}

.login-card h1 {
  max-width: 440px;
  color: var(--ink);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.login-copy {
  max-width: 420px;
  margin: 22px 0 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  text-wrap: pretty;
}

.login-form {
  gap: 17px;
}

.login-form label,
.field-label {
  gap: 8px;
  color: #4b535c;
  font-size: 12px;
  font-weight: 650;
}

.login-form input {
  height: 48px;
  padding: 0 14px;
}

.button-large {
  height: 48px;
  margin-top: 2px;
  padding: 0 17px;
  font-size: 13px;
}

.login-foot {
  margin-top: 32px;
  color: var(--muted);
  font-size: 11px;
}

.secure-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-visual {
  margin: 12px;
  border-radius: 12px;
  background: var(--signature-forest);
  box-shadow: none;
}

.visual-grid {
  display: none;
}

.visual-polygon {
  opacity: .96;
  filter: drop-shadow(0 22px 32px rgba(1, 12, 7, .28));
}

.depth-rings {
  border-color: rgba(168, 216, 196, .22);
}

.visual-caption {
  left: 38px;
  right: 38px;
  bottom: 34px;
  border-top-color: rgba(255, 255, 255, .2);
}

.visual-caption span {
  color: #bdebdc;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.visual-caption strong {
  font-size: 15px;
  font-weight: 560;
}

.admin-login-visual {
  background: var(--ink);
}

.admin-visual-copy {
  top: 52px;
  left: 52px;
  gap: 8px;
}

.admin-visual-copy span {
  color: #a8d8c4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.admin-visual-copy strong {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -.025em;
}

.admin-flow-board {
  position: absolute;
  width: min(74%, 720px);
  left: 50%;
  top: 53%;
  padding: 26px 28px 22px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.admin-flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: admin-flow;
}

.admin-flow-list li {
  counter-increment: admin-flow;
  display: grid;
  grid-template-columns: 28px 110px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.admin-flow-list li::before {
  content: counter(admin-flow, decimal-leading-zero);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.admin-flow-list li:last-child {
  border-bottom: 0;
}

.admin-flow-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-flow-list strong {
  font-size: 15px;
  font-weight: 540;
}

.admin-flow-board p {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Annotation application shell */

.app-shell {
  background: var(--surface-2);
}

.topbar {
  gap: 16px;
  padding: 0 20px;
  border-bottom-color: var(--line);
  background: var(--surface);
}

.topbar-brand {
  min-width: calc(var(--left-width) - 20px);
  font-size: 18px;
}

.topbar-divider {
  height: 30px;
  background: var(--line);
}

.dataset-heading {
  width: min(390px, 31vw);
  min-width: 250px;
}

.dataset-heading-row {
  gap: 8px;
}

.dataset-switcher-field select {
  height: 36px;
  padding-left: 11px;
  border-color: var(--line);
  border-radius: 8px;
  background-color: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.dataset-switcher-field select:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface);
}

.status-pill {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 650;
}

.progress-line {
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.progress-track {
  width: 92px;
  height: 4px;
  background: var(--surface-3);
}

.progress-track i {
  background: var(--accent);
}

.topbar-actions {
  gap: 7px;
}

.save-state {
  color: var(--muted);
  font-size: 11px;
}

.user-chip {
  gap: 9px;
  padding-left: 12px;
  border-left-color: var(--line);
}

.avatar {
  border-radius: 9px;
  background: var(--ink);
  color: #bcebdd;
  font-weight: 720;
}

.user-copy strong {
  font-size: 12px;
}

.user-copy small {
  color: var(--muted);
  font-size: 10px;
}

.workspace {
  grid-template-columns: var(--left-width) minmax(420px, 1fr) var(--right-width);
}

.sidebar {
  background: var(--surface);
}

.sidebar-left,
.sidebar-right {
  border-color: var(--line);
}

.side-tabs {
  height: 52px;
  padding: 0 16px;
  border-bottom-color: var(--line);
}

.side-tab {
  height: 51px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.side-tab::after {
  left: 24%;
  right: 24%;
  height: 2px;
}

.side-tab.is-active {
  color: var(--ink);
}

.side-tab.is-active::after {
  background: var(--accent);
}

.side-panel {
  height: calc(100% - 52px);
  padding: 14px 12px;
}

.search-box {
  height: 40px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.search-box input {
  color: var(--ink);
  font-size: 12px;
}

.search-box kbd {
  color: var(--muted);
  font-size: 10px;
}

.filter-row {
  gap: 6px;
  margin: 10px 0 16px;
}

.filter-chip {
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.filter-chip.is-active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: none;
}

.list-caption {
  padding: 0 5px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
}

.image-item {
  min-height: 58px;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 3px;
  padding: 9px;
  border-radius: 8px;
}

.image-item:hover {
  background: var(--surface-2);
}

.image-item.is-active {
  border-color: #b9decf;
  background: var(--accent-soft);
}

.image-item-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.image-item-copy small {
  color: var(--muted);
  font-size: 10px;
}

.depth-token {
  background: #e9edfb;
  color: #4458ae;
  font-size: 9px;
}

.review-filter-row {
  margin-top: -7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.image-item-tail {
  display: inline-flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.review-token {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  padding: 0 6px;
  border-radius: 5px;
  background: #fff3dc;
  color: var(--warning);
  font-size: 8px;
  font-weight: 720;
  white-space: nowrap;
}

.review-token.approved {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.review-token.rejected {
  background: #fde8e9;
  color: var(--danger);
}

.mini-state.review-pending {
  background: #fff3dc;
  color: var(--warning);
}

.mini-state.review-approved {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mini-state.review-rejected {
  background: #fde8e9;
  color: var(--danger);
}

.image-review-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.image-review-card strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.image-review-card > span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.image-review-card p {
  margin: 4px 0 0;
  padding: 9px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--body);
  font-size: 10px;
  line-height: 1.5;
}

.image-review-card p.rejected {
  background: #fff2f3;
  color: #82373f;
}

.image-review-section .workflow-actions {
  margin-top: 10px;
}
.panel-intro {
  padding: 5px 4px 16px;
}

.panel-intro h2 {
  font-size: 15px;
  font-weight: 600;
}

.panel-intro p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.add-label-form {
  gap: 8px;
  padding-bottom: 15px;
  border-bottom-color: var(--line);
}

.add-label-form input,
.field-inline input {
  height: 38px;
  font-size: 12px;
}

.label-list {
  padding-top: 10px;
}

.label-item {
  min-height: 42px;
  border-radius: 7px;
  color: var(--body);
}

.label-item.is-active {
  border-color: #b9decf;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.label-item small {
  color: var(--muted);
  font-size: 10px;
}

.annotator-stage {
  background: var(--canvas);
}

.toolstrip {
  min-height: 56px;
  gap: 7px;
  padding: 8px 10px;
  border-bottom-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.tool-button {
  min-width: 60px;
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.tool-button:hover {
  background: var(--surface-3);
}

.tool-button.is-active {
  border-color: #b9decf;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tool-divider {
  height: 26px;
  background: var(--line);
}

.tool-group.compact .icon-button {
  min-width: 42px;
  height: 36px;
  padding: 0 9px;
  font-size: 10px;
}

.view-switch {
  height: 36px;
  padding: 3px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.view-option {
  min-width: 46px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.view-option.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 29, 38, .1);
}

.opacity-control {
  color: var(--muted);
  font-size: 10px;
}

.opacity-control input {
  accent-color: var(--accent);
}

.zoom-value {
  color: var(--muted);
  font-size: 10px;
}

.toolstrip .button {
  min-height: 36px;
  font-size: 11px;
}

.canvas-wrap {
  background: var(--canvas);
}

.canvas-empty {
  color: #b8c4bf;
}

.canvas-empty strong {
  font-size: 14px;
  font-weight: 580;
}

.canvas-empty small {
  color: #87958f;
  font-size: 11px;
}

.empty-orbit {
  border-color: #50605a;
}

.empty-orbit::after {
  background: #8ddac3;
  box-shadow: none;
}

.canvas-badge,
.draw-hint {
  border-radius: 7px;
  backdrop-filter: none;
  font-size: 10px;
}

.canvas-badge {
  background: rgba(13, 24, 20, .92);
}

.draw-hint {
  background: rgba(6, 59, 43, .94);
  color: #c8f2e5;
}

.canvas-statusbar {
  height: 28px;
  gap: 18px;
  color: #8b9994;
  font-size: 9px;
}

.right-section {
  padding: 18px 16px;
  border-bottom-color: var(--line);
}

.section-heading {
  margin-bottom: 13px;
}

.section-heading h2 {
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
}

.section-heading > span {
  color: var(--muted);
  font-size: 10px;
}

.count-badge {
  min-width: 22px;
  height: 20px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
}

.object-list {
  max-height: 260px;
}

.object-empty {
  padding: 24px 18px;
  border-color: var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.object-item {
  min-height: 46px;
  border-radius: 7px;
}

.object-item.is-selected {
  border-color: #b9decf;
  background: var(--accent-soft);
}

.object-copy strong {
  font-size: 11px;
}

.object-copy small,
.object-index {
  color: var(--muted);
  font-size: 9px;
}

.property-grid > div {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.property-grid span {
  color: var(--muted);
  font-size: 10px;
}

.property-grid strong {
  color: var(--body);
  font-size: 11px;
}

.file-card {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.file-card strong {
  font-size: 11px;
}

.file-card span {
  color: var(--muted);
  font-size: 9px;
}

.mini-state {
  font-size: 9px;
}

.workflow-step {
  color: var(--muted);
  font-size: 9px;
}

.review-message,
.review-message.rejected {
  padding: 10px;
  border: 1px solid #e7d3a7;
  border-radius: 8px;
  background: #fff8e9;
  color: #6f5429;
  font-size: 10px;
}

.review-message.rejected {
  border-color: #e7bcc0;
  background: #fff2f3;
  color: #82373f;
}

.modal {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(13, 18, 24, .2);
}

.modal::backdrop {
  background: rgba(24, 29, 38, .5);
  backdrop-filter: none;
}

.modal-card {
  border-radius: 12px;
}

.modal-heading h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -.025em;
}

.modal-heading .eyebrow {
  margin-bottom: 6px;
}

.shortcut-grid {
  color: var(--muted);
  font-size: 12px;
}

.shortcut-grid kbd {
  color: var(--body);
  font-size: 10px;
}

.modal-note {
  color: var(--muted);
  font-size: 11px;
}

.toast-region {
  z-index: 50;
}

.toast {
  border-color: rgba(255, 255, 255, .14);
  border-radius: 9px;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(13, 18, 24, .18);
  font-size: 12px;
}

/* Administrator shell */

.admin-page {
  background: var(--surface-2);
}

.admin-page select {
  height: 44px;
  border-color: var(--line-strong);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--ink);
}

.admin-page select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 121, 93, .11);
}

.admin-shell {
  grid-template-columns: 224px minmax(0, 1fr);
}

.admin-sidebar {
  padding: 28px 16px 18px;
  background: var(--ink);
  color: #edf2f0;
}

.admin-brand {
  margin: 0 10px;
  font-size: 19px;
}

.admin-brand .brand-mark {
  background: #2a313b;
}

.sidebar-caption {
  margin: 11px 11px 26px;
  color: #9aa4ad;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.admin-nav {
  gap: 5px;
}

.admin-nav-item {
  height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: #aeb7bf;
  font-size: 12px;
  font-weight: 600;
}

.admin-nav-item::before {
  display: none;
}

.admin-nav-item:hover {
  background: #232a33;
  color: #ffffff;
}

.admin-nav-item.is-active {
  border-color: transparent;
  background: #303844;
  color: #ffffff;
}

.sidebar-bottom {
  gap: 14px;
}

.sidebar-link {
  padding: 12px 9px;
  border-top-color: rgba(255, 255, 255, .11);
  border-bottom-color: rgba(255, 255, 255, .11);
  color: #b8c0c7;
  font-size: 11px;
}

.sidebar-link:hover {
  color: #ffffff;
}

.sidebar-user {
  grid-template-columns: 36px minmax(0, 1fr) 42px;
}

.sidebar-user .avatar {
  background: #303844;
}

.sidebar-user strong {
  font-size: 12px;
}

.sidebar-user small {
  color: #9aa4ad;
  font-size: 10px;
}

.sidebar-user button {
  color: #aeb7bf;
}

.sidebar-user button:hover {
  background: #303844;
}

.admin-topbar {
  min-height: 92px;
  padding: 15px 28px;
  border-bottom-color: var(--line);
  background: var(--surface);
}

.admin-topbar .eyebrow {
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-size: 11px;
}

.admin-topbar h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.topbar-heading > p:last-child {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.topbar-meta {
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.live-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.admin-content {
  padding: 28px 28px 48px;
}

.admin-section {
  max-width: 1380px;
}

.next-action-card {
  min-height: 124px;
  gap: 28px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 0;
  border-radius: 12px;
  background: var(--signature-forest);
  box-shadow: none;
  color: #ffffff;
}

.next-action-card.warning {
  border: 1px solid #e2d2b6;
  background: var(--signature-cream);
  color: var(--ink);
}

.next-action-card.review {
  border: 0;
  background: var(--ink);
  color: #ffffff;
}

.next-action-eyebrow,
.next-action-card.warning .next-action-eyebrow,
.next-action-card.review .next-action-eyebrow {
  margin-bottom: 7px;
  color: inherit;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
  opacity: .78;
}

.next-action-card h2 {
  color: inherit;
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -.02em;
}

.next-action-card > div > p:last-child {
  max-width: 70ch;
  margin-top: 8px;
  color: inherit;
  font-size: 12px;
  line-height: 1.6;
  opacity: .78;
}

.next-action-card .button {
  min-width: 124px;
  border-color: #ffffff;
  background: #ffffff;
  color: var(--ink);
}

.next-action-card.warning .button {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.kpi-grid {
  gap: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.kpi-card,
.kpi-card.mint,
.kpi-card.amber,
.kpi-card.violet,
.kpi-card.green {
  min-height: 118px;
  padding: 21px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.kpi-card strong {
  margin: 10px 0 7px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 520;
  letter-spacing: -.035em;
}

.kpi-card p {
  color: var(--muted);
  font-size: 11px;
}

.admin-grid {
  gap: 18px;
}

.admin-card {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
}

.card-heading {
  min-height: 72px;
  padding: 17px 20px;
  border-bottom-color: var(--line);
}

.card-heading h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 620;
}

.card-heading p {
  color: var(--muted);
  font-size: 11px;
}

.dataset-progress-list {
  padding: 8px 20px 16px;
}

.dataset-progress-row {
  min-height: 70px;
  border-bottom-color: #e8ebee;
}

.dataset-progress-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.dataset-progress-copy small,
.inline-progress small,
.dataset-progress-stats small {
  color: var(--muted);
  font-size: 10px;
}

.dataset-progress-stats strong {
  color: var(--ink);
  font-size: 13px;
}

.inline-progress > span {
  height: 5px;
}

.compact-workloads {
  padding: 8px 20px 16px;
}

.compact-workload {
  min-height: 64px;
  border-bottom-color: #e8ebee;
}

.compact-workload strong {
  color: var(--ink);
  font-size: 11px;
}

.compact-workload small {
  color: var(--muted);
  font-size: 10px;
}

.compact-workload > b {
  color: var(--body);
  font-size: 12px;
}

.empty-card,
.table-empty {
  color: var(--muted);
  font-size: 12px;
}

.upload-card {
  box-shadow: none;
}

.form-section {
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 24px;
  border-bottom-color: var(--line);
}

.form-section-heading > span {
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
}

.form-section-heading h2 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.form-section-heading p {
  color: var(--muted);
  font-size: 10px;
}

.admin-form {
  gap: 18px;
}

.admin-form label {
  color: #4b535c;
  font-size: 11px;
  font-weight: 650;
}

.admin-form label > small {
  color: var(--muted);
  font-size: 10px;
}

.file-picker {
  min-height: 118px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.file-picker:hover {
  border-color: var(--accent);
  background: #eef8f4;
}

.file-picker-icon {
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.depth-picker .file-picker-icon {
  background: #e9edfb;
  color: #4458ae;
}

.file-picker strong {
  color: var(--ink);
  font-size: 12px;
}

.file-picker small {
  color: var(--muted);
  font-size: 10px;
}

.pairing-summary {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.upload-status {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-status > div {
  color: var(--muted);
  font-size: 11px;
}

.upload-track i {
  background: var(--accent);
}

.upload-status > small {
  color: var(--muted);
  font-size: 10px;
}

.dataset-register-row {
  padding: 15px 6px;
  border-bottom-color: #e8ebee;
}

.register-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.register-copy small {
  color: var(--muted);
  font-size: 10px;
}

.mini-button {
  height: 32px;
  border-color: var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
}

.status-tag {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
}

.task-toolbar {
  gap: 13px;
  padding: 17px 18px;
  border-bottom-color: var(--line);
  background: var(--surface);
}

.select-field {
  color: var(--muted);
  font-size: 11px;
}

.select-field select,
.assignment-bar select,
.assignment-bar input {
  font-size: 11px;
}

.search-field {
  height: 38px;
  border-color: var(--line-strong);
  border-radius: 8px;
}

.search-field input {
  color: var(--ink);
  font-size: 11px;
}

.task-tabs {
  padding: 10px 18px 0;
  border-bottom-color: var(--line);
}

.task-tabs button {
  min-width: 112px;
  height: 42px;
  color: var(--muted);
  font-size: 11px;
}

.task-tabs button.is-active {
  color: var(--accent-dark);
}

.assignment-bar {
  min-height: 64px;
  border-bottom-color: var(--line);
  background: var(--surface-2);
}

.assignment-label {
  color: var(--ink);
  font-size: 11px;
}

.assignment-bar label,
.assignment-help {
  color: var(--muted);
  font-size: 10px;
}

.selection-bar {
  background: var(--accent-soft);
}

.selection-bar > strong {
  color: var(--accent-dark);
  font-size: 11px;
}

.task-result-count {
  padding: 10px 18px;
  border-bottom-color: var(--line);
  color: var(--muted);
  font-size: 11px;
}

.admin-table {
  font-size: 12px;
}

.admin-table th {
  height: 44px;
  padding: 0 14px;
  background: var(--surface-2);
  color: #59626c;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .02em;
  text-transform: none;
}

.admin-table td {
  height: 58px;
  padding: 9px 14px;
  border-bottom-color: #e8ebee;
  color: var(--body);
}

.admin-table td strong {
  color: var(--ink);
  font-size: 12px;
}

.admin-table td small {
  color: var(--muted);
  font-size: 10px;
}

.admin-table tbody tr:hover {
  background: var(--surface-2);
}

.admin-table tbody tr.is-selected,
.admin-table tbody tr.is-selected:hover {
  background: var(--accent-soft);
}

.depth-badge {
  background: #e9edfb;
  color: #4458ae;
  font-size: 10px;
}

.progress-cell b {
  color: var(--body);
  font-size: 10px;
}

@media (max-width: 1180px) {
  :root {
    --left-width: 244px;
    --right-width: 282px;
  }

  .admin-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

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

  .kpi-card:nth-child(2) {
    border-right: 0;
  }

  .kpi-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .admin-grid.two-one,
  .upload-layout,
  .workload-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-card {
    width: min(500px, calc(100% - 48px));
  }

  .login-visual {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --left-width: 178px;
    --right-width: 202px;
  }

  .topbar {
    gap: 10px;
    padding: 0 12px;
  }

  .topbar-brand {
    min-width: 36px;
  }

  .dataset-heading {
    width: min(250px, 34vw);
    min-width: 180px;
  }

  .workspace {
    grid-template-columns: var(--left-width) minmax(300px, 1fr) var(--right-width);
  }

  .side-panel {
    padding-left: 9px;
    padding-right: 9px;
  }

  .toolstrip {
    gap: 4px;
  }

  .toolstrip > .tool-group:not(.compact) .tool-button {
    min-width: 42px;
    padding: 0 7px;
  }

  .right-section {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 800px) {
  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-sidebar {
    min-height: 60px;
    padding: 8px 12px;
    background: var(--ink);
    box-shadow: none;
  }

  .admin-nav-item {
    height: 40px;
    padding: 0 10px;
    font-size: 10px;
  }

  .admin-nav-item::before {
    display: none;
  }

  .admin-topbar {
    min-height: 88px;
    padding: 12px 16px;
  }

  .admin-content {
    padding: 20px 16px 36px;
  }

  .form-section {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 18px;
  }

  .task-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-card {
    width: calc(100% - 32px);
    padding: 32px 0;
  }

  .brand-large {
    margin-bottom: 52px;
  }

  .login-card h1 {
    font-size: 36px;
  }

  .admin-topbar {
    align-items: flex-start;
  }

  .topbar-heading > p:last-child {
    max-width: 34ch;
    font-size: 11px;
  }

  .next-action-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .next-action-card .button {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card,
  .kpi-card:nth-child(2),
  .kpi-card:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kpi-card:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* DataFlow interface polish: Primer-like type scale, glass layers, restrained motion */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
}

body {
  line-height: 1.5;
}

.button,
.mini-button,
.admin-nav-item,
.sidebar-user button,
.topbar-workspace-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar,
.admin-topbar {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}

.admin-sidebar {
  background: rgba(19, 34, 29, .96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.modal-card {
  border: 1px solid rgba(205, 217, 212, .86);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 80px rgba(17, 30, 26, .2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.canvas-badge,
.draw-hint {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(13, 24, 20, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.button,
.mini-button,
.tool-button,
.admin-nav-item,
.admin-card,
.manage-dataset-row,
.manage-image-row,
.account-directory-row {
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.admin-section:not(.is-hidden) {
  animation: dataflow-section-in .24s ease-out both;
}

@keyframes dataflow-section-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-page .button {
  min-height: 40px;
  font-size: .8125rem;
}

.admin-page .admin-nav-item {
  min-height: 46px;
  padding-inline: 16px;
  font-size: .875rem;
  line-height: 1;
  text-align: center;
}

.admin-page .sidebar-caption,
.admin-page .sidebar-user small {
  font-size: .75rem;
}

.admin-page .sidebar-link,
.admin-page .sidebar-user strong {
  font-size: .8125rem;
}

.admin-page .admin-topbar .eyebrow,
.admin-page .next-action-eyebrow {
  font-size: .75rem;
}

.admin-page .topbar-heading > p:last-child,
.admin-page .card-heading p,
.admin-page .form-section-heading p {
  font-size: .8125rem;
}

.admin-page .card-heading h3,
.admin-page .form-section-heading h2 {
  font-size: .9375rem;
}

.admin-page .admin-form label,
.admin-page .select-field,
.admin-page .assignment-bar label {
  font-size: .8125rem;
}

.admin-page .admin-form label > small,
.admin-page .file-picker small,
.admin-page .register-copy small,
.admin-page .dataset-progress-copy small,
.admin-page .inline-progress small,
.admin-page .compact-workload small {
  font-size: .75rem;
}

.admin-page .mini-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: .75rem;
  line-height: 1;
  white-space: nowrap;
}

.admin-page .status-tag,
.type-badge,
.role-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.type-badge {
  background: #edf1ff;
  color: #4d5ca8;
}

.admin-page .admin-table {
  font-size: .8125rem;
}

.admin-page .admin-table th {
  height: 44px;
  font-size: .75rem;
  letter-spacing: 0;
  text-transform: none;
}

.admin-page .admin-table td {
  height: 58px;
}

.admin-page .admin-table td strong {
  font-size: .8125rem;
}

.admin-page .admin-table td small,
.admin-page .progress-cell b {
  font-size: .75rem;
}

#managementLink,
.topbar-workspace-link {
  min-width: 126px;
  min-height: 38px;
  font-size: .8125rem !important;
  line-height: 1;
  text-align: center;
}

.dataset-type-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #cfd5f0;
  border-radius: 999px;
  background: rgba(241, 243, 255, .9);
  color: #4f5eaa;
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}

.tool-icon.point-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(8, 121, 93, .12);
}

.tool-icon.rectangle-icon {
  border: 2px solid currentColor;
  border-radius: 2px;
  background: transparent;
}

.annotation-type-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.annotation-type-picker legend {
  margin-bottom: 9px;
  color: #4b535c;
  font-size: .8125rem;
  font-weight: 650;
}

.annotation-type-picker legend small {
  margin-left: 6px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
}

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

.annotation-type-options label {
  position: relative;
  display: block;
  cursor: pointer;
}

.annotation-type-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.annotation-type-options label > span {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.annotation-type-options label:hover > span {
  border-color: #9bcbbb;
  background: #f2faf7;
}

.annotation-type-options input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(8, 121, 93, .1);
}

.annotation-type-options input:focus-visible + span {
  outline: 2px solid rgba(8, 121, 93, .58);
  outline-offset: 2px;
}

.annotation-type-options strong {
  color: var(--ink);
  font-size: .875rem;
}

.annotation-type-options small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.45;
}

.dataset-manager-card {
  overflow: hidden;
}

.dataset-manager-grid {
  min-height: min(680px, calc(100vh - 170px));
  display: grid;
  grid-template-columns: minmax(300px, .68fr) minmax(520px, 1.32fr);
}

.management-dataset-pane {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.manage-dataset-list,
.manage-image-list,
.account-directory {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.manage-dataset-list {
  max-height: calc(100vh - 250px);
  padding: 10px;
}

.manage-dataset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.manage-dataset-row:hover {
  background: var(--surface-2);
}

.manage-dataset-row.is-active {
  border-color: #b9decf;
  background: var(--accent-soft);
}

.manage-dataset-select {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 7px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.manage-dataset-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.manage-dataset-copy strong,
.manage-image-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: .875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-dataset-copy small,
.manage-image-copy small,
.management-image-header p {
  color: var(--muted);
  font-size: .75rem;
}

.manage-dataset-meta,
.manage-image-states {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.manage-delete {
  align-self: center;
}

.management-image-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.management-image-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 12px;
}

.management-image-header .eyebrow {
  margin-bottom: 4px;
}

.management-image-header h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1rem;
}

.management-image-header p {
  margin: 0;
}

.management-search {
  padding: 0 20px 14px;
}

.management-search input {
  height: 40px;
  font-size: .8125rem;
}

.manage-image-list {
  max-height: calc(100vh - 285px);
  padding: 0 20px 18px;
}

.manage-image-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #e8ecea;
}

.manage-image-row:hover {
  background: rgba(246, 248, 247, .72);
}

.manage-image-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-card {
  overflow: hidden;
}

.account-directory {
  max-height: 310px;
  padding: 8px 16px;
}

.account-directory-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e8ecea;
}

.account-directory-row:last-child {
  border-bottom: 0;
}

.account-directory-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-directory-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: .8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-directory-copy small,
.account-directory-meta small {
  color: var(--muted);
  font-size: .75rem;
}

.account-directory-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.role-badge.founder_admin {
  background: #f4e8ff;
  color: #713f98;
}

.role-badge.super_admin {
  background: #edf1ff;
  color: #4d5ca8;
}

.role-badge.admin {
  background: #e3f3ed;
  color: var(--accent-dark);
}

.role-badge.annotator {
  background: var(--surface-3);
  color: var(--muted);
}

.active-account {
  color: var(--accent-dark) !important;
}

.inactive-account {
  color: var(--danger) !important;
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 0;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
}

.account-divider::before,
.account-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.account-permission-hint {
  margin: 10px 18px 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .dataset-manager-grid {
    grid-template-columns: minmax(260px, .75fr) minmax(430px, 1.25fr);
  }

  .annotation-type-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .admin-page .admin-nav-item {
    min-height: 40px;
    font-size: .8125rem;
  }

  .dataset-manager-grid {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .management-dataset-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .manage-dataset-list,
  .manage-image-list {
    max-height: 330px;
  }
}

@media (max-width: 560px) {
  .manage-image-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .manage-image-states {
    display: none;
  }

  .account-directory-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .account-directory-meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-section:not(.is-hidden) {
    animation: none;
  }
}

/* Reviewed delivery and editable account profile */
button.user-chip {
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px 4px 12px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.user-chip:hover {
  background: var(--surface-2);
}

button.user-chip:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-modal .modal-card {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
}

.profile-account-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.profile-account-summary .avatar {
  width: 40px;
  height: 40px;
}

.profile-account-summary > span:last-child,
.profile-security-row > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-account-summary strong,
.profile-security-row strong {
  color: var(--ink);
  font-size: .875rem;
}

.profile-account-summary small,
.profile-security-row small,
.profile-modal .field-label small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 450;
  line-height: 1.45;
}

.profile-modal .field-label input {
  height: 42px;
}

.profile-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.admin-page .sidebar-user {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.admin-page .sidebar-user-actions button {
  width: auto;
  min-width: 42px;
  height: 34px;
  padding: 0 8px;
  font-size: .6875rem;
}

.reviewed-export-card {
  overflow: hidden;
}

.export-heading {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.export-heading h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.125rem;
  letter-spacing: -.02em;
}

.export-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.55;
}

.export-security-note {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #bfe3d7;
  border-radius: 6px;
  background: #edf9f5;
  color: #17694f;
  font-size: .75rem;
  font-weight: 700;
}

.export-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(150px, .8fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.export-toolbar label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #53615c;
  font-size: .75rem;
  font-weight: 680;
}

.admin-page .export-toolbar input,
.admin-page .export-toolbar select {
  width: 100%;
  height: 40px;
  min-width: 0;
  font-size: .8125rem;
}

.export-toolbar .button {
  min-width: 104px;
  height: 40px;
}

.export-summary-strip {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid #d8ebe4;
  background: #f3faf7;
}

.export-summary-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.export-summary-copy strong {
  color: #183c31;
  font-size: 1rem;
}

.export-summary-copy span {
  color: #557168;
  font-size: .75rem;
  line-height: 1.45;
}

.export-summary-strip .button {
  flex: 0 0 auto;
  min-width: 150px;
}

.export-error {
  margin: 0;
  padding: 0 24px;
}

.export-error:not(:empty) {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0c8cc;
  background: #fff5f6;
}

.export-table-scroll {
  max-height: calc(100vh - 430px);
  overflow: auto;
}

.export-table {
  min-width: 880px;
}

.download-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: .6875rem;
  font-weight: 720;
  white-space: nowrap;
}

.download-token.downloaded {
  background: #e3f6ef;
  color: #08795b;
}

.download-token.updated {
  background: #fff1d9;
  color: #936015;
}

.download-token.not_downloaded {
  background: #eceeff;
  color: #5868c5;
}

.export-preview-note {
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .export-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-toolbar .button {
    width: 100%;
  }

  .export-table-scroll {
    max-height: none;
  }
}

@media (max-width: 800px) {
  .admin-page .sidebar-user-actions button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0;
  }

  .admin-page #adminProfileButton::after {
    content: "资料";
    font-size: .625rem;
  }

  .admin-page #adminLogout::after {
    content: "退出";
    font-size: .625rem;
  }

  .export-heading,
  .export-summary-strip {
    padding-inline: 18px;
  }

  .export-toolbar {
    padding-inline: 18px;
  }

  .export-preview-note {
    padding-inline: 18px;
  }
}

@media (max-width: 620px) {
  .profile-modal .modal-card {
    padding: 20px;
  }

  .profile-security-row,
  .export-heading,
  .export-summary-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-security-row .button,
  .export-summary-strip .button {
    width: 100%;
  }

  .export-toolbar {
    grid-template-columns: 1fr;
  }

  .export-security-note {
    align-self: flex-start;
  }
}

/* Instance-aware keypoint annotation */
#annotationCanvas.mode-bbox,
#annotationCanvas.mode-keypoint {
  cursor: crosshair;
}

.current-instance-copy {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #d6e9e1;
  border-radius: 9px;
  background: linear-gradient(145deg, #f3fbf8, #edf7f3);
}

.current-instance-copy strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.current-instance-copy span {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 650;
}

.keypoint-sequence {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.keypoint-sequence.is-disabled {
  opacity: .55;
}

.keypoint-sequence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.keypoint-sequence-heading span {
  color: var(--body);
  font-size: 11px;
  font-weight: 750;
}

.keypoint-sequence-heading small {
  color: var(--soft);
  font-size: 10px;
}

.keypoint-sequence-list {
  display: grid;
  gap: 5px;
  max-height: 226px;
  overflow-y: auto;
}

.keypoint-sequence-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 54px 28px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 140ms ease-out, background-color 140ms ease-out;
}

.keypoint-sequence-item.is-active {
  border-color: #8fd5bf;
  background: var(--accent-soft);
}

.keypoint-sequence-item.is-marked:not(.is-active) {
  border-color: #cce5dc;
}

.keypoint-sequence-select:disabled,
.keypoint-sequence-state:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.keypoint-sequence-select,
.keypoint-sequence-state {
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.keypoint-sequence-select {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.keypoint-sequence-item.is-active .keypoint-sequence-select {
  color: var(--accent-dark);
}

.keypoint-name-input {
  min-width: 0;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.keypoint-name-input:hover {
  border-color: var(--line-strong);
}

.keypoint-name-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: 2px solid rgba(8, 121, 93, .16);
  outline-offset: 1px;
}

.keypoint-name-input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.keypoint-sequence-state {
  min-width: 54px;
  padding: 0 7px;
  color: #7d5b1f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.keypoint-sequence-item.is-marked .keypoint-sequence-state {
  color: var(--accent-dark);
}

.keypoint-schema-delete {
  display: grid;
  width: 27px;
  height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.keypoint-schema-delete:hover:not(:disabled) {
  background: #fff1f1;
}

.keypoint-schema-delete:disabled {
  color: var(--soft);
  cursor: not-allowed;
  opacity: .5;
}

.keypoint-schema-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.keypoint-schema-add input {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
}

.keypoint-schema-add input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(8, 121, 93, .16);
  outline-offset: 1px;
}

.keypoint-schema-add .button {
  min-height: 36px;
  padding-inline: 12px;
}

.keypoint-schema-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.keypoint-schema-state {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.keypoint-schema-state.is-pending {
  color: #8a5a16;
}

.keypoint-schema-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.keypoint-schema-actions .button {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 10px;
}

.keypoint-sequence p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .keypoint-sequence-item {
    transition: none;
  }
}

.legacy-migration-section {
  background: #fffaf0;
}

.legacy-migration-section p {
  margin: 0 0 11px;
  color: #725c36;
  font-size: 10px;
  line-height: 1.6;
}

.legacy-migration-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.instance-item {
  grid-template-columns: 23px 10px minmax(0, 1fr) auto auto;
  gap: 6px;
}

.instance-progress {
  padding: 3px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.instance-progress.completed {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.instance-progress.partial {
  background: #fff2d9;
  color: #8b5a12;
}

.instance-delete {
  padding: 2px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.instance-delete:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.file-section .button-block + .button-block {
  margin-top: 7px;
}

@media (max-width: 1050px) {
  .instance-progress {
    display: none;
  }
}

