/* Sellica Social – Design-System: Plus Jakarta Sans, Elfenbein, Grün #2c5530, Gold #c89e3c */
:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #1e2422;
  --muted: #6c7470;
  --line: #e6e1d6;
  --green: #2c5530;
  --green-dark: #203f24;
  --gold: #c89e3c;
  --red: #b3412f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,36,34,.04), 0 8px 24px -12px rgba(30,36,34,.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.5;
  display: flex; min-height: 100vh;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
code { background: #f0ede4; padding: 1px 6px; border-radius: 6px; font-size: 13px; }
pre { background: #f7f5f0; padding: 10px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; font-family: inherit; margin: 8px 0 0; }
small, .muted { color: var(--muted); }
.rot { color: var(--red) !important; }
.nowrap { white-space: nowrap; }
.pad { padding: 10px; }

/* Sidebar */
.side {
  width: 220px; background: var(--green); color: #fff; padding: 22px 16px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: inline-block; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: rgba(255,255,255,.85); padding: 9px 12px; border-radius: 10px; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.side nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.side-foot { margin-top: auto; }
.side-foot a { color: rgba(255,255,255,.6); font-size: 13px; }

/* Main */
.main { flex: 1; min-width: 0; }
.top { padding: 22px 32px 0; }
.content { padding: 20px 32px 40px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.kpis div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.kpi { font-size: 24px; font-weight: 700; display: block; line-height: 1.1; }
.kpis small { font-size: 12px; }
.konten-zeile { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.chip.aus { opacity: .45; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* Form */
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
label .inp { margin-top: 4px; }
.inp {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,85,48,.12); }
.inp-sm { padding: 6px 10px; width: auto; font-size: 14px; }
textarea.inp { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px;
  background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 10px;
  padding: 9px 16px; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: #fff; color: var(--green); }
.btn-ghost:hover { background: var(--bg); }
.btn-gold { background: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: #ad872f; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--line); }
.btn-danger:hover { background: #fbeeeb; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .6; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.inline { display: inline; }
.lnk { font-size: 13px; }
.alert { background: #fbeeeb; color: var(--red); border-radius: 10px; padding: 10px 14px; }
.ok { background: #e9f1ea; color: var(--green); border-radius: 10px; padding: 10px 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* Segment */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 14px; }
.seg-item { --c: var(--green); padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; margin: 0; }
.seg-item input { display: none; }
.seg-item.on { background: #fff; color: var(--c); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-item:hover { text-decoration: none; }

/* Badges */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.b-geplant { background: #e9f1ea; color: var(--green); }
.b-veroeffentlicht, .b-ok { background: #e3eee4; color: var(--green-dark); }
.b-laeuft { background: #f8f0dc; color: #8a6a1e; }
.b-fehler { background: #fbeeeb; color: var(--red); }
.b-entwurf, .b-offen, .b-info { background: var(--bg); color: var(--muted); }
.b-warn { background: #f8f0dc; color: #8a6a1e; }

/* Plattform-Icons */
.pi { display: inline-flex; width: 24px; height: 24px; border-radius: 7px; align-items: center; justify-content: center; vertical-align: middle; }
.pi-instagram { background: #fbe7ef; color: #c13584; }
.pi-facebook { background: #e7eefb; color: #1a56c4; }
.pi-pinterest { background: #fbe7e7; color: #c8232c; }

/* Tabelle */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.logzeile { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logzeile.fehler { color: var(--red); }

/* Editor */
.grid-editor { display: grid; grid-template-columns: 1fr; gap: 0; }
.preview-card { position: sticky; top: 20px; }
@media (min-width: 1200px) {
  .content { display: block; }
  .grid-editor { float: left; width: calc(100% - 380px); }
  .preview-card { float: right; width: 350px; }
}
.suche { display: flex; gap: 8px; }
.treffer { margin-top: 8px; max-height: 320px; overflow: auto; border-radius: 10px; }
.treffer-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; }
.treffer-item:hover { background: var(--bg); }
.treffer-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.produkt-box { display: grid; grid-template-columns: 120px 1fr; gap: 16px; margin-top: 14px; }
.produkt-box img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.produkt-box img[hidden] { display: none; }
.zaehler { font-size: 12px; color: var(--muted); margin-top: -6px; }
.konten-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.konto-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 8px; cursor: pointer; color: var(--ink); font-weight: 500; margin: 0; background: #fff; }
.konto-chip input { display: none; }
.konto-chip.on { border-color: var(--green); background: #e9f1ea; }
.ig-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ig-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; }
.ig-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--green)); }
.ig-img { aspect-ratio: 1; background: var(--bg); }
.ig-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-text { padding: 12px; font-size: 13px; white-space: pre-wrap; }

/* Kalender */
.kalender { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kal-wt { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; padding: 0 6px 4px; }
.kal-tag { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 120px; padding: 6px; transition: background .15s; }
.kal-tag.vorbei { opacity: .55; }
.kal-tag.heute { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.kal-tag.over { background: #e9f1ea; }
.kal-datum { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 4px; }
.kal-plus { color: var(--muted); font-weight: 400; }
.kal-liste { display: flex; flex-direction: column; gap: 4px; }
.kal-post { --c: var(--green); display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; gap: 0 6px; align-items: center;
  background: var(--bg); border-left: 3px solid var(--c); border-radius: 6px; padding: 4px 6px; font-size: 12px; color: var(--ink); cursor: grab; }
.kal-post:hover { text-decoration: none; background: #f0ede4; }
.kal-post img { grid-row: span 2; width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.kal-zeit { color: var(--muted); font-size: 11px; }
.kal-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.kal-pf { grid-column: 2; }
.kal-pf .pi { width: 16px; height: 16px; border-radius: 4px; }
.kal-pf .pi svg { width: 11px; height: 11px; }
.kal-post.s-veroeffentlicht { opacity: .7; cursor: default; }
.kal-post.s-fehler { border-left-color: var(--red); }
.kal-post.s-entwurf { border-left-style: dashed; }

/* Sonstiges */
.vorlage-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vorlage-item:last-child { border-bottom: 0; }
.details { margin-top: 12px; }
.details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.hinweise li { margin-bottom: 8px; }

/* Login */
.login-body { align-items: center; justify-content: center; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 360px; box-shadow: var(--shadow); }
.login-card .brand { color: var(--green); font-size: 20px; }

@media (max-width: 800px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; padding: 14px 16px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .top, .content { padding-left: 16px; padding-right: 16px; }
  .row2, .produkt-box, .kpis { grid-template-columns: 1fr; }
  .kalender { grid-template-columns: repeat(2, 1fr); }
  .kal-wt { display: none; }
}
