/* Shift Origin Jobs — staff board and customer project pages.
   Brand tokens carried over from the main site: near-black, brick red, Hubot/Mona Sans. */

:root {
  color-scheme: dark;
  --black: #0d0d0d;
  --dark: #171717;
  --card: #1c1c1c;
  --card-hover: #232323;
  --border: #262626;
  --border-light: #3a3a3a;
  /* A brushed-metal rim: bright along the top edge, dim underneath, so boxes read as lit from above. */
  --silver: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.16) 18%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0.10) 82%,
    rgba(255, 255, 255, 0.22) 100%
  );
  --radius: 14px;
  --radius-sm: 10px;
  --red: #ff5520;
  --red-light: #ff7a51;
  --red-dim: rgba(255, 85, 32, 0.14);
  --white: #ffffff;
  --gray: #8f8f8f;
  --gray-light: #cfcfcf;
  --green: #4caf7a;
  --amber: #d9a441;
  --head: 'Hubot Sans', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 900; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.1; }
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.9rem; letter-spacing: 0.06em; }
p + p { margin-top: 0.75rem; }
.muted { color: var(--gray); }
.fine { color: var(--gray); font-size: 0.85rem; }
.pre { white-space: pre-wrap; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-light); }
.error { background: var(--red-dim); border-left: 3px solid var(--red); padding: 0.75rem 1rem; margin: 1rem 0; }

.wordmark { font-family: var(--head); font-weight: 900; font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wordmark em { font-style: normal; color: var(--red-light); }

/* Forms */
label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--gray-light); }
input, select, textarea {
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--white);
  background: var(--dark); border: 1px solid var(--border-light); border-radius: 0;
  padding: 0.8rem 0.9rem; width: 100%;
}
textarea { resize: vertical; min-height: 3rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red-light); }
:focus-visible { outline: 2px solid var(--red-light); outline-offset: 2px; }
input[type='datetime-local'] { color-scheme: dark; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.check { flex-direction: row; align-items: flex-start; gap: 0.7rem; font-weight: 400; font-size: 0.95rem; color: var(--white); }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; flex: none; accent-color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--head); font-weight: 900; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--white); background: var(--red); border: 1px solid var(--red);
  padding: 0.85rem 1.4rem; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--red-light); border-color: var(--red-light); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--border-light); }
.btn-ghost:hover { background: var(--card-hover); border-color: var(--gray); }
.btn-small { padding: 0.55rem 1rem; font-size: 0.75rem; }
.btn-big { padding: 1.1rem 1.6rem; font-size: 0.95rem; width: 100%; }
.link-btn { background: none; border: 0; color: var(--gray); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--white); }

.flash { background: #15241b; border-left: 3px solid var(--green); padding: 0.8rem 1.25rem; font-size: 0.95rem; }
.admin .flash { margin: 0; }

/* Starter-message chips */
.suggest { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.78rem; color: var(--gray); margin-bottom: -0.35rem; }
.chip { font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--gray-light); background: var(--card); border: 1px solid var(--border-light); padding: 0.35rem 0.7rem; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.chip:hover { border-color: var(--red-light); color: var(--white); }

/* Tags */
.tag, .pill { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.5rem; border: 1px solid var(--border-light); color: var(--gray-light); white-space: nowrap; }
.tag-hot, .tag-changes { background: var(--red-dim); border-color: var(--red); color: #f0b5b5; }
.tag-approved { border-color: var(--green); color: var(--green); }
.tag-sent, .tag-date { border-color: var(--amber); color: var(--amber); }
.pill { font-size: 0.75rem; padding: 0.3rem 0.7rem; background: var(--card); }

/* ── Auth ── */
body.auth { display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 26rem; background: var(--dark); border: 1px solid var(--border); border-top: 3px solid var(--red); padding: 2.25rem 2rem; display: flex; flex-direction: column; gap: 1rem; }

/* ── Admin shell ── */
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: 0.9rem 1.5rem; background: var(--dark); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-brand { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; }
.topbar-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.topbar-nav { display: flex; gap: 1.25rem; margin-right: auto; }
.topbar-nav a { text-decoration: none; font-size: 0.9rem; font-weight: 600; color: var(--gray-light); }
.topbar-nav a:hover { color: var(--white); }
.topbar-user { display: flex; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: var(--gray); }
.wrap { padding: 1.75rem 1.5rem 4rem; }
.narrow { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin-right: auto; }
.search input { width: min(20rem, 60vw); padding: 0.65rem 0.9rem; }
.panel { background: var(--dark); border: 1px solid var(--border); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }

/* Board */
/* Two rows of four: discovery through production on top, V1 through On the plan underneath. */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 64rem) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .board { grid-template-columns: 1fr; } }
.col { background: var(--dark); border: 1px solid var(--border); border-top: 3px solid var(--border-light); min-height: 17rem; display: flex; flex-direction: column; }
@media (max-width: 36rem) { .col { min-height: 0; } }
.col-ours { border-top-color: var(--red); }
.col-head { padding: 0.9rem 0.9rem 0.75rem; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.5rem; align-items: center; border-bottom: 1px solid var(--border); }
.col-head h2 { font-size: 0.82rem; }
.col-head p { grid-column: 1 / -1; font-size: 0.75rem; color: var(--gray); }
.col-count { font-family: var(--head); font-weight: 900; font-size: 0.85rem; color: var(--gray); }
.col-ours .col-count { color: var(--red-light); }
.col-body { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.col-empty { font-size: 0.8rem; color: #555; text-align: center; padding: 1.5rem 0; }
.card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.8rem 0.85rem; background: var(--card); border: 1px solid var(--border); text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.card:hover { background: var(--card-hover); border-color: var(--red); }
.card-name { font-weight: 700; }
.card-co { font-size: 0.85rem; color: var(--gray-light); }
.card-svc { font-size: 0.8rem; color: var(--gray); }
.card-foot { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.5rem; }
.card-age { margin-left: auto; font-size: 0.75rem; color: var(--gray); }

/* Drag and drop */
.card[draggable='true'] { cursor: grab; }
.card.dragging { opacity: 0.35; }
.col.drop-over { border-color: var(--red-light); background: #171010; }
.dropzones { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 0.75rem; }
.dropzone { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.8rem 1.1rem; border: 1.5px dashed var(--border-light); color: var(--gray); font-size: 0.8rem; min-width: 16rem; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.dropzone strong { font-size: 0.85rem; color: var(--gray-light); }
body.is-dragging .dropzone { border-color: var(--gray); color: var(--gray-light); }
.dropzone.drop-over { border-color: var(--red-light); background: var(--red-dim); color: var(--white); }
@media (hover: none) { .dropzones { display: none; } }
.panel-danger { border-color: #4a1f1f; }
.btn-danger { background: transparent; border-color: var(--red); color: #f0b5b5; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* Job detail */
.job-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.back { width: 100%; font-size: 0.85rem; color: var(--gray); text-decoration: none; }
.back:hover { color: var(--white); }
.job-sub { margin: 0.35rem 0 1.5rem; color: var(--gray-light); }
.job-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr); gap: 1.25rem; align-items: start; }
.job-main, .job-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 60rem) { .job-grid { grid-template-columns: 1fr; } }
.next { background: var(--dark); border: 1px solid var(--border); border-top: 3px solid var(--red); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.next h2 { font-size: 1.5rem; }
.next .sub { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 1rem; }
.phone { font-family: var(--head); font-weight: 900; font-size: 1.6rem; color: var(--white); text-decoration: none; letter-spacing: 0.02em; }
.phone:hover { color: var(--red-light); }
summary { cursor: pointer; font-size: 0.88rem; color: var(--gray-light); font-weight: 600; }
details[open] > summary { margin-bottom: 1rem; }
.quote { border-left: 3px solid var(--red); background: var(--card); padding: 0.9rem 1rem; white-space: pre-wrap; }
.quote span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin-bottom: 0.35rem; }
.copy { display: flex; gap: 0.5rem; }
.copy input { font-size: 0.85rem; color: var(--gray-light); text-overflow: ellipsis; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; font-size: 0.95rem; }
.facts dt { color: var(--gray); font-size: 0.8rem; padding-top: 0.15rem; }
.facts dd { min-width: 0; overflow-wrap: anywhere; }

.note-form { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; }
.timeline { list-style: none; display: flex; flex-direction: column; }
.tl { padding: 0.85rem 0 0.85rem 1rem; border-left: 2px solid var(--border); position: relative; }
.tl::before { content: ''; position: absolute; left: -0.3rem; top: 1.25rem; width: 0.5rem; height: 0.5rem; background: var(--border-light); border-radius: 50%; }
.tl-note::before { background: var(--white); }
.tl-customer::before { background: var(--red-light); }
.tl-customer { border-left-color: var(--red); }
.tl-head { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.75rem; color: var(--gray); align-items: baseline; }
.tl-kind { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tl-note .tl-kind { color: var(--white); }
.tl-customer .tl-kind { color: var(--red-light); }
.tl p { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-activity p, .tl-email p { color: var(--gray-light); font-size: 0.9rem; }

/* Files */
.files { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.files li { display: flex; align-items: center; gap: 0.75rem; background: var(--card); border: 1px solid var(--border); padding: 0.55rem 0.75rem; position: relative; overflow: hidden; }
.file-link { display: flex; align-items: center; gap: 0.65rem; min-width: 0; flex: 1; text-decoration: none; }
.file-link:hover .file-name { text-decoration: underline; }
.file-ext { flex: none; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--red-dim); color: #f0b5b5; padding: 0.2rem 0.35rem; min-width: 2.4rem; text-align: center; }
.file-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.file-meta { flex: none; font-size: 0.78rem; color: var(--gray); }
.uploaded .file-meta { color: var(--green); }
.upload-failed .file-meta { color: #f08c8c; }
.bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--red-light); transition: width 0.2s; }
.uploaded .bar { width: 100% !important; background: var(--green); }
.uploader { display: flex; flex-direction: column; gap: 0.5rem; }
.drop { align-items: center; text-align: center; gap: 0.25rem; padding: 1.5rem 1rem; border: 1.5px dashed var(--border-light); background: var(--dark); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop:hover, .drop.over { border-color: var(--red-light); background: var(--red-dim); }
.drop strong { font-size: 0.95rem; color: var(--white); }
.drop span { font-size: 0.8rem; font-weight: 400; color: var(--gray); }
.proof-round { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.proof-round:first-of-type { border-top: 0; padding-top: 0; }
.proof-round-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.proof-round-head time { color: var(--gray); font-size: 0.78rem; margin-left: auto; }

/* Team, tables */
.team { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.team li { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; background: var(--dark); border: 1px solid var(--border); padding: 0.8rem 1rem; }
.team-who { margin-right: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.team-email { width: 100%; font-size: 0.88rem; }
.team-manage { width: 100%; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.team-manage > .stack { max-width: 26rem; gap: 1.25rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-light); }
.table td { padding: 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }

/* ── Customer portal ── */
.portal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.portal-logo { height: 3rem; width: auto; }
.portal-tag { margin: 0 auto 0 0.9rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-light); }
.portal-phone { font-family: var(--head); font-weight: 900; text-decoration: none; letter-spacing: 0.03em; }
.portal-wrap { max-width: 42rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
.portal-wrap h1 { font-size: clamp(2rem, 7vw, 3rem); }
.portal-foot { text-align: center; padding: 2rem 1.25rem 3rem; font-size: 0.8rem; color: var(--gray); border-top: 1px solid var(--border); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); margin: 0.5rem 0; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; position: relative; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #666; text-align: center; }
.steps li::before { content: ''; position: absolute; top: 0.9rem; right: 50%; width: 100%; height: 2px; background: var(--border-light); }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--red); }
.dot { position: relative; z-index: 1; width: 1.85rem; height: 1.85rem; border-radius: 50%; display: grid; place-items: center; background: var(--black); border: 2px solid var(--border-light); font-size: 0.8rem; font-weight: 700; }
.steps .done .dot { background: var(--red); border-color: var(--red); color: var(--white); }
.steps .now .dot { border-color: var(--red-light); color: var(--white); box-shadow: 0 0 0 4px var(--red-dim); }
.steps .done, .steps .now { color: var(--white); }
@media (max-width: 30rem) { .steps li:not(.now) .step-label { visibility: hidden; } .steps li.now .step-label { white-space: nowrap; } }

.stagebox { background: var(--dark); border: 1px solid var(--border); border-top: 3px solid var(--red); padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
.stagebox h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
.stagebox a:not(.btn) { color: var(--red-light); }
.guide { background: var(--card); border: 1px solid var(--border); padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; font-size: 0.95rem; }
.formats { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.formats li { display: grid; grid-template-columns: 3.6rem 1fr; gap: 0.1rem 0.75rem; align-items: baseline; border-left: 3px solid; padding-left: 0.75rem; }
.formats span { grid-row: span 2; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.formats em { font-style: normal; font-size: 0.85rem; color: var(--gray); }
.fmt-best { border-color: var(--green); } .fmt-best span { color: var(--green); }
.fmt-ok { border-color: var(--amber); } .fmt-ok span { color: var(--amber); }
.fmt-avoid { border-color: var(--red-light); } .fmt-avoid span { color: var(--red-light); }
.proof-files { display: flex; flex-direction: column; gap: 0.75rem; }
.proof-img { display: block; background: #fff; border: 1px solid var(--border-light); }
.proof-img img { display: block; width: 100%; height: auto; }
.decide { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.decide form { background: var(--card); border: 1px solid var(--border); padding: 1.1rem; justify-content: space-between; }
.decide-yes { border-color: var(--red) !important; }
.portal-extra { border: 1px solid var(--border); padding: 1rem 1.25rem; }
.portal-extra[open] { display: flex; flex-direction: column; gap: 1rem; }

.stars { border: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.25rem; }
.stars legend { font-size: 0.82rem; font-weight: 600; color: var(--gray-light); margin-bottom: 0.4rem; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 2.6rem; line-height: 1; color: #3a3a3a; cursor: pointer; transition: color 0.1s; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--amber); }
.stars input:focus-visible + label { outline: 2px solid var(--red-light); }

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


/* ── Metal-rimmed boxes ─────────────────────────────
   The border is a gradient rather than a flat line: two background layers, the card colour clipped to the
   padding box and the silver clipped to the border box, so the 1px edge shows the gradient through it.
   Keeps working on a transparent border, which is why every box below sets border-color transparent. */
.panel,
.col,
.card,
.next,
.stagebox,
.guide,
.portal-extra {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background-image: linear-gradient(var(--dark), var(--dark)), var(--silver);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Cards sit on top of a column, so they are a shade lighter and a touch tighter. */
.card {
  border-radius: var(--radius-sm);
  background-image: linear-gradient(var(--card), var(--card)), var(--silver);
}
.card:hover {
  background-image: linear-gradient(var(--card-hover), var(--card-hover)), var(--silver);
  border-color: transparent;
}
.guide {
  background-image: linear-gradient(var(--card), var(--card)), var(--silver);
}

/* The coloured top bar still marks whose move it is; it paints over the rim rather than replacing it. */
.col { border-top-width: 3px; border-top-color: var(--border-light); }
.col-ours { border-top-color: var(--red); }
.next,
.stagebox { border-top-width: 3px; border-top-color: var(--red); }
.decide-yes { border-color: var(--red) !important; }

/* Drag target has to stay obvious through the new rim. */
.col.drop-over {
  border-color: var(--red-light);
  background-image: linear-gradient(#1a1211, #1a1211), var(--silver);
}

/* Round off the pieces that sit inside a rounded box. */
.col-head { border-top-left-radius: calc(var(--radius) - 1px); border-top-right-radius: calc(var(--radius) - 1px); }
.btn, input, select, textarea { border-radius: var(--radius-sm); }

/* Pull the quote button to the end of the job header row. */
.job-quote { margin-left: auto; }
