:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #111827;
  --success: #047857;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 14px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.server-status {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.server-status.ok {
  color: var(--success);
}

.server-status.bad {
  color: var(--danger);
}

.admin-status {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 8px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf3;
  color: #047857;
  font-size: 12px;
}

.panel {
  margin-bottom: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.35;
}

h2 span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.picker {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 22px 16px;
  place-items: center;
  text-align: center;
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  background: #f9fafb;
}

.picker input {
  display: none;
}

.picker strong {
  font-size: 16px;
}

.picker small,
.file-item,
.job-status {
  color: var(--muted);
  font-size: 13px;
}

.selected-files {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  word-break: break-all;
}

.submit {
  width: 100%;
  height: 46px;
  margin: 2px 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 16px;
  font-weight: 650;
}

.submit:disabled {
  opacity: 0.45;
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ghost {
  min-width: 72px;
  height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.search {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  font-size: 14px;
}

.jobs {
  display: grid;
}

.job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #f2f4f7;
}

.job:last-child {
  border-bottom: 0;
}

.keyword {
  display: inline-block;
  margin-left: -6px;
  padding: 5px 6px;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
}

.keyword:active {
  background: #f2f4f7;
}

.job-name {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
}

.job-status {
  margin-top: 5px;
}

.job-owner {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.job-error {
  margin-top: 5px;
  color: var(--danger);
  font-size: 13px;
}

.job-actions {
  display: grid;
  gap: 8px;
}

.job-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  background: #ffffff;
}

.empty {
  padding: 18px 0 4px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
