/* QAMS — royal blue + green theme (shared by desktop and on-site) */
:root {
  --blue-l: #2f80ff; --blue: #0b4fd6; --blue-d: #0a3aa8; --navy: #0a2a7a;
  --green-l: #3ccf5a; --green: #12a150; --lime: #7ed957;
  --ink: #0d1b3e; --ink-2: #33415f; --muted: #5b6b8c; --line: #dfe7f5; --line-2: #eaf0fa;
  --bg: #f3f7ff; --surface: #ffffff; --soft: #f6f9ff; --tint: #e8f0ff;
  --idle-bg: #eef2f7; --idle: #7a8699;
  --pend-bg: #fff4d6; --pend: #a86a00; --pend-s: #f5a524;
  --rej-bg: #ffe5e7; --rej: #c81e3a; --rej-s: #ef4458;
  --ok-bg: #e3f8ea; --ok: #0e8a43; --ok-s: #22b45a;
  --grad: linear-gradient(135deg, #2f80ff 0%, #0b4fd6 45%, #0a2a7a 100%);
  --grad-green: linear-gradient(135deg, #3ccf5a, #12a150);
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(13, 27, 62, .06), 0 2px 8px rgba(13, 27, 62, .05);
  --sh-2: 0 6px 24px rgba(11, 79, 214, .10), 0 2px 6px rgba(13, 27, 62, .06);
  --sh-3: 0 24px 60px rgba(10, 42, 122, .25);
  --font: "Outfit", "Montserrat", "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.has-modal { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: .4em 0; }
small, .sub { color: var(--muted); font-size: 13px; }
.blk { display: block; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.two > div { flex: 1 1 220px; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; flex-wrap: wrap; }
.t-bad { color: var(--rej); font-weight: 600; }
.t-warn { color: var(--pend); font-weight: 600; }
.pre { white-space: pre-wrap; }
.ico-svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 1000; background: linear-gradient(180deg, #ffffff 0%, #eaf3ff 60%, #d8e9ff 100%); display: flex; align-items: center; justify-content: center; transition: opacity .4s ease, visibility .4s; }
.splash.out { opacity: 0; visibility: hidden; }
.splash-in { text-align: center; margin-top: -60px; animation: pop .5s ease both; }
.splash-word { font-size: 46px; font-weight: 900; letter-spacing: .04em; color: var(--blue); margin-top: 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.splash-tag { font-size: 11px; letter-spacing: .32em; color: var(--navy); font-weight: 700; margin-top: 6px; line-height: 1.8; }
.splash-spin { width: 34px; height: 34px; margin: 28px auto 0; border-radius: 50%; border: 3px solid #cfe1ff; border-top-color: var(--blue-l); animation: spin 0.9s linear infinite; }
.waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 160px; pointer-events: none; }
.waves .w1 { fill: #cfe2ff; }
.waves .w3 { fill: #63c96a; opacity: .9; }
.waves .w2 { fill: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- brand / login ---------- */
.brand { text-align: center; }
.brand .qams-logo { display: block; margin: 0 auto; filter: drop-shadow(0 8px 18px rgba(11, 79, 214, .25)); }
.brand-word { font-size: 40px; font-weight: 900; letter-spacing: .05em; margin-top: 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-tag { font-size: 10.5px; letter-spacing: .3em; font-weight: 700; color: var(--navy); line-height: 1.8; text-transform: uppercase; }
.brand.on-blue .brand-word { -webkit-text-fill-color: #fff; }
.brand.on-blue .brand-tag { color: #cfe3ff; }
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px 170px; position: relative; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #eaf3ff 60%, #d8e9ff 100%); }
.login-card { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.login-card form { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); padding: 24px; border-radius: var(--r-lg); box-shadow: var(--sh-2); margin-top: 22px; border: 1px solid #fff; }
.login .linkbtn { display: flex; gap: 6px; align-items: center; margin: 16px auto 0; }
.err-line { color: var(--rej); font-size: 14px; min-height: 20px; margin: 8px 0; font-weight: 600; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 650; font-size: 14.5px; cursor: pointer; transition: transform .06s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; text-decoration: none; user-select: none; }
.btn:hover { border-color: #c5d5f2; box-shadow: var(--sh-1); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(11, 79, 214, .28); }
.btn.go { background: var(--grad-green); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(18, 161, 80, .28); }
.btn.danger { color: var(--rej); border-color: #f6c5cc; }
.btn.danger.solid { background: linear-gradient(135deg, #f0566a, #c81e3a); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(200, 30, 58, .25); }
.btn.ghost { background: transparent; }
.btn.ghost.bad, .bad { color: var(--rej); }
.btn.white { background: #fff; color: var(--blue); border-color: #fff; }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; display: flex; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn:not(.primary):not(.go):not(.solid).busy::after { border-color: #c5d5f2; border-top-color: var(--blue); }
.btn .cnt { font-style: normal; background: var(--blue); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 8px; }
.btn .cnt.red, .cnt.red { background: var(--rej-s); color: #fff; }
em.cnt { font-style: normal; border-radius: 99px; font-size: 12px; padding: 1px 8px; background: var(--blue); color: #fff; margin-left: 6px; vertical-align: middle; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.ibtn:hover { background: var(--tint); }
.ibtn.sm { width: 32px; height: 32px; border-radius: 9px; }
.ibtn:disabled { opacity: .3; pointer-events: none; }
.linkbtn { background: none; border: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; padding: 6px; }
.lbl { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 14px 0 6px; }
.lbl:first-child { margin-top: 0; }
.lbl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lbl-row .lbl { margin: 0; }
.lbl-row .sub { margin-left: auto; }
.opt { font-weight: 500; color: var(--muted); font-size: 12px; }
.req { font-weight: 700; color: var(--rej); font-size: 12px; }
.inp { width: 100%; min-height: 44px; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.inp:focus { outline: none; border-color: var(--blue-l); box-shadow: 0 0 0 4px rgba(47, 128, 255, .15); }
.inp.lg { min-height: 52px; font-size: 17px; }
.inp.sel { width: auto; min-width: 160px; }
.inp.num { max-width: 120px; }
textarea.inp { resize: vertical; min-height: 84px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; font-weight: 550; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.check small { margin-left: 4px; }
.check.big { align-items: flex-start; padding: 12px 0; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfd8e8; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + i { background: var(--green-l); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: .5; cursor: default; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 42px; color: var(--muted); flex: 1; min-width: 200px; max-width: 360px; }
.search input { border: 0; outline: 0; font: inherit; flex: 1; min-width: 0; background: transparent; color: var(--ink); }
.search:focus-within { border-color: var(--blue-l); box-shadow: 0 0 0 4px rgba(47, 128, 255, .12); }
.seg { display: inline-flex; background: #e9effa; border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 650; font-size: 13.5px; color: var(--ink-2); padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--blue); box-shadow: var(--sh-1); }
.seg button small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.seg button.s-rejected.on { color: var(--rej); }
.seg button.s-approved.on { color: var(--ok); }
.seg button.s-submitted.on { color: var(--pend); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); border: 1px solid var(--line-2); padding: 18px; margin-bottom: 16px; display: block; color: inherit; }
a.card, button.card { transition: transform .12s, box-shadow .15s, border-color .15s; cursor: pointer; text-align: left; font: inherit; width: 100%; }
a.card:hover, button.card:hover { box-shadow: var(--sh-2); border-color: #cfe0ff; transform: translateY(-1px); }
.card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card.narrow { max-width: 620px; }
.card.list { padding: 0; overflow: hidden; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.idle { background: var(--idle-bg); color: var(--idle); }
.pill.pending { background: var(--pend-bg); color: var(--pend); }
.pill.rejected { background: var(--rej-bg); color: var(--rej); }
.pill.approved { background: var(--ok-bg); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--tint); color: var(--blue-d); font-size: 12.5px; font-weight: 650; }
.chip.sm { font-size: 11px; padding: 1px 7px; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.bad { background: var(--rej-bg); color: var(--rej); }
.chip.warn { background: var(--pend-bg); color: var(--pend); }
.chip.x button { border: 0; background: none; padding: 0; margin-left: 2px; color: inherit; cursor: pointer; display: inline-flex; opacity: .6; }
.chip.x button:hover { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.badge.admin { background: linear-gradient(135deg, #e5efff, #d6e5ff); color: var(--navy); }
.badge.contractor { background: #fff1dc; color: #8a5300; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; margin: 10px 0; align-items: flex-start; }
.callout p { margin: 2px 0 0; }
.callout.bad { background: var(--rej-bg); color: #8f1027; }
.callout.warn { background: var(--pend-bg); color: #7a4d00; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ei { width: 56px; height: 56px; border-radius: 18px; background: var(--tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.empty.small { padding: 18px; font-size: 14px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.loading { display: flex; justify-content: center; padding: 70px; }
.loading.sm { padding: 20px; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #d4e3ff; border-top-color: var(--blue); animation: spin .8s linear infinite; }
.av { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.av.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.proj-ic { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; background: var(--tint); }
.proj-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-ic.mono { background: var(--grad); color: #fff; font-weight: 800; letter-spacing: .02em; box-shadow: inset 0 -8px 16px rgba(10, 42, 122, .25); }
.proj-ic.mono.add { background: var(--tint); color: var(--blue); box-shadow: none; }
.sbar { display: flex; width: 100%; background: var(--idle-bg); border-radius: 99px; overflow: hidden; }
.sbar i { display: block; height: 100%; }
.sbar .ap { background: var(--grad-green); }
.sbar .pe { background: var(--pend-s); }
.sbar .re { background: var(--rej-s); }
.ring { color: var(--blue); }
.ring-t { font-weight: 800; fill: currentColor; font-family: var(--font); }
.legend { display: inline-flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend span { display: inline-flex; align-items: center; }
.legend.big { font-size: 13px; margin-top: 10px; gap: 16px; }
.lg-a { background: var(--ok-s); } .lg-s { background: var(--pend-s); } .lg-r { background: var(--rej-s); } .lg-i { background: #cdd5e2; }

/* ---------- toast / modal ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sh-3); font-weight: 600; animation: pop .2s ease; transition: opacity .3s, transform .3s; }
.toast svg { color: var(--lime); }
.toast.err { background: #8f1027; }
.toast.err svg { color: #ffc2cb; }
.toast.out { opacity: 0; transform: translateY(6px); }
.modal-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(10, 26, 70, .45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; padding: 20px 22px; animation: pop .2s ease; }
.modal.wide { max-width: 900px; }
.modal-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.modal-h > div { flex: 1; min-width: 0; }
.modal-h .sub { margin: 2px 0 0; }
.modal-body { padding: 2px 0; }
.modal-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.lightbox { background: rgba(5, 12, 30, .94); padding: 0; }
.lightbox .modal { background: transparent; box-shadow: none; max-width: none; max-height: none; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 0; }
.lightbox img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; user-select: none; }
.lb-x { position: fixed; top: 12px; right: 12px; color: #fff; background: rgba(255, 255, 255, .14); z-index: 2; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); color: #fff; background: rgba(255, 255, 255, .14); width: 52px; height: 52px; border-radius: 50%; z-index: 2; }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
.lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; background: rgba(255, 255, 255, .14); padding: 4px 12px; border-radius: 99px; }

/* ---------- desktop shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sb { width: 248px; flex: none; background: var(--grad); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; box-shadow: 4px 0 24px rgba(10, 42, 122, .15); }
.sb-brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 8px 18px; }
.sb-brand b { font-size: 22px; font-weight: 900; letter-spacing: .05em; display: block; line-height: 1; }
.sb-brand small { color: #cfe3ff; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.sb-nav a { display: flex; align-items: center; gap: 12px; color: #e3edff; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; }
.sb-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sb-nav a.on { background: #fff; color: var(--blue); box-shadow: 0 6px 16px rgba(5, 20, 70, .25); }
.sb-nav a em { margin-left: auto; font-style: normal; background: var(--rej-s); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 8px; font-weight: 700; }
.sb-foot { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; background: rgba(255, 255, 255, .1); border: 0; color: #fff; padding: 8px 10px; border-radius: 12px; cursor: pointer; font: inherit; text-align: left; }
.sb-user .av { background: #fff; color: var(--blue); }
.sb-user b { display: block; font-size: 14px; }
.sb-user small { color: #cfe3ff; font-size: 12px; }
.sb-links { display: flex; justify-content: space-between; margin-top: 8px; }
.sb-links button { background: none; border: 0; color: #cfe3ff; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 6px; }
.sb-links button:hover { color: #fff; }
.main { flex: 1; min-width: 0; }
.view { padding: 26px 30px 90px; max-width: 1440px; margin: 0 auto; }
.ph-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ph-head .back { background: #fff; box-shadow: var(--sh-1); }
.ph-head .sub { margin: 2px 0 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-h h3 { margin: 0; }

/* dashboard */
.hero { background: var(--grad); color: #fff; border-radius: var(--r-lg); padding: 28px 30px; display: flex; align-items: center; gap: 24px; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: var(--sh-2); }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(126, 217, 87, .28), transparent 65%); }
.hero-l { flex: 1; position: relative; z-index: 1; }
.hero-hi { color: #cfe3ff; font-weight: 600; }
.hero h1 { font-size: 30px; margin: 4px 0; }
.hero p { color: #dbe8ff; }
.hero-acts { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero-ring { text-align: center; position: relative; z-index: 1; color: #fff; }
.hero-ring .ring { color: #fff; }
.hero-ring small { color: #cfe3ff; display: block; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile { background: #fff; border-radius: var(--r); padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sh-1); border: 1px solid var(--line-2); }
.tile b { font-size: 24px; display: block; line-height: 1.1; }
.tile .ti { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.t-approved .ti { background: var(--ok-bg); color: var(--ok); }
.t-pending .ti { background: var(--pend-bg); color: var(--pend); }
.t-rejected .ti { background: var(--rej-bg); color: var(--rej); }
.t-idle .ti { background: var(--idle-bg); color: var(--idle); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.proj-top, .t-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.proj-top h3, .t-top h3 { margin: 0; }
.big-pct { font-size: 30px; font-weight: 850; color: var(--green); }
.big-pct small { font-size: 15px; color: var(--green); }
.big-pct.sm { font-size: 22px; }
.trk-rows { margin-top: 12px; border-top: 1px solid var(--line-2); }
.trk-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.trk-row:last-child { border-bottom: 0; }
.trk-row:hover { background: var(--soft); }
.trk-row b { display: block; }
.trk-bar { width: 140px; }
.pct { font-weight: 800; width: 44px; text-align: right; color: var(--green); }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; color: var(--ink); }
.mini-row:hover { background: var(--soft); }
.mini-row b { display: block; font-size: 14px; }
.mini-row .ago { white-space: nowrap; }
.bars { display: flex; gap: 6px; height: 130px; align-items: flex-end; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; position: relative; padding-bottom: 16px; gap: 1px; }
.bar i { display: block; border-radius: 3px; min-height: 0; }
.bar .b-s { background: var(--pend-s); } .bar .b-a { background: var(--ok-s); } .bar .b-r { background: var(--rej-s); }
.bar span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

/* trackers */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cards.sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards > .card { margin: 0; }
.t-card .chips { margin-bottom: 12px; min-height: 22px; }
.t-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 12px; }
.t-meta span { display: inline-flex; gap: 5px; align-items: center; }
.grid-sum { display: flex; align-items: center; gap: 20px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-weight: 650; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button small { color: var(--green); font-weight: 750; margin-left: 4px; }
.tabs button.on { background: var(--grad); color: #fff; border-color: transparent; }
.tabs button.on small { color: #d8ffd0; }
.grid-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 290px); min-height: 300px; }
.grid { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.grid th, .grid td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0; background: #fff; }
.grid thead th { position: sticky; top: 0; z-index: 2; background: #f7faff; min-width: 120px; max-width: 160px; vertical-align: bottom; }
.grid thead th.corner { left: 0; z-index: 3; text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 170px; }
.gh { padding: 10px 10px 8px; text-align: left; }
.gh-n { display: block; font-weight: 750; color: var(--ink); line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gh-m { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; font-weight: 600; }
.gh-m b { color: var(--green); }
.grid tbody th { position: sticky; left: 0; z-index: 1; text-align: left; padding: 6px 14px; font-weight: 650; white-space: nowrap; background: #fff; box-shadow: 1px 0 0 var(--line-2); }
.grid tr.grp th, .grid tr.grp td { background: #eef4ff; color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 7px 14px; font-weight: 800; }
.grid tbody tr:hover th, .grid tbody tr:hover td { background: #f6f9ff; }
.cell { display: flex; align-items: center; justify-content: center; gap: 4px; width: calc(100% - 8px); margin: 4px; height: 30px; border: 0; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .08s, box-shadow .12s; }
.cell:hover { transform: scale(1.04); box-shadow: var(--sh-1); }
.cell.idle { background: var(--idle-bg); color: var(--idle); }
.cell.idle:hover { background: var(--tint); }
.cell.idle:hover::after { content: "+"; color: var(--blue); font-size: 16px; }
.cell.pending { background: #ffe9a8; color: #7a4d00; }
.cell.rejected { background: #ffc9cf; color: #8f1027; }
.cell.approved { background: #bff0cf; color: #0b6b34; }
.cell.dim { opacity: .25; }
.cp-status { display: flex; gap: 10px; align-items: center; }
.tl { list-style: none; padding: 0; margin: 10px 0 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl .dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; z-index: 1; }
.tl-pending .dot { background: var(--pend-s); } .tl-rejected .dot { background: var(--rej-s); } .tl-approved .dot { background: var(--ok-s); }
.tl small { color: var(--muted); margin-left: 6px; }
.tl .note { background: var(--soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.tl .note.muted { color: var(--muted); }

/* wizard / editor */
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.stepper i { flex: 0 0 24px; height: 2px; background: var(--line); }
.stepper .st { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--muted); font-size: 14px; }
.stepper .st span { width: 28px; height: 28px; border-radius: 50%; background: #e3eaf6; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.stepper .st.on { color: var(--blue); }
.stepper .st.on span { background: var(--grad); color: #fff; box-shadow: 0 4px 10px rgba(11, 79, 214, .3); }
.stepper .st.done span { background: var(--grad-green); color: #fff; }
.stepper.sm .st { font-size: 13px; }
.wz { padding: 24px; }
.wz-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 10px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pp { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.pp input { display: none; }
.pp.on { border-color: var(--blue-l); background: #f2f7ff; box-shadow: 0 0 0 4px rgba(47, 128, 255, .12); }
.sp-list { max-height: 440px; overflow: auto; margin-top: 10px; border: 1px solid var(--line-2); border-radius: 12px; }
.sp-h { position: sticky; top: 0; background: #f2f6fd; padding: 7px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--navy); z-index: 1; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.sp-item:hover { background: var(--soft); }
.sp-item.on { background: #eef5ff; }
.sp-item input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.sp-item b { display: block; }
.checks { border: 1px solid var(--line-2); border-radius: 12px; max-height: 380px; overflow: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split h3 { margin-bottom: 10px; }
.addloc .seg { margin: 14px 0 12px; }
.al-p .row { align-items: flex-end; }
.al-p .btn { margin-top: 10px; }
.loc-prev { max-height: 460px; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; background: var(--soft); }
.lp-g { margin-bottom: 12px; }
.lp-gh { font-weight: 800; font-size: 13px; color: var(--navy); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 650; }
.kv.two { grid-template-columns: 130px 1fr 130px 1fr; }
.ed-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; align-items: start; }
.olist { list-style: none; margin: 0; padding: 0; }
.olist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 6px; background: #fff; }
.olist li b { display: block; }
.olist li.dragging { opacity: .4; }
.olist li.drop { border-color: var(--blue-l); box-shadow: 0 -3px 0 var(--blue-l); }
.olist .drag { cursor: grab; color: #9aa8c2; display: inline-flex; }
.olist.rows li { padding: 3px 6px; }
.olist .rn { min-height: 34px; padding: 5px 10px; border-width: 1px; }
.eg { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 12px; background: var(--soft); }
.eg-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eg-h .eg-n { font-weight: 750; max-width: 320px; min-height: 38px; }
.eg-h small { font-weight: 700; }
.save-bar { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 150%); background: var(--navy); color: #fff; border-radius: 16px; padding: 10px 12px 10px 18px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sh-3); transition: transform .25s; z-index: 50; }
.save-bar.show { transform: translate(-50%, 0); }
.save-bar span { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.save-bar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: #f7faff; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--soft); }
.tbl tr.off td { opacity: .55; }
.tbl td.r { text-align: right; white-space: nowrap; }
.row-ic { display: inline-flex; align-items: center; gap: 10px; }

/* submission view */
.sv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.answers { list-style: none; padding: 0; margin: 0; }
.answers li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.answers li:last-child { border-bottom: 0; }
.answers .ai { width: 26px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex: none; }
.answers .a-yes .ai { background: var(--ok-bg); color: var(--ok); }
.answers .a-no { background: #fff6f7; }
.answers .a-no .ai { background: var(--rej-bg); color: var(--rej); }
.answers .a-na .ai { background: var(--idle-bg); color: var(--idle); }
.answers b { font-size: 13px; }
.a-yes b { color: var(--ok); } .a-no b { color: var(--rej); } .a-na b { color: var(--idle); }
.sig-img { display: block; width: 100%; max-width: 100%; height: 110px; object-fit: contain; background: #fbfdff; border: 1px dashed var(--line); border-radius: 12px; margin: 6px 0; }
.decide textarea { margin-bottom: 12px; }
.dec-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.rv-dec { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.prev { border-left: 3px solid var(--rej-s); padding: 6px 12px; margin: 8px 0; background: #fff8f9; border-radius: 0 10px 10px 0; }
.prev p { margin: 4px 0; }
.rounds { margin: 0; padding-left: 18px; }
.rounds li { padding: 4px 0; }
.rounds li small { margin-left: 6px; }
.rounds li.cur a { font-weight: 800; }
.fix-list .fix { display: flex; gap: 16px; align-items: flex-start; }
.fix-l { flex: 1; }
.fix-l h3 { margin: 8px 0 2px; }
.fix-r { display: flex; flex-direction: column; gap: 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pick-grid .card { margin: 0; }
.pick { display: flex !important; align-items: center; gap: 14px; }
.pick b { display: block; font-size: 16px; }
.pick .sbar { margin-top: 8px; height: 5px; }
.pick-ic, .m-pick-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.success { max-width: 700px; margin: 30px auto; text-align: center; padding: 40px 30px; }
.success h1 { margin: 16px 0 6px; }
.success .row { margin-top: 22px; }
.ok-burst { width: 92px; height: 92px; border-radius: 50%; background: var(--grad-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 12px rgba(60, 207, 90, .15), 0 12px 30px rgba(18, 161, 80, .35); animation: pop .4s ease; }
.p-card .row { margin-top: 12px; }
.pi-row { display: flex; gap: 16px; align-items: center; padding: 12px; background: var(--soft); border-radius: 14px; margin-bottom: 8px; }
.pi-row p { margin: 2px 0 8px; }
.lib-h { margin: 18px 0 10px; }
.lib-h small { color: var(--muted); font-weight: 600; }
.lib b { display: block; }
.lib p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.tr-groups { border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 12px; max-height: 280px; overflow: auto; }
.trg-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--navy); font-size: 13px; margin: 8px 0 2px; }

/* ---------- QA form (shared) ---------- */
.qf { max-width: 860px; margin: 0 auto; }
.qf .card { margin-bottom: 12px; }
.qf-head { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #f2f7ff, #fff); }
.qf-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.qf-title { font-weight: 800; font-size: 18px; }
.qf-sec { display: flex; gap: 14px; }
.qf-n { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--blue); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 14px; }
.loc-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 2px dashed #bcd2f7; border-radius: 14px; background: #f7faff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.loc-btn.set { border-style: solid; border-color: var(--blue-l); background: #fff; }
.loc-btn b { display: block; font-size: 16px; }
.loc-btn b.loc-ph { color: var(--blue); }
.loc-btn .loc-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.loc-btn .chg { color: var(--blue); font-weight: 700; font-size: 14px; }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: #fff1c2; } }
.qf-desk .ans { display: flex; align-items: center; gap: 16px; }
.qf-desk .ans-q { flex: 1; margin: 0; }
.qf-desk .ans-b { width: 330px; flex: none; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ph-grid.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--tint); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph.busy img { filter: brightness(.65); }
.ph.err img { filter: grayscale(1) brightness(.6); }
.ph .rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(10, 26, 70, .7); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 18px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.ph-prog i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--grad-green); transition: width .2s; }
.ph-prog span { position: relative; display: block; text-align: center; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; }
.ph-retry { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; border-radius: 99px; background: #fff; color: var(--rej); font: inherit; font-weight: 800; font-size: 12px; padding: 6px 10px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.ph-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 14px; border: 2px dashed var(--line); border-radius: 12px; justify-content: center; }
.ph-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-acts .btn { flex: 1; min-height: 50px; }
.qf-bar { display: flex; gap: 10px; justify-content: space-between; padding: 12px 0 20px; }
.qf-bar .go { flex: 1; max-width: 360px; margin-left: auto; }
/* location picker */
.lp-search { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 48px; color: var(--muted); }
.lp-search input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 16px; background: transparent; }
.lp-groups { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.lp-groups button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 650; font-size: 13px; white-space: nowrap; cursor: pointer; }
.lp-groups button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.lp-list { max-height: 58vh; overflow: auto; margin-top: 6px; }
.lp-h { position: sticky; top: 0; background: #fff; padding: 10px 2px 6px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); display: flex; justify-content: space-between; z-index: 1; }
.lp-h span { color: var(--muted); font-weight: 650; }
.lp-h.bad { color: var(--rej); justify-content: flex-start; gap: 6px; align-items: center; }
.lp-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; margin-bottom: 6px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.lp-item b { display: block; font-size: 15.5px; }
.lp-item:hover { border-color: var(--blue-l); }
.lp-item.cur { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 255, .15); }
.lp-item.s-rejected { border-color: #f6c5cc; background: #fff8f9; }
.lp-item:disabled { opacity: .55; cursor: not-allowed; background: #fafbfd; }
/* signature */
.sign-wrap { position: relative; border: 2px dashed #bcd2f7; border-radius: 16px; background: #fbfdff; height: 240px; }
.sign-canvas { width: 100%; height: 100%; display: block; border-radius: 14px; cursor: crosshair; }
.sign-line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-top: 1.5px solid #c9d8f2; color: #9aaccc; font-size: 12px; padding-top: 4px; pointer-events: none; text-transform: uppercase; letter-spacing: .1em; }
.sign-tools { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

@media (max-width: 1100px) {
  .dash-grid, .sv-grid, .ed-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sb { width: 76px; padding: 14px 8px; }
  .sb-brand div, .sb-nav a span, .sb-user .grow, .sb-user svg, .sb-links button { font-size: 0; }
  .sb-brand div { display: none; }
  .sb-nav a { justify-content: center; position: relative; }
  .sb-nav a em { position: absolute; top: 2px; right: 2px; }
  .sb-links { flex-direction: column; align-items: center; }
  .view { padding: 18px 14px 90px; }
  .split { grid-template-columns: 1fr; }
  .kv.two { grid-template-columns: 120px 1fr; }
  .qf-desk .ans { display: block; }
  .qf-desk .ans-b { width: auto; }
}

/* ---------- accessibility basics ---------- */
:focus-visible { outline: 3px solid var(--blue-l); outline-offset: 2px; }
.btn, .ibtn { min-height: 44px; }
.ibtn { min-width: 44px; }
.ibtn.sm { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
.btn.sm { min-height: 36px; }
@media (pointer: coarse) { .ibtn.sm, .btn.sm { min-width: 44px; min-height: 44px; } }

/* ---------- checklist (QA form) ---------- */
.qf-hint { margin: 2px 0 10px; }
.chk-list { display: flex; flex-direction: column; gap: 8px; }
.chk-sec { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin: 12px 2px 0; }
.chk { border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; transition: border-color .15s, background .15s; }
.chk.on { border-color: #9fe0b5; background: #f1fbf4; }
.chk.flash { animation: flash 1s; }
.chk-hit { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: var(--r); }
.chk-box { flex: none; width: 32px; height: 32px; border-radius: 9px; border: 2.5px solid #b5c3dc; background: #fff; display: grid; place-items: center; color: #fff; transition: background .12s, border-color .12s, transform .08s; }
.chk-hit:active .chk-box { transform: scale(.92); }
.chk.on .chk-box { background: var(--green); border-color: var(--green); }
.chk.on .chk-box svg { stroke-width: 3.2; }
.chk-n { flex: none; min-width: 20px; padding-top: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.chk-t { flex: 1; padding-top: 4px; font-size: 15.5px; line-height: 1.4; }
.chk.on .chk-t { color: var(--ink-2); }
.chk-note { padding: 0 14px 12px 58px; }
.chk-addnote { margin: -4px 0 10px 58px; border: 0; background: none; color: var(--blue); font: inherit; font-size: 13px; font-weight: 650; min-height: 32px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(200, 30, 58, .35); } }

/* ---------- read-only checklist (review) ---------- */
.answers li.a-sec { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: none; padding: 12px 4px 4px; border: 0; }
.answers li.a-no { background: #fff6f7; }
.answers li.a-no .ai { background: #fff; border: 2px solid #e58a98; color: transparent; }
.answers li.a-yes .ai { background: var(--green); color: #fff; }
.answers li.a-no > b { color: #c81e3a; }
.answers li.a-yes > b { color: var(--green); }
.a-note { display: block; margin-top: 3px; color: #a3172f; font-style: italic; }

/* ---------- people + company logos ---------- */
.person { display: inline-flex; align-items: center; gap: 8px; }
.person small { color: var(--muted); font-weight: 600; }
.co-logo { height: 24px; max-width: 72px; object-fit: contain; border-radius: 4px; background: #fff; }
.av.logo { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 2px; }
.av.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-field { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1.5px dashed var(--line); border-radius: var(--r); background: #fbfcff; }
.logo-field.busy { opacity: .6; pointer-events: none; }
.logo-prev { width: 120px; height: 64px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background-image: linear-gradient(45deg, #f3f6fb 25%, transparent 25%, transparent 75%, #f3f6fb 75%), linear-gradient(45deg, #f3f6fb 25%, transparent 25%, transparent 75%, #f3f6fb 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- QA sheet editor ---------- */
.se .card { margin-bottom: 14px; }
.se-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: none; }
.se-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; }
.se-row.dragging { opacity: .45; }
.se-row.drop { border-color: var(--blue-l); box-shadow: 0 0 0 3px rgba(47, 128, 255, .15); }
.se-row .drag { cursor: grab; color: var(--muted); display: grid; place-items: center; width: 28px; min-height: 40px; }
.se-row .inp { flex: 1; min-width: 0; }
.se-n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 800; display: grid; place-items: center; }
.se-h { background: #f3f7ff; border-color: #cfdcf6; }
.se-h .inp { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 13.5px; color: var(--navy); }
.se-acts { display: flex; gap: 2px; flex: none; }
.se-bar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
@media (max-width: 640px) { .se-acts .ibtn[data-up], .se-acts .ibtn[data-down] { display: none; } }

/* ---------- settings ---------- */
.settings section.card, section.card { margin-bottom: 14px; }
.settings h3, section.card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.row.three > * { flex: 1 1 180px; }
.check.locked { opacity: .75; }
.muted { opacity: .5; }

/* ---------- trackers grouped by project ---------- */
.pg { margin-bottom: 22px; }
.pg-h { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1, none); }
.pg-tog { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 48px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; padding: 0; border-radius: 10px; }
.pg-tog b { display: block; font-size: 17px; }
.pg-tog small { display: block; }
.pg-chev { display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.pg.shut .pg-chev { transform: rotate(-90deg); }
.pg.shut .pg-body { display: none; }
.pg.shut .pg-h { margin-bottom: 0; }
.pg-bar { width: 160px; flex: none; }
@media (max-width: 760px) { .pg-h { flex-wrap: wrap; } .pg-bar { order: 5; width: 100%; } }

/* roles + companies */
.badge.role-admin { background: linear-gradient(135deg, #e5efff, #d6e5ff); color: var(--navy); }
.badge.role-client { background: var(--ok-bg); color: var(--ok); }
.badge.role-contractor { background: #fff1dc; color: #8a5300; }
.modal-h .badge { font-size: 11.5px; padding: 2px 8px; vertical-align: 1px; }
.sb-sec { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(227, 237, 255, .6); }
.co-th { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; font-size: 12px; font-weight: 800; color: var(--blue-d); padding: 2px; }
.co-th img { width: 100%; height: 100%; object-fit: contain; }
.co-th.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.co-th.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 16px; }
.cpick { position: relative; }
.cpick-in { position: relative; }
.cpick-in .inp { padding-left: 44px; }
.cpick-logo { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; }
.cpick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-2); max-height: 260px; overflow: auto; padding: 4px; }
.cpick-list button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.cpick-list button:hover, .cpick-list button.on { background: var(--tint); }
.cpick-list button small { color: var(--muted); }
.cpick-list button[data-new] { color: var(--green); font-weight: 700; }
.cpick-empty { padding: 8px; }
.cpick-hint { margin-top: 4px; }
.tbl tr.grp td { background: var(--soft); border-top: 2px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.co-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.co-top { display: flex; gap: 12px; align-items: center; }
.co-acts { margin-top: auto; gap: 6px; }
.chip.off { opacity: .55; text-decoration: line-through; }
.fix-nudge { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--rej-bg); color: var(--rej); border-color: transparent; }
.fix-nudge b { color: var(--rej); }
.pf-co { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pf-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
