/* Shared styling for the scan station. Deep-water palette, big touch targets:
   the upload page is used one-handed by people standing at a table. */

:root {
  --deep: #071a2b;
  --deep-2: #0c2740;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-line: rgba(255, 255, 255, 0.12);
  --ink: #eaf4ff;
  --ink-dim: #9fbcd4;
  --accent: #3ec6ff;
  --accent-2: #ffb03a;
  --good: #4ade80;
  --bad: #ff7a6b;
  --warn: #ffd166;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #14456b 0%, transparent 60%),
    linear-gradient(180deg, var(--deep-2) 0%, var(--deep) 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 18px 64px; }
.wrap.wide { max-width: 1200px; }

h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; margin: 28px 0 12px; color: var(--ink); }
p.lede { margin: 0 0 22px; color: var(--ink-dim); line-height: 1.5; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

label { display: block; font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 6px; }

input[type="text"], select {
  width: 100%;
  padding: 14px 14px;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
}
input[type="text"]:focus, select:focus { outline: 2px solid var(--accent); }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 18px 20px;
  font-size: 1.05rem; font-weight: 600;
  color: #04121e;
  background: linear-gradient(180deg, #6ddcff, var(--accent));
  border: 0; border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow);
}
button.ghost, .btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--panel-line); box-shadow: none;
}
button.small { width: auto; padding: 9px 14px; font-size: 0.85rem; }
button:disabled { opacity: 0.5; cursor: progress; }

input[type="file"] { display: none; }

.preview {
  width: 100%; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border: 1px dashed var(--panel-line); border-radius: 12px;
  overflow: hidden; background: rgba(0, 0, 0, 0.2);
  color: var(--ink-dim); font-size: 0.9rem; text-align: center; padding: 12px;
}
.preview img { width: 100%; height: 100%; object-fit: contain; }

.result { display: none; }
.result.show { display: block; }
.result img {
  width: 100%; max-height: 46vh; object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
}
.banner {
  padding: 14px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 14px;
  border: 1px solid transparent;
}
.banner.ok { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.4); color: var(--good); }
.banner.err { background: rgba(255, 122, 107, 0.12); border-color: rgba(255, 122, 107, 0.4); color: var(--bad); }
.notes { margin: 0; padding-left: 20px; color: var(--warn); font-size: 0.88rem; line-height: 1.5; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; font-size: 0.85rem;
  color: var(--ink); text-decoration: none;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--panel-line); border-radius: 999px;
}
.chip:hover { border-color: var(--accent); }
.swatches { display: inline-flex; gap: 3px; }
.dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile { text-align: center; }
.tile .art {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 12px; margin-bottom: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #17567f, #0a2033);
}
.tile .art img { width: 100%; height: 100%; object-fit: contain; }
.tile .who { font-weight: 600; font-size: 0.95rem; }
.tile .meta { color: var(--ink-dim); font-size: 0.78rem; margin: 2px 0 8px; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stat { flex: 1 1 130px; }
.stat .n { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat .k { color: var(--ink-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

.feed { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.feed li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.feed time { color: var(--ink-dim); font-variant-numeric: tabular-nums; flex: 0 0 62px; }
.feed .tag { flex: 0 0 auto; font-weight: 700; }
.feed .tag.ok { color: var(--good); }
.feed .tag.err { color: var(--bad); }
.muted { color: var(--ink-dim); font-size: 0.85rem; }
code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 6px; font-size: 0.85em; }
