/* Yorum Hatırlatıcı — Mesken house style.
   Brand: crimson + maroon from the Mesken m-mark, warm ivory paper ground,
   Fraunces serif display (kin to the serif 'm'), Hanken Grotesk body.
   PRD layout rules kept: 10px radius, glass cards, subtle grid, toasts bottom-right. */

:root {
  --crimson: #c84040;
  --maroon: #982828;
  --maroon-deep: #7c1f1f;
  --primary: var(--crimson);
  --primary-strong: var(--maroon);
  --primary-soft: rgba(200, 64, 64, 0.09);
  --primary-glow: rgba(200, 64, 64, 0.22);
  --ink: #2b2118;
  --ink-soft: #5b4a3e;
  --ink-faint: #97836e;
  --paper: #faf5ec;
  --surface: rgba(255, 253, 247, 0.8);
  --surface-strong: rgba(255, 254, 250, 0.95);
  --line: #e9dcc6;
  --success: #1f5d4c;
  --success-soft: rgba(31, 93, 76, 0.10);
  --danger: #8a1f1f;
  --danger-soft: rgba(138, 31, 31, 0.09);
  --warn: #9c6f23;
  --warn-soft: rgba(156, 111, 35, 0.12);
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(86, 53, 35, 0.06), 0 10px 34px -12px rgba(86, 53, 35, 0.16);
  --shadow-pop: 0 18px 50px -16px rgba(86, 53, 35, 0.32);
  --display: "Fraunces", "Hoefler Text", Georgia, serif;
  --font: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(52rem 30rem at 88% -10%, rgba(200, 64, 64, 0.10), transparent 62%),
    radial-gradient(42rem 26rem at -12% 14%, rgba(156, 111, 35, 0.09), transparent 60%),
    radial-gradient(36rem 30rem at 50% 112%, rgba(31, 93, 76, 0.07), transparent 65%),
    linear-gradient(rgba(154, 116, 84, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 116, 84, 0.07) 1px, transparent 1px);
  background-size: auto, auto, auto, 34px 34px, 34px 34px;
  background-attachment: fixed;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; }

/* ---------- shell ---------- */

.shell { max-width: 600px; margin: 0 auto; padding: 18px 16px 96px; }
.shell.wide { max-width: 1100px; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 18px;
}
.topbar .brand {
  font-family: var(--display); font-weight: 600; font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: block;
  box-shadow: 0 3px 10px var(--primary-glow);
}
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 999px;
}
.badge.admin { background: var(--primary-soft); color: var(--maroon); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: rgba(154, 116, 84, 0.12); color: var(--ink-soft); }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.01em; }
.card h2 + p.sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-faint); }

.reveal { animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.reveal:nth-child(2) { animation-delay: 0.06s; }
.reveal:nth-child(3) { animation-delay: 0.12s; }
.reveal:nth-child(4) { animation-delay: 0.18s; }
.reveal:nth-child(5) { animation-delay: 0.24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- forms ---------- */

label.fld { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
label.fld .hint { font-weight: 500; color: var(--ink-faint); }
input[type="text"], input[type="password"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px;
  padding: 10px 14px;
  font: 500 15px var(--font);
  color: var(--ink);
  background: var(--surface-strong);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.field-note { font-size: 12px; color: var(--ink-faint); margin: 6px 0 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  font: 700 15px var(--font);
  border: none; border-radius: var(--radius); cursor: pointer;
  text-decoration: none; text-align: center;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #cf4a45, var(--maroon));
  box-shadow: 0 6px 18px -6px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 24px -6px rgba(152, 40, 40, 0.4); }
.btn.ghost {
  color: var(--maroon); background: rgba(200, 64, 64, 0.10);
}
.btn.ghost:hover:not(:disabled) { background: rgba(200, 64, 64, 0.16); }
.btn.outline {
  color: var(--ink-soft); background: transparent; border: 1.5px solid var(--line);
}
.btn.outline:hover:not(:disabled) { border-color: var(--crimson); color: var(--maroon); }
.btn.danger { color: #fff; background: var(--maroon-deep); }
.btn.small { min-height: 36px; padding: 6px 13px; font-size: 13px; }
.btn.block { width: 100%; }
.btn .spin { display: none; }
.btn.loading .spin { display: inline-block; }
.btn.loading .label { opacity: 0.7; }

.spin {
  width: 16px; height: 16px; flex: none;
  border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spin.dark { border-color: rgba(152, 40, 40, 0.22); border-top-color: var(--maroon); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- landing ---------- */

.hero { text-align: center; padding: 44px 8px 30px; }
.hero .hero-mark {
  width: 76px; height: 76px; border-radius: 50%;
  box-shadow: 0 10px 30px -8px rgba(152, 40, 40, 0.45);
  margin-bottom: 22px;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 9vw, 58px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.05;
  background: linear-gradient(120deg, var(--crimson), var(--maroon) 60%, var(--maroon-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline {
  margin: 16px auto 0; max-width: 430px;
  font-size: 16px; color: var(--ink-soft); font-weight: 500;
}
.hero .platforms {
  display: flex; justify-content: center; gap: 14px; margin: 26px 0 4px;
}
.platform-chip {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-card);
  animation: float 5s ease-in-out infinite;
}
.platform-chip:nth-child(2) { animation-delay: 1.2s; }
.platform-chip svg { width: 26px; height: 26px; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero .cta .btn { min-width: 150px; }

.features { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { text-align: left; }
.feature .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: var(--primary-soft); margin-bottom: 10px;
}
.feature h3 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* ---------- auth pages ---------- */

.auth-wrap { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.auth-wrap .card { padding: 26px 24px; }
.auth-title {
  text-align: center; margin: 0 0 2px; font-size: 26px;
  font-family: var(--display); font-weight: 600; letter-spacing: -0.01em;
}
.auth-sub { text-align: center; margin: 0 0 10px; font-size: 13.5px; color: var(--ink-faint); }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-top: 16px; }
.auth-alt a { color: var(--maroon); font-weight: 700; text-decoration: none; }

.form-error {
  display: none; margin: 14px 0 0; padding: 11px 14px;
  font-size: 13.5px; font-weight: 600;
  background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius);
}
.form-error.show { display: block; animation: rise 0.25s ease; }
.form-success {
  display: none; margin: 14px 0 0; padding: 11px 14px;
  font-size: 13.5px; font-weight: 600;
  background: var(--success-soft); color: var(--success);
  border-radius: var(--radius);
}
.form-success.show { display: block; animation: rise 0.25s ease; }

/* ---------- stat cards ---------- */

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  text-align: center; padding: 16px 8px;
}
.stat .num {
  font-family: var(--display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--maroon);
}
.stat .lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); }

/* ---------- steps / tips ---------- */

.steps { display: grid; gap: 12px; counter-reset: st; margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.steps li::before {
  counter-increment: st; content: counter(st);
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--maroon);
  font-family: var(--display);
  font-weight: 600; font-size: 14px;
}
.steps li b { color: var(--ink); }

.warn-box {
  display: flex; gap: 10px; padding: 12px 14px; margin-top: 12px;
  background: var(--warn-soft); border-radius: var(--radius);
  font-size: 13px; color: var(--warn); font-weight: 600;
}

/* ---------- action page ---------- */

.video-card { padding: 0; overflow: hidden; }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #efe6d4; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.platform-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff;
  backdrop-filter: blur(6px);
}
.platform-badge.yt { background: rgba(180, 30, 30, 0.92); }
.platform-badge.ig {
  background: linear-gradient(45deg, rgba(228, 64, 95, 0.95), rgba(193, 53, 132, 0.95));
}
.video-body { padding: 16px 18px 18px; }
.video-title {
  margin: 0 0 14px; font-family: var(--display);
  font-size: 18px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.comment-card { position: relative; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-head .lbl {
  font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--maroon);
}
.comment-text { margin: 0 0 14px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.copy-btn { position: relative; overflow: hidden; }
.copy-btn.copied {
  background: var(--success); color: #fff; box-shadow: none;
}

.loading-state { text-align: center; padding: 44px 16px; }
.loading-state .spin { width: 34px; height: 34px; border-width: 3.5px; margin: 0 auto 16px; }
.loading-state p { color: var(--ink-soft); font-weight: 600; margin: 0; }

.tips { margin: 8px 0 0; padding: 0 0 0 2px; list-style: none; }
.tips li { font-size: 13.5px; color: var(--ink-soft); padding: 4px 0; }

/* ---------- admin ---------- */

.tabs {
  display: flex; gap: 4px; padding: 5px;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px; box-shadow: var(--shadow-card);
  margin-bottom: 16px; overflow-x: auto;
}
.tab {
  flex: 1; min-width: 86px; min-height: 40px;
  border: none; border-radius: 8px; cursor: pointer;
  font: 700 13.5px var(--font); color: var(--ink-soft);
  background: transparent; white-space: nowrap; padding: 8px 12px;
  transition: background 0.15s, color 0.15s;
}
.tab.active {
  background: linear-gradient(135deg, #cf4a45, var(--maroon));
  color: #fff; box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise 0.3s ease; }

table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); padding: 8px 10px; border-bottom: 1.5px solid var(--line);
}
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.cell-main { font-weight: 700; }
.cell-sub { font-size: 12px; color: var(--ink-faint); }

.switch { position: relative; width: 42px; height: 24px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: #ddd0b8; transition: background 0.2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s;
}
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { transform: translateX(18px); }

.icon-btn {
  width: 34px; height: 34px; border: none; border-radius: 8px; cursor: pointer;
  display: inline-grid; place-items: center; font-size: 15px;
  background: transparent; color: var(--ink-faint);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(43, 33, 24, 0.5);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; padding: 16px;
}
@media (min-width: 560px) { .modal-backdrop { align-items: center; } }
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 460px; max-height: 88dvh; overflow-y: auto;
  background: var(--surface-strong);
  border-radius: 14px; padding: 22px;
  box-shadow: var(--shadow-pop);
  animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .row { display: flex; gap: 10px; margin-top: 20px; }
.modal .row .btn { flex: 1; }

/* ---------- toasts (bottom-right, PRD §5.4) ---------- */

#toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  background: var(--surface-strong);
  border-left: 4px solid var(--crimson);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 12px 16px;
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast .t-title { font-size: 14px; font-weight: 800; }
.toast .t-desc { font-size: 13px; color: var(--ink-soft); }
.toast.leaving { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ---------- misc ---------- */

.divider { height: 1px; background: var(--line); margin: 18px 0; border: none; }
.muted { color: var(--ink-faint); font-size: 13px; }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
a.plain { color: var(--maroon); font-weight: 700; text-decoration: none; }

.empty-state { text-align: center; padding: 30px 14px; color: var(--ink-faint); font-size: 14px; }
.empty-state .big { font-size: 34px; margin-bottom: 8px; }

pre.report {
  background: rgba(154, 116, 84, 0.08); border-radius: var(--radius);
  padding: 14px; font-size: 12.5px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }

.detail-panel {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-top: 10px; font-size: 13.5px;
  background: var(--surface-strong);
}
.detail-panel .head { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.detail-panel .meta { color: var(--ink-faint); font-size: 12.5px; margin-top: 3px; }
.detail-panel.err { border-color: rgba(138, 31, 31, 0.3); background: var(--danger-soft); }
.detail-panel.skip { border-color: rgba(156, 111, 35, 0.35); background: var(--warn-soft); }
