.afup {
  --afup-accent: #1a1a1a;
  --afup-border: rgba(0, 0, 0, .14);
  --afup-muted: rgba(0, 0, 0, .55);
  --afup-bg: rgba(0, 0, 0, .025);
  --afup-ok: #1f7a4a;
  --afup-warn: #a86400;
  --afup-bad: #b3261e;
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.45;
}
.afup *, .afup *::before, .afup *::after { box-sizing: border-box; }
.afup-title { margin: 0 0 .4em; }
.afup-intro { color: var(--afup-muted); margin: 0 0 1.4em; }

.afup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 18px; }
.afup-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.afup-fields .afup-wide { grid-column: 1 / -1; }
.afup-fields input, .afup-fields textarea {
  font: inherit; font-weight: 400; width: 100%; padding: 10px 12px;
  border: 1px solid var(--afup-border); border-radius: 6px; background: #fff; color: inherit;
}
.afup-fields input:focus, .afup-fields textarea:focus { outline: 2px solid var(--afup-accent); outline-offset: -1px; border-color: transparent; }

.afup-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 34px 20px; border: 1.5px dashed var(--afup-border); border-radius: 10px;
  background: var(--afup-bg); cursor: pointer; transition: border-color .15s, background .15s;
}
.afup-drop:hover, .afup-drop:focus-visible, .afup-drop.is-over { border-color: var(--afup-accent); background: rgba(0, 0, 0, .05); outline: none; }
.afup-drop svg { color: var(--afup-accent); margin-bottom: 6px; }
.afup-drop strong { font-size: 17px; }
.afup-drop span { color: var(--afup-muted); }
.afup-drop u { cursor: pointer; }
.afup-drop u:hover { color: var(--afup-accent); }
.afup-drop small { color: var(--afup-muted); font-size: 13px; margin-top: 6px; }

.afup-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.afup-item { border: 1px solid var(--afup-border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.afup-row { display: flex; align-items: baseline; gap: 10px; }
.afup-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afup-size { color: var(--afup-muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.afup-btn {
  font: inherit; font-size: 13px; padding: 3px 10px; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--afup-border); background: transparent; color: inherit;
}
.afup-btn:hover { border-color: var(--afup-accent); }
.afup-format { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.afup-format label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--afup-muted); }
.afup-format input {
  font: inherit; font-size: 14px; width: 170px; padding: 6px 9px; color: inherit;
  border: 1px solid var(--afup-border); border-radius: 5px; background: #fff;
}
.afup-format input:focus { outline: 2px solid var(--afup-accent); outline-offset: -1px; border-color: transparent; }
.afup-format input:disabled { background: transparent; border-color: transparent; padding-left: 0; }
.afup-format input:disabled:placeholder-shown { display: none; }
.afup-apply { font: inherit; font-size: 13px; background: none; border: 0; padding: 6px 0; color: var(--afup-accent); text-decoration: underline; cursor: pointer; }
.afup-apply[hidden] { display: none; }
.afup-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .08); margin: 9px 0 6px; overflow: hidden; }
.afup-fill { height: 100%; width: 0; background: var(--afup-accent); transition: width .25s linear; }
.afup-status { font-size: 13px; color: var(--afup-muted); font-variant-numeric: tabular-nums; }

.afup-item[data-state="done"] .afup-fill { background: var(--afup-ok); }
.afup-item[data-state="done"] .afup-status { color: var(--afup-ok); font-weight: 600; }
.afup-item[data-state="error"] .afup-fill { background: var(--afup-bad); }
.afup-item[data-state="error"] .afup-status { color: var(--afup-bad); }
.afup-item[data-state="retrying"] .afup-status,
.afup-item[data-state="offline"] .afup-status { color: var(--afup-warn); }
.afup-item[data-state="paused"] .afup-fill { opacity: .45; }

.afup-report { font-size: 13px; margin-top: 4px; }
.afup-report:empty { display: none; }
.afup-report ul { margin: 4px 0 0 18px; padding: 0; }
.afup-item[data-verdict="ok"] .afup-verdict { color: var(--afup-ok); }
.afup-item[data-verdict="attention"] .afup-verdict,
.afup-item[data-verdict="manuel"] .afup-verdict { color: var(--afup-warn); }
.afup-item[data-verdict="probleme"] .afup-verdict { color: var(--afup-bad); }

.afup-msg { margin: 14px 0 0; font-weight: 600; }
.afup-msg:empty { display: none; }
.afup-msg.is-ok { color: var(--afup-ok); }
.afup-msg.is-warn { color: var(--afup-bad); }
.afup-msg.is-info { color: var(--afup-muted); font-weight: 400; }

.afup-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.afup-send {
  font: inherit; font-weight: 600; padding: 12px 30px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--afup-accent); color: #fff;
}
.afup-send:disabled { opacity: .5; cursor: progress; }

@media (max-width: 600px) {
  .afup-fields { grid-template-columns: 1fr; }
  .afup-actions .afup-send { width: 100%; }
}
