/* Brand fonts, self-hosted as on interconengineering.com.au (SIL OFL):
   Inter for text, Archivo for headings. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/archivo-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/archivo-latin-700-normal.woff2') format('woff2'); }

/* Light only: pages carry fixed light panels, so a phone in dark mode
   would get pale text on white. The layout sets data-theme="light". */
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --thead: #f6f8fb;
  --row-hover: #f8fafd;
  --ink: #231f20;
  --ink-2: #5b6169;
  --line: #e3e7ee;
  --navy: #231f20;
  --navy-2: #3a3538;
  --accent: #0047bb;
  --accent-ink: #ffffff;
  --warn: #8a5300;
  --warn-bg: #fff6e3;
  --bad: #9b1c1c;
  --bad-bg: #fdecec;
  --good: #0b6e4f;
  --good-bg: #e6f4ef;
  --r: 12px;
  --tap: 46px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1521;
    --panel: #16202e;
    --thead: #1b2738;
    --row-hover: #1a2535;
    --ink: #e8edf5;
    --ink-2: #9aa9c0;
    --line: #26344a;
    --navy: #0a1220;
    --navy-2: #1c3557;
    --accent: #2da37c;
    --accent-ink: #06130e;
    --warn: #f0c274;
    --warn-bg: #2d2413;
    --bad: #f3a4a4;
    --bad-bg: #331a1a;
    --good: #7ddcb5;
    --good-bg: #12291f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
:root { --display: "Archivo", "Inter", system-ui, sans-serif; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; }
main { flex: 1 0 auto; width: 100%; }

/* ------------------------------------------------------------ app shell */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .35rem;
  height: 58px; padding: 0 14px;
  background: #1b1819; color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 6px 18px rgba(0,0,0,.12);
}
.appbar a { text-decoration: none; }
.appbar .spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; padding-right: .4rem; flex: none; }
.mark { height: 22px; width: auto; flex: none; display: block; }
.bt { font-weight: 700; font-size: .92rem; letter-spacing: .01em; padding-left: .7rem; border-left: 1px solid rgba(255,255,255,.22); white-space: nowrap; }
.proj {
  display: flex; flex-direction: column; justify-content: center; line-height: 1.12;
  max-width: 19rem; margin: 0 .5rem 0 .2rem; padding: .3rem .7rem; border-radius: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10); color: #fff; flex: 0 0 auto; min-width: 8.5rem;
}
.proj:hover { background: rgba(255,255,255,.12); }
.proj.on { background: rgba(77,148,255,.18); border-color: rgba(77,148,255,.45); }
.proj small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: #a9b4c4; }
.proj b { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-main { display: flex; align-items: center; gap: .1rem; height: 100%; }
.nav-sep { width: 1px; align-self: stretch; margin: .9rem .45rem; background: rgba(255,255,255,.22); }
.nav-link, .dd-btn {
  display: inline-flex; align-items: center; gap: .35rem; height: 38px;
  padding: 0 .75rem; border-radius: 8px; border: 0; background: none;
  color: #d4dbe6; font: inherit; font-size: .88rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  min-height: 0;
}
.nav-link:hover, .dd-btn:hover, .dd.open > .dd-btn { background: rgba(255,255,255,.08); color: #fff; border-color: transparent; }
.nav-link.on, .dd.on > .dd-btn { color: #fff; background: rgba(77,148,255,.18); box-shadow: inset 0 -2px 0 #4d94ff; }
.dd { position: relative; height: 100%; display: flex; align-items: center; }
.dd-btn svg { opacity: .7; transition: transform .15s; }
.dd.open > .dd-btn svg:last-child { transform: rotate(180deg); }
.dd-menu {
  display: none; position: absolute; top: calc(100% - 4px); left: 0; z-index: 50;
  min-width: 17rem; padding: .4rem; border-radius: 12px;
  background: #fff; color: #1f2430; border: 1px solid #e4e7ee;
  box-shadow: 0 18px 40px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
}
.dd-menu.dd-right { left: auto; right: 0; }
.dd.open > .dd-menu { display: block; }
.dd-head { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #8a93a3; padding: .45rem .7rem .3rem; }
.dd-menu a { display: block; padding: .5rem .7rem; border-radius: 8px; color: #1f2430; }
.dd-menu a b { display: block; font-size: .88rem; font-weight: 600; }
.dd-menu a small { display: block; font-size: .74rem; color: #6b7484; margin-top: .05rem; }
.dd-menu a:hover { background: #f2f5fa; }
.dd-menu a.on { background: #eaf1ff; }
.dd-menu a.on b { color: #0047bb; }
.dd-menu .dd-out { border-top: 1px solid #eef0f4; border-radius: 0 0 8px 8px; margin-top: .3rem; }
.dd-menu .dd-out b { color: #9b1c1c; }

.scanbtn, .taskbtn {
  display: inline-flex; align-items: center; gap: .4rem; height: 36px; padding: 0 .85rem; border-radius: 8px;
  font-size: .85rem; font-weight: 700; white-space: nowrap; color: #fff;
}
.scanbtn { background: #0047bb; }
.scanbtn:hover { background: #0a55d1; }
.scanbtn.on { box-shadow: 0 0 0 2px rgba(77,148,255,.5); }
.taskbtn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.dd-user .dd-btn { gap: .55rem; padding: 0 .5rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3b7bf0, #0047bb); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .02em; flex: none; }
.who { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.who b { font-size: .82rem; color: #fff; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.who small { font-size: .66rem; color: #a9b4c4; font-weight: 500; }
.navtoggle { display: none; }

/* The section you are in: its pages as tabs. */
.subnav { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 58px; z-index: 30; }
.subnav-in { max-width: 78rem; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav-title { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); padding-right: .9rem; margin-right: .3rem; border-right: 1px solid var(--line); white-space: nowrap; }
.subnav a { padding: .78rem .75rem .7rem; font-size: .86rem; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Alerts that follow you (overdue invoices, open spool actions, NDT short…) */
.alerts { max-width: 46rem; margin: 14px auto 0; padding: 0 16px; display: grid; gap: .5rem; width: 100%; }
.alerts.wide { max-width: 78rem; }
.alert { border-radius: 10px; padding: .6rem .9rem; font-size: .86rem; border: 1px solid; border-left-width: 4px; position: relative; }
.alert[data-dismiss] { padding-right: 2.6rem; }
.alert-x { position: absolute; top: .45rem; right: .5rem; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; opacity: .55; font-size: .95rem; line-height: 1; cursor: pointer; }
.alert-x:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.alert.amber { background: #fff8eb; border-color: #f3d9a4; border-left-color: #b35c00; }
.alert.red { background: #fdf0f0; border-color: #f2c4c4; border-left-color: #9b1c1c; }
.alert.blue { background: #eef4ff; border-color: #c9dafb; border-left-color: #0047bb; }
.alert a { text-decoration: none; }
.alert a:hover { text-decoration: underline; }
.alert summary { font-size: .82rem; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; max-width: 78rem; width: 100%; margin: 1.5rem auto 0; padding: 1rem 16px 1.6rem; color: var(--ink-2); font-size: .74rem; border-top: 1px solid var(--line); }

/* The bar narrows step by step only when it does not fit (the script in the page
   header adds nf1..nf5 to <html>); nf5 folds the sections into the Menu. */
html.nf2 .bt { display: none; }
html.nf2 .nav-link, html.nf2 .dd-btn { padding: 0 .55rem; }
html.nf2 .lbl-long, html.nf2 .who { display: none; }
html.nf2 .proj { max-width: 12rem; }
html.nf3 .nav-link, html.nf3 .dd-btn { padding: 0 .42rem; font-size: .84rem; }
html.nf3 .scanbtn span, html.nf3 .nav-admin span { display: none; }
html.nf3 .scanbtn { padding: 0 .65rem; }
html.nf3 .nav-sep { margin: .9rem .25rem; }
html.nf3 .proj { max-width: 10rem; min-width: 7.5rem; }
html.nf4 .proj { max-width: 8rem; min-width: 6.5rem; }
html.nf4 .nav-link, html.nf4 .dd-btn { padding: 0 .32rem; font-size: .8rem; }
html.nf4 .appbar { gap: .15rem; padding: 0 8px; }
/* Phones and small tablets: the sections fold into one Menu. */
@media (max-width: 1080px) {
  .appbar { height: 54px; padding: 0 8px; gap: .25rem; }
  .navtoggle { display: inline-flex; align-items: center; gap: .3rem; height: 38px; min-height: 0; padding: 0 .6rem; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; border-radius: 8px; font-size: .8rem; font-weight: 700; }
  .brand .mark { height: 18px; }
  .proj { display: none; }
  .scanbtn span { display: none; }
  .scanbtn { padding: 0 .65rem; }
  .taskbtn { padding: 0 .55rem; font-size: .78rem; }
  .nav-main { display: none; position: fixed; top: 54px; left: 0; right: 0; bottom: 0; height: auto; overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: .6rem .8rem 2rem; background: #1b1819; z-index: 45; }
  body.nav-open .nav-main { display: flex; }
  .nav-sep { width: auto; height: 1px; margin: .6rem 0; }
  body.nav-open { overflow: hidden; }
  .nav-main .nav-link { height: auto; padding: .8rem .6rem; font-size: 1rem; border-radius: 8px; }
  .nav-main .dd { height: auto; display: block; }
  .nav-main .dd > .dd-btn { display: none; }
  .nav-main .dd > .dd-menu { display: block; position: static; min-width: 0; background: none; border: 0; box-shadow: none; padding: .2rem 0 .6rem; }
  .nav-main .dd-head { color: #8f9bb0; padding: .8rem .6rem .3rem; border-top: 1px solid rgba(255,255,255,.08); }
  .nav-main .dd-menu a { color: #fff; padding: .6rem .6rem; }
  .nav-main .dd-menu a small { color: #9aa6b8; }
  .nav-main .dd-menu a:hover, .nav-main .dd-menu a.on { background: rgba(255,255,255,.08); }
  .nav-main .dd-menu a.on b { color: #8fb8ff; }
  .subnav { top: 54px; }
  .subnav-title { display: none; }
}
html.nf5 .appbar { height: 54px; padding: 0 8px; gap: .25rem; }
html.nf5 .navtoggle { display: inline-flex; align-items: center; gap: .3rem; height: 38px; min-height: 0; padding: 0 .6rem; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; border-radius: 8px; font-size: .8rem; font-weight: 700; }
html.nf5 .brand .mark { height: 18px; }
html.nf5 .proj { display: none; }
html.nf5 .scanbtn span { display: none; }
html.nf5 .scanbtn { padding: 0 .65rem; }
html.nf5 .taskbtn { padding: 0 .55rem; font-size: .78rem; }
html.nf5 .nav-main { display: none; position: fixed; top: 54px; left: 0; right: 0; bottom: 0; height: auto; overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: .6rem .8rem 2rem; background: #1b1819; z-index: 45; }
html.nf5 body.nav-open .nav-main { display: flex; }
html.nf5 .nav-sep { width: auto; height: 1px; margin: .6rem 0; }
html.nf5 body.nav-open { overflow: hidden; }
html.nf5 .nav-main .nav-link { height: auto; padding: .8rem .6rem; font-size: 1rem; border-radius: 8px; }
html.nf5 .nav-main .dd { height: auto; display: block; }
html.nf5 .nav-main .dd > .dd-btn { display: none; }
html.nf5 .nav-main .dd > .dd-menu { display: block; position: static; min-width: 0; background: none; border: 0; box-shadow: none; padding: .2rem 0 .6rem; }
html.nf5 .nav-main .dd-head { color: #8f9bb0; padding: .8rem .6rem .3rem; border-top: 1px solid rgba(255,255,255,.08); }
html.nf5 .nav-main .dd-menu a { color: #fff; padding: .6rem .6rem; }
html.nf5 .nav-main .dd-menu a small { color: #9aa6b8; }
html.nf5 .nav-main .dd-menu a:hover, html.nf5 .nav-main .dd-menu a.on { background: rgba(255,255,255,.08); }
html.nf5 .nav-main .dd-menu a.on b { color: #8fb8ff; }
html.nf5 .subnav { top: 54px; }
html.nf5 .subnav-title { display: none; }
@media (max-width: 420px) {
  .brand .mark { height: 16px; }
  .avatar { width: 28px; height: 28px; }
}

main { max-width: 46rem; margin: 0 auto; padding: 18px 16px; }
main.wide { max-width: 78rem; }

h1 { font-size: 1.45rem; font-weight: 700; margin: .2rem 0 .3rem; }
h2 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .7rem; }
h2 small, h1 small { font-weight: 500; color: var(--ink-2); font-size: .78rem; margin-left: .45rem; }
.sub { color: var(--ink-2); margin: .2rem 0 1rem; font-size: .9rem; }
.hint { color: var(--ink-2); font-size: .78rem; margin: .6rem 0 0; }
.crumb { margin: 0 0 .3rem; font-size: .86rem; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.empty { color: var(--ink-2); font-size: .88rem; padding: .8rem 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; color: var(--ink-2); word-break: break-all; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem 1.2rem; margin: 0 0 1rem; box-shadow: var(--shadow);
}

.ok, .err {
  border-radius: var(--r); padding: .7rem .85rem; margin: 0 0 1rem; font-size: .88rem;
}
.ok { background: var(--good-bg); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.err { background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.ok ul, .err ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.ok a { color: inherit; }

/* ------------------------------------------------------------ buttons */
button, .btn {
  font: inherit; font-weight: 600; font-size: .9rem;
  min-height: var(--tap); padding: .5rem 1rem;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
button:hover, .btn:hover { border-color: var(--ink-2); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.07); border-color: var(--accent); }
.big { min-height: 54px; font-size: 1rem; width: 100%; }
.link { background: none; border: none; color: var(--navy-2); text-decoration: underline; min-height: 34px; padding: 0 .4rem; font-size: .84rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link { color: #7fb6ea; } }
.btnrow { display: flex; flex-wrap: wrap; gap: .5rem; }
.x { min-height: 26px; padding: 0 .45rem; line-height: 1; font-size: 1rem; }
.mt { margin-top: .8rem; }

/* ------------------------------------------------------------ forms */
input, select, textarea {
  font: inherit; font-size: 1rem;
  min-height: var(--tap); width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--navy-2); outline-offset: 1px; }
/* Tick boxes and radio buttons stay their own size (pages that want bigger ones set it). */
input:where([type=checkbox], [type=radio]) { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; vertical-align: middle; accent-color: var(--accent); cursor: pointer; }
label { font-size: .84rem; font-weight: 600; color: var(--ink-2); display: block; }

/* Sign-in: brand panel + form */
body:has(.login-split) .appbar { display: none; }
/* Sign-in page: a big card on laptops, then "what this is all about". */
body:has(.login-split) { background: radial-gradient(90rem 40rem at 50% -10rem, #e4ecfb 0%, var(--bg) 60%); }
.login-split, .intro { word-break: keep-all; overflow-wrap: anywhere; }
.login-split { display: grid; grid-template-columns: 1.25fr 1fr; max-width: 74rem; min-height: min(36rem, 78vh); margin: 5vh auto 0; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(16, 24, 40, .14); }
.login-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 3rem 3rem 2.6rem; color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, #0b5be0 0%, #003a9c 38%, #141a2b 100%); }
.login-brand[style] { text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.login-logo { height: 32px; width: auto; align-self: flex-start; }
.login-kicker { margin: 0; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: #a8c4ff; }
.login-title { margin: .4rem 0 .7rem; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.04; letter-spacing: -.03em; }
.login-tag { margin: 0; color: #d3def5; font-size: 1.08rem; max-width: 28rem; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; }
.login-points li { border-top: 1px solid rgba(255,255,255,.2); padding-top: .7rem; }
.login-points b { display: block; font-size: .92rem; }
.login-points span { display: block; font-size: .8rem; color: #b8c7e4; }
.demo-bar { background: #e0a03c; color: #1b1300; text-align: center; font-size: .82rem; padding: .35rem 1rem; }
button.danger { color: #9b1c1c; border-color: #e8b4b4; }
button.danger:hover { background: #fdecec; border-color: #9b1c1c; }
.trial-bar { background: #dbe7fb; color: #0b2a66; }
.demo-bar a { color: inherit; font-weight: 700; margin-left: .4rem; }
.demo-pick { justify-content: flex-start; }
.demo-roles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
.demo-roles form { margin: 0; }
.demo-roles button { display: block; width: 100%; height: 100%; text-align: left; font-weight: 400; box-shadow: none; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; min-height: 0; }
.demo-roles button:hover { border-color: var(--accent); background: var(--row-hover); }
.demo-roles b { display: block; font-size: .9rem; }
.demo-roles small { display: block; font-size: .74rem; color: var(--ink-2); font-weight: 400; }
@media (max-width: 520px) { .demo-roles { grid-template-columns: 1fr; } }
.login-certs { margin: 0; font-size: .72rem; letter-spacing: .04em; color: #b8c7e4; }
.login-certs b { color: #fff; font-weight: 600; }
.login { padding: 3rem 3rem; display: flex; flex-direction: column; justify-content: center; }
.login h1 { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; margin: 0 0 .2rem; }

.intro { max-width: 74rem; margin: 4.5rem auto 2rem; }
.intro-kicker { margin: 0 0 .6rem; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); }
.intro-kicker.light { color: #a8c4ff; }
.intro-head { max-width: 52rem; }
.intro-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 1rem; color: var(--ink); }
.intro-lead { margin: 0 0 .7rem; font-size: 1.08rem; line-height: 1.65; color: var(--ink-2); }
.intro-stats { list-style: none; padding: 0; margin: 2.2rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.intro-stats li { background: var(--panel); padding: 1.2rem 1.3rem; }
.intro-stats b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.intro-stats span { display: block; font-size: .86rem; color: var(--ink-2); margin-top: .15rem; }
.intro-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.intro-cap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.4rem 1.3rem; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.intro-cap:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(16, 24, 40, .1); }
.intro-ic { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; background: #e8efff; color: var(--accent); margin-bottom: .9rem; }
.intro-cap h3 { font-family: var(--display); font-weight: 700; font-size: 1.08rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.intro-cap p { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--ink-2); }
.intro-flow { margin: 2.2rem 0 0; border-radius: 20px; padding: 2.2rem 2.4rem; color: #fff; display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: center;
  background: linear-gradient(110deg, #0a1a3a, #003a9c 60%, #141a2b); background-size: cover; background-position: center; }
.intro-flow h3 { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.intro-flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.intro-flow li { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .92rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: .65rem .75rem; backdrop-filter: blur(2px); }
.intro-flow li span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #0a1a3a; font-size: .8rem; font-weight: 800; }
.intro-foot { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; justify-content: center; margin: 2.2rem 0 0; font-size: .86rem; color: var(--ink-2); text-align: center; }
.intro-foot p { margin: 0; }
@media (max-width: 1000px) {
  .intro-caps { grid-template-columns: 1fr 1fr; }
  .intro-stats { grid-template-columns: 1fr 1fr; }
  .intro-flow { grid-template-columns: 1fr; }
}
.login label { margin: .9rem 0 0; }
.login input { margin-top: .3rem; }
.login button { margin-top: 1.3rem; }
.login-lang { display: flex; justify-content: center; gap: .4rem; margin: 1rem 0 0; }
.login-lang a { font-size: .78rem; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 99px; }
.login-lang a:hover { color: var(--ink); border-color: var(--ink-2); }
@media (max-width: 760px) {
  .login-split { grid-template-columns: 1fr; margin: 0 auto; border-radius: 14px; }
  .login-brand { padding: 1.5rem 1.4rem; gap: 1rem; }
  .login-title { font-size: 1.5rem; }
  .login-points { display: none; }
  .login { padding: 1.5rem 1.4rem; }
  .login h1 { font-size: 1.5rem; }
  .intro { margin: 2.5rem auto 1rem; }
  .intro-caps, .intro-stats { grid-template-columns: 1fr; }
  .intro-flow { padding: 1.5rem 1.3rem; }
  .intro-flow ol { grid-template-columns: 1fr 1fr; }
}

.fields { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .fields { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .fields { grid-template-columns: repeat(3, 1fr); } }
.f label { margin-bottom: .25rem; }
.f .ctl { display: flex; gap: .4rem; align-items: center; }
.f.has label { color: var(--ink); }
.ctl .today { min-height: 40px; padding: 0 .6rem; font-size: .8rem; flex: none; }
.ro { font-size: .95rem; padding: .5rem 0; display: flex; align-items: center; gap: .5rem; min-height: var(--tap); }
.lock { font-style: normal; font-size: .64rem; text-transform: uppercase; letter-spacing: .04em;
  background: var(--warn-bg); color: var(--warn); padding: .1rem .35rem; border-radius: 4px; }
.pre { color: var(--ink-2); font-size: .72rem; }
.actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.inline { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { width: auto; min-height: 38px; }
.inline button { min-height: 38px; padding: .3rem .7rem; font-size: .82rem; }
.cb { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink); }
.cb input { width: 20px; height: 20px; min-height: 20px; flex: none; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input { flex: 1 1 14rem; }
.filters select { flex: 0 1 10rem; }

/* Home banner with a workshop photo: taller, text on the tinted side. */
.welcome.has-photo { min-height: 12.5rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6rem 1.7rem; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
@media (max-width: 640px) { .welcome.has-photo { min-height: 10rem; padding: 1.2rem 1.1rem; } }

/* ------------------------------------------------------------ hero / kpis */
.hero { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; }
.kpis { display: flex; gap: .5rem; flex-wrap: wrap; }
.kpis.wide { margin-bottom: 1rem; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .8rem; min-width: 5.4rem; box-shadow: var(--shadow);
}
.kpi b { display: block; font-size: 1.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-2); font-size: .72rem; }

/* ------------------------------------------------------------ spool list */
.spools { display: grid; gap: .5rem; }
.spool {
  display: grid; gap: .3rem .8rem; align-items: center;
  grid-template-columns: 1fr auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: .8rem .9rem; text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.spool:hover { border-color: var(--ink-2); }
.sl b { display: block; font-size: 1rem; }
.sl small { color: var(--ink-2); font-size: .78rem; }
.sm { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.sr { grid-column: 1 / -1; }
.sr small { color: var(--ink-2); font-size: .74rem; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: .25rem; }
.bar i { display: block; height: 100%; background: var(--accent); }

.chip {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .2rem .45rem; border-radius: 5px; background: var(--line); color: var(--ink-2);
}
.chip.done { background: var(--good-bg); color: var(--good); }
.chip.wip { background: var(--warn-bg); color: var(--warn); }
.chip.q { background: transparent; border: 1px solid var(--line); }

/* ------------------------------------------------------------ spool head */
.spoolhead { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.shl { flex: 1 1 22rem; }
.shl dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem .8rem; margin: .6rem 0 0; }
.shl dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.shl dd { margin: 0; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.shr { flex: 0 0 9rem; text-align: center; }
.shr small { display: block; color: var(--ink-2); font-size: .74rem; margin-top: .35rem; }
.shbtns { display: grid; gap: .35rem; margin-top: .7rem; }
.shbtns .btn { min-height: 38px; font-size: .82rem; }
.ring {
  --p: 0;
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.ring span {
  width: 64px; height: 64px; border-radius: 50%; background: var(--panel);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}

.ref { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem .9rem; margin: 0; }
.ref dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.ref dd { margin: 0; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ weld list */
.listhead { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.picks { display: flex; align-items: center; gap: .2rem; }
.pc { font-size: .78rem; color: var(--ink-2); margin-left: .3rem; }

.welds { display: grid; gap: .3rem; margin-top: .6rem; }
.weld {
  display: grid; align-items: center; gap: .2rem .7rem;
  grid-template-columns: auto auto 1fr auto;
  border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .7rem; cursor: pointer; font-weight: 400;
}
.weld:has(.wpick:checked) { border-color: var(--accent); background: var(--good-bg); }
.weld.dim { opacity: .55; }
.wpick { width: 24px; height: 24px; min-height: 24px; flex: none; margin: 0; }
.wno { font-weight: 700; font-size: .95rem; min-width: 3.2rem; }
.wmeta { color: var(--ink-2); font-size: .78rem; }
.wchips { display: flex; gap: .25rem; flex-wrap: wrap; grid-column: 1 / -1; }
@media (min-width: 720px) { .wchips { grid-column: auto; justify-content: flex-end; } }
.wopen { font-size: .76rem; color: var(--ink-2); }
/* A primary (blue) open button keeps white text — the line above made it unreadable. */
.wopen.btn.primary { color: #fff; }
.tick {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .15rem .4rem; border-radius: 4px; background: var(--good-bg); color: var(--good);
}
.tick.none { background: var(--line); color: var(--ink-2); }
.tick.pend { background: var(--warn-bg); color: var(--warn); }
.tick.bad { background: var(--bad-bg); color: var(--bad); }
.tick.ndt { outline: 1px solid color-mix(in srgb, var(--good) 35%, transparent); }

/* ------------------------------------------------------------ entry cards */
.entry { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: .7rem; box-shadow: var(--shadow); }
.entry > summary {
  padding: .85rem 1rem; cursor: pointer; display: flex; gap: .6rem; align-items: baseline;
  font-size: .95rem;
}
.entry > summary span { color: var(--ink-2); font-size: .78rem; }
.entry .fields, .entry .actions { padding: 0 1rem; }
.entry .actions { padding-bottom: 1rem; }
.entry[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: .9rem; }

.methods { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom: 1rem; }
.method { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.method:has(input:checked) { border-color: var(--accent); background: var(--good-bg); }
.method input { width: 22px; height: 22px; min-height: 22px; flex: none; }
.method small { color: var(--ink-2); font-size: .76rem; }

/* ------------------------------------------------------------ history */
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.hist li { display: grid; grid-template-columns: auto auto 1fr; gap: .2rem .7rem; font-size: .8rem; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.ht { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hu { font-weight: 700; }
.hf { color: var(--ink-2); }
.hv { grid-column: 1 / -1; font-weight: 600; }
@media (min-width: 700px) { .hist li { grid-template-columns: 11rem 5rem 14rem 1fr; } .hv { grid-column: auto; } }
.hr { grid-column: 1 / -1; color: var(--warn); font-size: .76rem; }

/* ------------------------------------------------------------ tables */
.grid { width: 100%; border-collapse: collapse; font-size: .84rem; display: block; overflow-x: auto; white-space: nowrap; }
.grid.small { font-size: .78rem; }
.grid th { background: var(--thead); color: var(--ink-2); text-align: left; padding: .55rem .65rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.grid th a { color: inherit; }
.grid td { padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
.grid tbody tr:hover td { background: var(--row-hover); }
.grid tr.dim td { opacity: .5; }
.grid pre { white-space: pre-wrap; font-size: .72rem; margin: .3rem 0; }

/* ------------------------------------------------------------ admin */
.uploader { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.uploader input[type=file] { flex: 1 1 16rem; padding: .5rem; }
.newuser { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); margin-bottom: 1rem; }
.settings { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
.settings input { margin-top: .25rem; }
.lists { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.listbox { border: 1px solid var(--line); border-radius: 8px; padding: .7rem; }
.listbox h4 { margin: 0 0 .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.listbox ul { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .25rem; }
.listbox li { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .86rem; }

/* ------------------------------------------------- NDT request basket */
.badge {
  display: inline-block; min-width: 18px; margin-left: .35rem; padding: 0 .3rem;
  background: #e8a33d; color: #22150a; border-radius: 99px;
  font-size: .7rem; font-weight: 800; text-align: center; line-height: 18px;
}
.basketbar {
  background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--r); padding: .7rem .85rem; font-size: .88rem; margin: 0 0 1rem;
}
.basketbar a { color: inherit; font-weight: 700; }
.bgroup + .bgroup { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.bgroup h3 { margin: 0 0 .4rem; font-size: .92rem; }
.bgroup h3 small { font-weight: 500; color: var(--ink-2); margin-left: .4rem; font-size: .76rem; }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.blist li {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; font-size: .88rem;
}
.blist li form { margin-left: auto; }
.bm {
  font-size: .7rem; font-weight: 800; letter-spacing: .03em;
  background: var(--navy-2); color: #fff; padding: .15rem .4rem; border-radius: 4px; min-width: 2.2rem; text-align: center;
}
.notes { min-height: 5rem; font-size: .92rem; line-height: 1.45; resize: vertical; }
.settings label.full { grid-column: 1 / -1; }
.settings label small { font-weight: 500; color: var(--ink-2); margin-left: .3rem; }
.warnish { color: var(--warn); font-size: .8rem; }

.qrcard { text-align: center; }
.qr { width: min(280px, 80vw); height: auto; image-rendering: pixelated; background: #fff; padding: 10px; border-radius: 8px; }
.qrcard .btnrow { justify-content: center; margin-top: .8rem; }
.wh { margin-bottom: .6rem; }

/* Tick-then-save rows (PE tasks / spool actions): ticked but not saved yet. */
[data-tick-row].tick-pending { opacity: .55; }
[data-tick-row].tick-pending [data-tick-text] { text-decoration: line-through; }

/* "On this page" jump links (pages with <nav data-toc>) */
.toc { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 1rem; }
.toc:empty { display: none; }
.toc-label { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-right: .3rem; }
.toc a { font-size: .8rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: .3rem .65rem; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
main h2[id], main section[id] { scroll-margin-top: 120px; }
/* The bell: unread count, latest items, see all */
.dd-bell .bell-btn { position: relative; width: 40px; justify-content: center; padding: 0; }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: .66rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #1b1819; }
.bell-menu { width: 23rem; max-width: calc(100vw - 16px); padding: 0; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid #eef0f4; }
.bell-head b { font-size: .92rem; }
.bell-head form { margin: 0; }
.bell-head .link { min-height: 0; font-size: .78rem; color: #0047bb; padding: 0; text-decoration: none; font-weight: 600; }
.bell-menu .bell-item { display: flex; gap: .6rem; padding: .65rem .9rem; border-radius: 0; border-bottom: 1px solid #f2f4f7; max-height: 6.5rem; overflow: hidden; }
.bell-item i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: .4rem; background: transparent; }
.bell-item.new { background: #f4f8ff; }
.bell-item.new i { background: #0047bb; }
.bell-item b { font-size: .84rem; line-height: 1.3; }
.bell-item small { color: #6b7484; font-size: .76rem; line-height: 1.35; }
.bell-item small.when { color: #98a1b0; font-size: .7rem; margin-top: .15rem; }
.bell-empty { margin: 0; padding: 1rem .9rem; color: #6b7484; font-size: .84rem; }
.bell-menu .bell-all { display: block; text-align: center; padding: .65rem; font-size: .82rem; font-weight: 700; color: #0047bb; background: #fafbfd; border-radius: 0; }
@media (max-width: 1080px) { .bell-menu { position: fixed; top: 58px; left: 8px; right: 8px; width: auto; max-width: none; } }

/* Notifications page */
.notes { padding: .4rem 0; }
.note-day { margin: .9rem 1.2rem .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.note { display: grid; grid-template-columns: 10px 8.5rem 1fr auto; gap: .8rem; align-items: start; padding: .75rem 1.2rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.note:hover { background: var(--row-hover); }
.note i { width: 8px; height: 8px; border-radius: 50%; margin-top: .45rem; }
.note.new i { background: var(--accent); }
.note.new .note-main b { color: var(--accent); }
.note-kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding-top: .2rem; }
.note-main b { display: block; font-size: .92rem; }
.note-main small { display: block; color: var(--ink-2); font-size: .82rem; }
.note-when { font-size: .74rem; color: var(--ink-2); text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .note { grid-template-columns: 10px 1fr; gap: .15rem .7rem; } .note-kind, .note-main, .note-when { grid-column: 2; text-align: left; } }
/* ======================================================================
   Design layer (Oct 2026): one look for every page — brand palette, type
   scale, depth, motion. Later rules override the base above; pages keep
   their markup. Motion is off for anyone who asks for reduced motion.
   ====================================================================== */
:root {
  --bg: #f2f5fa;
  --panel: #ffffff;
  --thead: #f5f7fb;
  --row-hover: #f3f7ff;
  --ink: #0f1728;
  --ink-2: #5a6478;
  --line: #e4e8f0;
  --accent: #0b57d0;            /* Intercon blue, a touch brighter on screen */
  --accent-2: #3d82f6;
  --accent-soft: #eaf1ff;
  --good: #0a7a55; --good-bg: #e5f6ef;
  --warn: #9a5b00; --warn-bg: #fff4dc;
  --bad: #b42318; --bad-bg: #fdecea;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 40, .04), 0 2px 8px rgba(15, 23, 40, .05);
  --shadow-lg: 0 10px 30px rgba(15, 23, 40, .10), 0 2px 6px rgba(15, 23, 40, .05);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body {
  background: radial-gradient(70rem 30rem at 50% -8rem, #e3ebfb 0%, rgba(227, 235, 251, 0) 70%) no-repeat, var(--bg);
  letter-spacing: -.003em;
}
::selection { background: #cfe0ff; }
h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
h2 { font-size: 1.08rem; font-weight: 750; letter-spacing: -.012em; }
td, .kpi b, .pg-big { font-variant-numeric: tabular-nums; }

/* ---------- app bar: deep brand navy, pill navigation, icons ---------- */
.appbar {
  background: linear-gradient(100deg, #0b1220 0%, #10203f 55%, #0b1a36 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0 8px 24px rgba(5, 12, 30, .25);
  height: 60px;
}
.nav-link, .dd-btn { border-radius: 10px; color: #c9d4e6; transition: background .18s var(--ease), color .18s var(--ease); }
.nav-link.on, .dd.on > .dd-btn { background: rgba(61, 130, 246, .22); box-shadow: inset 0 0 0 1px rgba(122, 170, 255, .35); color: #fff; }
.dd-btn .sec-ic { opacity: .85; }
.proj { border-radius: 10px; transition: background .18s; }
.scanbtn { background: linear-gradient(135deg, #3d82f6, #0b57d0); border-radius: 10px; box-shadow: 0 4px 14px rgba(11, 87, 208, .45); transition: transform .15s var(--ease), box-shadow .15s; }
.scanbtn:hover { background: linear-gradient(135deg, #5694fa, #1463df); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(11, 87, 208, .55); }
.avatar { background: linear-gradient(135deg, #5b9bff, #0b57d0); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.subnav { top: 60px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.subnav a { transition: color .15s, border-color .15s; }

/* menus open with a short fade + lift instead of popping */
.dd-menu { display: block; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top left;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s linear .16s; border-radius: 14px; box-shadow: var(--shadow-lg); }
.dd-menu.dd-right { transform-origin: top right; }
.dd.open > .dd-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s; }
.dd-menu a { border-radius: 10px; transition: background .12s; }
.dd-menu a.on { background: var(--accent-soft); }
.dd-menu a.on b { color: var(--accent); }

/* ---------- page entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main > * { animation: rise .38s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .04s; } main > *:nth-child(3) { animation-delay: .08s; }
main > *:nth-child(4) { animation-delay: .12s; } main > *:nth-child(5) { animation-delay: .16s; }
main > *:nth-child(n+6) { animation-delay: .2s; }

/* ---------- cards ---------- */
.card { border-radius: var(--r); border-color: #e6eaf2; box-shadow: var(--shadow); padding: 1.25rem 1.35rem; }
a.card, .spool, .intro-cap { transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
a.card:hover, .spool:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #cfdaf0; }

/* ---------- buttons ---------- */
button, .btn { border-radius: var(--r-sm); border-color: #d9dfea; transition: background .15s, border-color .15s, box-shadow .15s, transform .12s var(--ease), color .15s; }
button:hover, .btn:hover { border-color: #b8c3d6; background-color: #f8faff; }
button:active, .btn:active { transform: scale(.98); }
.primary, button.primary, .btn.primary { background: linear-gradient(135deg, #3d82f6 0%, #0b57d0 100%); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(11, 87, 208, .28); }
.primary:hover, button.primary:hover, .btn.primary:hover { background: linear-gradient(135deg, #5694fa 0%, #1463df 100%); filter: none; border-color: transparent; box-shadow: 0 6px 18px rgba(11, 87, 208, .38); transform: translateY(-1px); }
:focus-visible { outline: 3px solid rgba(61, 130, 246, .45); outline-offset: 2px; }
.link { color: var(--accent); }

/* ---------- forms ---------- */
input, select, textarea { border-radius: var(--r-sm); border-color: #d9dfea; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #b8c3d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(61, 130, 246, .16); }
label { color: #4a5468; }

/* ---------- tables ---------- */
.grid { border-radius: 12px; }
.grid th { background: #f4f7fc; color: #5a6478; font-size: .68rem; letter-spacing: .07em; padding: .6rem .7rem; }
.grid td { padding: .58rem .7rem; border-bottom-color: #edf0f5; }
.grid tbody tr td { transition: background .12s; }

/* ---------- chips, ticks, alerts ---------- */
.chip, .tick { border-radius: 99px; padding: .2rem .55rem; letter-spacing: .04em; }
.alert { border-radius: 12px; box-shadow: var(--shadow); }
.ok, .err { border-radius: 12px; }
.badge { background: linear-gradient(135deg, #ffb547, #f08c00); color: #fff; }

/* ---------- progress: bars fill in ---------- */
@keyframes grow { from { width: 0; } }
.bar { height: 7px; background: #e9edf4; }
.bar i { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 99px; animation: grow .9s var(--ease) both; }
.ring { box-shadow: 0 6px 18px rgba(11, 87, 208, .15); }

/* ---------- lists ---------- */
.spool { border-radius: 14px; }
.weld { border-radius: 12px; transition: border-color .15s, background .15s, box-shadow .15s; }
.weld:hover { border-color: #c9d6ee; box-shadow: var(--shadow); }
.entry { border-radius: 14px; }
.entry > summary { transition: background .15s; border-radius: 14px; }
.entry > summary:hover { background: #f8faff; }
.foot { border-top-color: #e6eaf2; }
/* Weld page for fitters / welders: the joint at a glance above the entry form. */
.weld-glance { display: flex; flex-wrap: wrap; gap: .5rem; padding: .8rem; }
.weld-glance span { flex: 1 1 6.5rem; background: var(--accent-soft); border-radius: 12px; padding: .5rem .7rem; }
.weld-glance small { display: block; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #4a6aa8; }
.weld-glance b { display: block; font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
/* Weld rows: tick · weld no · details · status · Open on one line on wider screens. */
@media (min-width: 720px) {
  .weld:has(.wpick) { grid-template-columns: auto auto 1fr auto auto; }
  .weld .wopen { justify-self: end; }
}

/* ---------- phones: a bottom tab bar for the everyday actions ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    background: rgba(255, 255, 255, .95); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid #e3e8f1; padding: .3rem .4rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15, 23, 40, .06);
  }
  .tabbar.t3 { grid-template-columns: repeat(3, 1fr); }
  .tabbar a, .tabbar button { min-height: 52px; border: 0; background: none; box-shadow: none; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    color: #5a6478; font-size: .68rem; font-weight: 700; text-decoration: none; padding: 0; position: relative; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on::before { content: ""; position: absolute; top: 2px; width: 28px; height: 3px; border-radius: 99px; background: var(--accent); }
  .tabbar .tab-scan .ic { width: 48px; height: 48px; margin-top: -1.5rem; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3d82f6, #0b57d0); box-shadow: 0 8px 20px rgba(11, 87, 208, .45); }
  .tabbar .tab-scan { color: #0b57d0; }
  .tabbar .tab-n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #e5484d; color: #fff; font-size: .62rem; line-height: 17px; }
  body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.has-tabbar .appbar .scanbtn, body.has-tabbar .appbar .dd-bell { display: none; }
  h1 { font-size: 1.45rem; }
  .card { padding: 1.05rem 1rem; }
}
@media (max-width: 1080px) {
  .appbar { height: 56px; }
  .subnav { top: 56px; }
  .nav-main { top: 56px; background: linear-gradient(180deg, #0b1220, #10203f); }
  .nav-main .dd > .dd-menu { opacity: 1; visibility: visible; transform: none; transition: none; box-shadow: none; }
}
/* The logo says Intercon; the bar keeps its room for the sections. */
.appbar .bt { display: none; }
/* Section icons only where the bar has room (and in the phone menu headings). */
html.nf1 .appbar .nav-link .sec-ic, html.nf1 .appbar .dd-btn .sec-ic { display: none; }
@media (max-width: 1080px) { .nav-main .dd-head .sec-ic { display: inline-block; vertical-align: -3px; margin-right: .35rem; } }
html.nf5 .nav-main { background: linear-gradient(180deg, #0b1220, #10203f); }
html.nf5 .nav-main .dd > .dd-menu { opacity: 1; visibility: visible; transform: none; transition: none; box-shadow: none; }
html.nf5 .nav-main .dd-head .sec-ic { display: inline-block; vertical-align: -3px; margin-right: .35rem; }
.dd-head .sec-ic { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* drag & drop onto a file upload */
form.drop-on { outline: 2px dashed #0047bb; outline-offset: 4px; background: rgba(0, 71, 187, .08); border-radius: 8px; }
.drop-hint { font-size: .85rem; color: var(--muted, #667085); }

/* phone notifications card */
.push-card [hidden] { display: none !important; }

/* wide tables scroll in their own box (app.js), not the whole page */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
main { overflow-wrap: break-word; }
@media (max-width: 760px) { main input:not([type=checkbox]):not([type=radio]), main select, main textarea { max-width: 100%; } main .inline > label { min-width: 0; max-width: 100%; } }

/* Messages (src/views_messages.js) */
.msg-panel { scroll-margin-top: 70px; }
.msg { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .5rem; background: #fff; max-width: 46rem; }
.msg.mine { background: #eef4ff; border-color: #cddcf7; margin-left: auto; }
.msg-who { font-size: .82rem; margin-bottom: .15rem; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-form textarea { width: 100%; box-sizing: border-box; margin-top: .3rem; }
.msg-row { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: .4rem; }
.msg-row select { max-width: 16rem; }
.msg-n { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; text-align: center; }
.msg-start { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; } .msg-start label { display: flex; flex-direction: column; gap: .2rem; min-width: 0; } .msg-start select, .msg-start input { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .msg-start { grid-template-columns: 1fr; } }
/* Back / Forward, in the installed app (app.js) */
.appbar .histbtns { display: inline-flex; gap: .25rem; flex: none; }
.appbar .histbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; border-radius: 8px; }
.appbar .histbtn:hover { background: rgba(255,255,255,.18); }
.appbar .histbtn.off { opacity: .35; pointer-events: none; }
@media (max-width: 760px) { .appbar .histbtn { width: 32px; height: 34px; } }
.msg-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; } .msg-del { margin: 0 0 0 auto; } .msg-del .link { background: none; border: 0; padding: 0; min-height: 0; color: #9a2b2b; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.appbar .msg-icon { position: relative; width: 40px; justify-content: center; padding: 0; flex: none; }
@media (max-width: 480px) { .appbar:has(.histbtns) .navtoggle span { display: none; } .appbar:has(.histbtns) .navtoggle { padding: 0 .5rem; } .appbar .histbtns { gap: .15rem; } .appbar .histbtn { width: 30px; } }
