/* Managed RFP portal, themed on Mika (mika.avrlgeneration.com): the AVRL brand tokens, Google Sans Flex, a navy
   header with the flag stripe, white cards on paper, blue primary actions. Light only, as Mika is. */
:root {
  --paper: #f6f8fc;
  --card: #ffffff;
  --ink: #0e1e3a;
  --muted: #4f5d75;
  --rule: #d8e0ec;
  --quiet: #8392ab;
  --slate: #5e6b82;
  --navy: #0a2a5e;
  --navy-2: #0f3a7d;
  --navy-page: #133264;
  --blue: #1f5fd1;
  --blue-hover: #1a50b3;
  --blue-text: #1a4fb0;
  --blue-soft: #e9f0fc;
  --red: #b22234;
  --red-soft: #fbecee;
  --green: #0b7e19;
  --green-soft: #e7f4e9;
  --amber-soft: #fff6dc;
  --on-navy-muted: #bccbe3;
  --shadow-lift: 0 16px 36px -14px rgba(14, 30, 58, .25);
  --shadow-card: 0 1px 2px rgba(14, 30, 58, .06), 0 6px 18px -10px rgba(14, 30, 58, .18);
  --shadow-cta: 0 6px 16px -6px rgba(31, 95, 209, .55);
  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink); font: 500 14px/1.5 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
/* Flag stripe: navy half, blue to 85%, then red, 3px, along the top edge */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30;
  background: linear-gradient(90deg, var(--navy) 0 50%, var(--blue) 50% 85%, var(--red) 85%);
}
a { color: var(--blue-text); }
a:hover { color: var(--navy); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Header (navy, as Mika's) ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; padding-top: 3px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
/* The brand (templates/_brand.html): the AVRL logo with the product mark raised at its top right, Pilot, then Managed RFP */
.hb { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.hb:hover { color: #fff; }
.hb-lockup { display: inline-flex; align-items: flex-start; }
.hb-logo { display: block; height: 26px; width: auto; filter: brightness(0) invert(1); }
/* the mark sits in the logo image's clear right edge, at its letters' top */
.hb-mark { margin: 3px 0 0 -22px; color: #dbe5f5; font-size: 9.5px; font-style: italic; font-weight: 600; letter-spacing: .06em; line-height: 1;
  text-transform: uppercase; }
.hb-pilot { padding: 2px 8px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.hb-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .28); }
.hb-product { color: #bccbe3; font-size: 12px; font-weight: 600; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }
@media (max-width: 560px) { .hb-sep, .hb-product { display: none; } }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
/* Who is signed in (templates/_who.html): initials, name over company, Sign out */
.who-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #1f5fd1;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 13px; font-weight: 600; }
.who-co { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bccbe3; font-size: 11.5px; font-weight: 500; }
.who-out { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #bccbe3; text-decoration: none; }
.who-out svg { width: 18px; height: 18px; }
.who-out:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.who-rule { width: 1px; height: 24px; background: rgba(255, 255, 255, .2); }
@media (max-width: 640px) { .who-text { display: none; } }

/* ── Layout: side menu + one work surface ─────────────────────────────── */
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; max-width: 1440px; margin: 0 auto;
  padding: 24px max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left)); }
.menu { display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 83px; }
.menu-label { font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); padding: 4px 12px 8px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: .5rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu a svg { width: 18px; height: 18px; color: var(--slate); flex: none; }
.menu a:hover { background: var(--card); }
.menu a[aria-current="page"] { background: var(--blue-soft); color: var(--navy); font-weight: 700; box-shadow: inset 3px 0 0 var(--blue); }
.menu a[aria-current="page"] svg { color: var(--blue); }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; gap: 16px; }
  .menu { flex-direction: row; position: static; overflow-x: auto; }
  .menu-label { display: none; }
  .menu a { white-space: nowrap; }
  .menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--blue); }
}
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px; min-width: 0; box-shadow: var(--shadow-card); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
h1 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -.005em; }
.hint { color: var(--muted); margin: 4px 0 0; font-size: 13.5px; max-width: 70ch; }

/* ── Forms (Mika's field look) ────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label { font-size: .75rem; font-weight: 600; color: var(--muted); }
.field label .opt { font-weight: 500; color: var(--quiet); }
.field input { height: 2.75rem; padding: 0 14px; border: 1px solid var(--quiet); border-radius: .5rem; background: var(--card);
  color: var(--ink); font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: var(--quiet); }
.field input:hover { border-color: var(--slate); }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.field.bad input, .field.bad .drop { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--quiet);
  border-radius: .75rem; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.field-note { font-size: 12px; color: var(--muted); }
.field-note.ok { color: var(--green); }
.field-note.bad { color: var(--red); }

/* Account name and TMS: a dropdown (the chevron) that is also a search box; its list opens under the field */
.combo { position: relative; }
.combo input { width: 100%; padding-right: 40px; }
.combo::after { content: ""; position: absolute; top: 1.375rem; right: 17px; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate); transform: translateY(-70%) rotate(45deg); }

/* Dates: a text box shown as mmm-dd-yyyy, the browser's calendar behind the button (portal.js dateField) */
.date-field { position: relative; }
.date-field input[type="text"] { width: 100%; padding-right: 46px; }
.date-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.date-pick { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: .4rem; background: transparent; color: var(--slate); cursor: pointer; }
.date-pick:hover { background: var(--blue-soft); color: var(--blue); }
.date-pick svg { width: 18px; height: 18px; }

/* RFP term end: Quarterly, 6 months, Yearly */
.term-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card);
  color: var(--slate); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.preset:hover { border-color: var(--blue); color: var(--blue); }
.preset[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-text); }
.combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  max-height: 288px; overflow-y: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: var(--shadow-lift), 0 2px 8px rgba(14, 30, 58, .08); }
.combo-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.combo-list li[data-i]:hover, .combo-list li[aria-selected="true"] { background: var(--blue-soft); }
.combo-list li.add { color: var(--blue-text); font-weight: 600; }
.combo-list li[data-i] + li.add { border-top: 1px solid var(--rule); border-radius: 0 0 6px 6px; margin-top: 4px; }
.combo-list li.empty { color: var(--muted); cursor: default; font-size: 13px; }
.tag { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px; }

.drop:hover { border-color: var(--slate); }
.drop.over { border-color: var(--blue); background: var(--blue-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop svg { width: 26px; height: 26px; color: var(--blue); flex: none; }
.drop .file-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop .file-hint { color: var(--muted); font-size: 12.5px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.btn { height: 2.5rem; padding: 0 16px; border-radius: .5rem; border: 1px solid var(--rule); background: var(--card); color: var(--ink);
  cursor: pointer; font-weight: 600; font-size: .875rem; transition: background .2s, border-color .2s, transform .25s cubic-bezier(.2, .7, .3, 1); }
.btn:hover:not(:disabled) { border-color: var(--quiet); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: var(--shadow-cta); }
.btn.primary:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.msg { margin-top: 16px; padding: 11px 14px; border-radius: .5rem; font-size: 13.5px; border: 1px solid transparent; }
.msg.error { background: var(--red-soft); color: var(--red); border-color: #f1c7cd; }
.msg.ok { background: var(--green-soft); color: var(--green); border-color: #c4e3c8; }
.msg.ok a { color: var(--green); font-weight: 700; }
.msg.ask { background: var(--amber-soft); color: var(--ink); border-color: #f0dc9c; }
.msg .actions { margin-top: 12px; }
/* A link-looking button inside a message (the upload's "Delete it") */
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
/* Delete's question (portal.js): a small dialog over the page */
dialog.confirm { max-width: 26rem; padding: 22px 24px 20px; border: 1px solid var(--rule); border-radius: 14px; color: var(--ink);
  box-shadow: 0 24px 60px rgba(10, 25, 60, .22); }
dialog.confirm::backdrop { background: rgba(10, 25, 60, .35); }
dialog.confirm h2 { margin: 0 0 8px; font-size: 18px; }
dialog.confirm p { margin: 0; font-size: 14px; line-height: 1.5; }
dialog.confirm .actions { margin-top: 18px; display: flex; gap: 8px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
/* After an upload: the popup with the job just made (portal.js showUploaded) */
/* the head (a check, the title, the MJ-ID with Copy), a line, one card (the RFP's facts two by two, the file, the status
   chip), then the buttons on a footer rule, the main one last */
dialog.confirm.upd { max-width: 32rem; width: calc(100vw - 32px); padding: 24px 24px 20px; }
.upd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.upd-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green-soft);
  color: var(--green); box-shadow: 0 0 0 6px rgba(11, 126, 25, .06); }
.upd-titles { min-width: 0; }
dialog.confirm.upd .upd-head h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
.upd-id { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--muted); }
.upd-copy { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none;
  color: var(--quiet); cursor: pointer; }
.upd-copy:hover { color: var(--blue-text); background: var(--blue-soft); }
.upd-copy:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.upd-copy.is-copied { color: var(--green); background: var(--green-soft); }
dialog.confirm.upd #upd-text { color: var(--muted); }
.upd-card { margin-top: 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); overflow: hidden; }
.upd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 14px 16px; }
.upd-facts dt { color: var(--quiet); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.upd-facts dd { margin: 3px 0 0; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; font-weight: 500; }
.upd-file, .upd-status { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 16px; border-top: 1px solid var(--rule);
  background: var(--card); font-size: 13.5px; }
.upd-file-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-text); }
.upd-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.upd-file-size { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.upd-wait { color: var(--muted); }
dialog.confirm.upd .upd-actions { justify-content: flex-end; margin: 20px -24px 0; padding: 16px 24px 0; border-top: 1px solid var(--rule); }
@media (max-width: 440px) {
  .upd-facts { grid-template-columns: minmax(0, 1fr); }
  dialog.confirm.upd .upd-actions { flex-direction: column-reverse; }
  dialog.confirm.upd .upd-actions .btn { width: 100%; }
}
/* The upload's "already uploaded" (portal.js duplicateHtml): that job as Track Managed Jobs shows it, then what to do */
.msg .dup-lead { margin: 0 0 10px; font-weight: 600; }
.msg .dup-wrap { margin: 0 0 12px; background: var(--card); border-color: #f1c7cd; }
.msg .dup-table { color: var(--ink); }
.msg .dup-table th { background: var(--head-row); }
.msg .dup-table .cell-sub { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* the file: whole on hover */
.msg .dup-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn.btn-sm { height: 2rem; padding: 0 12px; font-size: 13px; }
/* Required fields: a red * after the label, and the key under the title */
.req { color: var(--red); font-weight: 700; }
.req-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
/* Track Managed Jobs: the job just uploaded, marked for a moment */
#jobs-body tr.is-new > td { animation: new-row 4s ease-out; }
@keyframes new-row { 0%, 40% { background: var(--green-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { #jobs-body tr.is-new > td { animation: none; background: var(--green-soft); } }

/* ── Jobs table ───────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: .75rem; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfe; }
td.nowrap { white-space: nowrap; }
.sub { color: var(--muted); font-size: 12px; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.head-actions a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.head-actions a.btn.primary, .head-actions a.btn.primary:hover { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Track Managed Jobs, in the style of Mika's lists: a blue-grey header row, the first column the job as on the Rates
   page's card (account bold navy with the MJ-ID in a chip, then the TMS), a quieter second line in the other cells. */
:root { --amber: #c77700; --head-row: #edf2f9; }
table.jobs th { background: var(--head-row); color: var(--slate); padding: 9px 10px; position: sticky; top: 0; z-index: 2; }
table.jobs td { vertical-align: middle; padding: 8px 10px; }
table.jobs th:first-child, table.jobs td:first-child { padding-left: 16px; }
table.jobs th:last-child, table.jobs td:last-child { padding-right: 16px; }
.cell-main { font-weight: 600; color: var(--ink); line-height: 1.35; }
.cell-sub { margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.35; }
/* No line of a row wraps: the account and the TMS end in "…" past the column's width (the whole name on hover), the
   MJ-ID chip is never cut, the status keeps to one line. A window too narrow for the table scrolls it sideways
   (.table-wrap). */
.job { min-width: 230px; max-width: 340px; }
.job-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.job-lock { flex: none; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: #fff4e5; color: #8a4b00; font-size: 11px;
  font-weight: 600; white-space: nowrap; cursor: help; }
.job-lock.is-view { background: var(--blue-soft); color: var(--blue-text); }
.job-account { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.job-id { flex: none; padding: 0 6px; border: 1px solid var(--rule); border-radius: 5px; background: var(--paper); color: var(--muted);
  font: 600 10.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .03em; white-space: nowrap; }
.job-tms { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.35; }
.job-tms svg { flex: none; width: 13px; height: 13px; color: var(--quiet); }
.job-tms span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: flex; flex-direction: column; gap: 3px; min-width: 176px; padding: 3px 6px; margin: -3px -6px; border-radius: .5rem; cursor: help; }
.status:hover, .status:focus-visible { background: var(--paper); }
.steps { display: flex; align-items: center; gap: 3px; }
.steps i { width: 16px; height: 4px; border-radius: 2px; background: var(--rule); }
.steps i.on { background: var(--navy-2); }
.steps span { white-space: nowrap; margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.status-title { font-weight: 600; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.steps span.steps-wait { margin-left: 4px; }
.status.s2 .steps i.on { background: var(--amber); }
.status.s2 .steps-wait { color: var(--amber); }
.status.s4 .steps i.on { background: var(--green); }
.status.s4 .status-title { color: var(--green); }
/* Track Managed Jobs and Archive: the search box over the list, and the RFP Ready column */
.list-search { position: relative; width: 300px; }
.list-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  color: var(--slate); pointer-events: none; }
.list-search input { width: 100%; height: 2.5rem; padding: 0 12px 0 36px; border: 1px solid var(--quiet); border-radius: .5rem;
  background: var(--card); color: var(--ink); }
.list-search input:hover { border-color: var(--slate); }
.list-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
th.col-step, td.col-step { white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; flex: none; }
.pager-info { margin-right: auto; font-size: 13px; color: var(--muted); }
.pager .btn { height: 2.25rem; padding: 0 14px; }
.pager-size { display: flex; align-items: center; gap: 8px; margin-right: 8px; font-size: 13px; color: var(--muted); }
.pager-size select { height: 2.25rem; padding: 0 8px; border: 1px solid var(--quiet); border-radius: .5rem; background: var(--card);
  color: var(--ink); cursor: pointer; }
.pager-size select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

/* The list fits the window: Track Managed Jobs and Archive are as tall as the window at most, the rows scroll inside
   their frame under the column heads, and the pager stays in view (a short window or a narrow one: the page scrolls). */
@media (min-width: 761px) and (min-height: 560px) {
  #view-jobs:not([hidden]) { display: flex; flex-direction: column; max-height: calc(100vh - 104px); }
  #view-jobs .panel-head, #view-jobs .msg { flex: none; }
  #view-jobs .table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
}
.step-none { color: var(--quiet); }
/* A job the customer approved and closed (no completed file comes): a quiet green tag in RFP Ready */
.step-closed { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid #b7dfc3; border-radius: 999px;
  background: #eef8f1; color: var(--green); font-size: 12px; font-weight: 600; cursor: help; white-space: nowrap; }

/* A job's icons (portal.js ratesIcon, archiveIcon), right-aligned so every place lines up from row to row: always
   three icon places, an empty one kept where there is nothing yet. The step buttons (Review rates, Completed file)
   are in RFP Ready, one width for both. */
th.col-actions, td.col-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-icons { display: inline-flex; gap: 4px; align-items: center; }
.icon-slot { visibility: hidden; }
a.btn-step { display: inline-flex; align-items: center; justify-content: center; min-width: 116px; height: 30px; padding: 0 10px;
  font-size: 12.5px; text-decoration: none; color: #fff; }
a.btn-step:hover { color: #fff; }
/* Review rates with a caret (static/portal.js reviewSplitHtml): AVRL's published versions, when there are several */
.step-split { position: relative; display: inline-flex; }
.step-split a.btn-step { min-width: 88px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.step-split-caret { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0;
  border-left: 1px solid rgba(255, 255, 255, .35); border-radius: 0 .5rem .5rem 0; color: #fff; cursor: pointer; }
.step-split-caret svg { transition: transform .15s ease; }
.step-split-caret[aria-expanded="true"] svg { transform: rotate(180deg); }
.step-split-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 240px; padding: 6px;
  border: 1px solid var(--rule); border-radius: 10px; background: #fff; box-shadow: 0 16px 36px -14px rgba(10, 42, 94, .35); }
.step-split-menu[hidden] { display: none; }
.step-split-head { padding: 4px 8px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.step-split-menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; color: var(--ink); font-size: 13px;
  text-decoration: none; white-space: nowrap; }
.step-split-menu a:hover, .step-split-menu a:focus-visible { background: #eef3fc; outline: none; }
.step-split-menu a span { color: var(--muted); }
.step-split-menu a em { margin-left: auto; padding: 0 7px; border-radius: 999px; background: #e7f4e9; color: #0b7e19; font-size: 11px;
  font-style: normal; font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: .5rem; border: 1px solid var(--rule);
  color: var(--slate); background: var(--card); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.icon-btn--danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.icon-btn svg { width: 16px; height: 16px; }
.menu a:focus-visible { outline-offset: -2px; }

/* Hover hints (status steps, activity log): one floating card, placed by portal.js */
.tip { position: fixed; z-index: 50; width: max-content; max-width: min(340px, calc(100vw - 16px)); padding: 12px 14px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-lift), 0 2px 8px rgba(14, 30, 58, .08);
  font-size: 12.5px; color: var(--ink); pointer-events: none; }
.tip-title { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); margin-bottom: 10px; }
.tip-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tip-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.tip-steps li > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.tip-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  border: 1.5px solid var(--rule); color: var(--quiet); background: var(--card); }
.tip-mark svg { width: 13px; height: 13px; }
.tip-step { font-weight: 600; line-height: 1.3; }
.tip-wait { font-size: 12px; color: var(--muted); }
.tip-act { display: flex; flex-direction: column; margin-top: 3px; }   /* one line of a step's activity: what, then when */
.tip-when { font-size: 11px; color: var(--quiet); }
.tip-at { font-size: 11px; color: var(--quiet); }
.tip-steps li.done .tip-mark { background: var(--green); border-color: var(--green); color: #fff; }
.tip-steps li.done .tip-step { color: var(--muted); }
.tip-steps li.current .tip-mark { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.tip-steps li.current.s2 .tip-mark { background: var(--amber); border-color: var(--amber); }
.tip-steps li.current.s4 .tip-mark { background: var(--green); border-color: var(--green); }
.tip-steps li.current .tip-when { color: var(--ink); font-weight: 600; }
.tip-steps li.next .tip-step { color: var(--muted); }
.tip-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 11.5px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #eef2f8; color: var(--ink); white-space: nowrap; }
.chip b { display: inline-grid; place-items: center; min-width: 32px; height: 20px; border-radius: 999px; font-size: 11px; background: var(--slate); color: #fff; }
.chip.s2 { background: var(--blue-soft); color: var(--blue-text); } .chip.s2 b { background: var(--blue); }
.chip.s4 { background: var(--green-soft); color: var(--green); } .chip.s4 b { background: var(--green); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ── Sign-in (Mika's sign-on page) ────────────────────────────────────── */
body.signon { display: flex; align-items: center; justify-content: center; flex-direction: column; background: var(--navy); overflow: hidden; position: relative; }
.signon .bg-gradient { position: fixed; inset: 0; z-index: 0; background: radial-gradient(circle at 100% 0%, rgba(40, 101, 211, .45), transparent 30%), var(--navy-page); }
.signon .grid-canvas { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .12; }
.signon .logo-wrap { position: relative; z-index: 2; text-align: center; margin-bottom: 12px; animation: cardIn .6s cubic-bezier(.2, .7, .2, 1) both; }
.signon .logo-wrap img { height: 48px; filter: brightness(0) invert(1); }
.login-card { position: relative; z-index: 2; width: 100%; max-width: 450px; padding: 36px 36px 32px; background: var(--card);
  border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow-lift), 0 2px 12px rgba(14, 30, 58, .12);
  animation: cardIn .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.brand-title { text-align: center; font-size: 1.35rem; font-weight: 700; color: var(--navy); letter-spacing: .08em; margin: 0 0 4px; }
.brand-sub { text-align: center; font-size: .88rem; color: var(--muted); margin: 0 0 30px; }
.so-field { position: relative; margin-bottom: 20px; }
.so-field input { width: 100%; padding: 14px 16px 14px 44px; font-size: .95rem; font-weight: 500; color: var(--ink); background: var(--card);
  border: 1px solid var(--quiet); border-radius: .5rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.so-field input::placeholder { color: var(--quiet); }
.so-field input:hover { border-color: var(--slate); }
.so-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.so-field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate); pointer-events: none; transition: color .15s; }
.so-field input:focus ~ .icon { color: var(--blue); }
.so-field input.has-toggle { padding-right: 46px; }
.pw-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--slate); padding: 2px; border-radius: .25rem; }
.pw-toggle:hover { color: var(--navy); }
.pw-toggle svg { width: 18px; height: 18px; display: block; }
.btn-signin { width: 100%; height: 2.75rem; padding: 0 14px; font-size: .875rem; font-weight: 600; color: #fff; background: var(--blue); border: none;
  border-radius: .5rem; box-shadow: var(--shadow-cta); cursor: pointer; position: relative; overflow: hidden;
  transition: background .25s ease, transform .3s cubic-bezier(.2, .7, .3, 1); }
.btn-signin:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn-signin:active { transform: none; }
.btn-signin .spinner { display: none; width: 20px; height: 20px; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite; margin: 0 auto; }
.btn-signin.loading { pointer-events: none; opacity: .85; }
.btn-signin.loading .btn-text { display: none; }
.btn-signin.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { text-align: center; color: var(--red); font-size: .85rem; min-height: 20px; margin-top: 14px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.divider span { font-size: .6875rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.footer-links { text-align: center; margin-top: 6px; }
.footer-links a { color: var(--blue-text); font-size: .82rem; font-weight: 600; text-decoration: none; }
.bottom-brand { position: fixed; bottom: 22px; left: 0; right: 0; text-align: center; z-index: 2; font-size: .75rem; color: var(--on-navy-muted); }
@media (max-width: 480px) { .login-card { margin: 16px; padding: 32px 22px 28px; width: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) {
  .login-card, .signon .logo-wrap { animation: none; }
  .btn-signin:hover, .btn.primary:hover:not(:disabled) { transform: none; }
}
