* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --text-primary: #e0e0e0;
  --text-secondary: #9090a0;
  --accent-primary: #00d4aa;
  --accent-secondary: #0088ff;
  --accent-warning: #ffaa00;
  --accent-error: #ff4444;
  --accent-success: #00ff88;
  --border-color: #2a2a3a;
}
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}
.container { max-width: 1400px; margin: 0 auto; padding: 1rem; }
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  margin-bottom: 1rem;
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
h1 { font-size: 1.5rem; font-weight: 600; color: var(--accent-primary); }
.subtitle { font-size: 0.875rem; color: var(--text-secondary); }
.btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.btn:hover { background: var(--border-color); border-color: var(--accent-primary); }
.btn-primary { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); }
.btn-primary:hover { background: #00ffb8; }
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  background: var(--bg-secondary);
  transition: all 0.2s;
  margin-bottom: 1rem;
}
.dropzone.dragover { border-color: var(--accent-primary); background: var(--bg-tertiary); }
.dropzone-icon { font-size: 3rem; margin-bottom: 1rem; }
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }
.search-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  display: none;
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.search-field { display: flex; flex-direction: column; gap: 0.25rem; }
.search-field label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }
.search-field input, .search-field select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.25rem;
}
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.asset-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.asset-card:hover { border-color: var(--accent-secondary); transform: translateY(-2px); }
.asset-card.selected { border-color: var(--accent-primary); box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2); }
.asset-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.asset-header-left { flex: 1; }
.asset-type-row { display: flex; gap: 0.5rem; margin-bottom: 0.25rem; }
.asset-title { font-weight: 600; font-size: 1rem; }
.asset-subtitle { font-size: 0.75rem; color: var(--text-secondary); }
.asset-grade {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
}
.grade-A { background: #00ff88; color: #000; }
.grade-B { background: #88ff00; color: #000; }
.grade-C { background: #ffaa00; color: #000; }
.grade-D { background: #ff6600; color: #fff; }
.grade-F { background: #ff4444; color: #fff; }
.asset-body { margin-bottom: 0.75rem; }
.spec-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.25rem; }
.spec-label { color: var(--text-secondary); }
.spec-value { color: var(--text-primary); }
.asset-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.disposition-path { text-transform: uppercase; color: var(--accent-secondary); }
.value-tag { color: var(--accent-primary); font-weight: 600; }
.type-badge {
  font-size: 0.625rem; padding: 0.125rem 0.5rem; border-radius: 1rem;
  text-transform: uppercase; font-weight: 600;
}
.badge-server { background: #0088ff; color: #fff; }
.badge-network { background: #ff8800; color: #fff; }
.badge-part { background: #aa00ff; color: #fff; }
.badge-storage { background: #00ff88; color: #000; }
.badge-bulk { background: #888; color: #fff; }
.status-badge {
  font-size: 0.625rem; padding: 0.125rem 0.5rem; border-radius: 1rem;
  text-transform: uppercase; font-weight: 600;
}
.status-received { background: #666; color: #fff; }
.status-graded { background: var(--accent-warning); color: #000; }
.status-ready { background: var(--accent-success); color: #000; }
.status-sold { background: #0088ff; color: #fff; }
.status-parted { background: #aa88ff; color: #fff; }
.status-destroyed { background: var(--accent-error); color: #fff; }
.status-data-destruction { background: #ffaa44; color: #000; }
.inventory-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}
.inventory-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.inventory-content { max-height: 400px; overflow: auto; }
.inventory-content.collapsed { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; }
th { color: var(--text-secondary); font-weight: 500; position: sticky; top: 0; background: var(--bg-secondary); }
tr:hover { background: var(--bg-tertiary); }
tr.selected { background: rgba(0, 212, 170, 0.1); }
.serial-link { color: var(--accent-secondary); cursor: pointer; text-decoration: underline; }
.chain-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  display: none;
}
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0;
  width: 2px; background: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 1rem; padding-left: 1rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.85rem; top: 0.25rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-secondary); border: 2px solid var(--border-color);
}
.timeline-item.completed::before { background: var(--accent-success); border-color: var(--accent-success); }
.timeline-item.sale::before { background: var(--accent-secondary); border-color: var(--accent-secondary); }
.timeline-item.destruction::before { background: var(--accent-error); border-color: var(--accent-error); }
.timeline-time { font-size: 0.75rem; color: var(--text-secondary); }
.timeline-event { font-weight: 600; margin-bottom: 0.25rem; }
.timeline-meta { font-size: 0.875rem; color: var(--text-secondary); }
.timeline-attachments { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.attachment-tag {
  font-size: 0.625rem; padding: 0.125rem 0.5rem;
  background: var(--bg-tertiary); border-radius: 1rem;
}
.log-container {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  transition: max-height 0.3s ease;
  z-index: 100;
}

.log-container.collapsed {
  max-height: 24px;
  overflow: hidden;
}

.log-container.collapsed .log-header {
  display: none;
}

.log-container.collapsed .log-content {
  display: none;
}

.log-container.collapsed .log-expand-handle {
  display: flex;
}

.log-header {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.log-collapse-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.log-collapse-btn:hover {
  color: var(--text-primary);
}

#log-toggle-btn {
  cursor: pointer;
  padding: 0.25rem;
}

.log-content {
  padding: 0.5rem 1rem;
  max-height: 160px;
  overflow-y: auto;
}

.log-expand-handle {
  display: none;
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 40px;
  height: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.log-expand-handle:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.log-expand-icon {
  font-size: 12px;
}
.log-entry { margin-bottom: 0.25rem; display: flex; gap: 0.5rem; }
.log-time { color: var(--text-secondary); }
.log-level { text-transform: uppercase; font-size: 0.625rem; padding: 0.125rem 0.375rem; border-radius: 0.25rem; }
.log-level-info { background: var(--accent-secondary); color: #fff; }
.log-level-success { background: var(--accent-success); color: #000; }
.log-level-warning { background: var(--accent-warning); color: #000; }
.log-level-error { background: var(--accent-error); color: #fff; }
.modal {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 1rem; max-width: 800px; width: 90%; max-height: 90vh; overflow: auto;
}
.modal-header {
  padding: 1rem; border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 1rem; }
.modal-footer { padding: 1rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.5rem; justify-content: flex-end; }
.tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
.tab-btn {
  background: none; border: none; color: var(--text-secondary);
  padding: 0.5rem 1rem; cursor: pointer; font-size: 0.875rem;
}
.tab-btn.active { color: var(--accent-primary); border-bottom: 2px solid var(--accent-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.spec-section { background: var(--bg-tertiary); padding: 1rem; border-radius: 0.5rem; }
.spec-section h4 { color: var(--accent-primary); margin-bottom: 0.5rem; font-size: 0.875rem; text-transform: uppercase; }
.spec-line { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.25rem; }
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chip {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-secondary); padding: 0.25rem 0.75rem;
  border-radius: 1rem; font-size: 0.75rem; cursor: pointer;
}
.filter-chip.active { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); }
.empty-state { text-align: center; padding: 3rem; color: var(--text-secondary); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
#timeline-view { display: none; }
.timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.part-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.part-card { background: var(--bg-tertiary); padding: 1rem; border-radius: 0.5rem; }

/* Wizard Modal Styles */
.wizard-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.wizard-modal.active {
  display: flex;
}

.wizard-content {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #1f1f1f 100%);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.wizard-header {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.wizard-header h2 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  transition: all 0.3s ease;
}

.wizard-dot.active {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.wizard-dot.completed {
  background: var(--accent-success);
}

.wizard-body {
  padding: 0.75rem 1rem;
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
}

.wizard-screen {
  display: none;
}

.wizard-screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-icon {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.2rem;
}

.wizard-description {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  font-size: 0.75rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.feature-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

.feature-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
}

.feature-subtitle {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.quick-start-title {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--accent-primary);
}

.steps-container {
  margin-bottom: 0.75rem;
}

.step-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.step-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 1.25rem;
}

.step-action {
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
}

.step-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.pro-tip {
  background: linear-gradient(135deg, #1a3a1a 0%, #0f2f0f 100%);
  border: 1px solid var(--accent-success);
  border-radius: 6px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.pro-tip-label {
  color: var(--accent-success);
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
}

.pro-tip-content {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.wizard-skip {
  font-size: 0.875rem;
}

.skip-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.skip-label input[type="checkbox"] {
  cursor: pointer;
}

.wizard-buttons {
  display: flex;
  gap: 0.5rem;
}

.wizard-btn-prev {
  display: none;
}

.wizard-btn-finish {
  display: none;
  background: var(--accent-success);
  color: #000;
  border-color: var(--accent-success);
}

.wizard-btn-finish:hover {
  background: #00cc7a;
}

/* Log level styling for wizard */
.log-level-wizard {
  background: #aa66cc;
  color: #fff;
}

/* Timeline Filter Notice */
.timeline-filter-notice {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-primary);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.timeline-filter-notice strong {
  color: var(--accent-primary);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Export Modal Styles */
.export-modal {
  z-index: 3000;
}

.export-modal-content {
  max-width: 95vw;
  width: 1400px;
  max-height: 90vh;
}

.export-modal-body {
  padding: 0;
  overflow: hidden;
}

.export-panels {
  display: flex;
  height: 65vh;
  border-top: 1px solid var(--border-color);
}

.export-panel-left,
.export-panel-middle,
.export-panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  overflow: hidden;
}

.export-panel-right {
  border-right: none;
}

.export-panel-header {
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}

.export-panel-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.select-all-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.export-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.export-item-list,
.export-selected-list,
.export-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

/* Left Panel - Item List */
.export-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s;
}

.export-item:hover {
  background: var(--bg-tertiary);
}

.export-item.selected {
  background: rgba(0, 212, 170, 0.1);
}

.export-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.export-item-info {
  flex: 1;
  min-width: 0;
}

.export-item-title {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.export-item-subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Middle Panel - Selected with Timeline */
.export-selected-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

.export-selected-header {
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  font-weight: 500;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.export-selected-timeline {
  padding: 0.5rem;
  max-height: 120px;
  overflow-y: auto;
}

.export-timeline-item {
  padding: 0.25rem 0;
  font-size: 0.7rem;
  border-left: 2px solid var(--border-color);
  padding-left: 0.5rem;
  margin-left: 0.25rem;
}

.export-timeline-item.completed {
  border-left-color: var(--accent-success);
}

/* Right Panel - Queue */
.export-queue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  background: var(--bg-tertiary);
  margin-bottom: 0.5rem;
}

.export-queue-info {
  flex: 1;
  min-width: 0;
}

.export-queue-title {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.export-queue-type {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.export-queue-remove {
  background: none;
  border: none;
  color: var(--accent-error);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.export-queue-remove:hover {
  opacity: 1;
}

/* Footer */
.export-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.export-format-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-format-selector label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.export-format-selector select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
}

.btn-danger {
  background: rgba(255, 68, 68, 0.2);
  color: var(--accent-error);
  border-color: var(--accent-error);
}

.btn-danger:hover {
  background: rgba(255, 68, 68, 0.3);
}
