:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #dbe2ea;
  --line-strong: #cbd5e1;
  --text: #111827;
  --muted: #64748b;
  --blue: #145bd6;
  --blue-dark: #0e46ad;
  --green: #0f8a43;
  --green-bg: #e9f7ee;
  --amber: #d97706;
  --amber-bg: #fff4df;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --red-dark: #b91c1c;
  --on-strong: #fff;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --nav-heading: #0f172a;
  --nav-text: #253044;
  --nav-active-bg: #e8f1ff;
  --nav-active-border: #145bd6;
  --nav-active-text: #0e46ad;
  --hover-bg: #eef5ff;
  --focus-ring: rgba(20, 91, 214, 0.28);
  --avatar-bg: #e7f0ff;
  --form-label: #1f2937;
  --neutral-bg: #eef2f7;
  --neutral-text: #475569;
  --feedback-status-new-bg: #fff4df;
  --feedback-status-new-text: #b45309;
  --feedback-status-reviewing-bg: #dbeafe;
  --feedback-status-reviewing-text: #1d4ed8;
  --feedback-status-planned-bg: #eef2f7;
  --feedback-status-planned-text: #475569;
  --feedback-status-in-progress-bg: #e0e7ff;
  --feedback-status-in-progress-text: #1e3a8a;
  --feedback-status-awaiting-bg: #e0f2fe;
  --feedback-status-awaiting-text: #0369a1;
  --feedback-status-done-bg: #e9f7ee;
  --feedback-status-done-text: #166534;
  --feedback-status-reopened-bg: #f3e8ff;
  --feedback-status-reopened-text: #7e22ce;
  --feedback-status-rejected-bg: #fee2e2;
  --feedback-status-rejected-text: #b91c1c;
  --stock-total-bg: #f3f6fa;
  --warning-border: #f3c9c9;
  --warning-line: #f3d4d4;
  --warning-panel-bg: #fff7f7;
  --warning-text: #7f1d1d;
  --stock-section-bg: #eef5ff;
  --code-text: #334155;
  --login-bg: linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
  --sticky-table-top: 64px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111827;
  --surface-2: #1f2937;
  --line: #334155;
  --line-strong: #475569;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --blue: #60a5fa;
  --blue-dark: #93c5fd;
  --green: #4ade80;
  --green-bg: #06351f;
  --amber: #fbbf24;
  --amber-bg: #3a2705;
  --red: #f87171;
  --red-bg: #3b1117;
  --red-dark: #fca5a5;
  --topbar-bg: rgba(17, 24, 39, 0.92);
  --nav-heading: #e5e7eb;
  --nav-text: #d1d5db;
  --nav-active-bg: rgba(96, 165, 250, 0.2);
  --nav-active-border: #60a5fa;
  --nav-active-text: #bfdbfe;
  --hover-bg: rgba(96, 165, 250, 0.14);
  --focus-ring: rgba(96, 165, 250, 0.36);
  --avatar-bg: #172554;
  --form-label: #d1d5db;
  --neutral-bg: #1e293b;
  --neutral-text: #cbd5e1;
  --feedback-status-new-bg: #3a2705;
  --feedback-status-new-text: #fbbf24;
  --feedback-status-reviewing-bg: #1e3a8a;
  --feedback-status-reviewing-text: #dbeafe;
  --feedback-status-planned-bg: #1e293b;
  --feedback-status-planned-text: #cbd5e1;
  --feedback-status-in-progress-bg: #172554;
  --feedback-status-in-progress-text: #dbeafe;
  --feedback-status-awaiting-bg: #0c4a6e;
  --feedback-status-awaiting-text: #e0f2fe;
  --feedback-status-done-bg: #06351f;
  --feedback-status-done-text: #4ade80;
  --feedback-status-reopened-bg: #581c87;
  --feedback-status-reopened-text: #f3e8ff;
  --feedback-status-rejected-bg: #3b1117;
  --feedback-status-rejected-text: #f87171;
  --stock-total-bg: #1e293b;
  --warning-border: #7f1d1d;
  --warning-line: #7f1d1d;
  --warning-panel-bg: #2f1215;
  --warning-text: #fecaca;
  --stock-section-bg: #172554;
  --code-text: #cbd5e1;
  --login-bg: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 12px 28px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: clip;
}

.sidebar-collapsed .app-shell {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: var(--surface);
  scrollbar-gutter: stable;
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 96px;
  padding: 0 14px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand span {
  display: none;
}

.brand-logo-wide {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

.brand-logo-icon {
  display: none;
  width: 36px;
  height: 36px;
}

.sidebar-toggle {
  flex: 0 0 38px;
}

.nav-stack {
  display: grid;
  gap: 16px;
  padding: 12px 12px 16px;
}

.nav-search {
  display: grid;
  gap: 8px;
}

.nav-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-field > svg {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 42px 8px 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.nav-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

.nav-search-clear {
  position: absolute;
  right: 4px;
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.nav-search-clear[hidden],
.nav-search-empty[hidden] {
  display: none;
}

.nav-search-empty {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-tree-controls {
  display: flex;
  gap: 6px;
}

.nav-tree-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.nav-tree-control:hover:not(:disabled),
.nav-tree-control:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

.nav-tree-control:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

.nav-tree-control:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.nav-tree-control svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.nav-tree-control span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-section,
.nav-subsections,
.nav-subgroup {
  display: grid;
}

.nav-section {
  gap: 8px;
}

.nav-subsections {
  gap: 12px;
}

.nav-subgroup {
  gap: 4px;
}

.nav-subgroup-links {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-heading);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-group-toggle svg {
  color: var(--blue);
}

.nav-group-toggle:hover {
  background: var(--hover-bg);
  color: var(--blue);
}

.nav-group-toggle.is-active {
  background: var(--nav-active-bg);
  box-shadow: inset 3px 0 0 var(--nav-active-border);
  color: var(--nav-active-text);
}

.nav-group-toggle span {
  flex: 1;
  text-align: left;
}

.nav-group-chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.16s ease;
}

.nav-section.is-collapsed .nav-subsections {
  display: none;
}

.nav-section.is-collapsed .nav-group-chevron {
  transform: rotate(-90deg);
}

.nav-subgroup-heading {
  margin: 0;
}

.nav-subgroup-toggle,
.nav-subgroup-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 6px 2px;
  padding: 7px 8px 6px;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  width: calc(100% - 12px);
  background: transparent;
  color: var(--nav-heading);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.nav-subgroup-empty {
  cursor: default;
}

.nav-subgroup:first-child .nav-subgroup-toggle,
.nav-subgroup:first-child .nav-subgroup-empty {
  margin-top: 0;
  border-top: 0;
}

.nav-subgroup-toggle::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--line);
  flex: 0 0 auto;
}

.nav-subgroup-toggle:hover {
  color: var(--blue);
}

.nav-subgroup-toggle.is-active {
  color: var(--nav-active-text);
}

.nav-subgroup-toggle.is-active::before {
  background: var(--nav-active-border);
}

.nav-subgroup-toggle span {
  flex: 1;
  min-width: 0;
}

.nav-subgroup-chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.16s ease;
}

.nav-subgroup.is-collapsed .nav-subgroup-links {
  display: none;
}

.nav-subgroup.is-collapsed .nav-subgroup-chevron {
  transform: rotate(-90deg);
}

.nav-stack a,
.quick-upload a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: var(--nav-text);
  font-size: 13px;
  font-weight: 600;
}

.nav-stack a:hover,
.quick-upload a:hover {
  background: var(--hover-bg);
  color: var(--blue);
}

.nav-stack a.is-active,
.quick-upload a.is-active {
  background: var(--nav-active-bg);
  border-left-color: var(--nav-active-border);
  color: var(--nav-active-text);
  font-weight: 800;
}

.nav-stack a.is-active svg,
.quick-upload a.is-active svg {
  color: var(--nav-active-border);
}

.nav-group-toggle:focus-visible,
.nav-subgroup-toggle:focus-visible,
.nav-stack a:focus-visible,
.quick-upload a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.quick-upload {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.quick-upload p {
  margin: 10px 4px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.quick-upload-panel {
  padding: 0;
  overflow: hidden;
}

.quick-upload-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 800;
}

.quick-upload-details summary::-webkit-details-marker {
  display: none;
}

.quick-upload-details summary span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.quick-upload-details summary svg:last-child {
  color: var(--muted);
  transition: transform 0.16s ease;
}

.quick-upload-details[open] summary svg:last-child {
  transform: rotate(180deg);
}

.quick-upload-list {
  display: grid;
  gap: 4px;
  padding: 0 10px 12px;
}

.quick-upload-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.quick-upload-list a:hover {
  background: var(--hover-bg);
  color: var(--blue);
}

.quick-upload-list a:focus-visible,
.quick-upload-details summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-foot span:last-child {
  flex: 0 0 auto;
  font-weight: 700;
}

.sidebar-collapsed .brand-row {
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 12px 8px;
}

.sidebar-collapsed .brand {
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0;
}

.sidebar-collapsed .brand-logo-wide,
.sidebar-collapsed .nav-group-toggle span,
.sidebar-collapsed .nav-group-chevron,
.sidebar-collapsed .nav-tree-controls,
.sidebar-collapsed .nav-subgroup-heading,
.sidebar-collapsed .sidebar-foot {
  display: none;
}

.sidebar-collapsed .brand-logo-icon {
  display: block;
}

.sidebar-collapsed .nav-stack {
  gap: 10px;
  padding: 10px 12px 14px;
}

.sidebar-collapsed .nav-search {
  display: none;
}

.sidebar-collapsed .nav-section,
.sidebar-collapsed .nav-subsections,
.sidebar-collapsed .nav-subgroup,
.sidebar-collapsed .nav-subgroup-links {
  gap: 4px;
}

.sidebar-collapsed .nav-subgroup.is-collapsed .nav-subgroup-links {
  display: grid;
}

.sidebar-collapsed .nav-group-toggle {
  justify-content: center;
  min-height: 36px;
  padding: 8px;
}

.sidebar-collapsed .nav-stack a,
.sidebar-collapsed .quick-upload a {
  justify-content: center;
  padding: 10px;
  font-size: 0;
}

.sidebar-collapsed .nav-group-toggle.is-active,
.sidebar-collapsed .nav-stack a.is-active,
.sidebar-collapsed .quick-upload a.is-active {
  box-shadow: inset 0 -3px 0 var(--nav-active-border);
  border-left-color: transparent;
}

.main-shell {
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
}

.top-field {
  display: grid;
  flex: 0 1 240px;
  min-width: 180px;
  gap: 2px;
}

.top-field span {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.top-field strong {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.language-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-form select {
  min-height: 38px;
  width: 112px;
  padding: 8px 9px;
  font-size: 13px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  flex: 0 0 38px;
}

.active-users-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 50px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.active-users-pill:hover,
.active-users-pill:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

.feedback-updates-pill,
.personal-reminders-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 50px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.feedback-updates-pill.has-updates,
.personal-reminders-pill.has-due {
  border-color: var(--amber);
  background: var(--amber-bg);
  color: var(--amber);
}

.feedback-updates-pill:hover,
.feedback-updates-pill:focus-visible,
.personal-reminders-pill:hover,
.personal-reminders-pill:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

.feedback-updates-count,
.personal-reminders-count {
  min-width: 1.2em;
  text-align: center;
}

.active-users-count {
  min-width: 1.2em;
  text-align: center;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 38px;
  max-width: 200px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
}

.user-pill:hover {
  border-color: var(--blue);
  color: var(--text);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.user-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 13px;
}

.user-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.content {
  padding: 22px;
}

.breadcrumbs {
  margin: 0 0 14px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.breadcrumb-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 2px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin: 0 4px 0 0;
  color: var(--line-strong);
  font-weight: 700;
}

.breadcrumb-link,
.breadcrumb-current {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 220px;
  overflow: hidden;
  padding: 3px 2px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-link:hover {
  color: var(--blue);
}

.breadcrumb-current {
  color: var(--text);
}

.breadcrumb-menu {
  position: relative;
}

.breadcrumb-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.breadcrumb-menu summary::-webkit-details-marker {
  display: none;
}

.breadcrumb-menu summary:hover,
.breadcrumb-menu[open] summary {
  border-color: var(--line);
  background: var(--hover-bg);
  color: var(--blue);
}

.breadcrumb-menu summary svg {
  width: 14px;
  height: 14px;
}

.breadcrumb-menu-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 70;
  display: grid;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 44px));
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.breadcrumb-item:last-child .breadcrumb-menu-list {
  right: 0;
  left: auto;
}

.breadcrumb-menu-list a {
  display: block;
  overflow: hidden;
  padding: 7px 8px;
  border-radius: 5px;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-menu-list a:hover {
  background: var(--hover-bg);
  color: var(--blue);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.help-panel {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.help-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.help-panel summary::-webkit-details-marker {
  display: none;
}

.help-panel summary span,
.help-panel summary small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.help-panel summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.help-panel svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.help-panel .help-panel-chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.16s ease;
}

.help-panel[open] .help-panel-chevron {
  transform: rotate(180deg);
}

.help-content {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.help-content h2 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.help-content p {
  margin: 6px 0 0;
  color: var(--muted);
}

.help-status-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 8px 0 0;
}

.help-status-list dt {
  font-weight: 800;
}

.help-status-list dd {
  margin: 0;
  color: var(--muted);
}

.diagnostic-resolution-checklist {
  grid-column: 1 / -1;
}

.diagnostic-resolution-checklist ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.diagnostic-action-cell {
  min-width: 320px;
}

.diagnostic-action-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.diagnostic-action-card p {
  margin: 0;
  color: var(--muted);
}

.diagnostic-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copyable-evidence-request-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copyable-evidence-request {
  width: 100%;
  min-height: 106px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px;
}

.ai-intake-next-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 10px;
}

.ai-intake-next-action .section-help {
  flex: 1 1 260px;
  margin: 0;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  padding: 8px 14px;
}

.icon-btn {
  width: 38px;
  padding: 0;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--on-strong);
}

.btn-primary:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: var(--on-strong);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn.is-success {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}

.btn-danger {
  border-color: var(--red);
  background: var(--red);
  color: var(--on-strong);
}

.btn-danger:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  color: var(--on-strong);
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.impersonation-banner {
  position: sticky;
  z-index: 1200;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 3px solid var(--red);
  background: var(--red-bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.impersonation-banner > div {
  display: grid;
  gap: 2px;
}

.impersonation-banner form {
  margin: 0;
}

.impersonation-audit-panel {
  margin-top: 18px;
}

.impersonation-start-panel {
  display: grid;
  gap: 18px;
}

@media (max-width: 720px) {
  .impersonation-banner {
    position: relative;
    align-items: stretch;
    flex-direction: column;
  }

  .impersonation-banner .btn {
    width: 100%;
  }
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.action-cell {
  text-align: center;
}

.table-actions {
  min-width: 220px;
}

.report-row-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.row-action-menu {
  display: inline-grid;
  gap: 0;
  justify-items: start;
}

.row-action-menu summary {
  list-style: none;
  cursor: pointer;
}

.row-action-menu summary::-webkit-details-marker {
  display: none;
}

.row-action-menu-panel,
.row-action-menu > form,
.row-action-menu-floating-panel {
  display: grid;
  gap: 8px;
  min-width: 150px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin-top: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.38);
  z-index: 900;
}

.row-action-menu-floating-panel {
  position: fixed;
}

.document-action-menu-panel {
  min-width: 190px;
}

.row-action-menu-panel form {
  display: grid;
  margin: 0;
}

.row-action-menu-panel .btn,
.row-action-menu > form .btn,
.row-action-menu-floating-panel .btn {
  width: 100%;
  justify-content: flex-start;
}

.row-action-menu-panel button.btn,
.row-action-menu > form button.btn,
.row-action-menu-floating-panel button.btn {
  text-align: left;
}

.document-action-menu {
  justify-items: center;
}

.document-action-menu .row-action-menu-panel {
  min-width: 190px;
}

.follow-up-cell {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.follow-up-state {
  display: grid;
  gap: 4px;
}

.follow-up-state small {
  max-width: 220px;
}

.follow-up-menu {
  align-items: start;
}

.follow-up-form {
  min-width: 220px;
}

.follow-up-form label {
  display: grid;
  gap: 5px;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.follow-up-form select,
.follow-up-form input,
.follow-up-form textarea {
  width: 100%;
}

.follow-up-note textarea {
  min-height: 72px;
}

.task-create-panel {
  margin-bottom: 16px;
}

.task-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 16px;
}

.task-field-wide {
  grid-column: 1 / -1;
}

.task-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.task-calendar-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.task-calendar-day {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.task-calendar-day.is-today {
  border-color: var(--accent);
}

.task-calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.task-calendar-date h2 {
  margin: 0;
  font-size: 14px;
}

.task-calendar-subhead {
  margin: 12px 14px 8px;
  font-size: 13px;
}

.task-calendar-date span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.task-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.task-column-head h2 {
  margin: 0;
  font-size: 14px;
}

.task-column-head span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.task-card-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.task-column-scroll .task-card-list {
  max-height: min(68vh, 720px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.task-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--surface-strong);
}

.task-card-overdue {
  border-left-color: var(--danger);
}

.task-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.task-card-title a {
  min-width: 0;
  color: var(--text);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.task-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  font-size: 12px;
}

.task-card dt {
  color: var(--muted);
  font-weight: 800;
}

.task-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reminder-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.reminder-card {
  border-left: 4px solid var(--blue);
}

.reminder-card-due,
.reminder-alert {
  border-left: 4px solid var(--red);
}

.global-reminder-alert {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--warning-border);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: var(--warning-panel-bg);
  color: var(--warning-text);
}

.global-reminder-alert svg {
  width: 18px;
  height: 18px;
}

.global-reminder-alert a {
  margin-left: auto;
  font-weight: 900;
}

.reminder-channel-note {
  border-left: 4px solid var(--amber);
}

.reminder-meta {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 5px 10px;
  margin: 0;
}

.reminder-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.reminder-actions,
.reminder-snooze-form,
.tab-links {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.reminder-actions {
  justify-content: space-between;
}

.reminder-snooze-form label {
  min-width: 150px;
}

.audit-history ul,
.reminder-alert ul {
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 18px;
}

.dashboard-main,
.dashboard-rail {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}

.kpi {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.kpi span {
  min-height: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.kpi strong {
  font-size: 24px;
  line-height: 1.1;
}

.kpi small {
  color: var(--muted);
}

.kpi-link {
  color: var(--text);
  text-decoration: none;
}

.kpi-link:hover {
  border-color: var(--blue);
  color: var(--text);
}

.kpi-warning svg {
  color: var(--amber);
}

.action-panel {
  overflow: hidden;
}

.action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.action-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.action-card:hover {
  border-color: var(--blue);
  color: var(--text);
}

.action-card svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.action-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.action-card strong,
.action-card small {
  overflow-wrap: anywhere;
}

.action-card strong {
  font-size: 13px;
}

.action-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.action-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 3;
  grid-row: 1;
  min-width: 34px;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--neutral-bg);
  color: var(--neutral-text);
  font-style: normal;
  font-weight: 900;
}

.action-owner {
  color: var(--text) !important;
  font-weight: 600;
}

.action-card-actions {
  grid-column: 2 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.action-card-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.action-high {
  border-color: var(--warning-border);
  background: var(--warning-panel-bg);
}

.action-high svg,
.action-high em {
  color: var(--red-dark);
}

.action-medium svg,
.action-medium em {
  color: var(--amber);
}

.action-clear svg,
.action-clear em {
  color: var(--green);
}

.report-workbench {
  display: grid;
  gap: 16px;
}

.report-workbench-actions {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.report-export-form {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.report-export-form .form-grid {
  max-width: 760px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.narrow-panel {
  max-width: 760px;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
}

.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
}

.tabs {
  display: flex;
  gap: 22px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 2px solid transparent;
  color: var(--nav-text);
  font-weight: 700;
}

.tabs a.active {
  border-color: var(--blue);
  color: var(--blue);
}

.table-tools {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}

.table-tools > label:not(.search) {
  display: grid;
  gap: 5px;
  min-width: 180px;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.table-tools .btn {
  min-height: 40px;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search {
  position: relative;
  flex: 1;
  min-width: min(100%, 260px);
}

.search svg {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px 9px 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font: inherit;
}

.table-filter-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.table-tools + .table-filter-toolbar {
  border-top: 0;
  padding-top: 0;
}

.table-filter-compact-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.table-filter-toggle[aria-expanded="true"],
.table-filter-toolbar.has-active-filters .table-filter-toggle {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.table-filter-global {
  position: relative;
  flex: 1;
  min-width: min(100%, 240px);
  max-width: 420px;
}

.table-filter-global svg {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--muted);
}

.table-filter-global input {
  width: 100%;
  min-height: 38px;
  padding-left: 40px;
}

.table-filter-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-filter-toolbar.has-active-filters .table-filter-count {
  color: var(--blue);
}

.table-column-filter-row th {
  padding: 6px 6px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.table-column-filter {
  display: block;
  min-width: 0;
}

.table-column-filter input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 4px;
  font-size: 12px;
}

.column-preferences {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.column-preferences[hidden] {
  display: none;
}

.column-preferences details {
  width: 100%;
}

.column-preferences summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

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

.column-preference-bulk-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.column-preference-subhead {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--form-label);
}

.column-preference-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--form-label);
  font-size: 12px;
  font-weight: 700;
}

.column-order-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.column-order-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.column-order-list li.is-dragging {
  opacity: 0.55;
}

.column-order-list li.is-drop-target {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.column-drag-handle {
  display: inline-flex;
  color: var(--muted);
  cursor: grab;
}

.column-order-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.column-order-actions {
  display: inline-flex;
  gap: 4px;
}

.column-order-actions .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.column-preference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.table-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  contain: inline-size paint;
  -webkit-overflow-scrolling: touch;
}

.table-wrap-sticky {
  position: relative;
  max-height: calc(100vh - var(--sticky-table-top) - 16px);
  overflow: auto;
  scroll-margin-top: var(--sticky-table-top);
}

.table-wrap-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--line-strong), 0 3px 8px rgba(15, 23, 42, 0.08);
}

.table-wrap-sticky .table-column-filter-row th {
  top: 42px;
  z-index: 3;
  background: var(--surface);
}

.orders-overview-wrap {
  max-height: calc(100vh - var(--sticky-table-top) - 32px);
  scrollbar-gutter: stable;
}

.orders-overview-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.orders-overview-table th,
.orders-overview-table td {
  white-space: nowrap;
}

.orders-overview-table th:nth-child(5),
.orders-overview-table td:nth-child(5),
.orders-overview-table th:nth-child(6),
.orders-overview-table td:nth-child(6) {
  min-width: 150px;
  white-space: normal;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
}

.table-sort-link:hover,
.table-sort-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-sort-link svg,
.order-detail-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.order-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.table-pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-pagination > div {
  display: flex;
  gap: 8px;
}

.status.order-lifecycle-badge.new-order {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.status.order-lifecycle-badge.documentation,
.status.order-lifecycle-badge.scheduled,
.status.order-lifecycle-badge.on-hold {
  background: #dbeafe;
  color: #1e40af;
}

.status.order-lifecycle-badge.loaded-waiting-docs {
  background: #fef3c7;
  color: #92400e;
}

.status.order-lifecycle-badge.in-transit {
  background: #ede9fe;
  color: #5b21b6;
}

.status.order-lifecycle-badge.delivered {
  background: #dcfce7;
  color: #166534;
}

.status.order-lifecycle-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.order-detail-grid {
  align-items: start;
}

.order-detail-section {
  min-width: 0;
  padding-bottom: 16px;
}

.order-detail-section > .panel-heading {
  padding-bottom: 8px;
}

.order-line-detail-list + .order-line-detail-list,
.order-note + .order-note {
  border-top: 1px solid var(--line);
}

.order-line-detail-list h3 {
  margin-top: 0;
}

.order-note {
  padding: 14px 18px;
}

.order-note p {
  margin: 8px 0 0;
}

.document-event-list {
  display: grid;
  gap: 6px;
  min-width: 240px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

:root[data-theme="dark"] .status.order-lifecycle-badge.documentation,
:root[data-theme="dark"] .status.order-lifecycle-badge.scheduled,
:root[data-theme="dark"] .status.order-lifecycle-badge.on-hold {
  background: #172554;
  color: #bfdbfe;
}

:root[data-theme="dark"] .status.order-lifecycle-badge.loaded-waiting-docs {
  background: #451a03;
  color: #fde68a;
}

:root[data-theme="dark"] .status.order-lifecycle-badge.in-transit {
  background: #2e1065;
  color: #ddd6fe;
}

:root[data-theme="dark"] .status.order-lifecycle-badge.delivered {
  background: #052e16;
  color: #bbf7d0;
}

:root[data-theme="dark"] .status.order-lifecycle-badge.cancelled {
  background: #450a0a;
  color: #fecaca;
}

.map-filter-tools {
  align-items: end;
}

.map-filter-disabled input {
  color: var(--muted);
  background: var(--surface-2);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  padding: 0 16px 16px;
}

.tracking-map-canvas {
  position: relative;
  display: grid;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface-2);
  background-size: 42px 42px;
}

.tracking-map-canvas.has-map-points {
  background:
    linear-gradient(rgba(20, 91, 214, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 91, 214, 0.12) 1px, transparent 1px),
    var(--surface-2);
  background-size: 42px 42px;
}

.map-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  max-width: 560px;
  margin: auto;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-empty-state svg {
  width: 38px;
  height: 38px;
  color: var(--blue);
}

.map-empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.map-point-layer {
  position: absolute;
  inset: 0;
}

.map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-strong);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
}

.map-point span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: none;
  min-width: 180px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--shadow);
}

.map-point:hover span,
.map-point:focus span {
  display: block;
}

.map-side-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.map-stat {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.map-stat span,
.map-stat small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-stat strong {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.1;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: var(--surface-2);
  color: var(--nav-heading);
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 13px;
}

.stock-section-total > td {
  border-top-color: var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--stock-total-bg);
  font-weight: 800;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--neutral-bg);
  color: var(--code-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.status.matched,
.status.passed,
.status.promoted,
.status.active,
.status.accepted,
.status.clean,
.status.completed,
.status.done,
.status.high,
.status.in_transit,
.status.delivered,
.status.ready,
.status.upload_created {
  background: var(--green-bg);
  color: var(--green);
}

.status.loaded,
.status.at_depot,
.status.open,
.status.todo,
.status.wip,
.status.in_progress,
.status.medium,
.status.normal,
.status.urgent,
.status.new,
.status.reviewing,
.status.awaiting_confirmation,
.status.warning,
.status.waiting,
.status.review_required,
.status.staged,
.status.received,
.status.not_scanned,
.status.duplicate,
.status.pending,
.status.processing,
.status.partial {
  background: var(--amber-bg);
  color: var(--amber);
}

.status.failed,
.status.delayed,
.status.error,
.status.blocker,
.status.blocked,
.status.auth_failed,
.status.malware_detected,
.status.not_configured,
.status.quarantined,
.status.rejected,
.status.reopened,
.status.retracted,
.status.scanner_unavailable,
.status.sync_failed,
.status.exception {
  background: var(--red-bg);
  color: var(--red);
}

.status.resolved,
.status.dismissed,
.status.disabled,
.status.low,
.status.planned,
.status.on_hold,
.status.retained,
.status.cancelled,
.status.untested {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.status.order-status-badge.pending {
  background: #f3e8ff;
  color: #6b21a8;
}

.status.order-status-badge.open {
  background: #fef9c3;
  color: #854d0e;
}

.status.order-status-badge.complete {
  background: #dcfce7;
  color: #166534;
}

.status.order-status-badge.on_hold {
  background: #dbeafe;
  color: #1e40af;
}

.status.order-status-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

:root[data-theme="dark"] .status.order-status-badge.pending {
  background: #3b0764;
  color: #e9d5ff;
}

:root[data-theme="dark"] .status.order-status-badge.open {
  background: #422006;
  color: #fef08a;
}

:root[data-theme="dark"] .status.order-status-badge.complete {
  background: #052e16;
  color: #bbf7d0;
}

:root[data-theme="dark"] .status.order-status-badge.on_hold {
  background: #172554;
  color: #bfdbfe;
}

:root[data-theme="dark"] .status.order-status-badge.cancelled {
  background: #450a0a;
  color: #fecaca;
}

.status.feedback-status-badge.new {
  background: var(--feedback-status-new-bg);
  color: var(--feedback-status-new-text);
}

.status.feedback-status-badge.reviewing {
  background: var(--feedback-status-reviewing-bg);
  color: var(--feedback-status-reviewing-text);
}

.status.feedback-status-badge.planned {
  background: var(--feedback-status-planned-bg);
  color: var(--feedback-status-planned-text);
}

.status.feedback-status-badge.in_progress {
  background: var(--feedback-status-in-progress-bg);
  color: var(--feedback-status-in-progress-text);
}

.status.feedback-status-badge.on_hold {
  background: var(--amber-bg);
  color: var(--amber);
}

.status.feedback-status-badge.blocked {
  background: var(--red-bg);
  color: var(--red);
}

.status.feedback-status-badge.awaiting_confirmation {
  background: var(--feedback-status-awaiting-bg);
  color: var(--feedback-status-awaiting-text);
}

.status.feedback-status-badge.done {
  background: var(--feedback-status-done-bg);
  color: var(--feedback-status-done-text);
}

.status.feedback-status-badge.reopened {
  background: var(--feedback-status-reopened-bg);
  color: var(--feedback-status-reopened-text);
}

.status.feedback-status-badge.rejected {
  background: var(--feedback-status-rejected-bg);
  color: var(--feedback-status-rejected-text);
}

.roadmap-table td small,
table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  white-space: normal;
}

.roadmap-actions {
  display: grid;
  gap: 6px;
  min-width: 132px;
}

.roadmap-actions .btn {
  justify-content: flex-start;
  white-space: nowrap;
}

.rail-panel {
  overflow: hidden;
}

.upload-list,
.status-list {
  display: grid;
}

.upload-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.upload-row:first-child {
  border-top: 0;
}

.upload-row svg {
  color: var(--green);
}

.upload-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.upload-row strong,
.upload-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-row small {
  color: var(--muted);
}

.status-list {
  padding: 10px 14px 14px;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.mini-table th,
.mini-table td {
  padding: 9px 10px;
  font-size: 12px;
}

.stock-item-cell {
  display: grid;
  gap: 2px;
  min-width: 150px;
  white-space: normal;
}

.stock-item-cell strong {
  font-size: 12px;
}

.stock-item-cell small {
  color: var(--muted);
  font-size: 11px;
}

.positive {
  color: var(--green);
  font-weight: 800;
}

.negative {
  color: var(--red);
  font-weight: 800;
}

.neutral {
  color: var(--muted);
  font-weight: 800;
}

.stock-compare-tools {
  align-items: end;
}

.stock-gap-tools {
  align-items: end;
}

.dispatch-report-tools {
  flex-wrap: wrap;
  align-items: end;
}

.dispatch-report-tools > label:not(.search) {
  min-width: 150px;
}

.dispatch-search {
  min-width: min(100%, 320px);
}

.stock-gap-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 14px;
}

.stock-gap-summary-managed {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dispatch-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0;
}

.loading-summary-controls {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.loading-summary-presets,
.loading-summary-actions,
.loading-summary-source {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.loading-summary-presets > span {
  margin-right: 4px;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.loading-summary-presets .btn {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.loading-summary-presets .btn.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--on-strong);
}

.loading-summary-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
  gap: 12px;
}

.loading-summary-filters > label:not(.search) {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.loading-summary-filters input,
.loading-summary-filters select {
  width: 100%;
  min-width: 0;
}

.loading-summary-search {
  min-width: 0;
}

.loading-summary-actions {
  grid-column: span 2;
  align-self: end;
}

.loading-summary-actions .btn {
  min-height: 40px;
}

.loading-summary-source {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.loading-summary-source span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.loading-summary-source svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.loading-summary-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 16px 0 0;
}

.loading-summary-coverage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
}

.loading-summary-coverage > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.loading-summary-coverage > div + div {
  border-left: 1px solid var(--line);
}

.loading-summary-coverage span,
.loading-summary-coverage small {
  color: var(--muted);
}

.loading-summary-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.loading-summary-breakdown {
  min-width: 0;
}

.loading-summary-bars {
  display: grid;
  max-height: 430px;
  overflow-y: auto;
}

.loading-summary-bar-row {
  display: grid;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.loading-summary-bar-row:last-child {
  border-bottom: 0;
}

.loading-summary-bar-row:hover {
  background: var(--hover-bg);
}

.loading-summary-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.loading-summary-bar-label strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.loading-summary-bar-label em {
  color: var(--text);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.loading-summary-bar-row small {
  color: var(--muted);
}

.loading-summary-bar-track,
.loading-summary-inline-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.loading-summary-bar-track > span,
.loading-summary-inline-bar > span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: var(--blue);
}

.loading-summary-inline-bar {
  width: min(180px, 100%);
  margin-top: 6px;
}

.loading-summary-table td:nth-child(4) {
  min-width: 190px;
}

.loading-summary-empty {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 22px;
}

.loading-summary-empty > svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.loading-summary-empty h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.loading-summary-empty p {
  margin: 0 0 12px;
  color: var(--muted);
}

.preview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 14px;
}

.preview-actions form {
  display: inline-flex;
}

.preview-actions .preview-test-send {
  align-items: end;
  gap: 8px;
}

.preview-test-send label {
  display: grid;
  gap: 5px;
  min-width: 220px;
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.stock-gap-summary div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.stock-gap-summary span,
.muted {
  color: var(--muted);
}

.stock-gap-summary strong {
  font-size: 20px;
}

.stock-gap-warning-panel {
  padding: 0 16px 14px;
}

.stock-gap-warning-panel details {
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  background: var(--warning-panel-bg);
}

.stock-gap-warning-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  color: var(--red);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.stock-gap-warning-panel summary::-webkit-details-marker {
  display: none;
}

.stock-gap-warning-panel summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stock-gap-warning-panel summary small {
  color: var(--warning-text);
  font-size: 12px;
  font-weight: 800;
}

.stock-gap-warning-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.stock-gap-warning-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  background: var(--surface);
}

.stock-gap-warning-line[hidden],
.stock-gap-warning-empty[hidden] {
  display: none;
}

.stock-gap-warning-line strong,
.stock-gap-warning-line span,
.stock-gap-warning-line p {
  display: block;
}

.stock-gap-warning-line span {
  margin-top: 2px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.stock-gap-warning-line p,
.stock-gap-warning-empty {
  margin: 4px 0 0;
  color: var(--warning-text);
}

.stock-gap-warning-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stock-gap-section td {
  background: var(--stock-section-bg);
  color: var(--nav-heading);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-gap-total td {
  background: var(--surface-2);
  font-weight: 900;
}

.stock-gap-management-cell {
  min-width: 360px;
  white-space: normal;
}

.stock-gap-row-form {
  display: grid;
  gap: 8px;
}

.stock-gap-form-grid {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(140px, 1fr);
  gap: 8px;
}

.stock-gap-row-form label {
  display: grid;
  gap: 4px;
  color: var(--form-label);
  font-size: 11px;
  font-weight: 800;
}

.stock-gap-row-form input,
.stock-gap-row-form select,
.stock-gap-row-form textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.stock-gap-row-form textarea {
  min-height: 46px;
}

.stock-gap-notes-field {
  grid-column: 1 / -1;
}

.stock-gap-row-form .btn {
  justify-self: start;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.preview-table td {
  vertical-align: top;
}

.preview-list {
  display: grid;
  gap: 4px;
  min-width: 170px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-list li {
  display: grid;
  gap: 1px;
}

.preview-list span {
  color: var(--muted);
  font-size: 12px;
}

.preview-blockers li {
  color: var(--red);
  font-weight: 800;
}

.preview-ready {
  color: var(--green);
  font-weight: 800;
}

.stock-snapshot-panel {
  margin-top: 16px;
}

.dispatch-panel {
  margin-top: 16px;
}

.exception-panel {
  padding-bottom: 10px;
}

.exception-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 16px;
}

.exception-grid div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0 10px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
}

.exception-grid div:first-child {
  border-left: 0;
}

.exception-grid svg {
  grid-row: span 3;
  width: 28px;
  height: 28px;
  color: var(--amber);
}

.exception-grid strong {
  font-size: 20px;
}

.exception-grid span {
  font-weight: 800;
}

.exception-grid small {
  color: var(--muted);
}

.attention-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.feedback-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.feedback-summary .kpi {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 12px;
}

.feedback-summary .kpi svg {
  width: 20px;
  height: 20px;
}

.feedback-summary .kpi span {
  min-height: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.feedback-summary .kpi strong {
  font-size: 20px;
}

.attention-tools {
  flex-wrap: wrap;
  align-items: end;
}

.attention-tools .search {
  min-width: min(100%, 320px);
}

.review-triage-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.document-overview-summary {
  padding-top: 0;
}

.document-overview-table td {
  min-width: 140px;
  white-space: normal;
}

.document-overview-table th:first-child,
.document-overview-table td:first-child {
  min-width: 260px;
}

.document-overview-primary,
.document-status-stack {
  display: grid;
  gap: 5px;
}

.document-overview-primary a,
.document-overview-primary span {
  font-weight: 800;
}

.document-overview-primary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.document-status-stack {
  justify-items: start;
}

.document-next-action {
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

.triage-panel {
  margin-bottom: 16px;
}

.triage-table td {
  vertical-align: top;
  white-space: normal;
}

.triage-cause,
.triage-affected,
.triage-action {
  min-width: 160px;
}

.triage-action {
  max-width: 360px;
}

.bulk-selection-form {
  display: grid;
  gap: 12px;
}

.advanced-actions-form {
  display: block;
}

.advanced-actions-panel {
  box-shadow: none;
}

.advanced-actions-panel .bulk-action-bar {
  border-bottom: 0;
}

.bulk-action-bar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.bulk-action-bar > strong {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  white-space: nowrap;
}

.bulk-action-bar label {
  display: grid;
  gap: 5px;
  min-width: min(100%, 190px);
  color: var(--form-label);
  font-size: 12px;
  font-weight: 800;
}

.bulk-action-bar .bulk-note-field {
  flex: 1;
  min-width: min(100%, 280px);
}

.selection-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.selection-cell input[type="checkbox"] {
  margin: 0 auto;
}

.staging-review-row {
  scroll-margin-top: calc(var(--sticky-table-top) + 20px);
}

.staging-review-row:focus {
  outline: none;
}

.staging-review-row:target > td,
.staging-review-row.is-focused > td,
.staging-review-row:focus > td {
  background: var(--hover-bg);
}

.staging-review-row:target > td:first-child,
.staging-review-row.is-focused > td:first-child,
.staging-review-row:focus > td:first-child {
  box-shadow: inset 4px 0 0 var(--blue);
}

.staging-review-pagination {
  margin-top: 12px;
}

.attention-table td {
  white-space: normal;
}

.attention-message,
.attention-source {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.attention-message strong {
  color: var(--text);
}

.attention-message small,
.attention-source small {
  color: var(--muted);
}

.attention-action,
.long-text {
  min-width: 220px;
  max-width: 520px;
  white-space: normal;
}

.attention-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.feedback-detail-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.feedback-detail-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.feedback-roadmap-panel {
  overflow: hidden;
}

.feedback-roadmap-link {
  color: var(--blue);
  font-weight: 750;
}

.feedback-new-update {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
  font-weight: 800;
}

.feedback-new-update i {
  width: 14px;
  height: 14px;
}

.my-feedback-table {
  width: 100%;
  table-layout: fixed;
}

.my-feedback-table .my-feedback-col-feedback {
  width: 38%;
}

.my-feedback-table .my-feedback-col-type {
  width: 14%;
}

.my-feedback-table .my-feedback-col-status {
  width: 17%;
}

.my-feedback-table .my-feedback-col-roadmap-status {
  width: 18%;
}

.my-feedback-table .my-feedback-col-attachments {
  width: 13%;
}

.my-feedback-table th,
.my-feedback-table td {
  min-width: 0;
  padding: 10px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.my-feedback-table .long-text {
  min-width: 0;
  max-width: none;
}

.my-feedback-cell-content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.my-feedback-cell-content > a,
.my-feedback-cell-content strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.my-feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.my-feedback-meta a {
  color: var(--blue);
  font-weight: 800;
}

.my-feedback-table .status {
  max-width: 100%;
  margin-left: 0;
  white-space: normal;
}

.my-feedback-attachment-cell {
  text-align: center;
}

.attention-update-panel {
  overflow: hidden;
}

.attention-update-panel .form-stack {
  padding: 16px;
}

.feedback-review-actions {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.feedback-roadmap-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.feedback-roadmap-body .long-text {
  min-width: 0;
  max-width: none;
}

.feedback-manual-text {
  color: var(--text);
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.compact-detail-list {
  margin: 0;
  padding: 0;
}

.feedback-confirmation-form {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.feedback-progress-panel {
  overflow: hidden;
}

.feedback-progress-list {
  border-top: 1px solid var(--line);
}

.feedback-progress-list li {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.feedback-progress-list li:last-child {
  border-bottom: 0;
}

.feedback-progress-list p {
  margin: 4px 0 0;
}

.feedback-progress-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-progress-meta time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.feedback-status-guide {
  margin-top: 16px;
  overflow: hidden;
}

.feedback-status-guide-menu {
  position: relative;
  z-index: 30;
}

.feedback-status-guide-trigger {
  list-style: none;
  cursor: pointer;
}

.feedback-status-guide-trigger::-webkit-details-marker {
  display: none;
}

.feedback-status-guide-trigger:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.feedback-status-guide-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(760px, calc(100vw - 48px));
  max-height: min(72vh, 680px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feedback-status-guide-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.feedback-status-guide-popover-head h2,
.feedback-status-guide-popover-head p {
  margin: 0;
}

.feedback-status-guide-popover-head > small {
  flex: 0 0 auto;
  color: var(--muted);
}

.status-guide-disclosure {
  display: block;
}

.status-guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.status-guide-summary::-webkit-details-marker {
  display: none;
}

.status-guide-summary h2,
.status-guide-summary p {
  margin: 0;
}

.status-guide-summary-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-guide-summary-action i {
  width: 16px;
  height: 16px;
}

.status-guide-disclosure[open] .status-guide-summary {
  border-bottom: 1px solid var(--line);
}

.status-guide-disclosure[open] .status-guide-summary-action {
  color: var(--text);
}

.status-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.status-guide-item {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-guide-item h3,
.status-guide-item p {
  margin: 0;
}

.status-guide-item h3 {
  font-size: 15px;
}

.status-guide-item small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .feedback-status-guide-popover {
    position: fixed;
    top: 76px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 96px);
  }

  .feedback-status-guide-popover-head {
    flex-direction: column;
  }

  .status-guide-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

.feedback-review-action-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.feedback-approval-options {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.feedback-approval-option {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 2px;
  border-left: 4px solid var(--line-strong);
  padding-left: 12px;
}

.feedback-approval-option > *,
.feedback-approval-option .form-stack,
.feedback-approval-option label,
.feedback-approval-option-head > div {
  min-width: 0;
}

.feedback-approval-option label > input,
.feedback-approval-option label > select,
.feedback-approval-option label > textarea {
  width: 100%;
  max-width: 100%;
}

.feedback-approval-option + .feedback-approval-option {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.feedback-approval-option-link {
  border-left-color: var(--blue);
}

.feedback-approval-option-create {
  border-left-color: var(--green);
}

.feedback-approval-option-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.feedback-approval-option-head > i {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--blue);
}

.feedback-approval-option-create .feedback-approval-option-head > i {
  color: var(--green);
}

.feedback-approval-option-head h3,
.feedback-approval-option-head p {
  margin: 0;
}

.feedback-approval-option-head h3 {
  color: var(--text);
  font-size: 15px;
}

.feedback-approval-option-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.feedback-discussion {
  margin-top: 16px;
  overflow: hidden;
}

.feedback-comment-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feedback-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-comment-meta strong {
  color: var(--text);
}

.feedback-comment-form {
  padding: 16px;
}

.attention-audit {
  margin-top: 16px;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.timeline li:first-child {
  border-top: 0;
}

.timeline span,
.timeline small {
  color: var(--muted);
}

.timeline p {
  margin: 2px 0 0;
  white-space: pre-wrap;
}

.empty {
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.form-grid,
.form-stack {
  display: grid;
  gap: 14px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attention-status-binding-form {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.form-grid label,
.form-stack label,
.form-grid .form-field,
.form-stack .form-field {
  display: grid;
  gap: 6px;
  color: var(--form-label);
  font-weight: 700;
}

.form-grid .form-field,
.form-stack .form-field {
  min-width: 0;
}

.form-grid .form-field > label,
.form-stack .form-field > label {
  display: block;
}

.form-grid .form-field > .form-option-label,
.form-stack .form-field > .form-option-label {
  display: flex;
}

.form-grid .form-field input,
.form-grid .form-field select,
.form-grid .form-field textarea,
.form-stack .form-field input,
.form-stack .form-field select,
.form-stack .form-field textarea {
  width: 100%;
}

.password-input-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.password-input-wrap input {
  padding-right: 46px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  background: var(--hover-bg);
  color: var(--blue);
}

.password-visibility-toggle:focus-visible {
  outline: 3px solid rgba(20, 91, 214, 0.28);
  outline-offset: 1px;
}

.password-visibility-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.password-visibility-eye-off {
  display: none;
}

.password-visibility-toggle[aria-pressed="true"] .password-visibility-eye {
  display: none;
}

.password-visibility-toggle[aria-pressed="true"] .password-visibility-eye-off {
  display: block;
}

.form-grid .form-option-label,
.form-stack .form-option-label,
.form-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--form-label);
  font-weight: 700;
  cursor: pointer;
}

.form-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-help,
.section-help {
  color: var(--muted);
  font-weight: 600;
}

.field-help {
  font-size: 12px;
  line-height: 1.35;
}

.section-help {
  margin: 0 0 12px;
}

.masterdata-panel {
  max-width: 920px;
}

.contextual-notes-panel {
  display: grid;
  gap: 0;
}

.contextual-note-create,
.contextual-note-list {
  padding: 16px;
}

.contextual-note-create {
  border-bottom: 1px solid var(--line);
}

.contextual-note-list {
  display: grid;
  gap: 14px;
}

.contextual-note {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.contextual-note-archived {
  background: var(--surface-2);
}

.contextual-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contextual-note-head div,
.contextual-note-events {
  min-width: 0;
}

.contextual-note-head small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.contextual-note-events summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.contextual-note-empty {
  margin: 0;
}

.masterdata-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.masterdata-form .errorlist,
.masterdata-form .form-actions,
.masterdata-duplicate-warning,
.masterdata-hidden-error,
.masterdata-field-wide,
.masterdata-option,
.access-edit-section {
  grid-column: 1 / -1;
}

.masterdata-duplicate-warning {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  background: var(--warning-panel-bg);
  color: var(--warning-text);
}

.masterdata-duplicate-warning strong,
.masterdata-duplicate-warning p,
.masterdata-duplicate-warning dl {
  margin: 0;
}

.masterdata-duplicate-warning span {
  font-weight: 800;
}

.masterdata-duplicate-warning dl {
  display: grid;
  gap: 6px;
}

.masterdata-duplicate-warning dl div {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.masterdata-duplicate-warning dt {
  color: var(--muted);
  font-weight: 800;
}

.masterdata-duplicate-warning dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.masterdata-duplicate-warning-copy {
  color: var(--warning-text);
  font-weight: 700;
}

.masterdata-duplicate-warning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-edit-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 2px;
}

.access-edit-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.access-edit-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.access-edit-table th,
.access-edit-table td {
  white-space: normal;
  vertical-align: middle;
}

.access-edit-table thead th {
  border-top: 0;
}

.access-edit-table tbody th {
  width: 36%;
  color: var(--form-label);
  font-size: 13px;
}

.access-page-label,
.access-page-meta {
  display: block;
}

.access-page-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.access-edit-group-row th {
  width: auto;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.access-edit-table select {
  width: 100%;
  min-width: 180px;
}

.access-role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.access-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.access-role-chip.inactive {
  color: var(--muted);
  text-decoration: line-through;
}

.access-role-checkbox-list {
  display: grid;
  gap: 8px;
}

.access-role-checkbox-list > div {
  display: grid;
  gap: 8px;
}

.access-role-checkbox-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--form-label);
  font-weight: 800;
}

.access-role-checkbox-list input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.order-overview-wrap {
  max-height: calc(100vh - 280px);
}

.order-overview-wrap table {
  min-width: 3700px;
}

.order-overview-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.order-overview-form h2,
.order-overview-form .errorlist,
.order-overview-form .form-actions,
.order-overview-form .masterdata-field-wide {
  grid-column: 1 / -1;
}

.order-overview-form h2 {
  margin: 10px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.order-overview-form h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sales-order-group-form {
  display: grid;
  gap: 16px;
}

.sales-order-parent-fields .masterdata-field select {
  width: 50%;
  min-width: 22rem;
  max-width: 100%;
}

.suborder-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.suborder-form-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.suborder-form-card legend {
  padding: 0 6px;
  color: var(--nav-heading);
  font-weight: 800;
}

.masterdata-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--form-label);
  font-weight: 700;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.required-marker {
  margin-left: 3px;
  color: var(--red);
  font-weight: 900;
}

.compact-icon-btn {
  width: 30px;
  min-height: 30px;
}

.field-clear-btn {
  min-height: 30px;
  padding: 5px 9px;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.field-clear-btn svg {
  width: 15px;
  height: 15px;
}

.order-status-help-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.order-status-help-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
  display: none;
  width: min(340px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
}

.order-status-help-wrap:hover .order-status-help-popover,
.order-status-help-wrap:focus-within .order-status-help-popover {
  display: grid;
  gap: 8px;
}

.order-status-help-row {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.order-status-help-row strong {
  color: var(--form-label);
  font-size: 12px;
}

.muted-inline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-builder {
  display: grid;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.schedule-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.schedule-builder h3,
.schedule-builder p {
  margin: 0;
}

.schedule-builder p,
.schedule-choice-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-preview {
  max-width: 560px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.schedule-builder.is-manual .schedule-preview {
  color: var(--muted);
}

.schedule-choice-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.schedule-choice-field legend {
  padding: 0;
  color: var(--form-label);
  font-weight: 850;
}

.schedule-choice-grid {
  display: grid;
  gap: 6px;
}

.schedule-choice-grid-hours {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.schedule-choice-grid-minutes {
  grid-template-columns: repeat(15, minmax(0, 1fr));
}

.schedule-choice-grid-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.location-role-grid {
  grid-template-columns: repeat(var(--location-role-columns, 8), minmax(0, 1fr));
  gap: 4px;
}

.location-role-grid .schedule-choice,
.location-role-grid .schedule-choice span {
  min-height: 34px;
}

.location-role-grid .schedule-choice span {
  padding: 3px 4px;
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.schedule-choice {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 38px;
  cursor: pointer;
}

.schedule-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-choice span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.schedule-choice input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--on-strong);
}

.schedule-choice input:focus-visible + span {
  outline: 3px solid rgba(20, 91, 214, 0.28);
  outline-offset: 2px;
}

.recipient-contact-pickers {
  display: grid;
  gap: 12px;
}

.recipient-contact-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.recipient-contact-picker legend {
  padding: 0;
  color: var(--form-label);
  font-weight: 850;
}

.recipient-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.recipient-contact-chip {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 42px;
  cursor: pointer;
}

.recipient-contact-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.recipient-contact-chip span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.recipient-contact-chip input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--on-strong);
}

.recipient-contact-chip input:focus-visible + span {
  outline: 3px solid rgba(20, 91, 214, 0.28);
  outline-offset: 2px;
}

.masterdata-field input,
.masterdata-field select,
.masterdata-field textarea {
  width: 100%;
}

.masterdata-field small,
.masterdata-option-copy small {
  color: var(--muted);
  font-weight: 600;
}

.masterdata-option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--form-label);
  font-weight: 700;
  cursor: pointer;
}

.masterdata-option-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.masterdata-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.feedback-file-field {
  display: grid;
  gap: 8px;
}

.file-capture-box {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.file-capture-box.is-dragover,
.file-capture-box:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(20, 91, 214, 0.18);
  outline-offset: 2px;
}

.file-capture-box > svg,
.file-capture-box > i {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.file-capture-box strong {
  font-size: 15px;
}

.file-capture-box small {
  max-width: 520px;
}

.file-capture-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.file-capture-list,
.attachment-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.file-capture-list[hidden] {
  display: none;
}

.file-capture-list li,
.attachment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.attachment-list li {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.file-capture-list span,
.attachment-list a,
.attachment-list small {
  min-width: 0;
}

.file-capture-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}

.attachment-list small {
  color: var(--muted);
  font-weight: 700;
}

.modal-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.modal-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.feedback-image-preview-dialog {
  width: min(920px, calc(100vw - 32px));
}

.feedback-image-preview-card {
  gap: 14px;
}

.feedback-image-preview-frame {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: min(68vh, 680px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.feedback-image-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: min(64vh, 640px);
  object-fit: contain;
}

input,
select,
textarea {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.sa-date-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.form-grid .form-field .sa-date-control,
.form-stack .form-field .sa-date-control,
.form-grid label .sa-date-control,
.form-stack label .sa-date-control {
  width: 100%;
}

.sa-date-control .sa-date-display {
  flex: 1 1 auto;
  min-width: 0;
}

.sa-date-picker-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.sa-date-native {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

textarea[rows="2"] {
  min-height: 74px;
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inline-check input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.field-error {
  color: var(--red);
  font-weight: 700;
}

.detail-list {
  padding: 18px;
}

.document-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.document-detail-grid > * {
  min-width: 0;
}

.document-detail-grid .full-span {
  grid-column: 1 / -1;
}

.upload-progress-panel {
  display: grid;
  gap: 16px;
}

.upload-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.upload-progress-head h2 {
  margin: 0 0 6px;
}

.upload-progress-head .status {
  margin-top: 2px;
  margin-left: 0;
  white-space: nowrap;
}

.upload-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-progress-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.upload-progress-step-marker {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--neutral-bg);
}

.upload-progress-steps strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 6px;
}

.upload-progress-steps .status {
  margin-left: 0;
}

.upload-progress-steps p,
.upload-progress-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.upload-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-list dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
}

.detected-values-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.detected-values-grid h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.value-list,
.issue-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-list li,
.issue-list li {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.value-list span,
.value-list small,
.issue-list small {
  color: var(--muted);
}

.issue-list .status {
  vertical-align: middle;
}

.upload-audit-list {
  max-height: min(420px, 70vh);
  overflow-y: auto;
  padding-right: 4px;
}

.audit-change-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 4px 0;
}

.audit-change-list dt {
  color: var(--muted);
  font-weight: 800;
}

.audit-change-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-suggestion-values {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 8px 0 0;
}

.ai-suggestion-values dt {
  color: var(--muted);
  font-weight: 800;
}

.ai-suggestion-values dd {
  margin: 0;
}

.inline-review-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inline-review-form label {
  display: grid;
  gap: 4px;
}

.inline-review-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-history {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.decision-history > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.decision-history ul {
  display: grid;
  gap: 6px;
  list-style: none;
}

.decision-history li {
  border-left: 3px solid var(--border);
  display: grid;
  gap: 3px;
  padding-left: 10px;
}

.decision-history p {
  margin: 0;
}

.system-detail-list code {
  overflow-wrap: anywhere;
}

.change-history-table .change-message {
  min-width: 240px;
  white-space: normal;
}

.change-history-table code,
.system-change-details code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.system-change-details {
  min-width: 280px;
  white-space: normal;
}

.system-change-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}

.system-change-details dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 10px 0 0;
}

.system-change-details dt {
  color: var(--muted);
  font-weight: 800;
}

.system-change-details dd {
  margin: 0;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.message {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-weight: 700;
}

.message.success {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}

.message.error {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}

.portal-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
}

.portal-assistant-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-strong);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

.portal-assistant-toggle:hover {
  background: var(--blue-dark);
  color: var(--on-strong);
}

.portal-assistant-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.portal-assistant-panel {
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portal-assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.portal-assistant-head h2,
.portal-assistant-head p {
  margin: 0;
}

.portal-assistant-head h2 {
  font-size: 17px;
}

.portal-assistant-head p {
  color: var(--muted);
  font-size: 12px;
}

.portal-assistant-body {
  display: grid;
  gap: 12px;
  max-height: min(640px, calc(100vh - 118px));
  padding: 14px;
  overflow-y: auto;
}

.portal-assistant-note {
  margin: 0;
  color: var(--muted);
}

.portal-assistant-form {
  display: grid;
  gap: 6px;
}

.portal-assistant-form > label {
  font-size: 13px;
  font-weight: 800;
}

.portal-assistant-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.portal-assistant-input-row input {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.portal-assistant-input-row input:focus-visible {
  border-color: var(--blue);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.portal-assistant-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.portal-assistant-conversation {
  display: grid;
  gap: 10px;
}

.portal-assistant-message {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.portal-assistant-message.is-user {
  margin-left: 28px;
  border-color: var(--blue);
}

.portal-assistant-message.is-assistant {
  margin-right: 16px;
}

.portal-assistant-message strong {
  font-size: 12px;
}

.portal-assistant-message p {
  margin: 0;
  white-space: pre-wrap;
}

.portal-assistant-citations {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding-left: 18px;
  font-size: 12px;
}

.portal-assistant-citations a {
  font-weight: 800;
}

.portal-assistant-citations span {
  color: var(--muted);
}

.portal-assistant-citations span.is-stale {
  color: var(--red);
  font-weight: 800;
}

.portal-assistant-boundary {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.portal-assistant-boundary a {
  font-weight: 800;
}

.portal-assistant-links {
  display: grid;
  gap: 8px;
}

.portal-assistant-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.portal-assistant-links a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

code {
  display: inline-block;
  max-width: 480px;
  overflow: hidden;
  color: var(--code-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--login-bg);
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card.wide {
  width: min(100%, 560px);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.login-logo {
  width: 170px;
  max-width: 100%;
  height: auto;
  margin-bottom: 16px;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.landing-page {
  min-height: 100vh;
  background: #0b1118;
  color: #fff;
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: 74vh;
  padding: 24px clamp(18px, 4vw, 64px) 72px;
  background:
    linear-gradient(90deg, rgba(6, 13, 22, 0.92) 0%, rgba(6, 13, 22, 0.72) 38%, rgba(6, 13, 22, 0.15) 100%),
    var(--hero-image) center / cover no-repeat;
}

.landing-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 54px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: 0;
}

.landing-brand img {
  width: 150px;
  height: auto;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.94);
}

.landing-brand:hover {
  color: #fff;
}

.btn-light {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.btn-light:hover {
  border-color: var(--blue);
  background: var(--hover-bg);
  color: var(--blue);
}

.landing-page .btn-light {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(8px);
}

.landing-page .btn-light:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-large {
  min-height: 46px;
  padding: 11px 18px;
}

.landing-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 720px;
  padding: 54px 0 12px;
}

.landing-copy h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(40px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-copy p {
  max-width: 610px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.landing-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #263241;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-feature {
  min-height: 210px;
  padding: 34px clamp(20px, 4vw, 46px);
  background: #101923;
}

.landing-feature svg {
  width: 28px;
  height: 28px;
  color: #4f8cff;
}

.landing-feature h2 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.landing-feature p {
  margin: 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .brand {
    font-size: 0;
  }

  .brand-logo-wide {
    display: none;
  }

  .brand-logo-icon {
    display: block;
  }

  .nav-stack a,
  .quick-upload a {
    justify-content: center;
    padding: 10px;
    font-size: 0;
  }

  .nav-stack {
    gap: 10px;
    padding: 10px 12px 14px;
  }

  .nav-section,
  .nav-subsections,
  .nav-subgroup {
    gap: 4px;
  }

  .nav-group-toggle {
    justify-content: center;
    min-height: 36px;
    padding: 8px;
  }

  .nav-group-toggle span,
  .nav-group-chevron,
    .nav-subgroup-heading {
    display: none;
  }

  .quick-upload p,
  .sidebar-foot {
    display: none;
  }

  .user-copy {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .document-detail-grid {
    grid-template-columns: 1fr;
  }

  .upload-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detected-values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attention-detail-grid {
    grid-template-columns: 1fr;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .loading-summary-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .loading-summary-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .loading-summary-filters,
  .loading-summary-kpis,
  .loading-summary-coverage,
  .loading-summary-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loading-summary-breakdowns {
    grid-template-columns: 1fr;
  }

  .loading-summary-actions {
    grid-column: 1 / -1;
  }

  .app-shell {
    display: block;
  }

  .sidebar-collapsed .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: 100vh;
    overflow-y: visible;
  }

  .brand {
    height: 58px;
    justify-content: flex-start;
    flex: 1;
    font-size: 0;
  }

  .brand-row {
    justify-content: space-between;
    flex-direction: row;
    min-height: 58px;
    padding: 0 12px;
  }

  .sidebar-collapsed .brand-row {
    justify-content: space-between;
    flex-direction: row;
  }

  .sidebar-collapsed .brand {
    justify-content: flex-start;
  }

  .brand-logo-wide {
    display: block;
    width: 136px;
  }

  .brand-logo-icon {
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .nav-stack {
    display: none;
    gap: 16px;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 12px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    scrollbar-gutter: stable;
  }

  .sidebar-collapsed .nav-search {
    display: grid;
  }

  .mobile-nav-open .nav-stack {
    display: grid;
  }

  .nav-section,
  .nav-subsections,
  .nav-subgroup {
    display: grid;
  }

  .nav-section {
    gap: 8px;
  }

  .nav-subsections {
    gap: 9px;
  }

  .nav-subgroup {
    gap: 3px;
  }

  .nav-group-toggle {
    display: flex;
    justify-content: flex-start;
    min-height: 34px;
    padding: 6px 8px;
  }

  .nav-group-toggle span,
  .nav-group-chevron {
    display: inline;
  }

  .nav-subgroup-heading {
    display: block;
  }

  .nav-subgroup-toggle {
    display: flex;
  }

  .nav-stack a {
    justify-content: flex-start;
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
    flex-direction: row;
    gap: 12px;
  }

  .sidebar-collapsed .nav-stack a {
    justify-content: flex-start;
    font-size: 13px;
  }

  .quick-upload,
  .sidebar-foot {
    display: none;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
  }

  .top-field {
    min-width: min(100%, 220px);
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .user-pill {
    max-width: none;
  }

  .content {
    padding: 14px;
  }

  .kpi-grid,
  .action-list,
  .attention-summary,
  .exception-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feedback-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-board-grid {
    grid-template-columns: 1fr;
  }

  .task-column-scroll .task-card-list {
    max-height: min(60vh, 620px);
  }

  .reminder-actions,
  .reminder-snooze-form {
    align-items: stretch;
    flex-direction: column;
  }

  .reminder-snooze-form label {
    min-width: 0;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-panel summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-content {
    grid-template-columns: 1fr;
  }

  .column-preference-grid,
  .column-order-list,
  .order-overview-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-order-parent-fields .masterdata-field select {
    width: 100%;
    min-width: 0;
  }

  .schedule-builder-head {
    display: grid;
  }

  .schedule-preview {
    max-width: none;
  }

  .schedule-choice-grid-hours {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .schedule-choice-grid-minutes {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .location-role-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 6px;
  }

  .location-role-grid .schedule-choice,
  .location-role-grid .schedule-choice span {
    min-height: 38px;
  }

  .location-role-grid .schedule-choice span {
    padding: 0;
    font-size: inherit;
    line-height: normal;
  }

  .tracking-map-canvas {
    min-height: 360px;
  }

  .map-side-panel {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: 68vh;
    padding-bottom: 52px;
    background:
      linear-gradient(180deg, rgba(6, 13, 22, 0.94) 0%, rgba(6, 13, 22, 0.76) 55%, rgba(6, 13, 22, 0.34) 100%),
      var(--hero-image) center / cover no-repeat;
  }

  .landing-copy h1 {
    font-size: 42px;
  }

  .landing-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-assistant {
    right: 16px;
    bottom: 16px;
    max-width: calc(100vw - 32px);
  }

  .portal-assistant-panel {
    width: calc(100vw - 32px);
  }

  .portal-assistant-body {
    max-height: calc(100vh - 104px);
  }

  .breadcrumb-list {
    gap: 4px;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    max-width: 148px;
  }

  .breadcrumb-menu-list {
    right: 0;
    left: auto;
  }

  .table-wrap {
    overflow-x: visible;
  }

  .table-wrap-sticky {
    max-height: none;
    overflow: visible;
  }

  .orders-overview-wrap,
  .order-detail-section .table-wrap {
    overflow-x: auto;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .table-wrap table.responsive-table {
    display: block;
    width: 100%;
  }

  .table-wrap table.responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .table-wrap table.responsive-table.has-visible-table-filters thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
  }

  .table-wrap table.responsive-table.has-visible-table-filters thead tr:not(.table-column-filter-row) {
    display: none;
  }

  .table-wrap table.responsive-table.has-visible-table-filters .table-column-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }

  .table-wrap table.responsive-table.has-visible-table-filters .table-column-filter-row th {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .table-wrap table.responsive-table.has-visible-table-filters .table-column-filter-row th::before {
    display: none;
  }

  .table-wrap-sticky table.responsive-table thead th {
    position: static;
    box-shadow: none;
  }

  .table-wrap table.responsive-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .table-wrap table.responsive-table tr {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }

  .table-wrap table.responsive-table td,
  .table-wrap table.responsive-table th {
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-wrap table.responsive-table td::before,
  .table-wrap table.responsive-table th::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
  }

  .table-wrap table.responsive-table td:not([data-label])::before,
  .table-wrap table.responsive-table th:not([data-label])::before {
    display: none;
  }

  .table-wrap table.responsive-table tr.responsive-table-full-row td,
  .table-wrap table.responsive-table tr.responsive-table-full-row th,
  .table-wrap table.responsive-table tr.responsive-table-empty-row td,
  .table-wrap table.responsive-table tr.responsive-table-empty-row th {
    grid-template-columns: 1fr;
  }

  .table-wrap table.responsive-table .empty {
    text-align: left;
  }

  .table-wrap table.responsive-table .status {
    width: fit-content;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .loading-summary-filters,
  .loading-summary-kpis,
  .loading-summary-coverage {
    grid-template-columns: 1fr;
  }

  .loading-summary-actions,
  .loading-summary-source,
  .loading-summary-presets {
    align-items: stretch;
    flex-direction: column;
  }

  .loading-summary-actions .btn,
  .loading-summary-presets .btn {
    width: 100%;
  }

  .loading-summary-coverage > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .loading-summary-bar-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .kpi-grid,
  .action-list,
  .attention-summary,
  .exception-grid,
  .stock-gap-summary {
    grid-template-columns: 1fr;
  }

  .feedback-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-tools,
  .tabs {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .table-tools > label:not(.search),
  .table-tools .search,
  .table-tools .btn {
    width: 100%;
    min-width: 0;
  }

  .table-tools input,
  .table-tools select {
    width: 100%;
  }

  .table-filter-toolbar {
    padding: 8px 12px;
  }

  .table-filter-compact-form {
    align-items: center;
  }

  .table-filter-toggle {
    align-self: flex-start;
    flex: 0 0 40px;
  }

  .upload-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-progress-steps {
    grid-template-columns: 1fr;
  }

  .table-filter-global {
    flex: 1 1 calc(100% - 56px);
    min-width: 0;
    max-width: none;
  }

  .table-filter-clear {
    width: 100%;
  }

  .table-filter-count {
    flex: 1 1 100%;
    white-space: normal;
  }

  .column-preference-grid,
  .column-order-list,
  .order-overview-form {
    grid-template-columns: 1fr;
  }

  .schedule-choice-grid-hours,
  .schedule-choice-grid-minutes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .schedule-choice-grid-weekdays {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-list dl {
    grid-template-columns: 1fr;
  }

  .long-text {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-actions .btn {
    max-width: 100%;
    white-space: normal;
  }

  .detected-values-grid {
    grid-template-columns: 1fr;
  }

  .system-change-details dl {
    grid-template-columns: 1fr;
  }

  .stock-gap-warning-panel summary,
  .stock-gap-warning-line {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .stock-gap-warning-panel summary {
    flex-direction: column;
  }

  .stock-gap-warning-actions {
    justify-content: stretch;
  }

  .stock-gap-management-cell {
    min-width: 0;
  }

  .stock-gap-form-grid {
    grid-template-columns: 1fr;
  }

  .stock-gap-row-form .btn {
    justify-self: stretch;
  }

  .masterdata-form {
    grid-template-columns: 1fr;
  }

  .access-edit-table {
    display: block;
  }

  .access-edit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .access-edit-table tbody {
    display: grid;
    gap: 0;
  }

  .access-edit-table tr {
    display: grid;
    grid-template-columns: minmax(96px, 0.4fr) minmax(0, 1fr);
  }

  .access-edit-table th,
  .access-edit-table td {
    display: grid;
    align-items: center;
    min-width: 0;
    padding: 10px;
  }

  .access-edit-table tbody th {
    width: auto;
  }

  .access-edit-table select {
    min-width: 0;
  }
}
