:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #d8dfeb;
  --text: #17212f;
  --muted: #5e6a7d;
  --accent: #3158d3;
  --accent-soft: #e8eeff;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.page-header { margin-bottom: 24px; }
.page-header h1 { margin: 0 0 8px; }
.page-header p { margin: 0; color: var(--muted); max-width: 950px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(17, 24, 39, 0.04);
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
label span {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--muted);
}
input, select, button {
  font: inherit;
}
input[type="text"], select, input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
}
.button.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feedback {
  min-height: 20px;
  margin-bottom: 10px;
  color: var(--danger);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.table-wrap.tall { max-height: 440px; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
th { background: #f9fbff; position: sticky; top: 0; }
.job-status { margin-top: 18px; }
.hidden { display: none; }
.progress-bar {
  height: 12px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
#job-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}
.job-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.result-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.result-box.full-width { margin-top: 20px; }
.result-box-head, .result-header, .button-row, .inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.result-header { align-items: flex-start; }
.muted { color: var(--muted); }
@media (max-width: 980px) {
  .grid-form, .result-grid { grid-template-columns: 1fr; }
}
