/* 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; overflow-x: hidden; }
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.login-wide { max-width: 440px; }
.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-card .auth-pane.hidden { display: none; }
.seg-tabs { display: flex; gap: 8px; margin-top: 18px; }
.seg-tab { flex: 1; border: 1px solid var(--line); background: rgba(255,255,255,.65); padding: 10px 12px; border-radius: var(--r); font-weight: 600; cursor: pointer; }
.seg-tab.on { background: #fff; border-color: var(--blue); color: var(--blue); box-shadow: var(--sh-1); }
.lib-sec { font-size: 1.05rem; margin: 20px 0 8px; color: var(--ink-2); }
.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; }

/* ---------- public landing (unauthenticated home) ---------- */
body.is-login:has(.public-landing) { background: #061224; }
.login.public-landing { padding: clamp(12px, 2vh, 20px); align-items: center; justify-content: center; background: radial-gradient(120% 80% at 20% 0%, #0f3a8a 0%, #061224 52%, #040d1c 100%); min-height: 100vh; min-height: 100dvh; }
.public-landing-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) min(460px, 41vw); width: 100%; max-width: 1180px; min-height: min(720px, calc(100vh - 24px)); min-height: min(720px, calc(100dvh - 24px)); margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.public-landing-hero { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 4.5vw, 56px) clamp(28px, 4vw, 52px); color: #fff; overflow: hidden; background: linear-gradient(158deg, #0e3580 0%, #0a2868 46%, #071d4a 100%); }
.public-landing-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%); pointer-events: none; opacity: .55; }
.public-landing-hero::after { content: ""; position: absolute; right: -100px; top: -60px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 128, 255, .2), transparent 68%); pointer-events: none; }
.public-intro { position: relative; z-index: 1; max-width: 500px; display: flex; flex-direction: column; gap: 22px; }
.public-intro-top { padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.public-intro .brand { text-align: left; margin-bottom: 0; }
.public-intro .brand .qams-logo { margin: 0 0 4px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.public-intro .brand-word { font-size: clamp(32px, 3.6vw, 40px); letter-spacing: .06em; margin-top: 4px; }
.public-intro .brand-tag { font-size: 9.5px; letter-spacing: .32em; margin-top: 6px; opacity: .88; line-height: 1.65; }
.public-intro-headline { margin: 18px 0 0; font-size: clamp(21px, 2.4vw, 26px); font-weight: 800; line-height: 1.22; letter-spacing: -.03em; color: #fff; max-width: 16em; }
.public-intro-lead { margin: 10px 0 0; max-width: 30em; color: #c5d9f5; font-size: 15px; font-weight: 500; line-height: 1.55; letter-spacing: -.01em; }
.public-capabilities { position: relative; padding-left: 16px; }
.public-capabilities::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 10px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #2f80ff 0%, #3ccf5a 48%, #f5a524 100%); opacity: .85; }
.public-capabilities-label { margin: 0 0 12px; font-size: 10.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: #8fb4e8; }
.public-props { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.public-prop { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.public-prop--trackers { background: linear-gradient(135deg, rgba(47, 128, 255, .14) 0%, rgba(255, 255, 255, .05) 100%); border-color: rgba(47, 128, 255, .28); }
.public-prop--mobile { background: linear-gradient(135deg, rgba(60, 207, 90, .12) 0%, rgba(255, 255, 255, .04) 100%); border-color: rgba(126, 217, 87, .22); }
.public-prop--snags { background: linear-gradient(135deg, rgba(245, 165, 36, .1) 0%, rgba(255, 255, 255, .04) 100%); border-color: rgba(245, 165, 36, .22); }
.public-prop-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.public-prop--trackers .public-prop-ic { background: linear-gradient(145deg, rgba(47, 128, 255, .4), rgba(11, 79, 214, .22)); color: #e3f0ff; }
.public-prop--mobile .public-prop-ic { background: linear-gradient(145deg, rgba(60, 207, 90, .35), rgba(18, 161, 80, .2)); color: #e8ffe8; }
.public-prop--snags .public-prop-ic { background: linear-gradient(145deg, rgba(245, 165, 36, .35), rgba(168, 106, 0, .22)); color: #fff4dc; }
.public-prop-body { min-width: 0; padding-top: 2px; }
.public-prop strong { display: block; font-size: 14.5px; font-weight: 750; margin-bottom: 3px; letter-spacing: -.012em; color: #fff; }
.public-prop span { display: block; font-size: 13px; color: #adc6eb; line-height: 1.42; }
.public-landing-auth { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3.5vw, 40px) clamp(22px, 3vw, 32px); background: linear-gradient(180deg, #f9fbff 0%, #eef4fd 55%, #e6eef9 100%); border-left: 1px solid rgba(11, 79, 214, .08); }
.public-auth-card { max-width: none; background: #fff; padding: 28px 26px 26px; border-radius: 16px; border: 1px solid rgba(223, 231, 245, .95); box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 18px 44px rgba(10, 42, 122, .1), 0 2px 6px rgba(13, 27, 62, .05); }
.public-auth-card form { margin-top: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.public-auth-head { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.public-auth-title { font-size: 24px; font-weight: 800; margin: 0 0 6px; color: var(--ink); letter-spacing: -.025em; line-height: 1.2; }
.public-auth-sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.public-auth-tabs.seg-tabs { gap: 0; margin: 0 0 20px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.public-auth-tabs .seg-tab { flex: 1; border: 0; background: transparent; padding: 11px 12px; border-radius: 9px; font-size: 14px; font-weight: 650; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s; }
.public-auth-tabs .seg-tab:hover:not(.on) { color: var(--ink-2); background: rgba(255, 255, 255, .55); }
.public-auth-tabs .seg-tab.on { background: #fff; border-color: transparent; color: var(--blue); box-shadow: 0 2px 10px rgba(11, 79, 214, .12); }
.public-auth-tabs .seg-tab:focus-visible { outline: 2px solid var(--blue-l); outline-offset: 2px; }
.public-auth-card .auth-pane { margin-top: 4px; }
.public-auth-card .lbl { margin-top: 14px; margin-bottom: 7px; font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.public-auth-card .lbl:first-child { margin-top: 0; }
.public-auth-card .inp.lg { min-height: 50px; font-size: 16px; background: #f8fbff; border-color: #cdd9ef; border-width: 1.5px; transition: border-color .15s, box-shadow .15s, background .15s; }
.public-auth-card .inp.lg::placeholder { color: #8a9bb8; }
.public-auth-card .inp.lg:hover { border-color: #b8c9e8; background: #fff; }
.public-auth-card .inp.lg:focus { background: #fff; border-color: var(--blue-l); box-shadow: 0 0 0 4px rgba(47, 128, 255, .14); }
.public-auth-card .sub.blk { margin-top: 8px; font-size: 12.5px; line-height: 1.45; }
.public-auth-card .btn.primary.lg { margin-top: 4px; min-height: 50px; font-weight: 700; letter-spacing: .01em; }
.public-auth-card .btn.primary.lg:focus-visible { outline: 2px solid var(--blue-l); outline-offset: 3px; }
.public-auth-card .callout.warn { margin-top: 14px; margin-bottom: 4px; }
.public-view-switch { margin: 16px auto 0; color: var(--blue-d); font-size: 13.5px; font-weight: 650; padding: 8px 12px; border-radius: 10px; transition: background .15s; }
.public-view-switch:hover { background: rgba(11, 79, 214, .08); }
.login.public-landing-mobile { flex-direction: column; gap: 14px; padding: 18px 16px 28px; background: linear-gradient(180deg, #f5f9ff 0%, #e8f0fc 100%); }
.login.public-landing-mobile .public-intro { max-width: none; margin: 0; padding: 20px 16px 18px; gap: 18px; border-radius: 16px; color: #fff; background: linear-gradient(158deg, #0e3580 0%, #0a2868 50%, #071d4a 100%); box-shadow: 0 14px 36px rgba(10, 42, 122, .22), 0 0 0 1px rgba(255, 255, 255, .08); }
.login.public-landing-mobile .public-intro-top { border-bottom-color: rgba(255, 255, 255, .1); padding-bottom: 2px; }
.login.public-landing-mobile .public-intro .brand { text-align: left; }
.login.public-landing-mobile .public-intro .brand-word { -webkit-text-fill-color: #fff; background: none; font-size: 34px; }
.login.public-landing-mobile .public-intro .brand-tag { color: #cfe3ff; }
.login.public-landing-mobile .public-intro-headline { font-size: 20px; margin-top: 14px; }
.login.public-landing-mobile .public-intro-lead { margin-top: 8px; font-size: 14.5px; color: #c5d9f5; }
.login.public-landing-mobile .public-capabilities { padding-left: 14px; }
.login.public-landing-mobile .public-capabilities-label { margin-bottom: 10px; font-size: 10px; }
.login.public-landing-mobile .public-intro.is-compact .public-props { gap: 8px; }
.login.public-landing-mobile .public-prop span { color: #adc6eb; }
.login.public-landing-mobile .public-auth-card { margin-top: 0; padding: 22px 18px 20px; border-radius: 16px; }
.login.public-landing-mobile .public-auth-head { margin-bottom: 14px; padding-bottom: 14px; }
.login.public-landing-mobile .waves { display: none; }
@media (max-width: 900px) {
  .login.public-landing { padding: 0; align-items: stretch; background: #eef4fd; }
  .public-landing-grid { grid-template-columns: 1fr; max-width: none; min-height: 100vh; min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .public-landing-hero { padding: 28px 20px 22px; min-height: auto; }
  .public-landing-auth { padding: 18px 16px 28px; border-left: 0; border-top: 1px solid rgba(11, 79, 214, .08); }
}

/* ---------- 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-x: auto; }
.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; min-height: 100dvh; }
/* Viewport-locked app: fill the screen once, then scroll only inside panes */
html:has(body.is-app) { height: 100%; overflow: hidden; }
body.is-app { height: 100%; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.is-app #app { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body.is-app .shell { flex: 1; min-height: 0; height: auto; overflow: hidden; align-items: stretch; }
body.is-app .sb { position: relative; top: auto; height: auto; align-self: stretch; min-height: 0; overflow: hidden; flex-shrink: 0; }
body.is-app .sb-brand,
body.is-app .sb-foot { flex-shrink: 0; }
body.is-app .sb-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.is-app .main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
/* Full .main width: scrollbars sit on the right edge of the window (sidebar excluded). */
body.is-app .view { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; width: 100%; max-width: none; margin: 0; padding: 26px 0 26px 30px; }
body.is-app .view.view-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.is-app .view.view-scroll > * { padding-right: 30px; }
body.is-app .view.view-table { overflow: hidden; padding-bottom: 16px; padding-right: 0; }
body.is-app .view-table > .ph-head,
body.is-app .view-table > .grid-sum,
body.is-app .view-table > .bulk-bar { flex-shrink: 0; padding-right: 30px; }
body.is-app .view-table > .card:not(.list):not(.grid-wrap) { flex-shrink: 0; }
body.is-app .view-table > .tracker-pane { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
body.is-app .view-table .tracker-pane > .toolbar,
body.is-app .view-table .tracker-pane > .tabs,
body.is-app .view-table .tracker-pane > .multi-bar { flex-shrink: 0; padding-right: 30px; }
body.is-app .view-table > .toolbar,
body.is-app .view-table > .tabs,
body.is-app .view-table > .multi-bar { flex-shrink: 0; }
body.is-app .view-table .grid-wrap,
body.is-app .view-table .tracker-pane .grid-wrap,
body.is-app .view-table .card.list.table-scroll { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.is-app .view-table .grid-wrap.card { margin-bottom: 0; border-radius: var(--r) 0 0 var(--r); }
body.is-app .view-table .card.list.table-scroll .tbl thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
body.is-app .view.view-scroll .digest-pre { max-height: none; overflow: visible; }
body.is-app .view.view-scroll .sp-list.sp-fold { max-height: none; overflow: visible; }
.sb { width: 248px; flex: none; background: var(--grad); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; 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; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.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; width: 100%; max-width: 1680px; 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-compact { padding: 16px 22px; align-items: stretch; }
.hero-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; width: 100%; }
.hero-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; flex: 1; min-width: min(100%, 280px); }
.hero-hi { color: #cfe3ff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.hero h1 { font-size: 22px; margin: 0; line-height: 1.2; white-space: nowrap; }
.hero-meta { color: #dbe8ff; font-size: 13.5px; font-weight: 500; }
.hero-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.proj-co-rings { display: flex; gap: 14px; overflow-x: auto; padding: 12px 2px 2px; margin-top: 10px; border-top: 1px solid var(--line-2); scrollbar-width: thin; }
.proj-co-ring { flex: 0 0 auto; text-align: center; width: 92px; color: var(--blue); }
.proj-co-ring.total { color: var(--green); }
.proj-co-ring .co-graph-ring { display: block; margin: 0 auto; }
.proj-co-name { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); margin-top: 5px; line-height: 1.25; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-co-ring.total .proj-co-name { color: var(--green); }
.tiles { display: grid; grid-template-columns: repeat(5, 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; }
.co-graph-sub { font-size: 8px; font-weight: 600; font-family: var(--font); }
.t-ok { color: var(--green, #12a150); }
.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; flex-wrap: wrap; }
.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: none; }
.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 { margin-top: 10px; border: 1px solid var(--line-2); border-radius: 12px; }
.sp-list.sp-fold { max-height: min(340px, 42vh); overflow: auto; }
.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-grp { border-bottom: 1px solid var(--line-2); }
.sp-grp:last-child { border-bottom: 0; }
.sp-tog { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: #f2f6fd; padding: 10px 14px; font: inherit; color: var(--navy); text-align: left; cursor: pointer; }
.sp-tog:hover { background: #e8eef8; }
.sp-tog b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.sp-tog small { display: block; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.sp-chev { flex: none; color: var(--muted); display: flex; transition: transform .15s ease; }
.sp-grp.shut .sp-chev { transform: rotate(-90deg); }
.sp-grp.shut .sp-bd { display: none; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.sp-grp .sp-item:last-child { border-bottom: 0; }
.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; }
.modal.co-edit { display: flex; flex-direction: column; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden; padding-bottom: 16px; }
.modal.co-edit .modal-h { flex: none; margin-bottom: 8px; }
.modal.co-edit .co-modal { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.modal.co-edit .co-modal-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px 8px; margin-right: -4px; padding-right: 8px; }
.modal.co-edit .co-modal-priority { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 16px; align-items: start; }
.modal.co-edit .co-modal-block { min-width: 0; }
.modal.co-edit .co-user-chips { min-height: 36px; }
.modal.co-edit .co-proj-pick .trg { max-height: 160px; overflow-y: auto; }
.modal.co-edit .modal-acts { flex: none; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line-2); }
@media (max-width: 720px) {
  .modal.co-edit .co-modal-priority { grid-template-columns: 1fr; }
}
.checks { border: 1px solid var(--line-2); border-radius: 12px; }
.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 { 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; }
.card.lib.custom { border-color: var(--brand, #0b4fd6); background: linear-gradient(180deg, rgba(11, 79, 214, 0.04), transparent); }
.card.lib.locked { opacity: 0.72; background: var(--surface-2, #f4f5f7); border-style: dashed; color: var(--muted); }
.card.lib.locked b { color: var(--ink-2); }
.card.lib.locked .chip.lock { font-size: 11px; margin-bottom: 6px; display: inline-block; }
.card.locked .chip.lock { font-size: 11px; }
.tr-groups { border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 12px; }
.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-mode-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.sign-mode-tab { flex: 1; min-height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sign-mode-tab:hover { border-color: var(--blue-l); color: var(--ink); }
.sign-mode-tab.active { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 255, .12); background: #f5f9ff; }
.sign-type-field { display: block; margin-bottom: 10px; }
.sign-type-field.hidden { display: none; }
.sign-type-input { width: 100%; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 16px; }
.sign-type-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 255, .15); }
.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-canvas.sign-canvas-readonly { cursor: default; pointer-events: none; }
.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: 1400px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .dash-grid, .sv-grid, .ed-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 22px 22px; }
  .hero h1 { font-size: 26px; }
}
@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 80px; }
  body.is-app .view { padding: 18px 0 80px 14px; }
  body.is-app .view.view-scroll > * { padding-right: 14px; }
  body.is-app .view-table > .ph-head,
  body.is-app .view-table > .grid-sum,
  body.is-app .view-table > .bulk-bar,
  body.is-app .view-table .tracker-pane > .toolbar,
  body.is-app .view-table .tracker-pane > .tabs,
  body.is-app .view-table .tracker-pane > .multi-bar { padding-right: 14px; }
  .split { grid-template-columns: 1fr; }
  .kv.two { grid-template-columns: 120px 1fr; }
  .qf-desk .ans { display: block; }
  .qf-desk .ans-b { width: auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-wrap: wrap; align-items: flex-start; }
  .search { max-width: none; }
  .trk-bar { width: 100px; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .view { padding: 14px 12px 72px; }
  body.is-app .view { padding: 14px 0 72px 12px; }
  body.is-app .view.view-scroll > * { padding-right: 12px; }
  body.is-app .view-table > .ph-head,
  body.is-app .view-table > .grid-sum,
  body.is-app .view-table > .bulk-bar,
  body.is-app .view-table .tracker-pane > .toolbar,
  body.is-app .view-table .tracker-pane > .tabs,
  body.is-app .view-table .tracker-pane > .multi-bar { padding-right: 12px; }
  .kv, .kv.two { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .ph-head h1, .hero h1 { font-size: 22px; }
  .pg-bar, .trk-bar { width: 100%; }
}

/* ---------- 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-grid-lg { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.co-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.co-card-lg { padding: 20px 22px; gap: 14px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.co-card-lg:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.co-card-lg .co-meta { margin: 4px 0 0; line-height: 1.45; }
.co-card-lg .co-preview { min-height: 2.2em; }
.co-page .co-page-head { margin-bottom: 16px; }
.co-page-save { margin: 8px 0 24px; justify-content: flex-end; }
.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; }

/* ---------- cell marks: works started / not required / scope to confirm ---------- */
:root { --ws-bg: #dcefff; --ws: #0b5cad; --ws-s: #6cb6ff; }
.cell.works { background: #cfe8ff; color: var(--ws); }
.grid.picking button.cell { box-shadow: inset 0 0 0 1px transparent; }
.grid.picking button.cell.on { box-shadow: inset 0 0 0 3px var(--blue); }
.grid.picking thead th[data-col], .grid.picking tbody th[data-row] { cursor: pointer; }
.grid.picking thead th[data-col]:hover, .grid.picking tbody th[data-row]:hover { background: #e7f0ff; }
#tr-multi.on { background: var(--tint); border-color: var(--blue-l); color: var(--blue); font-weight: 600; }
.multi-bar { position: sticky; top: 8px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 12px 14px; background: #eef5ff; border: 2px solid var(--blue-l); border-radius: 14px; box-shadow: var(--sh-2); }
.multi-bar.has-picks { background: #fff; border-color: var(--blue); box-shadow: var(--sh-2), 0 0 0 1px rgba(11, 92, 173, .12); }
.multi-bar.needs-picks .multi-bar-hint { display: inline; }
.multi-bar[hidden] { display: none !important; }
.multi-bar.busy { opacity: .6; pointer-events: none; }
.multi-bar-label { font-weight: 700; color: var(--navy); white-space: nowrap; }
.multi-bar-hint { display: none; flex: 1 1 160px; min-width: 0; }
.multi-bar .inp.sm { min-width: 11rem; max-width: 100%; }
.multi-bar .grow { flex: 1 1 8px; min-width: 0; }
.cell.gap { background: transparent; cursor: default; box-shadow: none; }
.t-card.master, .trk-row.master { background: linear-gradient(180deg, #f3f8ff, #fff); }
.grid.grouped thead tr:nth-child(2) th { top: 36px; }
.grid thead th.cg { text-align: center; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); background: #e8f1ff; padding: 8px; }
.cell.nreq { background: repeating-linear-gradient(135deg, #eef1f5 0 5px, #dde3eb 5px 7px); color: #6b7688; }
.cell.stc { background: #fff; color: #6b7688; border: 1.5px dashed #9aa6b8; }
.pill.works { background: var(--ws-bg); color: var(--ws); }
.pill.nreq { background: repeating-linear-gradient(135deg, #eef1f5 0 5px, #e1e6ee 5px 7px); color: #5b6678; }
.pill.stc { background: #fff; color: #5b6678; border: 1.5px dashed #9aa6b8; }
.sbar .ws { background: var(--ws-s); }
.lg-w { background: var(--ws-s); }
.lg-nr { background: repeating-linear-gradient(135deg, #eef1f5 0 3px, #c4ccd8 3px 5px); }
.lg-stc { background: #fff; border: 1.5px dashed #9aa6b8; box-sizing: border-box; }
.seg button.s-works_started.on { color: var(--ws); }
.t-works .ti { background: var(--ws-bg); color: var(--ws); }
.t-works { color: var(--ws); font-weight: 600; }
.tl-works .dot { background: var(--ws-s); } .tl-idle .dot { background: #b6c0cf; } .tl-edit .dot { background: #8a63d2; }
.callout.edit { background: #f1ecfb; color: #4a2f86; }
.lp-item.s-works_started { border-color: #b9dcff; background: #f3f9ff; }
.lp-item.s-not_required, .lp-item.s-scope_tbc { opacity: .6; }
.lp-row { display: flex; gap: 6px; align-items: stretch; margin-bottom: 6px; }
.lp-row .lp-item { margin-bottom: 0; flex: 1; min-width: 0; }
.lp-ws { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 86px; border: 1px solid #b9dcff; background: var(--ws-bg); color: var(--ws); border-radius: 12px; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.lp-ws.clr { background: #fff; border-color: var(--line); color: var(--muted); }
.lp-ws:disabled { opacity: .5; }
/* cell choice sheet */
.cc .cp-status { margin-bottom: 12px; }
.cc-list { display: grid; gap: 8px; }
.cc-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.cc-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.cc-opt:hover { border-color: var(--blue-l); box-shadow: var(--sh-1); }
.cc-opt b { display: block; font-size: 15.5px; }
.cc-opt small { display: block; }
.cc-ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: var(--blue); flex: none; }
.cc-opt.works .cc-ic { background: var(--ws-bg); color: var(--ws); }
.cc-opt.qa .cc-ic { background: var(--grad); color: #fff; }
.cc-opt.nreq .cc-ic { background: repeating-linear-gradient(135deg, #eef1f5 0 5px, #dde3eb 5px 7px); color: #5b6678; }
.cc-opt.stc .cc-ic { background: #fff; color: #5b6678; border: 1.5px dashed #9aa6b8; }
.cc-opt.busy { opacity: .6; pointer-events: none; }
.cc-hist { margin-top: 14px; }
/* bulk delete + admin edit */
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; background: #fff4f5; border: 1px solid #f6c5cc; border-radius: 12px; }
.bulk-bar[hidden] { display: none; }
.tbl th.ck, .tbl td.ck { width: 36px; padding-right: 0; }
.tbl .ck input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
ul.impact { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
ul.impact li { margin: 4px 0; }
.ae-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ae-2 .lbl { margin-top: 0; }
.ae-sec .lbl-row .lbl { margin: 0; }
.ae-ans { margin-top: 8px; }
.ae-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.ae-row label { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 320px; cursor: pointer; }
.ae-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); flex: none; margin-top: 1px; }
.ae-row:not(.on) { background: #fff8f9; }
.ae-row .inp.sm { min-height: 36px; padding: 6px 10px; font-size: 14px; flex: 1 1 200px; }
ol.sheet-ro { margin: 0; padding-left: 22px; }
ol.sheet-ro li { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
ol.sheet-ro li.a-sec { list-style: none; margin-left: -22px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); padding-top: 12px; }
@media (max-width: 760px) { .ae-2 { grid-template-columns: 1fr; } }
.qa-up { margin: 4px 0 12px; }
.qa-up .btn { margin-bottom: 6px; }
.qa-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit; }
.qa-file b { display: block; font-size: 14px; }
.qa-file small { color: var(--muted); }
.qa-file img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.qa-file.bad { border-color: #f6c5cc; background: #fff8f9; }
.qa-rec .btn { margin-top: 12px; }
#qf-checks[hidden], #qf-count[hidden], #qf-all[hidden], #qf-hint[hidden] { display: none !important; }

/* ---------- snags ---------- */
.snag-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.snag-card { display: block; }
.snag-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.snag-card-top h3 { margin: 0; font-size: 16px; }
.snag-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.snag-card-meta span { display: inline-flex; gap: 4px; align-items: center; }
.snag-card-meta .t-ok { color: var(--ok); font-weight: 600; }
.snag-edit-card { margin-bottom: 16px; }
.snag-add-card { background: var(--soft); border-style: dashed; }
.snag-add-card h3 { display: flex; align-items: center; gap: 8px; color: var(--blue); margin-bottom: 12px; }
.snag-add-photos { margin-top: 14px; }
.snag-item-card { margin-bottom: 12px; }
.snag-item-head { display: flex; align-items: flex-start; gap: 12px; }
.snag-item-desc { margin: 0; white-space: pre-wrap; }
.snag-detail-item { margin-bottom: 14px; position: relative; }
.snag-detail-item.done { background: var(--ok-bg); border-color: #b5e5c4; }
.snag-item-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.snag-num { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.snag-images { margin: 10px 0; }
.snag-responses { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.snag-response { padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.snag-response.from-admin { background: #eef4ff; }
.snag-response.from-client { background: #f0fff4; }
.snag-resp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.snag-resp-head b { font-size: 13px; }
.snag-response p { margin: 0; white-space: pre-wrap; }
.snag-item-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.ph-btns { display: flex; gap: 8px; margin-top: 10px; }
.ph-grid.sm .ph { width: 60px; height: 60px; }
.ph-grid.sm .ph img { border-radius: 6px; }

/* ---------- forms ---------- */
.form-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.form-card { display: block; }
.form-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.form-card-top h3 { margin: 0; font-size: 16px; flex: 1; }
.form-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.form-edit-card, .form-q-card, .form-field, .form-answer { margin-bottom: 14px; }
.form-q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.form-q-head .grow { flex: 1; min-width: 200px; }
.form-sig-preview { max-width: 360px; margin: 10px 0; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; background: #fff; }
.form-sig-preview img { width: 100%; height: auto; display: block; }
.dash-form-alert { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; text-decoration: none; color: inherit; }
.dash-form-alert:hover { border-color: var(--warn); }
.form-fill .form-field:last-of-type { margin-bottom: 0; }
.pre { white-space: pre-wrap; margin: 0; }
.digest-pre { white-space: pre-wrap; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; max-height: min(60vh, 640px); overflow: auto; background: var(--soft); padding: 14px; border-radius: 10px; }
.digest-panel .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.digest-token { margin-top: 12px; }
.digest-token summary { cursor: pointer; }

.dash-search { margin-bottom: 16px; }
.dash-search-modal { padding-top: 4px; max-height: min(62vh, 520px); overflow: auto; }
.dash-search-dialog .modal { display: flex; flex-direction: column; max-height: min(88vh, 640px); }
.dash-search-dialog .dash-search-modal { flex: 1; min-height: 0; }
.dash-sr-list { display: flex; flex-direction: column; gap: 8px; }
.dash-sr-back { align-self: flex-start; margin-bottom: 8px; }
.dash-sr-ctx { margin: 0 0 10px; padding: 0 2px; }
.dash-search-empty { padding: 12px 4px; }
.dash-sr-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--soft); width: 100%; text-align: left; font: inherit; cursor: pointer; }
.dash-sr-row:hover { border-color: var(--blue); background: #fff; }
.dash-sr-row small { display: block; color: var(--muted); margin-top: 3px; }
.amend-hl { outline: 2px solid #e8a317; outline-offset: 2px; background: #fff8e6 !important; border-radius: 8px; }
li.amend-hl { outline-offset: 0; }
.amend-hl-note { color: #9a6700; font-weight: 600; margin-top: 8px; }
.amend-cm-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.amend-cm-list li { padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.amend-cm-prior { margin-top: 12px; }
.inp.read-only { background: var(--soft); color: var(--ink); cursor: default; resize: none; }
.cam-wrap { text-align: center; }
.cam-vid { width: 100%; max-height: min(50vh, 360px); background: #111; border-radius: 10px; object-fit: cover; }
