/* AI Checker: white ground with Shady's plum (#2B0D2B) as the one colour, for buttons, icons, wordmark and focus.
   Plus Jakarta Sans throughout: open, friendly letterforms for customers who are not technical. Light only, as
   asked ("make the website white"). */
:root {
  --ground: #ffffff;
  --plum: #2b0d2b;
  --plum-hover: #4a1d4a;
  --tint: #f6f0f6;
  --line: #ebe3eb;
  --ink: #1e121e;
  --ink-soft: #625462;
  --bad: #a3261b;
  --radius: 20px;
  --radius-small: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 "Plus Jakarta Sans", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}

header, footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--plum); text-decoration: none; }

.who { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-soft); min-width: 0; }

.who strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { color: var(--ink-soft); font-size: 13px; justify-content: center; padding-top: 8px; }

main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 8px;
  display: grid;
  gap: 16px;
  align-content: start;
  overflow-y: auto;
}

/* Wide screens: upload on the left, the customer's files on the right, both the full height with their lists
   scrolling inside. */
@media (min-width: 900px) and (min-height: 560px) {
  main.app { grid-template-columns: 1fr 1fr; align-content: stretch; overflow: hidden; padding-bottom: 28px; }
  main.app .card { min-height: 0; }
}

main.login { max-width: 460px; align-content: center; }

/* The raised surfaces: each holds one task, so only they carry a shadow. */
/* Stacked (phones) a card keeps its natural height and main scrolls; side by side it fits the screen. */
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(43, 13, 43, 0.06), 0 8px 24px rgba(43, 13, 43, 0.06);
}

.card-head { display: flex; align-items: center; gap: 12px; }

h1, h2 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0; }

h1 { font-size: clamp(20px, 5.6vw, 28px); }

h2 { font-size: 20px; }

p { margin: 0; }

.lead { color: var(--ink-soft); font-size: 15px; }

.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tile {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-small);
  background: var(--tint);
  color: var(--plum);
  display: grid;
  place-items: center;
}

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

.field input {
  font: 400 16px/1.4 "Plus Jakarta Sans", system-ui, sans-serif;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #d6cad6;
  border-radius: var(--radius-small);
  color: var(--ink);
  background: var(--ground);
}

.field input:focus-visible { outline: 2px solid var(--plum); outline-offset: 1px; border-color: var(--plum); }

.field small { font-weight: 400; color: var(--ink-soft); }

.drop {
  border: 1.5px dashed #cdbccd;
  border-radius: var(--radius-small);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop:hover, .drop.over { border-color: var(--plum); background: var(--tint); }

.drop:focus-within { outline: 2px solid var(--plum); outline-offset: 3px; }

.drop strong { font-weight: 600; }

.drop > .icon, .empty > .icon { width: 28px; height: 28px; color: var(--plum); }

.drop small { color: var(--ink-soft); font-size: 14px; }

/* Once files are chosen the drop zone only offers "add more", so it gives its height to the file cards. */
.drop.compact { flex-direction: row; justify-content: center; padding: 10px 14px; }

.drop.compact small { display: none; }

.drop.compact > .icon { width: 22px; height: 22px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.files {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.files:empty { display: none; }

/* At least one file card stays visible; on a phone held sideways main scrolls instead. */
.files:not(:empty) { min-height: 68px; }

/* One card per file: its icon, name, state and its one action. */
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  flex: none;
}

.file .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.name { overflow-wrap: anywhere; font-weight: 600; font-size: 15px; line-height: 1.35; }

.meta { color: var(--ink-soft); font-size: 13px; }

.file[data-state="failed"] .tile { color: var(--bad); }

.empty { color: var(--ink-soft); font-size: 15px; text-align: center; padding: 24px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--plum); cursor: pointer; }

button, .button {
  font: 600 15px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: var(--ground);
  color: var(--plum);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.12s, background 0.2s;
}

button:hover, .button:hover { background: var(--tint); }

button:active, .button:active { transform: scale(0.98); }

button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

/* The filled button: solid plum with a fine lit edge (decision glass-buttons). */
.primary {
  background: var(--plum);
  color: #ffffff;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(43, 13, 43, 0.25);
}

.primary:hover { background: var(--plum-hover); }

.primary .icon { width: 18px; height: 18px; }

.wide { width: 100%; }

button:disabled { cursor: not-allowed; background: #d9cfd9; color: #ffffff; box-shadow: none; transform: none; }

.icon-button { width: 44px; padding: 0; border-color: transparent; color: var(--ink-soft); flex: none; }

.icon-button:hover { color: var(--plum); }

.text-button { border: 0; padding: 0 8px; color: var(--plum); text-decoration: underline; text-underline-offset: 3px; background: transparent; }

.error { color: var(--bad); font-size: 14px; }

.error:empty { display: none; }

/* State as length plus a word (decision no-generated-ui-tells): an empty, half or full bar. */
.state { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }

.bar { width: 48px; height: 5px; border-radius: 3px; background: var(--tint); overflow: hidden; flex: none; }

.bar i { display: block; height: 100%; width: 0; background: var(--plum); }

.bar[data-state="running"] i { width: 50%; }

.bar[data-state="done"] i, .bar[data-state="expired"] i { width: 100%; }

.bar[data-state="expired"] i { opacity: 0.35; }

.bar[data-state="failed"] i { width: 100%; background: var(--bad); }

.note { color: var(--ink-soft); font-size: 14px; background: var(--tint); border-radius: var(--radius-small); padding: 12px 14px; }

@media (max-width: 480px) {
  header, footer { padding: 12px 16px; }
  main { padding: 0 12px 8px; gap: 12px; }
  .card { padding: 18px 16px; gap: 14px; }
  main { padding-bottom: 16px; }
  .file { flex-wrap: wrap; }
  .file .button { width: 100%; }
}

@media (max-height: 520px) {
  header, footer { padding: 8px 16px; }
  .card { padding: 14px 18px; gap: 10px; }
  h1 { font-size: 22px; }
  .lead { font-size: 14px; }
  .drop { padding: 10px 14px; flex-direction: row; justify-content: center; }
  .drop small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
