:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --text: #17211f;
  --muted: #66736f;
  --line: #d9e1dc;
  --primary: #0f766e;
  --primary-strong: #0b5f59;
  --accent: #f59e0b;
  --danger: #b42318;
  --success: #15803d;
  --warning: #b45309;
  --shadow: 0 12px 28px rgba(19, 34, 31, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 250px;
  background: #102421;
  color: #eef8f5;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-logo-mark {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #b8c9c5;
  font-size: 12px;
  margin-top: 2px;
}

.install-button {
  min-height: 32px;
  border: 1px solid rgba(153, 213, 207, 0.48);
  border-radius: var(--radius);
  background: rgba(224, 242, 241, 0.1);
  color: #dff7f3;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.install-button:hover,
.install-button:focus-visible {
  background: #e0f2f1;
  color: var(--primary);
}

.install-button:focus-visible {
  outline: 2px solid rgba(153, 213, 207, 0.5);
  outline-offset: 2px;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: #dce9e5;
}

.sidebar nav a span {
  width: 24px;
  text-align: center;
  color: #9dd5cd;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: #1d3834;
  color: #fff;
}

.app-shell {
  margin-left: 250px;
  padding: 22px;
  max-width: 1260px;
}

.app-shell-wide {
  max-width: none;
}

.minimal-page .sidebar,
.minimal-page .topbar {
  display: none;
}

.app-shell-minimal {
  width: min(100%, 760px);
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 20px;
}

.minimal-page .panel-section {
  margin-bottom: 0;
}

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

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0 0 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

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

.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px;
  box-shadow: var(--shadow);
}

.header-userbox {
  flex: 0 0 auto;
  max-width: 220px;
  background: rgba(224, 242, 241, 0.08);
  border-color: rgba(153, 213, 207, 0.28);
  color: #eef8f5;
  box-shadow: none;
  padding: 5px;
}

.header-userbox small {
  color: #b8c9c5;
}

.header-userbox .avatar {
  width: 34px;
  height: 34px;
}

.header-userbox .icon-button {
  flex: 0 0 auto;
  background: rgba(224, 242, 241, 0.08);
  border-color: rgba(153, 213, 207, 0.28);
  color: #eef8f5;
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.userbox strong,
.userbox small {
  display: block;
  line-height: 1.2;
}

.userbox small {
  color: var(--muted);
  text-transform: capitalize;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dae7e3;
  color: #0f3f3a;
  font-weight: 800;
}

.avatar-photo {
  object-fit: cover;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dcefe8;
  color: #075e48;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill.offline,
.badge.danger {
  background: #fee4e2;
  color: var(--danger);
}

.badge.success {
  background: #dcfce7;
  color: var(--success);
}

.badge.warning {
  background: #fef3c7;
  color: var(--warning);
}

.notice {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.notice.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.stock-alert {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 16px;
}

.stock-alert h2 {
  color: var(--danger);
  margin-bottom: 4px;
}

.stock-alert p {
  color: #7f1d1d;
  margin-bottom: 8px;
}

.stock-alert ul {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stock-alert li {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-alert li span {
  color: #7f1d1d;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric-card {
  min-height: 104px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 24px;
  line-height: 1;
}

.metric-card.success {
  border-left: 4px solid var(--success);
}

.metric-card.warning {
  border-left: 4px solid var(--accent);
}

.metric-card.danger {
  border-left: 4px solid var(--danger);
}

.panel-section {
  margin-bottom: 18px;
}

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

.section-actions,
.actions,
.detail-actions,
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

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

.section-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.section-tabs a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.section-tabs a.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

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

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

td small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

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

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

.filters,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.cash-filters {
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(110px, 0.8fr)
    minmax(150px, 1.15fr)
    minmax(150px, 1.1fr)
    minmax(130px, 0.9fr)
    minmax(130px, 0.9fr)
    minmax(110px, 0.75fr)
    minmax(110px, 0.75fr);
  gap: 10px;
}

.cash-filters .field,
.cash-filters .secondary-button,
.cash-filters .ghost-button {
  min-width: 0;
}

.cash-filters .secondary-button,
.cash-filters .ghost-button {
  min-height: 42px;
}

.compact-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.field,
.reschedule-form label {
  display: grid;
  gap: 5px;
}

.field span,
.field > label,
.reschedule-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field .label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.field .help-dot {
  width: 18px;
  height: 18px;
  border: 1px solid #99d5cf;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e0f2f1;
  color: var(--primary);
  cursor: help;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.form-help {
  color: var(--muted);
  background: #f1f5f3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 0;
}

.collector-pay-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.collector-round-button {
  grid-column: 1 / -1;
}

.profile-photo-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card-upload-panel p {
  color: var(--muted);
  margin: 4px 0 0;
}

.card-ocr-controls {
  display: flex;
  justify-content: flex-start;
}

.ocr-model-field {
  width: min(260px, 100%);
  margin: 0;
}

.ocr-model-field select {
  min-height: 42px;
}

.profile-photo-panel p {
  color: var(--muted);
  margin: 3px 0 0;
}

.profile-avatar-photo,
.profile-avatar-placeholder {
  width: 78px;
  height: 78px;
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.profile-avatar-photo {
  object-fit: cover;
  border: 1px solid var(--line);
}

.profile-avatar-placeholder {
  display: grid;
  place-items: center;
  background: #dae7e3;
  color: #0f3f3a;
  font-size: 28px;
  font-weight: 900;
}

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

.check-row input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd7d2;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  min-height: 42px;
}

textarea {
  resize: vertical;
  max-height: 220px;
}

input[readonly] {
  background: #f1f5f3;
  color: var(--muted);
  cursor: default;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.24);
  border-color: var(--primary);
}

.password-input-wrap {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  width: 46px;
  border: 0;
  border-left: 1px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent;
  color: #405854;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f1f5f3;
  color: #102421;
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.24);
  outline-offset: -2px;
}

.password-toggle.is-visible {
  color: var(--primary);
}

.password-eye {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.password-eye-visible {
  display: none;
}

.password-toggle.is-visible .password-eye-hidden {
  display: none;
}

.password-toggle.is-visible .password-eye-visible {
  display: block;
}

.span-2 {
  grid-column: span 2;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.mini-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 800;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.secondary-button {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #8a3d05;
}

.secondary-button.is-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.ghost-button {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.danger-button {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.mini-button {
  min-height: 30px;
  padding: 5px 8px;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
  font-size: 13px;
}

.danger-mini {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.table-action-form {
  margin: 0;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.detail-actions {
  justify-content: flex-end;
}

.confirm-box,
.danger-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.danger-note {
  color: var(--danger);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.choice-card {
  min-height: 148px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: #99d5cf;
  outline: 2px solid rgba(15, 118, 110, 0.16);
}

.choice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #e0f2f1;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.choice-card strong {
  font-size: 17px;
}

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

.scanner-panel {
  display: grid;
  gap: 14px;
}

.scanner-camera {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #102421;
  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.scanner-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-frame {
  position: absolute;
  inset: 28% 12%;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.36);
}

.scanner-frame::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: #ef4444;
  transform: translateY(-50%);
}

.scanner-status {
  margin: 0;
  color: var(--muted);
  background: #f1f5f3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 700;
}

.scanner-status.danger {
  color: var(--danger);
  background: #fff1f2;
  border-color: #fecdd3;
}

.scanner-status.success {
  color: var(--success);
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.scanner-actions {
  align-items: stretch;
}

.scan-manual-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scan-manual-form .field {
  min-width: 0;
}

.scan-manual-form .secondary-button {
  min-height: 42px;
  padding-inline: 14px;
}

.detail-header p,
.collection-main p,
.notes {
  color: var(--muted);
  margin-bottom: 0;
}

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

.collection-list {
  display: grid;
  gap: 12px;
}

.collection-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.collection-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 12px;
}

.collection-money {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.collection-money strong {
  font-size: 24px;
}

.quick-actions,
.reschedule-form,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.quick-actions form {
  margin: 0;
}

.reschedule-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.reschedule-form label {
  min-width: 170px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 20px;
  background: #102421;
}

.login-shell {
  width: calc(100vw - 40px);
  max-width: 440px;
}

.login-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.login-brand {
  margin-bottom: 20px;
}

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

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

.login-form .span-2 {
  grid-column: 1;
}

.login-help {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 920px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 10px;
  }

  .brand {
    flex: 1 1 190px;
  }

  .header-userbox {
    max-width: 190px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .sidebar nav a {
    flex: 0 0 auto;
  }

  .app-shell {
    margin-left: 0;
    padding: 14px;
  }

  .minimal-page .app-shell-minimal {
    margin: 0 auto;
    padding: 14px 20px;
  }

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

  .cash-filters .secondary-button,
  .cash-filters .ghost-button {
    width: 100%;
  }

  .topbar,
  .detail-header,
  .collection-main {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-actions,
  .collection-money {
    justify-items: start;
    justify-content: start;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .header-userbox {
    max-width: 170px;
  }

  .header-userbox .user-profile-link > span {
    max-width: 76px;
    overflow: hidden;
  }

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

  .filters,
  .form-grid,
  .compact-form,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .card-upload-panel {
    grid-template-columns: 1fr;
  }

  .collector-pay-panel {
    grid-template-columns: 1fr;
  }

  .product-filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .product-filters .field {
    grid-column: span 2;
    min-width: 0;
  }

  .product-filters .field span {
    font-size: 12px;
  }

  .product-filters select {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 14px;
  }

  .product-filters .secondary-button,
  .product-filters .ghost-button {
    grid-column: span 3;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

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

  .cash-filters .field {
    min-width: 0;
  }

  .cash-filters .secondary-button,
  .cash-filters .ghost-button {
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .span-2 {
    grid-column: span 1;
  }

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

  .metric-card {
    min-height: 96px;
  }

  .metric-card strong {
    font-size: 20px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions,
  .product-section-actions {
    width: 100%;
  }

  .product-section-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-section-actions .primary-button,
  .product-section-actions .secondary-button {
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .stock-alert {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

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

  .scanner-actions .primary-button,
  .scanner-actions .secondary-button,
  .scanner-actions .ghost-button {
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .scan-manual-form {
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  }

  .scan-manual-form .secondary-button {
    width: auto;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .quick-actions > *,
  .quick-actions form,
  .quick-actions button,
  .quick-actions a,
  .reschedule-form > * {
    width: 100%;
  }
}
