/* ═══════════════════════════════════════════════════════════════════════
   EDELWEISS CUP — CMS / Blog / Admin
   Baut auf den Design-Tokens aus styles.css auf (--navy-*, --gold-*, …).
   ═══════════════════════════════════════════════════════════════════════ */

/* Blog-Übersicht (.blog-grid / .blog-card / .news-*) lebt jetzt in styles.css,
   damit auch die Startseite (die kein cms.css lädt) die News-Karten stylen kann. */

/* ─────────────────────────── Einzelner Artikel ─────────────────────────── */
.article-date { color: var(--gold-400); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; }
.article-title { font-size: clamp(30px, 5vw, 52px); font-weight: 500; color: var(--head); margin: 0 0 24px; line-height: 1.12; }
.article-cover { width: 100%; height: auto; border: 1px solid var(--line-gold); border-radius: var(--radius); margin: 0 0 32px; }
.article-body { color: var(--text); font-size: 17.5px; line-height: 1.8; overflow-wrap: break-word; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--head); margin: 44px 0 14px; }
.article-body h3 { font-family: var(--font-display); font-size: 23px; font-weight: 500; color: var(--head); margin: 32px 0 10px; }
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--gold-300); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 8px 0; }
.article-body blockquote { margin: 24px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--gold-500); color: var(--beige); font-style: italic; }
.article-body code { background: rgba(0,0,0,.25); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.article-body pre { background: rgba(0,0,0,.3); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 20px; }
.article-body pre code { background: none; padding: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ═══════════════════════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════════════════════ */
body.admin { background: var(--navy-950); }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; height: 68px; border-bottom: 1px solid var(--line-gold);
  background: var(--navy-900); position: sticky; top: 0; z-index: 50;
}
.admin-bar .brand { display: inline-flex; align-items: center; gap: 11px; color: var(--head); }
.admin-bar .brand-mark { width: auto; height: 34px; }
.admin-bar .brand-text { font-family: var(--font-display); font-size: 19px; letter-spacing: .5px; text-transform: uppercase; }
.admin-bar-right { display: flex; align-items: center; gap: 16px; }
.admin-user { color: var(--muted); font-size: 14px; }
.admin-bar-right form { margin: 0; }

.admin-main { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.admin-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--head); margin: 0; }

.admin-card { border: 1px solid var(--line-gold); border-radius: var(--radius); background: var(--card); padding: 28px; }
.auth-card { max-width: 440px; margin: 60px auto; }
.auth-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 500; color: var(--head); margin: 0 0 14px; }
.auth-note { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14.5px; margin: 0 0 18px; }
.auth-note.ok { background: rgba(212,175,55,.1); border: 1px solid var(--line-gold); color: var(--gold-300); }
.auth-note.err { background: rgba(224,122,122,.1); border: 1px solid rgba(224,122,122,.4); color: #f0a3a3; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }

/* ── Tabelle ── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); padding: 0 12px 12px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; color: var(--text); }
.admin-table .admin-title-link { display: block; color: var(--head); font-family: var(--font-display); font-size: 18px; }
.admin-table .tiny { display: block; margin-top: 3px; }
.badge { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.badge-published { background: rgba(212,175,55,.15); color: var(--gold-300); border: 1px solid var(--line-gold); }
.badge-draft { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.admin-row-actions form { margin: 0; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--gold-300); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--gold-400); }
.link.danger { color: #e58b8b; }
.link.danger:hover { color: #f0a3a3; }

/* ── Formulare (Admin & Auth) ── */
.article-form .form-row, .auth-form .form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--beige); margin-bottom: 8px; }
.admin input[type=text], .admin input[type=email], .admin input[type=url],
.admin textarea, .admin select {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--head);
  background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.admin textarea { resize: vertical; min-height: 64px; }
.admin textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; }
.admin input:focus, .admin textarea:focus, .admin select:focus {
  outline: none; border-color: var(--gold-400); box-shadow: 0 0 0 3px rgba(212,175,55,.16);
}
.form-row-inline select { max-width: 240px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.admin code { background: rgba(0,0,0,.3); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* ── Titelbild-Vorschau ── */
.cover-preview { margin: 0 0 10px; }
.cover-preview img {
  display: block; max-width: 320px; width: 100%; height: auto;
  border: 1px solid var(--line-gold); border-radius: var(--radius-sm);
}
.admin input[type=file] {
  width: 100%; font-size: 14px; color: var(--text);
  background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.admin input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--navy-950);
  background: var(--gold-500); border: 0; border-radius: var(--radius-sm);
}

/* ── Rich-Text-Editor (Quill, helle Schreibfläche) ── */
.rt-editor { background: #fff; border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: #1a1a1a; }
.rt-editor .ql-container { min-height: 340px; font-family: var(--font-body); font-size: 15.5px; }
.rt-editor .ql-editor { min-height: 340px; line-height: 1.7; }
.rt-editor .ql-editor.ql-blank::before { color: #8a8f98; font-style: normal; }
.ql-toolbar.ql-snow { border-color: var(--line); border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); background: #f3f4f6; }
.ql-container.ql-snow { border-color: var(--line); }
