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

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --muted-light: #9ca3af;
  --border: #e5e7eb;
  --border-soft: #f3f4f6;
  --eco: #059669;
  --eco-soft: #d1fae5;
  --warn-text: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --hazard-text: #dc2626;
  --hazard-bg: #fef2f2;
  --hazard-border: #fca5a5;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --dark: #0f172a;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f8f8f6; color: #1a1a1a; line-height: 1.5; }
.hide { display: none !important; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; background: #1a1a1a; color: #fff; }
.nav-brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.5px; }
.nav-user { font-size: 14px; color: #999; }

/* Main */
.main { max-width: 680px; margin: 40px auto; padding: 0 20px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.flash-notice { background: #d1fae5; color: #065f46; }
.flash-alert  { background: #fee2e2; color: #991b1b; }

/* Layout-level flashes float over the page so feedback is visible from any
   scroll position. Inline form errors keep the static .flash styles. */
.flash-stack { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(560px, 92vw); }
.flash-stack .flash { margin: 0; box-shadow: 0 10px 32px rgba(0,0,0,0.22); border: 1px solid rgba(0,0,0,0.06); cursor: pointer; animation: flash-in 0.25s ease; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Uniform stat tiles (report, AI runs) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px 28px; }
.stat-grid .stat-value { font-size: 26px; font-weight: 700; margin-top: 2px; white-space: nowrap; }

/* Job progress timeline */
.timeline { display: flex; align-items: flex-start; gap: 0; margin-top: 10px; }
.timeline-step { flex: 1; text-align: center; position: relative; }
.timeline-step:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: #e5e5e5; }
.timeline-step.done:not(:last-child)::after { background: #059669; }
.timeline-dot { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #eee; color: #999; border: 2px solid #e5e5e5; }
.timeline-step.done .timeline-dot { background: #059669; color: #fff; border-color: #059669; }
.timeline-step.current .timeline-dot { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.timeline-label { font-size: 11px; color: #999; line-height: 1.3; }
.timeline-step.done .timeline-label { color: #065f46; }
.timeline-step.current .timeline-label { color: #92400e; font-weight: 600; }

/* Card */
.card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; border: none; background: #1a1a1a; color: #fff; }
.btn:hover { background: #333; }
.btn-outline { background: transparent; border: 1px solid #1a1a1a; color: #1a1a1a; }
.btn-outline:hover { background: #f0f0f0; }
.btn-green { background: #059669; }
.btn-green:hover { background: #047857; }
.btn[disabled], .btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; text-align: center; padding: 14px; font-size: 16px; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: #1a1a1a; }
.field textarea { min-height: 80px; resize: vertical; }

/* Photo upload */
.photo-upload { border: 2px dashed #ddd; border-radius: 12px; padding: 32px; text-align: center; cursor: pointer; transition: border-color 0.2s; }
.photo-upload:hover { border-color: #1a1a1a; }
.photo-upload input[type=file] { display: none; }
.photo-upload-label { font-size: 15px; color: #888; }
.photo-upload-label strong { color: #1a1a1a; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.photo-previews img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e5e5; }

/* Quote */
.quote-total { font-size: 36px; font-weight: 700; color: #1a1a1a; }
.quote-total span { font-size: 18px; font-weight: 400; color: #888; }
.item-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.item-row:last-child { border-bottom: none; }
.item-name { color: #1a1a1a; }
.item-detail { font-size: 12px; color: #888; }
.item-price { font-weight: 500; color: #1a1a1a; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-hazard { background: #fee2e2; color: #991b1b; }
.badge-notes  { background: #ede9fe; color: #5b21b6; }
.badge-status { background: #f0f0f0; color: #555; text-transform: capitalize; }
.badge-quoted    { background: #fef9c3; color: #854d0e; }
.badge-accepted  { background: #dbeafe; color: #1e40af; }
.badge-scheduled { background: #d1fae5; color: #065f46; }
.badge-completed { background: #f0fdf4; color: #166534; }

/* Job list */
.job-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.job-row:last-child { border-bottom: none; }
.job-address { font-weight: 500; font-size: 15px; }
.job-meta { font-size: 13px; color: #888; margin-top: 2px; }

/* Lightbox */
.lightbox-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.9); z-index:1000; align-items:center; justify-content:center; cursor:zoom-out; }
.lightbox-overlay img { max-width:90vw; max-height:90vh; object-fit:contain; border-radius:4px; }
.photo-thumb { cursor:zoom-in; transition:opacity 0.15s; }
.photo-thumb:hover { opacity:0.85; }

/* Mismatch warning */
.warning-box { background:#fef9c3; border:1px solid #fde047; border-radius:8px; padding:14px 16px; margin-bottom:16px; font-size:14px; color:#713f12; }

/* Modal */
.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:100; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:#fff; border-radius:12px; padding:24px; width:100%; max-width:480px; max-height:90vh; overflow-y:auto; }

/* Disclaimer */
.disclaimer-box { background:#fef9c3; border:1px solid #fde047; border-radius:8px; padding:16px; margin-bottom:4px; }

/* Item remove button */
.btn-remove { background:none; border:none; color:#888; cursor:pointer; font-size:16px; padding:4px 8px; line-height:1; border-radius:4px; }
.btn-remove:hover { color:#991b1b; background:#fee2e2; }

/* Badges */
.badge-manual { background:#dcfce7; color:#166534; }

/* Heading */
h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.text-muted { color: #888; font-size: 14px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.gap { display: flex; gap: 12px; }

/* === analysis progress card === */
.progress-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafaf8 100%);
  border: 1px solid #e5e5e5;
  position: relative;
  overflow: hidden;
}
.progress-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.07) 50%, transparent 100%);
  animation: progress-shimmer 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes progress-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.progress-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #1a1a1a;
}
.progress-phase {
  font-size: 14px;
  margin: 0;
  color: #666;
}
.progress-dots {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  gap: 3px;
}
.progress-dots span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #1a1a1a;
  opacity: 0.25;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.progress-dots span:nth-child(2) { animation-delay: 0.2s; }
.progress-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(1); }
  40%           { opacity: 1;    transform: scale(1.25); }
}

.spinner-arc {
  width: 38px;
  height: 38px;
  position: relative;
  flex-shrink: 0;
}
.spinner-arc span {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
}
.spinner-arc span:nth-child(1) {
  inset: 0;
  border-top-color: #059669;
  animation: spinner-rot 1.2s linear infinite;
}
.spinner-arc span:nth-child(2) {
  inset: 5px;
  border-right-color: #34d399;
  animation: spinner-rot 1.6s linear infinite reverse;
}
.spinner-arc span:nth-child(3) {
  inset: 10px;
  border-bottom-color: #6ee7b7;
  animation: spinner-rot 2.0s linear infinite;
}
@keyframes spinner-rot { to { transform: rotate(360deg); } }

.progress-photos {
  display: flex;
  gap: 12px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.progress-thumb {
  width: 200px;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: #000;
  animation: thumb-pulse 2.4s ease-in-out infinite;
}
.progress-thumb:nth-child(2) { animation-delay: 0.3s; }
.progress-thumb:nth-child(3) { animation-delay: 0.6s; }
.progress-thumb:nth-child(4) { animation-delay: 0.9s; }
.progress-thumb:nth-child(5) { animation-delay: 1.2s; }
@keyframes thumb-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(0.96); }
}

.progress-elapsed {
  font-size: 12px;
  margin: 0;
  color: #999;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* === unified job dashboard === */
.main:has(.dashboard-grid) { max-width: 1320px; }

.dashboard-header { margin: 0 0 20px; }
.dashboard-header-admin { padding-top: 4px; }
.dashboard-header-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.dashboard-h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; flex-shrink: 0; }
.dashboard-header-meta-line { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.back-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--text); }
.badge-locked { background: var(--hazard-text) !important; color: #fff !important; }
.lock-banner { background: var(--hazard-bg); border: 1px solid var(--hazard-border); color: var(--hazard-text); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(300px, 38%) 1fr; gap: 24px; align-items: start; }
@media (max-width: 1023px) { .dashboard-grid { grid-template-columns: 1fr; } }

.dashboard-left { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.dashboard-left::-webkit-scrollbar { width: 6px; }
.dashboard-left::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@media (max-width: 1023px) { .dashboard-left { position: static; max-height: none; } }
.dashboard-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.dashboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.dashboard-toolbar-title { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.weight-toggle { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.weight-toggle:hover { color: var(--text); }
.weight-toggle .active { color: var(--text); }
.weight-toggle-divider { color: var(--muted-light); }

/* Rail cards */
.rail-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.rail-card-dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.rail-card-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.rail-card-eyebrow-light { color: rgba(255,255,255,0.6); }
.rail-card-eyebrow-eco { color: var(--eco); }
.rail-card-muted { color: var(--muted); font-size: 13px; }
.rail-card-footnote { color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.4; }
.rail-step { background: var(--info-soft); color: var(--info); padding: 1px 6px; border-radius: 3px; font-size: 10px; }
.rail-score { background: var(--info-soft); color: var(--info); padding: 1px 6px; border-radius: 3px; font-size: 11px; margin-left: auto; font-weight: 700; }

/* Source imagery */
.source-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.source-photo { width: 146px; height: 92px; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: #000; }

/* uniform media tiles (gallery cards) */
.media-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.media-tile { width: 180px; height: 116px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e5e5; background: #000; }

/* Scale lock */
.scale-lock-name { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.scale-lock-value { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

/* KV rows */
.kv-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--border-soft); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-label { color: var(--muted); }
.kv-value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.kv-value-large { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.kv-unit { color: var(--muted); font-weight: 500; font-size: 12px; }
.kv-confidence { font-weight: 700; font-size: 12px; }
.kv-confidence-high { color: var(--eco); }
.kv-confidence-medium { color: var(--warn-text); }
.kv-confidence-low { color: var(--hazard-text); }
.kv-muted { color: var(--muted-light); }
.kv-total { border-top: 1.5px solid var(--text); border-bottom: none; padding-top: 10px; margin-top: 6px; }

/* Weight & vol audit (dark card) */
.audit-row { display: flex; justify-content: space-between; gap: 12px; }
.audit-tiny-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.audit-figure { font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.audit-unit { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); }

/* Bars */
.bar-row { margin-bottom: 10px; }
.bar-row-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.bar-row-pct { font-weight: 700; color: var(--text); }
.bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.3s ease; }
.bar-good { background: var(--eco); }
.bar-warn { background: var(--warn-border); }
.bar-bad  { background: var(--hazard-text); }

/* Logistics tools */
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { background: var(--info-soft); color: var(--info); padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }

/* Eco impact */
.eco-stat { display: flex; align-items: baseline; gap: 6px; }
.eco-stat-value { font-size: 22px; font-weight: 800; color: var(--eco); }
.eco-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.eco-stat-secondary { font-size: 13px; color: var(--text); margin-top: 6px; }
.eco-stat-pct { font-weight: 700; color: var(--eco); }
.eco-mini { list-style: none; margin: 8px 0 0; padding: 0; font-size: 11px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.eco-mini strong { color: var(--text); }
.eco-mini-hazard strong { color: var(--hazard-text); }

/* Voter cards */
.voter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.voter-card { background: var(--border-soft); border: 1px solid var(--border); border-radius: 6px; padding: 8px 6px; text-align: center; }
.voter-name { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.voter-count { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 2px; }

/* HITL banner */
.hitl-banner { background: var(--warn-bg); border: 2px solid var(--warn-border); border-radius: 12px; padding: 14px 16px; }
.hitl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hitl-title { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 800; color: var(--warn-text); text-transform: uppercase; letter-spacing: 0.04em; }
.hitl-pill { background: var(--warn-border); color: var(--warn-text); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.hitl-sub { font-size: 13px; color: var(--warn-text); font-style: italic; margin: 0 0 12px; }
.hitl-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.hitl-card:last-child { margin-bottom: 0; }
.hitl-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.hitl-item-name { font-weight: 700; font-size: 14px; color: var(--text); }
.hitl-card-tag { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.hitl-card-reason { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.hitl-card-actions { display: flex; gap: 6px; }
.hitl-card-actions form { margin: 0; flex: 1; }
.hitl-card-actions .btn { width: 100%; padding: 7px 10px; font-size: 13px; }
.hitl-btn-yes { background: var(--eco); color: #fff; border: none; }
.hitl-btn-no  { background: var(--card); color: var(--text); border: 1px solid var(--border); }

/* Inventory table */
.inventory-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.inventory-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.inventory-title { font-size: 14px; font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.inventory-counts { display: flex; gap: 6px; }
.badge-soft { background: var(--border-soft); color: var(--muted); padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.badge-soft-blue { background: var(--info-soft); color: var(--info); }

.inventory-table-head, .inventory-row { display: grid; grid-template-columns: 1.6fr 0.7fr 0.7fr 0.9fr 0.9fr auto; align-items: center; gap: 10px; padding: 10px 4px; }
.inventory-card-no-conf .inventory-table-head, .inventory-card-no-conf .inventory-row { grid-template-columns: 1.8fr 0.8fr 0.8fr 1fr auto; }
.inventory-table-head { border-bottom: 1px solid var(--border); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.inventory-row { border-bottom: 1px solid var(--border-soft); }
.inventory-row:last-child { border-bottom: none; }
.inventory-row-hazard { background: var(--hazard-bg); border-left: 3px solid var(--hazard-border); padding-left: 8px; border-radius: 4px; }

.inv-left { display: flex; align-items: center; gap: 10px; }
.count-stepper { display: flex; flex-direction: column; align-items: center; }
.count-stepper .step-btn { width: 18px; height: 14px; background: var(--border-soft); border: 1px solid var(--border); cursor: pointer; font-size: 8px; line-height: 1; padding: 0; color: var(--muted); }
.count-stepper .step-btn:first-child { border-radius: 3px 3px 0 0; }
.count-stepper .step-btn:last-child  { border-radius: 0 0 3px 3px; }
.count-stepper .step-btn:hover { background: var(--border); color: var(--text); }
.count-num { font-size: 16px; font-weight: 700; padding: 2px 0; min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.count-static { font-size: 16px; font-weight: 700; min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

.inv-name-block { min-width: 0; }
.inv-name { font-size: 13px; font-weight: 700; color: var(--text); display: flex; gap: 4px; align-items: center; }
.inv-name svg { flex-shrink: 0; }
.inventory-row-hazard .inv-name { color: var(--hazard-text); }
.inv-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.pill-recycling { background: var(--eco-soft); color: #166534; }
.pill-donation  { background: var(--info-soft); color: #1e40af; }
.pill-landfill  { background: var(--border-soft); color: var(--muted); }
.pill-hazardous { background: var(--hazard-bg); color: var(--hazard-text); }
.pill-default   { background: var(--border-soft); color: var(--muted); }

.inv-material { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.inv-logistics { font-size: 10px; color: var(--muted); }
.inv-logistics-line { font-weight: 600; }
.inv-logistics-dim { color: var(--muted-light); margin-top: 2px; }

.inv-conf { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.inv-conf .bar-track { flex: 1; }
.inv-conf-pct { font-size: 11px; font-weight: 700; color: var(--text); min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

.inv-actions { display: flex; gap: 4px; align-items: center; }
.btn-link { color: var(--info); font-size: 11px; text-decoration: none; padding: 3px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-icon { background: transparent; border: none; color: var(--muted-light); cursor: pointer; padding: 3px 6px; font-size: 13px; line-height: 1; }
.btn-icon:hover { color: var(--hazard-text); }

@media (max-width: 768px) {
  .inventory-table-head { display: none; }
  .inventory-row { grid-template-columns: 1fr; gap: 4px; }
  .inv-conf, .inv-material, .inv-logistics, .inv-cat, .inv-actions { padding-left: 38px; }
}

/* Info / warn cards on right */
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.info-card-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.info-card-prose { font-size: 13px; color: var(--text); line-height: 1.6; margin: 0; }

.warn-card { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 12px 14px; }
.warn-card-soft { background: var(--warn-bg); border: 1px solid var(--warn-border); margin-bottom: 12px; padding: 12px; border-radius: 8px; }
.warn-card-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--warn-text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.warn-card-body { font-size: 13px; color: var(--text); margin: 0; line-height: 1.5; }

.confirm-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; }
.confirm-row input[type=checkbox] { margin-top: 3px; flex-shrink: 0; }
.action-prose { font-size: 14px; margin: 14px 0; }

.icon-hazard, .icon-warn { vertical-align: middle; }

/* Admin assign form */
.admin-assign-form { margin-top: 12px; display: grid; gap: 8px; }
.form-row { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.form-row label { min-width: 60px; color: var(--muted); }
.form-row input, .form-row select { flex: 1; padding: 6px 8px; font-size: 13px; }

/* Dark nav buttons: hover flips to a light pill, so the text must go dark
   (inline color:#fff on the links needs the !important to lose). */
.nav .btn-outline:hover { background: #fff; color: #1a1a1a !important; border-color: #fff !important; }

/* === responsive nav: row on desktop, right-side drawer on mobile === */
.nav { gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-burger { display: none; background: none; border: 1px solid #555; color: #fff; font-size: 20px; border-radius: 8px; padding: 4px 12px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-burger { display: block; margin-left: auto; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 85vw);
    background: #fff; color: #1a1a1a;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 6px; padding: 20px 16px;
    box-shadow: -12px 0 40px rgba(0,0,0,0.25);
    transform: translateX(105%); transition: transform 0.22s ease;
    z-index: 3000; overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links .nav-user { color: #555; padding: 6px 4px 14px; border-bottom: 1px solid #eee; margin-bottom: 6px; font-size: 15px; }
  .nav-links .btn-outline { color: #1a1a1a !important; border-color: #ddd !important; text-align: left; padding: 12px 14px; font-size: 15px; }
  .nav-links .btn-outline:hover { background: #f4f4f4; }
  .nav-links form.button_to { margin-top: auto; }
  .nav-links .nav-signout { width: 100%; background: #dc2626; color: #fff; padding: 12px 14px; font-size: 15px; }
}
