:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --fg: #181d26;
  --muted: rgba(4,14,32,0.69);
  --border: #e0e2e6;
  --accent: #1b61c9;
  --accent-light: #e8f0fe;
  --success: #006400;
  --success-light: #e6f4ea;
  --warn: #b85c00;
  --warn-light: #fef7e0;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

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

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.08px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- TOOLBAR --- */
.toolbar {
  height: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  flex-shrink: 0;
}
.toolbar-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.toolbar-sep { width:1px; height:24px; background:var(--border); }
.toolbar-order { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.toolbar-order strong { color: var(--fg); }
.toolbar-addr {
  font-size: 12px; color: var(--muted); letter-spacing: 0.01em;
  max-width: 400px;
}
.toolbar-scan {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 12px;
  transition: border-color 0.2s;
}
.toolbar-scan:focus-within { border-color: var(--accent); }
.toolbar-scan input {
  border: none; background: none; outline: none;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.03em;
  width: 180px; color: var(--fg);
}
.toolbar-scan input::placeholder { font-family: var(--font); font-size: 12px; color: var(--muted); }
.toolbar-scan button {
  padding: 5px 14px; background: var(--accent); color: #fff;
  border: none; border-radius: 4px; font-size: 12px; font-weight: 500;
  letter-spacing: 0.02em; cursor: pointer;
}

/* --- MAIN THREE-COLUMN --- */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* --- SOURCE PANEL (fixed left) --- */
.source-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.source-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.source-header h3 {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--fg);
}
.source-header .count {
  font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em; line-height: 1;
  color: var(--fg);
}
.source-header .sub {
  font-size: 11px; color: var(--muted); letter-spacing: 0.02em; margin-top: 2px;
}
.source-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s;
}
.source-panel.drop-target {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(45,127,249,0.28);
}
.source-panel.drop-target .source-body {
  background: var(--accent-light);
}
.source-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.source-footer button:disabled {
  opacity: 0.4; cursor: not-allowed;
}

/* --- SOURCE PANEL SUCCESS STATE --- */
.source-success-banner {
  padding: 20px 14px;
  text-align: center;
  background: var(--success-light);
  border-radius: var(--radius);
  margin: 8px;
}
.source-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}
.source-success-banner h3 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--success);
  margin-bottom: 4px;
}
.source-success-banner .success-sub {
  font-size: 13px; color: var(--muted); letter-spacing: 0.01em;
  margin-bottom: 16px;
  line-height: 1.4;
}
.source-success-banner .success-stats {
  font-size: 12px; color: var(--muted); letter-spacing: 0.02em;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.source-success-banner .success-stats strong {
  color: var(--success);
  font-size: 16px;
  font-weight: 700;
}
.source-success-banner button {
  padding: 10px 24px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  width: 100%;
}
.source-success-banner button:hover {
  opacity: 0.9;
}

/* --- BOXES AREA (flex center) --- */
.boxes-area {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 16px;
  overflow-x: scroll;
  overflow-y: hidden;
  position: relative;
  scrollbar-gutter: stable;
}
.boxes-area::-webkit-scrollbar { height: 6px; }
.boxes-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* --- BOX COLUMN --- */
.box-column {
  flex: 1 1 0;
  min-width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.box-column.current-box {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: rgba(45,127,249,0.2) 0px 2px 12px;
}
.box-column.complete-box {
  opacity: 0.7;
  cursor: default;
}
.box-column.drop-target {
  border-color: var(--accent);
  box-shadow: rgba(45,127,249,0.35) 0px 2px 16px;
}
.box-column.drop-target .box-body {
  background: var(--accent-light);
}

.box-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.box-title-row {
  display: flex; align-items: baseline; gap: 8px;
  padding-right: 48px;
}
.box-number {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--fg); line-height: 1;
}
.box-type {
  font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted); flex: 1; line-height: 1.2;
}
.box-type-select {
  font-family: var(--font);
  font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg); flex: 1; line-height: 1.2;
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 28px 2px 6px; cursor: pointer;
  outline: none;
  min-width: 0;
  border-radius: var(--radius-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 14px 14px;
  -webkit-appearance: none; appearance: none;
}
.box-type-select:hover {
  border-color: var(--border);
  background-color: rgba(0,0,0,0.04);
}
.box-type-select:focus {
  border-color: var(--accent);
  background-color: var(--accent-light);
}
.box-qty-large {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--fg); line-height: 1;
  min-width: 1.8em; text-align: right;
}
.box-header .box-sub {
  font-size: 11px; color: var(--muted); letter-spacing: 0.02em; margin-top: 4px;
}
.box-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s;
}
.box-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.box-footer button {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  cursor: pointer; color: var(--fg);
}
.box-footer button:hover { background: var(--surface); }
.box-footer button.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.box-footer button.primary:hover { opacity: 0.9; }

/* --- ITEM CARD --- */
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: grab;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.item-card:active { cursor: grabbing; }
.item-card:hover { background: var(--bg); border-color: var(--accent); }
.item-card.selected { border-color: var(--accent); background: var(--accent-light); box-shadow: rgba(45,127,249,0.18) 0px 0px 0px 2px; }
.item-card.packed { opacity: 0.65; }
  .box-column.complete-box .item-card { cursor: default; opacity: 0.45; }
.item-card.dragging { opacity: 0.4; }
.item-card.drag-over { border-color: var(--accent); background: var(--bg); }

.card-top {
  display: flex; align-items: flex-start; gap: 8px;
}
.card-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface);
}

.card-info { flex:1; min-width:0; }
.card-info .sku-text {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
}
.card-info .name-text {
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em;
  margin: 2px 0; line-height: 1.4;
}
.card-qty {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1;
  margin-left: auto;
  min-width: 1.8em;
  text-align: right;
}

.card-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.card-tag {
  font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 8px;
  letter-spacing: 0.02em;
}
.tag-warn { background: var(--warn-light); color: var(--warn); }
.tag-info { background: var(--accent-light); color: var(--accent); }
.tag-ok { background: var(--success-light); color: var(--success); }

/* --- DETAIL PANEL (fixed right) --- */
.detail-panel {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.detail-header h2 {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.detail-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.detail-placeholder .icon { font-size: 40px; margin-bottom: 12px; }

.detail-image {
  width: 100%; height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--surface);
}

.detail-field { margin-bottom: 14px; }
.detail-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 4px;
}
.detail-value {
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
}
.detail-value.mono {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
}
.detail-value.desc {
  font-size: 13px; font-weight: 400; letter-spacing: 0.01em;
  line-height: 1.5; color: var(--muted);
}

.sku-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sku-barcode {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  padding: 2px 8px; background: var(--surface); border-radius: var(--radius-sm);
  color: var(--muted);
}

.no-barcode-badge {
  display: inline-block;
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  padding: 4px 10px; background: var(--warn-light); color: var(--warn);
  border-radius: var(--radius-sm);
}

.detail-instructions {
  background: var(--warn-light);
  border: 1px solid #f0d896;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.detail-instructions .ins-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--warn); margin-bottom: 4px;
}
.detail-instructions .ins-body {
  font-size: 13px; font-weight: 400; letter-spacing: 0.01em;
  line-height: 1.5; color: var(--fg);
}

.serial-required-badge {
  display: inline-flex;
  align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.01em;
}

.detail-packed-list { margin-top: 8px; }
.detail-packed-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.detail-packed-item:last-child { border-bottom: none; }
.detail-packed-item .box-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  padding: 1px 6px; border-radius: 6px;
  background: var(--accent-light); color: var(--accent);
}

/* Detail actions — anchored footer */
.detail-actions {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.detail-actions button {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font);
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  cursor: pointer;
  color: var(--fg);
}
.detail-actions button:hover { background: var(--surface); }
.detail-actions button.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.detail-actions button.primary:hover { opacity: 0.9; }
.detail-actions button:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.detail-actions button:disabled:hover { background: var(--bg); }

/* Qty stepper */
.qty-stepper {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 10px;
}
.qty-stepper button {
  width: 40px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 18px; font-weight: 500;
  cursor: pointer; color: var(--fg);
  font-family: var(--font); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.qty-stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-stepper button:hover { background: var(--surface); }
.qty-stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-stepper input {
  flex: 1; height: 36px;
  border: 1px solid var(--border);
  border-left: none; border-right: none;
  text-align: center;
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  outline: none; color: var(--fg);
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.detail-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--muted);
}
.detail-close:hover { background: var(--surface); color: var(--fg); }

/* --- MODAL --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: rgba(0,0,0,0.2) 0px 8px 40px;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity:0; transform: translateY(16px) scale(0.97); }
  to { opacity:1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.modal-header h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  flex: 1;
}
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--muted);
}
.modal-close:hover { background: var(--surface); color: var(--fg); }

.modal-body { padding: 20px; }
.modal-item-info {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
}
.modal-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--surface);
}
.modal-item-text { flex: 1; min-width: 0; }
.modal-item-text .m-sku {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--muted);
}
.modal-item-text .m-name {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  margin: 2px 0;
}
.modal-item-text .m-box {
  font-size: 12px; color: var(--muted); letter-spacing: 0.01em;
}

.modal-field { margin-bottom: 16px; }
.modal-field label {
  display: block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--fg); margin-bottom: 6px;
}
.modal-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 16px; letter-spacing: 0.03em;
  outline: none; color: var(--fg);
  transition: border-color 0.15s;
}
.modal-field input:focus { border-color: var(--accent); }
.modal-field input::placeholder { font-family: var(--font); font-size: 13px; color: var(--muted); }

.modal-hint {
  font-size: 11px; color: var(--muted); letter-spacing: 0.01em;
  margin-top: 4px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
}
.modal-footer button {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font);
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  cursor: pointer; color: var(--fg);
}
.modal-footer button:hover { background: var(--surface); }
.modal-footer button.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.modal-footer button.primary:hover { opacity: 0.9; }
.modal-footer button.primary:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.modal-footer button.primary:disabled:hover { background: var(--accent); }

/* --- ACTIVITY LOG --- */
.history-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  position: relative;
  flex-shrink: 0;
  margin-right: 4px;
}
.history-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.history-btn:active { background: var(--surface); }
.history-btn .badge {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.history-btn.has-new .badge { animation: badgePulse 0.4s ease; }
@keyframes badgePulse {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.log-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 1500;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.log-overlay.show { display: flex; animation: fadeIn 0.12s ease; }

.log-panel {
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: rgba(0,0,0,0.12) -4px 0px 24px;
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.log-panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.log-panel-header h3 {
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
  color: var(--fg);
}
.log-panel-header .log-count {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.log-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--muted);
  flex-shrink: 0;
}
.log-close:hover { background: var(--surface); color: var(--fg); }
.log-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.log-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.log-entry {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; letter-spacing: 0.01em;
  line-height: 1.4;
  transition: background 0.1s;
}
.log-entry:hover { background: var(--surface); }
.log-entry:last-child { border-bottom: none; }

.log-entry-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.log-entry-icon.scan { background: var(--accent-light); color: var(--accent); }
.log-entry-icon.pack { background: var(--success-light); color: var(--success); }
.log-entry-icon.warn { background: var(--warn-light); color: var(--warn); }
.log-entry-icon.box  { background: #eef2ff; color: #4f46e5; }
.log-entry-icon.info { background: var(--surface); color: var(--muted); }
.log-entry-icon.drag { background: #f3e8ff; color: #7c3aed; }

.log-entry-body { flex: 1; min-width: 0; }
.log-entry-body .log-msg {
  color: var(--fg); font-weight: 500;
}
.log-entry-body .log-detail {
  color: var(--muted); font-size: 11px; margin-top: 1px;
}
.log-entry-body .log-time {
  color: var(--muted); font-size: 10px; letter-spacing: 0.02em; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.log-panel-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.log-panel-footer button {
  width: 100%;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font);
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  cursor: pointer; color: var(--muted);
}
.log-panel-footer button:hover { background: var(--surface); color: var(--fg); }

/* --- TOAST --- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--fg); color: #fff; padding: 10px 24px;
  border-radius: var(--radius); font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em; z-index: 2000;
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.warn { background: var(--warn); }
.toast.error { background: #c92222; }
@keyframes toastIn {
  from { opacity:0; transform: translateX(-50%) translateY(12px); }
  to { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
  .source-panel { width: 240px; }
  .detail-panel { width: 300px; }
}
