/* ================================
   Freiraum – Clean Blue (Uni-Style)
   ================================ */

:root{
  --bg: #f6f8fb;
  --panel: #ffffff;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #64748b;

  --accent: #2563eb;
  --accent-dark: #1e40af;
  --accent-soft: #dbeafe;

  --radius: 12px;
  --shadow: 0 10px 28px rgba(15,23,42,.08);
}

*{ box-sizing: border-box; }

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

/* Header: ruhig, seriös */
header{
  background:#fff;
  border-bottom:1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 1rem 1rem;
  text-align:center;
}

header h1{
  margin:0;
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: .01em;
}

/* Layout */
main{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding: 2.25rem 1rem;
}

/* Panel/Card */
.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  max-width: 980px;
}

.panel h2{
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.panel-topbar{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.muted{
  color: var(--muted);
  font-size: .92rem;
}

/* Links */
a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration: underline; }

/* Buttons */
.btn{
  appearance:none;
  border: 1px solid transparent;
  background: var(--accent);
  color:#fff;
  border-radius: 10px;
  padding: .55rem .95rem;
  cursor:pointer;
  font-weight: 650;
  letter-spacing:.01em;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

.btn-outline{
  background:#fff;
  color: var(--accent-dark);
  border-color: var(--border);
}
.btn-outline:hover{
  background: var(--accent-soft);
  border-color: #c7d2fe;
}

.btn-ghost{
  background: transparent;
  color: var(--accent-dark);
  border-color: transparent;
}
.btn-ghost:hover{
  background: rgba(37,99,235,.08);
}

/* Forms */
.form-row{
  display:flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  margin: .75rem 0;
}
label{ font-weight: 600; }

input, select, textarea{
  font: inherit;
  padding: .55rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

/* Lists / "Cards" */
.list{
  list-style:none;
  padding:0;
  margin: 0.75rem 0 0;
}
.list-item{
  border:1px solid var(--border);
  border-radius: 10px;
  padding: .75rem .9rem;
  margin: .55rem 0;
  background:#fff;
  display:flex;
  justify-content: space-between;
  gap:1rem;
  align-items:flex-start;
}
.list-item:hover{
  background: var(--accent-soft);
  border-color: #c7d2fe;
}
.list-item a{ font-weight: 650; }
.list-meta{ color: var(--muted); font-size: .9rem; }

/* Table (CMS pages list) */
.table{
  width:100%;
  border-collapse: collapse;
  margin-top: .75rem;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 12px;
  overflow:hidden;
}
.table th, .table td{
  padding: .65rem .75rem;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align: top;
}
.table th{
  font-size:.92rem;
  color: var(--muted);
  background:#f8fafc;
  font-weight: 650;
}
.table tr:hover td{
  background: rgba(37,99,235,.06);
}
.table .actions a{
  margin-right: .5rem;
  font-weight: 600;
}

/* Content Pages / Blog Posts */
.content{
  line-height: 1.65;
  font-size: 1.03rem;
}
.content h1, .content h2, .content h3{
  margin-top: 1.25em;
}
.content img{
  max-width:100%;
  height:auto;
  border-radius: 10px;
  margin: .75rem 0;
}

/* Blog cards */
.blog-card{
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin: .75rem 0;
  background:#fff;
}
.blog-card:hover{
  border-color: #c7d2fe;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.blog-card h3{
  margin: 0 0 .25rem;
  font-size: 1.1rem;
}
.blog-card .meta{
  color: var(--muted);
  font-size: .9rem;
}
.blog-card p{
  margin: .6rem 0 0;
}

/* Utility */
.row{ display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.spacer{ height: .75rem; }
.right{ margin-left:auto; }
hr.sep{ border:0; border-top:1px solid var(--border); margin: 1.25rem 0; }
/* ================================
   CMS Editor
   ================================ */

#editor-section {
  max-width: 1100px;
  margin: 0 auto;
}

.panel-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-topbar h2 {
  margin: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  margin-bottom: .75rem;
}

.form-row label {
  font-weight: 600;
  color: var(--text);
}

.form-row input,
.form-row select {
  padding: .45rem .6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: .95rem;
  min-width: 160px;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Buttons --- */
.btn {
  padding: .45rem .8rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: .9rem;
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  color: var(--accent);
}

.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

/* --- Toggle (WYSIWYG / Markdown) --- */
.toggle {
  padding: .5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1rem 0;
}

.toggle strong {
  margin-right: .75rem;
}

.toggle .btn {
  background: #fff;
  color: var(--accent);
  border-color: var(--border);
}

.toggle .btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Quill Styling (ruhig & integriert) --- */
.ql-toolbar.ql-snow {
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.ql-container.ql-snow {
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  min-height: 320px;
  font-size: 1rem;
}

.ql-editor {
  line-height: 1.6;
  padding: 1rem;
}

/* --- Markdown textarea --- */
#markdownArea {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 1rem;
  font-size: .95rem;
}

/* --- Preview --- */
.preview-frame {
  margin-top: .5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

/* --- View link --- */
#viewlink a {
  color: var(--accent);
  font-weight: 500;
}
