:root {
  --bg: #f5f3ef;
  --paper: #fff;
  --ink: #292923;
  --muted: #858277;
  --line: #e8e5de;
  --accent: #75543b;
  --soft: #eee6db;
  --green: #46765f;
  --red: #ad483c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  transition: background 0.15s;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b69873;
  outline-offset: 3px;
}
input,
select,
textarea {
  background: white;
  border: 1px solid #dcd8cf;
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #75543b14;
}
input:read-only {
  background: #f6f5f2;
  color: #827d73;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  line-height: 1.8;
}
label > input,
label > textarea,
label > select {
  margin-top: 6px;
}
small,
.muted {
  color: var(--muted);
}
p {
  line-height: 1.8;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin-bottom: 0;
}
h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
h3 {
  font-size: 15px;
}
.brand {
  font-weight: 800;
  letter-spacing: -1px;
  font-size: 27px;
}
.brand span {
  letter-spacing: 1px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.primary,
.secondary,
.quiet,
.danger {
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 600;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #5f412d;
}
.secondary {
  border: 1px solid #ded8ce;
  background: white;
  color: var(--ink);
}
.quiet {
  background: transparent;
  color: var(--muted);
}
.quiet:hover,
.secondary:hover {
  background: var(--soft);
}
.danger {
  background: #fcf0ee;
  color: var(--red);
}
.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-card {
  max-width: 460px;
  padding: 60px 45px;
  width: 100%;
  margin: auto;
}
.login-card .brand {
  margin-bottom: 70px;
}
.login-card h1 {
  font-size: 36px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.login-card p {
  color: var(--muted);
  margin-bottom: 30px;
}
.login-card label {
  margin-bottom: 17px;
}
.login-card .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 27px;
}
.login-card small {
  display: block;
  margin-top: 24px;
  font-size: 11px;
}
.login-art {
  background: #3e4437;
  color: #e2dacb;
  position: relative;
  overflow: hidden;
  min-height: 700px;
}
.login-art > span {
  position: absolute;
  top: 55px;
  left: 50px;
  letter-spacing: 3px;
  font-size: 12px;
}
.login-art > p {
  position: absolute;
  bottom: 45px;
  left: 50px;
  font-size: 25px;
  line-height: 1.8;
  font-weight: 300;
}
.peak {
  position: absolute;
  width: 530px;
  height: 530px;
  transform: rotate(45deg);
  border: 1px solid #d3c6a147;
  left: 0;
  top: 250px;
  background: linear-gradient(135deg, #b7ab8133, transparent);
}
.p2 {
  left: 150px;
  top: 310px;
}
.p3 {
  left: 310px;
  top: 375px;
}
.login-wrap[hidden],
#workspace[hidden],
[hidden] {
  display: none !important;
}
#workspace {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 266px;
  flex-shrink: 0;
  background: #fdfcf9;
  border-right: 1px solid var(--line);
  padding: 32px 21px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 38px 0 13px;
}
#search-form {
  position: relative;
}
#search {
  padding-right: 50px;
  font-size: 12px;
}
.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  background: transparent;
  border: 0;
  padding: 8px 5px;
  color: var(--accent);
  font-size: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0;
}
.check input {
  width: auto;
  margin: 0;
}
.users {
  overflow: auto;
  flex: 1;
  padding: 8px 0;
}
.user {
  display: block;
  text-align: left;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 13px 12px;
  margin-bottom: 5px;
}
.user:hover {
  background: #f4f1ea;
}
.user.selected {
  background: #eee9df;
  border-color: #e3dacc;
}
.user strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}
.user small {
  font-size: 10px;
  display: block;
}
.pagination {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  align-items: center;
}
.pagination button {
  padding: 5px;
  font-size: 11px;
}
.side-note {
  border-top: 1px solid var(--line);
  padding: 20px 5px 5px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 15px;
}
#logout {
  text-align: left;
  margin-top: 9px;
}
main {
  max-width: 1600px;
  width: calc(100% - 266px);
  padding: 35px 42px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}
.live {
  font-size: 11px;
  color: var(--green);
}
.live i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
}
.empty-hero {
  padding: 100px 35px;
  text-align: center;
  border: 1px dashed #d7d1c5;
  border-radius: 18px;
  background: #fbfaf7;
}
.empty-hero p {
  color: var(--muted);
}
.large-symbol {
  font-size: 50px;
  display: block;
  color: #b5a17e;
  margin-bottom: 24px;
}
.identity {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #e7e8df;
  color: #60684d;
  font-size: 25px;
}
.identity h2 {
  margin: 0 0 7px;
}
.identity p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.identity .secondary {
  margin-left: auto;
  font-size: 12px;
}
.tag {
  font-size: 11px;
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: #edf2ec;
  color: var(--green);
  white-space: nowrap;
}
.tag.test {
  background: #f7ecdc;
  color: #997338;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 18px 0 28px;
}
.stat {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 18px 20px;
}
.stat small {
  display: block;
  font-size: 11px;
  margin-bottom: 10px;
}
.stat strong {
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 10px;
  color: var(--muted);
  margin-left: 7px;
}
nav {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding-bottom: 13px;
}
nav button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 10px 13px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
nav button.active {
  background: var(--ink);
  color: #fff;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.section-head {
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-head h2 {
  font-size: 17px;
  margin-bottom: 6px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.section-head .primary {
  font-size: 12px;
}
#content {
  padding: 23px 25px;
  min-height: 230px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 0 14px 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 18px 14px;
  border-bottom: 1px solid #f0eee9;
  vertical-align: top;
  line-height: 1.6;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 13px;
  display: block;
  font-weight: 500;
}
td small {
  display: block;
  max-width: 240px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
td .quiet,
td .danger {
  font-size: 11px;
  padding: 5px 8px;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}
.fact {
  padding: 15px 0;
  border-bottom: 1px solid #f0eee9;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.fact dt {
  color: var(--muted);
}
.fact dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 70%;
}
.hint {
  font-size: 12px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #f6f4ed;
  color: #847151;
  line-height: 1.8;
  margin: 18px 0;
}
.empty {
  text-align: center;
  padding: 42px 10px;
  color: var(--muted);
  line-height: 2;
}
.review-card,
.connector-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
}
.review-card p {
  font-size: 13px;
}
.review-card .tag {
  float: right;
}
.connector-card h3 {
  font-size: 17px;
}
.connector-card p {
  color: var(--muted);
  font-size: 12px;
}
.connector-card form {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.connector-card form input {
  max-width: 480px;
}
.connector-card button {
  font-size: 12px;
  white-space: nowrap;
}
.connector-card a {
  color: var(--accent);
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.cost-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.cost-row input {
  width: 45%;
}
.cost-row button {
  padding: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-grid h3 {
  margin: 13px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.form-grid label small {
  font-size: 10px;
  display: block;
  line-height: 1.5;
}
.form-grid input[type="checkbox"] {
  width: auto;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 25px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
dialog {
  width: min(740px, 95vw);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 27px 32px;
  max-height: 90vh;
  box-shadow: 0 25px 100px #29292333;
}
dialog::backdrop {
  background: #24251f80;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head .eyebrow {
  margin-bottom: 6px;
}
#editor-owner {
  font-size: 12px;
  margin: 18px 0 22px;
}
#notice {
  padding: 14px 18px;
  border: 1px solid #cdddcf;
  background: #edf4ee;
  border-radius: 9px;
  color: var(--green);
  margin-bottom: 18px;
  font-size: 13px;
}
#notice.error,
#edit-error,
#login-error {
  color: var(--red);
}
#notice.error {
  background: #fff0ed;
  border-color: #efd6cf;
}
#edit-error,
#login-error {
  font-size: 12px;
  line-height: 1.8;
  margin-top: 14px;
}
footer {
  font-size: 10px;
  color: #9e998e;
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  line-height: 1.8;
}
a {
  overflow-wrap: anywhere;
}
@media (min-width: 1500px) {
  main {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1000px) {
  main {
    padding: 26px 24px;
  }
  aside {
    width: 228px;
    padding: 28px 16px;
  }
  main {
    width: calc(100% - 228px);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .live {
    display: none;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .identity {
    padding: 18px;
    gap: 12px;
  }
  .identity h2 {
    font-size: 17px;
  }
}
@media (max-width: 700px) {
  .login-wrap {
    display: block;
  }
  .login-art {
    display: none;
  }
  .login-card {
    padding: 35px;
  }
  .login-card .brand {
    margin-bottom: 50px;
  }
  #workspace {
    display: block;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 22px;
  }
  .sidebar-label {
    margin: 20px 0 10px;
  }
  .users {
    max-height: 170px;
  }
  .side-note,
  #logout {
    margin-top: 5px;
  }
  .side-note {
    padding-top: 10px;
  }
  main {
    width: 100%;
    padding: 22px 16px;
  }
  header {
    margin-bottom: 24px;
  }
  h1 {
    font-size: 24px;
  }
  .identity {
    flex-wrap: wrap;
  }
  .identity .secondary {
    margin-left: 0;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 21px;
  }
  .section-head,
  #content {
    padding: 18px 15px;
  }
  .section-head {
    gap: 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: 1;
  }
  .connector-card form {
    flex-wrap: wrap;
  }
  dialog {
    padding: 22px 18px;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
  }
  .dialog-actions .primary {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .table-wrap table {
    min-width: 650px;
  }
  .table-wrap td:first-child {
    min-width: 200px;
  }
}

img.avatar {
  object-fit: cover;
  padding: 0;
}
.order-metrics {
  min-width: 280px;
  max-width: 390px;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.metric-source {
  color: var(--green);
  margin: 0 0 7px;
}
.metric-warning {
  color: var(--red);
}
.order-metric {
  padding-top: 12px;
}
.metric-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-variant-numeric: tabular-nums;
}
.order-metric progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--soft);
  accent-color: var(--accent);
}
.order-metric progress::-webkit-progress-bar { background: var(--soft); }
.order-metric progress::-webkit-progress-value { background: var(--accent); }
.order-metric progress::-moz-progress-bar { background: var(--accent); }
.video-title {
  line-height: 1.7;
  display: inline-block;
}
.video-title:hover { text-decoration: underline; }
.tracking-settings {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tracking-switch {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.tracking-details .hint { margin: 15px 0; }
.tracking-details > p { font-size: 12px; }
.tracking-video-preview { margin-top: 9px; }
.tracking-details .button-row { margin-top: 10px; gap: 5px; }
.tracking-details .quiet { font-size: 12px; padding: 8px; }
.tracking-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.tracking-target .check { color: var(--ink); }
.tracking-target small { font-size: 11px; display: block; margin-top: 5px; }
.cooperation-invitation {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.cooperation-invitation > small {
  display: block;
  margin: 6px 0;
}
@media (max-width: 700px) {
  .tracking-targets { grid-template-columns: 1fr; }
  .tracking-settings { padding: 14px; }
}
.video-share-dialog { width: min(640px, calc(100vw - 32px)); padding: 28px; }
.video-share-dialog form { display: grid; gap: 14px; }
.video-share-dialog h2, .video-share-dialog p { margin: 0; }
.video-share-dialog textarea { width: 100%; min-height: 170px; resize: vertical; }
.video-share-title { overflow-wrap: anywhere; font-weight: 600; }
.video-share-status { margin-top: 8px; }
.video-share-error { color: var(--red); }
.video-share-error:empty { display: none; }
.settlement-detail { min-width: 235px; max-width: 350px; }
.settlement-detail strong, .settlement-detail small { display: block; }
.settlement-detail small { margin-top: 5px; line-height: 1.7; }
dialog .settlement-detail { min-width: 0; max-width: none; }
.settlement-detail .settlement-order { padding: 4px 0; text-align: left; color: var(--accent); }
.settlement-detail .qualification-label { color: var(--green); font-weight: 600; margin-top: 12px; }
.settlement-detail .qualification-time { margin-top: 0; font-size: 10px; }
.settlement-detail .video-title { margin-top: 4px; font-size: 11px; }
.settlement-action { min-width: 110px; }
.settlement-action .primary { padding: 8px 18px; font-size: 12px; }
.amount-missing { color: #936823; white-space: nowrap; }
.table-wrap .settlement-table { min-width: 780px; }
.settlement-table td:first-child { min-width: 180px; }
.settlement-table td:nth-child(2), .settlement-table td:nth-child(3) { white-space: nowrap; }
