:root {
  --navy: #1B3A6B;
  --gold: #C9A84C;
  --green: #217346;
  --amber: #C55A11;
  --red: #C00000;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --border: #E1E4E8;
  --text: #1F2430;
  --muted: #6B7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.wrap {
  max-width: 560px;
  margin: 48px auto;
  padding: 0 20px;
}

.screen {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

.hidden { display: none !important; }

h1 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--navy);
}

.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; display: block; margin-bottom: 4px; }

code {
  background: #EEF1F5;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

form, .form-row { margin-top: 20px; }

input[type="password"],
input[type="url"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

button {
  background: var(--gold);
  color: #26210a;
  border: none;
  border-radius: 6px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

button:hover:not(:disabled) { opacity: 0.9; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.link-btn {
  background: none;
  color: var(--navy);
  font-weight: 500;
  padding: 6px 0;
  text-decoration: underline;
}

/* .link-btn's navy text is invisible against the topbar's own navy
   background (found live: the button was there, just unreadable) --
   this specific instance needs the light color the rest of the topbar
   already uses, not the light-background default. */
.topbar .link-btn {
  color: #fff;
  opacity: 0.85;
}
.topbar .link-btn:hover { opacity: 1; }

.dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  margin-top: 16px;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.dragover {
  border-color: var(--gold);
  background: #FBF7EC;
}

.dropzone-icon {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 8px;
}

.file-name { font-weight: 600; }
.file-size { margin-top: 2px; }

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
}

.progress-track {
  background: #EEF1F5;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: 20px 0 10px;
}

.progress-bar {
  background: var(--gold);
  height: 100%;
  transition: width 0.4s ease;
}

.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.counts div {
  background: #F2F4F7;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.counts span {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.counts label {
  font-size: 12px;
  color: var(--muted);
}

.downloads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 16px;
}

.downloads button:first-child { background: var(--navy); color: #fff; }
