/* ═══════════════════════════════════════════════════════════════════
   Scoutmote · Fotolopp stylesheet
   Mobile-first. Web-safe fonts only. Light mode.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --paper:    #F6F2EA;
  --paper-2:  #EFE9DC;
  --white:    #FFFFFF;
  --ink:      #111111;
  --ink-2:    #2A2A28;
  --muted:    #7A766F;
  --hairline: #E2DCCD;
  --accent:   #E4345A;
  --accent-soft: rgba(228,52,90,0.10);
  --ok:       #3F7A4E;
  --no:       #A93434;

  --serif:    Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:     ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ─── layout ───────────────────────────────────────────────────── */

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 18px 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page--login, .page--profile { gap: 22px; min-height: 100vh; }

.appbar {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 18px 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.appbar__title strong { font-size: 17px; letter-spacing: -0.01em; }

.masthead { padding: 24px 0 6px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.005em;
}
.display em { font-style: italic; color: var(--accent); font-weight: 500; }

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

.alert {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
}

/* ─── cards ────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card--countdown {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
  align-items: flex-start;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.card--countdown::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.card--countdown .eyebrow { color: rgba(255,255,255,0.55); }
.card--countdown .muted   { color: rgba(255,255,255,0.55); font-size: 13px; }
.countdown {
  font-family: var(--serif);
  font-style: italic;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.card--upload .upload { display: flex; flex-direction: column; gap: 12px; }

/* ─── form bits ────────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: 12px; }
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.input, select, .input--time {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.input--code {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 18px 14px;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.btn {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 100ms ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--ghost   { background: transparent; }
.btn--small   { padding: 8px 12px; font-size: 13px; border-radius: var(--r-md); }
.btn--ok      { background: var(--ok); color: var(--white); border-color: var(--ok); }
.btn--no      { background: var(--no); color: var(--white); border-color: var(--no); }
.btn .arrow   { font-family: var(--mono); }

.link {
  background: none; border: none;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.row .input { flex: 1 1 200px; }
.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* photo picker (the camera/file input wrapper) */
.photo-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px dashed var(--hairline);
  border-radius: var(--r-md);
  cursor: pointer;
}
.photo-pick input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.photo-pick__btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.photo-pick__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── pills ────────────────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px 2px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-weight: 600;
  margin-right: 6px;
}
.pill--ok      { background: rgba(63,122,78,0.12);  color: var(--ok); }
.pill--no      { background: rgba(169,52,52,0.12);  color: var(--no); }
.pill--loc     { background: var(--accent-soft);    color: var(--accent); }
.pill--mission { background: rgba(80,80,80,0.10);   color: var(--ink-2); }
.pill--hit     { background: rgba(200,162,78,0.18); color: #8a6a25; }

/* ─── route list ───────────────────────────────────────────────── */

.route { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.route li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.route li:first-child { border-top: none; padding-top: 0; }
.route__pos {
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
  align-self: center;
}
.route__name    { font-weight: 600; }
.route__mission { font-size: 13px; color: var(--ink-2); }

/* ─── submission list ──────────────────────────────────────────── */

.sub-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sub {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.sub__thumb {
  display: block;
  width: 56px; height: 56px;
  background: var(--paper-2) center/cover no-repeat;
  border-radius: var(--r-sm);
}
.sub__kind {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sub__subject { font-size: 14px; font-weight: 500; }
.sub__status  { margin-top: 4px; }

/* ─── admin: teams table ───────────────────────────────────────── */

.teams {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.teams th, .teams td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.teams th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.teams code {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.input--time { padding: 8px 10px; font-size: 13px; }

@media (max-width: 480px) {
  .teams thead { display: none; }
  .teams, .teams tbody, .teams tr, .teams td { display: block; width: 100%; }
  .teams tr { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  .teams td { border: none; padding: 2px 0; }
  .teams td:first-child { font-weight: 600; font-size: 15px; }
}

/* ─── admin: rate cards ────────────────────────────────────────── */

.rate-grid { display: flex; flex-direction: column; gap: 14px; }
.rate {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: stretch;
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}
.rate-grid > .rate:first-child { border-top: none; padding-top: 0; }
.rate__photo {
  display: block;
  width: 96px; height: 96px;
  background: var(--paper-2) center/cover no-repeat;
  border-radius: var(--r-md);
}
.rate__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rate__meta { font-size: 13px; }
.rate__subject { font-size: 14px; line-height: 1.3; }
.rate__actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 4px;
}
.check {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 12px; color: var(--muted);
  margin-right: auto;
}
