:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-strong: #eef3f2;
  --text: #172026;
  --muted: #61717a;
  --border: #d9e1e5;
  --accent: #0f6b57;
  --accent-strong: #0a5545;
  --accent-soft: #e2f3ed;
  --blue: #285b89;
  --amber: #b7791f;
  --amber-soft: #fff4db;
  --red: #b42318;
  --red-soft: #ffe4df;
  --gray-soft: #edf0f2;
  --shadow: 0 10px 24px rgba(23, 32, 38, 0.07);
  --shadow-soft: 0 4px 14px rgba(23, 32, 38, 0.05);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: var(--accent-strong);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.brand {
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.user-chip {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #d8eee7;
  font-size: 13px;
}

.user-chip strong {
  color: #fff;
}

.logout-form {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  justify-self: end;
}

.logout {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d8eee7;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.navrail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.navrail::-webkit-scrollbar {
  display: none;
}

.navrail a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.navrail a.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.page {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 22px 14px 64px;
}

.intro {
  margin: 4px 0 20px;
}

.intro h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
}

.tile-grid {
  display: grid;
  gap: 12px;
}

.home-section {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.home-section h2,
.panel h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.draft-status,
.cart-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #b6e2d1;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.cart-source {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  color: var(--text);
}

.action-tile {
  display: grid;
  gap: 6px;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.action-tile--primary {
  border-color: #b6e2d1;
  background: #f4fbf8;
  box-shadow: var(--shadow);
}

.action-tile--hero {
  min-height: 126px;
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.action-tile span {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 800;
}

.action-tile small,
.muted,
td span {
  color: var(--muted);
}

.action-tile--hero small {
  color: #d8eee7;
}

.login-panel {
  min-height: calc(100vh - 80px);
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.login-panel h1 {
  margin: 0;
  font-size: 42px;
  color: var(--accent-strong);
}

.login-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-panel {
  max-width: 560px;
}

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

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-stack input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}

.auth-fallback {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-fallback summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 800;
}

.auth-fallback[open] summary {
  margin-bottom: 14px;
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
}

.auth-panel > .button {
  justify-content: center;
  width: 100%;
}

.auth-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.auth-panel [data-enrollment-content] {
  display: grid;
  gap: 16px;
}

.auth-panel [data-enrollment-content][hidden],
.auth-panel [hidden] {
  display: none;
}

.helper[data-auth-status] {
  min-height: 24px;
  color: var(--accent-strong);
  font-weight: 700;
}

.login-list {
  display: grid;
  gap: 10px;
}

.login-card {
  margin: 0;
}

.login-card button {
  width: 100%;
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.login-card span {
  font-size: 18px;
  font-weight: 800;
}

.login-card strong,
.login-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

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

.stack {
  display: grid;
  gap: 12px;
}

.form-grid,
.filters {
  display: grid;
  gap: 12px;
}

.filters {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.searchbar input,
.count-input,
.small-input,
.qty-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 16px;
}

.field textarea,
.email-preview {
  resize: vertical;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 107, 87, 0.14);
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: none;
}

.button.warning {
  border-color: #d6a650;
  background: var(--amber-soft);
  color: #7a4d0b;
  box-shadow: none;
}

.button.small {
  min-height: 42px;
  padding: 7px 10px;
  font-size: 14px;
}

.button.wide {
  width: 100%;
}

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

.report-source-grid,
.report-import-list,
.report-activity-list {
  display: grid;
  gap: 12px;
}

.report-source-card {
  min-height: 150px;
  text-decoration: none;
}

.report-guide {
  margin-bottom: 16px;
}

.report-guide h2 {
  margin-top: 10px;
}

.report-guide__steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-guide__steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.report-guide__steps li > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.report-guide__steps li div {
  display: grid;
  gap: 2px;
}

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

.report-guide__scope {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}

.report-source-card strong,
.report-source-card small {
  display: block;
}

.source-chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.report-import-summary {
  display: grid;
  gap: 7px;
  color: var(--text);
  text-decoration: none;
}

.report-summary__counts {
  display: grid;
  gap: 4px;
}

.report-summary__counts span,
.report-activity small {
  color: var(--muted);
}

.report-activity {
  display: grid;
  gap: 9px;
}

.report-activity > div {
  display: grid;
  gap: 2px;
}

.report-activity > div > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.report-activity > div > small {
  overflow-wrap: anywhere;
}

.report-activity p {
  margin: 0;
}

.report-mapping-form {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.form-grid.report-mapping-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.consumption-profile-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.consumption-profile-heading > div,
.consumption-profile-lines {
  display: grid;
  gap: 8px;
}

.consumption-profile-heading small {
  display: block;
  color: var(--muted);
}

.consumption-profile-line {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.consumption-profile-admin-card {
  scroll-margin-top: 18px;
}

.consumption-profile-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-strong);
}

.consumption-profile-preview ul,
.consumption-profile-history {
  margin: 8px 0 0;
}

.consumption-profile-history small {
  display: block;
  color: var(--muted);
}

.status-ready {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-disabled {
  background: var(--surface-strong);
  color: var(--muted);
}

.status-blocked {
  background: var(--red-soft);
  color: var(--red);
}

.report-review-form {
  position: sticky;
  bottom: 72px;
  z-index: 2;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

@media (min-width: 720px) {
  .report-guide__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consumption-profile-line {
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr) auto;
    align-items: end;
  }

  .consumption-profile-preview {
    grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1.4fr);
    align-items: start;
  }

  .report-activity {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
  }

  .report-activity > :first-child,
  .report-activity > .helper-text,
  .report-activity > form {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .report-review-form {
    bottom: 18px;
    max-width: 430px;
  }
}

button[aria-busy="true"] {
  cursor: wait;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.home-overview {
  display: grid;
  gap: 10px;
  margin: 18px 0 6px;
}

.home-next-work {
  display: grid;
  gap: 10px;
  margin: 18px 0 6px;
}

.home-next-work__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.home-next-work__heading h2 {
  margin: 0;
  font-size: 18px;
}

.home-next-work__heading span,
.home-next-work__empty {
  color: var(--muted);
}

.home-next-work__list {
  display: grid;
  gap: 10px;
}

.home-next-work__card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.home-next-work__card strong {
  overflow-wrap: anywhere;
}

.home-next-work__eyebrow,
.home-next-work__card small {
  color: var(--muted);
  font-size: 13px;
}

.home-next-work__action {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.home-next-work__empty {
  margin: 0;
  padding: 14px 15px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.pilot-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #bdd5eb;
  border-radius: var(--radius);
  background: #f5f9fd;
  color: var(--text);
}

.pilot-info span {
  color: var(--muted);
}

.pilot-info a,
.feedback-link a {
  color: var(--accent-strong);
  font-weight: 800;
}

.feedback-link {
  margin: 20px 0 0;
  color: var(--muted);
}

.status-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.status-card span,
.cart-summary span,
.location-card span,
.ongoing-withdrawal span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-card strong {
  font-size: 32px;
  line-height: 1;
}

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

.status-card--ok {
  border-color: #cfe3dc;
}

.status-card--warning {
  border-color: #f2cf8f;
  background: #fffaf0;
}

.status-card--danger {
  border-color: #f0b8b0;
  background: #fff6f4;
}

.status-card--info {
  border-color: #bdd5eb;
  background: #f5f9fd;
}

.location-card,
.cart-summary,
.ongoing-withdrawal {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.location-card {
  margin: -4px 0 14px;
}

.location-card--compact {
  margin-top: 0;
}

.cart-summary {
  margin: 0 0 14px;
  border-color: #b6e2d1;
  background: #f4fbf8;
}

.cart-summary strong,
.location-card strong,
.ongoing-withdrawal strong {
  font-size: 18px;
  line-height: 1.2;
}

.take-choices {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.choice-card {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.choice-card--scan {
  align-content: center;
  border-color: #b6e2d1;
  background: #f4fbf8;
}

.choice-card--search {
  align-content: start;
}

.choice-card span {
  font-size: 22px;
  font-weight: 900;
}

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

.ongoing-withdrawal {
  margin: 0 0 18px;
  text-decoration: none;
}

.ongoing-withdrawal--active {
  border-color: #b6e2d1;
  background: var(--accent-soft);
}

.section-heading {
  margin: 18px 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.quick-actions .button,
.quick-actions form {
  min-width: min(100%, 150px);
}

.quick-actions form .button {
  width: 100%;
}

.list,
.cart-list {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 16px;
}

.item-row,
.cart-line,
.admin-row,
.readonly-row {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.item-row strong,
.cart-line strong,
td strong {
  display: block;
}

.row-action,
.qty-form {
  display: grid;
  grid-template-columns: 88px minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
}

.qty-form {
  grid-template-columns: 42px 1fr 42px auto;
}

.qty-step {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-soft);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 6px 0;
  font-weight: 700;
  cursor: pointer;
}

.empty-action {
  display: grid;
  gap: 12px;
  align-items: start;
}

.stock-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.stock-preview span,
.balance-after {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock-preview strong,
.balance-after strong {
  color: var(--text);
}

.stock-preview--negative,
.balance-after.stock-preview--negative {
  border-color: #f0b8b0;
  background: #fff6f4;
}

.stock-preview--negative strong,
.balance-after.stock-preview--negative strong {
  color: var(--red);
}

.balance-after {
  display: block;
  margin-top: 6px;
}

.submit-panel {
  border-color: #b6e2d1;
}

.process-lock,
.process-note {
  display: grid;
  gap: 10px;
}

.process-note {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #f2cf8f;
  border-radius: var(--radius);
  background: #fffaf0;
}

.process-note span {
  color: var(--muted);
}

.submit-button {
  min-height: 54px;
  background: #067a5b;
  border-color: #067a5b;
  font-size: 17px;
}

.helper-text {
  margin: 10px 0 0;
  color: var(--muted);
}

.readonly-row {
  grid-template-columns: 1fr;
  background: var(--surface-strong);
}

.readonly-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.confirmation-panel {
  margin-bottom: 14px;
}

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

.registered-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.registered-list small {
  display: block;
  color: var(--muted);
}

.registered-list em {
  color: var(--text);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.plain-list li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.fact-grid {
  display: grid;
  gap: 10px;
}

.fact-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.fact-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.hash-line {
  min-width: 0;
}

.hash-line code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status.ok {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status.low {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.critical,
.status.empty {
  background: var(--red-soft);
  color: var(--red);
}

.email-preview {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 260px;
  color: var(--text);
  background: #fff;
}

.empty,
.notice,
.alert {
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.empty {
  border: 1px dashed var(--border);
  color: var(--muted);
  background: var(--surface);
}

.notice {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid #b6e2d1;
}

.alert {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #ffc3ba;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  align-items: end;
}

.admin-row__summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-row__summary > strong {
  font-size: 16px;
}

.admin-row__summary > small {
  flex: 1 1 220px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-user-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
}

.status-badge--muted {
  background: var(--surface-strong);
  color: var(--muted);
}

.check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.qr-grid {
  display: grid;
  gap: 12px;
}

.qr-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.qr-card img {
  width: 120px;
  height: 120px;
}

.qr-card strong,
.qr-card span,
.qr-card small {
  display: block;
}

.qr-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.print-actions {
  margin-bottom: 14px;
}

.transport-create-panel {
  margin-top: 18px;
}

.transport-create-panel h2 {
  margin-top: 0;
}

.transport-create-panel .helper-text {
  margin-top: 0;
}

.transport-facts {
  margin: 18px 0;
}

.transport-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.transport-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.transport-steps li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-strong);
}

.transport-steps li.current {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.transport-steps li.current > span,
.transport-steps li.completed > span {
  background: var(--accent);
  color: #fff;
}

.transport-steps li.completed {
  color: var(--text);
}

.transport-confirmation-card,
.transport-result-card {
  margin: 18px 0;
  border-color: #b6e2d1;
  background: #f4fbf8;
}

.transport-confirmation-card h2,
.transport-result-card h2,
.transport-confirmation-card p,
.transport-result-card p {
  margin: 0;
}

.transport-review-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.transport-review-list li {
  padding: 9px 11px;
  border-radius: var(--radius-small);
  background: #fff;
}

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

.transport-action-form {
  min-width: 190px;
}

.transport-context {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px;
  border: 1px solid #b6e2d1;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.transport-context span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

:is(.transport-quick-panel, [data-voice-session-panel]) {
  margin: 18px 0;
  border-color: #b6e2d1;
}

:is(.transport-quick-panel, [data-voice-session-panel]) h2 {
  margin-top: 0;
}

.transport-draft-explainer {
  margin: 10px 0 14px;
  padding: 11px 13px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.transport-draft-explainer strong {
  display: block;
  color: var(--text);
}

:is(.transport-quick-form, .voice-session-form) {
  display: grid;
  gap: 10px;
}

.transport-command-field {
  display: grid;
  gap: 6px;
}

.transport-command-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.transport-command-field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font-size: 17px;
}

:is(.transport-quick-form, .voice-session-form) .button {
  min-height: 54px;
}

.transport-command-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.voice-command-button--recording {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.voice-command-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.voice-session-feedback {
  display: grid;
  gap: 8px;
}

.voice-session-log {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.voice-session-log li {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  font-size: 13px;
}

.voice-session-log li span {
  color: var(--muted);
}

.voice-session-save-state {
  margin-top: 3px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.voice-session-log__warning .voice-session-save-state {
  color: var(--amber);
}

#transport-lines {
  scroll-margin-top: 82px;
}

.transport-draft-actions {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.transport-draft-line-edit {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.transport-draft-line-edit label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.transport-draft-line-edit input {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  font: inherit;
}

.button.danger {
  border-color: #efb8b2;
  background: var(--red-soft);
  color: var(--red);
}

.voice-session-log__warning {
  background: var(--amber-soft) !important;
}

.voice-session-log__saving {
  background: var(--blue-soft) !important;
}

.voice-session-log__resolved {
  background: var(--accent-soft) !important;
}

.voice-session-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.voice-session-confirmation {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 9px;
  border: 1px solid #b6e2d1;
  border-radius: var(--radius-small);
  background: #fff;
}

.voice-session-confirmation span {
  color: var(--text) !important;
}

.voice-session-confirmation__lines {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.voice-session-confirmation small {
  color: var(--muted);
}

.voice-session-choices .button {
  min-height: 40px;
}

.transport-proposal {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.transport-proposal--ready {
  border-color: #b6e2d1;
  background: #f4fbf8;
}

.transport-proposal--clarify {
  border-color: #f2cf8f;
  background: #fffaf0;
}

.transport-proposal--rejected {
  border-color: #ffc3ba;
  background: var(--red-soft);
}

.transport-proposal h3,
.transport-proposal p {
  margin: 0;
}

.transport-proposal p {
  color: var(--muted);
}

.transport-proposal-list {
  list-style: none;
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.transport-proposal-list li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.transport-proposal-list li:last-child {
  border-bottom: 0;
}

.transport-proposal-list strong {
  white-space: nowrap;
}

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

@media (max-width: 719px) {
  .transport-steps {
    grid-template-columns: 1fr;
  }

  .transport-confirmation-actions .button {
    width: 100%;
  }

  .transport-list-table {
    min-width: 0;
  }

  .transport-list-table th:nth-child(n + 3),
  .transport-list-table td:nth-child(n + 3) {
    display: none;
  }

  .transport-lines-table,
  .transport-lines-table tbody,
  .transport-lines-table tr,
  .transport-lines-table td {
    display: block;
    width: 100%;
  }

  .transport-lines-table {
    min-width: 0;
  }

  .transport-lines-table thead {
    display: none;
  }

  .transport-lines-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .transport-lines-table tr {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .transport-lines-table td {
    display: grid;
    grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }

  .transport-lines-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .transport-lines-table td:first-child {
    display: block;
    padding-top: 14px;
    background: var(--surface-strong);
  }

  .transport-lines-table td:first-child::before {
    display: block;
    margin-bottom: 4px;
  }

  .transport-lines-table td:last-child {
    display: block;
    border-bottom: 0;
  }

  .transport-lines-table td:last-child::before {
    display: block;
    margin-bottom: 7px;
  }

  .transport-lines-table .transport-draft-actions {
    min-width: 0;
  }

  .transport-lines-table .transport-action-form {
    min-width: 0;
  }

  .transport-proposal-actions,
  .transport-proposal-actions form,
  .transport-proposal-actions .button {
    width: 100%;
  }
}

@media (min-width: 720px) {
  :is(.transport-quick-form, .voice-session-form) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
    padding: 14px 24px;
  }

  .user-chip {
    grid-column: auto;
  }

  .logout-form {
    grid-column: auto;
    grid-row: auto;
  }

  .page {
    padding: 28px 24px 72px;
  }

  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-next-work__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .take-choices {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .form-grid,
  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
  }

  .full {
    grid-column: 1 / -1;
  }

  .item-row,
  .cart-line,
  .admin-row {
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
  }

  .admin-row {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  }

  .qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 17px;
  }

  .intro h1 {
    font-size: 29px;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .row-action {
    grid-template-columns: 1fr;
  }

  .qty-form {
    grid-template-columns: 48px minmax(72px, 1fr) 48px;
  }

  .qty-form .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .quick-actions .button,
  .quick-actions form {
    width: 100%;
  }

  .button {
    min-height: 52px;
  }

  .button.small {
    min-height: 46px;
  }

  .action-tile,
  .choice-card {
    min-height: 112px;
  }

  .qr-card {
    grid-template-columns: 92px 1fr;
  }

  .qr-card img {
    width: 92px;
    height: 92px;
  }
}

@media (min-width: 1040px) {
  .tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .qr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .navrail,
  .intro,
  .print-actions {
    display: none;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .qr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8mm;
  }

  .qr-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Operational checks and guided photo evidence -------------------------- */
.operational-start-card,
.operational-result-card,
.operational-completed-card,
.operational-missing,
.operational-check-form,
.photo-evidence,
.deviation-row {
  display: grid;
  gap: 16px;
}

.operational-focus-note {
  margin-bottom: 16px;
}

.operational-focus-note strong,
.operational-focus-note span {
  display: block;
}

.operational-qr-card {
  grid-template-columns: 1fr;
  align-items: start;
}

.operational-qr-card .operational-qr-code {
  display: grid;
  min-width: 0;
  padding: 8px;
  place-items: center;
}

.operational-qr-card .operational-qr-code svg {
  display: block;
  width: min(100%, 228px);
  height: auto;
}

.operational-qr-card__header {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: baseline;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operational-qr-card__header span {
  font-size: 12px;
  font-weight: 900;
}

.operational-qr-card__header strong {
  font-size: 13px;
}

.operational-qr-card__details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.operational-qr-card__details p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.operational-qr-card__details em {
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qr-target-picker__options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

@media print {
  .qr-target-picker {
    display: none;
  }
}

.operational-target-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
}

.operational-target-empty span {
  color: var(--muted);
}

.operational-check-form {
  max-width: 820px;
}

.operational-completed-card .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.operational-completed-card .button-row form {
  margin: 0;
}

.operational-items {
  display: grid;
  gap: 14px;
}

.operational-item {
  min-inline-size: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.operational-item legend {
  max-width: 100%;
  padding: 0 4px;
  font-weight: 800;
}

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

.operational-answer {
  position: relative;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.operational-answer input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.operational-answer:has(input:focus-visible) {
  outline: 3px solid #82b9df;
  outline-offset: 2px;
}

.operational-answer:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.operational-answer--deviation:has(input:checked) {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.operational-comment-wrap {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.operational-comment-wrap[hidden] {
  display: none;
}

.operational-voice-button {
  justify-self: start;
}

.operational-voice-status,
.photo-upload-progress {
  min-height: 1.4em;
  color: var(--muted);
}

.operational-attestation {
  display: grid;
  gap: 8px;
}

.operational-attestation .checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
  line-height: 1.45;
}

.operational-attestation input[type='checkbox'] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.operational-submit {
  width: 100%;
  margin-top: 4px;
}

.operational-result-list,
.operational-list,
.deviation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.operational-result-item,
.operational-list > li,
.deviation-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.operational-result-item > div,
.operational-list a,
.deviation-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.operational-list a {
  flex: 1;
  text-decoration: none;
}

.operational-list a:hover strong,
.operational-list a:focus-visible strong {
  color: var(--accent-strong);
  text-decoration: underline;
}

.operational-result-item p,
.deviation-row p {
  margin: 4px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.deviation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
}

.deviation-row form {
  min-width: 0;
}

.photo-evidence {
  margin-top: 4px;
  padding: 16px;
  border: 1px solid #b6e2d1;
  border-radius: var(--radius);
  background: #f4fbf8;
}

.photo-evidence h2 {
  margin: 0;
  font-size: 19px;
}

.photo-prompt {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #cce9dd;
}

.photo-prompt h3 {
  margin: 0;
  font-size: 16px;
}

.privacy-warning {
  margin: 0;
  color: #795b1a;
  font-size: 13px;
  font-weight: 700;
}

.photo-prompt-status {
  margin: 0;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

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

.photo-evidence-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.photo-evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--gray-soft);
}

.photo-evidence-card figcaption {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}

.photo-purge-form {
  display: grid;
  gap: 6px;
  width: min(100%, 220px);
}

.photo-purge-form .field {
  font-size: 11px;
}

.photo-purge-form input {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 14px;
}

.photo-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.photo-input-label {
  position: relative;
  overflow: hidden;
}

.photo-input-label input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.photo-input-label[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .operational-completed-card .button-row,
  .operational-completed-card .button-row form,
  .operational-completed-card .button-row .button {
    width: 100%;
  }

  .operational-list > li {
    display: grid;
    gap: 6px;
  }

  .operational-list > li > small {
    display: block;
  }

  .operational-answer-options {
    gap: 8px;
  }

  .operational-answer {
    min-height: 64px;
  }

  .deviation-row {
    grid-template-columns: 1fr;
  }

  .photo-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Wireframe-aligned application shell and component system. */

:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-strong: #f0f4f3;
  --surface-hover: #f7faf9;
  --text: #17211f;
  --muted: #5e6e69;
  --border: #dce4e1;
  --border-strong: #cad6d2;
  --accent: #00664f;
  --accent-strong: #004f3e;
  --accent-deep: #003f32;
  --accent-soft: #e6f3ef;
  --blue: #205d94;
  --blue-soft: #e9f2fb;
  --amber: #9b5f0b;
  --amber-soft: #fff2da;
  --red: #b42318;
  --red-soft: #ffebe8;
  --gray-soft: #edf2f0;
  --shadow: 0 12px 30px rgba(16, 44, 36, 0.08);
  --shadow-soft: 0 3px 12px rgba(16, 44, 36, 0.055);
  --radius: 12px;
  --radius-small: 8px;
  --topbar-height: 68px;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 102, 79, 0.22);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  min-height: var(--topbar-height);
  padding: 0;
  background: var(--accent-strong);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 5px 18px rgba(0, 63, 50, 0.18);
}

.topbar__inner {
  width: min(1600px, 100%);
  min-height: var(--topbar-height);
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: inherit;
}

.brand-mark,
.login-brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
}

.brand-mark .icon {
  width: 23px;
  height: 23px;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 4px;
  color: #bddbd2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  grid-column: auto;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: #fff;
}

.user-avatar,
.login-card__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e6f3ef;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.user-details {
  display: grid;
  line-height: 1.15;
}

.user-details small {
  margin-bottom: 3px;
  color: #b9d8cf;
  font-size: 11px;
}

.user-details strong {
  max-width: 290px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form {
  grid-column: auto;
  grid-row: auto;
  margin: 0;
}

.logout {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-small);
  color: #e4f2ee;
  font-weight: 700;
}

.logout .icon {
  width: 18px;
  height: 18px;
}

.app-shell {
  width: min(1600px, 100%);
  min-height: calc(100vh - var(--topbar-height));
  margin: 0 auto;
}

.navrail {
  display: none;
}

.nav-group {
  display: grid;
  gap: 3px;
  margin-bottom: 22px;
}

.nav-group__label {
  padding: 0 12px 6px;
  color: #7a8a85;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #45534f;
  text-decoration: none;
}

.navrail .nav-link {
  min-height: 43px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 680;
}

.navrail .nav-link .icon {
  width: 19px;
  height: 19px;
  color: #687771;
}

.navrail .nav-link.active {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}

.navrail .nav-link.active .icon {
  color: var(--accent);
}

.sidebar-logout {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-logout button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #596863;
  cursor: pointer;
  font-weight: 700;
}

.sidebar-logout .icon {
  width: 19px;
  height: 19px;
}

.mobile-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  padding: 7px max(7px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(16, 44, 36, 0.09);
  backdrop-filter: blur(14px);
}

.mobile-nav .nav-link {
  flex: 1 1 0;
  min-height: 55px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 9px;
  color: #64736e;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.mobile-nav .nav-link .icon {
  width: 23px;
  height: 23px;
}

.mobile-nav .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.page {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px 16px 112px;
}

.intro {
  margin: 2px 0 22px;
}

.intro h1 {
  max-width: 820px;
  margin: 0;
  color: #15201d;
  font-size: clamp(30px, 5.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.intro p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.home-section {
  gap: 13px;
  margin-top: 30px;
}

.workspace-chooser {
  display: grid;
  gap: 15px;
  margin: 28px 0 12px;
}

.workspace-chooser h2 {
  margin: 0;
  color: #27332f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.workspace-grid {
  display: grid;
  gap: 12px;
}

.workspace-card {
  color: var(--text);
}

.workspace-card-form {
  min-width: 0;
  margin: 0;
}

.workspace-card-form--hero {
  grid-column: 1 / -1;
}

.workspace-card-form .workspace-card {
  width: 100%;
  height: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workspace-card--stock .workspace-card__icon {
  background: #e8f2fa;
  color: #2e6798;
}

.workspace-card--planned .workspace-card__icon {
  background: #f0edfb;
  color: #6552a0;
}

.workspace-card--equipment .workspace-card__icon {
  background: #f5eee7;
  color: #7a5737;
}

.workspace-card--followup .workspace-card__icon {
  background: #fff2d9;
  color: #9a5d08;
}

.workspace-card__status {
  grid-column: 1 / -1;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.workspace-card--stock .workspace-card__status {
  color: #2e6798;
}

.workspace-card--followup .workspace-card__status {
  color: #875006;
}

.action-tile--hero .workspace-card__status {
  color: #fff;
}

.feedback-actions {
  margin-top: 20px;
}

.home-help {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.home-help .feedback-actions {
  margin: 0;
}

.action-tile__cta {
  grid-column: 1 / -1;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

.operational-history {
  margin-top: 26px;
}

.operational-history > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 850;
}

.operational-history__content {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.operational-history__content .filters,
.operational-history__content .operational-list {
  margin-bottom: 0;
}

.operational-target-picker .tile-grid {
  grid-template-columns: 1fr;
}

.auth-install-link {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-weight: 800;
}

.install-app {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.install-app .panel,
.install-app .pilot-info {
  margin: 0;
}

.install-app__status {
  display: grid;
  gap: 12px;
  border-color: #b6e2d1;
  background: #f4fbf8;
}

.install-app__status h2,
.install-app__status p {
  margin: 0;
}

.install-app__status p {
  color: var(--muted);
  line-height: 1.5;
}

.install-app__status .button {
  justify-self: start;
}

.install-grid {
  display: grid;
  gap: 14px;
}

.install-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.install-card__platform {
  color: var(--accent-strong);
  font-weight: 900;
}

.install-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.install-card strong {
  color: var(--text);
}

@media (min-width: 720px) {
  .install-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.device-check {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.device-check-privacy {
  margin-bottom: 0;
}

.device-check-summary,
.device-check-card,
.device-check-server,
.device-check-help {
  margin: 0;
}

.device-check-grid {
  display: grid;
  gap: 14px;
}

.device-check-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.device-check-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-check-card h2,
.device-check-server h2,
.device-check-summary h2 {
  margin: 0;
}

.device-check-card p,
.device-check-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.device-check-step {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.device-check-list {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
}

.device-check-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.device-check-list dt {
  font-weight: 750;
}

.device-check-list dd {
  margin: 0;
  text-align: right;
}

.device-check-result,
.device-check-server-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.device-check-result::before,
.device-check-server-state::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #8a9692;
}

.device-check-result.is-ready,
.device-check-server-state.is-ready {
  color: #1b6d50;
}

.device-check-result.is-ready::before,
.device-check-server-state.is-ready::before {
  background: #238562;
}

.device-check-result.is-error,
.device-check-server-state.is-off {
  color: #9b3c35;
}

.device-check-result.is-error::before,
.device-check-server-state.is-off::before {
  background: #c34b42;
}

.device-check-level {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeeb;
}

.device-check-level span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b9a79, #f1b84b);
  transition: width 80ms linear;
}

.device-check-video {
  width: 100%;
  max-height: 340px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: #14201c;
  object-fit: cover;
}

.device-check-help summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 850;
}

.device-check-help ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

.device-check-help li + li {
  margin-top: 8px;
}

.home-section h2,
.panel h2,
.section-heading {
  color: #27332f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-tile {
  position: relative;
  min-width: 0;
  min-height: 154px;
  align-content: start;
  grid-template-columns: 1fr auto;
  gap: 12px 8px;
  padding: 16px;
  overflow: hidden;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.action-tile__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.action-tile__icon .icon {
  width: 23px;
  height: 23px;
}

.action-tile__copy {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.action-tile__copy strong {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.action-tile__copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.action-tile__arrow {
  color: #82908c;
  font-size: 20px;
  line-height: 42px;
}

.action-tile--primary {
  border-color: #b9d9d0;
  background: #f8fcfb;
}

.action-tile--hero {
  grid-column: 1 / -1;
  min-height: 144px;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.action-tile--hero .action-tile__icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.action-tile--hero .action-tile__copy small,
.action-tile--hero .action-tile__arrow {
  color: #c8e0d9;
}

.home-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 8px;
}

.status-card {
  position: relative;
  min-height: 154px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto;
  gap: 4px 10px;
  padding: 15px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: none;
}

.status-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.status-card--warning::before {
  background: #e59a23;
}

.status-card--danger::before {
  background: #d02c24;
}

.status-card--info::before {
  background: #3b77ad;
}

.status-card__icon {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 102, 79, 0.08);
  color: var(--accent);
}

.status-card__icon .icon {
  width: 19px;
  height: 19px;
}

.status-card--warning .status-card__icon {
  background: rgba(229, 154, 35, 0.11);
  color: var(--amber);
}

.status-card--danger .status-card__icon {
  background: rgba(208, 44, 36, 0.09);
  color: var(--red);
}

.status-card--info .status-card__icon {
  background: rgba(59, 119, 173, 0.1);
  color: var(--blue);
}

.status-card .status-card__label {
  grid-column: 1;
  color: #394641;
  font-size: 13px;
}

.status-card strong {
  grid-column: 1;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.status-card small {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--muted);
  font-size: 12px;
}

.status-card .status-card__action {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
  color: var(--accent-strong);
  font-size: 12px;
}

.pilot-info {
  gap: 8px 14px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border-color: #c9ded8;
  border-radius: var(--radius);
  background: #f1f8f6;
  box-shadow: none;
}

.draft-status,
.cart-source {
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 10px;
}

.panel,
.filters,
.item-row,
.cart-line,
.admin-row,
.readonly-row,
.choice-card,
.location-card,
.cart-summary,
.ongoing-withdrawal,
.qr-card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 18px;
}

.stack {
  gap: 14px;
}

.field {
  gap: 7px;
  color: #52615c;
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.searchbar input,
.count-input,
.small-input,
.qty-form input {
  min-height: 48px;
  border-color: var(--border-strong);
  border-radius: 9px;
  background: #fff;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.searchbar input:hover,
.count-input:hover,
.small-input:hover,
.qty-form input:hover {
  border-color: #9eb5ae;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.searchbar input:focus,
.count-input:focus,
.small-input:focus,
.qty-form input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 102, 79, 0.1);
}

.button {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 102, 79, 0.15);
  font-size: 14px;
  font-weight: 800;
}

.button.secondary {
  border-color: var(--border-strong);
  background: #fff;
  color: var(--accent-strong);
}

.button.warning {
  border-color: #e6bc72;
}

.button.small {
  min-height: 40px;
}

.submit-button {
  min-height: 56px;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.filters {
  gap: 12px;
  padding: 16px;
  background: #fff;
}

.table-wrap {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

th {
  padding: 11px 13px;
  background: #edf3f1;
  color: #566560;
  font-size: 11px;
  letter-spacing: 0.035em;
}

td {
  padding: 13px;
  border-color: #e5ebe9;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 6px;
}

.take-choices {
  gap: 10px;
}

.choice-card {
  min-height: 128px;
  padding: 18px;
}

.choice-card--scan {
  border-color: #b9d9d0;
  background: #f7fcfa;
}

.choice-card span {
  color: var(--accent-strong);
  font-size: 21px;
}

.location-card,
.cart-summary,
.ongoing-withdrawal {
  padding: 15px 16px;
}

.cart-summary {
  border-color: #b9d9d0;
  background: #f3faf8;
}

.item-row,
.cart-line,
.admin-row {
  padding: 16px;
}

.qty-step {
  border-color: var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--accent-strong);
}

.readonly-row,
.plain-list li,
.fact-grid div,
.stock-preview {
  border-color: var(--border);
  background: #f5f8f7;
}

.empty,
.notice,
.alert {
  border-radius: var(--radius);
}

.notice,
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notice .icon,
.alert .icon {
  width: 20px;
  height: 20px;
}

.empty {
  padding: 18px;
  border-style: dashed;
  background: #fafcfb;
}

.order-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 24px;
  padding: 0 4px;
}

.order-steps::before {
  content: '';
  position: absolute;
  top: 17px;
  right: 17%;
  left: 17%;
  height: 1px;
  background: var(--border-strong);
}

.order-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #71807b;
  text-decoration: none;
}

.order-step span {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 13px;
  font-weight: 900;
}

.order-step strong {
  font-size: 12px;
}

.order-step.active,
.order-step.completed {
  color: var(--accent-strong);
}

.order-step.active span,
.order-step.completed span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.login-panel {
  min-height: 100vh;
  align-content: center;
  gap: 16px;
  max-width: 700px;
  padding: 32px 16px;
}

.is-guest .topbar {
  display: none;
}

.is-guest .page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(135deg, #f3f8f6 0%, #fff 58%, #edf5f2 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand__mark {
  width: 54px;
  height: 54px;
  border: 0;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 79, 62, 0.2);
}

.login-brand__mark .icon {
  width: 28px;
  height: 28px;
}

.login-brand div {
  display: grid;
  gap: 1px;
}

.login-brand div > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: 38px;
  letter-spacing: -0.04em;
}

.login-list {
  gap: 9px;
  margin-top: 5px;
}

.login-card button {
  min-height: 78px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.login-card__identity {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.login-card__identity b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-card__identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-card em {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.login-card button > .icon {
  width: 18px;
  height: 18px;
  color: #82908c;
  transform: rotate(-90deg);
}

@media (hover: hover) {
  .navrail .nav-link:hover,
  .sidebar-logout button:hover {
    background: var(--surface-strong);
    color: var(--accent-strong);
  }

  .action-tile:hover,
  .workspace-card:hover,
  .status-card:hover,
  .choice-card:hover,
  .ongoing-withdrawal:hover,
  .login-card button:hover {
    border-color: #aac4bc;
    box-shadow: 0 9px 22px rgba(16, 44, 36, 0.09);
    transform: translateY(-1px);
  }

  .button:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
  }

  .button.secondary:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .logout:hover {
    background: rgba(255, 255, 255, 0.09);
  }
}

@media (min-width: 720px) {
  .topbar {
    padding: 0;
  }

  .topbar__inner {
    padding: 0 24px;
  }

  .page {
    padding: 30px 26px 110px;
  }

  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

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

  .operational-target-picker .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-next-work__list {
    grid-template-columns: minmax(0, 720px);
  }

  .action-tile--hero {
    grid-column: auto;
  }

  .home-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .status-card {
    min-height: 165px;
  }

  .take-choices {
    grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  }

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

@media (min-width: 960px) {
  .app-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .navrail {
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 14px 18px;
    border-right: 1px solid var(--border);
    background: #fff;
  }

  .navrail nav {
    display: grid;
  }

  .mobile-nav {
    display: none;
  }

  .topbar-actions > .logout-form {
    display: none;
  }

  .page {
    width: 100%;
    max-width: 1260px;
    padding: 34px 34px 80px;
  }

  .intro h1 {
    font-size: 38px;
  }

  .tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-tile {
    min-height: 158px;
  }
}

@media (min-width: 1280px) {
  .app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }

  .page {
    padding-right: 42px;
    padding-left: 42px;
  }
}

.is-guest .app-shell {
  display: block;
}

.stationing-format-example {
  min-width: 0;
}

.stationing-format-example > div,
.stationing-format-example pre {
  min-width: 0;
  max-width: 100%;
}

.stationing-format-example pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-strong);
}

@media (max-width: 640px) {
  .topbar__inner {
    padding: 0 12px;
  }

  .pilot-info[role='status'] {
    align-items: flex-start;
  }

  .pilot-info[role='status'] > * {
    flex: 1 0 100%;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small,
  .user-details,
  .logout span {
    display: none;
  }

  .topbar-actions {
    gap: 7px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
  }

  .logout {
    width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 5px;
  }

  .page {
    padding-top: 22px;
  }

  .intro h1 {
    font-size: 31px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-tile {
    min-height: 148px;
    padding: 14px;
  }

  .action-tile__copy strong {
    font-size: 16px;
  }

  .action-tile__copy small {
    font-size: 12px;
  }

  .home-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-card {
    min-height: 150px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-actions .button,
  .quick-actions form {
    width: 100%;
  }

  .login-panel {
    padding: 26px 16px;
  }

  .login-card button {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .login-card em {
    display: none;
  }

  .login-card button > .icon {
    display: block;
  }
}

@media (max-width: 360px) {
  .tile-grid,
  .home-overview {
    grid-template-columns: 1fr;
  }

  .action-tile--hero {
    grid-column: auto;
  }
}

@media print {
  .mobile-nav,
  .sidebar-logout {
    display: none;
  }

  .app-shell {
    display: block;
  }
}

/* MPP-01 / A – Trygg överblick. Keep the existing component selectors and
   make the shared contract the final source of their presentation values. */
:root {
  --macc-canvas: #F4F6F7;
  --macc-surface: #FFFFFF;
  --macc-surface-subtle: #F2F9FA;
  --macc-text: #173036;
  --macc-text-muted: #52676D;
  --macc-border: #D7E2E4;
  --macc-control-border: #6B8288;
  --macc-action: #28677D;
  --macc-action-hover: #0B4857;
  --macc-brand-dark: #0B4857;
  --macc-brand-coral: #EF6E59;
  --macc-selected-surface: #E6F1F4;
  --macc-focus: #28677D;
  --macc-success-text: #0F6B57;
  --macc-success-surface: #E2F3ED;
  --macc-warning-text: #7D5413;
  --macc-warning-surface: #FFF4DB;
  --macc-danger-text: #B42318;
  --macc-danger-surface: #FFE4DF;
  --macc-neutral-surface: #EDF0F2;
  --macc-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --macc-body-size: 16px;
  --macc-helper-size: 14px;
  --macc-heading-size: 28px;
  --macc-control-radius: 8px;
  --macc-mobile-target: 48px;
  --bg: var(--macc-canvas);
  --surface: var(--macc-surface);
  --surface-strong: var(--macc-surface-subtle);
  --surface-hover: #F8FBFB;
  --text: var(--macc-text);
  --muted: var(--macc-text-muted);
  --border: var(--macc-border);
  --border-strong: var(--macc-control-border);
  --accent: var(--macc-action);
  --accent-strong: var(--macc-action-hover);
  --accent-deep: var(--macc-brand-dark);
  --accent-soft: var(--macc-selected-surface);
  --blue: var(--macc-action);
  --blue-soft: var(--macc-surface-subtle);
  --amber: var(--macc-warning-text);
  --amber-soft: var(--macc-warning-surface);
  --red: var(--macc-danger-text);
  --red-soft: var(--macc-danger-surface);
  --gray-soft: var(--macc-neutral-surface);
  --shadow: 0 3px 16px rgba(23, 48, 54, 0.045);
  --shadow-soft: 0 3px 16px rgba(23, 48, 54, 0.045);
  --radius: 12px;
  --radius-small: 8px;
  --topbar-height: 76px;
  --macc-nav-width: 240px;
}

html,
body {
  font-family: var(--macc-font-family);
  background: var(--macc-canvas);
  color: var(--macc-text);
}

body {
  font-size: var(--macc-body-size);
  line-height: 1.5;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--macc-focus);
  outline-offset: 3px;
}

.topbar {
  min-height: var(--topbar-height);
  background: var(--macc-surface);
  border-bottom: 1px solid var(--macc-border);
  box-shadow: 0 1px 8px rgba(23, 48, 54, 0.035);
}

.topbar__inner {
  width: min(1440px, 100%);
  min-height: var(--topbar-height);
  padding: 0 28px;
}

.brand {
  gap: 14px;
  color: var(--macc-text);
}

.brand-mark {
  width: 8px;
  height: 32px;
  border: 0;
  border-radius: 3px;
  background: var(--macc-brand-coral);
}

.brand-copy {
  display: flex;
  align-items: center;
  gap: 24px;
  line-height: 1.1;
}

.brand-copy strong {
  color: var(--macc-text);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.brand-copy small {
  position: relative;
  margin: 0;
  color: var(--macc-text);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.brand-copy small::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -13px;
  width: 1px;
  height: 28px;
  background: var(--macc-border);
  transform: translateY(-50%);
}

.workspace-context {
  display: none;
}

.topbar-help {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--macc-action);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.topbar-help .icon {
  width: 18px;
  height: 18px;
}

.topbar-help:hover,
.topbar-help:focus-visible {
  background: var(--macc-selected-surface);
}

.user-chip {
  color: var(--macc-text);
}

.user-avatar {
  background: var(--macc-selected-surface);
  color: var(--macc-brand-dark);
}

.user-details small {
  color: var(--macc-text-muted);
}

.user-details strong {
  color: var(--macc-text);
}

.logout {
  border-color: var(--macc-border);
  color: var(--macc-action);
  background: var(--macc-surface);
}

.logout:hover {
  background: var(--macc-selected-surface);
}

.app-shell {
  width: min(1440px, 100%);
  min-height: calc(100vh - var(--topbar-height));
  background: var(--macc-canvas);
}

.page {
  width: min(1440px, 100%);
  max-width: 1440px;
  padding: 32px 40px 96px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--macc-text-muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--macc-action);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.intro {
  margin: 2px 0 24px;
}

.intro h1 {
  color: var(--macc-text);
  font-size: var(--macc-heading-size);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.intro p,
.helper-text {
  margin-top: 10px;
  color: var(--macc-text-muted);
  font-size: var(--macc-helper-size);
}

.panel,
.filters,
.item-row,
.cart-line,
.admin-row,
.readonly-row,
.choice-card,
.location-card,
.cart-summary,
.ongoing-withdrawal,
.qr-card,
.table-wrap {
  border-color: var(--macc-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 22px;
}

.home-next-work {
  max-width: none;
  margin: 24px 0 30px;
  padding: 22px 26px;
  border: 1px solid var(--macc-brand-dark);
  border-radius: 12px;
  background: var(--macc-brand-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.home-next-work__heading {
  gap: 6px 12px;
}

.home-next-work__heading h2 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-next-work__heading span {
  color: #cfe1e4;
  font-size: 14px;
}

.home-next-work__card {
  max-width: 760px;
  padding: 10px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.home-next-work__card strong {
  color: #fff;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

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

.home-next-work__card small {
  color: #dcebed;
  font-size: 14px;
  font-weight: 400;
}

.home-next-work__action {
  width: fit-content;
  margin-top: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.workspace-chooser {
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--macc-border);
  border-radius: 12px;
  background: var(--macc-surface);
  box-shadow: var(--shadow-soft);
}

.workspace-chooser h2 {
  padding: 18px 20px;
  border-bottom: 1px solid var(--macc-border);
  color: var(--macc-text);
  font-size: 18px;
  font-weight: 650;
}

.workspace-grid {
  gap: 0;
}

.workspace-chooser .action-tile {
  min-height: 112px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 4px 14px;
  padding: 17px 20px;
  border: 0;
  border-bottom: 1px solid var(--macc-border);
  border-radius: 0;
  background: var(--macc-surface);
  box-shadow: none;
}

.workspace-grid > :last-child,
.workspace-grid > :last-child .action-tile {
  border-bottom: 0;
}

.workspace-chooser .action-tile__icon {
  grid-column: 1;
  grid-row: 1 / -1;
  width: 40px;
  height: 40px;
  align-self: start;
  border-radius: 50%;
  background: var(--macc-selected-surface);
  color: var(--macc-action);
}

.workspace-card--stock .workspace-card__icon,
.workspace-card--planned .workspace-card__icon,
.workspace-card--equipment .workspace-card__icon,
.workspace-card--followup .workspace-card__icon {
  background: var(--macc-selected-surface);
  color: var(--macc-action);
}

.workspace-chooser .action-tile__copy {
  grid-column: 2;
  grid-row: 1;
  gap: 3px;
}

.action-tile__copy strong {
  color: var(--macc-text);
  font-size: 16px;
  font-weight: 600;
}

.action-tile__copy small {
  color: var(--macc-text-muted);
  font-size: 14px;
  font-weight: 400;
}

.workspace-chooser .action-tile__arrow {
  grid-column: 3;
  grid-row: 1 / -1;
  align-self: center;
  color: var(--macc-action);
}

.workspace-card__status,
.workspace-card--stock .workspace-card__status,
.workspace-card--followup .workspace-card__status {
  grid-column: 2;
  grid-row: 2;
  color: var(--macc-action);
  font-size: 13px;
  font-weight: 600;
}

.workspace-chooser .action-tile .workspace-card__status {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.workspace-chooser .action-tile--primary {
  background: var(--macc-surface);
}

.workspace-chooser .action-tile--hero {
  background: var(--macc-surface);
}

.workspace-chooser .action-tile--hero .action-tile__copy strong {
  color: var(--macc-text);
}

.workspace-chooser .action-tile--hero .workspace-card__status,
.workspace-chooser .action-tile--hero .action-tile__copy small,
.workspace-chooser .action-tile--hero .action-tile__arrow {
  color: var(--macc-text-muted);
}

.home-help {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--macc-border);
}

.workspace-chooser + .workspace-chooser {
  margin-top: 18px;
}

.panel h2,
.section-heading {
  color: var(--macc-text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.navrail .nav-link,
.nav-help-link,
.sidebar-logout button,
.user-details strong {
  font-weight: 650;
}

@media (hover: hover) {
  .workspace-card:hover,
  .workspace-card-form .workspace-card:hover {
    border-color: transparent;
    background: var(--macc-surface-subtle);
    box-shadow: none;
    transform: none;
  }

  .home-next-work__card:hover .home-next-work__action {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.button {
  min-height: 44px;
  border-color: var(--macc-action);
  border-radius: var(--macc-control-radius);
  background: var(--macc-action);
  color: #fff;
  box-shadow: none;
}

.button:hover {
  border-color: var(--macc-action-hover);
  background: var(--macc-action-hover);
}

.button.secondary {
  border-color: var(--macc-border);
  background: var(--macc-surface);
  color: var(--macc-action);
}

.button.secondary:hover {
  border-color: var(--macc-action);
  background: var(--macc-selected-surface);
}

.field input,
.field select,
.field textarea,
.searchbar input,
.count-input,
.small-input,
.qty-form input {
  min-height: 44px;
  border-color: var(--macc-control-border);
  border-radius: var(--macc-control-radius);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.searchbar input:focus,
.count-input:focus,
.small-input:focus,
.qty-form input:focus {
  border-color: var(--macc-action);
  outline: 3px solid rgba(40, 103, 125, 0.2);
}

.status.ok {
  background: var(--macc-success-surface);
  color: var(--macc-success-text);
}

.status.low {
  background: var(--macc-warning-surface);
  color: var(--macc-warning-text);
}

.status.critical,
.status.empty {
  background: var(--macc-danger-surface);
  color: var(--macc-danger-text);
}

.notice {
  border-color: #B4D8CB;
  background: var(--macc-success-surface);
  color: var(--macc-success-text);
}

.alert {
  border-color: #F2BDB5;
  background: var(--macc-danger-surface);
  color: var(--macc-danger-text);
}

.empty {
  border-color: var(--macc-border);
  background: var(--macc-surface);
  color: var(--macc-text-muted);
}

.table-wrap {
  box-shadow: var(--shadow-soft);
}

th {
  background: var(--macc-surface-subtle);
  color: var(--macc-text-muted);
}

td {
  border-color: var(--macc-border);
}

.navrail {
  background: var(--macc-surface);
  border-right-color: var(--macc-border);
}

.nav-group__label {
  color: var(--macc-text-muted);
}

.navrail .nav-link {
  min-height: 44px;
  border-radius: 8px;
  color: var(--macc-text-muted);
}

.navrail .nav-link .icon {
  color: var(--macc-text-muted);
}

.navrail .nav-link.active {
  background: var(--macc-selected-surface);
  color: var(--macc-brand-dark);
  box-shadow: inset 3px 0 0 var(--macc-action);
}

.navrail .nav-link.active .icon {
  color: var(--macc-action);
}

.navrail .nav-link:hover {
  background: var(--macc-surface-subtle);
  color: var(--macc-brand-dark);
}

.navrail .nav-link--external {
  height: auto;
  align-items: flex-start;
}

.navrail .nav-link--external > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.navrail .nav-link--external strong {
  font-size: 14px;
  font-weight: 750;
}

.navrail .nav-link--external small {
  color: var(--macc-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.nav-group--tools {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--macc-border);
}

.navrail__footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.nav-help-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--macc-text-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-help-link:hover,
.nav-help-link:focus-visible {
  background: var(--macc-surface-subtle);
  color: var(--macc-brand-dark);
}

.nav-help-link .icon {
  width: 19px;
  height: 19px;
}

.sidebar-logout {
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid var(--macc-border);
}

.sidebar-logout button {
  min-height: 44px;
  border-radius: 8px;
  color: var(--macc-text-muted);
}

.sidebar-logout button:hover {
  background: var(--macc-surface-subtle);
  color: var(--macc-brand-dark);
}

.mobile-nav {
  min-height: 72px;
  padding: 7px max(7px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  border-top-color: var(--macc-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(23, 48, 54, 0.09);
}

.mobile-nav__items {
  display: flex;
  width: 100%;
  gap: 4px;
}

.mobile-nav .nav-link,
.mobile-nav-more {
  flex: 1 1 0;
  min-width: 0;
}

.mobile-nav .nav-link {
  min-height: 56px;
  border-radius: 8px;
  color: var(--macc-text-muted);
}

.mobile-nav .nav-link .icon {
  width: 21px;
  height: 21px;
}

.mobile-nav .nav-link.active {
  background: var(--macc-selected-surface);
  color: var(--macc-brand-dark);
}

.mobile-nav-more {
  position: relative;
}

.mobile-nav-more > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-nav-more > summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-more__menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 8px);
  width: min(320px, calc(100vw - 16px));
  max-height: min(70vh, 540px);
  display: grid;
  gap: 2px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--macc-border);
  border-radius: 12px;
  background: var(--macc-surface);
  box-shadow: 0 8px 28px rgba(23, 48, 54, 0.16);
}

.mobile-nav-more__menu .nav-link {
  flex: none;
  min-height: 48px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  text-align: left;
  font-size: 14px;
}

.mobile-nav-more__menu .nav-link span {
  overflow-wrap: anywhere;
}

.mobile-nav-more__menu .nav-link--external > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mobile-nav-more__menu .nav-link--external strong {
  font-size: 14px;
  font-weight: 750;
}

.mobile-nav-more__menu .nav-link--external small {
  color: var(--macc-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

@media (min-width: 960px) {
  .app-shell {
    display: grid;
    grid-template-columns: var(--macc-nav-width) minmax(0, 1fr);
  }

  .navrail {
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 28px 16px 20px;
    border-right: 1px solid var(--macc-border);
  }

  .navrail nav {
    display: grid;
  }

  .mobile-nav {
    display: none;
  }

  .topbar-actions > .logout-form {
    display: none;
  }

  .page {
    width: 100%;
    max-width: 1440px;
    padding: 36px 40px 84px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .home-next-work__list {
    grid-template-columns: minmax(0, 760px);
  }

  .page:has(> .workspace-chooser) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
    gap: 0 22px;
    align-content: start;
  }

  .page:has(> .workspace-chooser) > .breadcrumb,
  .page:has(> .workspace-chooser) > .intro,
  .page:has(> .workspace-chooser) > .notice,
  .page:has(> .workspace-chooser) > .alert,
  .page:has(> .workspace-chooser) > .pilot-info,
  .page:has(> .workspace-chooser) > .home-next-work,
  .page:has(> .workspace-chooser) > .home-help {
    grid-column: 1 / -1;
  }

  .page:has(> .workspace-chooser) > .intro {
    margin-bottom: 0;
  }

  .page > .workspace-chooser:has(#daily-work-title) {
    grid-column: 1;
  }

  .page > .workspace-chooser:has(#other-work-title) {
    grid-column: 2;
    align-self: start;
  }

  .page > .workspace-chooser + .workspace-chooser {
    margin-top: 0;
  }

  .page > .workspace-chooser:has(#other-work-title) .action-tile {
    min-height: 132px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 5px 12px;
    padding: 17px;
  }

  .page > .workspace-chooser:has(#other-work-title) .action-tile__icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 959px) {
  .navrail {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .page {
    width: 100%;
    padding: 24px 16px 112px;
  }

  .page:has(> .workspace-chooser) > .intro {
    margin-bottom: 0;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .button,
  .field input,
  .field select,
  .field textarea,
  .searchbar input,
  .count-input,
  .small-input,
  .qty-form input {
    min-height: var(--macc-mobile-target);
  }
}

@media (max-width: 640px) {
  .topbar__inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .topbar {
    min-height: 64px;
  }

  .topbar-help {
    width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 7px;
  }

  .topbar-help span,
  .user-details {
    display: none;
  }

  .topbar-actions {
    gap: 4px;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .brand-copy small {
    font-size: 13px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
  }

  .logout {
    width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 6px;
  }

  .logout span {
    display: none;
  }

  .page {
    padding: 24px 14px 112px;
  }

  .intro h1 {
    font-size: var(--macc-heading-size);
  }

  .brand-copy small {
    display: block;
  }

  .home-next-work {
    margin-top: 22px;
    padding: 16px;
  }

  .workspace-chooser {
    margin-top: 0;
  }

  .workspace-chooser + .workspace-chooser {
    margin-top: 16px;
  }

  .workspace-chooser h2 {
    font-size: 18px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .workspace-chooser .action-tile {
    min-height: 108px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 15px;
  }

  .workspace-chooser .action-tile--hero {
    min-height: 108px;
  }

  .home-help .feedback-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
