:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f6fa;
  --line: #e6ebf2;
  --panel: #ffffff;
  --blue: #0f6bff;
  --green: #16a05d;
  --green-soft: #eefbf4;
  --red: #ef3131;
  --red-soft: #fff1f1;
  --shadow: 0 18px 60px rgba(19, 32, 54, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.94), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 54%, #fff 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

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

.login-box {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 0 0 10px;
  font-size: 25px;
}

.login-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
}

.login-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.1);
}

.login-box button {
  height: 48px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.error {
  min-height: 22px;
  margin: 0;
  color: var(--red);
}

.workspace {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px clamp(24px, 3vw, 42px);
  border-bottom: 1px solid rgba(230, 235, 242, 0.78);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
}

.brandline,
.top-actions,
.stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brandline {
  min-width: 0;
  flex-wrap: wrap;
}

.top-actions {
  flex-shrink: 0;
}

.topbar strong {
  margin-right: 8px;
  white-space: nowrap;
  font-size: clamp(22px, 1.6vw, 28px);
  line-height: 1;
  font-weight: 900;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 64px);
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 247, 251, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.tab {
  height: 38px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.tab.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 22px rgba(19, 32, 54, 0.09);
}

.stat-pill {
  min-width: 126px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(246, 248, 252, 0.9);
  color: var(--ink);
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.pending-pill::before {
  content: "◌";
  margin-right: 8px;
  color: var(--blue);
  font-weight: 900;
}

.total-pill::before {
  content: "◎";
  margin-right: 8px;
  color: var(--muted);
  font-weight: 900;
}

.ghost {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(19, 32, 54, 0.06);
}

.nav-link {
  height: 36px;
  padding: 0 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.nav-link:not(:disabled):hover {
  color: var(--ink);
}

.review-stage {
  min-height: 0;
  padding: 12px clamp(24px, 3vw, 42px) 10px;
  overflow: hidden;
  perspective: 1400px;
}

.review-card {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.42fr);
  gap: 20px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 24px 70px rgba(19, 32, 54, 0.13);
  backdrop-filter: blur(20px);
  transform-origin: center center;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
  will-change: opacity, transform;
}

.review-card.is-leaving {
  opacity: 0;
  filter: blur(5px);
  transform: translateX(-18px) scale(0.985) rotateY(-4deg);
}

.review-card.is-entering {
  animation: cardIn 180ms ease both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(18px) scale(0.985) rotateY(4deg);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1) rotateY(0);
  }
}

.description,
.photos {
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(19, 32, 54, 0.07);
}

.description {
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.4vw, 24px) clamp(20px, 1.7vw, 30px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
}

.serial-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(12px, 1vw, 18px);
}

.serial {
  margin-right: 10px;
  color: #4b5563;
  font-size: clamp(14px, 0.98vw, 17px);
  font-weight: 760;
}

.chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  font-size: clamp(13px, 0.9vw, 15px);
  font-weight: 850;
}

.chip.green {
  border: 1px solid #bee9cf;
  background: #eafaf1;
  color: var(--green);
}

.chip.blue {
  border: 1px solid #cfe0ff;
  background: #eef5ff;
  color: var(--blue);
}

.chip.done {
  border-color: #d4d9e2;
  background: #f4f6f9;
  color: var(--muted);
}

.desc-body {
  flex: 1;
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.desc-body p {
  margin: 0;
  font-size: clamp(13px, 0.98vw, 17px);
  line-height: 1.62;
  font-weight: 500;
  color: #172033;
}

.desc-body.compact {
  gap: 8px;
}

.desc-body.compact p {
  font-size: clamp(12px, 0.88vw, 15px);
  line-height: 1.46;
}

.desc-body.dense {
  gap: 6px;
}

.desc-body.dense p {
  font-size: clamp(11px, 0.78vw, 13px);
  line-height: 1.36;
}

.desc-body.scrollable {
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.link-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.link-list a {
  min-height: 58px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--blue);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.photos {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.2vw, 18px);
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcff, #f4f7fb);
}

.photos img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 180ms ease;
}

.photos img.is-ready {
  opacity: 1;
}

.photo-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(17, 24, 39, 0.58);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent),
    radial-gradient(circle at 50% 38%, rgba(15, 107, 255, 0.08), transparent 34%);
  animation: loadingSheen 1.4s ease-in-out infinite;
}

.favorite-button {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(17, 24, 39, 0.5);
  font-size: 29px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(19, 32, 54, 0.16);
  backdrop-filter: blur(16px);
  transition:
    transform 150ms ease,
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.favorite-button:hover {
  transform: scale(1.04);
  color: rgba(239, 49, 49, 0.82);
}

.favorite-button.is-active {
  background: rgba(255, 245, 245, 0.9);
  color: #ef3131;
  box-shadow: 0 12px 30px rgba(239, 49, 49, 0.18);
}

.favorite-button.is-saving {
  pointer-events: none;
  transform: scale(0.96);
  opacity: 0.72;
}

@keyframes loadingSheen {
  0% {
    opacity: 0.58;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.58;
  }
}

.photo-nav {
  position: absolute;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.photo-nav.left {
  left: 20px;
}

.photo-nav.right {
  right: 20px;
}

.photo-count {
  position: absolute;
  left: 50%;
  bottom: 16px;
  min-width: 58px;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.58);
  color: #fff;
  text-align: center;
  font-weight: 850;
  backdrop-filter: blur(8px);
}

.actions {
  width: min(1100px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 80px;
  align-items: center;
  padding: 10px 36px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(19, 32, 54, 0.16);
  backdrop-filter: blur(18px);
}

.actions button {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 12px;
  font-size: 21px;
  font-weight: 900;
  position: relative;
}

.actions kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  min-width: 24px;
  height: 20px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: #e6e9ee;
  color: #4b5563;
  font: 800 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.action-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid currentColor;
  border-radius: 10px;
  font-size: 25px;
  line-height: 1;
}

.approve {
  border: 1px solid #88dab0;
  background: linear-gradient(180deg, #f1fff7, var(--green-soft));
  color: var(--green);
}

.approve:hover {
  box-shadow: 0 12px 28px rgba(22, 160, 93, 0.16);
}

.reject {
  border: 1px solid #ff8f8f;
  background: linear-gradient(180deg, #fff8f8, var(--red-soft));
  color: var(--red);
}

.reject:hover {
  box-shadow: 0 12px 28px rgba(239, 49, 49, 0.16);
}

.skip {
  height: 50px !important;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 18px !important;
}

.small {
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 800;
}

.empty {
  align-self: center;
  justify-self: center;
  text-align: center;
}

.empty h2 {
  font-size: 30px;
  margin: 0 0 18px;
}

.empty p {
  margin: -6px 0 18px;
  color: var(--muted);
  font-weight: 750;
}

.empty button {
  height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
}

dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(12, 14, 18, 0.54);
}

.reject-box {
  width: min(760px, calc(100vw - 28px));
  padding: 24px;
  background: #fff;
}

.reject-box h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.reasons {
  display: grid;
  gap: 10px;
  max-height: 56vh;
  overflow: auto;
}

.reason {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.reason input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.reason span {
  font-size: 17px;
  line-height: 1.45;
}

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

.photo-dialog {
  width: min(96vw, 1400px);
  height: min(94vh, 1000px);
  background: #111;
}

.photo-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .top-actions {
    align-self: flex-end;
  }

  .review-card {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .description,
  .photos {
    min-height: 420px;
    height: auto;
  }

  .actions {
    position: static;
    width: auto;
    grid-template-columns: 1fr 110px 1fr;
    gap: 18px;
    padding: 18px;
    margin: 0 24px 24px;
  }
}

@media (max-width: 680px) {
  body {
    overflow: auto;
  }

  .workspace {
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .topbar,
  .review-nav,
  .review-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar strong {
    font-size: 22px;
  }

  .tabs {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .stats {
    width: 100%;
  }

  .stat-pill {
    flex: 1;
    min-width: 0;
  }

  .description {
    padding: 22px;
  }

  .desc-body p {
    font-size: 18px;
    line-height: 1.8;
  }

  .actions {
    margin: 0 10px 16px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .actions button,
  .skip {
    height: 60px !important;
    font-size: 18px !important;
  }
}
