/* ==========================================================================
   SuperOffice Value-Proposition-Portal – Prototyp
   Farben 1:1 von superoffice.com übernommen (CSS-Variablen der Live-Seite):
   --main-color:#0C5D58, dunkles Grün #06423E, Akzent-Koralle #F48A6D,
   Hover/CTA #D4450D, Creme-Hintergrund #F2EFEA. Schrift: "SuperOffice Sans"
   (proprietär) mit Manrope als frei verfügbarer, sehr ähnlicher Ersatz.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --so-green-dark: #06423E;   /* tiefes Marken-Grün: Topbar, Headlines */
  --so-green: #0C5D58;        /* Haupt-Markenfarbe: Buttons, aktive Zustände */
  --so-green-hover: #002420;  /* Hover auf dunklem Grün */
  --so-coral: #F48A6D;        /* Akzent/Badges */
  --so-coral-dark: #D4450D;   /* CTA-Hover, Warnfarbe */
  --so-cream: #F2EFEA;        /* Seitenhintergrund */
  --so-card: #FFFFFF;
  --so-border: #E4E0D6;
  --so-text: #1C1C1E;
  --so-text-muted: #6B7570;
  --so-success: #0C5D58;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 2px 14px rgba(6, 66, 62, 0.07);
  --shadow-lg: 0 16px 40px rgba(6, 66, 62, 0.16);
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Manrope', 'SuperOffice Sans', Helvetica, Arial, sans-serif;
  background: var(--so-cream);
  color: var(--so-text);
  -webkit-font-smoothing: antialiased;
}

body { display: flex; min-height: 100vh; }

a { color: var(--so-green); }

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

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--so-green-dark);
  color: var(--so-cream);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar .logo-mark {
  width: 34px; height: 34px;
  background: var(--so-coral);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--so-green-dark);
}
.topbar .brand-title {
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: 0.1px;
}
.topbar .brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(242,239,234,0.65);
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(242,239,234,0.1);
}
.topbar .spacer { flex: 1; }
.topbar .search {
  display: flex;
  align-items: center;
  background: rgba(242,239,234,0.12);
  border-radius: 24px;
  padding: 8px 14px;
  gap: 8px;
  width: 270px;
  transition: background .15s ease;
}
.topbar .search:focus-within { background: rgba(242,239,234,0.2); }
.topbar .search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--so-cream);
  font-size: 13.5px;
  width: 100%;
  font-family: inherit;
}
.topbar .search input::placeholder { color: rgba(242,239,234,0.55); }
.topbar .search svg { flex-shrink: 0; opacity: 0.7; }

/* ---------- Layout ---------- */
.app-shell { display: flex; width: 100%; padding-top: 64px; }

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--so-card);
  border-right: 1px solid var(--so-border);
  height: calc(100vh - 64px);
  position: fixed;
  top: 64px; left: 0;
  overflow-y: auto;
  padding: 18px 12px 40px;
}

.main {
  margin-left: 300px;
  flex: 1;
  padding: 32px 44px 60px;
  max-width: 960px;
}

/* ---------- Sidebar nav ---------- */
.uebermenue { margin-bottom: 4px; border-radius: 10px; overflow: hidden; }
.uebermenue-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 13px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: var(--so-green-dark);
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background .12s ease;
}
.uebermenue-header:hover { background: var(--so-cream); }
.uebermenue-header .chevron {
  margin-left: auto;
  transition: transform 0.15s ease;
  color: var(--so-text-muted);
  font-size: 10px;
}
.uebermenue.open .chevron { transform: rotate(90deg); }
.uebermenue-header .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--so-coral);
  flex-shrink: 0;
}

.unterpunkt-list { display: none; padding: 3px 0 10px 6px; }
.uebermenue.open .unterpunkt-list { display: block; }

.unterpunkt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  padding: 9px 12px;
  border-radius: 0 8px 8px 0;
  text-align: left;
  font-size: 13.3px;
  color: var(--so-text);
  margin: 1px 0;
  transition: background .12s ease, border-color .12s ease;
}
.unterpunkt-item:hover { background: var(--so-cream); }
.unterpunkt-item.active {
  background: #EAF3F1;
  border-left-color: var(--so-green);
  color: var(--so-green-dark);
  font-weight: 700;
}
.unterpunkt-item .badge-custom {
  font-size: 9px;
  font-weight: 700;
  background: var(--so-coral);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.sidebar-footer { padding: 16px 10px 0; }
.btn-new {
  width: 100%;
  background: var(--so-green);
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: background .15s ease, transform .1s ease;
}
.btn-new:hover { background: var(--so-green-hover); transform: translateY(-1px); }

/* ---------- Overview / Landing ---------- */
.overview-hero {
  background: linear-gradient(135deg, var(--so-green-dark) 0%, var(--so-green) 100%);
  color: var(--so-cream);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}
.overview-hero::after {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  background: var(--so-coral);
  opacity: 0.18;
  border-radius: 50%;
  top: -120px; right: -80px;
}
.overview-hero h1 { margin: 0 0 10px; font-size: 27px; font-weight: 800; position: relative; }
.overview-hero p { margin: 0; color: rgba(242,239,234,0.8); font-size: 14.5px; max-width: 640px; line-height: 1.6; position: relative; }

.overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.overview-card {
  background: var(--so-card);
  border: 1px solid var(--so-border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.overview-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--so-green); }
.overview-card h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--so-green-dark); font-weight: 700; }
.overview-card .pain-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--so-coral-dark);
  background: #FDEDE7;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.overview-card .count { color: var(--so-text-muted); font-size: 13px; font-weight: 500; }

/* ---------- Detail view ---------- */
.breadcrumb { font-size: 12.5px; color: var(--so-text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--so-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--so-green); }
.breadcrumb span.current { color: var(--so-green-dark); font-weight: 700; }

.detail-header { margin-bottom: 22px; }
.detail-header h1 { font-size: 25px; margin: 0 0 12px; color: var(--so-green-dark); font-weight: 800; letter-spacing: -0.2px; }
.detail-quote {
  font-style: italic;
  font-size: 15.5px;
  color: var(--so-green-dark);
  background: #EAF3F1;
  border-left: 3px solid var(--so-coral);
  padding: 10px 16px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 10px;
}
.detail-situation { font-size: 13px; color: var(--so-text-muted); display: flex; align-items: center; gap: 6px; }
.detail-situation .pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--so-coral-dark);
  background: #FDEDE7;
  padding: 3px 10px;
  border-radius: 20px;
}

.card {
  background: var(--so-card);
  border: 1px solid var(--so-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: box-shadow .15s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card h2 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--so-green-dark);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.card h2 .icon-badge {
  width: 26px; height: 26px;
  background: var(--so-green);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card h2 .icon-badge svg { width: 14px; height: 14px; }
.card h2.h2-coral .icon-badge { background: var(--so-coral); }
.card ul.clean-list { margin: 0; padding: 0; list-style: none; }
.card ul.clean-list li {
  margin-bottom: 9px;
  font-size: 13.8px;
  line-height: 1.55;
  padding-left: 20px;
  position: relative;
}
.card ul.clean-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--so-coral);
}
.card ul.clean-list li:last-child { margin-bottom: 0; }
.card p { font-size: 13.8px; line-height: 1.6; margin: 0; }
.card p.muted { color: var(--so-text-muted); }
.card blockquote {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--so-text);
  background: var(--so-cream);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--so-green);
  font-style: italic;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Aufwand: drei Unterlisten */
.aufwand-block { margin-bottom: 16px; }
.aufwand-block:last-child { margin-bottom: 0; }
.aufwand-block h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--so-text-muted);
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aufwand-block h3::before {
  content: '';
  width: 14px; height: 2px;
  background: var(--so-coral);
  border-radius: 2px;
  display: inline-block;
}

/* Video */
.video-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:0; }
.video-empty {
  border: 1.5px dashed var(--so-border);
  border-radius: var(--radius-sm);
  padding: 32px;
  text-align: center;
  color: var(--so-text-muted);
  font-size: 13.5px;
  background: var(--so-cream);
}
.video-input-row { display: flex; gap: 8px; margin-top: 12px; }
.video-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}
.video-input-row input:focus { outline: none; border-color: var(--so-green); }

/* Upload */
.upload-box {
  border: 1.5px dashed var(--so-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--so-cream);
}
.upload-box .icon {
  width: 42px; height: 42px;
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.upload-box .info { flex: 1; }
.upload-box .info .name { font-weight: 700; font-size: 13.8px; color: var(--so-text); }
.upload-box .info .meta { font-size: 12px; color: var(--so-text-muted); margin-top: 2px; }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--so-border);
  color: var(--so-text);
  padding: 9px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: border-color .12s ease, color .12s ease;
}
.btn-secondary:hover { border-color: var(--so-green); color: var(--so-green-dark); }
.btn-primary {
  background: var(--so-green);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
  transition: background .12s ease;
}
.btn-primary:hover { background: var(--so-green-hover); }
.btn-danger { background: transparent; border: none; color: var(--so-coral-dark); font-size: 12.5px; font-weight: 700; padding: 6px 8px; }

input[type=file] { display: none; }

.tag-quelle { font-size: 11.5px; color: var(--so-text-muted); margin-top: 20px; }

/* Hinweis-Kasten */
.hinweis-card { border: 1px solid #F0D9A8; background: #FFF8EA; }
.hinweis-card h2 { color: #92660B; }
.hinweis-card h2 .icon-badge { background: #E8A31C; }
.hinweis-card p { color: #6B4E0A; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 66, 62, 0.35);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 660px; box-shadow: var(--shadow-lg); }
.modal-head { padding: 22px 26px; border-bottom: 1px solid var(--so-border); display: flex; align-items: center; }
.modal-head h2 { margin: 0; font-size: 17.5px; color: var(--so-green-dark); font-weight: 800; }
.modal-head button { background: none; border: none; font-size: 18px; margin-left: auto; color: var(--so-text-muted); }
.modal-body { padding: 22px 26px; max-height: 65vh; overflow-y: auto; }
.modal-foot { padding: 18px 26px; border-top: 1px solid var(--so-border); display: flex; justify-content: flex-end; gap: 10px; }
.field { margin-bottom: 17px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--so-green-dark); margin-bottom: 6px; }
.field .hint { font-weight: 500; color: var(--so-text-muted); font-size: 11.5px; margin-left: 6px; }
.field input[type=text], .field input[type=url], .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  background: var(--so-cream);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--so-green); background: #fff; }
.field textarea { resize: vertical; min-height: 66px; }
.field-group-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--so-coral-dark);
  margin: 20px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--so-border);
}
.field-group-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: var(--so-green-dark);
  color: var(--so-cream);
  padding: 13px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.toast.show { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px);} to {opacity:1; transform:translateY(0);} }

.actions-row { display: flex; gap: 10px; margin-top: 4px; }

@media (max-width: 860px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .main { margin-left: 0; padding: 20px; }
  .app-shell { flex-direction: column; }
  .two-col, .overview-grid { grid-template-columns: 1fr; }
  .topbar .search { display: none; }
}

/* ---------- Bearbeiten / Export (Detail-Header-Aktionen) ---------- */
.detail-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--so-border);
  color: var(--so-green-dark);
  padding: 8px 14px;
  border-radius: 24px;
  font-size: 12.8px;
  font-weight: 700;
  transition: border-color .12s ease, background .12s ease;
}
.btn-icon:hover { border-color: var(--so-green); background: var(--so-cream); }
.btn-icon svg { width: 14px; height: 14px; }

/* ---------- Rich-Text-Editor ---------- */
.rte-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  padding: 4px;
  background: var(--so-cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--so-border);
}
.rte-toolbar button {
  background: transparent;
  border: none;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--so-text);
}
.rte-toolbar button:hover { background: #fff; color: var(--so-green-dark); }
.rte-box {
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13.8px;
  line-height: 1.6;
}
.rte-box:focus { outline: none; border-color: var(--so-green); }
.rte-box a { color: var(--so-green); }
.rte-box ul { margin: 6px 0; padding-left: 20px; }

.edit-field { margin-bottom: 18px; }
.edit-field label {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--so-green-dark); margin-bottom: 6px;
}
.edit-field:last-child { margin-bottom: 0; }
.edit-field input[type=text] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
}
.edited-meta { font-size: 11.5px; color: var(--so-text-muted); margin-top: 8px; }

/* ---------- Links-Box ---------- */
.links-list { list-style: none; margin: 0 0 14px; padding: 0; }
.links-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--so-border);
  font-size: 13.5px;
}
.links-list li:last-child { border-bottom: none; }
.links-list a { flex: 1; text-decoration: none; font-weight: 600; }
.links-list a:hover { text-decoration: underline; }
.links-list .url-preview { color: var(--so-text-muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.link-add-row { display: flex; gap: 8px; }
.link-add-row input {
  padding: 9px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}
.link-add-row input[name=label] { width: 160px; }
.link-add-row input[name=url] { flex: 1; }

/* ---------- PDF-Export-Vorlage (offscreen gerendert, per html2canvas erfasst) ---------- */
.pdf-export-root {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 760px;
  background: #fff;
  padding: 36px;
  font-family: 'Manrope', Helvetica, Arial, sans-serif;
}
.pdf-export-root .pdf-header {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 3px solid var(--so-green);
  padding-bottom: 16px; margin-bottom: 20px;
}
.pdf-export-root .pdf-logo {
  width: 34px; height: 34px; background: var(--so-coral); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--so-green-dark); font-size: 15px;
}
.pdf-export-root .pdf-kicker { font-size: 12px; color: var(--so-text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pdf-export-root h1 { color: var(--so-green-dark); font-size: 22px; margin: 4px 0 0; }
.pdf-export-root .pdf-footer { margin-top: 24px; font-size: 10.5px; color: var(--so-text-muted); border-top: 1px solid var(--so-border); padding-top: 10px; }
