:root {
  --bg: #080b12;
  --surface: #101522;
  --surface-2: #151b2a;
  --surface-3: #1b2232;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fb;
  --muted: #929caf;
  --dim: #657086;
  --accent: #a9ff68;
  --accent-strong: #7ee23d;
  --accent-ink: #11180b;
  --blue: #73a7ff;
  --amber: #ffca67;
  --red: #ff7c88;
  --purple: #b996ff;
  --radius: 18px;
  --radius-small: 11px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 6% -8%, rgba(126, 226, 61, 0.1), transparent 30rem),
    radial-gradient(circle at 92% 14%, rgba(115, 167, 255, 0.08), transparent 35rem),
    var(--bg);
}

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

button,
select,
summary,
.file-drop {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.file-drop:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(8, 11, 18, 0.82), rgba(8, 11, 18, 0.95)),
    repeating-linear-gradient(90deg, transparent 0, transparent 63px, rgba(255, 255, 255, 0.025) 64px),
    repeating-linear-gradient(0deg, transparent 0, transparent 63px, rgba(255, 255, 255, 0.025) 64px);
}

.auth-card {
  width: min(460px, 100%);
  padding: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(16, 21, 34, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-mark {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(169, 255, 104, 0.4);
  border-radius: 15px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 10px 35px rgba(126, 226, 61, 0.2);
}

.brand-mark::after {
  position: absolute;
  right: -17px;
  bottom: -20px;
  width: 42px;
  height: 42px;
  border: 7px solid rgba(8, 11, 18, 0.2);
  border-radius: 50%;
  content: "";
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(27px, 5vw, 36px);
  letter-spacing: -0.045em;
}

.auth-copy {
  margin: 14px 0 30px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form label,
.field > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #c4ccda;
  font-size: 13px;
  font-weight: 650;
}

.field > span small {
  color: var(--dim);
  font-weight: 500;
}

.token-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--text);
  background: #0c111c;
  transition: border-color 160ms ease, background 160ms ease;
}

input,
select {
  height: 44px;
  padding: 0 13px;
}

textarea {
  min-height: 132px;
  padding: 13px;
  resize: vertical;
  line-height: 1.6;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input::placeholder,
textarea::placeholder {
  color: #59647a;
}

select {
  color-scheme: dark;
}

.primary-button,
.ghost-button,
.icon-button,
.table-button {
  border: 0;
  border-radius: 10px;
  font-weight: 750;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.primary-button {
  min-height: 44px;
  padding: 0 20px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 9px 26px rgba(126, 226, 61, 0.14);
}

.primary-button:hover {
  background: #bcff89;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.5;
  transform: none;
}

.full-button {
  width: 100%;
}

.ghost-button,
.icon-button,
.table-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: #d6dce8;
  background: rgba(255, 255, 255, 0.035);
}

.ghost-button:hover,
.icon-button:hover,
.table-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}

.muted-button {
  color: var(--muted);
}

.form-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 13px;
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
}

.health-dot,
.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.health-dot i,
.connection-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 202, 103, 0.1);
}

.health-dot.online i,
.connection-pill.online i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(169, 255, 104, 0.1);
}

.health-dot.offline i,
.connection-pill.offline i {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 124, 136, 0.1);
}

.console {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 10px;
}

.brand-mark-small span {
  font-size: 12px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 10px;
}

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

.connection-pill {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd3df;
  font-size: 12px;
}

.last-refresh {
  color: var(--dim);
  font-size: 11px;
}

.main-content {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.intro-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.intro-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.055em;
}

.intro-row p:not(.eyebrow) {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  position: relative;
  min-height: 136px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.metric-accent {
  border-color: rgba(169, 255, 104, 0.2);
  background: linear-gradient(145deg, rgba(169, 255, 104, 0.12), rgba(169, 255, 104, 0.025));
}

.metric-accent::after {
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 18px solid rgba(169, 255, 104, 0.05);
  border-radius: 50%;
  content: "";
}

.metric-card span,
.metric-card strong,
.metric-card small {
  display: block;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  margin: 12px 0 8px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-card small {
  color: var(--dim);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 21, 34, 0.76);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.13);
}

.submit-panel,
.workers-panel,
.jobs-panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.section-kicker {
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 9px;
}

.step-chip,
.count-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
}

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

.full-field {
  grid-column: 1 / -1;
}

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

.file-drop {
  position: relative;
  display: grid;
  min-height: 126px;
  padding: 18px;
  place-items: center;
  align-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 150ms ease, background 150ms ease;
}

.file-drop:hover,
.file-drop.has-files {
  border-color: rgba(169, 255, 104, 0.48);
  background: rgba(169, 255, 104, 0.045);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 9px;
  color: #9ed5ff;
  background: rgba(115, 167, 255, 0.13);
  font-size: 12px;
  font-weight: 800;
}

.file-icon-audio {
  color: #d2baff;
  background: rgba(185, 150, 255, 0.13);
}

.file-drop strong {
  font-size: 13px;
}

.file-drop small {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.advanced summary {
  padding: 13px 15px;
  color: #bdc5d2;
  font-size: 12px;
  font-weight: 700;
}

.advanced-grid {
  padding: 4px 15px 15px;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}

.submit-status {
  flex: 1;
  min-width: 0;
}

.submit-status > span {
  display: block;
  margin-bottom: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.workers-list {
  display: grid;
  gap: 12px;
}

.worker-order-help {
  margin: -12px 0 16px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
}

.worker-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.worker-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  color: var(--dim);
  font-size: 10px;
}

.worker-order-row strong {
  color: var(--accent);
  font-size: 11px;
}

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

.order-button {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.order-button:hover:not(:disabled) {
  border-color: rgba(169, 255, 104, 0.38);
  color: var(--accent);
  background: rgba(169, 255, 104, 0.07);
}

.order-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.worker-top,
.worker-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worker-name {
  min-width: 0;
}

.worker-name strong,
.worker-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-name strong {
  font-size: 13px;
}

.worker-name small {
  margin-top: 4px;
  color: var(--dim);
  font-size: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(115, 167, 255, 0.18);
  border-radius: 999px;
  color: #a9c8ff;
  background: rgba(115, 167, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-success,
.status-idle {
  border-color: rgba(169, 255, 104, 0.18);
  color: var(--accent);
  background: rgba(169, 255, 104, 0.07);
}

.status-failed,
.status-error,
.status-offline {
  border-color: rgba(255, 124, 136, 0.18);
  color: var(--red);
  background: rgba(255, 124, 136, 0.07);
}

.status-cancelled,
.status-maintenance {
  border-color: rgba(146, 156, 175, 0.18);
  color: var(--muted);
  background: rgba(146, 156, 175, 0.07);
}

.status-queued,
.status-assigned,
.status-retry_wait,
.status-worker_offline {
  border-color: rgba(255, 202, 103, 0.18);
  color: var(--amber);
  background: rgba(255, 202, 103, 0.07);
}

.worker-meter {
  height: 5px;
  margin: 14px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.worker-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.worker-stat-row {
  color: var(--dim);
  font-size: 10px;
}

.worker-stat-row strong {
  color: #c5cdda;
  font-weight: 650;
}

.empty-state,
.empty-cell {
  padding: 36px 18px;
  color: var(--dim);
  text-align: center;
  font-size: 12px;
}

.jobs-panel {
  margin-top: 20px;
}

.jobs-heading {
  margin-bottom: 12px;
}

.compact-field select {
  min-width: 130px;
  height: 38px;
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: #cbd2de;
}

.job-identity strong,
.job-identity small {
  display: block;
}

.job-identity strong {
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.job-identity small {
  margin-top: 4px;
  color: var(--dim);
  font-size: 9px;
}

.table-progress {
  display: grid;
  grid-template-columns: minmax(60px, 120px) 34px;
  align-items: center;
  gap: 8px;
}

.table-progress .progress-track {
  height: 5px;
}

.table-progress span {
  color: var(--dim);
  font-size: 10px;
  text-align: right;
}

.job-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.job-output-cell {
  width: 118px;
}

.job-output-empty {
  color: var(--dim);
  font-size: 10px;
}

.job-output-preview {
  position: relative;
  display: grid;
  width: 104px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--dim);
  background: #090d16;
  cursor: pointer;
}

.job-output-preview:hover {
  border-color: rgba(169, 255, 104, 0.42);
  box-shadow: 0 0 0 2px rgba(169, 255, 104, 0.06);
}

.job-output-preview img,
.job-output-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05070b;
}

.job-output-preview .preview-placeholder {
  font-size: 9px;
}

.job-output-preview .preview-count {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #eef5ff;
  background: rgba(4, 7, 12, 0.78);
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.job-output-preview .preview-kind {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(4, 7, 12, 0.78);
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.table-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 10px;
}

.table-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.danger-button {
  color: #ffabb3;
}

.job-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(860px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: #0e131f;
  box-shadow: var(--shadow);
}

.job-dialog::backdrop {
  background: rgba(2, 4, 8, 0.75);
  backdrop-filter: blur(8px);
}

.media-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: #0b101a;
  box-shadow: var(--shadow);
}

.media-dialog::backdrop {
  background: rgba(2, 4, 8, 0.86);
  backdrop-filter: blur(10px);
}

.media-dialog-content {
  display: grid;
  min-height: 260px;
  max-height: calc(100vh - 126px);
  padding: 18px;
  overflow: auto;
  place-items: center;
  background: #05070b;
}

.media-dialog-content img,
.media-dialog-content video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 164px);
  border-radius: 12px;
  object-fit: contain;
  background: #020305;
}

.media-dialog-content video {
  width: 100%;
}

.media-preview-message {
  color: var(--dim);
  font-size: 12px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  font-size: 19px;
}

.dialog-content {
  max-height: calc(100vh - 130px);
  padding: 24px;
  overflow-y: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.detail-job-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.detail-job-actions > span {
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
}

.detail-job-actions > div {
  display: flex;
  flex: none;
  gap: 8px;
}

.detail-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

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

.detail-item span {
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  color: #cbd2df;
  font-size: 12px;
}

.detail-code,
.error-box {
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #aeb8c9;
  background: #090d16;
  font: 10px/1.6 "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-box {
  border-color: rgba(255, 124, 136, 0.2);
  color: #ffb3bb;
  background: rgba(255, 124, 136, 0.045);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  min-height: 42px;
  padding-bottom: 12px;
}

.timeline-item::before {
  position: absolute;
  top: 12px;
  bottom: -3px;
  left: 4px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border: 2px solid #0e131f;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.timeline-copy strong,
.timeline-copy small {
  display: block;
}

.timeline-copy strong {
  font-size: 11px;
}

.timeline-copy small,
.timeline-time {
  margin-top: 4px;
  color: var(--dim);
  font-size: 9px;
}

.results-list {
  display: grid;
  gap: 8px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.result-item span {
  min-width: 0;
  overflow: hidden;
  color: #c9d1dd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  display: flex;
  gap: 7px;
}

.preview-box {
  margin-top: 12px;
}

.preview-box video,
.preview-box img,
.preview-box audio {
  width: 100%;
  max-height: 430px;
  border-radius: 12px;
  background: #05070b;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 9px;
  width: min(360px, calc(100% - 36px));
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: #dbe1ea;
  background: #171e2b;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: rgba(255, 124, 136, 0.3);
  color: #ffc0c6;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

  .workers-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 16px;
  }

  .last-refresh,
  .connection-pill {
    display: none;
  }

  .main-content {
    width: min(100% - 28px, 1440px);
    padding-top: 30px;
  }

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

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

  .job-form,
  .upload-grid,
  .form-grid,
  .workers-list {
    grid-template-columns: 1fr;
  }

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

  th:nth-child(3),
  td:nth-child(3),
  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 22px;
  }

  .auth-foot,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .brand small,
  .muted-button {
    display: none;
  }

  .metrics {
    gap: 9px;
  }

  .metric-card {
    min-height: 118px;
    padding: 16px;
  }

  .submit-panel,
  .workers-panel,
  .jobs-panel {
    padding: 18px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-job-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-dialog {
    width: calc(100% - 16px);
  }

  .dialog-content,
  .dialog-head {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
