/* TruLine QC -- Copyright (c) 2026 Truline QC LLC. All rights reserved. */
:root {
  --charcoal: #111827; --charcoal-2: #1F2937; --gray: #4B5563; --gray-light: #9CA3AF;
  --line: #E5E7EB; --bg: #F3F4F6; --green: #22C55E; --green-dark: #15803D; --red: #DC2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Archivo, system-ui, sans-serif; color: var(--charcoal); background: var(--bg); }
a { color: var(--green-dark); font-weight: 600; }
a:hover { color: #166534; }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.muted { margin: 4px 0 0; color: var(--gray); font-size: 15px; }
.small { font-size: 13px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand em { font-style: normal; font-weight: 500; color: var(--gray-light); }
.brand.dark { color: var(--charcoal); font-size: 26px; }
.brand.dark em { color: var(--gray); }

.shell { display: flex; min-height: 100vh; flex-wrap: wrap; }
.side { width: 232px; flex: 0 0 232px; background: var(--charcoal); padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.side .brand { padding: 0 8px 4px; }
.role { margin: 0 0 14px; padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.nav { padding: 12px; border-radius: 10px; color: #D1D5DB; font-size: 15px; font-weight: 500; text-decoration: none; }
.nav.on { background: var(--charcoal-2); color: #fff; font-weight: 600; }
.nav:hover { color: #fff; }
.grow { flex: 1; }
.who { margin: 0; padding: 0 12px; font-size: 14px; color: #D1D5DB; }
.who span { font-size: 13px; color: var(--gray-light); }
.link-btn { background: none; border: 0; padding: 10px 12px; color: #D1D5DB; font: inherit; font-size: 14px; cursor: pointer; }
.content { flex: 999 1 560px; min-width: 0; padding: 40px 48px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 760px) {
  .side { width: 100%; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .grow, .role, .who { display: none; }
  .content { padding: 24px 16px; }
}

.center-page { min-height: calc(100vh - 48px); background: var(--charcoal); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card { background: #fff; border-radius: 16px; padding: 22px; }
.auth { width: 100%; max-width: 420px; padding: 40px; display: flex; flex-direction: column; gap: 22px; border-radius: 18px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 14px; font-weight: 600; }
input, select { height: 46px; border-radius: 10px; border: 1.5px solid #D1D5DB; padding: 0 14px; font: inherit; font-size: 15px; color: var(--charcoal); background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green-dark); }
input.code { font-size: 24px; letter-spacing: 0.3em; text-align: center; }
.btn { height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn.green { background: var(--green); color: var(--charcoal); }
.btn.dark { background: var(--charcoal); color: #fff; justify-self: start; }
.flash { margin: 0; padding: 12px 16px; border-radius: 10px; background: #FEF3C7; color: #92400E; font-size: 15px; }
.preview-note { margin: 0; padding: 12px 16px; border-radius: 10px; background: #DCFCE7; color: #166534; font-size: 15px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.add-form { display: grid; gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 30px; font-weight: 800; }
.stat em { font-style: normal; font-size: 16px; font-weight: 500; color: var(--gray); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card:has(table) { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray); }
td { padding: 14px 8px; border-bottom: 1px solid var(--bg); }
.pill { display: inline-block; white-space: nowrap; line-height: 1.4; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill.ok { background: #DCFCE7; color: #166534; }
.drop { min-height: 260px; border: 2px dashed var(--gray-light); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.drop p { margin: 0; }
.legal { margin: 0; padding: 14px; text-align: center; font-size: 13px; color: var(--gray); background: var(--bg); }

/* step 2: maps */
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.linkbtn:hover { color: #fff; }
.drop.over { border-color: var(--green); background: #F0FDF4; }
.pill.pass { background: var(--green-dark); color: #fff; }
.pill.fail { background: var(--red); color: #fff; }
.pill.review { background: #FEF3C7; color: #92400E; }
.pill.wait { background: var(--line); color: #374151; }
.pill.busy { background: #DBEAFE; color: #1E40AF; }
.pill.err { background: #F3F4F6; color: #374151; border: 1px solid #D1D5DB; }
.small-pill { padding: 2px 8px; font-size: 12px; }
.fixed { color: var(--green-dark); }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.center-msg { text-align: center; padding: 48px 22px; }
.center-msg p { margin: 4px 0; }
.two-col { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.two-col > .card { flex: 999 1 420px; min-width: 0; }
.side-stack { flex: 1 1 300px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.issue { padding: 14px 16px; border-radius: 12px; background: #FEF2F2; margin-top: 10px; }
.issue.review { background: #FFFBEB; }
.issue.done { background: #F0FDF4; }
.issue p { margin: 0; }
.issue-title { font-weight: 700; font-size: 15px; margin-bottom: 4px !important; }
.spaced { margin-top: 24px; }
table.compact td, table.compact th { padding: 8px 6px; font-size: 14px; }
tr.bad td { color: var(--red); font-weight: 700; }
.scope { border: 1.5px solid var(--line); }
ul.checked { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
ul.checked li { padding: 6px 12px 6px 30px; border-radius: 999px; background: #F0FDF4; color: #166534; font-size: 14px; font-weight: 600; position: relative; }
ul.checked li::before { content: "✓"; position: absolute; left: 12px; }

/* step 3: crew */
.meter { margin-top: 8px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 8px; background: var(--green); }
.meter span.hot { background: #F59E0B; }
.warn { border: 2px solid #F59E0B; background: #FFFBEB; }
.warn p { margin: 0 0 4px; }
.link-btn.danger { color: var(--red); padding: 0; font-weight: 600; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
td.nowrap { white-space: nowrap; }

/* step 4: admin */
.viewas { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 10px 16px; background: #FEF3C7; color: #92400E; font-size: 15px; }
.small-btn { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.outline { background: #fff; border: 1.5px solid var(--charcoal); color: var(--charcoal); }
.green-link { color: var(--green-dark); padding: 0; font-weight: 600; }
td.actions { display: flex; flex-wrap: wrap; gap: 14px; }
tr.gone td { color: var(--gray-light); }
