:root {
  --bg: #0a0a0a;
  --bg-sidebar: #000000;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --border: #2b2712;
  --text: #f5f0e0;
  --text-dim: #a89f7a;
  --accent: #ffcc00;
  --accent-2: #ffa800;
  --accent-soft: rgba(255, 204, 0, 0.15);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.15);
  --red: #f87171;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px 8px;
  font-size: 20px;
  font-weight: 700;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
}

.nav-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 16px 8px 8px 8px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: #ffd84d;
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
}

.user-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-chip .name { font-size: 13px; font-weight: 600; }
.user-chip .role { font-size: 11px; color: var(--text-dim); }

.logout-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
}
.logout-btn:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------- Main ---------- */

.main {
  flex: 1;
  padding: 32px 40px;
  max-width: 1400px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 24px;
}

.topbar h1 {
  font-size: 26px;
  margin: 0 0 6px 0;
}

.topbar p {
  color: var(--text-dim);
  margin: 0;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-card-hover); }

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

/* ---------- Grid / Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--accent);
}

.card .icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-purple { background: var(--accent-soft); color: #ffd84d; }

/* ---------- Table ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

tr:last-child td { border-bottom: none; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dim);
}

input[type="text"], textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 260px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
  resize: vertical;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
}

/* ---------- Content page ---------- */

.page-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  line-height: 1.6;
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(255,204,0,0.15), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(255,168,0,0.10), transparent 45%),
              var(--bg);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 380px;
  text-align: center;
}

.login-card .logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px auto;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: white;
}

.login-card h1 { font-size: 20px; margin: 0 0 8px 0; }
.login-card p { color: var(--text-dim); font-size: 13px; margin: 0 0 24px 0; }

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #5865f2;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.discord-btn:hover { filter: brightness(1.08); }

.error-msg {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; }

/* ---------- Overstap locaties ---------- */

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.search-bar input { flex: 1; }

.locations-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .locations-layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-header { margin-bottom: 12px; }
.panel-header h3 { margin: 0 0 2px 0; font-size: 15px; }
.panel-header p { margin: 0; font-size: 12px; color: var(--text-dim); }

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 860 / 1247;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 168, 0, 0.08), transparent 45%),
    linear-gradient(315deg, rgba(52, 211, 153, 0.06), transparent 40%),
    repeating-linear-gradient(0deg, #0d1424, #0d1424 38px, #16213a 38px, #16213a 40px),
    repeating-linear-gradient(90deg, #0d1424, #0d1424 38px, #16213a 38px, #16213a 40px);
}
.map-canvas.zoomable { cursor: grab; touch-action: none; }
.map-canvas.zoomable.dragging { cursor: grabbing; }
.map-canvas.pickable { cursor: crosshair; }

.map-world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  --zoom: 1;
}

.zoom-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zoom-controls button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(13, 20, 36, 0.9);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.zoom-controls button:hover { background: var(--bg-card-hover); }
.zoom-controls .zoom-reset { font-size: 11px; font-weight: 600; }

.map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.map-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  transform: translate(-50%, -50%) scale(calc(1 / var(--zoom, 1)));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.25);
  transition: opacity 0.15s;
}
.map-pin.inactive { background: var(--text-dim); box-shadow: 0 0 0 4px rgba(139, 150, 171, 0.2); }
.map-pin.dim { opacity: 0.2; }
.map-pin.pulse { animation: pin-pulse 0.9s ease-out 2; }
@keyframes pin-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7); }
  100% { box-shadow: 0 0 0 16px rgba(255, 204, 0, 0); }
}

.locations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

.location-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.location-item.highlight { border-color: var(--accent); }
.location-item .loc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.location-item .loc-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.location-item .loc-body { display: flex; gap: 12px; flex: 1; min-width: 0; }
.location-item .loc-title { font-size: 14px; font-weight: 600; margin: 0 0 4px 0; }
.location-item .loc-title .num { color: var(--accent-2); margin-right: 4px; }
.location-item .loc-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.location-item .loc-desc.expanded { -webkit-line-clamp: unset; }
.location-item .loc-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--text-dim); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); }

.coord-preview {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ---------- Voorraad ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card .stat-value { font-size: 24px; font-weight: 700; margin-bottom: 2px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-dim); }
.stat-card.warn .stat-value { color: var(--red); }

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-row input[type="text"] { flex: 1; min-width: 200px; }
.filter-row select { width: auto; min-width: 160px; }

.stock-qty { font-weight: 700; }
.stock-qty.low { color: var(--red); }
.stock-qty.ok { color: var(--green); }

.qty-adjust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qty-adjust form { display: inline; }
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover { background: var(--bg-card-hover); }

.item-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
}

/* ---------- Crafting ---------- */

.crafting-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.crafting-tabs a {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.crafting-tabs a.active {
  background: var(--accent-soft);
  color: #ffd84d;
  border-color: var(--accent);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.recipe-card .recipe-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.recipe-card h3 { margin: 0; font-size: 15px; display:flex; align-items:center; gap:6px; }
.recipe-card .recipe-desc { font-size: 12px; color: var(--text-dim); margin: 0 0 12px 0; line-height: 1.5; }

.ingredient-list { margin-bottom: 12px; }
.ingredient-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-dim);
}
.ingredient-row:last-child { border-bottom: none; }
.ingredient-row.insufficient { color: var(--red); }
.ingredient-row .check { width: 14px; text-align: center; }

.output-row {
  font-size: 12px;
  color: var(--green);
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.craft-form {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.craft-form input[type="number"] {
  width: 70px;
  text-align: center;
}

.craft-log {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.craft-log-item {
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.craft-log-item:last-child { border-bottom: none; }
.craft-log-item b { color: var(--text); }

/* ---------- Overvallen ---------- */

.overval-preview {
  font-size: 12px;
  color: var(--text-dim);
  margin: 8px 0 0 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-blocks {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.content-blocks p.block-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
}
.content-blocks img.block-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.content-blocks video.block-video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  background: #000;
}
.content-blocks .medal-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}
.content-blocks .medal-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Drugs ---------- */

.type-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.type-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.type-chip.inactive-filter { opacity: 0.35; }
.type-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.photo-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.photo-gallery img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.photo-gallery-full img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.photo-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.photo-pick-row img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.photo-pick-row label {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 400;
}

.step-block {
  border-left: 3px solid var(--step-color, var(--border));
  padding-left: 14px;
  margin-top: 16px;
}
.step-block .step-label {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-block .step-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 6px 0;
  white-space: pre-wrap;
}

.step-form-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.step-form-block .step-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.step-form-block .step-form-header .step-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-form-block .step-form-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.step-form-block textarea { min-height: 90px; }

.step-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.step-selector button {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-selector button.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--bg-card-hover);
}

/* ---------- Org tree (dashboard) ---------- */

.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 30px 0;
}

.org-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.org-node img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.org-node.lead {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000;
  border-color: transparent;
  font-size: 14px;
  padding: 12px 20px;
}

.org-stem {
  width: 1px;
  height: 26px;
  background: var(--border);
}

.org-hline {
  height: 1px;
  background: var(--border);
  width: min(80%, 700px);
}

.org-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  max-width: 1000px;
}
.org-branch {
  position: relative;
}
.org-branch::before {
  content: "";
  position: absolute;
  top: -26px;
  left: 50%;
  width: 1px;
  height: 26px;
  background: var(--border);
}

.org-row-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-align: center;
}

/* ---------- Publieke documentpagina's (voorwaarden/privacy) ---------- */

.doc-wrap {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 40px 20px 80px 20px;
}
.doc-page {
  width: 100%;
  max-width: 720px;
}
.doc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.doc-header .logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-header .logo img { width: 100%; height: 100%; object-fit: cover; }
.doc-header .site-name { font-size: 18px; font-weight: 700; }
.doc-updated { font-size: 12px; color: var(--text-dim); margin-bottom: 30px; }
.doc-page h1 { font-size: 26px; margin: 0 0 6px 0; }
.doc-page h2 { font-size: 16px; margin: 32px 0 10px 0; color: var(--accent); }
.doc-page p, .doc-page li { font-size: 14px; line-height: 1.7; color: var(--text-dim); }
.doc-page ul { padding-left: 20px; margin: 8px 0; }
.doc-page a { color: var(--accent); text-decoration: underline; }
.doc-back {
  display: inline-block;
  margin-top: 36px;
}

.block-builder-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.block-builder-row .block-body { flex: 1; min-width: 0; }
.block-builder-row .block-type-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.block-builder-row textarea { min-height: 80px; }
.block-builder-row .existing-media {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}
.block-builder-row .existing-media img,
.block-builder-row .existing-media video {
  max-width: 160px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  margin-top: 4px;
}
.block-add-buttons {
  display: flex;
  gap: 8px;
  margin: 10px 0 24px 0;
}

.photo-preview {
  width: 100%;
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
  display: block;
}

.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
