:root {
  --brand: #ef7d1a;
  --brand-dark: #c75c06;
  --brand-soft: #fff2e7;
  --ink: #20262d;
  --ink-2: #36414a;
  --muted: #68747e;
  --muted-2: #909aa2;
  --line: #dce3e8;
  --line-strong: #c8d2d9;
  --canvas: #f2f5f7;
  --panel: #fff;
  --steel: #1069ad;
  --steel-soft: #eaf4fb;
  --green: #2d7c5a;
  --green-soft: #eaf6f0;
  --warning: #b77900;
  --warning-soft: #fff6dd;
  --danger: #c94233;
  --danger-soft: #fff0ed;
  --radius: 6px;
  --shadow: 0 16px 44px rgba(22, 33, 43, .16);
  --font: "Microsoft YaHei", "PingFang SC", sans-serif;
  --number: "Bahnschrift", "DIN Alternate", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(16, 105, 173, .2);
  outline-offset: 2px;
}
img { max-width: 100%; }
p { margin-top: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger) !important; }
.warning-text { color: var(--warning) !important; }
.green-text { color: var(--green) !important; }
.mono { font-family: var(--number); }

.boot-fallback {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: #f2f5f7;
}
.boot-fallback-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.boot-fallback-card img { width: 178px; margin: 0 auto 18px; display: block; }
.boot-fallback-card h1 { margin: 0 0 10px; font-size: 24px; }
.boot-fallback-card p { color: var(--muted); line-height: 1.7; }
.boot-fallback-card .primary-button { margin-top: 8px; text-decoration: none; }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, .82fr);
  background: #fff;
}
.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #17222b;
  color: #fff;
}
.login-visual img.plant-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .64;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 25, 35, .28);
}
.login-visual-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-logo-panel {
  width: min(410px, 72%);
  padding: 13px 16px;
  background: rgba(255,255,255,.94);
  border-radius: var(--radius);
}
.login-logo-panel img { width: 178px; display: block; }
.login-statement { max-width: 660px; }
.login-statement .overline {
  margin-bottom: 12px;
  color: #ffc28d;
  font: 700 10px var(--number);
  letter-spacing: .14em;
}
.login-statement h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0;
}
.login-statement p {
  max-width: 580px;
  margin: 0;
  color: #d8e0e5;
  font-size: 15px;
  line-height: 1.8;
}
.login-system-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c5d0d7;
  font: 11px var(--number);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #58c88d;
  box-shadow: 0 0 0 4px rgba(88,200,141,.16);
}
.login-form-side {
  min-height: 100vh;
  padding: 48px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.login-form-wrap { width: min(480px, 100%); margin: 0 auto; }
.login-form-head { margin-bottom: 26px; }
.login-form-head .brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 25px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}
.login-form-head h2 { margin: 0 0 8px; font-size: 26px; }
.login-form-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.demo-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 10px 12px;
  border: 1px solid #f0d6bf;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: #73401b;
  font-size: 11px;
  line-height: 1.6;
}
.demo-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.field-label,
.group-label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}
.group-label { margin-top: 20px; }
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.role-option {
  min-height: 44px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}
.role-option svg { width: 15px; height: 15px; color: var(--muted); }
.role-option span { min-width: 0; }
.role-option strong { display: block; font-size: 11px; }
.role-option small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 8px; }
.role-option:hover { border-color: var(--line-strong); background: #f8fafb; }
.role-option.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(239,125,26,.12);
}
.role-option.is-selected svg { color: var(--brand-dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-field { margin-bottom: 14px; min-width: 0; }
.form-field > label,
.form-field > .field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}
.required::after { content: " *"; color: var(--danger); font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
.input, .select { min-height: 38px; padding: 7px 10px; font-size: 12px; }
.textarea { min-height: 82px; resize: vertical; padding: 9px 10px; font-size: 12px; line-height: 1.65; }
.input:hover, .select:hover, .textarea:hover { border-color: #adbcc6; }
.input[type="file"] { padding: 6px; }
.help-text { margin: 5px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.input-with-button { display: flex; gap: 7px; }
.input-with-button .input { flex: 1; min-width: 0; }
.field-output {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9fa;
  display: flex;
  align-items: center;
  color: var(--ink);
  font: 600 12px var(--number);
  overflow-wrap: anywhere;
}
.swipe-control {
  margin: 12px 0;
  padding: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  background: #f7fafb;
  display: grid;
  gap: 8px;
}
.swipe-control .form-field { margin-bottom: 0; }
.secondary-button.is-confirmed {
  border-color: #a9cfbe;
  background: var(--green-soft);
  color: var(--green);
}
.primary-button, .secondary-button, .danger-button, .text-button {
  min-height: 38px;
  border-radius: 5px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background .16s, border-color .16s, transform .16s;
}
.primary-button { background: var(--brand); color: #fff; }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { border-color: var(--line); background: #fff; color: var(--ink-2); }
.secondary-button:hover { border-color: var(--line-strong); background: #f8fafb; }
.danger-button { border-color: #ebc2bd; background: #fff; color: var(--danger); }
.danger-button:hover { background: var(--danger-soft); }
.text-button { min-height: 28px; padding: 0 4px; border: 0; background: transparent; color: var(--steel); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: translateY(1px); }
.primary-button svg, .secondary-button svg, .danger-button svg, .text-button svg {
  width: 15px;
  height: 15px;
}
.button-wide { width: 100%; min-height: 44px; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 10px; }
.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--line-strong); background: #f8fafb; }
.icon-button svg { width: 17px; height: 17px; }
.login-legal {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.7;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
}
.sidebar-brand {
  min-height: 66px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.sidebar-brand img { width: 112px; display: block; }
.sidebar-brand .menu-close { display: none; margin-left: auto; }
.side-nav { flex: 1; padding: 13px 10px; overflow-y: auto; }
.side-group-label {
  display: block;
  margin: 16px 9px 6px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.side-group-label:first-child { margin-top: 4px; }
.nav-item {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #56636d;
  cursor: pointer;
  text-align: left;
}
.nav-item svg { width: 16px; height: 16px; }
.nav-item span { flex: 1; font-size: 11px; }
.nav-item b {
  min-width: 20px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #eef2f4;
  display: inline-grid;
  place-items: center;
  color: #5d6972;
  font: 600 9px var(--number);
}
.nav-item b.danger { background: var(--danger-soft); color: var(--danger); }
.nav-item:hover { background: #f5f7f8; color: var(--ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.nav-item.is-active svg { color: var(--brand-dark); }
.side-user {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.side-user-main { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
}
.side-user-copy { min-width: 0; flex: 1; }
.side-user-copy strong { display: block; font-size: 11px; }
.side-user-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-actions { display: flex; gap: 5px; }
.side-user-actions .icon-button { width: 30px; height: 30px; }
.nav-backdrop { display: none; }

.workspace { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar-left, .topbar-right { min-width: 0; display: flex; align-items: center; gap: 10px; }
.topbar .mobile-menu { display: none; }
.global-search {
  width: min(420px, 38vw);
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9fa;
  display: flex;
  align-items: center;
  gap: 8px;
}
.global-search svg { width: 15px; height: 15px; color: var(--muted); }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.sync-state, .role-chip {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  white-space: nowrap;
}
.sync-state { border: 1px solid #dce8e1; background: #f6fbf8; color: var(--green); }
.sync-state .live-dot { width: 6px; height: 6px; box-shadow: none; }
.role-chip { border: 1px solid #dbe7ef; background: #f5fafd; color: var(--steel); }
.top-clock { color: var(--muted); font: 10px var(--number); white-space: nowrap; }

.page { max-width: 1680px; margin: 0 auto; padding: 24px; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}
.page-title-kicker {
  margin-bottom: 7px;
  color: var(--steel);
  font: 700 9px var(--number);
  letter-spacing: .12em;
}
.page-head h1 { margin: 0 0 6px; font-size: 25px; line-height: 1.22; }
.page-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.page-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.metric-cell { min-height: 70px; padding: 12px 14px; border-right: 1px solid var(--line); }
.metric-cell:last-child { border-right: 0; }
.metric-cell span { display: block; color: var(--muted); font-size: 9px; }
.metric-cell strong { display: inline-block; margin-top: 6px; font: 600 24px var(--number); }
.metric-cell small { margin-left: 4px; color: var(--muted-2); font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel-head {
  min-height: 54px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2 { margin: 0 0 2px; font-size: 13px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 9px; }
.panel-head-actions { display: flex; align-items: center; gap: 6px; }
.work-list { display: grid; }
.work-row {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(170px, .82fr) auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.work-row:last-child { border-bottom: 0; }
.work-row:hover { background: #fbfcfd; }
.work-main { min-width: 0; }
.work-code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 10px var(--number);
}
.type-tag {
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--steel-soft);
  color: var(--steel);
  font: 700 8px var(--font);
}
.type-tag.scrap { color: #7a5b00; background: var(--warning-soft); }
.type-tag.temporary { color: var(--brand-dark); background: var(--brand-soft); }
.type-tag.sales { color: var(--green); background: var(--green-soft); }
.work-main strong { display: block; margin-top: 6px; font-size: 12px; }
.work-main p { margin: 4px 0 0; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-stage strong { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.work-stage span { display: block; margin-top: 5px; color: var(--muted); font: 9px var(--number); }
.work-action {
  min-width: 92px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
}
.work-row:hover .work-action { background: var(--brand-dark); }
.work-action svg { width: 13px; height: 13px; }
.empty-state {
  min-height: 170px;
  padding: 26px;
  display: grid;
  place-items: center;
  text-align: center;
}
.empty-state svg { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--muted-2); }
.empty-state strong { display: block; font-size: 12px; }
.empty-state p { max-width: 390px; margin: 5px auto 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.dashboard-rail { display: grid; gap: 16px; }
.rail-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.rail-head { min-height: 48px; padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-head h2 { margin: 0; font-size: 12px; }
.rail-head span { color: var(--muted); font: 9px var(--number); }
.alert-list { display: grid; }
.alert-item {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  cursor: pointer;
}
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: #fbfcfd; }
.alert-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--warning-soft);
  color: var(--warning);
}
.alert-icon.danger { background: var(--danger-soft); color: var(--danger); }
.alert-icon svg { width: 13px; height: 13px; }
.alert-copy strong { display: block; font-size: 10px; line-height: 1.5; }
.alert-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.quick-list { padding: 5px 0; }
.quick-item {
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}
.quick-item:hover { background: #fbfcfd; }
.quick-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--steel-soft);
  color: var(--steel);
}
.quick-item-icon svg { width: 14px; height: 14px; }
.quick-item div { min-width: 0; flex: 1; }
.quick-item strong { display: block; font-size: 10px; }
.quick-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }

.toolbar {
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9fa;
  display: inline-flex;
  gap: 2px;
  overflow-x: auto;
}
.segmented button {
  min-height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,32,42,.1); }
.inline-search {
  min-height: 32px;
  min-width: 210px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-search svg { width: 14px; height: 14px; color: var(--muted); }
.inline-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 10px; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 840px; }
.data-table th {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 10px 11px; border-bottom: 1px solid #e9edf0; vertical-align: middle; font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #fafcfd; }
.order-no { display: block; color: var(--ink); font: 600 10px var(--number); }
.order-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.partner-cell { font-weight: 700; }
.vehicle-cell { font: 600 11px var(--number); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 10px;
  background: #eef3f6;
  color: #52616b;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.progress { background: var(--steel-soft); color: var(--steel); }
.status-pill.success { background: var(--green-soft); color: var(--green); }
.status-pill.warning { background: var(--warning-soft); color: var(--warning); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }
.table-actions { display: flex; gap: 5px; align-items: center; }
.table-actions .icon-button { width: 28px; height: 28px; }
.table-actions .icon-button svg { width: 14px; height: 14px; }
.row-arrow { color: var(--muted-2); }
.trace-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.trace-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font-size: 9px; }
.trace-chip strong { margin-left: 5px; color: var(--ink); font: 600 11px var(--number); }

.breadcrumb { margin-bottom: 13px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.breadcrumb button { padding: 0; border: 0; background: transparent; color: var(--steel); cursor: pointer; }
.breadcrumb svg { width: 13px; height: 13px; }
.order-head {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.order-head h1 { margin: 0 0 7px; font: 600 25px var(--number); }
.order-head-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.order-head-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 16px; align-items: start; }
.order-main, .action-column { display: grid; gap: 16px; min-width: 0; }
.order-summary { padding: 15px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.summary-item { min-width: 0; padding: 8px 0; border-top: 1px solid var(--line); }
.summary-item:nth-child(-n+3) { border-top: 0; padding-top: 0; }
.summary-item span { display: block; color: var(--muted); font-size: 8px; }
.summary-item strong { display: block; margin-top: 5px; font-size: 11px; overflow-wrap: anywhere; }
.summary-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.permit-summary {
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #cfe3d8;
  border-radius: 4px;
  background: var(--green-soft);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.permit-summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--green);
}
.permit-summary-icon svg { width: 15px; height: 15px; }
.permit-summary div span { display: block; color: var(--muted); font-size: 8px; }
.permit-summary div strong { display: block; margin-top: 3px; font: 600 11px var(--number); }
.permit-summary small { color: var(--green); font-size: 9px; }
.certificate-panel-body { padding: 14px; display: grid; gap: 11px; }
.certificate-state { font-weight: 700; }
.certificate-state.pending { color: var(--warning); }
.certificate-state.complete { color: var(--green); }
.certificate-pending { margin: 0; color: var(--warning); font-size: 9px; line-height: 1.6; }
.certificate-doc-list { display: grid; gap: 7px; }
.certificate-doc {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
}
.certificate-doc-icon { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.certificate-doc-icon svg { width: 15px; height: 15px; }
.certificate-doc strong { display: block; font-size: 10px; overflow-wrap: anywhere; }
.certificate-doc p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.certificate-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); font-size: 9px; text-align: center; }
.certificate-empty svg { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
.certificate-batch-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 12px; }
.certificate-batch-option {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.certificate-batch-option input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--brand); }
.certificate-batch-option span { min-width: 0; }
.certificate-batch-option strong { display: block; font-size: 10px; overflow-wrap: anywhere; }
.certificate-batch-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.stage-track { padding: 13px 14px 14px; border-top: 1px solid var(--line); overflow-x: auto; }
.stage-track-inner { min-width: max-content; display: flex; align-items: flex-start; gap: 0; }
.stage-step { position: relative; width: 104px; padding-top: 18px; color: var(--muted); text-align: center; font-size: 8px; }
.stage-step::before { content: ""; position: absolute; top: 5px; left: 50%; width: 8px; height: 8px; transform: translateX(-50%); border: 2px solid #cfd8de; border-radius: 50%; background: #fff; z-index: 2; }
.stage-step::after { content: ""; position: absolute; top: 9px; left: 50%; width: 100%; height: 1px; background: #dce3e8; }
.stage-step:last-child::after { display: none; }
.stage-step.done { color: var(--green); }
.stage-step.done::before { border-color: var(--green); background: var(--green); }
.stage-step.done::after { background: #a9cfbe; }
.stage-step.current { color: var(--brand-dark); font-weight: 700; }
.stage-step.current::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.section-title-row { min-height: 48px; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title-row h2 { margin: 0; font-size: 12px; }
.section-title-row span { color: var(--muted); font-size: 8px; }
.batch-table { min-width: 680px; }
.batch-table th, .batch-table td { font-size: 9px; }
.notice {
  padding: 10px 12px;
  border: 1px solid #e8d8c9;
  border-radius: var(--radius);
  background: #fff9f4;
  color: #74451f;
  font-size: 9px;
  line-height: 1.65;
}
.notice.warning { border-color: #efd89d; background: var(--warning-soft); color: #76520a; }
.notice.danger { border-color: #efc6c1; background: var(--danger-soft); color: #8d2a20; }
.notice.steel { border-color: #cddfea; background: #f5fafd; color: #235f86; }
.notice svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.action-panel { position: sticky; top: 78px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.action-panel-head { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.action-panel-head .kicker { margin-bottom: 5px; color: var(--steel); font: 700 8px var(--number); letter-spacing: .08em; }
.action-panel-head h2 { margin: 0 0 5px; font-size: 14px; }
.action-panel-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.action-panel-body { padding: 14px; }
.permit-action {
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px solid #cfe3d8;
  border-radius: 4px;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.permit-action div span { display: block; color: var(--muted); font-size: 8px; }
.permit-action div strong { display: block; margin-top: 3px; font: 600 10px var(--number); overflow-wrap: anywhere; }
.read-only-tag {
  padding: 5px 7px;
  border: 1px solid #cfe3d8;
  border-radius: 4px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 8px;
  line-height: 1.35;
}
.read-only-tag svg { width: 12px; height: 12px; flex: none; }
.frozen-row-list { margin-top: 10px; display: grid; gap: 7px; }
.read-only-line {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafcfd;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.read-only-line strong, .read-only-line span { font-size: 9px; overflow-wrap: anywhere; }
.action-form { display: grid; }
.secondary-action-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fafcfd;
  display: grid;
}
.secondary-action-form .help-text { margin: -2px 0 10px; }
.secondary-action-form .button-wide { margin-top: 2px; }
.form-section { padding-bottom: 13px; margin-bottom: 13px; border-bottom: 1px solid #e9edf0; }
.form-section:last-of-type { border-bottom: 0; }
.form-section-title { margin: 0 0 9px; font-size: 10px; }
.checkbox-line { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; cursor: pointer; }
.checkbox-line input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--brand); }
.checkbox-line span { color: var(--ink-2); font-size: 10px; line-height: 1.55; }
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; text-align: center; }
.radio-card input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.action-buttons { display: flex; gap: 7px; }
.action-buttons button { flex: 1; }
.form-divider { height: 1px; margin: 14px 0; background: var(--line); }
.read-only-block { padding: 13px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fafbfc; }
.read-only-block strong { display: block; font-size: 11px; }
.read-only-block p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.utility-details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.utility-details > summary { min-height: 44px; padding: 11px 13px; display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.utility-details > summary::-webkit-details-marker { display: none; }
.utility-details > summary svg { width: 14px; height: 14px; color: var(--muted); }
.utility-body { padding: 0 13px 13px; border-top: 1px solid var(--line); }
.utility-body .form-field { margin-top: 12px; }
.qr-box { padding: 14px; display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 13px; align-items: center; }
.qr-image { width: 116px; height: 116px; border: 1px solid var(--line); border-radius: 5px; background: #fff; object-fit: contain; }
.qr-copy strong { display: block; font-size: 11px; }
.qr-copy p { margin: 5px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.qr-link { padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fa; color: var(--muted); font: 8px var(--number); overflow-wrap: anywhere; }
.audit-list { padding: 0 14px 8px; }
.audit-item { position: relative; padding: 11px 0 11px 20px; border-left: 1px solid var(--line-strong); }
.audit-item:last-child { border-left-color: transparent; }
.audit-item::before { content: ""; position: absolute; left: -4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.audit-item.is-key::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.audit-item time { display: block; color: var(--muted-2); font: 8px var(--number); }
.audit-item strong { display: block; margin-top: 4px; font-size: 10px; }
.audit-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.audit-item span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.mask-note { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.6; }

.create-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) 300px; gap: 16px; align-items: start; }
.create-main { display: grid; gap: 16px; }
.create-side { position: sticky; top: 78px; display: grid; gap: 16px; }
.form-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.form-panel-head { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.form-panel-head h2 { margin: 0 0 3px; font-size: 13px; }
.form-panel-head p { margin: 0; color: var(--muted); font-size: 9px; }
.form-panel-body { padding: 14px; }
.batch-editor { display: grid; gap: 9px; }
.batch-row {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfd;
}
.batch-row-head { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.batch-row-head strong { font-size: 10px; }
.batch-grid { display: grid; grid-template-columns: 1.15fr 1fr .55fr .7fr .55fr .55fr; gap: 7px; }
.batch-grid .form-field { margin-bottom: 0; }
.batch-grid .input, .batch-grid .select { min-height: 34px; font-size: 10px; }
.batch-grid label { font-size: 9px; }
.small-icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}
.small-icon-button svg { width: 13px; height: 13px; }
.batch-total { padding: 10px 12px; border: 1px solid #dae5ec; border-radius: 5px; background: #f7fbfd; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-total span { color: var(--muted); font-size: 9px; }
.batch-total strong { font: 600 17px var(--number); color: var(--steel); }
.side-checklist { padding: 12px 14px; display: grid; gap: 10px; }
.checklist-item { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 8px; align-items: start; }
.checklist-item span:first-child { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--steel-soft); color: var(--steel); font: 700 8px var(--number); }
.checklist-item strong { display: block; font-size: 10px; }
.checklist-item p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.settings-form { padding: 14px; }
.threshold-row { display: grid; grid-template-columns: 1.2fr .55fr .55fr; gap: 7px; margin-bottom: 8px; }
.threshold-row .input { min-height: 34px; font-size: 10px; }
.role-matrix { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.role-matrix-row { min-height: 42px; padding: 7px 10px; background: #fff; display: grid; grid-template-columns: 100px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.role-matrix-row strong { font-size: 10px; }
.role-matrix-row span { color: var(--muted); font-size: 9px; }
.role-matrix-row em { color: var(--green); font-size: 8px; font-style: normal; }
.system-audit { max-height: 430px; overflow: auto; }
.system-audit-row { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.system-audit-row:last-child { border-bottom: 0; }
.system-audit-row time { display: block; color: var(--muted-2); font: 8px var(--number); }
.system-audit-row strong { display: block; margin-top: 3px; font-size: 10px; }
.system-audit-row p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.public-shell { min-height: 100vh; background: #f2f5f7; }
.public-topbar { min-height: 62px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-topbar img { width: 110px; }
.public-topbar span { color: var(--muted); font-size: 9px; }
.public-main { width: min(760px, 100%); margin: 0 auto; padding: 20px 14px 40px; }
.public-head { margin-bottom: 14px; }
.public-head h1 { margin: 0 0 6px; font-size: 22px; }
.public-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.public-order { padding: 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.public-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; }
.public-meta span { display: block; color: var(--muted); font-size: 8px; }
.public-meta strong { display: block; margin-top: 3px; font-size: 10px; overflow-wrap: anywhere; }
.public-form { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.public-form-head { padding: 14px; border-bottom: 1px solid var(--line); }
.public-form-head h2 { margin: 0 0 4px; font-size: 15px; }
.public-form-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.public-form-body { padding: 14px; }
.public-batch { padding: 11px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfd; }
.public-batch strong { display: block; margin-bottom: 8px; font-size: 10px; }
.public-drop-list { margin: 8px 0 14px; display: grid; gap: 8px; }
.public-drop-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfd;
  display: grid;
  grid-template-columns: 24px minmax(0,1.2fr) minmax(0,.8fr);
  gap: 8px;
  align-items: end;
}
.public-drop-row > span {
  width: 22px;
  height: 22px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: var(--steel-soft);
  display: grid;
  place-items: center;
  color: var(--steel);
  font: 700 8px var(--number);
}
.public-drop-row .form-field { margin: 0; }
.loading-actual-list { margin-bottom: 13px; display: grid; gap: 8px; }
.loading-actual-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfd;
  display: grid;
  grid-template-columns: minmax(150px,1.1fr) repeat(3,minmax(90px,.6fr));
  gap: 8px;
  align-items: end;
}
.loading-actual-row .form-field { margin: 0; }
.loading-select {
  min-width: 0;
  padding-top: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.loading-select input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.loading-select span { min-width: 0; }
.loading-select strong, .loading-select small { display: block; overflow-wrap: anywhere; }
.loading-select strong { font-size: 10px; }
.loading-select small { margin-top: 3px; color: var(--muted); font: 8px var(--number); }
.public-success { padding: 30px 20px; text-align: center; }
.public-success .success-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.public-success .success-icon svg { width: 25px; height: 25px; }
.public-success h2 { margin: 0 0 6px; font-size: 17px; }
.public-success p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: 10px; line-height: 1.7; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  max-width: min(560px, calc(100vw - 28px));
  padding: 10px 14px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity .16s, transform .16s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.loading-screen { min-height: 100vh; display: grid; place-items: center; background: var(--canvas); }
.loading-box { display: grid; justify-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.loading-box img { width: 120px; }
.spinner { width: 21px; height: 21px; border: 2px solid #d8e0e5; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: minmax(0,1fr) 275px; }
  .order-layout { grid-template-columns: minmax(0,1fr) 350px; }
  .batch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { padding: 32px 22px; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(274px, 86vw);
    transform: translateX(-104%);
    box-shadow: var(--shadow);
    transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: block;
    background: rgba(15,24,31,.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-brand .menu-close { display: inline-grid; }
  .topbar .mobile-menu { display: inline-grid; }
  .nav-item { min-height: 44px; }
  .dashboard-grid, .create-layout, .settings-grid { grid-template-columns: 1fr; }
  .dashboard-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .create-side, .action-panel { position: static; }
  .order-layout { grid-template-columns: 1fr; }
  .action-column { order: 1; }
  .order-main { order: 2; }
}
@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 12px; }
  .topbar-left { flex: 1; gap: 8px; }
  .topbar-right { gap: 6px; }
  .topbar .icon-button, .sidebar-brand .menu-close { width: 44px; height: 44px; }
  .side-user-actions .icon-button { width: 44px; height: 44px; }
  .global-search { flex: 1; width: auto; height: 44px; padding: 0 10px; justify-content: flex-start; }
  .global-search input { display: block; height: 100%; font-size: 12px; }
  .sync-state, .top-clock { display: none; }
  .page { padding: 16px 12px 32px; }
  .page-head { flex-direction: column; gap: 12px; }
  .page-actions { width: 100%; justify-content: stretch; }
  .page-actions button { flex: 1; }
  .metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-cell { border-top: 1px solid var(--line); }
  .metric-cell:nth-child(1), .metric-cell:nth-child(2) { border-top: 0; }
  .metric-cell:nth-child(2n) { border-right: 0; }
  .dashboard-rail { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: minmax(0,1fr) auto; }
  .work-stage { grid-column: 1; grid-row: 2; }
  .work-action { grid-column: 2; grid-row: 1 / span 2; }
  .toolbar { align-items: stretch; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; min-height: 44px; }
  .breadcrumb button { min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
  .text-button { min-height: 44px; padding: 0 8px; }
  .inline-search { width: 100%; }
  .order-head { flex-direction: column; }
  .order-head-actions { width: 100%; justify-content: stretch; }
  .order-head-actions button { flex: 1; min-width: 92px; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-item:nth-child(3) { border-top: 1px solid var(--line); padding-top: 8px; }
  .permit-summary { grid-template-columns: 30px minmax(0,1fr); }
  .permit-summary small { grid-column: 2; }
  .certificate-doc { grid-template-columns: 30px minmax(0,1fr); }
  .certificate-doc .secondary-button { grid-column: 2; justify-self: start; }
  .permit-action { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .input, .select { min-height: 44px; font-size: 16px; }
  .textarea { min-height: 96px; font-size: 16px; }
  .primary-button, .secondary-button, .danger-button { min-height: 44px; font-size: 12px; }
  .action-panel-body { padding: 12px; }
  .secondary-action-form { padding: 11px; }
  .notice { font-size: 10px; line-height: 1.7; }
  .batch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .batch-grid .form-field:nth-child(3) { grid-column: span 1; }
  .small-icon-button { width: 44px; height: 44px; }
  .small-icon-button svg { width: 17px; height: 17px; }
  .loading-actual-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .loading-select { grid-column: 1 / -1; }
  .public-drop-row { grid-template-columns: 22px minmax(0,1fr); }
  .public-drop-row > .form-field:last-child { grid-column: 2; }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .qr-box { grid-template-columns: 92px minmax(0,1fr); }
  .qr-image { width: 92px; height: 92px; }
  .role-matrix-row { grid-template-columns: 90px minmax(0,1fr); }
  .role-matrix-row em { grid-column: 2; }
}
@media (max-width: 480px) {
  .certificate-batch-grid { grid-template-columns: 1fr; }
  .role-chip { display: none; }
  .login-form-side { padding: 22px 16px; }
  .login-form-head h2 { font-size: 23px; }
  .role-option { min-height: 48px; }
  .page-head h1 { font-size: 21px; }
  .metric-cell { padding: 10px 11px; }
  .metric-cell strong { font-size: 21px; }
  .work-row { padding: 11px; gap: 9px; }
  .work-main p { max-width: 180px; }
  .work-action { min-width: 80px; padding: 0 8px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-item strong { font-size: 10px; }
  .qr-box { grid-template-columns: 1fr; }
  .qr-image { margin: 0 auto; }
  .public-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
