/* QuickProcessing — Dark warehouse theme, large touch targets */

:root {
  --bg: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #0f3460;
  --text: #e8e8e8;
  --text-muted: #8b8fa3;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --secondary: #475569;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --grade-a: #22c55e;
  --grade-b: #3b82f6;
  --grade-c: #f59e0b;
  --grade-scrap: #ef4444;
  --border: #334155;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */

.navbar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  gap: 2rem;
}

.nav-brand { font-size: 1.1rem; white-space: nowrap; }

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-input);
  color: var(--text);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-username { color: var(--text-muted); font-size: 0.85rem; }
.nav-logout { color: var(--danger) !important; }

/* ── Container ──────────────────────────────────────────────────────────── */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.form-group-btn {
  justify-content: flex-end;
  flex: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus {
  border-color: var(--primary);
}

.input-sm { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.input-md { padding: 0.6rem 0.8rem; font-size: 1rem; }
.input-lg { padding: 0.8rem 1rem; font-size: 1.1rem; }
.input-xl { padding: 1rem 1.2rem; font-size: 1.4rem; font-family: monospace; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  color: white;
  background: var(--secondary);
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-xl { padding: 1rem 1.5rem; font-size: 1.3rem; min-height: 60px; }

/* ── Grade buttons ──────────────────────────────────────────────────────── */

.grade-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn-grade {
  padding: 1.2rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border: 3px solid transparent;
  min-height: 70px;
}

.btn-grade.selected { border-color: white; transform: scale(1.03); }

.grade-a { background: var(--grade-a); }
.grade-b { background: var(--grade-b); }
.grade-c { background: var(--grade-c); color: #000; }
.grade-scrap { background: var(--grade-scrap); }

.grade-key {
  display: inline-block;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  margin-right: 0.3rem;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.table th, .table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--bg-card);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.table tr:hover { background: rgba(59, 130, 246, 0.05); }
.row-highlight { background: rgba(245, 158, 11, 0.1) !important; }

.mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.text-lg { font-size: 1.1rem; }
.text-center { text-align: center; }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-lg { font-size: 0.85rem; padding: 0.3rem 0.8rem; }

.grade-a, .badge.grade-a { background: var(--grade-a); color: white; }
.grade-b, .badge.grade-b { background: var(--grade-b); color: white; }
.grade-c, .badge.grade-c { background: var(--grade-c); color: #000; }
.grade-scrap, .badge.grade-scrap { background: var(--grade-scrap); color: white; }

.status-open { background: var(--success); color: white; }
.status-closed { background: var(--secondary); color: white; }
.status-ready { background: var(--success); color: white; }
.status-needs-review, .status-needs_review { background: var(--warning); color: #000; }
.status-audit-required, .status-audit_required { background: #a855f7; color: white; }
.status-audit-passed, .status-audit_passed { background: var(--success); color: white; }
.status-audit-failed, .status-audit_failed { background: var(--danger); color: white; }
.status-scanned { background: var(--secondary); color: white; }

/* ── Stats ───────────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.stat-value { font-size: 2rem; font-weight: 700; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }

.grade-a-bg { border-color: var(--grade-a); }
.grade-b-bg { border-color: var(--grade-b); }
.grade-c-bg { border-color: var(--grade-c); }
.grade-scrap-bg { border-color: var(--grade-scrap); }

/* ── Page header ────────────────────────────────────────────────────────── */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 { font-size: 1.6rem; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.3rem; }

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-stats {
  display: flex;
  gap: 0.5rem;
}

/* ── Scan page ──────────────────────────────────────────────────────────── */

.scan-page { max-width: 900px; margin: 0 auto; }

.scan-header { margin-bottom: 1.5rem; }
.scan-header h1 { margin-bottom: 1rem; }

.scan-input-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.scan-feedback {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 500;
}

.scan-feedback.success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--success); }
.scan-feedback.warning { background: rgba(245, 158, 11, 0.15); border: 1px solid var(--warning); }
.scan-feedback.error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); }

/* ── Review cards ───────────────────────────────────────────────────────── */

.review-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */

.alert {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid var(--warning); }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--success); }

/* ── Filters ────────────────────────────────────────────────────────────── */

.filters {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.filter-form .form-row { flex-wrap: wrap; }

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.pagination-info { color: var(--text-muted); font-size: 0.9rem; }

/* ── Dropdown ───────────────────────────────────────────────────────────── */

.dropdown { position: relative; display: inline-block; }

.dropdown-toggle::after {
  content: ' \25BC';
  font-size: 0.7rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 120px;
  z-index: 100;
  margin-top: 2px;
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-item:hover { background: var(--bg-input); }

/* ── Modal ──────────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
}

.modal-content h2 { margin-bottom: 1.5rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Login ──────────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  width: 90%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.login-header p { color: var(--text-muted); }

.login-form .form-group { margin-bottom: 1rem; }
.login-form .btn { margin-top: 0.5rem; }

/* ── Empty state ────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state h2 { margin-bottom: 0.5rem; color: var(--text); }

/* ── Links ──────────────────────────────────────────────────────────────── */

.link { color: var(--primary); text-decoration: none; }
.link:hover { text-decoration: underline; }

.actions { display: flex; gap: 0.5rem; align-items: center; }

/* ── Batch Progress Bar ─────────────────────────────────────────────────── */

.batch-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.batch-progress-bar-container {
  flex: 1;
  height: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.batch-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  transition: width 0.3s ease, background 0.3s ease;
}

.batch-progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
  min-width: 60px;
  text-align: right;
}

/* ── Auto-Print Toggle ─────────────────────────────────────────────────── */

.auto-print-toggle {
  margin-top: 0.75rem;
  text-align: center;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toggle-label input[type="checkbox"] {
  width: 40px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--secondary);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
  border: none;
  padding: 0;
}

.toggle-label input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-label input[type="checkbox"]:checked {
  background: var(--success);
}

.toggle-label input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

/* ── Label Preview ─────────────────────────────────────────────────────── */

.label-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin: 1rem 0;
}

.label-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.label-preview-img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}

/* ── Scan Actions Row ──────────────────────────────────────────────────── */

.scan-actions-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .nav-links { order: 3; width: 100%; }

  .grade-buttons { grid-template-columns: repeat(2, 1fr); }

  .form-row { flex-direction: column; }

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

  .table { font-size: 0.85rem; }
  .table th, .table td { padding: 0.4rem; }
}

/* ── Sidebar Layout ────────────────────────────────────────────────────── */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #0d1117;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand small {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.sidebar-nav {
  padding: 0.75rem 0;
  flex: 1;
}

.sidebar-section {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}

.sidebar-link .icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.sidebar-session {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.sidebar-session-item .value {
  color: var(--text);
  font-weight: 500;
}

.sidebar-session-change {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.25rem;
}

.sidebar-session-change:hover {
  text-decoration: underline;
}

.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

.main-content .container {
  max-width: 1200px;
}

/* ── Dashboard Page ────────────────────────────────────────────────────── */

.dashboard-page {
  padding-top: 0.5rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.hero-card-value {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.hero-card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-card.primary { border-top: 3px solid var(--primary); }
.hero-card.success { border-top: 3px solid var(--success); }
.hero-card.warning { border-top: 3px solid var(--warning); }
.hero-card.danger { border-top: 3px solid var(--danger); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.dash-card-title {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Checklist ────────────────────────────────────────────────────────── */

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checklist-item.done {
  color: var(--success);
  text-decoration: line-through;
  opacity: 0.7;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
}

/* ── Activity Feed ─────────────────────────────────────────────────────── */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
  font-size: 0.85rem;
}

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

.activity-time {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.8rem;
  min-width: 60px;
}

.activity-text {
  color: var(--text);
}

/* ── Manifest Page ─────────────────────────────────────────────────────── */

.manifest-page {
  max-width: 1000px;
}

.lookup-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.order-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: none;
}

.order-preview.visible { display: block; }

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-summary-item {
  text-align: center;
}

.order-summary-item .value {
  font-size: 1.5rem;
  font-weight: 700;
}

.order-summary-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.line-items-table {
  max-height: 300px;
  overflow-y: auto;
  margin: 1rem 0;
}

.receive-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.label-batch-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: none;
}

.label-batch-preview.visible { display: block; }

.label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.label-grid-item {
  background: white;
  border-radius: 4px;
  padding: 0.25rem;
}

.label-grid-item img {
  width: 100%;
  display: block;
}

/* ── Process Page ──────────────────────────────────────────────────────── */

.process-page {
  max-width: 900px;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.process-left, .process-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.process-card h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.pid-uid-input {
  font-size: 1.6rem;
  font-family: monospace;
  padding: 1rem 1.2rem;
  text-align: center;
  text-transform: uppercase;
}

.pallet-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pallet-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pallet-info-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pallet-info-item .value {
  font-size: 0.95rem;
  font-weight: 500;
}

.process-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.grade-buttons-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.grade-buttons-compact .btn-grade {
  padding: 0.8rem 0.3rem;
  font-size: 1rem;
  min-height: 55px;
}

/* ── Session Prompt Modal ──────────────────────────────────────────────── */

.session-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.session-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 90%;
  max-width: 480px;
  text-align: center;
}

.session-modal-content h2 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.session-modal-content .subtitle {
  margin-bottom: 2rem;
}

.session-modal-content .form-group {
  text-align: left;
  margin-bottom: 1.25rem;
}

.session-modal-content select {
  width: 100%;
}

.session-modal-content .btn {
  margin-top: 1rem;
}

/* ── Pallets Table ─────────────────────────────────────────────────────── */

.status-receiving { background: var(--primary); color: white; }
.status-received { background: var(--success); color: white; }
.status-processing { background: #a855f7; color: white; }
.status-complete { background: var(--secondary); color: white; }

/* ── Responsive Sidebar ────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }
  .main-content {
    margin-left: 200px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -240px;
    transition: left 0.3s ease;
    width: 240px;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    margin-left: 0;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .order-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-toggle {
    display: block;
  }
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* ── Received Pallets List ─────────────────────────────────────────────── */

.pallets-list {
  margin-top: 1.5rem;
}

.pallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pallet-card-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.pallet-card-id {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
}

.pallet-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pallet-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
