:root {
  --bg:        #f4f6f9;
  --panel:     #ffffff;
  --ink:       #16202e;
  --ink-soft:  #5b6b80;
  --line:      #dde3ec;
  --brand:     #123a63;
  --brand-2:   #1d5c9e;
  --accent:    #0f8a5f;
  --danger:    #b4232b;
  --radius:    10px;
  --shadow:    0 1px 2px rgba(16,32,54,.06), 0 8px 24px rgba(16,32,54,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- shell ---------- */

header.bar {
  background: var(--brand);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
header.bar .mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
header.bar h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .2px; }
header.bar .sub { font-size: 13px; opacity: .78; margin-top: 1px; }
header.bar .spacer { flex: 1; }
header.bar .who { font-size: 13px; opacity: .85; text-align: right; }

main {
  max-width: 940px;
  margin: 28px auto 60px;
  padding: 0 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.card p.lede { margin: 0 0 20px; color: var(--ink-soft); font-size: 14px; }

/* ---------- form ---------- */

label.fld { display: block; margin-bottom: 16px; }
label.fld span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
input[type=text], input[type=password], textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fbfcfe;
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(29,92,158,.14);
  background: #fff;
}
textarea { resize: vertical; min-height: 84px; }

button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 11px 20px;
  cursor: pointer;
  background: var(--brand-2);
  color: #fff;
}
button:hover { background: #17508b; }
button:disabled { opacity: .5; cursor: default; }
button.ghost {
  background: transparent;
  color: var(--brand-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 13.5px;
}
button.ghost:hover { background: #f1f5fa; }
button.link {
  background: none; color: var(--ink-soft); padding: 4px 8px;
  font-size: 13px; font-weight: 500; text-decoration: underline;
}
button.link:hover { background: none; color: var(--danger); }

.msg {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  background: #fdecec;
  color: var(--danger);
  border: 1px solid #f5cccc;
}
.msg.ok { background: #e8f6ef; color: #0a6b4a; border-color: #c3e6d6; }

/* ---------- dropzone ---------- */

#drop {
  border: 2px dashed #c3cede;
  border-radius: var(--radius);
  background: #fafcff;
  padding: 44px 24px;
  text-align: center;
  transition: background .12s, border-color .12s;
  cursor: pointer;
}
#drop.hot { border-color: var(--brand-2); background: #eef4fb; }
#drop .big { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
#drop .small { color: var(--ink-soft); font-size: 13.5px; }
#drop svg { margin-bottom: 10px; }

/* ---------- queue ---------- */

.overall {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 4px;
  font-size: 13.5px; color: var(--ink-soft);
}
.overall b { color: var(--ink); font-weight: 600; }

ul.queue { list-style: none; margin: 14px 0 0; padding: 0; }
ul.queue li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: #fff;
}
.row1 { display: flex; align-items: baseline; gap: 10px; }
.fname {
  font-weight: 600; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.fsize { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.row2 {
  display: flex; align-items: center; gap: 12px;
  margin-top: 9px; font-size: 12.5px; color: var(--ink-soft);
}
.track {
  flex: 1; height: 7px; border-radius: 4px;
  background: #e9edf3; overflow: hidden;
}
.fill {
  height: 100%; width: 0%;
  background: var(--brand-2);
  transition: width .18s linear;
}
li.done .fill  { background: var(--accent); }
li.error .fill { background: var(--danger); }
.pct { width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.stat { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat.err { color: var(--danger); }
.stat.ok  { color: var(--accent); font-weight: 600; }

.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

footer.foot {
  text-align: center; color: var(--ink-soft);
  font-size: 12.5px; padding: 0 20px 40px;
}
footer.foot a { color: var(--brand-2); }
