:root {
  color-scheme: light;
  --bg: #f5f6f2;
  --paper: #fff;
  --ink: #18372e;
  --muted: #64736c;
  --line: #dfe5dd;
  --green: #1b6056;
  --soft: #e8efdb;
  --error: #a52b2b;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 10px 20px;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #86bfb0;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
}
.primary:hover {
  background: #154c44;
}
.secondary {
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
}
.secondary:hover {
  background: #dce7cc;
}
.text-button {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}
.text-button:hover {
  background: var(--line);
}
.icon-button {
  background: transparent;
  font-size: 28px;
  padding: 0;
  width: 44px;
}
.error {
  color: var(--error);
  font-size: 14px;
  min-height: 0;
}
.error:empty {
  display: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 650;
  letter-spacing: -1.2px;
  line-height: 1.3;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  font-weight: 600;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--green);
  border-radius: 11px;
  color: var(--soft);
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
}
.topbar {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5vw, 24px);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.connection:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a3aaa2;
}
.connection.online:before {
  background: #419579;
}
.workspace {
  max-width: 1380px;
  padding: 56px 5vw 80px;
  margin: auto;
  min-height: calc(100vh - 170px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}
.page-heading h1 {
  margin: 0;
}
.page-heading button {
  min-width: 142px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 54px;
  background: var(--paper);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: 0;
}
.stat > span {
  font-size: 13px;
  color: var(--muted);
}
.stat strong {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 25px;
}
.section-bar h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.count {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
}
.filters {
  display: flex;
  gap: 5px;
}
.filters button {
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 13px;
  min-height: 44px;
}
.filters button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--ink);
}
.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.job-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.job-card:hover {
  border-color: #86ab9e;
  transform: translateY(-2px);
}
.job-cover {
  height: 226px;
  background: #e7ece4;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
}
.job-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.job-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, #122c2526);
}
.cover-placeholder {
  color: #899b8e;
  font-size: 44px;
  font-weight: 300;
}
.status-badge {
  position: absolute;
  left: 15px;
  top: 15px;
  font-size: 12px;
  padding: 5px 10px;
  background: #fffffff0;
  border-radius: 7px;
  color: var(--ink);
  z-index: 1;
}
.status-failed,
.status-interrupted {
  color: var(--error);
}
.play-mark {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffffed;
  padding-left: 3px;
  font-size: 16px;
  color: var(--green);
}
.job-info {
  padding: 19px 20px;
  width: 100%;
}
.job-info h3 {
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  gap: 10px;
}
.empty-state {
  border: 1px dashed #cad5c8;
  border-radius: 15px;
  text-align: center;
  padding: 60px 24px 55px;
}
.empty-state h3 {
  margin: 22px 0 9px;
}
.empty-state p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.empty-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 66px;
}
.empty-frame span {
  width: 44px;
  height: 58px;
  border: 1px solid #bacbb7;
  background: #e5ecdf;
  border-radius: 5px;
  transform: rotate(-10deg);
}
.empty-frame span:nth-child(2) {
  height: 66px;
  transform: rotate(5deg);
  background: #d5e3cb;
}
.empty-frame span:nth-child(3) {
  transform: rotate(14deg);
}
.devices-section {
  margin-top: 50px;
}
.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 17px 2px;
  gap: 15px;
}
.device-row span {
  color: var(--muted);
  font-size: 13px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 5vw;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 9px;
}
input {
  display: block;
  width: 100%;
  border: 1px solid #cad5c8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  min-height: 48px;
}
input[type="file"] {
  font-size: 13px;
}
input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  padding: 8px 12px;
  margin-right: 12px;
  font: inherit;
  cursor: pointer;
}
.login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 42px;
  border-radius: 20px;
}
.login-card .brand {
  margin-bottom: 48px;
  font-size: 17px;
}
.login-card h1 {
  font-size: 29px;
  margin-bottom: 32px;
}
.login-card .primary {
  width: 100%;
  margin-top: 24px;
}
.login-edition {
  position: absolute;
  bottom: 24px;
  letter-spacing: 2px;
  color: var(--muted);
  font-size: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  width: min(600px, calc(100% - 32px));
  color: var(--ink);
  max-height: 90svh;
  overflow: auto;
  background: var(--paper);
}
dialog::backdrop {
  background: #12332c66;
  backdrop-filter: blur(3px);
}
.dialog-content {
  padding: 28px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-content > .primary {
  width: 100%;
  margin-top: 20px;
}
.form-note {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
}
.upload-previews {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 16px;
}
.upload-previews img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}
.detail-content video {
  display: block;
  max-height: 60svh;
  max-width: 100%;
  margin: 20px auto;
  background: #152e26;
  border-radius: 10px;
}
.detail-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.detail-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 24px;
}
.detail-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
}
.detail-photo p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.download {
  display: flex;
  text-align: center;
}
.progress-panel {
  background: var(--bg);
  padding: 32px 20px;
  margin-top: 20px;
  border-radius: 12px;
}
.progress-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 10;
  max-width: calc(100% - 32px);
}
@media (min-width: 1600px) {
  .workspace {
    padding-inline: 50px;
  }
}
@media (max-width: 1000px) {
  .job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 0 22px;
  }
  .job-cover {
    height: 210px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 76px;
    padding: 0 20px;
  }
  .brand {
    font-size: 16px;
    gap: 9px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 21px;
  }
  .header-actions {
    gap: 6px;
  }
  .connection {
    font-size: 11px;
    gap: 5px;
  }
  .text-button {
    font-size: 12px;
    padding: 8px;
  }
  .workspace {
    padding: 32px 20px 50px;
  }
  .page-heading {
    margin-bottom: 28px;
    align-items: flex-start;
  }
  .page-heading h1 {
    max-width: 190px;
    font-size: 29px;
    line-height: 1.5;
    letter-spacing: -1px;
  }
  .page-heading button {
    min-width: auto;
    font-size: 13px;
    gap: 7px;
    padding: 9px 12px;
    margin-top: 2px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 32px;
  }
  .stat {
    padding: 0 22px;
    margin: 20px 0;
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    padding-bottom: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
  }
  .stat strong {
    font-size: 30px;
  }
  .section-bar {
    align-items: center;
    gap: 4px;
  }
  .section-bar h2 {
    font-size: 18px;
    gap: 7px;
  }
  .filters {
    gap: 0;
  }
  .filters button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .job-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .job-cover {
    height: 230px;
  }
  .empty-state {
    padding: 40px 20px;
  }
  .empty-state p {
    line-height: 1.8;
  }
  .login-card {
    padding: 30px 26px;
  }
  .login-shell {
    padding: 20px;
  }
  .login-card h1 {
    font-size: 27px;
  }
  .dialog-content {
    padding: 23px;
  }
  .upload-previews {
    grid-template-columns: repeat(4, 1fr);
  }
  .detail-photos {
    grid-template-columns: repeat(3, 1fr);
  }
  footer {
    padding: 22px 20px;
  }
  footer span:last-child {
    max-width: 170px;
    text-align: right;
  }
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.download {
  min-height: 48px;
  border-radius: 10px;
  padding: 12px 20px;
}
.heading-phrase {
  display: inline-block;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
