/* ── Avenir font ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Avenir';
  src: url('/static/fonts/Avenir.ttc') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

/* ── Reset & tokens ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:     #FF6F00;
  --orange-d:   #e06200;
  --orange-l:   #fff3e0;
  --orange-ring:#ffe0b2;
  --green:      #16a34a;
  --green-l:    #86efac;
  --green-bg:   #f0fdf4;
  --green-ring: #dcfce7;
  --blue-bg:    #fff3e0;
  --red:        #dc2626;
  --red-bg:     #fef2f2;
  --slate:      #374151;
  --slate-d:    #1f2937;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-700:   #374151;
  --gray-900:   #111827;
  --radius:     14px;
  --shadow:     0 1px 3px rgba(0,0,0,.07), 0 4px 20px rgba(0,0,0,.06);
}

body {
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.55;
  min-height: 100vh;
}

/* ── Shared card ─────────────────────────────────────────────────────────── */
.ac-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   AUCTION PAGE LAYOUT
══════════════════════════════════════════════════════════════════════════ */

.auction-body { background: var(--gray-100); }

.ac-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Left column ─────────────────────────────────────────────────────────── */
.ac-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Product image */
.img-card {
  position: relative;
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  min-height: 180px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  cursor: zoom-in;
}
.img-blur-bg { display: none; }
.product-hero-img {
  max-height: 140px;
  max-width: 80%;
  width: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  transition: transform .35s ease, filter .35s ease;
}
.img-card:hover .product-hero-img {
  transform: scale(1.12);
  filter: brightness(1.08) drop-shadow(0 8px 20px rgba(0,0,0,.15));
}

/* Product info */
.info-card {}
.nu-live-badge {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-size: .8125rem;
  font-weight: 700;
  padding: .3rem .85rem;
  border-radius: 999px;
  margin-bottom: .9rem;
  letter-spacing: .02em;
}
.product-h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.1rem;
  line-height: 1.25;
}
.beschrijving-blok { margin-top: .5rem; }
.beschrijving-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .5rem;
}
.beschrijving-tekst {
  font-size: .9375rem;
  color: var(--gray-700);
  white-space: pre-wrap;
  margin-bottom: .75rem;
}
.specs-blok { margin-top: .5rem; }
.spec-rij {
  display: flex;
  gap: .5rem;
  padding: .3rem 0;
  font-size: .9375rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.spec-rij:last-child { border-bottom: none; }
.spec-n { min-width: 140px; font-weight: 600; color: var(--gray-900); }
.spec-v { color: var(--gray-500); }

/* Biedgeschiedenis */
.bied-hist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.bied-hist-titel { font-size: 1.05rem; font-weight: 700; }
.bied-count { font-size: .875rem; color: var(--gray-500); }

.bied-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.bied-tabel thead tr {
  border-bottom: 1.5px solid var(--gray-200);
}
.bied-tabel th {
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: .07em;
  padding: .5rem .75rem;
}
.bied-tabel th.right,
.bied-tabel td.right { text-align: right; }

.bied-rij-top td {
  background: #f0fdf4;
  border-top: 1.5px solid #bbf7d0;
  border-bottom: 1.5px solid #bbf7d0;
  padding: .85rem .75rem;
  font-weight: 700;
}
.bied-rij-top td:first-child  { border-left: 1.5px solid #bbf7d0; border-radius: 8px 0 0 8px; }
.bied-rij-top td:last-child   { border-right: 1.5px solid #bbf7d0; border-radius: 0 8px 8px 0; }

.bied-rij td {
  padding: .85rem .75rem;
  border-bottom: 1px solid var(--gray-100);
}
.bied-rij:last-child td { border-bottom: none; }

.bied-naam   { font-weight: 600; color: var(--gray-900); }
.bied-datum  { color: var(--gray-500); font-size: .85rem; }
.bied-bedrag { font-weight: 700; color: var(--gray-900); }

.no-bids-row {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-400);
  font-size: .9rem;
}

/* ── Biedgeschiedenis (losse rij in het grid — linkerkolom op desktop) ────── */
.ac-history {
  grid-column: 1;   /* blijft in de linkerkolom */
}

/* ── Right column (sticky) ───────────────────────────────────────────────── */
.ac-sidebar {
  position: sticky;
  top: 1.5rem;
  grid-row: 1 / 3;  /* sidebar overlapt rij 1 én rij 2 op desktop */
  grid-column: 2;
}

.bid-panel-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* Panel header */
.panel-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .25rem;
}
.panel-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 999px;
}
.panel-ver {
  font-size: .75rem;
  color: var(--gray-400);
}
.panel-realtime {
  font-size: .8125rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* Circular countdown */
.circle-wrap {
  position: relative;
  width: 180px;
  margin: 0 auto 1.25rem;
}
.circle-svg { width: 100%; height: auto; }
.circle-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
}
.circle-live {
  background: var(--orange-l);
  color: var(--orange);
  font-size: .65rem;
  font-weight: 800;
  padding: .15rem .55rem;
  border-radius: 999px;
  letter-spacing: .08em;
}
.circle-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: .07em;
  margin-top: .15rem;
}
.circle-time {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
}
.circle-sub {
  font-size: .7rem;
  color: var(--gray-500);
}

/* Huidig bod */
.huidig-bod-blok {
  background: var(--slate);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}
.huidig-bod-label {
  font-size: .75rem;
  color: #9ca3af;
  font-weight: 500;
  margin-bottom: .25rem;
}
.huidig-bod-getal {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  transition: color .3s;
}
.huidig-bod-meta {
  font-size: .78rem;
  color: #9ca3af;
  margin-top: .3rem;
}

/* Info pills */
.info-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.info-pill-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: .75rem .9rem;
}
.ipl {
  font-size: .65rem;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: .07em;
  margin-bottom: .25rem;
}
.ipv {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Code info box */
.code-info-box {
  background: var(--blue-bg);
  color: #1d4ed8;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.1rem;
}

/* Afgelopen */
.afgelopen-blok {
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
}
.afgelopen-icon  { font-size: 2rem; margin-bottom: .4rem; }
.afgelopen-titel { font-weight: 700; font-size: 1rem; color: var(--gray-700); }
.winner-name     { margin-top: .4rem; font-weight: 700; color: var(--blue); font-size: .95rem; }

/* Bied form */
.plaats-bod-titel {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}
.fpanel-group {
  margin-bottom: .9rem;
}
.fpanel-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .375rem;
}
.fpanel-input {
  width: 100%;
  padding: .65rem .875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-size: .9375rem;
  background: #fff;
  color: var(--gray-900);
  transition: border-color .15s;
}
.fpanel-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-ring); }
.fpanel-input[readonly] { background: var(--gray-50); color: var(--gray-500); }

/* Bedrag stepper */
.bedrag-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  overflow: hidden;
}
.stepper-btn {
  width: 48px;
  height: 48px;
  background: var(--gray-50);
  border: none;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gray-700);
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.stepper-btn:hover { background: var(--gray-200); }
.stepper-val {
  flex: 1;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900);
  background: #fff;
  padding: .5rem 0;
}
.min-bod-hint {
  font-size: .78rem;
  color: var(--gray-500);
  margin-top: .375rem;
}

/* Alerts in panel */
.fpanel-alert {
  padding: .65rem .875rem;
  border-radius: 9px;
  font-size: .875rem;
  margin-bottom: .75rem;
}
.fpanel-alert-error   { background: var(--red-bg);   color: var(--red);   }
.fpanel-alert-success { background: var(--green-bg); color: var(--green); }

/* Bod plaatsen knop */
.bod-btn {
  width: 100%;
  padding: .85rem;
  background: var(--slate-d);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s;
  margin-top: .25rem;
  font-family: 'Avenir', sans-serif;
}
.bod-btn:hover { background: #111827; }

/* Flash animation */
@keyframes flashGreen {
  0%,100% { color: #fff; }
  50% { color: var(--green-l); }
}
.flash-green { animation: flashGreen .8s ease; }

/* ══════════════════════════════════════════════════════════════════════════
   JOIN OVERLAY
══════════════════════════════════════════════════════════════════════════ */
.join-overlay {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}
.join-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.join-card .fpanel-group { text-align: left; }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN PAGE
══════════════════════════════════════════════════════════════════════════ */
.admin-body { background: var(--gray-100); }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}
.page-header { margin-bottom: 1.75rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; }
.page-header p  { color: var(--gray-500); margin-top: .3rem; }

/* Admin cards */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-200);
}

/* Search row */
.search-row   { display: flex; gap: .75rem; margin-bottom: 1rem; }
.search-input { flex: 1; }
.status-msg   { font-size: .875rem; color: var(--gray-500); }

/* Form elements */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .375rem;
}
input[type=text], input[type=number], input[type=date],
input[type=time], input[type=password], input[type=email] {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-size: .9375rem;
  background: #fff;
  transition: border-color .15s;
}
input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-ring); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-full  { grid-column: 1 / -1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.25rem; border-radius: 9px;
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-d); }
.btn-ghost { background: transparent; color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-full { width: 100%; }
.btn-sm   { font-size: .8125rem; padding: .375rem .875rem; }
.btn-row  { display: flex; gap: .75rem; margin-top: 1rem; }

/* Alert */
.alert { padding: .75rem 1rem; border-radius: 9px; font-size: .875rem; margin-top: .75rem; }
.alert-error   { background: var(--red-bg);   color: var(--red);   }
.alert-success { background: var(--green-bg); color: var(--green); }

/* Product preview */
.product-preview {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 1.5rem; margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}
.product-img-wrap { display: flex; flex-direction: column; gap: .5rem; }
.product-img-wrap img {
  width: 100%; border-radius: 10px; object-fit: contain;
  max-height: 180px; background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.product-details h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.text-muted { color: var(--gray-500); font-size: .9rem; }

/* Specs table (admin preview) */
.specs-table { width: 100%; border-collapse: collapse; margin-top: .75rem; }
.specs-table tr { border-bottom: 1px solid var(--gray-100); }
.specs-table tr:last-child { border-bottom: none; }
.spec-name  { padding: .45rem 0; font-size: .875rem; color: var(--gray-500); width: 42%; }
.spec-value { padding: .45rem 0; font-size: .875rem; font-weight: 600; }

/* Result box */
.success-icon { font-size: 2.75rem; margin-bottom: .75rem; }
.result-box {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.result-row { display: flex; align-items: center; gap: 1rem; padding: .5rem 0; }
.result-row + .result-row { border-top: 1px solid var(--gray-200); }
.result-label { font-size: .8rem; color: var(--gray-500); min-width: 110px; font-weight: 600; }
.result-value { color: var(--blue); font-size: .875rem; word-break: break-all; }
.result-code  { font-size: 1.6rem; font-weight: 800; letter-spacing: 8px; color: var(--green); }

.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.25rem 0; }

/* Home page */
.page-center {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1.5rem;
}
.logo { font-size: 3rem; margin-bottom: .75rem; }
.subtitle { color: var(--gray-500); margin-bottom: 1.5rem; font-size: .9375rem; }

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 3px solid var(--orange);
  padding: .75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(255,111,0,.08);
}
.nav-brand { display:flex; align-items:center; text-decoration:none; }
.nav-logo  { height:36px; width:auto; display:block; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .ac-wrap           { grid-template-columns: 1fr; }
  .ac-sidebar        { position: static; grid-row: auto; grid-column: auto; }
  .ac-history        { grid-column: auto; }
  .form-grid         { grid-template-columns: 1fr; }
  .product-preview   { grid-template-columns: 1fr; }
  .info-pills-row    { grid-template-columns: 1fr 1fr; }
}
