/* ── Global ────────────────────────────────────────────────────── */
:root {
  --primary: #0d6efd;
  --success: #198754;
  --warn: #ffc107;
}

body {
  font-size: 0.92rem;
}

/* ── Navbar ────────────────────────────────────────────────────── */
.navbar-brand {
  font-size: 1.15rem;
  letter-spacing: -.3px;
}

/* ── Wizard bar ────────────────────────────────────────────────── */
.wizard-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: #6c757d;
  font-size: .82rem;
  white-space: nowrap;
  transition: all .15s;
}

.wizard-step:hover:not(.disabled) {
  color: var(--primary);
  background: #e8f0fe;
}

.wizard-step.active {
  color: var(--primary);
  font-weight: 600;
  background: #e8f0fe;
}

.wizard-step.done {
  color: var(--success);
}

.wizard-step.disabled {
  pointer-events: none;
  opacity: .4;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dee2e6;
  font-size: .75rem;
  font-weight: 700;
  color: #495057;
  flex-shrink: 0;
}

.wizard-step.active .step-num {
  background: var(--primary);
  color: #fff;
}

.wizard-step.done .step-num {
  background: var(--success);
  color: #fff;
}

.wizard-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
}

.wizard-arrow::after {
  content: '›';
  font-size: 1.2rem;
  color: #adb5bd;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

/* ── Article cards ─────────────────────────────────────────────── */
.article-card {
  transition: transform .1s, box-shadow .1s;
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
}

.article-thumb {
  height: 180px;
  object-fit: cover;
}

.article-thumb-placeholder {
  height: 180px;
  background: #f1f3f5;
}

/* ── Status badges ─────────────────────────────────────────────── */
.status-badge-draft    { background: #6c757d; color: #fff; padding: .25em .5em; border-radius: .3em; font-size: .75rem; }
.status-badge-reviewed { background: #0dcaf0; color: #000; padding: .25em .5em; border-radius: .3em; font-size: .75rem; }
.status-badge-listed   { background: #fd7e14; color: #fff; padding: .25em .5em; border-radius: .3em; font-size: .75rem; }
.status-badge-sold     { background: #198754; color: #fff; padding: .25em .5em; border-radius: .3em; font-size: .75rem; }

/* ── Upload dropzone ───────────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed #ced4da;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: #f0f5ff;
}

/* ── Preformatted text in listings ─────────────────────────────── */
.text-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: .88rem;
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 4px;
}

pre.pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

/* ── Tables ────────────────────────────────────────────────────── */
.table > tbody > tr > td {
  vertical-align: middle;
}

/* ── Buttons (xs helper) ───────────────────────────────────────── */
.btn-xs {
  padding: .1rem .35rem;
  font-size: .75rem;
  border-radius: .2rem;
  line-height: 1.4;
}

/* ── Card dashed border ────────────────────────────────────────── */
.border-dashed {
  border: 2px dashed #dee2e6 !important;
}

/* ── Scanner modal ─────────────────────────────────────────────── */
#scanner-viewport video {
  display: block;
  width: 100%;
}

/* ── Confidence badges ─────────────────────────────────────────── */
.conf-badge {
  display: inline-flex;
  align-items: center;
  padding: .3em .65em;
  border-radius: .4em;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.conf-badge-hoch {
  background: #d1e7dd;
  color: #0a3622;
  border: 1px solid #a3cfbb;
}

.conf-badge-mittel {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
}

.conf-badge-niedrig {
  background: #f8d7da;
  color: #58151c;
  border: 1px solid #f1aeb5;
}

/* ── Price band bar ─────────────────────────────────────────────── */
.price-band-bar {
  position: relative;
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: visible;
}

.price-band-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #a8d5a2, #198754);
  border-radius: 6px;
  opacity: .55;
}

.price-band-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0d6efd;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  z-index: 1;
  cursor: help;
}

/* ── Responsive tweaks ─────────────────────────────────────────── */
@media (max-width: 576px) {
  .wizard-bar .wizard-steps {
    font-size: .75rem;
  }
  .step-label {
    display: none;
  }
  .wizard-step {
    padding: 4px 6px;
  }
}
