/* Customer upload page — mobile-first.
   Base font 16px and 48px minimum tap targets throughout; the layout is a
   single column that only gains width on larger screens. */

:root {
  --green:      #2f6b3f;
  --green-dark: #24522f;
  --ink:        #1c1c1c;
  --muted:      #6b6b6b;
  --line:       #e2e2e2;
  --bg:         #f6f5f2;
  --card:       #ffffff;
  --red:        #b3261e;
  --red-bg:     #fdeceb;
  --amber:      #8a6100;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 16px 48px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

.site-header {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 0 18px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--green-dark);
}

.tagline { margin: 0; color: var(--muted); font-size: 16px; }

main { max-width: 640px; margin: 0 auto; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
}

.panel h2 { margin: 0 0 14px; font-size: 20px; }

/* ── Drop zone ─────────────────────────────────────────────────────────── */

.dropzone {
  border: 2px dashed #c7c7c7;
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  transition: border-color .15s, background .15s;
}

.dropzone.dragging {
  border-color: var(--green);
  background: #f0f6f1;
}

/* Dragging is pointer-only, so the hint is noise on a phone. */
.dropzone-hint, .dropzone-or { display: none; }

@media (hover: hover) and (pointer: fine) {
  .dropzone-hint {
    display: block;
    margin: 0 0 6px;
    font-size: 17px;
    color: var(--muted);
  }
  .dropzone-or {
    display: block;
    margin: 0 0 12px;
    font-size: 14px;
    color: #9a9a9a;
  }
}

/* The visible control is the <label>; the input itself is never shown but
   must stay focusable for keyboard and screen-reader users. */
#fileInput {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

#fileInput:focus-visible + .btn,
.btn:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

.limits {
  margin: 14px 2px 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:active { background: var(--green-dark); }

.btn-secondary {
  background: #fff;
  color: var(--green-dark);
  border-color: var(--green);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.btn-block { display: block; width: 100%; margin-top: 14px; }

.btn[disabled] { opacity: .55; cursor: default; }

.btn-tiny {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 15px;
  margin-top: 8px;
}

/* ── File list ─────────────────────────────────────────────────────────── */

.file-list { list-style: none; margin: 18px 0 0; padding: 0; }

.file-row {
  border-top: 1px solid var(--line);
  padding: 12px 2px;
}

.file-row:first-child { border-top: 0; }

.file-name {
  display: block;
  font-size: 15px;
  word-break: break-word;
}

.file-meta {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.file-row.rejected { background: var(--red-bg); border-radius: 8px; }
.file-row.rejected .file-meta { color: var(--red); }
.file-row.failed   .file-meta { color: var(--red); }
.file-row.done     .file-meta { color: var(--green-dark); }

.bar {
  height: 6px;
  margin-top: 8px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
}

.bar-large { height: 10px; margin-top: 4px; }

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: 999px;
  transition: width .2s linear;
}

.file-row.failed .bar-fill { background: var(--red); }

/* ── Progress + summary ────────────────────────────────────────────────── */

.summary {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

.batch-status { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.keep-open {
  margin: 14px 0 0;
  padding: 11px 13px;
  background: #fff8e6;
  border-radius: 8px;
  font-size: 14px;
  color: var(--amber);
}

/* ── Success ───────────────────────────────────────────────────────────── */

#success { text-align: center; }

.tick {
  width: 60px; height: 60px;
  margin: 4px auto 14px;
  background: var(--green);
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  line-height: 60px;
}

.reference { margin: 18px 0 8px; font-size: 15px; color: var(--muted); }

.code {
  display: inline-block;
  margin-top: 6px;
  padding: 9px 14px;
  background: #f1f1ef;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  color: var(--ink);
  word-break: break-all;
}

.muted { color: var(--muted); font-size: 15px; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  max-width: 640px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.site-footer p { margin: 3px 0; }
.site-footer a { color: var(--muted); }

.hidden { display: none; }

@media (min-width: 620px) {
  .site-header h1 { font-size: 30px; }
  .panel { padding: 26px 26px; }
}
