/* ─── Batch bar + file list — drawing schedule ───────────────── */
.batch-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-hi);
  border: 1.5px solid var(--rule);
  border-bottom: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.batch-bar.active { display: flex; }

.batch-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.batch-info .count { color: var(--rust); font-weight: 700; padding: 0 2px; }

.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.file-list {
  display: none;
  border: 1.5px solid var(--rule);
  background: var(--panel);
  margin-bottom: 32px;
}
.file-list.active { display: block; }

.file-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  transition: background .15s;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--hover); }

/* drawing index stamp */
.file-icon {
  width: 42px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-hi);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blueprint);
}
[data-theme="light"] .file-icon { color: var(--blueprint-lo); }

.file-info { min-width: 0; }
.file-name {
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.file-meta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-faint);
}

.format-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.format-select-wrap .arrow {
  color: var(--rust);
  font-weight: 700;
  font-size: 15px;
}

.format-select {
  background-color: var(--panel-hi);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 1px;
  padding: 6px 26px 6px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23b85a3c' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color .15s, background-color .15s;
}
.format-select:hover  { border-color: var(--blueprint); }
.format-select:focus  { outline: none; border-color: var(--blueprint); }
.format-select:disabled { opacity: .45; cursor: not-allowed; }

.status-cell {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  min-width: 104px;
  text-align: right;
  font-weight: 700;
}
.status-cell.pending { color: var(--ink-faint); }
.status-cell.working { color: var(--rust); }
.status-cell.done    { color: var(--good); }
.status-cell.error   { color: var(--bad); }

.status-cell .spinner {
  display: inline-block;
  width: 10px; height: 10px;
  border: 2px solid var(--rust);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 6px;
  vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* live progress bar */
.row-bar {
  grid-column: 1 / -1;
  height: 5px;
  background: var(--panel-lo);
  border: 1px solid var(--border-strong);
  border-radius: 1px;
  overflow: hidden;
}
.row-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rust-lo), var(--rust) 60%, var(--rust-hi));
  transition: width .25s ease;
  position: relative;
  overflow: hidden;
}
.row-bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.12) 0 6px,
    rgba(0,0,0,0.00) 6px 12px
  );
  background-size: 17px 100%;
  mix-blend-mode: overlay;
  opacity: 0.85;
  animation: bar-machine 1.4s linear infinite;
  pointer-events: none;
}
@keyframes bar-machine {
  from { background-position: 0 0; }
  to   { background-position: 17px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .row-bar span::after { animation: none; }
}

.file-err {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--bad);
  background: rgba(168,48,32,0.10);
  border-left: 3px solid var(--bad);
  padding: 8px 11px;
}

.file-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--rust);
}
.file-note::before {
  content: "";
  width: 7px; height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rust);
  animation: note-pulse 1.1s ease-in-out infinite;
}
@keyframes note-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.size-arrow { color: var(--rust); font-weight: 700; }
.size-delta { font-weight: 600; }
.size-delta.smaller { color: var(--good); }
.size-delta.larger  { color: var(--rust); }
.size-delta.same    { color: var(--ink-faint); }

.file-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 1px;
  background: var(--panel-hi);
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, border-color .15s, transform .08s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--blueprint); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn.download {
  color: var(--blueprint);
  border-color: var(--blueprint);
}
[data-theme="light"] .icon-btn.download { color: var(--blueprint-lo); border-color: var(--blueprint-lo); }
.icon-btn.download:hover {
  background: var(--blueprint);
  color: var(--bg-main);
}
[data-theme="light"] .icon-btn.download:hover { background: var(--blueprint-lo); color: var(--bg-main); }
.icon-btn svg { width: 13px; height: 13px; }
