/* Po.Co interface: shared tokens in tokens.css. No embedded brand-font extraction. */
* {
  box-sizing:border-box
}
html {
  font-size:14px;
  scroll-padding-top:90px
}
body {
  margin:0;
  background:var(--surface-canvas);
  color:var(--text-primary);
  font-family:var(--font-ui);
  line-height:1.5;
  font-variant-numeric:tabular-nums
}
button,input,select,textarea {
  font:inherit
}
a {
  color:inherit;
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 18px;
  border:1px solid var(--action-primary);
  border-radius:var(--radius-control);
  background:var(--action-primary);
  color:var(--text-on-dark);
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  transition:background var(--motion-fast)
}
button:hover,.button:hover {
  background:var(--action-hover);
  text-decoration:none
}
button:active,.button:active {
  transform:translateY(1px)
}
button:disabled {
  opacity:.6;
  cursor:not-allowed
}
button.secondary,.button.secondary {
  background:var(--surface-panel);
  color:var(--text-primary);
  border-color:var(--border-control)
}
button.secondary:hover,.button.secondary:hover {
  background:var(--surface-soft)
}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:2px solid var(--focus-ring);
  outline-offset:3px
}
input,select,textarea {
  width:100%;
  min-height:44px;
  border:1px solid var(--border-control);
  border-radius:var(--radius-control);
  background:var(--surface-panel);
  color:var(--text-primary);
  padding:10px 12px;
  max-width:100%
}
input[type=checkbox] {
  width:20px;
  min-height:20px
}
textarea {
  min-height:110px;
  resize:vertical
}
label {
  font-weight:600;
  display:block;
  margin-bottom:6px
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:2rem;
  line-height:1.22;
  font-weight:600;
  letter-spacing:-.6px;
  margin:8px 0 14px
}
h2 {
  font-size:1.2857rem;
  font-weight:600;
  margin-bottom:16px
}
h3 {
  font-size:1.05rem;
  font-weight:600
}
p+p {
  margin-top:12px
}
strong {
  font-weight:600
}
small,.muted,.lead {
  color:var(--text-secondary)
}
.muted {
  font-size:.93rem
}
.lead {
  margin-bottom:24px
}
.eyebrow {
  font-size:.79rem;
  letter-spacing:.15em;
  color:var(--text-secondary);
  font-weight:600;
  margin-bottom:6px
}
.icon {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0)
}
.skip-link {
  position:fixed;
  top:-80px;
  left:16px;
  z-index:100;
  background:var(--surface-panel);
  padding:12px
}
.skip-link:focus {
  top:8px
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar-width);
  background:var(--surface-nav);
  color:var(--text-on-dark);
  display:flex;
  flex-direction:column;
  z-index:40
}
.brand-block {
  padding:30px 28px 24px
}
.brand {
  display:inline-flex;
  padding:12px 4px
}
.brand img {
  width:128px;
  height:auto;
  display:block
}
.brand-caption {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
  font-size:15px
}
.brand-caption span {
  font-size:12px;
  color:var(--brand-warm-gray)
}
.sidebar nav {
  overflow-y:auto;
  padding:0 16px 24px;
  flex:1
}
.sidebar nav>a,.nav-group a {
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border-radius:6px;
  font-size:13px;
  color:var(--text-on-dark)
}
.nav-group a {
  margin:2px 0 2px 28px;
  font-size:12px;
  line-height:1.4
}
.sidebar a.active {
  background:var(--brand-sand);
  color:var(--text-primary);
  font-weight:600
}
.sidebar nav a:hover {
  background:var(--action-hover);
  text-decoration:none
}
.sidebar nav a.active:hover {
  background:var(--brand-sand)
}
.nav-caption {
  font-size:10px;
  letter-spacing:.16em;
  color:var(--brand-warm-gray);
  padding:12px
}
.nav-group {
  margin-top:8px
}
.nav-group summary {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:48px;
  padding:12px;
  cursor:pointer;
  font-size:14px;
  list-style:none
}
.nav-group summary:after {
  content:'›';
  margin-left:auto;
  transform:rotate(90deg)
}
.nav-group[open] summary:after {
  transform:rotate(-90deg)
}
.nav-group summary::-webkit-details-marker {
  display:none
}
.sidebar-footer {
  border-top:1px solid var(--brand-cool-gray);
  padding:20px 28px;
  color:var(--brand-warm-gray);
  font-size:11px;
  letter-spacing:.05em
}
.sidebar-footer span {
  display:block;
  margin-top:4px;
  font-size:11px
}
.workspace {
  margin-left:var(--sidebar-width);
  min-width:0
}
.topbar {
  height:var(--header-height);
  border-bottom:1px solid var(--border-subtle);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 32px;
  background:var(--surface-canvas);
  position:sticky;
  top:0;
  z-index:25
}
.breadcrumb {
  font-size:12px;
  color:var(--text-secondary)
}
.breadcrumb span {
  margin:0 12px;
  color:var(--border-control)
}
.topbar-tools {
  display:flex;
  align-items:center;
  gap:20px
}
.nav-search {
  margin:0;
  width:200px
}
.nav-search input {
  min-height:36px;
  font-size:12px;
  padding:7px 12px
}
.attention-link {
  display:grid;
  place-items:center;
  width:44px;
  height:44px
}
.profile {
  position:relative
}
.profile summary {
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  list-style:none;
  min-height:44px
}
.avatar {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--surface-selected);
  font-size:12px;
  font-weight:600
}
.profile-name {
  font-size:12px;
  max-width:130px;
  overflow-wrap:anywhere
}
.profile-menu {
  position:absolute;
  right:0;
  top:48px;
  min-width:220px;
  padding:16px;
  border:1px solid var(--border-subtle);
  background:var(--surface-panel);
  border-radius:10px;
  box-shadow:var(--shadow-overlay)
}
.profile-menu a {
  display:block;
  padding:12px 0
}
.logout button {
  width:100%
}
.menu-toggle,.nav-close,.mobile-nav {
  display:none
}
main {
  padding:28px 32px 48px;
  min-width:0;
  max-width:1900px;
  margin:auto
}
main:focus {
  outline:none
}
.environment {
  font-size:11px;
  color:var(--text-secondary);
  margin-bottom:16px;
  letter-spacing:.04em
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:24px
}
.page-heading h1 {
  margin-bottom:8px;
  overflow-wrap:anywhere
}
.page-heading>div { min-width:0; max-width:100%; }
.eyebrow { overflow-wrap:anywhere; }
h1,h2,h3 { overflow-wrap:anywhere; }
.page-heading p {
  color:var(--text-secondary)
}
.panel {
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-panel);
  padding:24px;
  margin:24px 0;
  min-width:0
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:18px
}
.section-heading h2 {
  margin:0
}
.section-heading>a {
  font-size:12px;
  text-decoration:underline
}
.kpis {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px
}
.kpi {
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:10px
}
.kpi:hover {
  text-decoration:none;
  border-color:var(--border-control)
}
.kpi-label {
  font-size:12px;
  color:var(--text-secondary)
}
.kpi strong {
  font-size:32px;
  line-height:1.1;
  letter-spacing:-1px
}
.kpi small {
  font-size:12px;
  font-weight:400;
  letter-spacing:0;
  margin-left:6px
}
.kpi-note {
  font-size:11px;
  color:var(--text-secondary)
}
.attention-panel {
  display:grid;
  grid-template-columns:180px 1fr;
  border-left:3px solid var(--brand-sand);
  padding:20px 24px;
  gap:20px
}
.attention-panel h2 {
  margin-bottom:6px
}
.attention-items {
  display:grid;
  gap:8px
}
.attention-item {
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:13px
}
.attention-item strong {
  color:var(--status-warning)
}
.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:100%;
  padding:4px 8px;
  border-radius:4px;
  background:var(--surface-soft);
  color:var(--text-secondary);
  font-size:12px;
  font-weight:600;
  line-height:1.4
}
.badge.info {
  color:var(--status-info);
  background:var(--status-info-bg)
}
.badge.success {
  color:var(--status-success);
  background:var(--status-success-bg)
}
.badge.warning {
  color:var(--status-warning);
  background:var(--status-warning-bg)
}
.badge.error,.overdue {
  color:var(--status-error);
  background:var(--status-error-bg)
}
.toolbar {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:16px 0 24px
}
.toolbar>a:not(.button) {
  padding:10px 6px;
  text-decoration:underline
}
.table-scroll {
  overflow:auto;
  border:1px solid var(--border-subtle);
  border-radius:10px;
  background:var(--surface-panel);
  max-width:100%;
  position:relative
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:14px
}
thead {
  background:var(--surface-soft)
}
th {
  text-align:left;
  font-size:12px;
  font-weight:600;
  color:var(--text-secondary);
  white-space:nowrap;
  position:sticky;
  top:0;
  background:var(--surface-soft);
  z-index:1
}
td,th {
  padding:14px 16px;
  border-bottom:1px solid var(--border-subtle);
  vertical-align:middle
}
td {
  overflow-wrap:anywhere;
  max-width:300px
}
tbody tr:last-child td {
  border-bottom:0
}
tbody tr:hover {
  background:var(--surface-selected)
}
td a {
  font-weight:600
}
td small {
  display:block;
  font-size:11px;
  margin-top:4px
}
.numeric {
  text-align:right;
  font-variant-numeric:tabular-nums
}
.record-number {
  font-weight:600;
  font-size:15px;
  white-space:nowrap
}
.product-cell {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:180px
}
.thumb,.photo-placeholder {
  width:44px;
  height:52px;
  object-fit:contain;
  background:var(--surface-soft);
  border-radius:4px;
  flex-shrink:0
}
.photo-placeholder {
  display:grid;
  place-items:center;
  color:var(--text-secondary);
  font-size:11px
}
.filters {
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px;
  padding:16px;
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px
}
.filters>label {
  flex:1;
  min-width:120px;
  margin:0;
  font-size:12px
}
.filters>label:first-child {
  flex:2;
  min-width:200px
}
.filters select,.filters input {
  font-size:13px
}
.filter-chips {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px
}
.filter-chips a {
  padding:6px 10px;
  border-radius:4px;
  background:var(--surface-selected);
  font-size:12px;
  min-height:32px
}
.pagination {
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:flex-end;
  font-size:12px;
  padding:20px 0
}
.pagination a {
  min-height:44px;
  display:flex;
  align-items:center
}
.empty {
  padding:40px 24px;
  text-align:center;
  background:var(--surface-panel);
  border:1px dashed var(--border-control);
  border-radius:10px
}
.empty h2 {
  margin-bottom:10px
}
.empty p {
  color:var(--text-secondary);
  max-width:500px;
  margin:auto
}
.cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px
}
.card {
  padding:20px;
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  display:flex;
  flex-direction:column;
  gap:8px
}
.card strong {
  font-size:28px
}
.card small {
  font-size:12px
}
.work-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px
}
.work-card {
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  padding:20px;
  min-width:0
}
.work-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px
}
.work-model {
  display:flex;
  gap:16px;
  align-items:center;
  margin-bottom:20px
}
.work-model .thumb,.work-model .photo-placeholder {
  width:64px;
  height:76px
}
.work-model h2 {
  margin-bottom:6px;
  font-size:18px
}
.work-model p {
  color:var(--text-secondary);
  font-size:13px
}
.counts {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:16px 0;
  border-top:1px solid var(--border-subtle);
  border-bottom:1px solid var(--border-subtle);
  margin-bottom:16px
}
.counts strong {
  font-size:24px;
  display:block
}
.counts span {
  font-size:12px;
  color:var(--text-secondary)
}
.work-card .button {
  width:100%;
  margin-top:16px
}
.work-card>p {
  font-size:12px;
  color:var(--text-secondary)
}
.task-summary {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:16px 0;
  border-bottom:1px solid var(--border-subtle)
}
.task-summary span {
  color:var(--text-secondary)
}
.detail-layout {
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(260px,1fr);
  gap:24px;
  align-items:start
}
.detail-layout>.panel {
  margin-top:0
}
.details {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:0;
  gap:0 24px
}
.details>div {
  padding:14px 0;
  border-bottom:1px solid var(--border-subtle);
  min-width:0
}
.details dt {
  color:var(--text-secondary);
  font-size:12px;
  margin-bottom:4px
}
.details dd {
  margin:0;
  overflow-wrap:anywhere
}
.details dd a {
  text-decoration:underline
}
.record-context {
  background:var(--surface-soft);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  padding:20px;
  margin-bottom:20px
}
.detail-tabs {
  display:flex;
  gap:4px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--border-subtle);
  margin:24px 0
}
.detail-tabs a {
  padding:12px 16px;
  min-height:44px
}
.detail-tabs a:hover {
  background:var(--surface-selected)
}
.gallery {
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin:16px 0
}
.gallery img {
  width:180px;
  height:220px;
  object-fit:contain;
  background:var(--surface-soft);
  border-radius:6px
}
.stage-cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:12px
}
.stage-card {
  border-left:2px solid var(--brand-sand);
  padding:8px 12px;
  background:var(--surface-canvas);
  font-size:12px
}
.stage-card p {
  margin:8px 0
}
.stage-card h3 {
  font-size:13px
}
.stage-card small {
  font-size:11px
}
.workflow {
  display:flex;
  flex-wrap:wrap;
  gap:16px
}
.workflow span:after {
  content:' →';
  color:var(--text-secondary)
}
.workflow span:last-child:after {
  content:''
}
.form-panel {
  max-width:900px
}
.form-panel form>p {
  margin:0 0 20px
}
.form-panel label {
  font-size:13px
}
.form-panel .helptext {
  display:block;
  color:var(--text-secondary);
  font-size:12px;
  margin-top:6px
}
.form-panel ul {
  font-size:12px;
  padding-left:20px
}
.form-panel button[type=submit] {
  margin-top:8px
}
.form-footer {
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:24px
}
.form-footer a {
  text-decoration:underline
}
.errorlist {
  color:var(--status-error);
  background:var(--status-error-bg);
  padding:12px 16px 12px 32px;
  border-radius:6px
}
.notice {
  border-left:3px solid var(--status-success);
  background:var(--status-success-bg);
  color:var(--status-success);
  padding:16px 20px;
  margin:16px 0;
  border-radius:6px
}
.submission-state:not(:empty) {
  padding:14px;
  background:var(--status-info-bg);
  color:var(--status-info);
  border-radius:6px
}
.quantity-preview {
  padding:16px;
  background:var(--surface-selected);
  margin:16px 0;
  border-radius:6px
}
.report-filters {
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  gap:12px;
  padding:20px;
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  margin:20px 0
}
.report-filters p {
  flex:1;
  min-width:140px;
  margin:0
}
.report-filters label {
  font-size:12px
}
.report-switcher {
  margin:16px 0
}
.report-switcher summary {
  padding:12px 0;
  cursor:pointer;
  min-height:44px
}
.report-note {
  margin:16px 0 24px
}
.search {
  margin:20px 0
}
.search>div {
  display:flex;
  gap:12px
}
.code-labels {
  display:grid;
  gap:20px
}
.code-labels section {
  background:var(--surface-panel);
  padding:24px;
  border:1px solid var(--border-subtle)
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
#connection {
  position:sticky;
  top:64px;
  z-index:30;
  padding:12px 24px;
  background:var(--status-warning-bg);
  color:var(--status-warning);
  border-bottom:1px solid var(--status-warning)
}
.box-barcode {
  display:block;
  width:100%;
  max-width:700px;
  height:auto;
  margin:24px auto
}
.signed-out .workspace {
  margin:0
}
.signed-out .topbar {
  height:100px;
  padding:0 40px;
  background:transparent
}
.auth-caption {
  font-size:13px;
  color:var(--text-secondary)
}
.signed-out main {
  min-height:calc(100vh - 100px);
  padding-top:40px
}
.login-panel {
  background:var(--surface-panel);
  max-width:520px;
  margin:0 auto;
  padding:40px;
  border:1px solid var(--border-subtle);
  border-radius:10px;
  border-top:3px solid var(--brand-sand)
}
.login-panel h1 {
  margin:10px 0 16px
}
.login-panel form {
  margin-top:32px
}
.login-panel form>p {
  margin:0 0 20px
}
.login-panel label {
  font-size:13px
}
.login-panel button {
  width:100%;
  margin-top:8px
}
.login-panel .helptext,.login-panel li {
  font-size:12px;
  color:var(--text-secondary)
}
.login-panel .helptext {
  display:block;
  margin-top:6px
}
.catalog-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:20px
}
.catalog-card {
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:10px;
  padding:20px
}
.catalog-card img {
  width:100%;
  height:250px;
  object-fit:contain;
  background:var(--surface-soft)
}
.catalog-card .photo-placeholder {
  width:100%;
  height:220px
}
.catalog-card dl {
  margin-top:16px
}
.catalog-card dt {
  font-size:12px;
  color:var(--text-secondary)
}
.catalog-card dd {
  margin:0 0 12px
}
@media(min-width:1024px) and (max-width:1279px) {
  :root {
    --sidebar-width:224px
  }
  main {
    padding:24px
  }
  .topbar {
    padding:0 24px
  }
  .kpi {
    padding:16px
  }
  .nav-search {
    width:160px
  }
}
@media(max-width:1023px) {
  .workspace {
    margin:0
  }
  .sidebar {
    display:none;
    width:280px;
    box-shadow:var(--shadow-overlay)
  }
  body.menu-open .sidebar {
    display:flex
  }
  .nav-close {
    display:block;
    margin:0 16px 12px
  }
  .menu-toggle {
    display:inline-flex
  }
  .topbar {
    padding:0 24px
  }
  .sidebar-footer {
    padding:16px 28px
  }
  .detail-layout {
    grid-template-columns:1fr
  }
  .kpis {
    gap:12px
  }
  .kpi {
    padding:16px
  }
  .attention-panel {
    grid-template-columns:1fr
  }
  .breadcrumb {
    margin-right:auto
  }
  .nav-search {
    display:none
  }
  .menu-open:after {
    content:'';
    position:fixed;
    inset:0;
    background:rgb(32 33 36 / 35%);
    z-index:35
  }
  .table-scroll {
    scrollbar-width:auto
  }
  .table-scroll:focus {
    outline:2px solid var(--focus-ring)
  }
}
@media(max-width:767px) {
  html {
    font-size:16px
  }
  main {
    padding:20px 16px calc(var(--bottom-nav-height, 64px) + 26px + env(safe-area-inset-bottom))
  }
  main :is(input,select,textarea,button,a,summary) { scroll-margin-bottom:calc(var(--bottom-nav-height, 64px) + 24px); }
  .topbar {
    padding:0 16px;
    gap:12px
  }
  .breadcrumb {
    font-size:11px;
    max-width:150px
  }
  .breadcrumb span {
    margin:0 4px
  }
  .profile-name {
    display:none
  }
  .topbar-tools {
    gap:6px
  }
  .page-heading {
    align-items:flex-start;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:20px
  }
  h1 {
    font-size:24px
  }
  .page-heading .button {
    width:100%
  }
  .eyebrow {
    font-size:11px
  }
  .kpis {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px
  }
  .kpi strong {
    font-size:28px
  }
  .kpi-note {
    font-size:11px
  }
  .kpi-label {
    font-size:12px
  }
  .kpi {
    padding:16px 12px
  }
  .panel {
    padding:20px 16px;
    margin:20px 0
  }
  .attention-item {
    display:block;
    font-size:14px
  }
  .attention-item a {
    display:block;
    padding:6px 0
  }
  .work-grid {
    grid-template-columns:1fr
  }
  .work-card {
    padding:20px 16px
  }
  .work-card .button,button,.button {
    min-height:48px
  }
  .work-card>p {
    font-size:13px
  }
  .work-model p {
    font-size:14px
  }
  .mobile-nav {
    display:flex;
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:30;
    min-height:64px;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    background:var(--surface-panel);
    border-top:1px solid var(--border-subtle);
    align-items:stretch
  }
  .mobile-nav a,.mobile-nav button {
    flex:1;
    min-width:0;
    overflow-wrap:anywhere;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:10px 6px;
    text-align:center;
    font-size:12px;
    line-height:1.3;
    min-height:48px;
    color:var(--text-primary);
    background:transparent;
    border:0;
    border-radius:4px;
    font-weight:600
  }
  .mobile-nav a:first-child {
    background:var(--surface-selected)
  }
  body.keyboard-open .mobile-nav {
    display:none
  }
  .filters>label,.filters>label:first-child {
    flex:1 1 100%;
    min-width:0
  }
  .filters input,.filters select {
    font-size:16px
  }
  .filters {
    padding:16px
  }
  .filters button {
    flex:1
  }
  .filter-chips a {
    font-size:13px;
    min-height:44px
  }
  .responsive-table {
    overflow:visible;
    border:0;
    background:transparent
  }
  .responsive-table table,.responsive-table tbody {
    display:block;
    width:100%
  }
  .responsive-table thead {
    display:none
  }
  .responsive-table tr {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    background:var(--surface-panel);
    border:1px solid var(--border-subtle);
    border-radius:10px;
    margin-bottom:12px;
    padding:16px;
    gap:12px
  }
  .responsive-table td {
    display:block;
    padding:0;
    border:0;
    max-width:none;
    font-size:15px;
    min-width:0
  }
  .responsive-table td:before {
    content:attr(data-label);
    display:block;
    font-size:12px;
    color:var(--text-secondary);
    margin-bottom:4px
  }
  .responsive-table td:first-child {
    grid-column:1/-1;
    font-size:17px
  }
  .responsive-table td:first-child:before {
    display:none
  }
  .responsive-table .numeric {
    text-align:left
  }
  .responsive-table .product-cell {
    min-width:0
  }
  .responsive-table tr:hover {
    background:var(--surface-panel)
  }
  .details {
    grid-template-columns:1fr
  }
  .details dd {
    font-size:16px
  }
  .stage-cards {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .stage-card {
    font-size:13px
  }
  .stage-card small {
    font-size:12px
  }
  .toolbar {
    gap:8px
  }
  .toolbar .button {
    font-size:14px;
    flex:1
  }
  .form-panel {
    padding:20px 16px
  }
  .form-panel label {
    font-size:15px
  }
  .form-panel .helptext {
    font-size:13px
  }
  .form-footer {
    position:sticky;
    bottom:76px;
    padding:12px 0;
    background:var(--surface-panel);
    z-index:2
  }
  .form-footer button {
    flex:1
  }
  body.keyboard-open .form-footer {
    position:static
  }
  .report-filters p {
    flex:1 1 100%
  }
  .report-filters {
    padding:16px
  }
  .report-filters label {
    font-size:14px
  }
  .signed-out .topbar {
    padding:0 24px;
    height:88px
  }
  .signed-out .brand img {
    width:116px
  }
  .auth-caption {
    font-size:12px
  }
  .signed-out main {
    padding:16px 16px 40px
  }
  .login-panel {
    padding:28px 22px
  }
  .login-panel label {
    font-size:15px
  }
  .signed-out .environment {
    font-size:11px
  }
  .profile-menu {
    right:0
  }
  .gallery img {
    width:140px;
    height:175px
  }
  .counts strong {
    font-size:26px
  }
  .section-heading {
    align-items:flex-start
  }
  .section-heading>a {
    font-size:13px
  }
  .mobile-nav {
    font-size:12px
  }
  .table-scroll:not(.responsive-table) {
    border:1px solid var(--border-control)
  }
  .table-scroll:not(.responsive-table) table {
    min-width:650px
  }
}
@media print {
  @page {
    size:A4;
    margin:14mm
  }
  body {
    background:white;
    color:black;
    font-size:10pt
  }
  .sidebar,.topbar,.mobile-nav,.environment,.toolbar,.pagination,.filters,.report-filters,.report-switcher,.skip-link,#connection,.detail-tabs,.form-footer {
    display:none!important
  }
  .workspace {
    margin:0
  }
  main {
    padding:0;
    max-width:none
  }
  .panel,.work-card,.table-scroll {
    border:0;
    padding:0;
    overflow:visible;
    margin:12pt 0
  }
  table {
    font-size:9pt;
    width:100%
  }
  thead {
    display:table-header-group
  }
  tr {
    break-inside:avoid
  }
  th,td {
    padding:6pt;
    border-bottom:1px solid var(--border-control);
    position:static
  }
  h1 {
    font-size:20pt;
    overflow-wrap:anywhere
  }
  h2 {
    break-after:avoid
  }
  .box-barcode {
    max-width:165mm
  }
  .code-labels section {
    break-inside:avoid
  }
  .responsive-table table {
    display:table
  }
  .responsive-table tbody {
    display:table-row-group
  }
  .responsive-table thead {
    display:table-header-group
  }
  .responsive-table tr {
    display:table-row
  }
  .responsive-table td {
    display:table-cell
  }
  .responsive-table td:before {
    display:none
  }
  .badge {
    background:white;
    color:black
  }
  .gallery img {
    max-height:45mm
  }
  .details {
    grid-template-columns:repeat(2,1fr)
  }
  a {
    color:black
  }
  pre {
    font-size:9pt
  }
}
/* Shared document controls and role workspaces. */
.filter-panel {
  padding:16px;
  background:var(--surface-panel);
  border:1px solid var(--border-subtle);
  border-radius:12px;
  margin-bottom:16px
}
.filter-row {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:end
}
.filter-row label {
  flex:1;
  min-width:150px
}
.filter-row .search-field {
  flex:2
}
.filter-row input,.filter-row select {
  width:100%
}
.filter-row .check {
  display:flex;
  gap:8px;
  align-items:center;
  min-height:44px
}
.filter-row .check input {
  width:20px
}
.extra-filters {
  margin-top:10px
}
.extra-filters summary {
  min-height:36px;
  cursor:pointer
}
.form-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px
}
.form-field {
  min-width:0
}
.form-field:has(textarea),.form-field:has(.errorlist) {
  grid-column:1/-1
}
.form-field input,.form-field select,.form-field textarea {
  width:100%
}
.form-field input[type=checkbox] {
  width:22px
}
.form-field label {
  display:block;
  font-weight:600;
  margin-bottom:6px
}
.form-footer {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:24px
}
.error-summary {
  padding:16px;
  border-left:4px solid var(--status-error);
  background:var(--status-error-bg);
  margin-bottom:20px
}
.error-summary p {
  margin:4px 0
}
.field-error input,.field-error select,.field-error textarea {
  border-color:var(--status-error)
}
.stage-summary {
  display:flex;
  flex-wrap:wrap;
  gap:12px
}
.stage-summary>div {
  display:grid;
  gap:4px;
  padding:12px;
  background:var(--surface-soft);
  border-radius:8px;
  flex:1;
  min-width:180px
}
.section-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:20px 0
}
.section-tabs a {
  padding:10px 14px;
  border-bottom:2px solid var(--border-control)
}
.section-tabs a:hover {
  background:var(--surface-selected);
  border-color:var(--brand-sand)
}
.related-grid {
  display:grid;
  gap:8px
}
.related-record {
  border:1px solid var(--border-subtle);
  border-radius:8px
}
.related-record summary {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  cursor:pointer
}
.related-record .details {
  padding:0 14px
}
.view-switch {
  display:flex;
  gap:8px;
  margin:12px 0
}
.view-switch a {
  padding:10px 14px;
  border:1px solid var(--border-control);
  border-radius:8px
}
.view-switch [aria-current=true] {
  background:var(--surface-selected)
}
.catalog-placeholder {
  aspect-ratio:4/5;
  background:var(--surface-soft);
  display:grid;
  place-items:center;
  color:var(--text-secondary)
}
.back-link {
  display:inline-block;
  margin-bottom:16px
}
.quantity-preview {
  padding:14px;
  border:1px solid var(--border-control);
  background:var(--surface-selected);
  border-radius:8px
}
.stage-summary span {
  font-variant-numeric:tabular-nums
}
.form-panel {
  max-width:920px
}
.report-filters .toolbar {
  align-self:end
}
.report-filters input,.report-filters select {
  max-width:100%
}
td.numeric,th.numeric {
  text-align:right
}
.table-scroll th {
  top:0
}
main section[id] {
  scroll-margin-top:84px
}
body.signed-out .form-fields {
  grid-template-columns:1fr
}
@media(max-width:767px) {
  .form-fields {
    grid-template-columns:1fr
  }
  .filter-row {
    display:grid;
    grid-template-columns:1fr;
    width:100%
  }
  .filter-row label {
    min-width:0
  }
  .form-footer {
    flex-wrap:wrap;
    z-index:15;
    padding:12px;
    background:var(--surface-panel);
    box-shadow:0 -2px 12px var(--surface-soft)
  }
  .form-footer button {
    flex:1;
    min-width:180px
  }
  .form-footer a {
    flex:1
  }
  .related-record summary {
    align-items:start;
    overflow-wrap:anywhere
  }
  .stage-summary {
    display:grid;
    grid-template-columns:1fr
  }
  .section-tabs {
    flex-wrap:nowrap;
    overflow:auto;
    max-width:100%;
    padding-bottom:6px
  }
  .section-tabs a {
    white-space:nowrap
  }
  .catalog-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .catalog-card h2 {
    font-size:16px
  }
  .filter-chips {
    flex-wrap:wrap
  }
  .filter-chips .chip {
    max-width:100%;
    white-space:normal
  }
  td.numeric {
    text-align:right
  }
}
.box-number {
  font-size:24px;
  overflow-wrap:anywhere;
  letter-spacing:.02em
}
.paper {
  max-width:1000px;
  background:white;
  color:black;
  padding:32px
}
.paper h2 {
  margin-top:28px
}
.paper table {
  width:100%;
  margin:16px 0
}
.paper td,.paper th {
  border:1px solid var(--border-control);
  padding:10px
}
.paper .signature {
  min-width:140px;
  height:44px
}
.paper .print-logo {
  margin-bottom:24px
}
.nav-group a[hidden],.nav-group[hidden] {
  display:none
}
.nav-overlay {
  position:fixed;
  inset:0;
  background:rgb(0 0 0 / 40%);
  z-index:35
}
@media(max-width:767px) {
  .attendance-desktop {
    display:none
  }
  .paper {
    padding:16px
  }
  .box-number {
    font-size:20px
  }
  .nav-group a {
    font-size:16px;
    min-height:48px
  }
}
@media print {
  .screen-only {
    display:none
  }
  .paper {
    padding:0;
    max-width:none
  }
  .paper .print-logo {
    width:100px
  }
  .paper h2 {
    break-after:avoid
  }
  .paper td,.paper th {
    border-color:black
  }
  .paper table {
    table-layout:auto
  }
  .paper tr {
    break-inside:avoid
  }
  .paper thead {
    display:table-header-group
  }
}
.notice.warning {
  background:var(--status-warning-bg);
  color:var(--status-warning);
  border-color:var(--status-warning)
}
.menu-open:after {
  display:none
}
.mobile-brand {
  display:none
}
@media(max-width:767px) {
  .mobile-brand {
    display:flex;
    padding:12px 4px;
    margin-right:auto
  }
  .mobile-brand img {
    width:80px;
    height:auto
  }
  .breadcrumb {
    display:none
  }
  .work-section {
    background:transparent;
    border:0;
    padding:0
  }
  .work-section>.section-heading {
    display:none
  }
  .work-card {
    padding:16px
  }
  .work-model h2 {
    font-size:18px;
    line-height:1.35
  }
  .work-card .counts {
    margin:16px 0
  }
  .work-top {
    gap:8px
  }
  .work-top .record-number {
    font-size:14px
  }
  .stage-cards {
    grid-template-columns:1fr
  }
  .form-panel {
    padding:16px
  }
  .form-footer {
    bottom:72px
  }
  .form-footer a {
    min-width:100px
  }
  .form-footer button {
    min-width:160px
  }
}
.stage-summary>[hidden] {
  display:none
}
@media(max-width:767px) {
  .form-footer {
    position:static;
    padding:12px 0;
    box-shadow:none
  }
  .form-footer button {
    flex-basis:100%;
    width:100%
  }
  .form-footer a {
    flex-basis:100%
  }
}

@media print { th, td { color:#000; background:#fff; } tr:last-child td { border-bottom:1px solid #000; } }

.responsive-filters>summary,.report-definition>summary { padding:12px 0; min-height:44px; cursor:pointer; }
@media(min-width:768px) { .responsive-filters>summary,.report-definition>summary { display:none; } }
@media(max-width:767px) { .responsive-filters,.report-definition { margin:12px 0; } .responsive-filters[open]>.filter-panel,.responsive-filters[open]>.report-filters { margin-top:8px; } }
.readiness-summary { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.readiness-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.readiness-card { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.readiness-card p { margin:0; }
.readiness-title { width:100%; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.readiness-title h2 { margin:0; font-size:18px; }
@media(max-width:767px) { .readiness-grid { grid-template-columns:1fr; } .readiness-title { flex-direction:column; } }
.next-step { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.next-step h2,.next-step p { margin:4px 0; }
@media(max-width:767px) { .next-step { align-items:stretch; flex-direction:column; } .next-step .button { width:100%; } }
