:root { color: var(--ink, #1c1917); background: var(--page, #f4f7f5); font-family: var(--body-font, "Segoe UI", sans-serif); line-height: 1.45; }
body { margin: 0; }
a { color: #6d28d9; text-decoration: none; }
a:hover, a:focus, a:visited { text-decoration: none; }
[hidden] { display: none !important; }
header { display: flex; flex-wrap: nowrap; gap: 1rem; align-items: center; height: 5rem; min-height: 5rem; max-height: 5rem; padding: 0 1.2rem; background: var(--header, #12382c); color: var(--header-ink, #f4f7f5); position: relative; z-index: 20; overflow: visible; }
.brand { color: inherit; font-weight: 700; text-decoration: none; display: flex; gap: 0.75rem; align-items: center; height: 5rem; min-width: 0; max-width: 24rem; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { height: 5rem; width: auto; max-width: 16rem; object-fit: contain; object-position: left center; padding: 0.4rem 0; box-sizing: border-box; }
.page-title { flex: 1 1 auto; min-width: 0; text-align: center; }
.current-page { margin: 0; font-family: var(--heading-font, "Segoe UI", sans-serif); font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-name { margin: 0; font-size: 0.75rem; line-height: 1.1; font-weight: 700; }
nav { display: flex; align-items: center; gap: 0.7rem; }
button.download-app { margin: 0; background: none; color: var(--header-ink, #f4f7f5); border: 0; border-radius: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
button.download-app:hover, button.download-app:focus { background: none; color: var(--header-ink, #f4f7f5); text-decoration: none; }
@media (display-mode: standalone) { #download-app { display: none; } }
.skin-list { display: grid; gap: 0.5rem; margin: 0.6rem 0; }
.menu-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.menu-button { display: none; font-weight: 700; text-decoration: none; color: inherit; }
.site-links { display: flex; gap: 0.7rem; align-items: center; }
.sync-menu { margin: 0; }
button.copy { padding: 0.2rem 0.55rem; }
.site-links > a, nav details.menu summary, .menu-button { color: var(--header-ink, #f4f7f5); font-weight: 700; text-decoration: none; }
.site-links > a:hover, .site-links > a:focus, .site-links > a:visited,
nav details.menu summary:hover, nav details.menu summary:focus, .menu-button:hover, .menu-button:focus { color: var(--header-ink, #f4f7f5); text-decoration: none; }
nav details.menu { position: relative; }
nav details.menu summary { list-style: none; cursor: pointer; }
nav details.menu summary::-webkit-details-marker { display: none; }
nav details.menu summary::after { content: " ▾"; }
nav details.menu > div { position: absolute; top: calc(100% + 0.55rem); right: 0; min-width: 16rem; background: white; color: #1c1917; border-radius: 4px; padding: 0.3rem 0; z-index: 30; box-shadow: 0 8px 24px rgba(28, 25, 21, 0.28); }
nav details.menu a { display: block; color: #1c1917; font-weight: 700; text-decoration: none; padding: 0.55rem 0.9rem; }
nav details.menu a:hover, nav details.menu a:focus, nav details.menu a:visited { text-decoration: none; background: #eef4f1; }
button, .button { background: var(--accent, #111); color: var(--accent-ink, white); border: 0; border-radius: 4px; padding: 0.55rem 0.8rem; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { background: #d6d3d1; color: #57534e; cursor: not-allowed; }
main { padding: 1.2rem; max-width: 1100px; }
h1, h2, h3 { font-family: var(--heading-font, "Segoe UI", sans-serif); }
label { display: grid; gap: 0.25rem; margin: 0.6rem 0; }
input, select, textarea { font: inherit; padding: 0.45rem; border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; background: white; width: 100%; box-sizing: border-box; }
textarea { min-height: 5rem; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 0.45rem; border-bottom: 1px solid var(--muted, #d6d3d1); vertical-align: top; }
.notice { background: #fff4d6; border: 1px solid #d6d3d1; padding: 0.7rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin-top: 0.6rem; }
.dashboard a { display: flex; flex-direction: column; justify-content: space-between; min-height: 7rem; background: white; border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; padding: 0.9rem 1rem; color: #6d28d9; text-decoration: none; }
.dashboard a:hover, .dashboard a:focus, .dashboard a:visited { text-decoration: none; background: #f5f3ff; color: #6d28d9; }
.dashboard strong { color: var(--ink, #1c1917); font-size: 2rem; line-height: 1.1; }
.dashboard span { font-weight: 700; }
.screen-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.screen-tools h1 { margin: 0; }
.home-tools { display: flex; gap: 0.4rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.home-tools span { font-weight: 700; }
th .sorts { display: inline-flex; gap: 0.15rem; margin-left: 0.35rem; }
th .sorts button { padding: 0.05rem 0.3rem; }
.inline-delete { display: inline; }
input[name$="_digits"] { min-width: 12rem; }
fieldset { border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; }
fieldset label { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 0.8rem; }
.stages { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0 0 1rem; }
.stages li { padding: 0.35rem 0.6rem; border: 1px solid var(--muted); background: white; }
.stages .done { background: #eef4f1; }
.stages .current { background: var(--header, #12382c); color: var(--header-ink, #f4f7f5); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin: 0; }
.facts div { background: white; border-radius: 4px; padding: 0.7rem 0.8rem; }
.facts dt { margin: 0; font-size: 0.85rem; }
.facts dd { margin: 0.15rem 0 0; font-size: 1.35rem; font-weight: 700; }
.booking-choice, .booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.booking-choice label, .booking-block label { display: block; margin: 0.45rem 0; }
.booking-choice select, .booking-block input, .booking-block select, .booking-block textarea { width: 100%; }
.booking-block { margin: 0; }
.booking-block[hidden] { display: none; }
.booking-job { margin-top: 1rem; }
.parcel-row { margin: 0.35rem 0; }
.parcel-head, .parcel-type-line { display: grid; grid-template-columns: minmax(7.5rem, 1.3fr) repeat(4, minmax(3.2rem, 0.7fr)) auto; gap: 0.4rem; align-items: center; }
.parcel-head { font-weight: 700; font-size: 0.85rem; }
.ready-line { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; }
.ready-line label { flex: 1 1 10rem; margin: 0; min-width: 8rem; }
.parcel-type-line select, .parcel-type-line input, .ready-line input { width: 100%; }
.parcel-type-line .parcel-size { display: contents; }
.parcel-type-line [data-standard-size] { grid-column: 2 / 6; margin: 0; }
.parcel-type-line button { width: auto; margin: 0; }
.parcel-size[hidden], .parcel-type-line .parcel-size[hidden], [data-standard-size][hidden], #parcel-size[hidden] { display: none; }
[data-charge-readout]:not(:empty), .charge-box { display: inline-block; width: fit-content; margin: 0.6rem 0; padding: 0.7rem 1rem; background: var(--accent, #2f6fad); color: var(--accent-ink, #f4f6f8); border-radius: 4px; font-weight: 700; }
[data-charge-readout]:empty { display: none; }
.label-line { display: inline-flex; align-items: center; gap: 0.35rem; }
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border: 1px solid currentColor; border-radius: 50%; font-size: 0.75rem; font-weight: 700; font-style: italic; line-height: 1; cursor: help; }
.info-pop { display: none; position: absolute; left: 0; bottom: calc(100% + 0.45rem); width: 16rem; padding: 0.55rem 0.7rem; background: #1c1917; color: #f4f7f5; border-radius: 4px; font-size: 0.85rem; font-weight: 400; font-style: normal; line-height: 1.35; z-index: 8; text-align: left; }
.info-tip:hover .info-pop, .info-tip:focus .info-pop { display: block; }
.lookup-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lookup-results button { display: block; width: 100%; margin: 0.3rem 0; text-align: left; }
.company-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1rem; align-items: end; }
.wide, .company-form > button, .swatches { grid-column: 1 / -1; }
.setup-note, fieldset { background: white; border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; padding: 0.8rem 1rem; margin: 0.8rem 0; }
.show-password, .tick { display: flex; align-items: center; gap: 0.4rem; margin: 0.2rem 0; }
.show-password input, .tick input { width: auto; }
.ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.3rem 0.8rem; }
.record-search { max-width: 28rem; }
.record-search input { width: 100%; }
tr.selected { background: #fff4d6; }
table.record-table tbody tr { cursor: pointer; }
table.record-table select { width: auto; min-width: 9rem; }
table.record-table button { width: auto; margin: 0; white-space: nowrap; }
button.text-link, table.record-table button.text-link { background: none; color: #6d28d9; font-weight: 700; padding: 0; border: 0; text-decoration: none; cursor: pointer; }
button.text-link:hover, button.text-link:focus { color: #6d28d9; text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.4rem 0 0.8rem; }
.detail-card { background: white; border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; padding: 0.7rem 0.85rem; }
.detail-card.wide { grid-column: 1 / -1; }
.detail-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.detail-card p, .detail-card ul { margin: 0.2rem 0; }
#detail-pop .charge-box { margin-top: 0.5rem; }
.table-scroll { overflow-x: auto; }
dialog.record-dialog { border: 0; border-radius: 6px; padding: 1.2rem; width: min(40rem, calc(100vw - 1rem)); max-height: calc(100vh - 1rem); overflow: auto; background: var(--page, #f4f7f5); }
#app-busy[open] { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 40; margin: 0; }
#app-busy-backdrop { position: fixed; inset: 0; background: rgba(28, 25, 21, 0.45); z-index: 30; }
dialog.record-dialog::backdrop, #roles-backdrop.is-open { background: rgba(28, 25, 21, 0.45); }
#roles-backdrop { display: none; }
#roles-backdrop.is-open { display: block !important; position: fixed; inset: 0; z-index: 9998; }
#roles-pop { display: none; }
#roles-pop.is-open { display: block !important; position: fixed; z-index: 9999; top: 4.25rem; left: 50%; transform: translateX(-50%); width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 5.5rem); overflow: auto; padding: 0.9rem 1rem; border-radius: 4px; background: white; color: #1c1917; }
.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.8rem; margin: 0.6rem 0; }
.ticks label { display: flex; align-items: center; gap: 0.45rem; margin: 0; }
.ticks input { width: auto; flex: 0 0 auto; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.colour-block { position: relative; display: block; height: 5.5rem; }
.colour-block input[type="color"] { height: 100%; padding: 0; }
.colour-hint { position: absolute; left: 0.4rem; right: 0.4rem; bottom: 0.4rem; text-align: center; font-size: 0.78rem; background: rgba(255,255,255,0.92); pointer-events: none; }
.font-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.count-bar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto auto; gap: 0.4rem; align-items: center; background: white; padding: 0.6rem; border: 1px solid var(--muted, #d6d3d1); border-radius: 4px; }
.count-bar input { min-height: 2.8rem; font-size: 1.05rem; }
#camera-view, #scan-view { width: 100%; max-height: 16rem; background: #111; border-radius: 4px; }
button.scan { width: auto; margin-top: 0.35rem; }
pre { white-space: pre-wrap; background: white; padding: 0.7rem; }
@media (min-width: 801px) and (max-width: 1100px) {
  input, select, textarea, button { min-height: 2.75rem; }
  main { max-width: 100%; }
}
@media (max-width: 800px) {
  .menu-button { display: inline; }
  .site-links { display: none; position: absolute; top: 5rem; right: 0.6rem; left: 0.6rem; background: white; color: #1c1917; padding: 0.4rem; border-radius: 4px; flex-direction: column; align-items: stretch; }
  .menu-toggle:checked ~ .site-links { display: flex; }
  .site-links > a, nav details.menu summary, nav details.menu a { color: #1c1917; }
  nav details.menu > div { position: static; box-shadow: none; min-width: 0; }
  .company-form, .swatches, .font-choices, .count-bar, .booking-choice, .booking-grid, .detail-grid, .screen-tools { grid-template-columns: 1fr; }
  .screen-tools, .home-tools { flex-wrap: wrap; }
  .detail-card.wide { grid-column: auto; }
  header { padding: 0 0.7rem; gap: 0.4rem; }
  main { padding: 0.8rem; }
}
.label-sheet { background: white; color: #111; }
.label { border: 1px solid #111; width: 8cm; margin: 0.4rem; padding: 0.5rem; }
.label-waybill { font-weight: 700; }
.track-map { width: 100%; max-width: 32rem; background: #eef4f1; }
#signature { border: 1px solid #d6d3d1; touch-action: none; background: white; }
#bin-banner { font-size: 1.6rem; font-weight: 700; }
