/* TFP Nutrition HR portal. Colors and fonts match the feed ordering portal. */
:root {
    --brand-blue: #1B4B9B;
    --brand-blue-dark: #123A7D;
    --brand-red: #C41230;
    --ink: #1C2434;
    --muted: #5B6472;
    --paper: #F5F6F8;
    --card: #FFFFFF;
    --line: #DDE1E8;
    --ok: #1E7B34;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font: 16px/1.5 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}
h1, h2, h3 { font-family: "Barlow Condensed", "Barlow", sans-serif; line-height: 1.2; }
h1 { font-size: 28px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 6px; }
a { color: var(--brand-blue); }

/* Header: white bar, logo left, red rule underneath (same as the feed portal). */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 10px 16px;
    background: var(--card);
    border-bottom: 3px solid var(--brand-red);
}
.brand img { display: block; height: 44px; width: auto; }
@media (max-width: 480px) { .brand img { height: 34px; } }
.header-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-weight: 600; }
.header-links a { text-decoration: none; }
.header-links .who { color: var(--muted); font-weight: 400; }
form.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand-blue); cursor: pointer; }

.page { max-width: 1120px; margin: 0 auto; padding: 20px 16px 40px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.narrow { max-width: 440px; margin: 24px auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* Forms */
label.f { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date],
input[type=number], select, textarea {
    width: 100%;
    font: inherit;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid #C8CFDB;
    border-radius: 8px;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid #C9D8F5; border-color: var(--brand-blue); }
.err { display: block; font-size: 13px; color: var(--brand-red); margin-top: 4px; }
.alert { background: #FDE8EB; color: #8A0D22; border-radius: 8px; padding: 10px 12px; }

.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    min-height: 44px;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.btn.primary { background: var(--brand-blue); color: #fff; }
.btn.primary:hover { background: var(--brand-blue-dark); }
.btn.full { width: 100%; margin-top: 18px; }
.btn.secondary { background: #EEF2F8; color: var(--brand-blue); }

.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
label.check { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-weight: 600; }
label.check input { width: 18px; height: 18px; }
input.code { font-size: 24px; letter-spacing: 6px; text-align: center; }
.alt-methods { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; text-align: center; font-size: 15px; }
.ok-note { background: #E6F4EC; color: var(--ok); border-radius: 8px; padding: 10px 12px; }

.mt { margin-top: 10px; }
.nowrap { white-space: nowrap; }
.card.tile-link { text-decoration: none; color: inherit; }
.card.tile-link:hover { box-shadow: 0 0 0 2px var(--brand-blue); }

/* HR pages */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.subnav a { padding: 6px 12px; border-radius: 99px; text-decoration: none; background: #EEF2F8; font-weight: 600; font-size: 14px; }
.subnav a.on { background: var(--brand-blue); color: #fff; }
.search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 520px; }
.search input { flex: 1; }
.form-card h2 { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.form-card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 14px; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; } .c12 { grid-column: span 12; }
@media (max-width: 700px) { .c2, .c3, .c4, .c6 { grid-column: span 12; } }
label.check.align-field { margin-top: 38px; }
@media (max-width: 700px) { label.check.align-field { margin-top: 14px; } }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.side { display: grid; gap: 16px; }
.side form { margin: 0; }
.side .btn.full { margin-top: 10px; }
ul.steps { list-style: none; padding: 0; margin: 0 0 8px; }
ul.steps li { padding: 4px 0 4px 26px; position: relative; }
ul.steps li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #B9C2D3; }
ul.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
table.tbl.compact td { padding: 5px 4px; font-size: 13px; }
table.tbl th.num, table.tbl td.num { text-align: right; white-space: nowrap; }
dl.facts { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0 0 12px; font-size: 15px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
table.tbl select { max-width: 100%; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #EEF1F6; color: var(--muted); white-space: nowrap; margin: 1px 2px; vertical-align: middle; }
.pill.ok { background: #E6F4EC; color: var(--ok); }
.pill.warn { background: #FFF4E0; color: #9A5B00; }
.pill.bad { background: #FDE8EB; color: var(--brand-red); }
h1 .pill { font-family: "Barlow", sans-serif; font-size: 13px; }
progress.mini { width: 100px; height: 8px; border: 0; border-radius: 99px; background: #E8ECF3; overflow: hidden; vertical-align: middle; }
progress.mini::-webkit-progress-bar { background: #E8ECF3; }
progress.mini::-webkit-progress-value { background: var(--ok); }
progress.mini::-moz-progress-bar { background: var(--ok); }
button.pill { border: 0; cursor: pointer; font-family: inherit; }
button.pill:hover { box-shadow: 0 0 0 2px var(--brand-blue); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.danger { background: var(--brand-red); color: #fff; }
a.danger-link { color: var(--brand-red); font-weight: 600; margin-left: 8px; }
table.tbl input[type=text], table.tbl select { min-height: 36px; padding: 6px 8px; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=text] { min-height: 36px; padding: 6px 8px; }

/* ---- Onboarding (employee) ---- */
.hidden { display: none !important; }
.onb { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .onb { grid-template-columns: minmax(0, 1fr); } }
.onb-steps { position: sticky; top: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.onb-steps .back { display: block; margin-bottom: 8px; font-weight: 600; text-decoration: none; }
.onb-steps ol, ol.section-list { list-style: none; margin: 0; padding: 0; }
.onb-steps li a, ol.section-list li a { display: block; padding: 6px 8px 6px 30px; border-radius: 8px; text-decoration: none; color: var(--ink); position: relative; font-size: 15px; }
.onb-steps li a::before, ol.section-list li a::before { content: ""; position: absolute; left: 6px; top: 9px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #B9C2D3; }
.onb-steps li.done a::before, ol.section-list li.done a::before { background: var(--ok); border-color: var(--ok); }
.onb-steps li.on a { background: #EEF2F8; font-weight: 700; }
@media (max-width: 860px) {
    .onb-steps { position: static; }
    .onb-steps ol { display: flex; overflow-x: auto; gap: 4px; }
    .onb-steps li a { white-space: nowrap; font-size: 13px; }
}
.onb-card h1 { margin-top: 0; }
.onb-card h2 { margin-top: 22px; }
.step-of { font-size: 13px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.actions.spread, .spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.choices { display: grid; gap: 8px; margin: 6px 0; }
.row-choices { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
label.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--brand-blue); background: #F2F6FD; }
label.choice input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
label.agree { display: flex; gap: 10px; align-items: flex-start; background: #F2F6FD; padding: 10px 12px; border-radius: 8px; margin-top: 10px; font-weight: 600; }
label.agree input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.note { border-left: 4px solid var(--brand-blue); background: #F2F6FD; padding: 10px 12px; border-radius: 6px; font-size: 15px; }
.note.warn { border-color: #E0A000; background: #FFF4E0; }
.legal { font-size: 15px; background: #FAFBFC; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.legal-block { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; background: #FAFBFC; }
.legal-caps { font-weight: 600; text-decoration: underline; font-size: 14px; }
.calc { background: #F6F8FB; border: 1px dashed #C3CCDB; border-radius: 10px; padding: 12px; }
.big-date { font-family: "Barlow Condensed", sans-serif; font-size: 24px; color: var(--brand-red); }
details.pol { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; overflow: hidden; }
details.pol > summary { list-style: none; padding: 12px 14px; display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 700; }
details.pol > summary::-webkit-details-marker { display: none; }
details.pol > summary::before { content: "▸"; color: var(--muted); }
details.pol[open] > summary::before { content: "▾"; }
details.pol > summary .chk { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
details.pol.ack > summary .chk { color: var(--ok); }
details.pol.bad { border-color: var(--brand-red); }
details.pol > .body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
details.job { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
details.job > summary { cursor: pointer; font-weight: 700; }
.doclists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 14px; }
@media (max-width: 760px) { .doclists { grid-template-columns: 1fr; } }
.doclists h4 { margin: 10px 0 4px; color: var(--brand-blue-dark); }
.doclists ol { padding-left: 18px; margin: 0; }
.upload { border: 2px dashed #C3CCDB; border-radius: 10px; padding: 12px; margin-top: 10px; text-align: center; }
.upload.has { border-style: solid; border-color: var(--ok); background: #E6F4EC; }
.upload-label { font-weight: 600; }
.upload-status { color: var(--ok); font-weight: 600; min-height: 1.2em; }
.upload-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.upload-buttons label.btn { display: inline-flex; align-items: center; cursor: pointer; }
button.reveal { font-size: 13px; margin-top: 4px; }
input.bad { border-color: var(--brand-red); }
.okmsg { color: var(--ok); }
.errmsg { color: var(--brand-red); }
canvas.sig { width: 100%; height: 160px; border: 1px dashed #9AA6BD; border-radius: 10px; background: #fff; touch-action: none; display: block; }
.card.narrow-wide { max-width: 720px; margin: 0 auto; }
ul.signed-list { columns: 2; font-size: 15px; }
@media (max-width: 640px) { ul.signed-list { columns: 1; } }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .values { grid-template-columns: repeat(2, 1fr); } }
.values div { background: #F2F6FD; border-radius: 10px; padding: 10px; font-size: 13px; }
.values b { display: block; color: var(--brand-blue-dark); font-size: 15px; }
progress.bar { width: 100%; height: 10px; border: 0; border-radius: 99px; background: #E8ECF3; overflow: hidden; }
progress.bar::-webkit-progress-bar { background: #E8ECF3; }
progress.bar::-webkit-progress-value { background: var(--ok); }
progress.bar::-moz-progress-bar { background: var(--ok); }
.align-hint { align-self: end; }
.c8 { grid-column: span 8; }
@media (max-width: 700px) { .c8 { grid-column: span 12; } }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #C8CFDB; border-radius: 8px; }

/* ---- HR review ---- */
.hr-actions { margin-bottom: 16px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.review { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 700px) { .review { grid-template-columns: minmax(0, 1fr); } }
.review dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 15px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; word-break: break-word; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 140px; font-size: 12px; text-align: center; text-decoration: none; }
.thumb img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumb .file { font-size: 48px; }
img.sig-img { max-width: 320px; border-bottom: 1px solid var(--ink); }

/* Settings page sections */
.settings { display: grid; gap: 16px; max-width: 640px; }
.settings .card h2 { margin-bottom: 4px; }
.status { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: #EEF1F6; color: var(--muted); }
.status.on { background: #E6F4EC; color: var(--ok); }
.qr svg { width: 200px; height: 200px; display: block; margin: 8px 0; }
code.key { word-break: break-all; font-size: 15px; background: #F3F5F8; padding: 4px 8px; border-radius: 6px; }
