/* Wireframe stylesheet — black & white, monospace, focused on flow */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-darker: #ededed;
  --line: #000000;
  --line-soft: #999999;
  --line-softer: #cccccc;
  --ink: #000000;
  --ink-muted: #555555;
  --ink-faint: #888888;
  --accent-locked: repeating-linear-gradient(45deg, #ededed 0 6px, #f5f5f5 6px 12px);
  --accent-stripe: repeating-linear-gradient(45deg, #d8d8d8 0 4px, #efefef 4px 8px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.45;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; }

/* ── App shell ────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header (Endnutzer) ───────────────────────────────── */
.eu-hd {
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 56px;
  background: var(--bg);
}
.eu-logo {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 14px;
  border: 1px solid var(--line);
  padding: 6px 10px;
}
.eu-nav {
  display: flex;
  gap: 24px;
  flex: 1;
  font-size: 13px;
}
.eu-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.eu-nav a.active { border-bottom-color: var(--ink); font-weight: 600; }
.eu-nav a:hover { border-bottom-color: var(--line-soft); }

.eu-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.btn:hover { background: var(--bg-alt); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--ink-muted); }
.btn.danger { border-color: #aa0000; color: #aa0000; }
.btn.danger:hover { background: #fff0f0; }
.btn.small { padding: 4px 8px; font-size: 11px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-link {
  background: none;
  border: none;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

/* ── Page container ────────────────────────────────────── */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
  flex: 1;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.page-sub {
  color: var(--ink-muted);
  font-size: 12px;
  margin: 0 0 24px;
}

.section { margin-bottom: 32px; }
.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 0 0 12px;
}

/* ── Marktplatz cards ──────────────────────────────────── */
.marktplatz-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }

.filter-box {
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--bg);
  height: fit-content;
  position: sticky;
  top: 24px;
}
.filter-box h3 {
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.filter-group { margin-bottom: 16px; }
.filter-group-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-checkbox {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
  cursor: pointer;
}
.filter-checkbox input { margin: 0; }
.filter-range { display: flex; gap: 6px; align-items: center; }
.filter-range input {
  width: 100%;
  border: 1px solid var(--line-soft);
  padding: 4px 6px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg);
}

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

.card {
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.1s;
}
.card:hover { background: var(--bg-alt); }
.card-img {
  height: 140px;
  background: var(--accent-stripe);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title {
  font-weight: 700;
  font-size: 13px;
  margin: 0;
  line-height: 1.3;
}
.card-loc { font-size: 11px; color: var(--ink-muted); }
.card-row { display: flex; justify-content: space-between; font-size: 11px; }
.card-row span:first-child { color: var(--ink-muted); }

.completeness {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}
.completeness-bar {
  flex: 1;
  height: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.completeness-bar.filled { background: var(--ink); }
.completeness-label {
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.guest-locked-notice {
  border-top: 1px dashed var(--line-soft);
  padding-top: 8px;
  font-size: 10.5px;
  color: var(--ink-muted);
  font-style: italic;
}

/* ── Forms ─────────────────────────────────────────────── */
.form { max-width: 480px; margin: 0 auto; }
.form-wide { max-width: 720px; margin: 0 auto; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
  width: 100%;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}
.form-row textarea { min-height: 100px; resize: vertical; }
.form-row .hint { font-size: 11px; color: var(--ink-muted); }
.form-row .err { font-size: 11px; color: #aa0000; }

.role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.role-tab {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.role-tab:last-child { border-right: none; }
.role-tab.active { background: var(--ink); color: var(--bg); font-weight: 700; }

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  margin: 14px 0;
}
.checkbox-row input { margin-top: 3px; }

/* ── Detail page ──────────────────────────────────────── */
.detail-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.detail-img-main {
  height: 320px;
  background: var(--accent-stripe);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-side {
  border: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.detail-thumb {
  height: 60px;
  background: var(--accent-stripe);
  border: 1px solid var(--line-soft);
}

.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.kv-table tr { border-bottom: 1px solid var(--line-softer); }
.kv-table tr:last-child { border-bottom: none; }
.kv-table td {
  padding: 8px 12px;
  vertical-align: top;
}
.kv-table td:first-child {
  width: 40%;
  color: var(--ink-muted);
  font-size: 12px;
}

.locked-section {
  position: relative;
  border: 2px dashed var(--line-soft);
  padding: 24px;
  background: var(--accent-locked);
  margin: 20px 0;
  text-align: center;
}
.locked-section .locked-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: inline-block;
  border: 2px solid var(--line);
  width: 44px;
  height: 44px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--bg);
}
.locked-section h4 {
  margin: 8px 0 4px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.locked-section p {
  color: var(--ink-muted);
  font-size: 12px;
  margin: 0 0 12px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ── NDA page ─────────────────────────────────────────── */
.nda-doc {
  border: 1px solid var(--line);
  padding: 20px;
  font-size: 12px;
  white-space: pre-wrap;
  height: 320px;
  overflow-y: auto;
  background: var(--bg-alt);
  line-height: 1.6;
}
.signature-pad {
  border: 1px dashed var(--line);
  height: 140px;
  position: relative;
  background: var(--bg);
  cursor: crosshair;
}
.signature-line {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.signature-label {
  position: absolute;
  bottom: 6px;
  left: 16px;
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Modal / Popup ────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-wide { max-width: 720px; }
.modal h3 {
  margin: 0 0 12px;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-softer);
}

/* ── Dashboard ────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}
.side-nav {
  border: 1px solid var(--line);
  padding: 12px;
  height: fit-content;
}
.side-nav-item {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
}
.side-nav-item:hover { background: var(--bg-alt); }
.side-nav-item.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  border-left-color: var(--ink);
}

.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.tile {
  border: 1px solid var(--line);
  padding: 14px;
  background: var(--bg);
}
.tile-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tile-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* ── Status badges ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.badge.active { background: var(--ink); color: var(--bg); }
.badge.review { background: var(--bg); color: var(--ink); border-style: dashed; }
.badge.rejected { border-color: #aa0000; color: #aa0000; }
.badge.pending { border-style: dashed; color: var(--ink-muted); }

/* ── Tables ───────────────────────────────────────────── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-softer);
}
.tbl th {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.tbl tr:hover td { background: var(--bg-alt); }
.tbl-actions { display: flex; gap: 6px; }

/* ── Wizard steps ─────────────────────────────────────── */
.steps {
  display: flex;
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.step {
  flex: 1;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  background: var(--bg);
  position: relative;
  text-align: center;
}
.step:last-child { border-right: none; }
.step.active { background: var(--ink); color: var(--bg); font-weight: 700; }
.step.done { background: var(--bg-alt); }
.step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 18px;
  text-align: center;
  font-size: 10px;
  margin-right: 4px;
  font-weight: 700;
}

/* ── Toast & notifications ────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  border: 1px solid var(--ink);
  font-size: 12px;
  max-width: 360px;
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.bell {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}
.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}
.notif-popover {
  position: absolute;
  top: 56px;
  right: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  width: 320px;
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.notif-item {
  padding: 12px;
  border-bottom: 1px solid var(--line-softer);
  font-size: 12px;
}
.notif-item.unread { background: var(--bg-alt); }
.notif-item:last-child { border-bottom: none; }
.notif-time { font-size: 10px; color: var(--ink-faint); margin-top: 4px; }

/* ── Admin (WordPress-Stil) ────────────────────────────── */
.wp-app { background: #f0f0f1; min-height: 100vh; font-size: 13px; }
.wp-top {
  background: #1d2327;
  color: #f0f0f1;
  height: 32px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: 12px;
  gap: 16px;
}
.wp-top a { color: #f0f0f1; text-decoration: none; opacity: .8; }
.wp-top a:hover { opacity: 1; }
.wp-shell { display: flex; }
.wp-side {
  background: #1d2327;
  color: #c3c4c7;
  width: 160px;
  min-height: calc(100vh - 32px);
  font-size: 13px;
  padding: 8px 0;
}
.wp-side a {
  display: block;
  padding: 8px 12px;
  color: #c3c4c7;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  border-left: 4px solid transparent;
}
.wp-side a:hover { background: #2c3338; color: #72aee6; }
.wp-side a.active {
  background: #2271b1;
  color: #fff;
  border-left-color: #72aee6;
}
.wp-side .wp-side-section {
  padding: 6px 12px;
  font-size: 11px;
  text-transform: uppercase;
  color: #8c8f94;
  margin-top: 8px;
}
.wp-main {
  flex: 1;
  padding: 20px;
}
.wp-main h1 {
  font-size: 23px;
  font-weight: 400;
  margin: 0 0 12px;
  color: #1d2327;
}
.wp-main h1 .add-new {
  font-size: 13px;
  border: 1px solid #2271b1;
  color: #2271b1;
  padding: 1px 8px;
  text-decoration: none;
  margin-left: 8px;
  background: #fff;
  display: inline-block;
  vertical-align: middle;
}
.wp-tablenav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 8px 0;
}
.wp-tablenav select, .wp-tablenav input {
  border: 1px solid #8c8f94;
  padding: 3px 6px;
  font-size: 13px;
  margin-right: 4px;
}
.wp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #c3c4c7;
  font-size: 13px;
}
.wp-table th {
  background: #fff;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #c3c4c7;
  font-weight: 600;
  color: #2c3338;
}
.wp-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #c3c4c7;
  vertical-align: top;
}
.wp-table tr:hover td { background: #f6f7f7; }
.wp-table .row-actions {
  font-size: 12px;
  color: #50575e;
  visibility: hidden;
  margin-top: 2px;
}
.wp-table tr:hover .row-actions { visibility: visible; }
.wp-table .row-actions a {
  color: #2271b1;
  text-decoration: none;
  cursor: pointer;
  margin-right: 6px;
}
.wp-table .row-actions a.delete { color: #b32d2e; }
.wp-table .row-actions a:hover { color: #135e96; text-decoration: underline; }

.wp-btn {
  display: inline-block;
  background: #f6f7f7;
  border: 1px solid #2271b1;
  color: #2271b1;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 4px;
  text-decoration: none;
  font-family: inherit;
}
.wp-btn:hover { background: #f0f0f1; border-color: #135e96; color: #135e96; }
.wp-btn.primary { background: #2271b1; color: #fff; border-color: #2271b1; }
.wp-btn.primary:hover { background: #135e96; border-color: #135e96; color: #fff; }
.wp-btn.danger { color: #b32d2e; border-color: #b32d2e; background: #fff; }
.wp-btn.danger:hover { background: #b32d2e; color: #fff; }

.wp-status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 2px;
  font-weight: 500;
}
.wp-status.active { background: #d1fae5; color: #14532d; }
.wp-status.review { background: #fef3c7; color: #78350f; }
.wp-status.rejected { background: #fee2e2; color: #7f1d1d; }
.wp-status.pending { background: #e0e7ff; color: #312e81; }

.wp-card {
  background: #fff;
  border: 1px solid #c3c4c7;
  padding: 16px;
  margin-bottom: 16px;
}
.wp-card h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  padding-bottom: 8px;
  border-bottom: 1px solid #dcdcde;
}

.wp-notice {
  background: #fff;
  border-left: 4px solid #72aee6;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
.wp-notice.warning { border-left-color: #dba617; }
.wp-notice.success { border-left-color: #00a32a; }
.wp-notice.error { border-left-color: #d63638; }

/* ── Misc ─────────────────────────────────────────────── */
.spacer { height: 16px; }
.hr { border: none; border-top: 1px solid var(--line-softer); margin: 16px 0; }
.muted { color: var(--ink-muted); }
.row-flex { display: flex; gap: 12px; align-items: center; }
.row-flex.between { justify-content: space-between; }
.empty-state {
  border: 1px dashed var(--line-soft);
  padding: 40px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
}

/* ── Mode banner (top of preview) ──────────────────────── */
.mode-banner {
  background: #fffbe6;
  border-bottom: 1px solid #d4b800;
  padding: 6px 16px;
  font-size: 11px;
  color: #5a4500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: ui-monospace, monospace;
}
.mode-banner b { letter-spacing: 0.05em; }
