/* Client Upload Portal — shared styles */

:root {
  --brand: #0b5fa5;
  --ink: #14181f;
  --muted: #667085;
  --line: #e3e7ee;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #1a7f4b;
  --okbg: #e8f6ee;
  --warn: #9a3412;
  --warnbg: #fef2e8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 28px rgba(16, 24, 40, .07);
}

* { box-sizing: border-box; }

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

.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; }
.wrap.wide { max-width: 1040px; }

/* ---------- header ---------- */
.masthead { text-align: center; margin-bottom: 28px; }
.masthead img { max-height: 56px; width: auto; }
.masthead .site { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.masthead h1 { font-size: 27px; margin: 10px 0 8px; letter-spacing: -.02em; }
.masthead p { margin: 0 auto; max-width: 46em; color: var(--muted); }

/* ---------- card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ---------- form ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: #344054; }
label .req { color: #b42318; }
input[type=text], input[type=email], input[type=password], textarea {
  font: inherit;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 95, 165, .13);
}
textarea { min-height: 84px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* ---------- dropzone ---------- */
.drop {
  margin-top: 22px;
  border: 2px dashed #c6d0e0;
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: #f2f7fc; }
.drop .icon { font-size: 26px; line-height: 1; }
.drop strong { display: block; margin: 10px 0 4px; }
.drop span { color: var(--muted); font-size: 13px; }
.drop input { display: none; }

/* ---------- file list ---------- */
.files { list-style: none; margin: 18px 0 0; padding: 0; }
.files li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .sz { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.files .x {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 19px; line-height: 1; padding: 0 2px;
}
.files .x:hover { color: #b42318; }
.bar { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.files li.done .sz::after { content: " ✓"; color: var(--ok); }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid transparent;
  padding: 11px 22px; border-radius: 8px;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: #fff; color: #344054; border-color: #cfd6e2; }
.btn.ghost:hover { background: #f7f9fc; filter: none; }
.btn.danger { background: #fff; color: #b42318; border-color: #f0c4bf; }
.btn.danger:hover { background: #fef3f2; filter: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.actions { margin-top: 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.actions .note { color: var(--muted); font-size: 13px; }

/* ---------- messages ---------- */
.msg { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-top: 18px; }
.msg.err { background: #fef3f2; color: #912018; border: 1px solid #fbd5d1; }
.msg.ok { background: var(--okbg); color: var(--ok); border: 1px solid #b7e2c8; }
.hidden { display: none !important; }

.done-panel { text-align: center; padding: 14px 0 6px; }
.done-panel .tick {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--okbg); color: var(--ok); font-size: 27px;
  display: flex; align-items: center; justify-content: center;
}
.done-panel h2 { margin: 0 0 8px; font-size: 21px; }
.done-panel p { color: var(--muted); margin: 0 auto 6px; max-width: 34em; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f2f4f7; padding: 2px 8px; border-radius: 5px; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 22px; }

/* ---------- admin ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.topbar h1 { font-size: 21px; margin: 0; flex: 1; }
.meter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.meter .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.meter .row b { color: var(--ink); }
.meter .bar { height: 8px; margin: 0; }

.job { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.job.new { border-left: 3px solid var(--brand); }
.job header { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.job header .who { flex: 1; min-width: 220px; }
.job header .who h3 { margin: 0 0 3px; font-size: 16px; }
.job header .who .sub { color: var(--muted); font-size: 13px; }
.job header .when { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 99px; vertical-align: 2px; margin-left: 8px;
}
.pill.new { background: #e7f0f9; color: var(--brand); }
.jobno { font-weight: 700; }
.notes { padding: 0 18px 4px; color: #344054; font-size: 14px; }
.notes span { color: var(--muted); }
.job ul.files { margin: 8px 18px 0; }
.job ul.files li:first-child { border-top: 1px solid var(--line); }
.job footer {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px; background: #fafbfd; border-top: 1px solid var(--line); margin-top: 14px;
}
.job footer .spacer { flex: 1; }
a.filelink { color: var(--brand); text-decoration: none; }
a.filelink:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

.login { max-width: 380px; margin: 12vh auto; }
.login h1 { font-size: 20px; margin: 0 0 18px; }

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 26px 14px 48px; }
  .card { padding: 20px; }
  .job header .when { text-align: left; }
}
