/* Bahena Truckin careers site. Mobile-first. */
:root {
  --ink: #111; --ink-2: #2a2a2a; --muted: #666; --line: #e3e1dc; --bg: #fff; --bg-alt: #f6f4ef;
  --accent: #f2a900; --accent-ink: #111; --accent-dark: #c98a00; --danger: #b42318; --ok: #157347;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
code { background: #f1efe9; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }
.muted { color: var(--muted); font-size: .92em; }
[hidden] { display: none !important; }

/* Draft markers */
.draft-banner { background: #fff4cc; color: #5c4700; font-size: .85rem; padding: 8px 18px; text-align: center; border-bottom: 1px solid #f0d77a; }
.tbc { display: inline-block; background: #ffe066; color: #5c4700; border: 1px solid #e0b800; font: 700 .62rem/1 var(--font); letter-spacing: .06em; padding: 3px 5px; border-radius: 4px; vertical-align: middle; cursor: help; }
.tag { display: inline-block; background: #eee; color: #444; font: 700 .65rem/1 var(--font); letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; vertical-align: middle; }
.photo-placeholder { margin: 22px 0 0; padding: 26px; border: 2px dashed #d6cfbf; border-radius: var(--radius); text-align: center; color: #6b604a; background: #fbf9f4; }
.note { background: #fff8e1; border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; font-size: .95rem; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.brand img { display: block; width: 104px; height: auto; }
.nav { display: flex; align-items: center; gap: 16px; font-weight: 600; font-size: .95rem; }
.nav a:not(.btn) { text-decoration: none; }
.nav a:not(.btn):first-child, .nav-phone { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); font: 700 1rem/1.1 var(--font); padding: 12px 20px; border-radius: 999px; text-decoration: none; cursor: pointer; min-height: 46px; transition: transform .05s, background .15s; }
.btn:hover { background: #ffbc1f; color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: .9rem; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; min-height: 54px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-ghost-dark { background: #fff; color: var(--ink); border-color: #cfcac0; }
.btn-ghost-dark:hover { background: #f3f1ec; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-submit { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-submit:hover { background: #333; color: #fff; }
.link { background: none; border: 0; color: var(--danger); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; padding: 0; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #2b2b2b 0%, transparent 60%), repeating-linear-gradient(135deg, #121212 0 22px, #161616 22px 44px); color: #fff; }
.hero-inner { display: grid; gap: 18px; padding-top: 34px; padding-bottom: 44px; }
.hero-logo { width: 220px; opacity: .97; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin: 0 0 10px; }
.hero h1 { font-family: var(--display); font-weight: 900; }
.lead { font-size: 1.12rem; color: #e9e6df; max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 12px; }
.cta-row .btn { flex: 1 1 220px; }
.hero-note { color: #bdb8ad; font-size: .95rem; margin: 0; }
.hero-note a { color: #fff; font-weight: 700; }

/* Sections */
.section { padding: 46px 0; }
.section-alt { background: var(--bg-alt); }
.page-head { background: var(--bg-alt); padding: 34px 0 22px; border-bottom: 1px solid var(--line); }
.page-head.compact { padding: 24px 0 14px; }
.page-head.compact h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; box-shadow: var(--shadow); border-top: 4px solid var(--ink); }
.job-list { display: grid; gap: 10px; margin-bottom: 14px; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.job h3 { margin: 0 0 4px; }
.meta { color: var(--muted); margin: 0; font-size: .95rem; }
.job-detail { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.facts div { background: var(--bg-alt); padding: 10px 12px; border-radius: 8px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 12px; margin: 0 0 26px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--accent); font-weight: 900; display: grid; place-items: center; }
.steps strong { display: block; }
.steps span { color: var(--muted); }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; }

/* Footer */
.site-footer { background: #111; color: #d9d5cc; padding: 34px 0 18px; font-size: .95rem; }
.site-footer h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 18px; }
.footer-logo { width: 150px; }
.copyright { border-top: 1px solid #2c2c2c; margin-top: 18px; padding-top: 14px; color: #8d887d; font-size: .85rem; }

/* Flash */
.flash { padding: 12px 14px; border-radius: 8px; margin: 14px 0; }
.flash-ok { background: #e7f6ec; color: #0f5132; }
.flash-error { background: #fdecea; color: #7a1c13; }

/* Application form */
.app-wrap { max-width: 820px; padding-top: 18px; padding-bottom: 50px; }
.progress { height: 8px; background: #ece9e2; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.step-count { font-weight: 700; color: var(--muted); font-size: .9rem; margin: 8px 0 14px; }
form:not(.js) .progress, form:not(.js) ~ .step-count { display: none; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.step h3 { margin-top: 20px; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--accent); font-size: 1rem; flex: none; }
.field { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
.field input, .field select, .field textarea, .filters input, .filters select, .note-form textarea, .inline-form input {
  display: block; width: 100%; margin-top: 6px; font: 400 16px/1.3 var(--font); padding: 12px 12px; border: 1.5px solid #cfcac0; border-radius: 8px; background: #fff; color: var(--ink); min-height: 48px; }
.field textarea { min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(242,169,0,.35); border-color: var(--accent-dark); }
.field input:disabled { background: #f4f2ee; }
.invalid, .field .invalid, input.invalid, select.invalid, textarea.invalid { border-color: var(--danger) !important; }
label.invalid, fieldset.invalid { outline: 2px solid var(--danger); outline-offset: 3px; border-radius: 8px; }
.opt { font-weight: 400; color: var(--muted); font-size: .88em; }
.req { font-size: .72rem; background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.help { color: var(--ink-2); background: var(--bg-alt); padding: 10px 12px; border-radius: 8px; font-size: .95rem; }
.grid-2, .grid-3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks legend { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #cfcac0; border-radius: 999px; padding: 9px 14px; cursor: pointer; font-size: .95rem; min-height: 44px; user-select: none; }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; font-size: .97rem; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--ink); }
.check.strong { background: var(--bg-alt); padding: 12px; border-radius: 8px; }
.yesno { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; background: var(--bg-alt); padding: 12px; border-radius: 8px; }
.yesno legend { float: left; width: 100%; margin-bottom: 6px; font-weight: 600; }
.yesno label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; min-height: 36px; cursor: pointer; }
.yesno input { width: 20px; height: 20px; accent-color: var(--ink); }
.rep-row { border: 1px dashed #d6cfbf; border-radius: 8px; padding: 14px 12px 2px; margin-bottom: 12px; }
.rep-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rep-add { margin-bottom: 16px; }
.upload { display: block; border: 2px dashed #cfcac0; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; cursor: pointer; background: #fcfbf8; }
.upload.has-file { border-style: solid; border-color: var(--ok); background: #f1faf4; }
.upload-label { display: block; font-weight: 700; margin-bottom: 8px; }
.upload input { width: 100%; font-size: 15px; }
.upload-name { display: block; margin-top: 6px; color: var(--ok); font-weight: 600; font-size: .92rem; }
.disclosure { border: 2px solid var(--ink); border-radius: 8px; padding: 16px; max-height: 360px; overflow: auto; background: #fff; margin-bottom: 14px; font-size: .97rem; }
.review-box { background: var(--bg-alt); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.review-box dl, .kv { margin: 0; display: grid; gap: 6px; }
.review-box dl div, .kv div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; border-bottom: 1px solid #e9e5dc; padding: 5px 0; }
.review-box dt, .kv dt { color: var(--muted); font-size: .88rem; }
.review-box dd, .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 5; }
.step-nav .btn { flex: 1; }
form:not(.js) #prevBtn, form:not(.js) #nextBtn { display: none; }
.step-error { color: var(--danger); font-weight: 600; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error-list li { color: var(--danger); margin-bottom: 4px; }
.big-check { width: 80px; height: 80px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 44px; display: grid; place-items: center; margin: 0 auto 16px; }
.ref { font-family: ui-monospace, Menlo, monospace; background: var(--bg-alt); padding: 4px 8px; border-radius: 6px; }
.prose p { margin: 0 0 1em; }

/* Admin */
body.admin { background: #f4f3ef; font-size: 15px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; padding-bottom: 10px; flex-wrap: wrap; }
.admin-title { font-weight: 900; font-size: 1.25rem; text-decoration: none; }
.admin-actions { display: flex; gap: 8px; }
.inline { display: inline; }
.status-pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.pill { text-decoration: none; background: #fff; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; font-size: .85rem; }
.pill b { margin-left: 4px; }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select { margin: 0; min-height: 40px; padding: 8px 10px; font-size: 15px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eeebe4; vertical-align: top; font-size: .92rem; }
th { background: #faf9f6; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.applicants .name { font-weight: 800; }
.flags { min-width: 140px; }
.flag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 4px; margin: 0 3px 3px 0; white-space: nowrap; }
.flag.ok { background: #e7f6ec; color: #0f5132; }
.flag.warn { background: #fff4cc; color: #6b5200; }
.flag.bad { background: #fdecea; color: #8a1c12; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: #eee; white-space: nowrap; }
.s-new { background: #ffe9a8; } .s-reviewing { background: #dbe9ff; } .s-contacted { background: #e5dcff; }
.s-interview--road-test { background: #d6f3ff; } .s-offer { background: #d8f5e1; } .s-hired { background: #157347; color: #fff; }
.s-not-a-fit, .s-withdrawn { background: #eee; color: #666; }
.empty { background: #fff; border: 1px dashed var(--line); padding: 30px; text-align: center; border-radius: var(--radius); }
.detail-head { display: grid; gap: 12px; margin-bottom: 14px; }
.detail-head h1 { font-size: 1.8rem; margin-bottom: 4px; }
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-form { display: flex; gap: 8px; align-items: flex-end; background: #fff; border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius); }
.status-form .field { margin: 0; flex: 1; }
.status-form select { min-height: 40px; padding: 8px; }
.detail-grid { display: grid; gap: 14px; grid-template-columns: 1fr; padding-bottom: 40px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.panel h3 { font-size: .95rem; margin: 12px 0 4px; }
.panel.danger { border-color: #f1c6c1; }
.mini th, .mini td { font-size: .85rem; padding: 7px 8px; }
.docs { padding-left: 18px; } .docs li { margin-bottom: 8px; }
.notes { list-style: none; padding: 0; } .notes li { border-top: 1px solid #eeebe4; padding: 8px 0; }
.note-form { display: flex; gap: 8px; align-items: flex-start; } .note-form textarea { margin: 0; min-height: 44px; }
.inline-form { display: flex; gap: 8px; } .inline-form input { margin: 0; max-width: 220px; min-height: 38px; padding: 6px 10px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 420px; margin: 0 auto; box-shadow: var(--shadow); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 2fr 1.5fr 1fr 1fr auto; }
  .brand img { width: 132px; }
  .nav a:not(.btn):first-child { display: inline; }
  .step { padding: 26px 28px; }
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 340px 1fr; align-items: center; padding-top: 60px; padding-bottom: 70px; gap: 40px; }
  .hero-logo { width: 320px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1.4fr 1.4fr; }
  .nav-phone { display: inline !important; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .panel.wide { grid-column: 1 / -1; }
  .detail-head { grid-template-columns: 1fr auto; align-items: start; }
  .step-nav { position: static; border-top: 0; }
}
@media print {
  .site-header, .site-footer, .admin-bar, .status-form, .note-form, .danger, .draft-banner, .contact-row { display: none !important; }
  body.admin { background: #fff; }
}

/* Apply page: no sticky header or duplicate CTA; keeps the form in focus on phones */
.apply-page .site-header { position: static; }
.apply-page .nav .btn { display: none; }

/* Admin: dashboard nav + Jobs manager (mobile-first) */
.admin-nav { display: flex; gap: 6px; width: 100%; overflow-x: auto; }
.admin-nav a { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.admin-nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.jobs-admin { padding-bottom: 40px; }
.jobs-admin h1 { font-size: 1.7rem; margin-bottom: 4px; }
.jobs-head { display: grid; gap: 10px; margin: 6px 0 16px; }
.jobs-head .btn { width: 100%; }
.job-admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.job-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.job-card.is-closed { border-left-color: #aaa; background: #fafaf8; }
.job-card.is-closed .job-card-title { color: #666; }
.job-card-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.job-card-title { font-size: 1.12rem; font-weight: 800; margin: 0 0 4px; line-height: 1.25; word-break: break-word; }
.job-card p { margin: 0 0 2px; }
.small-meta { font-size: .85rem; }
.flag.closed { background: #e9e7e2; color: #555; }
.job-card-actions { display: grid; grid-template-columns: 1fr 1fr 48px 48px; gap: 8px; margin-top: 12px; }
.job-card-actions .inline { display: contents; }
.job-card-actions .btn { width: 100%; min-height: 44px; padding: 8px 6px; }
.job-card-actions .btn-del { grid-column: 1 / -1; color: var(--danger); border-color: #f1c6c1; }
.btn-icon { font-size: 1.2rem; }
.btn:disabled.btn-icon { opacity: .35; cursor: default; }
.jobs-foot { margin-top: 18px; }
.job-form { padding: 18px; }
.job-form textarea { min-height: 110px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-actions .btn { flex: 1 1 160px; }
.danger-box { border-color: #f1c6c1; }
.job-none { color: var(--ink-2); }
@media (min-width: 640px) {
  .jobs-head { grid-template-columns: 1fr auto; align-items: end; }
  .jobs-head .btn { width: auto; }
  .job-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
  .job-card-actions { margin-top: 0; grid-template-columns: auto auto 44px 44px auto; }
  .job-card-actions .btn-del { grid-column: auto; }
  .job-card-actions .btn { padding: 8px 14px; }
}
