:root {
  color-scheme: light;
  --page: #f3f4f0;
  --surface: #ffffff;
  --surface-muted: #f6f7f4;
  --graphite: #111820;
  --graphite-raised: #1a232c;
  --graphite-line: rgba(255, 255, 255, 0.12);
  --text: #14181c;
  --muted: #6f7880;
  --muted-light: #929aa1;
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(17, 24, 39, 0.18);
  --green: #176b4d;
  --green-soft: #e9f2ed;
  --danger: #b34e3e;
  --danger-soft: #f8ebe8;
  --pending: #8a681f;
  --pending-soft: #f5f0e2;
  --radius: 8px;
  --header-height: 72px;
  --queue-width: 300px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 12px 32px rgba(17, 24, 32, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--page);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono-copy {
  font-family: var(--mono);
}

/* Access gate */

.login-gate {
  display: grid;
  min-height: 100dvh;
  grid-template-rows: var(--header-height) minmax(0, 1fr);
  background: var(--page);
}

.login-brand {
  display: flex;
  height: var(--header-height);
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  color: var(--graphite);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.login-panel {
  width: min(calc(100% - 32px), 440px);
  place-self: center;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0 0 10px;
  color: var(--graphite);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.login-copy {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.access-progress {
  height: 2px;
  margin: 4px 0 2px;
  overflow: hidden;
  background: var(--line);
  border-radius: 2px;
}

.access-progress span {
  display: block;
  width: 34%;
  height: 100%;
  background: var(--green);
  animation: access-progress 1.1s ease-in-out infinite;
}

@keyframes access-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}

/* Controls */

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

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

.button:focus-visible,
.status-filter:focus-visible,
.publication-row:focus-visible,
.copy-id:focus-visible,
.search-field input:focus-visible,
.dialog-note-field textarea:focus-visible,
.technical-details > summary:focus-visible,
.symbol-disclosure > summary:focus-visible {
  outline: 2px solid rgba(23, 107, 77, 0.42);
  outline-offset: 2px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.button-primary {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.button-primary:hover:not(:disabled) {
  color: #ffffff;
  background: #125a40;
  border-color: #125a40;
}

.button-quiet {
  background: transparent;
}

.button-danger,
.button-danger-quiet {
  color: var(--danger);
  border-color: rgba(179, 78, 62, 0.24);
}

.button-danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:hover:not(:disabled) {
  color: #ffffff;
  background: #9d4033;
  border-color: #9d4033;
}

.button-danger-quiet:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(179, 78, 62, 0.32);
}

.button-large {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
}

.button.is-loading,
.refresh-button.is-loading {
  opacity: 0.58;
}

.dialog-note-field {
  display: grid;
  gap: 8px;
}

.dialog-note-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.search-field input,
.dialog-note-field textarea {
  width: 100%;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-field input:focus,
.dialog-note-field textarea:focus {
  border-color: rgba(23, 107, 77, 0.5);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.08);
}

.form-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
}

/* Workspace header */

.admin-app {
  min-height: 100dvh;
  background: var(--page);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  height: var(--header-height);
  grid-template-columns: minmax(160px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: var(--graphite);
  text-decoration: none;
}

.topbar-brand strong {
  font-size: 15px;
  letter-spacing: -0.03em;
}

.topbar-context,
.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.topbar-context .button,
.topbar-link {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 12px;
}

.topbar-context .button:hover,
.topbar-link:hover {
  color: var(--text);
  background: var(--surface-muted);
  border-color: transparent;
}

.topbar-context [aria-current="page"],
.topbar-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-muted);
  cursor: default;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-time {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.system-indicator i {
  display: block;
  width: 7px;
  height: 7px;
  background: #61b28e;
  border-radius: 50%;
}

.system-indicator.is-error {
  color: #e9a297;
}

.system-indicator.is-error i {
  background: #d27466;
}

/* Queue rail */

.review-workspace {
  display: grid;
  min-height: calc(100dvh - var(--header-height));
  grid-template-columns: var(--queue-width) minmax(0, 1fr);
}

.queue-pane {
  position: sticky;
  top: var(--header-height);
  display: flex;
  height: calc(100dvh - var(--header-height));
  min-width: 0;
  flex-direction: column;
  padding: 22px 16px 16px;
  color: #ffffff;
  background: var(--graphite);
  overflow: hidden;
}

.queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 18px;
}

.queue-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.count-badge,
.status-badge,
.subtle-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.count-badge {
  min-height: 24px;
  padding: 0 9px;
  color: #f3dfad;
  background: rgba(138, 104, 31, 0.28);
  border: 1px solid rgba(243, 223, 173, 0.16);
  font-size: 10px;
  font-weight: 600;
}

.count-badge.is-empty {
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--graphite-line);
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
}

.status-filter {
  display: inline-flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 9px;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  border: 1px solid var(--graphite-line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
}

.status-filter:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.status-filter span {
  font-family: var(--mono);
  font-size: 9px;
}

.status-filter:hover {
  color: #ffffff;
  background: var(--graphite-raised);
  border-color: rgba(255, 255, 255, 0.2);
}

.status-filter.is-active {
  color: var(--graphite);
  background: #ffffff;
  border-color: #ffffff;
  font-weight: 600;
}

.search-field {
  position: relative;
  display: block;
  margin-bottom: 9px;
}

.search-field::before {
  content: "⌕";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--mono);
  transform: translateY(-50%);
}

.search-field input {
  height: 40px;
  padding: 0 10px 0 33px;
  color: #ffffff;
  background: var(--graphite-raised);
  border-color: var(--graphite-line);
  font-size: 11px;
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.search-field input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.queue-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 0 3px;
}

.queue-status {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.queue-status-line .topbar-time {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
}

.publication-list {
  flex: 1;
  margin-top: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}

.publication-row {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 12px;
  color: #ffffff;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.publication-row + .publication-row {
  margin-top: 3px;
}

.publication-row:hover {
  background: var(--graphite-raised);
}

.publication-row.is-selected {
  background: #242e38;
  border-color: rgba(255, 255, 255, 0.2);
}

.publication-row-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.publication-row-top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-row-slug {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-row-meta {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 600;
}

.status-badge.is-pending {
  color: var(--pending);
  background: var(--pending-soft);
}

.status-badge.is-approved,
.status-badge.is-public {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-badge.is-neutral {
  color: var(--muted);
  background: #eaede9;
}

.publication-row .status-badge.is-pending {
  color: #f1da9d;
  background: rgba(138, 104, 31, 0.35);
}

.publication-row .status-badge.is-approved,
.publication-row .status-badge.is-public {
  color: #9bd5ba;
  background: rgba(23, 107, 77, 0.34);
}

.publication-row .status-badge.is-danger {
  color: #efaaa0;
  background: rgba(179, 78, 62, 0.3);
}

.publication-row .status-badge.is-neutral {
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.09);
}

.queue-empty {
  margin: 18px 0;
  padding: 20px 12px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--graphite-raised);
  border: 1px solid var(--graphite-line);
  border-radius: var(--radius);
}

.queue-empty strong {
  font-size: 12px;
}

.queue-empty p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1.55;
}

/* Review detail */

.review-detail {
  min-width: 0;
  background: var(--page);
}

.detail-empty {
  display: grid;
  min-height: calc(100dvh - var(--header-height));
  place-items: center;
  padding: 48px;
  text-align: center;
}

.detail-empty h2 {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.detail-empty p {
  max-width: 440px;
  margin: 8px auto 0;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.6;
}

.detail-content {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 30px clamp(22px, 3.5vw, 48px) 56px;
}

.detail-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 700;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-identity h2 {
  max-width: min(52vw, 620px);
  margin: 5px 0 2px;
  overflow: hidden;
  color: var(--graphite);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity .mono-copy {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.detail-id-block,
.technical-details {
  width: min(100%, 240px);
  padding: 10px 12px;
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.technical-details > summary,
.symbol-disclosure > summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  list-style: none;
}

.technical-details > summary::-webkit-details-marker,
.symbol-disclosure > summary::-webkit-details-marker {
  display: none;
}

.technical-details > summary::after,
.symbol-disclosure > summary::after {
  content: "+";
  float: right;
  color: var(--muted-light);
  font-family: var(--mono);
  font-weight: 400;
}

.technical-details[open] > summary::after,
.symbol-disclosure[open] > summary::after {
  content: "−";
}

.technical-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.technical-row > span:first-child {
  color: var(--muted-light);
  font-size: 9px;
}

.technical-row > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-id {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--muted);
  text-align: right;
  background: transparent;
  border: 0;
  cursor: copy;
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-id:hover {
  color: var(--green);
}

.decision-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.8fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-primary {
  display: grid;
  align-content: center;
  min-height: 122px;
  padding: 22px;
  background: var(--green-soft);
  border-right: 1px solid var(--line);
}

.metric-primary > span,
.metric-primary small,
.metric-grid dt,
.review-field > span,
.audit-note-block > span,
.account-symbol-row > span {
  color: var(--muted);
  font-size: 10px;
}

.metric-primary strong {
  margin: 5px 0 2px;
  color: var(--green);
  font-family: var(--mono);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.metric-primary strong.is-negative {
  color: var(--danger);
}

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

.metric-grid > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 6px;
  min-height: 122px;
  padding: 16px;
}

.metric-grid > div + div {
  border-left: 1px solid var(--line);
}

.metric-grid dt,
.metric-grid dd {
  margin: 0;
}

.metric-grid dd {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 16px;
  padding-top: 16px;
}

.detail-main-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.review-section,
.audit-panel,
.action-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-section {
  min-width: 0;
  padding: 20px;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.section-heading h3 {
  margin: 0;
  color: var(--graphite);
  font-size: 16px;
  letter-spacing: -0.025em;
}

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

.subtle-badge {
  min-height: 24px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  font-size: 9px;
}

.subtle-badge.is-positive {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(23, 107, 77, 0.16);
}

.subtle-badge.is-muted,
.subtle-badge.is-hidden-profile {
  color: var(--muted);
}

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

.review-field {
  min-width: 0;
  min-height: 86px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-field-wide {
  grid-column: 1 / -1;
}

.review-field p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.symbol-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.symbol-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
}

.symbol-empty {
  color: var(--muted-light);
  font-size: 10px;
}

.symbol-disclosure {
  display: inline-block;
  min-width: 0;
}

.symbol-disclosure > summary {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(23, 107, 77, 0.14);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 9px;
}

.symbol-disclosure > summary::after {
  display: none;
}

.symbol-overflow-list {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-review-card {
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-card-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-card-heading > div:first-child {
  min-width: 0;
}

.account-card-heading h4 {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-heading p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-metrics > div {
  min-width: 0;
  padding: 12px;
}

.account-metrics > div + div {
  border-left: 1px solid var(--line);
}

.account-metrics dt,
.account-metrics dd {
  margin: 0;
}

.account-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.account-metrics dd {
  margin-top: 5px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-symbol-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  padding-top: 11px;
}

.account-symbol-row > span {
  flex: 0 0 auto;
  padding-top: 3px;
}

.account-symbol-row .symbol-list {
  margin: 0;
}

.account-symbol-row .symbol-disclosure {
  margin-top: 0;
}

.account-technical-details {
  width: 100%;
  margin-top: 10px;
}

.account-technical-details .snapshot-id {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.snapshot-id {
  margin: 10px 0 0;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8px;
}

/* Audit and actions */

.audit-column {
  min-width: 0;
}

.audit-panel {
  padding: 18px;
}

.audit-timeline {
  display: grid;
  gap: 0;
  margin: 0;
}

.audit-timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 16px 14px;
  border-left: 1px solid var(--line-strong);
}

.audit-timeline > div:last-child {
  padding-bottom: 4px;
}

.audit-timeline > div::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -4px;
  width: 7px;
  height: 7px;
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: 50%;
}

.audit-timeline dt,
.audit-timeline dd {
  margin: 0;
  font-size: 10px;
}

.audit-timeline dt {
  color: var(--muted-light);
}

.audit-timeline dd {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.audit-note-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audit-note-block p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.action-panel {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  margin-top: 10px;
  padding: 16px;
  background: var(--pending-soft);
  border-color: rgba(138, 104, 31, 0.18);
}

.action-panel > p {
  margin: 0;
  color: #6d5a2c;
  font-size: 11px;
  line-height: 1.6;
}

.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.action-buttons .button {
  flex: 1;
}

/* Dialogs and notices */

.action-dialog {
  width: min(calc(100% - 32px), 460px);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 72px rgba(17, 24, 32, 0.2);
}

.action-dialog::backdrop {
  background: rgba(17, 24, 32, 0.42);
  backdrop-filter: blur(2px);
}

.action-dialog form {
  padding: 24px;
}

.action-dialog h2 {
  margin: 0 0 9px;
  color: var(--graphite);
  font-size: 22px;
  letter-spacing: -0.035em;
}

.dialog-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dialog-note-field textarea {
  min-height: 106px;
  padding: 11px;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
}

.toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(17, 24, 32, 0.16);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-success {
  color: var(--green);
  border-color: rgba(23, 107, 77, 0.26);
}

.toast.is-error {
  color: var(--danger);
  border-color: rgba(179, 78, 62, 0.3);
}

/* Responsive */

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: minmax(130px, 1fr) auto minmax(210px, 1fr);
    gap: 12px;
    padding-inline: 18px;
  }

  .topbar-time:first-of-type {
    display: none;
  }

  .detail-content {
    padding-inline: 22px;
  }

  .decision-summary {
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

  .audit-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
    align-items: start;
    gap: 10px;
  }

  .action-panel {
    top: calc(var(--header-height) + 12px);
    margin-top: 0;
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 64px;
  }

  .login-panel {
    padding: 24px;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding-inline: 14px;
  }

  .topbar-context,
  .topbar-nav {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .review-workspace {
    display: block;
  }

  .queue-pane {
    position: relative;
    top: auto;
    height: auto;
    min-height: 380px;
    padding: 20px 14px 14px;
  }

  .status-filters {
    grid-template-columns: repeat(5, max-content);
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .status-filters::-webkit-scrollbar {
    display: none;
  }

  .status-filter:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .status-filter {
    justify-content: center;
  }

  .publication-list {
    max-height: 340px;
  }

  .detail-empty {
    min-height: 300px;
    padding: 40px 20px;
  }

  .detail-content {
    padding: 24px 14px 44px;
  }

  .detail-header {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .profile-identity h2 {
    max-width: 58vw;
    font-size: 26px;
  }

  .detail-id-block,
  .technical-details {
    width: 142px;
  }

  .decision-summary {
    display: block;
  }

  .metric-primary {
    min-height: 108px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid > div {
    min-height: 78px;
  }

  .profile-review-grid,
  .audit-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-field-wide {
    grid-column: auto;
  }

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

  .account-metrics > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-metrics > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .action-panel {
    position: static;
  }
}

@media (max-width: 480px) {
  .login-panel {
    width: min(calc(100% - 24px), 440px);
    padding: 20px;
  }

  .topbar-actions .topbar-time {
    display: none;
  }

  .queue-heading h1 {
    font-size: 20px;
  }

  .detail-header {
    display: grid;
  }

  .profile-identity h2 {
    max-width: calc(100vw - 110px);
  }

  .detail-id-block,
  .technical-details {
    width: 100%;
  }

  .metric-grid dd {
    font-size: 12px;
  }

  .review-section,
  .audit-panel,
  .action-panel {
    padding: 15px;
  }

  .account-card-heading {
    display: grid;
  }

  .account-card-badges {
    justify-content: flex-start;
  }

  .dialog-actions,
  .action-buttons {
    flex-direction: column-reverse;
  }

  .dialog-actions .button,
  .action-buttons .button {
    width: 100%;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    width: 100%;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
