/* Hidden me — a darkroom, not a dashboard.
   Neutral dark so photographs read true; safelight red reserved for anything
   destructive or anything the client needs to notice; light-table blue for
   progress and focus. One family, tabular figures, hairlines instead of cards. */

:root {
  --base:      #0F1216;
  --surface:   #171B21;
  --raise:     #1F242C;
  --line:      #2B323C;
  --text:      #E8EAED;
  --dim:       #8C95A3;
  --safelight: #C0453C;
  --light:     #86B3D1;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --pad: 20px;
  --tap: 46px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--light); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 2px;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 17px; }
h3 { font-size: 16px; }

.muted { color: var(--dim); font-size: 14px; }
.lede  { font-size: 17px; line-height: 1.5; margin: 0 0 12px; }

/* ---------- entry pages ---------- */

.entry {
  max-width: 360px;
  margin: 0 auto;
  padding: 56px var(--pad) 64px;
}

.mark {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.mark--sm { font-size: 16px; color: var(--text); }

.entry__mark { margin-bottom: 36px; }
.mark__sub { margin: 6px 0 0; color: var(--dim); font-size: 14px; max-width: 30ch; }

.entry__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  font-size: 14px;
}

/* ---------- forms ---------- */

.stack { display: flex; flex-direction: column; gap: 18px; }

.field { display: block; }
.field > span { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.field small { display: block; margin-top: 6px; font-size: 13px; color: var(--dim); }

input[type=email], input[type=password], input[type=text], input:not([type]) {
  width: 100%;
  min-height: var(--tap);
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font: inherit;
}
input:focus { border-color: var(--light); outline: none; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--light); flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 18px;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font: 600 15px/1 var(--sans);
  cursor: pointer;
}
.btn:hover { background: #262C36; text-decoration: none; }
.btn--go { background: var(--text); color: var(--base); border-color: var(--text); }
.btn--go:hover { background: #fff; }
.btn--wide { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn--quiet { background: none; }
.btn--danger { color: var(--safelight); border-color: rgba(192, 69, 60, .5); background: none; }
.btn--danger:hover { background: rgba(192, 69, 60, .12); }
.btn.is-off { opacity: .45; pointer-events: none; }

.linkbtn {
  background: none; border: 0; color: var(--light);
  font: inherit; font-size: 14px; cursor: pointer; padding: 8px 0;
}

/* ---------- notices ---------- */

.notice {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}
.notice--bad  { border-color: var(--safelight); }
.notice--warn { border-color: #C98A3C; }
.notice--good { border-color: var(--light); }

/* ---------- client chrome ---------- */

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 var(--pad);
  background: var(--base);
  border-bottom: 1px solid var(--line);
}
.top__nav { display: flex; gap: 16px; font-size: 14px; }
.top__nav a { color: var(--dim); }
.top__nav a[aria-current] { color: var(--text); }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px var(--pad);
  background: var(--safelight);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}
.banner__exit { color: #fff; text-decoration: underline; white-space: nowrap; font-weight: 600; }

/* ---------- the contact sheet ---------- */

.sheetwrap { padding-bottom: 96px; }

.count {
  margin: 0;
  padding: 12px var(--pad);
  font-size: 13px;
  color: var(--dim);
}

.sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (min-width: 620px) { .sheet { grid-template-columns: repeat(5, 1fr); } }

.tile {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__blank { color: var(--line); font-size: 22px; }
.tile__play {
  position: absolute; right: 6px; bottom: 4px;
  font-size: 11px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

.empty { padding: 48px var(--pad); color: var(--dim); font-size: 15px; }

/* ---------- upload dock ---------- */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--base) 62%, rgba(15,18,22,0));
}
.dock--ro { text-align: center; color: var(--dim); font-size: 13px; }

.queue {
  position: fixed; left: 0; right: 0; bottom: 76px; z-index: 6;
  max-height: 42vh; overflow: auto;
  padding: 0 var(--pad);
}
.job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  background: var(--base);
}
.job__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job__pct { color: var(--dim); }
.job__bar { grid-column: 1 / -1; height: 2px; background: var(--line); }
.job__bar span { display: block; height: 100%; background: var(--light); transition: width .2s; }
.job.is-bad .job__bar span { background: var(--safelight); }
.job__retry { grid-column: 1 / -1; justify-self: start; }

/* ---------- lightbox ---------- */

.lightbox { padding: 0 0 40px; }
.lightbox__stage {
  background: #000;
  display: grid;
  place-items: center;
  min-height: 46vh;
}
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: 74vh; display: block; }
.lightbox__meta { padding: 12px var(--pad) 0; color: var(--dim); font-size: 13px; margin: 0; }
.lightbox__acts {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 14px var(--pad);
}

/* ---------- account & admin pages ---------- */

.page { max-width: 640px; margin: 0 auto; padding: 20px var(--pad) 56px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 28px; font-size: 15px; }
.facts dt { color: var(--dim); font-size: 14px; }
.facts dd { margin: 0; }

.block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 28px; }
.block h2 { margin-bottom: 8px; }
.block .stack { margin-top: 14px; }
.block--end { border-top-color: rgba(192, 69, 60, .4); }

.log { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }
.log li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.log time { color: var(--dim); white-space: nowrap; }

.signout { margin-top: 32px; }

.meter { margin-bottom: 22px; }
.meter p { margin: 0 0 8px; font-size: 14px; color: var(--dim); }
.meter__bar { height: 2px; background: var(--line); }
.meter__bar span { display: block; height: 100%; background: var(--light); }
.meter__bar span.is-high { background: var(--safelight); }

.search { display: flex; gap: 8px; margin-bottom: 24px; }
.search input { flex: 1; }

.client { border-top: 1px solid var(--line); padding: 18px 0; }
.client h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.client header p { margin: 2px 0 0; }
.client__facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 14px 0; }
.client__facts div { display: flex; gap: 6px; align-items: baseline; }
.client__facts dt { color: var(--dim); font-size: 13px; }
.client__facts dd { margin: 0; font-size: 14px; }
.client__acts { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-style: normal; font-size: 11px; font-weight: 400;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--dim);
}
.tag--off { color: var(--safelight); border-color: rgba(192, 69, 60, .45); }

.adminpage h2 { margin: 26px 0 12px; }

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