:root {
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-500: #10b981;
  --brand-600: #059669;
  --brand-700: #047857;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.app-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: linear-gradient(180deg, #eef2f6 0%, #f8fafc 120px, #f1f5f9 100%);
  -webkit-font-smoothing: antialiased;
}

.app-root.hidden,
.hidden {
  display: none !important;
}

/* Loading */
.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f6;
  z-index: 100;
}

.app-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.app-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: app-spin 0.7s linear infinite;
}

@keyframes app-spin {
  to { transform: rotate(360deg); }
}

.app-loading-text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.app-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
  flex-shrink: 0;
}

.app-logo svg {
  width: 20px;
  height: 20px;
}

.app-brand-text {
  min-width: 0;
}

.app-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.app-tagline {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.app-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 3px 8px;
  border-radius: 999px;
}

.app-text-btn {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.app-text-btn:hover {
  color: var(--brand-700);
  background: var(--brand-50);
}

.app-icon-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
}

.app-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.app-icon-btn svg {
  width: 18px;
  height: 18px;
}

.app-icon-btn:hover {
  color: var(--brand-700);
  border-color: var(--brand-100);
  background: var(--brand-50);
}

.app-icon-btn-sm {
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
}

/* Toolbar / nav */
.app-toolbar {
  background: transparent;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.app-toolbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 16px 0;
}

.app-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  max-width: 100%;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.tab-btn.active-tab {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Main layout */
.app-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.app-card-compact {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.app-card-form {
  padding: 20px 22px;
}

.app-panel-head {
  margin-bottom: 16px;
}

.app-panel-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-panel-title-row .app-panel-title {
  margin-bottom: 0;
}

.sweep-panel-head {
  margin-bottom: 10px;
}

.sweep-panel-head .app-panel-desc {
  margin-top: 4px;
}

.sweep-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.app-panel-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.app-panel-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.app-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1024px) {
  .app-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.app-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lookup-meta {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 6px;
  line-height: 1.2;
}

.sweep-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.sweep-status:empty {
  display: none;
}

.form-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
}

/* Buttons */
.btn-primary,
.btn-search {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
  transition: transform 0.1s, box-shadow 0.15s;
}

.btn-primary:hover,
.btn-search:hover {
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}

.btn-primary:active,
.btn-search:active {
  transform: translateY(1px);
}

.btn-accent,
.btn-sweep {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25);
}

.btn-accent:hover,
.btn-sweep:hover {
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
}

.btn-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.btn-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* Modal */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.app-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 75vh;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.app-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}

.app-modal-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-modal-body {
  padding: 10px 14px;
  overflow-y: auto;
  flex: 1;
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #1e293b;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.app-toast.is-error {
  background: #dc2626;
}

.presence-toggle {
  accent-color: var(--brand-600);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Kits list in panel */
.kit-list-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.kit-list-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.kit-list-name {
  font-weight: 600;
  color: var(--text);
}

.kit-list-upc {
  font-size: 11px;
  color: var(--text-subtle);
  margin: 2px 0 8px;
  font-family: ui-monospace, monospace;
}

.kit-list-components {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.kit-list-empty {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .app-header-inner {
    padding: 8px 12px;
  }

  .app-tagline {
    display: none;
  }

  .app-badge {
    display: none;
  }

  .app-toolbar-inner {
    padding: 8px 12px 0;
  }

  .app-main {
    padding: 10px 12px 20px;
  }

  .app-nav {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
  }
}


.lookup-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}

.suggestion-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  font-size: 12px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item:focus,
.suggestion-item.suggestion-highlight {
  background: var(--brand-50);
  outline: none;
}

.suggestion-name {
  font-weight: 600;
  color: #0f172a;
}

.suggestion-upc {
  font-size: 10px;
  color: #64748b;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.suggestion-item.is-kit .suggestion-name::after {
  content: ' · Kit';
  font-weight: 500;
  color: var(--brand-600);
  font-size: 10px;
}

.kit-update-link {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-600);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kit-update-link:hover {
  color: var(--brand-700);
}

/* Compact lookup toolbar */
.field-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  line-height: 1;
  margin-bottom: 2px;
}

.field-input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.25;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input-lg {
  padding: 8px 11px;
  font-size: 13px;
}

.field-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Dense results table */
.lookup-results-wrap {
  overflow: auto;
  max-height: calc(100vh - 168px);
}

.results-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.2;
}

.results-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-muted);
}

.results-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 4px 6px;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

.results-table td {
  padding: 2px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.results-table tbody tr:hover {
  background: #f8fafc;
}

.results-table tr.row-active td {
  color: #1e293b;
}

.results-table tr.row-historic td {
  color: #94a3b8;
}

.results-table tr.row-historic .col-item {
  font-style: italic;
}

.results-table tr.group-start td {
  border-top: 1px solid #e2e8f0;
}

.results-table tr.group-start:first-child td {
  border-top: none;
}

.results-table th.col-status,
.results-table td.col-status {
  text-align: right;
  white-space: nowrap;
  word-break: normal;
}

.col-item {
  width: 20%;
  max-width: none;
  overflow: hidden;
}

.col-item-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.col-loc {
  width: 14%;
  max-width: 110px;
  overflow: hidden;
}

.col-loc-main {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-loc-sub {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
}

.results-table th.col-bin,
.results-table td.col-bin {
  width: 17%;
  min-width: 86px;
}

.col-bin .bin-link {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  word-break: keep-all;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-table th.col-kit,
.results-table td.col-kit {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  padding: 2px 0;
  text-align: center;
  overflow: hidden;
  vertical-align: middle;
}

.results-table th.col-kit {
  font-size: 8px;
  letter-spacing: 0;
  padding: 3px 0;
}

.results-table .kit-check,
.results-table .kit-x {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.col-status {
  width: 22%;
  min-width: 108px;
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.25;
  padding-left: 6px;
  padding-right: 6px;
}

.col-status.active {
  color: #16a34a;
  font-weight: 600;
}

.col-tag {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .results-table th.col-kit,
  .results-table td.col-kit {
    width: 1%;
    min-width: 12px;
    max-width: 14px;
    padding: 0 1px;
    box-sizing: border-box;
  }

  .results-table th.col-kit {
    font-size: 0;
    padding: 1px 0;
    line-height: 1;
  }

  .results-table th.col-kit::before {
    content: 'K';
    font-size: 6px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .results-table .kit-check,
  .results-table .kit-x {
    font-size: 9px;
    line-height: 1;
  }

  .results-table th.col-item,
  .results-table td.col-item,
  .col-item {
    width: 3%;
  }

  .col-tag {
    font-size: 9px;
  }

  .results-table th.col-bin,
  .results-table td.col-bin {
    width: 3%;
    min-width: 18px;
  }

  .col-bin .bin-link {
    font-size: 9px;
  }

  .results-table th.col-loc,
  .results-table td.col-loc,
  .col-loc {
    width: 4%;
    max-width: none;
  }

  .col-loc-main {
    font-size: 10px;
  }

  .col-loc-sub {
    font-size: 9px;
  }

  .col-status {
    width: 1%;
    min-width: 100px;
    font-size: 10px;
    text-align: right;
    white-space: nowrap;
    padding-left: 4px;
    padding-right: 4px;
  }

  .results-table th.col-status,
  .results-table td.col-status {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -3px 0 5px -3px rgba(15, 23, 42, 0.1);
  }

  .results-table thead th.col-status {
    z-index: 12;
    background: #f1f5f9;
  }

  .results-table tbody td.col-status {
    background: #fff;
  }

  .results-table tbody tr:hover td.col-status {
    background: #f8fafc;
  }

  .results-table tbody tr.row-historic td.col-status {
    background: #fff;
  }
}

.kit-check,
.kit-x {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.kit-check {
  color: #16a34a;
}

.kit-x {
  color: #dc2626;
  font-weight: 700;
}

.kit-check:hover,
.kit-x:hover {
  opacity: 0.7;
}

.bin-link {
  color: var(--brand-600);
  text-decoration: none;
  cursor: pointer;
}

.bin-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.drilldown-row td {
  padding: 4px 6px 6px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.drilldown-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
}

.drilldown-inner .present {
  color: #15803d;
}

.drilldown-inner .missing {
  color: #dc2626;
}

.empty-results {
  padding: 12px;
  font-size: 12px;
  color: #64748b;
}

.lookup-hero {
  padding: 16px 14px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.lookup-hero-intro {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 14px;
}

.lookup-hero-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-700);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.lookup-hero-subtitle {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.lookup-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto;
}

.lookup-hero-card {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lookup-hero-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lookup-hero-caption {
  padding: 8px 10px 9px;
  border-top: 1px solid #f1f5f9;
}

.lookup-hero-caption strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
}

.lookup-hero-caption span {
  display: block;
  font-size: 10px;
  color: #64748b;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .lookup-hero {
    padding: 12px 10px 14px;
  }

  .lookup-hero-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lookup-hero-title {
    font-size: 14px;
  }
}

/* Compact bin modal */
.bin-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bin-modal-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  color: #64748b;
  padding: 3px 6px;
  border-bottom: 1px solid #e2e8f0;
}

.bin-modal-table td {
  padding: 2px 6px;
  border-bottom: 1px solid #f8fafc;
}

.bin-modal-table tr.historic td {
  color: #94a3b8;
  font-style: italic;
}

/* Room sweep table */
.sweep-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: calc(100vh - 280px);
}

.sweep-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.2;
}

.sweep-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f1f5f9;
}

.sweep-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 4px 6px;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

.sweep-table td {
  padding: 3px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.sweep-table tbody tr:hover {
  background: #f8fafc;
}

.sweep-sort-th {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
}

.sweep-sort-th:hover {
  color: var(--brand-700);
}

.sweep-sort-arrows {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.65;
  font-size: 8px;
  color: #cbd5e1;
}

.sweep-sort-arrows .active {
  color: var(--brand-600);
}

.sweep-sort-th-compact {
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 0 1px;
}

.sweep-sort-th-compact .sweep-sort-arrows {
  margin: 0 auto;
}

.btn-sweep {
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1.25;
  margin-bottom: 1px;
  border: none;
  cursor: pointer;
}

.btn-sweep:hover {
  background: #d97706;
}

.sweep-table .col-item {
  width: 18%;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sweep-table th.col-item,
.sweep-table td.col-item {
  width: 18%;
}

.sweep-table th.col-tag,
.sweep-table td.col-tag {
  width: 40%;
}

.sweep-table th.col-bin,
.sweep-table td.col-bin {
  width: 14%;
  min-width: 86px;
}

.sweep-table .col-qty {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  padding: 2px 1px;
  text-align: center;
  font-size: 11px;
}

.sweep-table .col-in-room {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding: 2px 8px 2px 1px;
  text-align: center;
}

.sweep-table th.col-qty,
.sweep-table th.col-in-room {
  padding: 2px 1px;
  text-align: center;
}

.sweep-table th.col-in-room {
  padding-right: 8px;
}

.sweep-table .col-in-room input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.sweep-table .col-tag {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sweep-table .col-bin {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sweep-empty {
  padding: 12px;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 640px) {
  .sweep-table th,
  .sweep-table td {
    padding: 2px 2px;
  }

  .sweep-table .sweep-sort-th {
    gap: 1px;
    font-size: 9px;
  }

  .sweep-table .sweep-sort-arrows {
    font-size: 7px;
  }

  .sweep-table th.col-item,
  .sweep-table td.col-item {
    width: 24%;
  }

  .sweep-table th.col-tag,
  .sweep-table td.col-tag {
    width: 60%;
  }

  .sweep-table th.col-bin,
  .sweep-table td.col-bin {
    width: 24%;
    min-width: 72px;
  }

  .sweep-table .col-item {
    font-size: 10px;
  }

  .sweep-table .col-tag {
    font-size: 10px;
  }

  .sweep-table .col-bin {
    font-size: 10px;
    white-space: nowrap;
    word-break: keep-all;
  }

  .sweep-table .col-qty {
    width: 14px;
    min-width: 14px;
    max-width: 14px;
    padding: 2px 0;
    font-size: 10px;
  }

  .sweep-table .col-in-room {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    padding: 2px 6px 2px 0;
  }

  .sweep-table th.col-in-room {
    padding-right: 6px;
  }

  .sweep-table .col-in-room input {
    width: 13px;
    height: 13px;
  }
}
