/* ============================================================
   TESSERACT — blog, admin és bejelentkezés kiegészítő stílusok
   (a styles.css design-tokenjeire épül)
   ============================================================ */

/* A korábbi inline style="justify-content:center" kiváltása, hogy a CSP-ből
   elhagyható legyen az 'unsafe-inline' a style-src-nél */
.section-head.center .eyebrow { justify-content: center; }

/* ---------- közös oldalkeret ---------- */
.page-section { padding: 150px 0 90px; min-height: 60vh; }
.container.narrow { max-width: 800px; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; margin: 10px 0 14px; }

/* ---------- blog lista ---------- */
.post-list { display: flex; flex-direction: column; gap: 22px; margin-top: 40px; }
.post-card {
  display: block; padding: 28px 30px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.post-card:hover { border-color: var(--border-strong); background: var(--card-hover); transform: translateY(-3px); }
.post-card time { font-size: 0.82rem; color: var(--muted-2); letter-spacing: 0.04em; }
.post-card h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 8px 0 10px; letter-spacing: -0.01em; }
.post-card p { color: var(--muted); font-size: 0.97rem; }
.post-card .read-more { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.post-card .read-more svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.post-card:hover .read-more svg { transform: translateX(4px); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 48px; }
.page-info { color: var(--muted); font-size: 0.92rem; }
.empty-note { color: var(--muted); margin-top: 40px; text-align: center; }

/* ---------- cikkoldal ---------- */
.post-header { margin-bottom: 36px; }
.post-header time { color: var(--muted-2); font-size: 0.9rem; }
.back-link { display: inline-block; color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }
.draft-badge {
  display: inline-block; margin-bottom: 14px; padding: 5px 12px;
  background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.4);
  color: #FCD34D; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}

.prose { color: #D6DEEC; font-size: 1.06rem; line-height: 1.8; }
.prose h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 42px 0 14px; letter-spacing: -0.01em; color: var(--text); }
.prose h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 32px 0 12px; color: var(--text); }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #7DE9F8; }
.prose ul, .prose ol { margin: 0 0 18px 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 24px 0; padding: 14px 22px; border-left: 3px solid var(--accent);
  background: var(--card); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted);
}
.prose code {
  background: rgba(255,255,255,0.07); padding: 2px 7px; border-radius: 6px;
  font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.prose pre { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 18px 20px; overflow-x: auto; margin: 0 0 18px; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--r-sm); margin: 10px 0 18px; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.prose table { border-collapse: collapse; margin: 0 0 18px; width: 100%; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 14px; text-align: left; }
.prose th { background: var(--card); font-family: var(--font-display); }

.post-cta {
  margin-top: 64px; padding: 36px 34px; text-align: center;
  background: linear-gradient(160deg, rgba(34,211,238,0.07), rgba(37,99,235,0.05));
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
}
.post-cta h3 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 8px; }
.post-cta p { color: var(--muted); margin-bottom: 20px; }

/* ---------- bejelentkezés ---------- */
.auth-card {
  max-width: 420px; margin: 0 auto; padding: 40px 38px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.auth-card h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 8px; }
.auth-sub { color: var(--muted); font-size: 0.94rem; margin-bottom: 26px; }
.auth-card .btn { width: 100%; margin-top: 6px; }

.flash-list { margin-bottom: 20px; }
.flash {
  padding: 12px 16px; margin-bottom: 10px; font-size: 0.92rem;
  background: rgba(34, 211, 238, 0.07); border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--r-sm); color: #BEF5FF;
}

/* ---------- hibaoldal ---------- */
.error-box { max-width: 520px; margin: 0 auto; text-align: center; }
.error-code {
  font-family: var(--font-display); font-size: clamp(4rem, 10vw, 6.5rem); font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-box h1 { font-family: var(--font-display); font-size: 1.5rem; margin: 6px 0 12px; }
.error-box p { color: var(--muted); margin-bottom: 26px; }

/* ---------- admin ---------- */
.admin-body { background: var(--bg); }
.admin-nav { position: sticky; }
.admin-tag {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(34,211,238,0.4); border-radius: 6px;
  padding: 3px 7px; margin-left: 4px;
}
.admin-user { color: var(--muted); font-size: 0.9rem; margin-right: 6px; }
.admin-main { padding: 120px 0 80px; min-height: 100vh; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.admin-head h1 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: -0.01em; }

.btn-sm { padding: 8px 14px; font-size: 0.84rem; }
.btn-danger { color: #FCA5A5; }
.btn-danger:hover { border-color: #F87171; background: rgba(248, 113, 113, 0.08); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.admin-table th {
  text-align: left; padding: 14px 18px; font-family: var(--font-display);
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2);
  border-bottom: 1px solid var(--border-strong);
}
.admin-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--card-hover); }
.post-title-link { font-weight: 700; }
.post-title-link:hover { color: var(--accent); }
.slug-line { color: var(--muted-2); font-size: 0.8rem; margin-top: 3px; }
.date-cell { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
.actions-cell { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions-col { width: 280px; }

.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.badge-live { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); color: #6EE7B7; }
.badge-draft { background: rgba(255,255,255,0.06); border: 1px solid var(--border-strong); color: var(--muted); }

/* ---------- szerkesztő ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.editor-main .field input, .editor-side .field input,
.editor-main .field textarea, .editor-side .field textarea { width: 100%; }
.content-editor {
  min-height: 480px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem; line-height: 1.7;
}
.field-hint { color: var(--muted-2); font-size: 0.8rem; margin-top: 7px; line-height: 1.5; }
.req { color: var(--accent); }
#metaCount.over { color: #FCA5A5; font-weight: 700; }

.side-card {
  padding: 24px 24px 26px; margin-bottom: 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
}
.side-card h3 { font-family: var(--font-display); font-size: 1.02rem; margin-bottom: 18px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.editor-save { width: 100%; margin-top: 18px; }

@media (max-width: 980px) {
  .editor-grid { grid-template-columns: 1fr; }
  .content-editor { min-height: 340px; }
}
@media (max-width: 760px) {
  .page-section { padding: 120px 0 60px; }
  .admin-main { padding: 100px 0 60px; }
  .auth-card { padding: 30px 24px; }
  .actions-col { width: auto; }
}
