:root {
  color-scheme: light;
  --ink: #121826;
  --muted: #667085;
  --line: #e1e6ed;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --brand: #111827;
  --green: #1f7a5c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.ghost {
  border: 1px solid #d4dae3;
  background: #fff;
  color: var(--ink);
}

.danger {
  border-color: #f2b8b5;
  color: #b42318;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f6;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(18, 24, 38, 0.12);
}

.login-card p,
.topbar p,
.brand span,
.muted {
  margin: 0;
  color: var(--muted);
}

.login-card h1,
.topbar h1 {
  margin: 8px 0 24px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d4dae3;
  border-radius: 9px;
  outline: 0;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 400;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 24, 38, 0.08);
}

input[readonly] {
  color: var(--muted);
  background: #eef2f5;
}

.upload-field {
  align-content: start;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-row button {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.upload-preview {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cover-preview {
  width: 220px;
  height: 110px;
}

.table-cover {
  width: 88px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.upload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
}

.upload-track {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #edf1f5;
}

.upload-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.18s ease;
}

.upload-progress.is-uploading .upload-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: upload-shine 1.1s linear infinite;
}

.upload-progress.is-done {
  color: var(--green);
}

.upload-progress.is-error {
  color: #b42318;
}

@keyframes upload-shine {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #111827;
  color: #fff;
}

.brand {
  display: grid;
  gap: 7px;
  padding: 0 10px 26px;
}

.brand strong {
  font-size: 20px;
  letter-spacing: 0;
}

.brand span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 8px;
}

nav button {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
}

nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.topbar h1 {
  margin-bottom: 0;
}

.panel {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(18, 24, 38, 0.05);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
}

.panel-head h2,
.panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.panel-head p {
  margin-top: 6px;
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.talent-action-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
  padding: 8px 10px 8px 12px;
  border: 1px solid #b8e2d0;
  border-radius: 7px;
  background: #f2fbf6;
  color: #17664e;
  font-size: 13px;
  line-height: 1.35;
}

.talent-action-notice.is-error {
  border-color: #f3c3bf;
  background: #fff7f6;
  color: #b42318;
}

.notice-close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.notice-close:hover {
  background: rgba(16, 24, 40, 0.06);
}

.filter-toolbar {
  grid-template-columns: minmax(220px, 420px) 160px auto 1fr;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.overview-stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 24, 38, 0.035);
}

.overview-stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.overview-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.overview-panel {
  min-height: 152px;
  padding: 18px;
}

.overview-panel h2 {
  margin-bottom: 16px;
  font-size: 15px;
}

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

.quick-actions button {
  justify-content: flex-start;
}

.pending-list {
  display: grid;
  gap: 2px;
}

.pending-list button {
  display: flex;
  width: 100%;
  height: 34px;
  padding: 0 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 400;
}

.pending-list button + button {
  border-top: 1px solid #eef1f4;
}

.pending-list button:hover {
  color: var(--brand);
  background: transparent;
}

.pending-list strong {
  min-width: 24px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  text-align: right;
}

#app .panel-head .muted {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.form-grid label {
  margin: 0;
  align-self: start;
}

.talent-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

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

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

.record-actions .chain-complete {
  color: #667085;
  border-color: #d9e0e8;
  background: #f4f6f8;
  cursor: not-allowed;
  opacity: 1;
}

.form-status {
  color: var(--muted);
  font-size: 14px;
}

.table {
  width: 100%;
  overflow: auto;
}

.talent-records {
  overflow: auto;
  border: 1px solid #e8edf3;
  border-radius: 10px;
}

.talent-table-head,
.talent-record {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1fr 1.1fr 0.95fr auto;
  min-width: 880px;
  column-gap: 12px;
  align-items: center;
  padding: 10px 14px;
}

.talent-table-head {
  border-bottom: 1px solid #e8edf3;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.talent-record {
  min-height: 58px;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
  color: #344054;
  font-size: 13px;
}

.talent-record:last-child {
  border-bottom: 0;
}

.talent-record:hover {
  background: #fcfdff;
}

.talent-record > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.talent-record strong,
.talent-record small,
.talent-record span {
  display: block;
}

.talent-record > div > span {
  margin: 0;
}

.talent-record small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.talent-record strong {
  color: #1d2939;
  font-size: 13px;
  font-weight: 650;
}

.user-no {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid #d9e2ec;
  border-radius: 5px;
  background: #f8fafc;
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
}

.user-phone {
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.chain-attestation {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
}

.chain-attestation .transaction-hash {
  min-width: 0;
  color: #667085;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.3;
}

.chain-attestation .task-id {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.record-actions {
  display: flex;
  gap: 6px;
}

.record-actions button {
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.empty-list {
  padding: 28px;
  border: 1px dashed #d4dae3;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.pager div {
  display: flex;
  gap: 8px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.registration-table {
  min-width: 1180px;
}

.registration-select {
  width: 44px;
  padding-right: 4px;
  text-align: center;
}

.registration-select input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #111827;
  cursor: pointer;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td small {
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf7f1;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.muted-pill {
  background: #eef2f5;
  color: var(--muted);
}

.link {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
}

.link + .link {
  margin-left: 12px;
}

.chain-link {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 0;
  color: #344054;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.chain-link:hover {
  color: #111827;
  text-decoration: underline;
}

.copy-hash {
  height: 24px;
  padding: 0 7px;
  border: 1px solid #d8e0ea;
  border-radius: 5px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-weight: 600;
}

.copy-hash:hover {
  border-color: #98a2b3;
  background: #f8fafc;
}

.rich-editor {
  overflow: hidden;
  border: 1px solid #d4dae3;
  border-radius: 8px;
  background: #fff;
}

.rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px;
  border-bottom: 1px solid #e8edf3;
  background: #f8fafc;
}

.rich-toolbar button {
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 12px;
}

.rich-toolbar i {
  width: 1px;
  height: 18px;
  background: #d8dee7;
}

.rich-editor-content {
  min-height: 220px;
  padding: 12px 14px;
  color: #344054;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  outline: 0;
}

.rich-editor-content:empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
}

.rich-editor-content h2,
.rich-editor-content h3 {
  margin: 18px 0 8px;
  color: #1d2939;
}

.rich-editor-content p,
.rich-editor-content ul,
.rich-editor-content ol,
.rich-editor-content blockquote {
  margin: 0 0 10px;
}

.rich-editor-content blockquote {
  padding-left: 12px;
  border-left: 3px solid #cbd5e1;
  color: #667085;
}

.detail-panel {
  margin-top: 18px;
}

.chain-assets-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8edf3;
}

.chain-assets-panel .panel-head {
  margin-bottom: 12px;
}

.chain-tool-panel {
  margin-bottom: 18px;
}

.transfer-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #f4d5a6;
  border-radius: 8px;
  background: #fffaf0;
  color: #7a4d0b;
  font-size: 13px;
  line-height: 1.6;
}

.transfer-warning strong {
  flex: 0 0 auto;
  color: #613806;
}

.danger-action {
  background: #b42318;
}

.danger-action:hover:not(:disabled) {
  background: #8f1c13;
}

.danger-pill {
  color: #b42318;
  background: #fef3f2;
}

.transfer-modal[hidden] {
  display: none;
}

.transfer-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.transfer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
}

.transfer-confirm-card {
  position: relative;
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.transfer-confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e7edf5;
}

.transfer-confirm-head p {
  margin: 0 0 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.transfer-confirm-head h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.35;
}

.transfer-confirm-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #fff1f0;
  color: #b42318;
  font-size: 21px;
  font-weight: 700;
}

.transfer-confirm-close {
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.transfer-confirm-close:hover {
  background: #f2f4f7;
  color: #344054;
}

.transfer-confirm-body {
  padding: 20px 24px 22px;
}

.transfer-confirm-intro {
  margin: 0 0 16px;
  color: #667085;
  font-size: 14px;
  line-height: 1.65;
}

.transfer-confirm-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
}

.transfer-confirm-summary div {
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #e8edf3;
}

.transfer-confirm-summary div:nth-child(odd) {
  border-right: 1px solid #e8edf3;
}

.transfer-confirm-summary div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.transfer-confirm-summary dt {
  margin-bottom: 5px;
  color: #78859a;
  font-size: 12px;
  font-weight: 500;
}

.transfer-confirm-summary dd {
  overflow: hidden;
  margin: 0;
  color: #172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-confirm-assets {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.transfer-confirm-assets > span {
  color: #78859a;
  font-size: 12px;
  font-weight: 500;
}

.transfer-confirm-assets code {
  display: block;
  max-height: 84px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.transfer-confirm-risk {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid #f3d2cc;
  border-radius: 8px;
  background: #fff8f7;
  color: #8a291e;
  font-size: 13px;
  line-height: 1.55;
}

.transfer-confirm-risk strong {
  flex: 0 0 auto;
}

.transfer-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e7edf5;
  background: #fbfcfe;
}

.transfer-confirm-actions button {
  min-width: 104px;
}

@media (max-width: 560px) {
  .transfer-modal {
    align-items: end;
    padding: 12px;
  }

  .transfer-confirm-card {
    border-radius: 14px;
  }

  .transfer-confirm-head,
  .transfer-confirm-body,
  .transfer-confirm-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .transfer-confirm-summary {
    grid-template-columns: 1fr;
  }

  .transfer-confirm-summary div,
  .transfer-confirm-summary div:nth-child(odd) {
    border-right: 0;
  }

  .transfer-confirm-summary div:nth-last-child(2) {
    border-bottom: 1px solid #e8edf3;
  }
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-head h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 20px;
}

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

.detail-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  background: #fbfcfd;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#loginStatus {
  display: block;
  margin-top: 12px;
  color: #c43b3b;
  font-size: 13px;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-stats,
  .overview-grid,
  .form-grid,
  .talent-upload-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .talent-table-head,
  .talent-record { min-width: 880px; }

  .pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
