/* KommentRadar - szerkesztőségi monitor */

:root {
  --bg: #f6f5f2;
  --bg-raise: #ffffff;
  --bg-sunk: #eceae5;
  --text: #16171a;
  --text-soft: #55585e;
  --text-faint: #7c8087;
  --line: #dedbd4;
  --line-strong: #c8c4bb;
  --accent: #b3352b;
  --accent-soft: #fdeceb;
  --ok: #16714a;
  --warn: #8a5a00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 25, .05), 0 6px 18px -10px rgba(20, 20, 25, .18);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --bg-raise: #1c1e25;
    --bg-sunk: #23262e;
    --text: #e9e9e7;
    --text-soft: #a9adb5;
    --text-faint: #868b94;
    --line: #2c2f38;
    --line-strong: #3a3e49;
    --accent: #e2695c;
    --accent-soft: #33201e;
    --ok: #56c896;
    --warn: #d8a54a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* --- Fejléc --- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
  position: sticky; top: 0; z-index: 5;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-size: 19px; letter-spacing: -.01em;
}
.brand-text { font-weight: 400; }
.brand-text strong { font-weight: 700; }
.brand-mark {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--accent); position: relative; flex: 0 0 auto;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}
.head-nav { display: flex; gap: 20px; font-size: 15px; }
.head-nav a { color: var(--text-soft); text-decoration: none; padding: 6px 0; }
.head-nav a:hover { color: var(--accent); }
.head-nav .nav-admin { color: var(--accent); font-weight: 600; }

/* --- Bevezető --- */
.intro { padding: 40px 0 24px; }
.intro h1 {
  font-family: var(--serif);
  font-size: 34px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.015em;
}
.intro p { margin: 0; color: var(--text-soft); font-size: 17px; max-width: 62ch; }
.intro-stats {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--text-faint);
}
.intro-stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Szűrő --- */
.filters {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.grow { flex: 1 1 240px; }

input[type=text], input[type=search], input[type=password], input[type=url],
input[type=date], select, textarea {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 9px 11px; width: 100%; min-height: 40px;
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--text); color: var(--bg-raise);
  border: 1px solid transparent; border-radius: 8px; padding: 9px 18px;
  min-height: 40px; text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: .88; }
.btn-ghost { background: transparent; color: var(--text-soft); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); opacity: 1; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-sm { font-size: 14px; padding: 6px 12px; min-height: 34px; }

/* --- Idővonal --- */
.daygroup { margin-bottom: 34px; }
.daygroup > h2 {
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.card {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: var(--text-faint); margin-bottom: 12px;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg-sunk); color: var(--text-soft);
}
.badge-facebook { background: #e7effc; color: #1b4a9c; }
.badge-reddit   { background: #fdeadf; color: #a1400f; }
.badge-x        { background: #e5e7eb; color: #1f2937; }
.badge-youtube  { background: #fde8e8; color: #a01b1b; }
@media (prefers-color-scheme: dark) {
  .badge-facebook { background: #172540; color: #8fb6f4; }
  .badge-reddit   { background: #3a2113; color: #f0a271; }
  .badge-x        { background: #2a2d34; color: #d3d6db; }
  .badge-youtube  { background: #3a1a1a; color: #f09b9b; }
}
.badge-pending  { background: #fdf1d8; color: #8a5a00; }
.badge-rejected { background: var(--bg-sunk); color: var(--text-faint); }
@media (prefers-color-scheme: dark) {
  .badge-pending { background: #3a2f14; color: #e0b45c; }
}
.dot { color: var(--line-strong); }

.card-who { font-size: 16px; margin: 0 0 10px; color: var(--text-soft); }
.card-who strong { color: var(--text); font-weight: 600; }

.quote {
  font-family: var(--serif); font-size: 19px; line-height: 1.55;
  margin: 0 0 12px; padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--text);
}
.quote-empty {
  font-family: var(--sans); font-size: 16px; color: var(--text-faint);
  font-style: italic; border-left-color: var(--line-strong);
}
.card-context { margin: 0 0 14px; color: var(--text-soft); font-size: 15px; }

/* --- Képernyőkép (Reddit-posztokból) --- */
.shot { display: block; margin: 0 0 16px; }
.shot img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-sunk);
}
.shot figcaption { margin-top: 8px; font-size: 13.5px; color: var(--text-faint); }
.shot-thumb img { max-height: 340px; width: auto; }
.shot-thumb:hover img { border-color: var(--accent); }

.card-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; text-decoration: none;
  background: var(--bg-sunk); color: var(--text-soft);
  border: 1px solid transparent; border-radius: 7px; padding: 4px 10px;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.chip-main { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip-label { color: var(--text-faint); font-size: 13.5px; margin-right: 2px; }

/* --- Lapozó --- */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 30px 0 50px; }
.pager .cur { font-size: 14px; color: var(--text-faint); }

/* --- Üres állapot --- */
.empty {
  text-align: center; padding: 60px 24px; color: var(--text-soft);
  background: var(--bg-raise); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; color: var(--text); }
.empty p { margin: 0 auto; max-width: 46ch; }

/* --- Tétel oldal --- */
.detail { padding: 34px 0 50px; }
.detail .quote { font-size: 22px; }
.detail-back { font-size: 14px; color: var(--text-faint); text-decoration: none; }
.detail-back:hover { color: var(--accent); }
.detail dl { display: grid; grid-template-columns: minmax(0, 170px) 1fr; gap: 10px 18px; margin: 22px 0 0; font-size: 15px; }
.detail dt { color: var(--text-faint); font-weight: 600; }
.detail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.source-list { list-style: none; padding: 0; margin: 14px 0 0; }
.source-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.source-list a { color: var(--accent); }
.source-list .src-meta { display: block; font-size: 13.5px; color: var(--text-faint); margin-top: 2px; }

/* --- Szöveges oldalak --- */
.prose { padding: 34px 0 60px; }
.prose h1 { font-family: var(--serif); font-size: 30px; margin: 0 0 18px; letter-spacing: -.015em; }
.prose h2 { font-size: 19px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-soft); max-width: 68ch; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }

/* --- Flash --- */
.flash {
  margin: 16px 0 0; padding: 11px 16px; border-radius: 8px; font-size: 15px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid currentColor;
}
.flash-ok { background: transparent; color: var(--ok); }

/* --- Admin --- */
.admin { padding: 30px 0 60px; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-head h1 { font-family: var(--serif); font-size: 27px; margin: 0; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 24px; border-bottom: 1px solid var(--line); }
.admin-tabs a {
  font-size: 15px; text-decoration: none; color: var(--text-soft);
  padding: 8px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.admin-tabs a:hover { color: var(--text); }

.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hint { font-size: 13.5px; color: var(--text-faint); margin: 4px 0 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--bg-sunk); font-size: 13.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--text-faint); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13.5px; }

/* --- Megerősítő modál --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(16, 17, 20, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; max-width: 420px; width: 100%;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .4);
}
.modal p { margin: 0 0 20px; font-size: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.login-box { max-width: 380px; margin: 70px auto; }
.login-box h1 { font-family: var(--serif); font-size: 25px; margin: 0 0 6px; }
.login-box .field { margin-bottom: 14px; }

@media (max-width: 560px) {
  .intro h1 { font-size: 27px; }
  .quote { font-size: 17.5px; }
  .detail .quote { font-size: 19px; }
  .card { padding: 17px 16px; }
  .detail dl { grid-template-columns: 1fr; gap: 2px 0; }
  .detail dt { margin-top: 10px; }
}
