/* Shofo contributor portal - white bg, brand purple, Space Grotesk */

:root {
  --purple: #9F1BFE;
  --purple-dark: #7d0fd1;
  --purple-tint: #f7edff;
  --ink: #1c1e21;
  --dim: #6a7178;
  --border: #e7e4ee;
  --surface: #ffffff;
  --surface-soft: #faf9fc;
  --green: #1e8e4b;
  --amber: #b26a00;
  --blue: #2467c7;
  --red: #c23c3a;
  --radius-card: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); text-decoration: none; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.btn-ghost {
  background: #efeff4;
  color: var(--ink);
  font-weight: 500;
  padding: 9px 20px;
  font-size: 14px;
}
.btn-ghost:hover { background: #e4e2ea; text-decoration: none; }

.btn-big { padding: 15px 36px; font-size: 17px; }

/* ---------- login page ---------- */

.login-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 24px 8px;
}

.login-card .logo { width: 56px; height: 56px; margin-bottom: 24px; }

.login-card h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.login-card .sub { color: var(--dim); margin-bottom: 32px; }

.login-card form { display: flex; flex-direction: column; gap: 14px; }

.code-input {
  font-family: inherit;
  font-size: 17px;
  text-align: center;
  letter-spacing: 0.06em;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.code-input::placeholder { color: #b4b0bf; letter-spacing: 0.06em; }
.code-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(159, 27, 254, 0.12);
}

.login-error {
  color: var(--red);
  font-size: 14px;
  min-height: 21px;
}

.login-foot {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

/* ---------- app shell (nav + page) ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
}

.nav .logo { width: 30px; height: 30px; }

.nav .brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav .brand:hover { text-decoration: none; }

.nav .spacer { flex: 1; }

.nav .navlink {
  color: var(--dim);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav .navlink:hover { color: var(--ink); text-decoration: none; }
.nav .navlink.active { color: var(--purple); }

.uid-chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.page h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 36px 0 6px;
}

.page .lede { color: var(--dim); margin-bottom: 36px; }






/* ---------- clips table ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.section-head .meta { color: var(--dim); font-size: 13.5px; }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow-x: auto;
}

table.clips {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

table.clips th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dim);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  white-space: nowrap;
}

table.clips td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.clips tr:last-child td { border-bottom: none; }

table.clips .clip-id { font-weight: 500; white-space: nowrap; }
table.clips .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.clips .note { color: var(--dim); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.badge.submitted .dot { background: #8b8797; }
.badge.reviewed .dot { background: var(--blue); }
.badge.payable .dot { background: var(--green); }
.badge.paid .dot { background: var(--purple); }
.badge.rejected .dot { background: var(--red); }
.badge.review .dot { background: var(--amber); }

.empty {
  text-align: center;
  color: var(--dim);
  padding: 48px 24px;
}
.empty .big { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* ---------- download page ---------- */

.steps { list-style: none; counter-reset: step; max-width: 720px; }

.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: none; }

.steps li::before {
  content: counter(step);
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple-tint);
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.steps .t { font-weight: 600; }
.steps .d { color: var(--dim); font-size: 14.5px; }

.callout {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--dim);
  font-size: 14.5px;
  max-width: 720px;
  margin-top: 28px;
}
.callout b { color: var(--ink); font-weight: 600; }

.callout.tip {
  background: var(--purple-tint);
  border-color: #ecd6ff;
  color: var(--ink);
  margin: 0 0 36px;
}

/* ---------- welcome (first run) ---------- */

.welcome-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 28px 28px;
}

.welcome-steps { max-width: none; margin-bottom: 22px; }
.welcome-steps li:last-child { border-bottom: 1px solid var(--border); }

/* ---------- admin ---------- */

.page-wide { max-width: 1320px; }

table.clips.compact th { padding: 11px 12px; }
table.clips.compact td { padding: 12px 12px; }

.add-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.add-card .t { font-weight: 700; margin-bottom: 10px; }
.add-card .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.add-card .err { color: var(--red); font-size: 14px; min-height: 0; margin-top: 6px; }
.add-card.ok { background: var(--purple-tint); border-color: #ecd6ff; }
.add-card.ok p { color: var(--dim); font-size: 14.5px; margin-bottom: 12px; }

.code-show {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  user-select: all;
}

.row-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.row-btn:hover { color: var(--ink); background: var(--surface-soft); }
.row-btn.danger:hover { color: var(--red); border-color: var(--red); }

.role-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-tint);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}
.role-chip.owner { color: #fff; background: var(--purple); }

.code-text { letter-spacing: 0.04em; white-space: nowrap; margin-right: 6px; }
.code-text.masked { color: var(--dim); }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 7px 1px;
  cursor: pointer;
  color: var(--dim);
  vertical-align: middle;
  margin-right: 4px;
}
.icon-btn:hover { color: var(--purple); border-color: var(--purple); }

/* ---------- misc ---------- */

.foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.skeleton { color: transparent; background: #efedf3; border-radius: 6px; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--purple-tint);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-small { padding: 7px 16px; font-size: 13.5px; font-weight: 600; }

@media (max-width: 760px) {
  .page h1 { font-size: 28px; }
  .nav { flex-wrap: wrap; }
}

/* ---------- simplicity redesign (2026-08-26) ----------
 * Merged home page, help card, recorder section, phone-first pass.
 * Everything here is scoped to body.contrib (login + home) or to the
 * clip-cards table so the admin page renders exactly as before. */

body.contrib { font-size: 17px; }

.login-card .code-input, .login-card .btn { min-height: 52px; }
.contrib .login-wrap { padding-bottom: 84px; }
.contrib .login-wrap .help-card { max-width: 420px; width: 100%; text-align: center; margin-top: 28px; }

.help-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin-top: 48px;
  max-width: 720px;
}

.recorder-section { margin-top: 64px; }
.recorder-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.callout.notwin {
  background: var(--purple-tint);
  border-color: #ecd6ff;
  color: var(--ink);
  margin: 0 0 18px;
}

.dl-cta { margin: 4px 0 28px; }
.dl-note { color: var(--dim); font-size: 14.5px; margin-top: 8px; }

.step-pic { margin: 12px 0 2px; max-width: 340px; }
.step-pic svg { display: block; width: 100%; height: auto; }
.pic-note { margin-top: 8px; }

.welcome-steps .t { font-size: 19px; }
.welcome-steps .d { font-size: 15px; }
.welcome-steps li { padding: 16px 0; }
.welcome-steps li::before { width: 34px; height: 34px; font-size: 16px; margin-top: 2px; }

/* phones: full-width buttons, big tap targets, no sideways scrolling */
@media (max-width: 620px) {
  .contrib .btn { width: 100%; min-height: 48px; }
  .contrib .nav .btn { width: auto; min-height: 48px; }
  .contrib .nav .navlink { padding: 12px 10px; }
  .contrib .page h1 { font-size: 26px; }
  .contrib .steps li { gap: 12px; }
  .contrib .note, .contrib .help-card { overflow-wrap: anywhere; }

  /* the home clips table becomes stacked cards, one card per clip */
  table.clip-cards thead { display: none; }
  table.clip-cards, table.clip-cards tbody { display: block; width: 100%; }
  table.clip-cards tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 3px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  table.clip-cards tr:last-child { border-bottom: none; }
  table.clip-cards td { display: block; border: none; padding: 0; }
  table.clip-cards td.c-date { order: 1; font-weight: 600; }
  table.clip-cards td.c-dur { order: 2; }
  table.clip-cards td.c-pay { order: 3; }
  table.clip-cards td.c-status { order: 4; margin-left: auto; }
  table.clip-cards td.c-note { order: 5; flex-basis: 100%; white-space: normal; }
  table.clip-cards td.c-id {
    order: 6;
    flex-basis: 100%;
    font-size: 12px;
    font-weight: 400;
    color: var(--dim);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ---------- paid-to-you stat + per-clip pay (Alex, 2026-08-26) ---------- */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 18px;
}
.page-head .ph-left .lede { margin-bottom: 6px; }
.page-head h1 { margin-bottom: 4px; }

/* desktop: the money is typography in the header row, not a floating card */
.paystat { text-align: right; }
.paystat .pv {
  font-size: 34px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.paystat .pl { font-size: 13.5px; font-weight: 600; margin-top: 1px; color: var(--ink); }

.c-pay .pend { color: var(--dim); font-weight: 400; }

/* phones: the header stacks and the money becomes a full-width tinted card */
@media (max-width: 620px) {
  .contrib .page-head { flex-direction: column; align-items: stretch; }
  .contrib .paystat {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--purple-tint);
    border: 1px solid #ecd6ff;
    border-radius: 16px;
    padding: 14px 22px;
  }
}

/* ---------- self-serve funnel (2026-08-26) ----------
 * Landing page, email sign-in, and the apply journey (stages 2-5).
 * Layout and copy follow the approved journey mock. Brand tokens stay
 * the set at the top of this file; a few tint literals come from the
 * mock (green/red circles) because they have no token yet. */

/* landing */
.land-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 84px;
  text-align: center;
}
.land-hero { width: 100%; max-width: 420px; }
.land-hero .logo { width: 56px; height: 56px; }
.land-hero .wordmark { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.land-hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 18px 0 6px; }

.lines { max-width: 330px; margin: 16px auto 8px; text-align: left; }
.line { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 16.5px; }
.line svg { flex: none; margin-top: 3px; }

.btn-hero {
  width: 100%;
  min-height: 58px;
  font-size: 18px;
  font-weight: 700;
  margin-top: 12px;
  box-shadow: 0 10px 24px rgba(159, 27, 254, 0.28);
}

.link-sub {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--purple);
  font-weight: 600;
  font-size: 15.5px;
  padding: 8px 0;
}

@media (min-width: 760px) {
  .land-hero { max-width: 860px; }
  .land-hero h1 { font-size: 40px; }
  .lines {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 860px;
    margin: 24px auto 8px;
  }
  .line { padding: 0; }
  .land-hero .btn-hero { width: auto; display: inline-flex; padding: 15px 44px; }
}

/* sign-in: email link section */
.or-line { color: var(--dim); font-size: 15px; margin: 30px 0 14px; }
.btn-mail { min-height: 52px; font-size: 15px; }
.magic-ok { color: var(--green); font-size: 14.5px; min-height: 21px; }
.magic-ok a { display: inline-block; margin-top: 4px; padding: 6px 0; }

/* apply journey */
.apply-page { max-width: 560px; }
.apply-page .nav { padding: 14px 0 4px; }
.apply-page .page-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 18px 0 16px;
}
.apply-lede { color: var(--dim); font-size: 17px; margin: -8px 0 22px; }
.app-state { max-width: 560px; margin: 0 auto; }

.field { margin-bottom: 18px; }
.field .lab { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 7px; }
.field .hint { color: var(--dim); font-size: 13.5px; margin-top: 6px; }

input.input, select.input {
  display: block;
  width: 100%;
  min-height: 54px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 17px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236a7178' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}
input.input:focus, select.input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(159, 27, 254, 0.12);
}
.field.missing input.input, .field.missing select.input, .field.missing .chip {
  border-color: var(--red);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.chip.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.apply-actions { margin-top: 6px; }
.apply-error { color: var(--red); font-size: 14.5px; min-height: 21px; margin-top: 10px; text-align: center; }
.btn-sub { text-align: center; color: var(--dim); font-size: 14px; margin-top: 10px; }

@media (min-width: 760px) {
  .apply-page, .apply-page #app-form-state { max-width: 880px; }
  .apply-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; }
  .apply-form .span2 { grid-column: 1 / -1; }
}

/* instant answer */
.result { text-align: center; padding-top: 14px; }
.bigcheck {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #e7f5ec;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 16px;
}
.bigcheck.wait { background: #f2f0f6; }
.bigcheck.no { background: #fdeeee; }
.result h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.result .sub { color: var(--dim); font-size: 16.5px; max-width: 320px; margin: 0 auto 20px; }

/* signing */
.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
  min-height: 56px;
  font-weight: 600;
  font-size: 16.5px;
  color: var(--ink);
}
a.doc:hover { border-color: var(--purple); text-decoration: none; }
.doc svg { flex: none; }
.doc .ds { display: block; color: var(--dim); font-size: 13.5px; font-weight: 500; margin-top: 1px; }

/* welcome aboard */
.dl-line { text-align: center; color: var(--dim); font-size: 16px; max-width: 330px; margin: 20px auto 4px; }
