:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 251, 246, 0.92);
  --panel-strong: #fffefb;
  --text: #1e1b18;
  --muted: #5f564d;
  --line: rgba(88, 72, 56, 0.14);
  --accent: #bf4b24;
  --accent-soft: rgba(191, 75, 36, 0.12);
  --success: #216e54;
  --warning: #8c5a12;
  --shadow: 0 18px 45px rgba(69, 44, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  font-family: "IBM Plex Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(226, 151, 84, 0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(53, 97, 118, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf5ec 0%, var(--bg) 42%, #efe8dd 100%);
}

select {
  font: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

#app {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
canvas {
  max-width: 100%;
}

.shell {
  width: min(1180px, 100%);
  max-width: 100vw;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.shell.has-bottom-nav {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 14px 30px;
}

.login-stage {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 440px);
  gap: 22px;
  align-items: stretch;
}

.select-stage {
  width: min(480px, 100%);
}

.login-brand,
.login-card {
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-brand {
  padding: 28px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 236, 0.92)),
    radial-gradient(circle at top right, rgba(29, 104, 164, 0.18), transparent 35%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.login-logo {
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.login-card {
  padding: 24px;
  background: rgba(255, 252, 247, 0.94);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-select-card {
  min-height: 320px;
}

.login-card-head {
  text-align: center;
}

.login-card-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.login-card-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.login-submit {
  margin-top: 8px;
}

.login-role-hint {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.captcha-refresh,
.hxjc-captcha-button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
}

.captcha-image {
  display: block;
  width: 150px;
  max-width: 100%;
  height: 48px;
  margin-top: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.captcha-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: default;
}

.hero {
  padding: 22px 18px;
  border-radius: 20px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 239, 0.95)),
    url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=1200&q=80") center/cover;
  background-blend-mode: screen;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-logged-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-brandline {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.hero-brandline > div {
  min-width: 0;
}

.hero-logo {
  width: 120px;
  min-width: 120px;
  height: auto;
  object-fit: contain;
}

.session-card {
  min-width: 220px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(29, 104, 164, 0.12);
  overflow-wrap: anywhere;
}

.session-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 1.05rem;
}

.session-exit {
  width: 100%;
  margin-top: 12px;
}

.session-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.session-actions .ghost-button {
  width: 100%;
}

.session-actions .ghost-button,
.session-actions .primary-button {
  min-width: 0;
}

.bottom-nav {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 14px;
  width: min(520px, calc(100% - 24px));
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid rgba(88, 72, 56, 0.18);
  border-radius: 18px;
  background: rgba(255, 254, 251, 0.94);
  box-shadow: 0 14px 34px rgba(69, 44, 22, 0.2);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav-item {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
}

.bottom-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.bottom-nav-item:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.bottom-nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(95, 86, 77, 0.1);
  color: currentColor;
  font-size: 0.74rem;
  font-weight: 800;
}

.bottom-nav-item.active .bottom-nav-icon {
  background: rgba(191, 75, 36, 0.16);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
  min-width: 0;
}

.layout > *,
.export-layout > *,
.settings-layout > * {
  min-width: 0;
}

.export-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.settings-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.export-panel {
  padding-bottom: 18px;
}

.settings-panel {
  padding-bottom: 18px;
}

.export-form {
  padding: 0 18px;
}

.settings-panel .personal-settings-section {
  padding: 0 18px 18px;
}

.settings-panel .personal-settings-section + .personal-settings-section {
  padding-top: 16px;
  border-top: 1px solid rgba(88, 72, 56, 0.12);
}

.settings-display-box {
  margin-top: 10px;
  border-color: rgba(191, 75, 36, 0.18);
  background:
    linear-gradient(180deg, rgba(191, 75, 36, 0.08), rgba(255, 251, 246, 0.36)),
    var(--accent-soft);
}

.export-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

.export-mode-option {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  text-align: left;
}

.export-mode-option.active {
  border-color: rgba(191, 75, 36, 0.44);
  background: rgba(191, 75, 36, 0.1);
}

.export-mode-option:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.export-mode-option strong,
.export-mode-option span {
  display: block;
}

.export-mode-option span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.method-settings-stage {
  width: min(1180px, 100%);
}

.method-settings-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.94);
  box-shadow: var(--shadow);
}

.method-settings-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.method-settings-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.method-settings-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.method-back-button {
  flex: 0 0 auto;
}

.method-settings-form {
  display: grid;
  gap: 16px;
}

.method-settings-panel {
  min-height: 224px;
  padding: 22px 26px;
  border: 1px solid rgba(72, 172, 211, 0.5);
  border-radius: 14px;
  background: #fff;
}

.method-settings-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #050505;
}

.method-settings-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  color: #9dd4e8;
  font-size: 1.55rem;
  font-weight: 800;
}

.method-settings-grid {
  display: grid;
  gap: 4px;
}

.method-setting-field {
  display: grid;
  grid-template-columns: max-content minmax(160px, 1fr);
  align-items: center;
  min-width: 0;
  color: #050505;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.method-setting-field input {
  min-width: 0;
  height: 30px;
  padding: 3px 6px;
  border: 0;
  border-bottom: 1px solid rgba(72, 172, 211, 0.45);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.method-setting-field input:focus {
  outline: 2px solid rgba(72, 172, 211, 0.28);
  border-radius: 6px;
}

.method-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.work-order-module {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.method-settings-inline {
  padding: 12px;
}

.method-settings-form.embedded {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.method-settings-form.embedded .method-settings-panel {
  display: contents;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.method-settings-form.embedded .method-settings-title {
  min-width: 0;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.2;
}

.method-settings-form.embedded .method-settings-title strong {
  white-space: nowrap;
}

.method-settings-form.embedded .method-settings-title > span:not(.method-settings-icon) {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-settings-form.embedded .method-settings-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: clip;
  scrollbar-width: thin;
}

.method-settings-form.embedded .method-setting-field {
  grid-template-columns: max-content 72px;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.method-settings-form.embedded .method-setting-field input {
  width: 72px;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
}

.method-settings-form.embedded .method-settings-actions {
  justify-content: flex-end;
  padding: 0;
}

.method-settings-form.embedded .method-settings-actions .primary-button {
  min-height: 30px;
  padding: 0 12px;
  white-space: nowrap;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-header {
  padding: 18px 18px 8px;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.panel-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.search-box {
  margin-top: 14px;
}

.search-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.hxjc-query-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.hxjc-query-box .small {
  grid-column: 1 / -1;
}

.hxjc-query-status {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hxjc-query-status strong {
  color: var(--text);
}

.hxjc-query-box .primary-button {
  min-height: 42px;
  padding: 0 13px;
  white-space: nowrap;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.search-meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.app-filing {
  color: rgba(95, 86, 77, 0.78);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.column-filter-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.column-filter-box > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  list-style: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.column-filter-box > summary::-webkit-details-marker {
  display: none;
}

.column-filter-box > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid currentColor;
  transform-origin: center;
}

.column-filter-box:not([open]) > summary::before {
  transform: rotate(-90deg);
}

.column-search-box .search-input {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
}

.column-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 96px);
  justify-content: start;
  gap: 10px;
  margin-top: 12px;
}

.column-filter-field {
  display: block;
  width: 96px;
  min-width: 0;
}

.column-filter-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.display-settings-box {
  margin-top: 10px;
}

.column-visibility-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
}

.column-visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 12px;
}

.column-visibility-field span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.column-visibility-field input {
  flex: 0 0 auto;
}

.column-filter-input {
  width: 96px;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.88rem;
}

.method-settings-form.embedded .method-setting-field input:focus,
.column-search-box .search-input:focus,
.column-filter-input:focus {
  outline: 2px solid rgba(191, 75, 36, 0.24);
  border-color: var(--accent);
}

.filter-input-wrap {
  position: relative;
}

.filter-suggestions {
  position: static;
  margin-top: 4px;
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(33, 29, 25, 0.14);
}

.filter-suggestion-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid rgba(95, 86, 77, 0.12);
  background: transparent;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
}

.filter-suggestion-item:last-child {
  border-bottom: 0;
}

.filter-suggestion-item:hover {
  background: rgba(53, 97, 118, 0.1);
}

.filter-clear {
  margin-top: 12px;
}

.source-orders-module {
  margin: 8px 18px 16px;
  padding: 0;
  overflow: hidden;
}

.order-list {
  padding: 0 12px 16px;
}

.work-order-collapse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 12px 12px 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.work-order-collapse-header .section-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.work-order-collapse-toggle {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.collapse-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid currentColor;
}

.collapse-arrow.is-collapsed {
  transform: rotate(-90deg);
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: clip;
  padding-bottom: 14px;
  scrollbar-width: auto;
  scrollbar-color: rgba(53, 97, 118, 0.55) rgba(53, 97, 118, 0.12);
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.table-scroll::-webkit-scrollbar {
  height: 14px;
}

.table-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(53, 97, 118, 0.12);
}

.table-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(53, 97, 118, 0.55);
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(53, 97, 118, 0.72);
}

.result-scroll::after {
  content: "";
  display: block;
  height: 4px;
  min-width: 1120px;
  margin-top: -8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(53, 97, 118, 0.2), rgba(53, 97, 118, 0.65));
}

.result-table {
  width: 100%;
  min-width: var(--result-min-width, 1120px);
  --result-columns:
    minmax(78px, 0.76fr)
    minmax(98px, 0.88fr)
    minmax(112px, 0.96fr)
    minmax(152px, 1.3fr)
    minmax(78px, 0.64fr)
    minmax(64px, 0.52fr)
    minmax(66px, 0.54fr)
    minmax(66px, 0.54fr)
    minmax(90px, 0.76fr)
    minmax(82px, 0.66fr)
    minmax(78px, 0.62fr);
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.66);
}

.result-header,
.result-row {
  display: grid;
  grid-template-columns: var(--result-columns);
  align-items: stretch;
}

.result-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(53, 97, 118, 0.12);
  color: #21485a;
  font-size: 0.78rem;
  font-weight: 700;
}

.result-header > span,
.result-cell {
  min-width: 0;
  padding: 10px 9px;
  border-right: 1px solid var(--line);
  line-height: 1.35;
}

.result-cell {
  display: block;
  min-height: 42px;
  max-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-header > span:last-child,
.result-cell:last-child {
  border-right: 0;
}

.result-header-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.result-action-header,
.result-action-cell {
  display: grid;
  place-items: center;
  padding: 6px;
}

.result-action-header {
  justify-items: start;
}

.source-copy-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  background: rgba(33, 110, 84, 0.14);
  color: var(--success);
  border: 1px solid rgba(33, 110, 84, 0.28);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.source-copy-button:hover {
  background: rgba(33, 110, 84, 0.22);
}

.source-copy-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.specimen-temp-cell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
  padding: 6px;
}

.specimen-temp-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(53, 97, 118, 0.26);
  border-radius: 8px;
  background: rgba(53, 97, 118, 0.1);
  color: #21485a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.specimen-temp-button:hover {
  background: rgba(53, 97, 118, 0.18);
}

.specimen-temp-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.specimen-temp-value {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temp-source-row {
  background: rgba(255, 190, 92, 0.18);
}

.temp-source-row .result-action-cell {
  padding: 0;
}

.temp-source-cell {
  padding: 5px;
}

.temp-source-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 4px 6px;
  border: 1px solid rgba(33, 110, 84, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.84rem;
}

.temp-source-input:focus {
  outline: 2px solid rgba(33, 110, 84, 0.22);
  border-color: rgba(33, 110, 84, 0.42);
}

.temp-source-confirm {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 8px;
  border-radius: 0;
  font-size: 0.8rem;
}

.result-header-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -6px;
  width: 12px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}

.column-resize-handle:hover,
.is-resizing-column .column-resize-handle {
  background: rgba(53, 97, 118, 0.24);
}

.is-resizing-column {
  cursor: col-resize;
  user-select: none;
}

.result-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.result-row:hover,
.result-row.active {
  background: rgba(191, 75, 36, 0.09);
}

.result-edit-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.result-toggle {
  flex: 0 0 auto;
}

.result-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.result-toggle-track {
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(166, 53, 53, 0.22);
  border: 1px solid rgba(166, 53, 53, 0.28);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.result-toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(33, 29, 25, 0.2);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.result-toggle-input:checked + .result-toggle-track {
  background: rgba(33, 110, 84, 0.24);
  border-color: rgba(33, 110, 84, 0.32);
}

.result-toggle-input:checked + .result-toggle-track .result-toggle-thumb {
  transform: translateX(20px);
}

.result-select {
  width: 92px;
  flex: 0 0 92px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.86rem;
}

.custom-result-value {
  flex: 1 1 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
}

.local-record-note {
  flex: 1 1 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-empty {
  width: 100%;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.result-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.result-pagination .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-button[disabled],
.ghost-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.method {
  background: rgba(53, 97, 118, 0.12);
  color: #21485a;
}

.badge.done {
  background: rgba(33, 110, 84, 0.12);
  color: var(--success);
}

.badge.pending {
  background: rgba(140, 90, 18, 0.14);
  color: var(--warning);
}

.badge.danger {
  background: rgba(159, 45, 30, 0.13);
  color: #9f2d1e;
}

.order-card h3,
.detail-heading h2 {
  margin: 10px 0 6px;
  font-size: 1.06rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.88rem;
}

.detail {
  min-width: 0;
  padding: 18px;
}

.field-upload-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.field-upload-head,
.field-upload-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-upload-head .primary-button {
  flex: 0 0 auto;
}

.field-upload-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.field-upload-config {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.field-upload-config > summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

.field-upload-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 10px;
}

.field-upload-config-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.84rem;
}

.field-upload-config-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.field-upload-card {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.field-upload-card.info-incomplete {
  border-color: rgba(184, 123, 29, 0.42);
  background: rgba(255, 245, 211, 0.82);
}

.field-upload-card.info-complete {
  border-color: rgba(33, 110, 84, 0.38);
  background: rgba(225, 245, 235, 0.82);
}

.status-incomplete {
  color: #8a5a12;
}

.status-complete {
  color: #216e54;
}

.field-upload-title {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.field-upload-card-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 176px;
}

.field-upload-card-actions .primary-button,
.field-upload-card-actions .ghost-button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
}

.field-upload-entry-box {
  width: 100%;
  display: grid;
  gap: 8px;
}

.field-upload-entry-box.open {
  padding: 8px;
  border: 2px solid rgba(245, 174, 32, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
}

.field-upload-entry-toggle {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
}

.field-upload-entry-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.field-upload-entry-actions .ghost-button {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 0.78rem;
}

.field-upload-entry-camera {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.field-upload-camera-preview {
  max-height: 160px;
  background: #111;
}

.upload-error {
  color: #9f2d1e;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-grid .stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #c4572c, #a13f1b);
}

.temp-source-confirm.primary-button {
  height: 42px;
  min-height: 42px;
  padding: 0 8px;
  border-radius: 0;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border: 1px solid var(--line);
}

.checklist,
.history {
  margin-top: 18px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}

.item-card,
.record-card,
.modal-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(78, 50, 24, 0.08);
}

.item-card {
  padding: 16px;
  margin-top: 12px;
}

.item-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  margin: 0;
  font-size: 1rem;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.simple-proof {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 248, 240, 0.85);
  border: 1px solid rgba(191, 75, 36, 0.14);
}

.hardware-panel {
  display: grid;
  gap: 10px;
}

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hardware-card {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.hardware-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hardware-card-head .badge {
  max-width: 62%;
  justify-content: center;
  overflow-wrap: anywhere;
  text-align: center;
}

.camera-preview,
.camera-placeholder,
.microphone-placeholder,
.bluetooth-placeholder {
  width: 100%;
  min-height: 150px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(95, 86, 77, 0.28);
  background: rgba(53, 97, 118, 0.08);
}

.camera-preview {
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.camera-placeholder,
.microphone-placeholder,
.bluetooth-placeholder {
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.microphone-placeholder.has-audio {
  min-height: 86px;
}

.microphone-preview {
  width: 100%;
}

.hardware-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hardware-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hardware-actions .primary-button,
.hardware-actions .ghost-button {
  flex: 1 1 88px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
}

.danger-button {
  color: #9f2d1e;
  border-color: rgba(159, 45, 30, 0.26);
  background: rgba(159, 45, 30, 0.08);
}

.proof-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proof-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #84331a;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-chip {
  min-width: 68px;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-chip.completed {
  background: rgba(33, 110, 84, 0.12);
  color: var(--success);
}

.status-chip.pending {
  background: rgba(140, 90, 18, 0.14);
  color: var(--warning);
}

.item-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.work-order-result-edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(33, 110, 84, 0.16);
  border-radius: 12px;
  background: rgba(33, 110, 84, 0.06);
}

.work-order-result-select {
  min-width: 96px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.item-card > img {
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.record-card {
  padding: 14px;
  margin-top: 10px;
}

.record-card img {
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  background: rgba(30, 22, 17, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
}

.modal-card {
  width: min(720px, 100%);
  padding: 18px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.personal-settings-section {
  margin-top: 14px;
}

.settings-title {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden-file-input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  min-height: 46px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.combo-field {
  position: relative;
}

.combo-field::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 16px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--text);
  pointer-events: none;
}

.combo-field input,
.combo-field select {
  width: 100%;
  height: 50px;
  padding-right: 42px;
}

.combo-field select {
  appearance: none;
}

.combo-trigger {
  width: 100%;
  height: 50px;
  padding: 12px 42px 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.combo-field input:focus {
  outline: 2px solid rgba(191, 75, 36, 0.32);
  border-color: var(--accent);
}

.combo-trigger:focus {
  outline: 2px solid rgba(191, 75, 36, 0.32);
  border-color: var(--accent);
}

.combo-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 236px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 14px 30px rgba(69, 44, 22, 0.16);
}

.combo-option {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  line-height: 1.35;
}

.combo-option:hover,
.combo-option:focus,
.combo-option.selected {
  background: var(--accent-soft);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.file-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(95, 86, 77, 0.26);
  color: var(--muted);
}

.pull-refresh-indicator {
  position: fixed;
  z-index: 140;
  top: 10px;
  left: 50%;
  min-width: 112px;
  padding: 8px 14px;
  border: 1px solid rgba(88, 72, 56, 0.14);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.96);
  color: var(--muted);
  box-shadow: 0 10px 26px rgba(22, 16, 12, 0.14);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% + var(--pull-distance, 0px)));
  transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.pull-refresh-indicator.ready {
  color: var(--accent);
}

.pull-refresh-indicator.active,
.pull-refresh-indicator.refreshing {
  opacity: 1;
}

.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(33, 29, 25, 0.9);
  box-shadow: 0 10px 26px rgba(22, 16, 12, 0.2);
}

.has-bottom-nav .toast {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1200px), (pointer: coarse) {
  .login-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-logged-in {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-brandline {
    align-items: flex-start;
  }
}

@media (max-width: 640px), (pointer: coarse) and (max-width: 920px) {
  html,
  body,
  #app {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .login-shell,
  .shell {
    width: 100%;
    max-width: 100vw;
    padding: 8px 8px 18px;
  }

  .shell.has-bottom-nav {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .login-brand,
  .login-card,
  .hero,
  .method-settings-card {
    padding: 12px 10px;
    border-radius: 14px;
  }

  .hero {
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero h1 {
    margin-bottom: 4px;
    font-size: 1.34rem;
    line-height: 1.15;
  }

  .hero p {
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .hero-brandline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }

  .hero-logo {
    width: 58px;
    min-width: 58px;
  }

  .hero-logged-in {
    gap: 8px;
  }

  .session-card {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .session-card strong {
    margin: 3px 0 2px;
    font-size: 0.94rem;
  }

  .session-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  .session-actions .ghost-button,
  .session-actions .primary-button {
    min-height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .layout,
  .export-layout,
  .settings-layout {
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
  }

  .method-settings-stage {
    width: 100%;
  }

  .method-settings-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .method-settings-head h2 {
    font-size: 1rem;
  }

  .method-settings-head p {
    font-size: 0.8rem;
  }

  .method-back-button {
    min-height: 32px;
    padding: 0 8px;
  }

  .method-settings-panel {
    min-height: 0;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .method-settings-title {
    gap: 7px;
    margin-bottom: 8px;
    font-size: 1.08rem;
  }

  .method-settings-icon {
    width: 22px;
    font-size: 1.2rem;
  }

  .method-setting-field {
    grid-template-columns: max-content minmax(0, 1fr);
    font-size: 0.9rem;
  }

  .method-setting-field input {
    height: 28px;
    padding: 2px 5px;
    font-size: 0.86rem;
  }

  .method-settings-actions {
    gap: 6px;
  }

  .method-settings-inline {
    padding: 8px;
  }

  .method-settings-form.embedded {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .method-settings-form.embedded .method-settings-panel {
    padding: 0;
  }

  .method-settings-form.embedded .method-settings-grid {
    display: flex;
    gap: 6px;
  }

  .method-settings-form.embedded .method-setting-field {
    grid-template-columns: max-content 64px;
    flex-basis: auto;
    font-size: 0.78rem;
  }

  .method-settings-form.embedded .method-setting-field input {
    width: 64px;
    height: 34px;
    padding: 7px 9px;
    border-radius: 10px;
  }

  .method-settings-form.embedded .method-settings-actions .primary-button {
    width: auto;
    min-height: 28px;
    padding: 0 10px;
  }

  .panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
  }

  .panel-header {
    padding: 10px 10px 4px;
  }

  .panel-title {
    font-size: 0.92rem;
  }

  .panel-subtitle {
    margin-top: 3px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .search-box,
  .hxjc-query-box,
  .work-order-module,
  .column-filter-box {
    margin-top: 8px;
    max-width: 100%;
  }

  .search-input {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .method-settings-form.embedded .method-settings-title,
  .column-filter-box > summary,
  .work-order-collapse-header {
    gap: 6px;
    min-height: 28px;
    font-size: 0.94rem;
    line-height: 1.2;
  }

  .work-order-collapse-header .section-title {
    font-size: inherit;
  }

  .column-search-box .search-input,
  .column-filter-input {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .search-meta {
    margin-top: 5px;
    font-size: 0.76rem;
  }

  .search-actions {
    margin-top: 6px;
    align-items: stretch;
  }

  .search-actions .primary-button,
  .search-actions .ghost-button {
    width: 100%;
  }

  .hxjc-query-box,
  .work-order-module,
  .column-filter-box {
    padding: 8px;
    border-radius: 10px;
  }

  .source-orders-module {
    margin: 8px 10px 12px;
    padding: 0;
  }

  .hxjc-query-box {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .hxjc-query-box .primary-button,
  .primary-button,
  .ghost-button {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.84rem;
  }

  .order-list {
    padding: 0 6px 10px;
    min-width: 0;
  }

  .work-order-collapse-header {
    gap: 6px;
    min-height: 28px;
    padding: 8px 8px 6px;
    font-size: 0.94rem;
  }

  .section-title {
    font-size: 0.9rem;
  }

  .work-order-collapse-header .section-title {
    font-size: inherit;
  }

  .work-order-collapse-toggle {
    width: 20px;
    height: 20px;
  }

  .collapse-arrow {
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 9px;
  }

  .table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    padding-bottom: 8px;
    margin-right: 0;
  }

  .result-scroll::after {
    display: none;
  }

  .result-table {
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    overflow: visible;
    background: transparent;
  }

  .result-header {
    display: none;
  }

  .result-body {
    display: grid;
    gap: 8px;
  }

  .result-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 7px 18px rgba(69, 44, 22, 0.08);
  }

  .result-row.active {
    border-color: rgba(191, 75, 36, 0.36);
    background: rgba(191, 75, 36, 0.08);
  }

  .result-header {
    font-size: 0.7rem;
  }

  .result-header > span,
  .result-cell {
    display: grid;
    grid-template-columns: minmax(74px, 34%) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 0;
    max-height: none;
    padding: 7px 2px;
    border-right: 0;
    border-bottom: 1px solid rgba(88, 72, 56, 0.1);
    font-size: 0.78rem;
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .result-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .result-cell:last-child {
    border-bottom: 0;
  }

  .result-action-header,
  .result-action-cell {
    display: grid;
    grid-template-columns: minmax(74px, 34%) minmax(0, 1fr);
    place-items: stretch;
    padding: 7px 2px;
  }

  .result-action-cell .source-copy-button,
  .result-action-cell .temp-source-confirm {
    justify-self: start;
  }

  .source-copy-button {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .result-toggle-track {
    width: 38px;
    height: 22px;
    padding: 2px;
  }

  .result-toggle-thumb {
    width: 16px;
    height: 16px;
  }

  .result-toggle-input:checked + .result-toggle-track .result-toggle-thumb {
    transform: translateX(16px);
  }

  .result-select {
    width: 100%;
    flex-basis: auto;
    min-height: 28px;
    padding: 3px 5px;
    border-radius: 8px;
    font-size: 0.76rem;
  }

  .result-edit-cell {
    grid-template-columns: minmax(74px, 34%) minmax(0, 1fr);
  }

  .result-edit-cell::before {
    grid-row: 1 / span 2;
  }

  .result-edit-cell .result-toggle,
  .result-edit-cell .result-select,
  .result-edit-cell .local-record-note,
  .result-edit-cell .custom-result-value {
    grid-column: 2;
  }

  .specimen-temp-cell {
    grid-template-columns: minmax(74px, 34%) 26px minmax(0, 1fr) 26px;
    gap: 8px 4px;
  }

  .specimen-temp-cell::before {
    grid-column: 1;
  }

  .specimen-temp-cell .specimen-temp-button:first-of-type {
    grid-column: 2;
  }

  .specimen-temp-cell .specimen-temp-value {
    grid-column: 3;
  }

  .specimen-temp-cell .specimen-temp-button:last-of-type {
    grid-column: 4;
  }

  .result-pagination {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.76rem;
    text-align: center;
  }

  .result-pagination span {
    flex: 1 0 100%;
    order: -1;
  }

  .result-pagination .ghost-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .temp-source-cell {
    padding: 4px;
  }

  .temp-source-input {
    height: 26px;
    padding: 2px 4px;
    border-radius: 7px;
    font-size: 0.74rem;
  }

  .temp-source-confirm,
  .temp-source-confirm.primary-button {
    width: auto;
    height: auto;
    min-height: 26px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .table-scroll.result-scroll {
    overflow-x: scroll;
    overflow-y: clip;
    padding-bottom: 16px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .result-scroll::after {
    display: block;
    width: 100%;
    min-width: 0;
    height: 4px;
    margin-top: -8px;
  }

  .result-table {
    width: 100%;
    min-width: var(--result-min-width, 1120px);
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.66);
  }

  .result-header,
  .result-row {
    display: grid;
    grid-template-columns: var(--result-columns);
    align-items: stretch;
  }

  .result-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(53, 97, 118, 0.12);
    color: #21485a;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .column-resize-handle {
    right: -8px;
    width: 18px;
  }

  .result-body {
    display: block;
  }

  .result-row {
    gap: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .result-header > span,
  .result-cell {
    display: block;
    min-height: 42px;
    max-height: 42px;
    padding: 10px 9px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    font-size: 0.76rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-cell::before,
  .result-edit-cell::before,
  .specimen-temp-cell::before {
    content: none;
  }

  .result-header > span:last-child,
  .result-cell:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .result-action-header,
  .result-action-cell {
    display: grid;
    grid-template-columns: none;
    place-items: center;
    padding: 6px;
  }

  .result-action-header {
    justify-items: start;
  }

  .result-action-cell .source-copy-button,
  .result-action-cell .temp-source-confirm {
    justify-self: center;
  }

  .source-copy-button {
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
  }

  .result-edit-cell {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .result-edit-cell .result-toggle,
  .result-edit-cell .result-select,
  .result-edit-cell .local-record-note,
  .result-edit-cell .custom-result-value {
    grid-column: auto;
  }

  .result-select {
    width: auto;
    flex: 1 1 104px;
    min-width: 98px;
    min-height: 28px;
    padding-right: 22px;
  }

  .specimen-temp-cell {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 4px;
    padding: 6px;
  }

  .specimen-temp-cell .specimen-temp-button:first-of-type,
  .specimen-temp-cell .specimen-temp-value,
  .specimen-temp-cell .specimen-temp-button:last-of-type {
    grid-column: auto;
  }

  .temp-source-cell {
    padding: 5px;
  }

  .temp-source-input {
    height: 32px;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 0.84rem;
  }

  .temp-source-confirm,
  .temp-source-confirm.primary-button {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 8px;
    border-radius: 0;
    font-size: 0.8rem;
  }

  .detail {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 8px;
  }

  .detail-heading {
    gap: 8px;
  }

  .detail-heading h2 {
    margin: 5px 0 3px;
    font-size: 0.94rem;
    line-height: 1.25;
  }

  .badge {
    padding: 3px 7px;
    font-size: 0.7rem;
  }

  .small {
    font-size: 0.78rem;
  }

  .detail-grid {
    gap: 6px;
    margin-top: 8px;
  }

  .detail-grid .stat {
    padding: 8px;
    border-radius: 10px;
  }

  .stat strong {
    margin-top: 3px;
    font-size: 0.88rem;
  }

  .checklist,
  .history {
    margin-top: 10px;
  }

  .item-card,
  .record-card {
    padding: 10px;
    margin-top: 8px;
    border-radius: 12px;
  }

  .item-card header {
    gap: 8px;
  }

  .item-title {
    font-size: 0.9rem;
  }

  .item-meta {
    gap: 5px;
    margin-top: 6px;
  }

  .pill {
    padding: 4px 7px;
    font-size: 0.72rem;
  }

  .status-chip {
    min-width: 54px;
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 0.72rem;
  }

  .work-order-result-edit {
    gap: 7px;
    margin-top: 8px;
    padding: 7px 8px;
    border-radius: 10px;
  }

  .work-order-result-select {
    min-width: 82px;
    min-height: 30px;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .item-actions {
    margin-top: 8px;
    gap: 6px;
  }

  .empty-state {
    padding: 10px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .detail-grid,
  .export-mode-grid,
  .field-upload-head,
  .field-upload-card,
  .hardware-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-upload-head,
  .field-upload-card {
    display: grid;
  }

  .field-upload-card-actions {
    justify-items: stretch;
    flex-basis: auto;
  }

  .modal-card {
    padding: 14px;
  }

  .login-form {
    width: 100%;
  }

  .field select {
    width: 100%;
  }

  .table-scroll.result-scroll {
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 8px;
    scrollbar-gutter: auto;
  }

  .result-scroll::after {
    display: none;
  }

  .result-table {
    width: 100%;
    min-width: 0;
    border: 0;
    overflow: visible;
    background: transparent;
  }

  .result-header {
    display: none;
  }

  .result-body {
    display: grid;
    gap: 8px;
  }

  .result-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 7px 18px rgba(69, 44, 22, 0.08);
  }

  .result-row.active {
    border-color: rgba(191, 75, 36, 0.36);
    background: rgba(191, 75, 36, 0.08);
  }

  .result-header > span,
  .result-cell {
    display: grid;
    grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-height: 0;
    max-height: none;
    padding: 7px 2px;
    border-right: 0;
    border-bottom: 1px solid rgba(88, 72, 56, 0.1);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .result-cell::before,
  .result-edit-cell::before,
  .specimen-temp-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .result-cell:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .result-action-header,
  .result-action-cell {
    display: grid;
    grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
    place-items: stretch;
    padding: 7px 2px;
  }

  .result-action-cell .source-copy-button,
  .result-action-cell .temp-source-confirm {
    justify-self: start;
  }

  .result-edit-cell {
    display: grid;
    grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
    align-items: start;
  }

  .result-edit-cell .result-toggle,
  .result-edit-cell .result-select,
  .result-edit-cell .local-record-note,
  .result-edit-cell .custom-result-value {
    grid-column: 2;
  }

  .specimen-temp-cell {
    display: grid;
    grid-template-columns: minmax(76px, 34%) 26px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 8px 4px;
  }

  .specimen-temp-cell::before {
    grid-column: 1;
  }

  .specimen-temp-cell .specimen-temp-button:first-of-type {
    grid-column: 2;
  }

  .specimen-temp-cell .specimen-temp-value {
    grid-column: 3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .specimen-temp-cell .specimen-temp-button:last-of-type {
    grid-column: 4;
  }

  .method-settings-form.embedded .method-settings-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .method-settings-form.embedded .method-settings-title > span:not(.method-settings-icon) {
    flex-basis: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .local-record-note,
  .specimen-temp-value {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .bottom-nav {
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }

  .bottom-nav-item {
    min-height: 46px;
    gap: 3px;
    border-radius: 10px;
    font-size: 0.68rem;
  }

  .bottom-nav-icon {
    width: 21px;
    height: 21px;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  .table-scroll.result-scroll {
    overflow-x: auto;
    overflow-y: clip;
    padding-bottom: 16px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .result-scroll::after {
    display: block;
  }

  .result-table {
    width: 100%;
    min-width: var(--result-min-width, 1120px);
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.66);
  }

  .result-header,
  .result-row {
    display: grid;
    grid-template-columns: var(--result-columns);
    align-items: stretch;
  }

  .result-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(53, 97, 118, 0.12);
    color: #21485a;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .result-body {
    display: block;
  }

  .result-row {
    gap: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .result-row.active {
    background: rgba(191, 75, 36, 0.08);
  }

  .result-header > span,
  .result-cell {
    display: block;
    min-height: 42px;
    max-height: 42px;
    padding: 10px 9px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    font-size: 0.76rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-cell::before,
  .result-edit-cell::before,
  .specimen-temp-cell::before {
    content: none;
  }

  .result-header > span:last-child,
  .result-cell:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .result-action-header,
  .result-action-cell {
    display: grid;
    grid-template-columns: none;
    place-items: center;
    padding: 6px;
  }

  .result-action-header {
    justify-items: start;
  }

  .result-action-cell .source-copy-button,
  .result-action-cell .temp-source-confirm {
    justify-self: center;
  }

  .result-edit-cell {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .result-edit-cell .result-toggle,
  .result-edit-cell .result-select,
  .result-edit-cell .local-record-note,
  .result-edit-cell .custom-result-value {
    grid-column: auto;
  }

  .result-select {
    width: auto;
    flex: 1 1 104px;
    min-width: 98px;
    min-height: 28px;
    padding-right: 22px;
  }

  .specimen-temp-cell {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 4px;
    padding: 6px;
  }

  .specimen-temp-cell .specimen-temp-button:first-of-type,
  .specimen-temp-cell .specimen-temp-value,
  .specimen-temp-cell .specimen-temp-button:last-of-type {
    grid-column: auto;
  }

  .specimen-temp-cell .specimen-temp-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
