:root {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #292d2b;
  background: #f6f7f4;
  font-size: 14px;
  --red: #a44836;
  --line: #e6e8e1;
  --muted: #7b827b;
  --green: #476959;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button,
input,
select,
textarea {
  transition:
    border-color 0.15s,
    background 0.15s;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a4483655;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: 1px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  font-weight: 600;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #8e7764;
  margin-bottom: 12px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 20px;
  font-family: 'Songti SC', serif;
  letter-spacing: 2px;
  font-weight: bold;
}
.brand small {
  display: block;
  font-family: sans-serif;
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
  margin-top: 7px;
  letter-spacing: 2px;
}
.seal {
  display: grid;
  place-items: center;
  width: 43px;
  height: 47px;
  border: 2px solid var(--red);
  outline: 1px solid var(--red);
  outline-offset: -5px;
  border-radius: 5px;
  color: var(--red);
  font-size: 19px;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.primary,
.secondary,
.danger {
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 18px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}
.primary {
  background: var(--red);
  color: #fff;
}
.primary:hover {
  background: #8c392a;
}
.secondary {
  background: #fff;
  border-color: #dce0d8;
  color: #50584e;
}
.secondary:hover {
  background: #f4f5f0;
}
.danger {
  background: #a53e33;
  color: #fff;
}
.text-button,
.icon-button {
  border: 0;
  background: transparent;
  color: #7a746a;
  padding: 8px;
}
.text-button:hover {
  color: var(--red);
}
.full {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.error {
  color: #ac342a;
  font-size: 13px;
  min-height: 20px;
  line-height: 1.6;
  margin: 12px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  padding: 56px 70px;
  background: #edeadf;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: '';
  position: absolute;
  right: -150px;
  bottom: -160px;
  width: 650px;
  height: 460px;
  border: 1px solid #8b917a44;
  transform: rotate(-30deg);
  border-radius: 45%;
  box-shadow:
    0 0 0 36px #8b917a09,
    0 0 0 74px #8b917a0b,
    0 0 0 114px #8b917a0a;
  pointer-events: none;
}
.login-story h1 {
  font-family: 'Songti SC', serif;
  font-size: 60px;
  line-height: 1.5;
  letter-spacing: 5px;
  margin-bottom: 24px;
}
.story-caption {
  line-height: 2.1;
  color: #7c7b6b;
  letter-spacing: 1px;
}
.story-footer {
  font-size: 11px;
  color: #888a78;
  letter-spacing: 2px;
}
.login-side {
  display: grid;
  place-items: center;
  background: #fcfcf9;
  padding: 36px;
}
.login-card {
  width: 100%;
  max-width: 360px;
}
.login-card h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.login-card > .muted {
  margin-bottom: 34px;
}
.login-card label {
  display: block;
  margin-top: 22px;
  font-size: 13px;
}
.login-card input {
  margin-top: 9px;
}
.login-hint {
  text-align: center;
  color: #999d94;
  font-size: 12px;
  margin-top: 22px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce0d7;
  border-radius: 6px;
  background: #fff;
  color: #30362e;
  padding: 11px 12px;
  min-height: 42px;
}
input::placeholder,
textarea::placeholder {
  color: #a5aaa2;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input:disabled {
  background: #f1f2ed;
  color: #898d83;
}
.app-layout {
  display: grid;
  grid-template-columns: 226px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #fcfcf9;
  padding: 34px 23px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  font-size: 19px;
}
.nav-caption {
  font-size: 11px;
  color: #a0a297;
  letter-spacing: 2px;
  margin: 54px 12px 17px;
}
.sidebar nav {
  display: grid;
  gap: 9px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 15px 14px;
  border-radius: 6px;
  color: #74796e;
}
.sidebar nav button > span {
  font-size: 21px;
  line-height: 20px;
  width: 21px;
}
.sidebar nav b {
  font-size: 10px;
  font-weight: normal;
  margin-left: auto;
  opacity: 0.6;
}
.sidebar nav button[aria-current='page'] {
  background: #eee8df;
  color: #934633;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 10px;
  color: #999e8f;
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}
.status-dot {
  height: 5px;
  width: 5px;
  background: #8a9d80;
  border-radius: 50%;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: #7c8177;
  font-size: 12px;
  background: #ffffff80;
}
.slash {
  margin: 0 12px;
  color: #c1c4ba;
}
#breadcrumb {
  color: #3e463b;
}
.account {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 28px;
  height: 28px;
  background: #eceee5;
  color: #718064;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.account .text-button {
  margin-left: 7px;
  font-size: 12px;
}
main {
  padding: 37px 40px 20px;
  max-width: 1540px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading .muted {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 21px 24px;
  position: relative;
  overflow: hidden;
}
.stat > span {
  display: block;
  color: #727a6b;
  font-size: 12px;
}
.stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: normal;
  line-height: 1;
  margin: 18px 0 12px;
  letter-spacing: 1px;
}
.stat small {
  color: #a1a596;
  font-size: 11px;
}
.stat:after {
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  border: 1px solid #edf0e8;
  border-radius: 50%;
  right: 24px;
  top: 35px;
  box-shadow: 0 0 0 9px #f8f9f5;
}
.stat:last-child strong {
  color: var(--red);
}
.table-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.panel-top {
  padding: 23px 24px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-top h2 {
  font-size: 15px;
}
.panel-top > span {
  font-size: 11px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 24px 20px;
}
.search {
  max-width: 330px;
  flex: 1;
}
.toolbar input,
.toolbar select {
  min-height: 38px;
  font-size: 12px;
  background: #fcfdfb;
}
.toolbar select {
  width: 122px;
}
.toolbar button {
  min-height: 38px;
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
  text-align: left;
}
th {
  background: #f8f9f5;
  color: #8d9387;
  font-size: 11px;
  font-weight: normal;
  padding: 14px 24px;
  border-block: 1px solid var(--line);
}
td {
  padding: 18px 24px;
  border-bottom: 1px solid #eff0eb;
  height: 72px;
}
td .sub {
  display: block;
  font-size: 10px;
  color: #9aa190;
  margin-top: 6px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td .main-text {
  font-weight: 550;
  font-size: 13px;
}
td .text-button {
  font-size: 12px;
  padding: 5px 7px;
  color: var(--red);
}
td .actions {
  display: flex;
  gap: 10px;
}
.cover-thumbnail {
  display: grid;
  padding: 0;
  width: 72px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e6e8e1;
  border-radius: 6px;
  background: #f3f4ef;
  color: #adb5a4;
  font-size: 18px;
}
button.cover-thumbnail {
  cursor: zoom-in;
}
.cover-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-thumbnail img + span {
  display: none;
}
.cover-thumbnail.failed img {
  display: none;
}
.cover-thumbnail.failed span {
  display: inline;
}
tbody tr:hover {
  background: #fcfdf9;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  background: #edf3eb;
  color: #64805b;
}
.badge:before {
  content: '';
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.badge.disabled {
  color: #929088;
  background: #f0efeb;
}
.source-tag {
  font-size: 10px;
  border: 1px solid #e7e5dc;
  padding: 4px 7px;
  border-radius: 4px;
  color: #8a8372;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  font-size: 11px;
}
.pagination > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.pagination button {
  min-height: 30px;
  padding: 4px 10px;
}
.empty-state {
  text-align: center;
  padding: 50px 20px 60px;
}
.empty-state > span {
  display: block;
  font-size: 36px;
  color: #bdc4ae;
  margin-bottom: 15px;
}
.empty-state h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 9px;
}
.empty-state p {
  font-size: 12px;
}
.list-error {
  margin: 0 24px 20px;
  padding: 12px;
  background: #fcf0ea;
  color: var(--red);
  font-size: 12px;
  line-height: 1.8;
}
.workspace-footer {
  font-size: 10px;
  text-align: center;
  color: #adb1a4;
  letter-spacing: 1px;
  margin: 26px 0 5px;
}
.workspace-footer span {
  margin: 0 10px;
}
dialog {
  border: 1px solid #dfe2d8;
  border-radius: 12px;
  padding: 26px;
  width: min(550px, calc(100% - 32px));
  max-height: 90vh;
  color: #30382d;
  box-shadow: 0 20px 100px #1b291c22;
}
dialog::backdrop {
  background: #26332355;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.dialog-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 8px;
}
.icon-button {
  font-size: 24px;
}
#image-preview {
  width: min(1100px, calc(100% - 32px));
  padding: 20px;
}
#image-preview .dialog-heading {
  gap: 16px;
  margin-bottom: 16px;
}
#image-preview-title {
  overflow-wrap: anywhere;
}
#image-preview-image {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 120px);
  margin: 0 auto;
  object-fit: contain;
}
#image-preview-status {
  padding: 48px 0;
  text-align: center;
}
.form-fields {
  display: grid;
  gap: 17px;
}
.form-fields label {
  display: grid;
  gap: 7px;
  font-size: 12px;
}
.form-fields .help {
  font-size: 11px;
  color: #989d90;
  line-height: 1.7;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 25px;
  background: #3b5143;
  color: #fff;
  border-radius: 7px;
  box-shadow: 0 5px 22px #20302022;
  z-index: 10;
  font-size: 13px;
  max-width: 90vw;
}
.chooser-search {
  display: flex;
  gap: 8px;
}
.chooser-search input {
  flex: 1;
  min-width: 0;
}
#confirm-description {
  line-height: 1.9;
  font-size: 14px;
}
@media (min-width: 1600px) {
  .login-story {
    padding: 70px 100px;
  }
}
@media (max-width: 1050px) {
  .app-layout {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 30px 16px;
  }
  .sidebar .brand {
    font-size: 16px;
  }
  .topbar {
    padding-inline: 24px;
  }
  main {
    padding: 28px 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    padding: 18px;
  }
  .stat:after {
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .login-story {
    padding: 40px;
  }
  .login-story h1 {
    font-size: 46px;
  }
}
@media (max-width: 720px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px;
    min-height: 180px;
  }
  .login-story > div:nth-child(2),
  .story-footer {
    display: none;
  }
  .login-side {
    padding: 35px 24px 60px;
    align-items: start;
  }
  .app-layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 18px;
  }
  .sidebar .seal {
    height: 37px;
    width: 35px;
    font-size: 15px;
    letter-spacing: 1px;
  }
  .sidebar .brand small {
    display: none;
  }
  .nav-caption,
  .sidebar-bottom,
  .sidebar nav b {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    margin-top: 20px;
  }
  .sidebar nav button {
    padding: 10px 9px;
    justify-content: center;
    font-size: 12px;
  }
  .sidebar nav button > span {
    font-size: 17px;
    width: 17px;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
    font-size: 11px;
  }
  .topbar .avatar {
    display: none;
  }
  .slash {
    margin: 0 6px;
  }
  .account {
    gap: 4px;
  }
  main {
    padding: 25px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading .muted {
    font-size: 11px;
  }
  .page-heading > .primary {
    padding: 9px 12px;
    font-size: 12px;
    margin-top: 20px;
  }
  .stats {
    gap: 8px;
    margin-bottom: 20px;
  }
  .stat {
    padding: 14px 12px;
  }
  .stat strong {
    font-size: 29px;
    margin: 13px 0 0;
  }
  .stat small,
  .stat:after {
    display: none;
  }
  .stat > span {
    font-size: 10px;
  }
  .panel-top {
    padding: 20px 16px 15px;
  }
  .toolbar {
    padding: 0 16px 16px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .search {
    min-width: 100%;
    max-width: none;
  }
  .toolbar select {
    width: 110px;
  }
  th,
  td {
    padding-inline: 16px;
  }
  .pagination {
    padding: 14px 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .workspace-footer {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
