  :root {
    --bg: #f4f5f7; --card: #fff; --text: #1b1f24; --muted: #667080; --line: #dde1e6;
    --accent: #0b5cad; --accent-text: #fff; --ok: #1e7b3a; --warn: #a15c00; --err: #b3261e;
  }
  @media (prefers-color-scheme: dark) {
    :root { --bg: #111418; --card: #1b2026; --text: #e6e9ed; --muted: #9aa4b0; --line: #2c333b;
            --accent: #4c9be8; --accent-text: #0b1520; --ok: #5cc27a; --warn: #e0a24a; --err: #f08a80; }
            .top .logo img { background: #fff; border-radius: 6px; padding: 3px 6px; }
  }
  * { box-sizing: border-box; }
  body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
  header { position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: var(--page-w, 1100px); margin: 0 auto 8px; }
  .top .logo img { height: 26px; width: auto; display: block; }
  .top small { color: var(--muted); }
  .top a { color: var(--accent); }
  .groups, .tabs { display: flex; gap: 4px; max-width: var(--page-w, 1100px); margin: 0 auto 6px; overflow-x: auto; scrollbar-width: none; }
  .groups a { white-space: nowrap; padding: 6px 12px; color: var(--muted); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; }
  .groups a.on { color: var(--text); border-bottom-color: var(--accent); }
  @media (max-width: 520px) { .groups { flex-wrap: wrap; overflow: visible; gap: 0 2px; } .groups a { padding: 5px 8px; font-size: 15px; } }
  .tabs { margin-bottom: 8px; }
  .tabs a { white-space: nowrap; padding: 5px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
  .tabs a.on { background: var(--bg); color: var(--text); }
  .bomtbl td { vertical-align: top; }
  h3.ogroup { margin: 22px 0 8px; padding-top: 12px; border-top: 2px solid var(--line); }
  details.ogroup { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
  details.ogroup > summary { cursor: pointer; margin-bottom: 8px; }
  h3.og-out { color: var(--err); border-top-color: var(--err); } div.og-out > .card { border-left: 4px solid var(--err); }
  details.og-done { border-top-color: var(--ok); } details.og-done > summary strong { color: var(--ok); } details.og-done > .card { border-left: 4px solid var(--ok); }
  .olc { display: flex; gap: 12px; align-items: flex-start; } .olcb { flex: 1; min-width: 0; } .olc > .pkthumb { width: 56px; height: 56px; flex: none; }
  .pkghead .olc > .pkthumb { width: 110px; height: 110px; } .pkghead { margin-bottom: 6px; }
  .pkgrp { border-left: 3px solid var(--line); padding-left: 8px; margin-bottom: 14px; }
  .osec { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); } .osec h3 { margin-top: 0; }
  img.thumb, img.pkthumb { cursor: zoom-in; }
  .lblov { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .lblov .card { max-width: 460px; width: 100%; margin: 0; } .lblov canvas { display: block; max-width: 100%; border: 1px solid var(--line, #ccc); border-radius: 4px; background: #fff; margin: 8px 0; image-rendering: pixelated; }
  button.lblbtn { padding: 3px 8px; font-size: 12px; margin-top: 4px; }
  .zoomov { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
  .zoomov img { max-width: 95vw; max-height: 90vh; object-fit: contain; border-radius: 6px; background: #fff; }
  .zoomov button { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.9); font-size: 26px; line-height: 1; cursor: pointer; }
  .morefold > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
  .morefold > .form { margin-top: 8px; }
  .bomtbl tr[data-fixrow] td { border-top: 0; padding-top: 0; }
  .bomtbl .thumb { width: 40px; height: 40px; border-radius: 5px; object-fit: contain; background: var(--bg); display: block; }
  .short { color: var(--err); font-weight: 600; }
  .okq { color: var(--ok); } .warnq { color: #b26a00; font-weight: 600; }
  .picklist { border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; max-height: 320px; overflow: auto; }
  .picklist > div { padding: 8px 10px; border-top: 1px solid var(--line); cursor: pointer; }
  .picklist > div:first-child { border-top: 0; }
  .picklist .pk { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
  .pkthumb { width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: var(--bg); display: block; }
  /* user-resizable table columns (widths saved per user) */
  table.rz { table-layout: fixed; }
  table[data-rz] th { position: relative; }
  .card:has(table.rz), main:has(> table.rz) { overflow-x: auto; }
  table.rz th { overflow: hidden; text-overflow: ellipsis; }
  table.rz td { overflow-wrap: anywhere; }
  .colgrip { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 1; touch-action: none; }
  .colgrip:hover, .colgrip.drag { background: var(--accent); opacity: .35; }
  .bomtbl tr.nomatch td { background: color-mix(in srgb, var(--err) 10%, var(--card)); }
  .picklist > div:hover { background: var(--bg); }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .chips a { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; text-decoration: none; color: var(--text); font-size: 14px; }
  .chips a.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
  .searchbar { display: flex; gap: 8px; max-width: var(--page-w, 1100px); margin: 0 auto; }
  /* phones: the search box gets its own full-width line, the buttons share the line below */
  @media (max-width: 640px) { .searchbar { flex-wrap: wrap; } .searchbar #q:not(.hidden) { flex: 1 1 100%; }
    .searchbar button { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; } }
  #q { flex: 1; min-width: 0; font-size: 17px; padding: 11px 12px;
       border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
  main { max-width: var(--page-w, 1100px); margin: 0 auto; padding: 12px 16px 40px; }
  .muted { color: var(--muted); }
  .row { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
         display: grid; grid-template-columns: 56px 1fr auto; gap: 2px 10px; cursor: pointer; align-items: start; }
  .row .thumb { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 6px; object-fit: contain; background: var(--bg); }
  .row .din { font-weight: 600; font-variant-numeric: tabular-nums; }
  .row .qty { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
  .row > .rowctl { grid-column: 1 / -1; margin-top: 6px; }
  .row .desc { grid-column: 2 / -1; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .row.inactive { opacity: .6; }
  .row.mkcard { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .row.dragging { opacity: .85; box-shadow: 0 6px 18px rgba(0,0,0,.25); transform: scale(1.02); position: relative; z-index: 5; }
  body.dragmode { cursor: grabbing; }
  .micbtn { position: fixed; z-index: 50; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 18px; background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
  .micbtn.on { background: var(--err); border-color: var(--err); animation: micpulse 1.2s infinite; }
  @keyframes micpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--err) 30%, transparent); } }
  .miclive { position: fixed; z-index: 50; padding: 6px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .row[data-tk], .row[data-mk], .row[data-asm], .row[data-job], .row[data-go] { position: relative; }
  .row.hasnew { box-shadow: 0 0 0 2px var(--err); }
  .itemnew { position: absolute; top: -7px; right: -7px; z-index: 1; box-shadow: 0 0 0 2px var(--bg); }
  .newnote { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px;
    background: color-mix(in srgb, var(--err) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--err) 35%, var(--card)); }
  .thnew { border-left: 3px solid var(--err); padding-left: 8px; }
  .newnote .nbadge { flex: none; margin-top: 1px; }
  .nbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: 12px; line-height: 18px; text-align: center; font-weight: 700; }
  .chatrow { display: flex; gap: 10px; align-items: center; cursor: pointer; }
  .chatrow .cname { font-weight: 700; } .chatrow .cprev { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chatrow.unread .cprev { color: var(--text); font-weight: 600; }
  .avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 700; }
  .avatar.ch { border-radius: 10px; background: var(--muted); }
  img.avatar { object-fit: cover; background: var(--bg); } .avatar.sm { width: 28px; height: 28px; font-size: 11px; } .avatar.lg { width: 72px; height: 72px; font-size: 24px; }
  .mrow { display: flex; gap: 6px; align-items: flex-end; } .mrow.mine { justify-content: flex-end; } .mrow .bubble { align-self: auto; }
  .mrow .avspace { width: 28px; flex: none; }
  .msgs { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
  .msg-day { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 4px; }
  .bubble { max-width: 82%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; overflow-wrap: anywhere; }
  .bubble.mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
  .bubble .who { font-size: 13px; font-weight: 700; color: var(--accent); }
  .bubble .txt { white-space: pre-wrap; }
  .quote { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 6px; padding: 3px 8px; margin: 2px 0 4px; font-size: 13px; cursor: pointer; }
  .quote div { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
  .composer .replybar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
  .composer .replybar.hidden { display: none; }
  .bubble.flash { outline: 2px solid var(--accent); }
  .callended { display: inline-block; margin: 6px 0 2px; padding: 6px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 14px; }
  .voicemsg { display: flex; align-items: center; gap: 6px; margin: 4px 0; } .voicemsg audio { width: 230px; max-width: 60vw; height: 38px; }
  .composer .recbar { display: flex; align-items: center; gap: 8px; padding: 6px 2px; } .composer .recbar.hidden, .composer .crow.hidden, .composer textarea.hidden { display: none; }
  .recdot { width: 12px; height: 12px; border-radius: 50%; background: var(--err); animation: micpulse 1.2s infinite; }
  .bubble a.joinmeet { display: inline-block; margin: 6px 0 2px; padding: 8px 14px; border-radius: 8px; background: var(--accent) !important; color: var(--accent-text) !important; text-decoration: none; font-weight: 700; }
  .bubble .meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
  .bubble .meta a { color: var(--muted); }
  .bubble.gone .txt { font-style: italic; color: var(--muted); }
  .bubble img.chatimg { display: block; width: auto; height: auto; max-width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; margin: 4px 0; cursor: zoom-in; background: var(--bg); }
  .bubble .chatfile { display: block; padding: 6px 8px; margin: 4px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-decoration: none; color: var(--text); }
  /* the typing box is pinned to the bottom of the screen (above the phone keyboard: --kb), the messages scroll behind it */
  .composer { position: fixed; z-index: 5; left: 0; right: 0; bottom: var(--kb, 0px); margin: 0 auto; max-width: var(--page-w, 1100px); background: var(--bg); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); max-height: calc(100dvh - var(--kb, 0px) - 60px); overflow-y: auto; }
  body.chatmode main { padding-bottom: calc(var(--comp-h, 120px) + var(--kb, 0px) + 12px); }   /* the last message stays above the typing box and the keyboard */
  /* conversation screen, Messenger style */
  body.chatmode { background: var(--card); }
  @media (max-width: 700px) { body.chatmode header { display: none; } body.chatmode main { padding-top: 0; } }
  body.chatwide main { max-width: 1500px; }
  .chat2 { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
  .chatside { position: sticky; top: calc(var(--hdr-h, 0px) + 8px); max-height: calc(100dvh - var(--hdr-h, 0px) - 16px); overflow-y: auto; padding-right: 4px; }
  .chatside .card.chatrow { background: transparent; border: 0; box-shadow: none; border-radius: 10px; padding: 8px; margin: 0 0 2px; }
  .chatside .card.chatrow:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
  .chatside .card.chatrow.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .chatside > .headrow { flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .chatside > .headrow > span { display: flex; gap: 6px; }
  .chatside .headrow button { padding: 6px 10px; } .chatside .chatrow .headrow .sub { white-space: nowrap; flex-shrink: 0; }
  .chatside { border-right: 1px solid var(--line); }
  .chat2 .composer { right: auto; margin: 0; max-width: none; padding-left: 0; padding-right: 0; }
  .chat2 .chathead .back { display: none; }
  .chatempty { display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; }
  .mchat .chathead { background: var(--card); padding: 6px 0; gap: 6px; justify-content: flex-start; }
  .chathead .back { color: var(--accent); margin-left: -8px; }
  .chathead .ttl { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .chathead .ttl .avatar { width: 40px; height: 40px; }
  .chathead .nm { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chathead .st { font-size: 13px; color: var(--muted); } .chathead .st a { color: var(--muted); }
  .ibtn { background: none; border: 0; padding: 0; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; width: 40px; height: 40px; flex: none; cursor: pointer; }
  .ibtn svg { width: 26px; height: 26px; fill: currentColor; } .ibtn.sm { width: 30px; height: 30px; color: var(--muted); } .ibtn.sm svg { width: 18px; height: 18px; }
  .ibtn:disabled { opacity: .4; } .ibtn .thumb { font-size: 28px; line-height: 1; }
  .chatmenu { position: absolute; right: 0; top: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 6; min-width: 200px; overflow: hidden; }
  .chatmenu a { display: block; padding: 11px 14px; color: var(--text); text-decoration: none; } .chatmenu.hidden { display: none; }
  .mchat .msgs { gap: 2px; padding-top: 6px; }
  .mchat .mrow { gap: 8px; align-items: flex-end; } .mchat .mrow.newrun { margin-top: 8px; }
  .mcol { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 75%; min-width: 0; }
  .mrow.mine .mcol { align-items: flex-end; }
  .mchat .bubble { max-width: 100%; align-self: auto; border: 0; border-radius: 18px; padding: 8px 12px; background: color-mix(in srgb, var(--text) 8%, var(--card)); line-height: 1.35; }
  .mchat .bubble.mine { background: var(--accent); color: var(--accent-text); }
  .mchat .bubble.mine a { color: inherit; text-decoration: underline; }
  .mchat .mrow:not(.mine).cont .bubble { border-top-left-radius: 5px; } .mchat .mrow:not(.mine).more .bubble { border-bottom-left-radius: 5px; }
  .mchat .mrow.mine.cont .bubble { border-top-right-radius: 5px; } .mchat .mrow.mine.more .bubble { border-bottom-right-radius: 5px; }
  .mchat .bubble.media { background: none; padding: 0; border-radius: 0; }
  .mchat .bubble.media img.chatimg { border-radius: 18px; margin: 0 0 2px; }
  .mchat .bubble.big { background: none; padding: 0; font-size: 44px; line-height: 1.1; }
  .mchat .bubble.gone { background: none; border: 1px solid var(--line); color: var(--muted); font-style: italic; }
  .mchat .bubble.mine a.joinmeet { background: var(--accent-text) !important; color: var(--accent) !important; text-decoration: none; }
  .mchat .bubble.mine .callended { background: rgba(255,255,255,.2); color: inherit; }
  .mchat .mcol .who { font-size: 12px; color: var(--muted); margin: 0 12px; }
  .mchat .mtime { display: none; font-size: 11px; color: var(--muted); margin: 0 8px; } .mcol.showtime .mtime { display: block; }
  .mchat .rq .quote { margin: 0 0 -2px; opacity: .8; border-radius: 12px; }
  .mchat .msg-day { font-size: 12px; margin: 14px 0 6px; }
  .mchat .flash .bubble { outline: 2px solid var(--accent); outline-offset: 2px; }
  .mchat .seen { display: flex; justify-content: flex-end; gap: 2px; margin: 1px 4px 3px; } .mchat .seen.theirs { justify-content: flex-start; padding-left: 36px; }
  .avatar.xs { width: 16px; height: 16px; font-size: 7px; }
  .mchat .seentext { text-align: right; font-size: 12px; color: var(--muted); margin: 0 4px 6px; }
  .macts { display: none; align-self: center; } @media (hover: hover) { .mrow:hover .macts { display: flex; } }
  /* phones: pictures and videos keep their React / Reply buttons in view (holding a picture on an iPhone opens its own
     photo menu), and the picture itself does not start that menu */
  @media (hover: none) { .mrow:has(.bubble.media) .macts { display: flex; flex-direction: column; gap: 2px; } }
  .chatimg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
  @media (pointer: coarse) { .mchat .mcol { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
  .msheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
  .msheet .card { width: 100%; max-width: 460px; margin: 0 8px calc(8px + env(safe-area-inset-bottom)); padding: 6px 0; border-radius: 14px; }
  .msheet button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 13px 18px; font-size: 16px; color: var(--text); }
  .msheet button.danger { color: var(--err); }
  .mchat .composer { background: var(--card); border-top: 0; padding-top: 6px; }
  .mchat .composer .crow { align-items: flex-end; gap: 2px; }
  .crow .tools { display: flex; } .crow .toolsbtn { display: none; }
  .composer.typing .crow .tools { display: none; } .composer.typing .crow .toolsbtn { display: inline-flex; }
  .crow .pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--text) 7%, var(--card)); border-radius: 20px; margin: 0 4px; }
  .mchat .composer textarea { border: 0; background: transparent; margin: 0; min-height: 40px; padding: 9px 2px 9px 14px; border-radius: 20px; }
  .mchat .composer textarea:focus { outline: none; }
  .mchat .composer .recbar { padding: 0; }
  .mentions { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); margin-bottom: 6px; max-height: 240px; overflow-y: auto; }
  .mentions.hidden { display: none; }
  .mentions > div { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; } .mentions > div.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
  .mentions .avatar { width: 30px; height: 30px; font-size: 12px; }
  .bubble .mention { font-weight: 700; } .bubble:not(.mine) .mention { color: var(--accent); }
  .pcard { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin: 2px 0; max-width: 440px; text-align: left; }
  .pcard .pcimg { width: 104px; height: 104px; flex: none; object-fit: contain; border-radius: 12px; background: #fff; cursor: zoom-in; margin: 0; display: block; }
  .pcard span.pcimg { background: var(--bg); cursor: default; }
  .pcbody { min-width: 0; padding-top: 2px; } .pccode { font-weight: 700; font-size: 15px; } .pcdesc { font-size: 14px; margin-top: 2px; }
  .pclong { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; } .pclong.open { -webkit-line-clamp: unset; display: block; }
  .mrow.mine .pcard { margin-left: auto; }
  .pend .pendcard { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; background: var(--card); }
  .imgwrap { position: relative; display: block; } .imgwrap.flash img { outline: 3px solid var(--accent); outline-offset: 2px; } .imgwrap .imgreply { position: absolute; right: 6px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; }
  @media (hover: hover) { .imgwrap .imgreply { opacity: 0; } .imgwrap:hover .imgreply { opacity: 1; } }
  .quote:has(.qpic) { min-width: 170px; }
  .rqpic ~ .bubble { position: relative; }
  .rqpic { cursor: pointer; display: flex; flex-direction: column; } .mrow.mine .rqpic { align-items: flex-end; }
  .rqpic img { max-height: 120px; max-width: 160px; border-radius: 14px; opacity: .5; margin-bottom: -10px; object-fit: cover; }
  .rqlabel { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; margin: 2px 6px 3px; } .rqlabel svg { width: 13px; height: 13px; fill: currentColor; }
  .quote img.qpic { float: right; width: 36px; height: 36px; object-fit: cover; border-radius: 6px; margin-left: 8px; }
  .persontop { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
  .persontop .pic { margin-top: 0; max-height: 300px; } @media (max-width: 700px) { .persontop { grid-template-columns: 1fr; } }
  .tkpics { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
  .tkpics figure { margin: 0; position: relative; } .tkpics img { display: block; height: 110px; width: auto; max-width: 100%; border-radius: 8px; cursor: pointer; background: var(--bg); object-fit: cover; }
  .tkpics.sortable img { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } .tkpics figure.dragging { opacity: .5; }
  .jline { display: flex; gap: 8px; align-items: flex-start; } .jline > div { min-width: 0; }
  .jthumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: var(--bg); display: block; }
  @media (max-width: 600px) { .jthumb { flex-basis: 36px; width: 36px; height: 36px; } }
  .dinedit { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; margin: 0 2px 0 3px; border: 0; border-radius: 50%;
    background: transparent; color: var(--muted); cursor: pointer; vertical-align: -5px; } .dinedit:hover { background: var(--bg); color: var(--accent); }
  .dinedit svg { width: 15px; height: 15px; fill: currentColor; }
  .lblov .card.dinedcard { max-width: 760px; max-height: calc(100dvh - 32px); overflow-y: auto; }
  .mfig { position: relative; display: block; cursor: zoom-in; } .mfig img { display: block; width: 100%; border-radius: 10px; background: var(--bg); }
  svg.marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
  .tkpics .picwrap { overflow: hidden; border-radius: 8px; } .tkpics .picwrap svg.marks { border-radius: 8px; }
  svg.marks g.hl { animation: mkblink .5s 5 alternate; } @keyframes mkblink { to { opacity: .15; } }
  .mzoom { max-width: 96vw; max-height: 92vh; } .mzoom img { max-width: 96vw; max-height: 92vh; width: auto; border-radius: 0; }
  .mlegend { margin: 8px 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
  .mlegend ol { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; } .mlegend li { cursor: pointer; display: flex; gap: 8px; align-items: flex-start; }
  .mlg { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .mlgdin { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .mlgdin .thumb, .mkchip .thumb { width: 28px; height: 28px; border-radius: 4px; object-fit: contain; background: var(--card); }
  .msub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; } .msub .button { padding: 4px 10px; font-size: 14px; }
  .mkov .mkhead { padding: 4px 12px 6px; font-weight: 700; border-bottom: 1px solid var(--line); }
  .mkrow { display: flex; gap: 8px; align-items: flex-start; padding: 6px 12px; border-bottom: 1px solid var(--line); } .mkrow.on { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
  .mkrow .mnum { margin-top: 8px; } .mkbody { flex: 1; min-width: 0; } .mkbody textarea { width: 100%; box-sizing: border-box; resize: none; min-height: 38px; margin: 0; }
  .mkdin { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; } .mkdin button { padding: 4px 10px; font-size: 13px; }
  .mkchip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; border-radius: 8px; background: var(--bg); }
  .mnum, .mref { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; font-size: 13px; font-weight: 700; flex: none; }
  .mref { background: var(--err); color: #fff; cursor: pointer; vertical-align: 1px; margin: 0 1px; }
  .mkov .mkstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; overflow: auto; }
  .mkov .mkfig { display: inline-block; cursor: crosshair; touch-action: none; } .mkov .mkfig img { max-width: 100%; max-height: 58vh; width: auto; border-radius: 0; }
  .mkov .mksvg svg.marks { pointer-events: auto; } .mkov .mksvg svg.marks text { pointer-events: none; } .mkov [data-h] { cursor: move; }
  .mkov .mklist { max-height: 36vh; overflow-y: auto; background: var(--card); color: var(--text); padding: 6px 0; } .mkrow { padding: 2px 12px; }
  .mkov .cropbar { flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
  .mkov .cropbar > button { min-height: 40px; } .mkov .cropbar .mkico:not(.hidden) { padding-left: 10px; padding-right: 10px; display: inline-flex; align-items: center; justify-content: center; } .mkov .cropbar svg { width: 20px; height: 20px; fill: currentColor; display: block; }
  .mkov .mkfig { position: relative; } .mkcrop { position: absolute; inset: 0; pointer-events: none; }
  .mkcrop i { position: absolute; border: 2px dashed #fff; outline: 1px solid #000; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); }
  .mkcols { display: inline-flex; gap: 4px; } .mkcols button { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #888; }
  .mkcols button.on { outline: 3px solid var(--accent); outline-offset: 1px; }
  .rtbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg); }
  .rtbar button { padding: 4px 9px; min-width: 32px; } .rtbar select { padding: 4px; }
  .rtpal { display: inline-flex; gap: 2px; align-items: center; font-size: 13px; padding: 0 4px; } .rtpal button { width: 20px; min-width: 20px; height: 20px; padding: 0; border-radius: 4px; border: 1px solid #999; font-size: 11px; }
  .rted { min-height: 120px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 10px 12px; background: var(--card); margin: 0; outline: none; }
  .rted:focus { border-color: var(--accent); }
  .mbody.rich { white-space: normal; } .mbody.rich p, .mbody.rich div { margin: 0; } .mbody.rich ul, .mbody.rich ol { margin: 4px 0; padding-left: 24px; }
  .mstep { scroll-margin-top: calc(var(--hdr-h, 0px) + 70px); }
  .mstephead { display: flex; align-items: center; gap: 10px; } .mstep .mstephead h3 { margin: 0; flex: 1; font-size: 18px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 700; }
  .mstepno { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
  .mstep.mdone .mstepno { background: var(--ok); } .mstep.mdone { opacity: .75; } .mstep.mnext { box-shadow: 0 0 0 2px var(--accent); }
  .mtools { display: flex; gap: 4px; align-items: center; }
  .mgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 10px 0; align-items: start; }
  .mgal img { width: 100%; border-radius: 10px; display: block; cursor: zoom-in; background: var(--bg); }
  .mvid { margin: 10px 0; display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; } .mvid video { width: 100%; max-width: 720px; max-height: 70vh; border-radius: 10px; background: #000; }
  .maud { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; } .maud audio { max-width: 100%; }
  .mbody { white-space: pre-wrap; font-size: 16px; line-height: 1.5; margin: 10px 0; }
  .mnote { margin: 8px 0; padding: 8px 12px; border-radius: 8px; border-left: 4px solid; }
  .mn-caution { background: color-mix(in srgb, var(--err) 12%, var(--card)); border-color: var(--err); }
  .mn-tip { background: color-mix(in srgb, var(--ok) 12%, var(--card)); border-color: var(--ok); }
  .mn-tool { background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-color: var(--accent); }
  .mn-torque { background: color-mix(in srgb, #d08700 14%, var(--card)); border-color: #d08700; }
  .mparts { margin: 10px 0; } .mpart { display: flex; gap: 10px; align-items: center; padding: 4px 0; } .mpart .thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: var(--bg); flex: none; }
  .mmeta { margin-top: 8px; } .mtick { margin-top: 10px; } .mtickbtn { font-size: 17px; padding: 10px 18px; }
  .minsert { text-align: center; margin: -4px 0 8px; } .minsert button { font-size: 13px; padding: 4px 12px; }
  .mblock.edit { border: 1px dashed var(--line); border-radius: 10px; padding: 6px 8px; margin: 6px 0; }
  .mbtools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } .mbtools > .sub { flex: 1; }
  .minsblock { text-align: center; margin: -2px 0; line-height: 1; } .minsblock button { font-size: 13px; padding: 0 8px; opacity: .6; } .minsblock button:hover { opacity: 1; }
  .maddbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; padding: 6px 8px; border-radius: 10px; background: var(--bg); }
  .maddbar button { font-size: 13px; padding: 4px 10px; }
  .clientav { background: color-mix(in srgb, #d08700 25%, var(--card)); font-size: 20px; }
  .chatsec { margin: 10px 0 4px; padding: 6px 4px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; display: flex; gap: 6px; align-items: center; }
  .histall tr.undone td { opacity: .55; } .histall td { vertical-align: top; }
  .chatrow.closedrow { opacity: .75; }
  .swrap { position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 8px; } .swrap > .chatrow { position: relative; z-index: 1; margin: 0; transition: transform .2s; touch-action: pan-y; }
  .swact { position: absolute; right: 0; top: 0; bottom: 0; width: 96px; border: 0; border-radius: 0 12px 12px 0; background: #6b7280; color: #fff; font-weight: 700; cursor: pointer; }
  .swrap .swact { display: none; } .swrap.open .swact, .swrap:has(> .chatrow[style*="translate"]) .swact { display: block; }
  .chatsec.fixed { cursor: default; } .chatsec .caret { display: inline-block; transition: transform .15s; } .chatsec.open .caret { transform: rotate(90deg); }
  .supmsg { padding: 8px 10px; border-radius: 10px; margin: 8px 0; border: 1px solid var(--line); } .supmsg.cl { background: var(--bg); }
  .supmsg.st { background: color-mix(in srgb, var(--accent) 8%, var(--card)); } .supmsg.in { background: color-mix(in srgb, #d08700 12%, var(--card)); border-style: dashed; }
  .kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 8px; }
  .mimprow { border-top: 1px solid var(--line); padding: 8px 0; } .mimprow.off { opacity: .45; } .mstepno.sm { width: 24px; height: 24px; font-size: 13px; }
  .mimpth { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .mimpth img { height: 56px; border-radius: 6px; }
  .mbody table { border-collapse: collapse; margin: 6px 0; max-width: 100%; display: block; overflow-x: auto; } .mbody td, .mbody th { border: 1px solid var(--line); padding: 3px 8px; font-size: 14px; vertical-align: top; }
  .mfile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; } .mfile > a:first-of-type { min-width: 0; overflow-wrap: anywhere; }
  .bompick { max-height: 260px; overflow-y: auto; margin-top: 4px; } .bompick .row { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 4px; }
  /* document tiles (manual Files blocks), like the website's Downloads */
  .dltiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 4px 0 8px; }
  .dltile { position: relative; }
  .dlface { position: relative; text-decoration: none; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; background: var(--bg); border: 1px solid var(--line);
            border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transition: box-shadow .15s, transform .15s; }
  .dlface:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transform: translateY(-1px); }
  .dlface img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
  .dlext { font-weight: 800; font-size: 22px; letter-spacing: .04em; color: var(--accent); background: #fff; border: 2px solid var(--accent); border-radius: 6px; padding: 8px 12px; }
  .dlbtns { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
  .dlbtns a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(20, 30, 45, .72); color: #fff; text-decoration: none; }
  .dlbtns a:hover { background: var(--accent); }
  .dlname { font-weight: 600; font-size: 14px; margin-top: 8px; line-height: 1.3; }
  .dlmeta { font-size: 12px; color: var(--muted); }
  .mdocpick label { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
  /* address book (addrbook.js) */
  .abform { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; margin: 8px 0; }
  .abform label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
  .abform label input { font-size: 15px; color: var(--text); }
  .abform .wide { grid-column: 1 / -1; } .abdef { display: flex; gap: 18px; flex-wrap: wrap; } .abdef label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
  /* engraving preview and HCU settings (custom.js) */
  .cxface { position: relative; width: 100%; overflow: hidden; user-select: none; }      /* the picture exactly as cropped: no frame, no rounded corners */
  .cxface > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
  .cxspot { position: absolute; display: flex; align-items: center; justify-content: center; container-type: size; }
  .cxspot.ed { outline: 1.5px dashed #4cc3ff; cursor: pointer; } .cxspot.ed.sel { outline: 2px solid #ffb300; background: rgba(255, 179, 0, .15); }
  .cxtext span { color: #e9e9e9; font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: 72cqh; line-height: 1; white-space: nowrap; letter-spacing: .03em; }
  .cxc { border-radius: 4px; } .cxc-blue { background: #1565c0; } .cxc-red { background: #c62828; } .cxc-green { background: #2e7d32; } .cxc-black { background: #000; box-shadow: inset 0 0 0 1px #777; }   /* button colour */
  .cxcol { display: inline-flex; gap: 4px; align-items: center; } .cxcol i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; vertical-align: middle; }
  .cxtext.ol, .cxface .cxspot.cxlogo.ol { outline: 1.5px dashed #4cc3ff; } .cxtext.ol:not(.cxc) span { color: #4cc3ff; }     /* an empty label: where it goes and its name */
  .cxlogo span { color: #4cc3ff; font-size: 11px; } .cxlogo img { max-width: 100%; max-height: 100%; object-fit: contain; }
  .cxrz { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #4cc3ff; border: 2px solid #fff; border-radius: 2px; cursor: nwse-resize; }
  .cxlogo img.sc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: none; max-height: none; }   /* scaled by the client */
  .cxlogo:not(.on):not(.ed) { outline: 1px dotted rgba(255,255,255,.35); }
  .cxdraw { position: absolute; border: 2px solid #ffb300; background: rgba(255,179,0,.2); pointer-events: none; }
  /* video picker (record the screen / from the server / from the computer) */
  .vpov { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
  .vpov[hidden] { display: none; } .vpbox { background: var(--card); color: var(--text); border-radius: 10px; padding: 14px; width: min(860px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
  .vplist { max-height: 55vh; overflow: auto; } .pbar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; } .pbar i { display: block; height: 100%; background: #1565c0; }
  .vprec { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 70; background: #c62828; color: #fff; border-radius: 22px; padding: 6px 8px 6px 16px; display: flex; gap: 12px; align-items: center; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
  .vprec button { background: #fff; color: #c62828; border: 0; border-radius: 16px; padding: 4px 14px; font-weight: 700; cursor: pointer; }
  /* HCU5 programming: the Delta ROV programmer's screen (custom.js hcu5Form), 1792 px picture scaled to the width */
  .h5wrap { width: min(1792px, calc(100vw - 40px)); position: relative; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #b8b8b8; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
  .h5 { position: relative; width: 1792px; height: 991px; font-family: "Segoe UI", Arial, sans-serif; color: #222; }
  .h5 > * { position: absolute; margin: 0; } .h5pic { left: 0; top: 0; width: 1792px; height: 991px; pointer-events: none; user-select: none; }
  .h5n { padding: 0 0 0 4px; font-size: 15px; border: 1px solid #c9c9c9; border-radius: 2px; background: #fff; color: #222; box-sizing: border-box; font-family: inherit; }
  .h5n:focus { outline: 2px solid #3b8eea; outline-offset: -1px; }
  .h5n::-webkit-inner-spin-button, .h5n::-webkit-outer-spin-button { opacity: 1; height: 25px; }
  .h5n.chg { background: #fff3c4; border-color: #e0a800; } .h5c { accent-color: #3b6fb6; }
  .h5radio { width: 14px; height: 14px; accent-color: #3b6fb6; cursor: pointer; } .h5rlab { cursor: pointer; }
  .h5off { background: rgba(236, 236, 236, .62); cursor: not-allowed; }
  .h5lcdbox { background: #8a9b80; color: #102010; font: 12px/1.45 Consolas, "Courier New", monospace; padding: 6px 8px; box-sizing: border-box; white-space: pre-line; overflow: hidden; }
  .h5btn, .h5mode { font: 700 11px "Segoe UI", Arial, sans-serif; letter-spacing: .02em; color: #3b3b3b; background: linear-gradient(#f4f4f4, #c9c9c9); border: 1px solid #222; border-radius: 3px; cursor: pointer; padding: 0; box-shadow: inset 0 1px 0 #fff; }
  .h5btn:hover, .h5mode:hover { background: linear-gradient(#fff, #d8e6f6); color: #111; } .h5btn:active { background: linear-gradient(#c9c9c9, #eee); }
  .h5mode.on { background: linear-gradient(#a9f0a9, #43c143); color: #134d13; }
  .h5lcd { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; font: 700 23px/1 "Courier New", monospace; letter-spacing: .12em; color: #dfe9ff; text-shadow: 0 0 6px rgba(160,190,255,.9); pointer-events: none; }
  .hcform { display: grid; gap: 10px; } .hcg { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0; }
  .hcg legend { font-weight: 700; font-size: 13px; padding: 0 4px; } .hcrow { display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .hcf { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; } .hcf input { width: 70px; }
  .hct { border-collapse: collapse; font-size: 12px; } .hct th { text-align: left; padding: 2px 6px; color: var(--muted); font-weight: 600; } .hct td { padding: 2px 4px; } .hct input:not([type=checkbox]) { width: 60px; }
  .hcform input.chg { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); font-weight: 700; }
  .cxinputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; margin: 8px 0; }
  .cxinputs label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); } .cxinputs small { font-size: 11px; }
  /* client grade: good green, warning yellow, blacklisted black */
  .gtag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; vertical-align: middle; }
  .gtag.g-good { background: #1f9d55; color: #fff; } .gtag.g-warning { background: #f5c400; color: #222; } .gtag.g-blacklisted { background: #111; color: #fff; border: 1px solid #fff; }
  .row.gr-good, .card.gr-good { border-left: 5px solid #1f9d55; } .row.gr-good { background: color-mix(in srgb, #1f9d55 8%, var(--card)); }
  .row.gr-warning, .card.gr-warning { border-left: 5px solid #f5c400; } .row.gr-warning { background: color-mix(in srgb, #f5c400 16%, var(--card)); }
  .row.gr-blacklisted, .card.gr-blacklisted { border-left: 5px solid #111; } .row.gr-blacklisted { background: #2b2b2b; color: #fff; } .row.gr-blacklisted .sub { color: #ccc; }
  .gnote { margin: 6px 0; padding: 6px 10px; border-radius: 8px; font-size: 14px; } .gnote.g-warning { background: #fff6cc; color: #5c4a00; } .gnote.g-blacklisted { background: #111; color: #fff; } .gnote.g-blacklisted a { color: #fff; }
  .mtoast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; max-width: min(640px, calc(100vw - 32px)); cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.2); border-radius: 8px; }
  .mtoast .msg { margin: 0; }
  .mprog { margin-top: 10px; } .mbar { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-top: 6px; } .mbar i { display: block; height: 100%; background: var(--ok); }
  .mtoc ol { margin: 6px 0 0; padding-left: 22px; } .mtoc li { margin: 2px 0; }
  .assignbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
  #mkpass { margin-top: 6px; }
  .docrow { padding: 8px 0; border-bottom: 1px solid var(--line); } .docrow:last-of-type { border-bottom: 0; } .docrow .docedit { margin-top: 6px; }
  .picmain { position: absolute; left: 4px; bottom: 4px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
  .tkpics figcaption { font-size: 11px; color: var(--muted); max-width: 160px; }
  .tkpics .picwrap { position: relative; display: block; width: max-content; }
  .tkpics .picacts { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
  .picbtn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .picbtn svg { width: 17px; height: 17px; fill: currentColor; }
  .picmenu { position: absolute; top: 38px; right: 4px; z-index: 3; display: flex; flex-direction: column; min-width: 170px; padding: 4px 0;
    background: var(--card); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
  .picmenu.hidden { display: none; }
  .picmenu button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 14px; text-align: left; font-size: 14px; color: var(--text); white-space: nowrap; }
  .picmenu button:hover { background: var(--bg); } .picmenu svg { width: 18px; height: 18px; fill: currentColor; flex: none; } .picbtn:hover { background: rgba(0,0,0,.75); }
  .tkpics img { min-width: 110px; }
  .recpill { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; background: color-mix(in srgb, var(--err) 14%, var(--card)); }
  .composer .crow { display: flex; gap: 6px; align-items: flex-end; }
  .composer textarea { display: block; width: 100%; box-sizing: border-box; resize: none; min-height: 42px; max-height: 45vh; padding: 9px 12px; border-radius: 18px; margin-bottom: 6px; overflow-y: auto; }
  .composer .emopanel { margin-bottom: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .composer .emopanel.hidden { display: none; }
  .composer .emotabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); padding: 4px; }
  .composer .emotabs a { white-space: nowrap; padding: 4px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
  .composer .emotabs a.on { background: var(--bg); color: var(--text); font-weight: 600; }
  .composer .emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; height: 220px; overflow-y: auto; padding: 4px; }
  .composer .emojis button { font-size: 24px; padding: 4px 0; border: 0; background: none; }
  .composer .pend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .screcbar { position: fixed; z-index: 70; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    max-width: calc(100vw - 32px); padding: 8px 12px; border-radius: 24px; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(0,0,0,.25); }
  .screcbar .recdot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: scblink 1s infinite alternate; } @keyframes scblink { to { opacity: .3; } }
  .screview { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .screview .card { max-width: 820px; width: 100%; } .screview video { display: block; width: 100%; max-height: 60vh; background: #000; border-radius: 8px; }
  body.chatmode .screcbar { bottom: calc(var(--comp-h, 120px) + 12px); }      /* above the typing box */
  .imgwrap .imgdraw { position: absolute; left: 6px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 999px; padding: 4px 10px 4px 7px; font: 600 13px/1 system-ui, sans-serif; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
  .imgwrap .imgdraw svg { width: 15px; height: 15px; fill: currentColor; } .quote .qedit svg { width: 14px; height: 14px; vertical-align: -2px; fill: currentColor; }
  @media (hover: hover) { .imgwrap .imgdraw { opacity: 0; } .imgwrap:hover .imgdraw { opacity: 1; } }
  .penov { position: fixed; inset: 0; z-index: 58; background: rgba(0,0,0,.85); display: flex; flex-direction: column; }
  .pentools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--card); }
  .pencol { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--line); } .pencol.on { outline: 3px solid var(--accent); outline-offset: 1px; }
  .penw { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; } .penw i { display: block; border-radius: 50%; background: var(--text); }
  .penw.on { outline: 3px solid var(--accent); } .pensep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
  .penstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
  .penstage canvas { touch-action: none; cursor: crosshair; max-width: 100%; max-height: 100%; box-shadow: 0 2px 12px rgba(0,0,0,.5); } .penload { color: #fff; }
  /* user manuals: sections 1, 1.1, 1.1.1 */
  .mstepno.msecno { width: auto; min-width: 34px; padding: 0 8px; border-radius: 17px; }
  .mstephead h3.mlv2 { font-size: 16px; } .mstephead h3.mlv3 { font-size: 15px; font-weight: 600; }
  .mstep.msec2 { margin-left: 18px; } .mstep.msec3 { margin-left: 36px; }
  .mstep.msec2 .mstepno.msecno, .mstep.msec3 .mstepno.msecno { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
  .mtocs { display: flex; flex-direction: column; margin-top: 6px; } .mtocs a { padding: 3px 0; text-decoration: none; color: var(--text); }
  .mtocs a span { display: inline-block; min-width: 46px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .mtocs a.mtl1 { font-weight: 600; margin-top: 4px; } .mtocs a.mtl2 { padding-left: 22px; } .mtocs a.mtl3 { padding-left: 44px; font-size: 14px; }
  @media (max-width: 600px) { .mstep.msec2 { margin-left: 8px; } .mstep.msec3 { margin-left: 16px; } }
  .mspecg { margin: 10px 0; } .mspecg h4 { margin: 0 0 6px; font-size: 15px; } .mspecg h4 .sub { margin-right: 6px; }
  table.mspec { border-collapse: collapse; width: 100%; max-width: 720px; } table.mspec th, table.mspec td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
  table.mspec th { width: 40%; color: var(--muted); font-weight: 600; }
  .mspecedit { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin: 8px 0; }
  .mpicpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; }
  .mpicpick label { display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: 8px; padding: 4px; cursor: pointer; position: relative; font-size: 12px; }
  .mpicpick label:has(input:checked) { border-color: var(--accent); } .mpicpick input { position: absolute; top: 6px; left: 6px; width: auto; }
  .mpicpick img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 6px; } .mpicpick span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
  .rtcell { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-height: 20px; background: var(--card); outline: none; }
  .rtcell:focus { border-color: var(--accent); } .rtcell:empty:before { content: attr(data-ph); color: var(--muted); }
  .spbar { position: sticky; top: var(--hdr-h, 0px); z-index: 5; background: var(--card); padding: 4px 0; }
  ul.mcontents { margin: 4px 0 10px; padding-left: 22px; } ul.mcontents li { margin: 3px 0; }
  .grip { cursor: grab; color: var(--muted); user-select: none; -webkit-user-select: none; padding: 4px 4px; font-weight: 700; letter-spacing: -2px; touch-action: none; }
  .grip:hover { color: var(--text); }
  .mspecedit.dragging, [data-r].dragging, [data-ci].dragging, .mstep.dragging { opacity: .9; box-shadow: 0 6px 18px rgba(0,0,0,.25); background: var(--card); position: relative; z-index: 5; }
  img.mmainpic { display: block; width: 100%; max-width: 560px; max-height: 420px; object-fit: contain; margin: 12px auto 4px; border-radius: 10px; background: #fff; }
  .mstephead .grip { margin-right: 2px; } .mbtools select[data-bto] { font-size: 13px; padding: 2px 4px; max-width: 170px; } .mbtools .grip { padding: 0 4px; }
  .aipanel { border: 1px solid var(--line); border-top: 0; padding: 8px; background: var(--bg); } .aipanel.hidden { display: none; }
  .aiprev { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--card); }
  table.mtoctbl { border-collapse: collapse; width: 100%; max-width: 720px; margin-top: 6px; }
  table.mtoctbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); } table.mtoctbl tr { cursor: pointer; } table.mtoctbl tr:hover td { background: var(--bg); }
  table.mtoctbl td.tno { width: 70px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  table.mtoctbl tr.tl1 td { font-weight: 600; } table.mtoctbl tr.tl1 td.tno { color: var(--text); }
  table.mtoctbl tr.tl2 td:last-child { padding-left: 26px; } table.mtoctbl tr.tl3 td:last-child { padding-left: 48px; font-size: 14px; }
  table.mtoctbl a { color: inherit; text-decoration: none; }
  .tblwrap { overflow-x: auto; } table.mparts { border-collapse: collapse; width: 100%; } table.mparts th, table.mparts td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
  table.mparts th { color: var(--muted); font-weight: 600; background: var(--bg); } table.mparts .num { text-align: right; white-space: nowrap; width: 60px; } table.mparts td:nth-child(2) { white-space: nowrap; } table.mparts td:nth-child(3) { overflow-wrap: anywhere; min-width: 90px; max-width: 220px; }
  @media (max-width: 600px) { table.mparts th, table.mparts td { padding: 5px 6px; font-size: 13px; } table.mparts .num { width: auto; } table.mparts td:nth-child(3) { max-width: 110px; } }
  .vidwrap { display: block; } .vidlbl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 2px 4px 4px; } .vidlbl svg { width: 16px; height: 16px; fill: currentColor; }
  .bubble video.chatvid.screen { max-width: 560px; max-height: 480px; border-radius: 10px; }
  .vidacts { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; } .vidacts button { display: inline-flex; align-items: center; gap: 4px; } .vidacts svg { width: 16px; height: 16px; fill: currentColor; }
  .bubble video.chatvid { display: block; width: 100%; max-width: 320px; max-height: 420px; border-radius: 18px; background: #000; margin: 0 0 2px; }
  .fwdlbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; margin: 0 8px 1px; } .fwdlbl svg { width: 13px; height: 13px; fill: currentColor; }
  .avatar.itemav { font-size: 10px; letter-spacing: .3px; } .it-task { background: #6d4aa8 !important; } .it-job { background: #1e7b3a !important; }
  .it-asm { background: #b5651d !important; } .it-make { background: #0e7490 !important; }
  .avwrap { position: relative; display: inline-flex; flex: none; } .ondot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px;
    border-radius: 50%; background: #31a24c; border: 2px solid var(--card); box-sizing: border-box; }
  #mynotes .note { border-top: 1px solid var(--line); padding: 8px 0 4px; } #mynotes .note textarea { width: 100%; border: 0; background: color-mix(in srgb, #ffd54f 22%, var(--card)); border-radius: 8px; padding: 8px 10px; resize: vertical; }
  .reacts { align-self: flex-end; margin: -10px 6px 0 0; position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 1px 6px; font-size: 14px; line-height: 20px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.12); white-space: nowrap; }
  .mrow.mine .reacts { align-self: flex-start; margin: -10px 0 0 6px; } .reacts small { font-size: 11px; color: var(--muted); margin: 0 3px 0 1px; }
  .reacts.minei { border-color: var(--accent); }
  .reactrow { display: flex; justify-content: space-around; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); }
  .reactrow button, .reactpop button { font-size: 26px; border: 0; background: none; padding: 4px; border-radius: 50%; width: auto; }
  .msheet .reactrow button { display: inline-block; width: auto; padding: 4px 6px; font-size: 26px; }
  .reactrow button.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
  .reactpop { position: fixed; z-index: 70; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 4px 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
  .bubble .sheetbtn { margin: 0 0 4px; padding: 4px 12px; }
  .sheetov { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
  .sheethead { display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px) 12px; border-bottom: 1px solid var(--line); background: var(--card); padding-top: calc(10px + env(safe-area-inset-top)); }
  .sheettabs { display: flex; gap: 2px; overflow-x: auto; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--card); }
  .sheettabs a { white-space: nowrap; padding: 4px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 14px; } .sheettabs a.on { background: var(--bg); color: var(--text); font-weight: 600; }
  .sheetwrap { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
  table.sheet { border-collapse: collapse; font-size: 13px; background: var(--card); }
  table.sheet td, table.sheet th { border: 1px solid var(--line); padding: 3px 6px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
  table.sheet th { background: var(--bg); color: var(--muted); font-weight: 600; position: sticky; top: 0; } table.sheet tbody th { position: sticky; left: 0; top: auto; }
  .composer .pend img.pendpic { height: 56px; width: auto; max-width: 120px; border-radius: 6px; vertical-align: middle; object-fit: cover; }
  .composer .pend span { font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
  .chathead { position: sticky; top: var(--hdr-h, 0px); z-index: 1; background: var(--bg); padding: 6px 0; display: flex; align-items: center; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--line); } .qprint { display: none; } body.lblon .qprint { display: inline-block; } 
  .tag { font-size: 12px; font-weight: 600; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 4px; color: var(--muted); }
  .low { color: var(--warn); }
  /* stock level: below min = orange, zero = red */
  .row.q-low { border-left: 5px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--card)); }
  .row.q-zero { border-left: 5px solid var(--err); background: color-mix(in srgb, var(--err) 9%, var(--card)); }
  .row.q-low .qty, .q-low-text { color: var(--warn); font-weight: 700; }
  .row.q-zero .qty, .q-zero-text { color: var(--err); font-weight: 700; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
  .card h2 { margin: 0 0 4px; font-size: 20px; }
  .card h3 { margin: 0 0 8px; font-size: 15px; color: var(--muted); font-weight: 600; }
  .headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
  .pic { display: block; width: 100%; max-height: 320px; object-fit: contain; background: var(--bg); border-radius: 8px; margin: 10px 0 4px; }
  dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 0; }
  dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
  table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  td, th { text-align: left; padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
  th { color: var(--muted); font-weight: 500; font-size: 14px; border-top: 0; }
  td.num, th.num { text-align: right; }
  .sub { font-size: 13px; color: var(--muted); }
  button, select, input, textarea { font: inherit; padding: 8px 10px; border-radius: 8px;
         border: 1px solid var(--line); background: var(--bg); color: var(--text); }
  button { cursor: pointer; white-space: nowrap; }
  a.button { display: inline-block; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: inherit; text-decoration: none; }
  button.primary, a.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
  a.btnlink { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
  button.danger { color: var(--err); border-color: var(--err); }
  .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .countform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
  .countform input[type=number] { width: 110px; }
  .countform input[type=text] { flex: 1; min-width: 140px; }
  .form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .form label { display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--muted); }
  .form .wide { grid-column: 1 / -1; }
  .form label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; cursor: pointer; }
  .form label.chk input { width: auto; flex: none; margin: 0; }
  .form input, .form select, .form textarea { width: 100%; color: var(--text); font-size: 16px; }
  .form textarea { min-height: 70px; resize: vertical; }
  @media (max-width: 520px) { .form { grid-template-columns: 1fr; } }
  .back { margin-bottom: 10px; }
  .msg { padding: 8px 10px; border-radius: 8px; margin: 8px 0; }
  .msg.ok { color: var(--ok); border: 1px solid var(--ok); } .msg.err { color: var(--err); border: 1px solid var(--err); }
  .msg.warn { color: var(--warn); border: 1px solid var(--warn); }
  .hist td { font-size: 14px; }
  .hidden { display: none; }
  .cropov { position: fixed; inset: 0; z-index: 10; background: #000; display: flex; flex-direction: column; }
  .cropwrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
  .cropwrap canvas { touch-action: none; cursor: crosshair; }
  .cropbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 16px 4px; }
  .cropsub { color: #aaa; font-size: 13px; text-align: center; padding: 0 16px 14px; }
  .bgov { z-index: 11; }
  .bgwrap { flex: 1; min-height: 0; overflow: hidden; background: repeating-conic-gradient(#c8c8c8 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
  .bgwrap canvas { display: block; touch-action: none; }
  .bgbar { flex-wrap: wrap; align-items: center; padding-top: 6px; }
  .bgbar button.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
  .bgsl { color: #ddd; font-size: 13px; display: flex; align-items: center; gap: 6px; margin: 0; }
  .bgsl input { width: 120px; }
  .bgsl.hidden, .bgbar .hidden { display: none; }
  .lgpick { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px; max-width: 110px; }
  .lgpick img { height: 36px; max-width: 90px; object-fit: contain; background: repeating-conic-gradient(#c8c8c8 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
  .lgpick span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 94px; }
  .lgpick.on { outline: 3px solid #1d4ed8; }
  .lglist { display: flex; flex-wrap: wrap; gap: 10px; }
  .lgitem { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
  .lgitem img { height: 44px; max-width: 120px; object-fit: contain; background: repeating-conic-gradient(#c8c8c8 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
  .lgitem input { width: 150px; }
  .scanov { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
  .scanov video { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
  .scanov .scanbar { display: flex; gap: 8px; padding: 12px 16px; background: #111; }
  .scanov .scanbar input { flex: 1; }
  .scanov .frame { position: absolute; left: 50%; top: 40%; width: 60vmin; height: 60vmin; transform: translate(-50%, -50%);
                   border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); pointer-events: none; }
  .scanov .scanmsg { color: #ddd; text-align: center; padding: 6px 16px; font-size: 14px; }
  .pkscan { display: flex; gap: 6px; } .pkscan input { flex: 1; }
  .prio { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; color: #fff; }
  .prio-urgent { background: var(--err); } .prio-high { background: var(--warn); } .prio-med { background: var(--accent); } .prio-low { background: var(--muted); }
  .mkcard { border-left: 5px solid var(--line); }
  .mkcard.p-urgent { border-left-color: var(--err); } .mkcard.p-high { border-left-color: var(--warn); } .mkcard.p-med { border-left-color: var(--accent); }
  .stpill { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
  .st-in_production { border-color: var(--ok); color: var(--ok); font-weight: 700; } .st-waiting_material { border-color: var(--err); color: #fff; background: var(--err); font-weight: 700; }
  .st-waiting_parts { border-color: var(--err); color: #fff; background: var(--err); font-weight: 700; } .st-in_assembly { border-color: var(--ok); color: var(--ok); font-weight: 700; } .st-testing { border-color: var(--accent); color: var(--accent); font-weight: 700; }
  .st-in_progress { border-color: var(--ok); color: var(--ok); font-weight: 700; } .st-waiting { border-color: var(--warn); color: var(--warn); font-weight: 700; } .st-done { border-color: var(--ok); color: #fff; background: var(--ok); }
  .st-review { border-color: var(--warn); color: var(--warn); font-weight: 700; } .st-to_arrange { border-color: var(--err); color: #fff; background: var(--err); font-weight: 700; } .st-ready { border-color: var(--ok); color: #fff; background: var(--ok); font-weight: 700; } .st-shipped { color: var(--muted); }
  .pay { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; color: #fff; vertical-align: middle; }
  .pay-paid { background: var(--ok); } .pay-unpaid { background: var(--err); } .pay-part { background: var(--warn); }
  .optbox { margin-top: 6px; padding: 4px 8px; border-left: 3px solid var(--warn); background: var(--bg); font-size: 14px; }
  [data-picblock^="pk"] img.pic { max-height: 220px; width: auto; }
  .row.pl-no { border-left: 5px solid var(--err); background: color-mix(in srgb, var(--err) 6%, var(--card)); } .row.pl-ok { border-left: 5px solid var(--ok); }
  details.pogrp > summary { list-style: none; cursor: pointer; } details.pogrp > summary::-webkit-details-marker { display: none; }
  details.pogrp > summary h3::before { content: '▸ '; } details.pogrp[open] > summary h3::before { content: '▾ '; }
  details.pogrp > summary .pono::before { content: '▸ '; } details.pogrp[open] > summary .pono::before { content: '▾ '; }
  details.pogrp.po-no > summary .pono { color: var(--err); } details.pogrp.po-ok > summary .pono { color: var(--ok); }
  .pkgrow.pk-no { border-left: 5px solid var(--err); background: color-mix(in srgb, var(--err) 6%, var(--card)); } .pkgrow.pk-ok { border-left: 5px solid var(--ok); }
  .pkgrow.pk-open { outline: 2px solid var(--accent); } .pkgedit { margin-top: -4px; border-top: 0; }
  .nextstep { margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: var(--bg); }
  .mkcard.wait { background: color-mix(in srgb, var(--err) 10%, var(--card)); border-left-color: var(--err); }

.webtext { font-size: 14px; } .webtext p { margin: 4px 0; } .webtext ul { margin: 4px 0; padding-left: 20px; }
/* phone as the desktop's camera (phonecam.js) */
.pcov { position: fixed; inset: 0; z-index: 70; background: rgba(10, 20, 32, .6); display: flex; align-items: flex-end; justify-content: center; }
.pcpage { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pcbox { background: var(--card); width: 100%; max-width: 460px; border-radius: 18px 18px 0 0; padding: 20px 18px 26px; display: grid; gap: 12px; box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
.pcpage .pcbox { border-radius: 18px; }
.pchead { display: flex; gap: 10px; align-items: center; } .pchead svg { color: var(--accent); flex: none; } .pchead b { font-size: 17px; }
.pcsub { font-size: 13.5px; color: var(--muted); }
.pclive { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; object-fit: contain; }
.pcbig { font: inherit; font-size: 20px; font-weight: 700; padding: 22px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-text, #fff); cursor: pointer; }
.pcmid { font: inherit; font-size: 15px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.pclow { font: inherit; font-size: 15px; padding: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; }
.pcnote { text-align: center; font-size: 14px; color: var(--muted); } .pcerr { color: var(--err); font-weight: 600; } .pcok { text-align: center; font-size: 18px; font-weight: 700; color: var(--ok); padding: 20px; }
.pcdesk .card { max-width: 640px; } .pcdesk .pchead { margin-bottom: 10px; } .pcx { margin-left: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.pcwait { display: grid; gap: 8px; } .pcqrrow { display: flex; gap: 14px; align-items: center; } .pcqr svg { width: 150px; height: 150px; display: block; background: #fff; border-radius: 8px; }
.pcwait.small .pcqr svg { width: 90px; height: 90px; } .pcstep { font-size: 14px; } .pcstatus { font-size: 14px; color: var(--accent); font-weight: 600; }
.pcstack { display: grid; gap: 12px; width: 100%; max-width: 460px; } .pclink { gap: 8px; padding: 14px 18px; }
.pcother summary { cursor: pointer; font-size: 14px; color: var(--accent); } .pcother[open] .pcqrrow { margin-top: 8px; }
.pcunl { font: inherit; font-size: 13px; padding: 2px 8px; margin-left: 6px; }
.pctray { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.pcpic { position: relative; cursor: pointer; } .pcpic input { position: absolute; opacity: 0; } .pcpic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 3px solid var(--accent); display: block; }
.pcpic span { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.pcpic.off img { border-color: transparent; opacity: .45; } .pcpic.off span { background: rgba(0,0,0,.35); }
.pctype { display: flex; gap: 6px; } .pctype input { width: 180px; }

/* Meetings: the same time picker as the website quote request (light colours, also in dark mode) */
.meetpick { --orange: #e5792a; --navy: #1b4a72; --ink: #1d232b; --muted: #5d6874; --line: #e3e7ec; color: var(--ink); }
.meetpick button { color: inherit; } .meetpick label.mp-pill { display: inline-block; margin: 0; color: var(--ink); }
.meetpick .mp-tz span { white-space: nowrap; } .meetpick .muted { font-style: normal; }
.meetpick .meetbox { display: block !important; } .meetbox[hidden] { display: none !important; }
.meetpick .mp-how { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.meetpick .mp-pill input { position: absolute; opacity: 0; pointer-events: none; }
.meetpick .mp-pill span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
                font-weight: 600; font-size: 15px; transition: all .15s; background: #fff; }
.meetpick .mp-pill input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; box-shadow: 0 4px 14px rgba(27, 74, 114, .25); }
.meetpick .mp { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: linear-gradient(180deg, #fff, #f7f9fc); box-shadow: 0 6px 24px rgba(15, 34, 54, .06); }
.meetpick .mp-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.meetpick .mp-head b { font-size: 17px; color: var(--navy); }
.meetpick .mp-tz { font-size: 13px; color: var(--muted); } .mp-tz select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; max-width: 260px; background: #fff; }
.meetpick .mp-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.meetpick .mp-day { flex: none; width: 62px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 0; cursor: pointer; display: grid; gap: 1px;
          text-align: center; font: inherit; transition: all .15s; }
.meetpick .mp-day small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .mp-day b { font-size: 20px; color: var(--ink); }
.meetpick .mp-day:hover { border-color: var(--orange); }
.meetpick .mp-day.off { opacity: .55; }
.meetpick .mp-day.on { background: var(--orange); border-color: var(--orange); box-shadow: 0 4px 14px rgba(229, 121, 42, .35); } .mp-day.on b, .mp-day.on small { color: #fff; }
.meetpick .mp-legend { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.meetpick .lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; } .lg.in { background: #dcfce7; border: 1px solid #22c55e; } .lg.out { background: #fff7ed; border: 1px solid #fdba74; }
.meetpick .mp-all { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
.meetpick .mp-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 2px; }
.meetpick .mp-slot { border-radius: 10px; padding: 8px 4px; cursor: pointer; font: inherit; display: grid; gap: 1px; text-align: center; transition: transform .1s, box-shadow .15s; }
.meetpick .mp-slot b { font-size: 15px; } .mp-slot small { font-size: 11px; color: var(--muted); }
.meetpick .mp-slot.in { background: #f0fdf4; border: 1.5px solid #86efac; } .mp-slot.out { background: #fffaf3; border: 1.5px solid #fed7aa; }
.meetpick .mp-slot:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .08); }
.meetpick .mp-slot:disabled { opacity: .35; cursor: not-allowed; }
.meetpick .mp-slot.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(27, 74, 114, .35); } .mp-slot.on small { color: #cfe0ef; }
.meetpick .mp-sum { margin-top: 16px; }
.meetpick .mp-card.wait b { color: #b8c2cc; } .mp-card.drov.wait b { color: #6f8aa3; } .mp-card.wait span { font-weight: 600; color: var(--ink); } .mp-card.drov.wait span { color: #fff; }
@keyframes mpin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.meetpick .mp-cards { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.meetpick .mp-card { border-radius: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); display: grid; gap: 2px; }
.meetpick .mp-card small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.meetpick .mp-card b { font-size: 30px; line-height: 1.1; color: var(--navy); } .mp-card span { font-weight: 600; } .mp-card em { font-style: normal; color: var(--muted); font-size: 14px; }
.meetpick .mp-card.drov { background: linear-gradient(135deg, var(--navy), #0f2236); border: 0; color: #fff; } .mp-card.drov b { color: #fff; } .mp-card.drov small, .mp-card.drov em { color: #cfe0ef; }
.meetpick .mp-arrow { font-size: 22px; color: var(--orange); }
.meetpick .mp-diff { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.meetpick .mp-ok { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: #f0fdf4; color: #166534; font-size: 14px; }
.meetpick .mp-warn { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 14px; border-left: 4px solid var(--orange); }
@media (max-width: 560px) { .mp-cards { grid-template-columns: 1fr auto 1fr; gap: 6px; } .mp-card { padding: 10px; } .mp-card b { font-size: 22px; }
  .mp-card span, .mp-card em { font-size: 12.5px; } .mp-arrow { font-size: 16px; } .mp-sum .mp-warn, .mp-sum .mp-ok, .mp-sum .mp-diff { font-size: 12.5px; } }
.meetpick .checkout > * { min-width: 0; } .mp, .mp-days { max-width: 100%; }
.meetpick .mp-tz { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.meetpick .tzbox { position: relative; }
.meetpick .tzbox input { font: inherit; font-size: 14px; color: var(--ink); width: 250px; max-width: 62vw; padding: 7px 30px 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6874' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E") no-repeat right 9px center; }
.meetpick .tzbox input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27, 74, 114, .12); }
.meetpick .tzlist { position: absolute; right: 0; top: calc(100% + 6px); width: 320px; max-width: 86vw; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 40px rgba(15, 34, 54, .18); z-index: 20; padding: 6px; }
.meetpick .tzlist[hidden] { display: none; }
.meetpick .tzlist button { display: grid; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.meetpick .tzlist button small { color: var(--muted); font-size: 12px; }
.meetpick .tzlist button:hover, .tzlist button.on { background: #f1f5f9; }
.meetpick .tzlist p { margin: 8px 10px; color: var(--muted); font-size: 14px; }
.meetpick .mp-key { margin-left: auto; } .mp-key b { color: var(--ink); } .mp-key small { font-size: 12px; }

/* day tiles: same colours as the times (green = has office-hour times, orange = none, navy = selected; dot = the chosen meeting day) */
.meetpick .mp-day.in { background: #f0fdf4; border-color: #86efac; } .mp-day.out { background: #fffaf3; border-color: #fed7aa; }
.meetpick .mp-day.off { opacity: 1; }
.meetpick .mp-day:hover { border-color: var(--navy); }
.meetpick .mp-day.on { background: var(--navy); border-color: var(--navy); box-shadow: 0 6px 16px rgba(27, 74, 114, .35); } .mp-day.on b, .mp-day.on small { color: #fff; }
.mpdlg { border: 0; border-radius: 14px; padding: 20px; width: min(900px, calc(100% - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); background: var(--card, #fff); color: var(--text, inherit); }
.mpdlg::backdrop { background: rgba(0, 0, 0, .4); }

/* quotes */
.qline { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qline.out { opacity: .55; }
.qopts { margin-top: 6px; max-width: 560px; font-size: 13px; } .qopt { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }   /* text in line with the Contents, pictures in the margin to its left, price on the first line */
.qopt .qoptn { flex: 1; min-width: 0; } .qopt > span:last-child { white-space: nowrap; } .qopt.tot { border-top: 1px solid var(--line); font-weight: 700; margin-top: 2px; padding-top: 4px; }
.qoptpic { width: 28px; height: 28px; object-fit: contain; flex: none; border-radius: 4px; }
.qopt .qoptpic { margin-left: -36px; align-self: center; }
.qor { text-align: center; font-weight: 700; color: var(--warn); margin: 2px 0 8px; letter-spacing: .1em; }

/* client meeting alarm (15 minutes before) */
#mtgalarm { position: fixed; inset: 0; z-index: 9999; background: #b3261e; color: #fff; display: grid; place-items: center; padding: 16px;
  animation: mtgpulse 1s ease-in-out infinite alternate; text-align: center; }
#mtgalarm .mtgalarm-t { font-size: clamp(32px, 7vw, 64px); font-weight: 800; letter-spacing: .04em; }
#mtgalarm .button, #mtgalarm button { font-size: 18px; padding: 12px 20px; background: #fff; color: #b3261e; border: 0; font-weight: 700; text-decoration: none; }
@keyframes mtgpulse { from { background: #b3261e; } to { background: #6e0c0c; } }

/* forward dialog: sections */
.fwdhead { display: block; font-weight: 700; color: var(--text); text-decoration: none; padding: 8px 0 4px; border-top: 1px solid var(--line); } .fwdsec:first-child .fwdhead { border-top: 0; }
/* ---------- calendar (calendar.js) ---------- */
.calbar .calnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .calbar h2 { margin: 0 0 0 6px; font-size: 20px; }
.calseg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .calseg button { border: 0; border-radius: 0; margin: 0; }
.calseg button.on { background: var(--accent); color: var(--accent-text); }
.calbody { padding: 0; overflow: hidden; }
.calchip { font-size: 12px; line-height: 1.35; padding: 1px 5px; margin: 1px 0; border-radius: 4px; background: var(--c); color: #fff; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer; touch-action: none; user-select: none; }
.calchip .t { opacity: .85; } .calchip.prop, .calev.prop { background: transparent; color: var(--c); border: 1px dashed var(--c); }
.calchip.task, .calchip.make, .calchip.asm, .calchip.payment { background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--text); border-left: 3px solid var(--c); }
.calchip.dragging, .calev.dragging { opacity: .8; z-index: 5; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.calmonth .calmh, .calmonth .calmg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calmh div { padding: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.calmd { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px; cursor: default; min-width: 0; }
.calmd:nth-child(7n) { border-right: 0; } .calmd.out { background: color-mix(in srgb, var(--bg) 55%, var(--card)); } .calmd.out .n { color: var(--muted); }
.calmd .n { display: inline-block; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text); padding: 0 6px; border-radius: 10px; margin-bottom: 2px; }
.calmd.today .n, .calth .today b { background: var(--accent); color: var(--accent-text); border-radius: 10px; padding: 0 6px; }
.calmd .more { font-size: 12px; color: var(--muted); display: block; padding-left: 4px; }
.dropon { background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important; }
.caltime .calth, .caltime .calad, .caltime .calgrid { display: grid; grid-template-columns: 52px repeat(var(--n), minmax(0, 1fr)); }
.calth > div { text-align: center; padding: 6px 2px; font-size: 13px; color: var(--muted); } .calth a { color: inherit; text-decoration: none; }
.calth b { font-size: 16px; color: var(--text); }
.calad { border-bottom: 1px solid var(--line); } .calad > div { min-height: 26px; padding: 2px; border-left: 1px solid var(--line); min-width: 0; } .calad > .sub { border: 0; font-size: 11px; text-align: right; padding: 6px 6px 0 0; }
.calscroll { height: min(640px, 70vh); overflow-y: auto; position: relative; }
.calhours div { height: 48px; font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.calcol { position: relative; height: 1152px; border-left: 1px solid var(--line); touch-action: pan-y;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); }
.calcol.today { background-color: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.calev { position: absolute; overflow: visible; border-radius: 5px; background: var(--c); color: #fff; font-size: 12px; line-height: 1.25; padding: 2px 5px;
  cursor: pointer; border: 1px solid var(--card); touch-action: none; user-select: none; }
.calev b { display: block; white-space: normal; overflow-wrap: anywhere; } .calev:hover { z-index: 4; box-shadow: 0 2px 8px rgba(0,0,0,.25); } .calev span { opacity: .9; }
.calev.ghost { background: color-mix(in srgb, var(--accent) 35%, transparent); left: 0; right: 3px; pointer-events: none; color: var(--text); }
.calev .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.calnow { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); z-index: 3; pointer-events: none; }
.calnow::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 5px; background: var(--err); }
.calov { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.calmodal { width: 100%; max-width: 420px; margin: 0; } .calmodal.wide { max-width: 560px; }
.calradio { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .calradio input { width: auto; }
.calwhen, .calrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; } .calwhen input { width: auto; }
.calrdays { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; } .calrdays input { width: auto; }
.calplist { max-height: 180px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 10px; padding: 6px 0; }
.calplist label { display: flex; gap: 6px; align-items: center; } .calplist input { width: auto; }
.calpeople { margin-top: 8px; } .calpeople summary { cursor: pointer; }
.calcolors label { cursor: pointer; } .calcolors input { display: none; } .calcolors span { display: inline-block; width: 22px; height: 22px; border-radius: 11px; background: var(--c); border: 3px solid transparent; }
.calcolors input:checked + span { border-color: var(--text); }
.calpop p { margin: 8px 0; } .dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; background: var(--c); flex: none; }
#calpanel { display: none; }
body.calside main, body.calside header .top, body.calside header .groups, body.calside header .tabs, body.calside header .searchbar { margin-left: var(--side-m); margin-right: auto; }
body.calside #calpanel { display: flex; flex-direction: column; position: fixed; left: var(--side-l); width: 300px; top: calc(var(--hdr-h, 120px) + 12px);
  height: calc(100vh - var(--hdr-h, 120px) - 24px); z-index: 1; margin: 0; padding: 12px 12px 0; overflow: hidden; }
.cpbar { display: flex; justify-content: space-between; align-items: center; } .cplab { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.cpopen { text-decoration: none; color: var(--muted); font-size: 18px; padding: 0 4px; } .cpopen:hover { color: var(--text); }
.cpdate { font-size: 17px; color: var(--accent); font-weight: 600; margin: 2px 0 8px; }
.cpnav { display: flex; gap: 6px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cpnav button { margin: 0; } .cptoday { border-radius: 18px; padding: 5px 16px; } .cparr { border: 0; background: transparent; font-size: 20px; padding: 2px 9px; border-radius: 16px; }
.cparr:hover { background: var(--bg); }
.cpday { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0 -12px; } .cpday .calscroll { height: auto; flex: 1; min-height: 0; }
.cpday .calgrid, .cpday .calad { grid-template-columns: 46px 1fr; } .cpday .calcol { border-left: 0; }
.calmini { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; margin: 6px 0 10px; }
.calmini .h { color: var(--muted); font-weight: 700; padding: 2px 0; }
.calmini a { padding: 3px 0; text-decoration: none; color: var(--text); border-radius: 12px; position: relative; } .calmini a.out { color: var(--muted); }
.calmini a.has::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.calmini a.today { background: var(--accent); color: var(--accent-text); } .calmini a:hover { background: var(--bg); }
.calag { margin-bottom: 8px; } .calag .d { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; } .calag .d.today { color: var(--accent); }
.calag .i { display: flex; gap: 6px; align-items: baseline; font-size: 13px; text-decoration: none; color: var(--text); padding: 2px 0; } .calag .i .tm { color: var(--muted); min-width: 36px; }
.calag .i .dot { position: relative; top: 1px; }
@media (max-width: 700px) { .calmd { min-height: 64px; } .calchip { font-size: 10px; padding: 0 3px; } .calhours div { font-size: 10px; } .caltime .calth, .caltime .calad, .caltime .calgrid { grid-template-columns: 40px repeat(var(--n), minmax(0, 1fr)); } }
.calov .hidden { display: none !important; }
.calmodal h3 { color: var(--text); font-size: 18px; }
.calchip.dragging, .calev.dragging { pointer-events: none; }
.bpthumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .bpt { position: relative; } .bpt img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; background: var(--bg); }
.bpx { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: center; line-height: 18px; font-size: 11px; text-decoration: none; color: var(--err); }
.lblov.askmail { z-index: 80; }     /* "Email the client?" above any dialog that asked for it (calendar, quotes) */

/* ---------- top bar: punch in / out, chat ---------- */
.topr { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topr small { white-space: nowrap; }
.topchat { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--accent) !important; box-shadow: 0 1px 3px rgba(16,24,40,.08); transition: transform .15s, box-shadow .15s; }
.topchat:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.14); }
.topchat.on { background: var(--accent); color: #fff !important; border-color: var(--accent); }
.topchat .nbadge { position: absolute; top: -5px; right: -6px; margin: 0; }
.punchpill { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 16px 8px 12px; font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.punchpill:hover { transform: translateY(-1px); }
.punchpill.out { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; box-shadow: 0 4px 14px rgba(34,197,94,.35); }
.punchpill.in { background: #0f1b2d; color: #e6edf6; box-shadow: 0 4px 14px rgba(15,27,45,.3); }
.punchpill.in b { font-variant-numeric: tabular-nums; color: #fff; } .punchpill .plbl { font-weight: 500; opacity: .8; }
.punchpill .pdot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.punchpill.in .pdot { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: ppulse 1.8s infinite; }
@keyframes ppulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
/* the user menu: picture, first name, a menu (My details, Manual, Log out) */
.usermenu { position: relative; }
.userchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.08);
  transition: transform .15s, box-shadow .15s; }
.userchip:hover, .userchip.open { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.14); }
.userchip .uchev { color: var(--muted); transition: transform .2s; } .userchip.open .uchev { transform: rotate(180deg); }
.uav { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: linear-gradient(135deg, #0b5cad, #e8711c); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.uav.lg { width: 44px; height: 44px; font-size: 15px; }
#whoav, #whoav2 { display: flex; flex: none; line-height: 0; }      /* no text baseline under the picture: centred in the chip */
img.uav { display: block; }
.userchip { padding: 3px 12px 3px 3px; box-sizing: border-box; }
.udrop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(16,24,40,.18); padding: 6px; animation: psin .16s ease-out; }
.udrop.hidden { display: none; }
.uhead { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.uhead b { font-size: 15px; } .uhead .sub { font-size: 12px; }
.udrop a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text) !important; text-decoration: none; font-size: 14px; font-weight: 500; }
.udrop a svg { color: var(--muted); } .udrop a:hover { background: var(--bg); } .udrop a:hover svg { color: var(--accent); }
.udrop .ulogout { color: #dc2626 !important; } .udrop .ulogout svg { color: #dc2626; } .udrop .ulogout:hover { background: rgba(220,38,38,.08); }
@media (max-width: 640px) { .topr { gap: 7px; } .userchip .uname, .userchip .uchev { display: none; } .userchip { padding: 3px; }
  .punchpill .plbl { display: none; } .punchpill { padding: 7px 12px 7px 10px; } }

/* the punch sheet */
.psheetov { position: fixed; inset: 0; z-index: 70; background: rgba(8,15,28,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 14px; }
.psheet { position: relative; width: min(440px, 100%); max-height: 94vh; overflow: auto; background: var(--card); color: var(--text); border-radius: 24px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); text-align: center; animation: psin .22s ease-out; }
@keyframes psin { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pclose { position: absolute; top: 12px; right: 12px; border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.pdate { font-size: 13px; color: var(--muted); letter-spacing: .02em; } .ptime { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.pstate { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pstate.in { background: rgba(34,197,94,.12); color: #15803d; }
.pbig { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 172px; height: 172px; margin: 20px auto 10px;
  border-radius: 50%; border: 0; cursor: pointer; color: #fff; font: inherit; transition: transform .15s; }
.pbig:active { transform: scale(.97); }
.pbig.in { background: radial-gradient(circle at 30% 25%, #4ade80, #16a34a 70%); box-shadow: 0 14px 34px rgba(22,163,74,.45), inset 0 -6px 14px rgba(0,0,0,.15); }
.pbig.out { background: radial-gradient(circle at 30% 25%, #fb923c, #e8711c 55%, #c2410c); box-shadow: 0 14px 34px rgba(232,113,28,.45), inset 0 -6px 14px rgba(0,0,0,.15); }
.pbig.ok { background: radial-gradient(circle at 30% 25%, #60a5fa, #0b5cad 70%); }
.pbiglbl { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.pring { position: absolute; inset: -8px; border-radius: 50%; border: 3px solid transparent; pointer-events: none; }
.pbig.waiting .pring { border-color: rgba(255,255,255,.0); border-top-color: currentColor; color: inherit; animation: pspin 1s linear infinite; }
.pbig.in.waiting .pring { border-top-color: #16a34a; } .pbig.out.waiting .pring { border-top-color: #e8711c; }
.pbig.waiting svg { animation: pbreathe 1.4s ease-in-out infinite; }
@keyframes pspin { to { transform: rotate(360deg); } } @keyframes pbreathe { 50% { opacity: .45; transform: scale(.92); } }
.phint { font-size: 14px; color: var(--muted); min-height: 20px; }
.pstats { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; margin-top: 16px; }
.pstats div { background: var(--bg); border-radius: 14px; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.pstats span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pstats b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; } .pstats small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.pstats .neg { color: #dc2626; } .pstats .pos { color: #15803d; }
.pbar { height: 6px; border-radius: 6px; background: var(--bg); margin: 10px 2px 0; overflow: hidden; } .pbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #0b5cad, #22c55e); }
.ptl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.ptl span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ptl .in { background: rgba(34,197,94,.13); color: #15803d; } .ptl .out { background: rgba(232,113,28,.13); color: #c2410c; }
.preq { margin-top: 14px; text-align: left; } .preq summary { cursor: pointer; color: var(--accent); font-size: 14px; text-align: center; }

.chathead .onl, .onl { color: #16a34a; font-weight: 600; }
.mchat .typingind { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 2px 6px 8px; min-height: 22px; }
.mchat .typingind.hidden { display: none; }
.tdots { display: inline-flex; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 7px 10px; }
.tdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: tdot 1.2s infinite ease-in-out; }
.tdots i:nth-child(2) { animation-delay: .15s; } .tdots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.usep { height: 1px; background: var(--line); margin: 4px 6px; }
.udrop .upunch { color: #15803d !important; font-weight: 700; } .udrop .upunch svg { color: #16a34a; }
.udrop .upunch.on { color: #c2410c !important; } .udrop .upunch.on svg { color: #e8711c; } .udrop .upunch .sub { font-weight: 500; }
.userchip.onclock #whoav { position: relative; } .userchip.onclock #whoav::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; background: #22c55e; border: 2px solid var(--card); animation: ppulse 1.8s infinite; }
.tag.phome { border-color: #e8711c; color: #c2410c; }
.ptoast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 95; background: #0f1b2d; color: #fff; font-weight: 700; padding: 12px 20px;
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: psin .2s ease-out; transition: opacity .5s; } .ptoast.go { opacity: 0; }
.phometxt { color: #c2410c; font-weight: 600; }
.chatsub { display: flex; align-items: center; gap: 8px; padding: 8px 6px; margin: 4px 0 2px; border-radius: 12px; cursor: pointer; }
.chatsub:hover { background: var(--bg); } .chatsub .avatar { width: 32px; height: 32px; font-size: 15px; }
.chatsub .caret { display: inline-block; transition: transform .15s; color: var(--muted); font-size: 12px; } .chatsub.open .caret { transform: rotate(90deg); }
.chatsubrows { margin-left: 18px; border-left: 2px solid var(--line); padding-left: 6px; }
/* an employee's requirements: each with its document(s) */
.reqdocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.reqdoc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.reqdoc > b { flex: 1 0 100%; font-size: 14px; }
.reqfile { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; } .reqfile a { text-decoration: none; }
/* Pay & time › Time: someone on approved leave that day */
tr.onleave td { background: rgba(14,165,233,.10); color: #0369a1; } tr.onleave td:first-child { border-left: 4px solid #0ea5e9; }
.onleavetag { margin-top: 4px; font-size: 12px; font-weight: 700; color: #0369a1; background: rgba(14,165,233,.12); border-radius: 6px; padding: 2px 6px; display: block; width: max-content; max-width: 160px; white-space: normal; }
.tkfile { margin: 6px 0; } .tkfile video { margin-bottom: 4px; }
/* the world clock on the left (wide screens) */
#clockpanel { display: none; }
body.calside #clockpanel { display: block; position: fixed; left: 16px; top: calc(var(--hdr-h, 120px) + 12px); max-height: calc(100vh - var(--hdr-h, 120px) - 24px);
  overflow-y: auto; z-index: 1; margin: 0; padding: 12px; }
.ckrow { padding: 8px 0 8px 10px; border-bottom: 1px solid var(--line); border-left: 3px solid #cbd5e1; margin-top: 4px; }
.ckrow:last-of-type { border-bottom: 0; }
.ck-work { border-left-color: #22c55e; } .ck-edge { border-left-color: #f59e0b; } .ck-off { border-left-color: #94a3b8; }
.cktime { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ck-off .cktime { color: var(--muted); }
.ckday { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 6px; vertical-align: middle; }
.ckplace { font-size: 13px; } .ckcl { font-size: 12px; } .ckcl a { color: var(--text); text-decoration: none; } .ckcl a:hover { color: var(--accent); }
#clockpanel > .sub:last-child { font-size: 11px; }
/* each line is a block coloured like the meeting time picker: office hours green, early / late amber, off grey */
.ckrow { border: 1.5px solid #e5e7eb; border-left-width: 1.5px; border-radius: 10px; padding: 7px 10px; margin-top: 6px; }
.ck-work { background: #f0fdf4; border-color: #86efac; } .ck-edge { background: #fffaf3; border-color: #fed7aa; } .ck-off { background: #f3f4f6; border-color: #e5e7eb; }
.ckrow:last-of-type { border-bottom: 1.5px solid; border-bottom-color: inherit; }
.ck-work:last-of-type { border-bottom-color: #86efac; } .ck-edge:last-of-type { border-bottom-color: #fed7aa; } .ck-off:last-of-type { border-bottom-color: #e5e7eb; }
.cklg { display: inline-block; border-width: 1px; border-style: solid; border-radius: 6px; padding: 0 5px; margin: 2px 2px 0 0; color: var(--text); }
a.ckrow { display: block; color: var(--text); text-decoration: none; } a.ckrow:hover { filter: brightness(.97); }
.optchecks { display: flex; flex-wrap: wrap; gap: 4px 14px; } .optchecks label { display: flex; gap: 5px; align-items: center; margin: 0; font-weight: 400; } .optchecks input { width: auto; margin: 0; }
.qusdband { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 14px; border: 2px solid var(--warn);
  border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--text); }
.qusdband .big { font-size: 22px; color: var(--warn); white-space: nowrap; }
.qfxnote { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 8%, var(--card)); font-size: 13px; }
.qusdchip { color: var(--warn); }
.qprevmail iframe { display: block; width: 100%; max-width: 760px; margin: 8px auto 0; height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bpbox > summary.pkbtn { display: inline-block; list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 14px; margin-top: 4px; }
.bpbox > summary.pkbtn::-webkit-details-marker { display: none; } .bpbox[open] > summary.pkbtn { background: var(--bg); }
.h5 .h4cfg { cursor: default; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 22px; box-sizing: border-box; background: #f4f4f4; border: 1px solid #c9c9c9; font: 15px "Segoe UI", Arial, sans-serif; color: #333; }
.h5 .h4cfg b { letter-spacing: .08em; color: #6b6b6b; } .h5 .h4cfg label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; } .h5 .h4cfg input { width: 18px; height: 18px; margin: 0; }
.h5 .h4na { background: rgba(240, 240, 240, .93); border-radius: 2px; } .h5 .h4lcd { font-size: 17px; gap: 4px; }
.h5 .h5n:disabled { background: #ececec; color: #aaa; border-color: #ddd; cursor: not-allowed; }

/* pay runs */
.prtbl td,.prtbl th{padding:4px 6px;vertical-align:middle}.prtbl tr.prok td{background:color-mix(in srgb,var(--ok,#2e7d32) 7%,transparent)}
details.prcard>summary{cursor:pointer;list-style:none}details.prcard>summary::-webkit-details-marker{display:none}

/* product datasheet editor */
.dsgrid { display: block; }       /* the editor full width, the PDF under it */
.dsgrid > .card { margin-bottom: 12px; }
.dsprev { width: 100%; max-width: 900px; height: 92vh; display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dspics { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.dspic { position: relative; width: 96px; height: 72px; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.dspic img { width: 100%; height: 100%; object-fit: contain; }
.dspic.main { border-color: #e8711c; } .dspic.side { border-color: var(--accent); }
.dspic span { position: absolute; left: 0; bottom: 0; font-size: 11px; font-weight: 700; padding: 1px 5px; background: rgba(255,255,255,.85); }
.dspic span:empty { display: none; }
.dsmain { margin: 8px 0; padding: 40px 70px; background: #f3f5f8; border-radius: 8px; overflow: hidden; }
.dsstage { position: relative; }
.dsstage img { width: 100%; display: block; cursor: crosshair; user-select: none; }
.dsstage svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dslab { position: absolute; transform: translate(-50%, -50%); background: #fff; border: 2px solid #e8711c; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 700;
  color: #0b2f55; white-space: nowrap; cursor: grab; touch-action: none; text-transform: uppercase; }
.dsdot { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; transform: translate(-50%, -50%); cursor: move; touch-action: none; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
#dstabs a { display: inline-flex; align-items: center; gap: 4px; }
.dscanvas { position: relative; width: 100%; margin: 8px 0; background: #0f2c4c; border-radius: 8px; overflow: visible; touch-action: none; }
.dsitem { position: absolute; cursor: move; outline: 1px dashed rgba(255,255,255,.35); }
.dsitem.on { outline: 2px solid #e8711c; }
.dsitem img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; }
.dsitem .dsmini { position: absolute; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.dsrs { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #e8711c; border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; touch-action: none; }
.dsbul { position: absolute; margin: 0; padding-left: 14px; color: #fff; font-size: 10px; font-weight: 700; pointer-events: none; }
.dsitem .dsminil { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dsitem .dsminilab { position: absolute; transform: translate(-50%, -50%); font-style: normal; font-size: 8px; font-weight: 800; color: #0b2f55; background: #fff;
  border: 1.5px solid #e8711c; border-radius: 3px; padding: 0 3px; white-space: nowrap; pointer-events: none; }
.dsprog { position: relative; height: 22px; background: var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.dsprog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .2s; }
.dsprog span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 22px; font-weight: 600; }
.dscanvas { max-width: 900px; margin-left: auto; margin-right: auto; }
.dsmain .dsstage { max-width: 640px; margin: 0 auto; }
.dsbul { text-shadow: 0 0 2px #000, 0 0 2px #000; }

/* datasheet canvas drawn to scale: 1 mm of the PDF = 100cqw / 180 (text, numbers and lists the same size as on the PDF) */
.dscanvas { container-type: inline-size; }
.dscanvas .dsbul { --mm: calc(100cqw / 180); font-size: calc(var(--mm) * 2.646); padding-left: 1.51em; }
.dscanvas .dsbul li { margin: .19em 0; } .dscanvas .dsbul li::marker { color: #f07a1c; }
.dscanvas .dsbul.b-left { list-style: none; padding-left: 0; text-align: right; }
.dscanvas .dsbul li.nb { list-style: none; margin-left: -1.51em; } .dscanvas .dsbul.b-left li.nb { margin-left: 0; }
.dscanvas .dsn { font-size: .867em; min-width: 1.83em; height: 1.83em; line-height: 1.57em; border-radius: .92em; margin-right: .52em; border-width: .13em; }
.dscanvas .dstxt { --mm: calc(100cqw / 180); position: absolute; white-space: pre; line-height: 1.25; cursor: move; touch-action: none; z-index: 2; outline: 1px dashed rgba(255,255,255,.45); min-height: 1em; }
.dscanvas .dstxt.on { outline: 2px solid #e8711c; }
.dsn { display: inline-block; min-width: 22px; height: 22px; line-height: 18px; border-radius: 11px; text-align: center; font-weight: 800; font-size: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); text-shadow: none; }
.dslab.dsnum { width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 50%; text-align: center; line-height: 24px; font-size: 14px; font-weight: 800; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }

/* numbers put on the datasheet picture area itself, and their movable list */
.dscanvas .dsamark { --mm: calc(100cqw / 180); position: absolute; transform: translate(-50%, -50%); width: calc(var(--mm) * 4.8); height: calc(var(--mm) * 4.8);
  border-radius: 50%; border: calc(var(--mm) * .34) solid #fff; display: flex; align-items: center; justify-content: center; font-size: calc(var(--mm) * 2.88);
  font-weight: 800; cursor: move; touch-action: none; z-index: 3; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.dscanvas .dsalist { pointer-events: auto; cursor: move; touch-action: none; z-index: 2; outline: 1px dashed rgba(255,255,255,.45); list-style: none; padding-left: 0; }
.dscanvas .dsalist li.nb { margin-left: 0; }
.dscanvas .dsalist .dsrs { pointer-events: auto; }
.dscanvas .dsitem.sel, .dscanvas .dstxt.sel { outline: 2px solid #1e88e5; outline-offset: 1px; }
.dscanvas .dsqr { --mm: calc(100cqw / 180); position: absolute; z-index: 20; width: calc(var(--mm) * 25); padding: calc(var(--mm) * 1.5); background: #fff; border-radius: calc(var(--mm) * 2);
  text-align: center; cursor: move; touch-action: none; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.dscanvas .dsqr i { display: block; height: calc(var(--mm) * 22); background: repeating-conic-gradient(#1b1f24 0 25%, #fff 0 50%) 0 0 / calc(var(--mm) * 3.2) calc(var(--mm) * 3.2); }
.dscanvas .dsqr b { display: block; margin-top: calc(var(--mm) * .8); background: #1b1f24; color: #fff; border-radius: calc(var(--mm) * 3); font-size: calc(var(--mm) * 2.3); padding: calc(var(--mm) * .7); }
.dspage { position: relative; max-width: 460px; aspect-ratio: 210 / 297; margin: 8px auto; background: #0b2f55 center / 100% 100% no-repeat; border: 1px solid var(--line); overflow: hidden; container-type: inline-size; }
.dspage .dsqr2 { position: absolute; background: #fff; text-align: center; box-sizing: border-box; cursor: move; touch-action: none;
  box-shadow: 0 0 0 2px #e8711c; z-index: 2; }
.dspage .dsqr2 i { display: block; aspect-ratio: 1; background: repeating-conic-gradient(#1b1f24 0 25%, #fff 0 50%) 0 0 / 14% 14%; }
.dspage .dsqr2 b { display: block; background: #1b1f24; color: #fff; border-radius: 99px; white-space: nowrap; line-height: 1.2; }

/* 📘 notes for the user manual on the assembly manual's steps; ⭐ pictures */
.umnotes { margin: 10px 0 4px; border: 1px dashed #93b4dc; border-radius: 8px; padding: 6px 10px; background: #f5f9ff; }
.umnotes summary { cursor: pointer; font-weight: 600; color: #1d4f91; }
.umn { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); }
.umn:last-of-type { border-bottom: 0; }
.umn .umtext { flex: 1; min-width: 200px; white-space: pre-wrap; }
.umtag { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: #e8eef7; white-space: nowrap; }
.umt-safety { background: #fde2e1; } .umt-maintenance { background: #e3f3e6; } .umt-troubleshooting { background: #fff1d6; } .umt-spec { background: #ece6fb; }
.umadd { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; } .umadd select { align-self: flex-start; } .umadd textarea { width: 100%; }
.picbtn.umstar { font-size: 15px; line-height: 1; } .picbtn.umstar.on { background: #fff4c2; }
.umpics { display: flex; flex-wrap: wrap; gap: 6px; } .umpics img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* Admin › Website visitors: one visitor per line, full width */
.wvrow { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; }
.wvrow:hover { background: var(--bg); }
.wvrow .wvco { color: var(--accent); }

/* Admin › Website › categories: one folding line each */
.catd { border-bottom: 1px solid var(--line); padding: 6px 0; } .catd summary { cursor: pointer; padding: 4px 0; }
.catd > .docrow { border: 0; padding-top: 4px; }

/* Admin › Website › Home page editor */
.hmhero { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin: 6px 0; }
.hmbg { width: 260px; height: 95px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #0b2f55; }
.hmpic { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.hmlogo { height: 40px; max-width: 150px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; flex: none; padding: 2px; }
.hmnone { display: inline-flex; align-items: center; justify-content: center; color: var(--muted, #888); font-size: 12px; background: var(--bg); }
span.hmlogo.hmnone { width: 90px; }
.hmrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.hmcol { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hmpb { display: inline-flex; gap: 4px; flex-wrap: wrap; } .hmmv { display: flex; gap: 2px; flex: none; }
.hmf { display: block; margin: 6px 0; } .hmf input, .hmf textarea { width: 100%; }
