/* İçerik Motoru paneli — Altın Defteri sitesinin token'ları üzerine kurulu, çok uygulamalı bir çalışma ekranı. */

:root {
  --ink: #171310;
  --ink-deep: #120f0c;
  --surface: #241e19;
  --surface-2: #2c251f;
  --surface-3: #352d26;
  --gold: #d6a84f;
  --gold-light: #f0cc76;
  --gold-soft: rgba(214, 168, 79, 0.14);
  --gold-line: rgba(214, 168, 79, 0.42);
  --cream: #f5e8dd;
  --cream-2: #d9cabd;
  --muted: #a89090;
  --line: rgba(245, 232, 221, 0.1);
  --line-soft: rgba(245, 232, 221, 0.06);
  --positive: #6fa477;
  --positive-soft: rgba(111, 164, 119, 0.16);
  --negative: #c96862;
  --negative-soft: rgba(201, 104, 98, 0.16);
  --info: #9fb0c9;
  --info-soft: rgba(159, 176, 201, 0.14);

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.65), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 30px;

  --sidebar: 252px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px; background: var(--ink-deep); border-right: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; font-weight: 800; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: var(--fs-xs); letter-spacing: 0; }

.app-switch { position: relative; }
.app-switch select {
  width: 100%; appearance: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 34px 10px 12px; font-weight: 700; cursor: pointer;
}
.app-switch::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.app-switch .domain { display: block; color: var(--muted); font-size: var(--fs-xs); padding: 6px 4px 0; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--cream-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav a:hover { background: var(--surface); color: var(--cream); }
.nav a[aria-current='page'] { background: var(--gold-soft); color: var(--gold-light); }
.nav a .count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--gold); color: var(--ink);
  font-size: var(--fs-xs); font-weight: 800; text-align: center;
}
.nav svg { flex: none; opacity: 0.9; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.me { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--gold-light); font-weight: 800; font-size: var(--fs-sm);
}
.me b { display: block; font-weight: 700; }
.me span { color: var(--muted); font-size: var(--fs-xs); }

.main { min-width: 0; padding: 30px clamp(20px, 3.4vw, 48px) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: var(--fs-sm); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.section-head a, .section-head .muted { font-size: var(--fs-sm); }

.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.panel-pad { padding: 18px 20px; }

/* ---------- Mobil gezinme ---------- */
.mobile-top, .tabbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-top {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    padding: 12px 16px; background: rgba(18, 15, 12, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft);
  }
  .mobile-top .app-switch { flex: 1; }
  .mobile-top .app-switch .domain { display: none; }
  .main { padding: 20px 16px 110px; }
  .page-head h1 { font-size: var(--fs-xl); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30;
    background: rgba(18, 15, 12, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: var(--radius-sm);
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; position: relative;
  }
  .tabbar a[aria-current='page'] { color: var(--gold-light); }
  .tabbar a .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
}

/* ---------- Düğmeler ve form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--cream);
  font-weight: 700; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: rgba(245, 232, 221, 0.18); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--cream-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { background: transparent; border-color: rgba(201, 104, 98, 0.45); color: #e3958f; }
.btn-danger:hover { background: var(--negative-soft); border-color: var(--negative); color: #f0b3ae; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; }

.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field label, .label { font-size: var(--fs-sm); font-weight: 700; color: var(--cream-2); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .hint.warn { color: var(--gold-light); }
.input, .select, .textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; color: var(--cream); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #8f7c78; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.textarea.code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13.5px; min-height: 520px; tab-size: 2; }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.row > .field + .field { margin-top: 0; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.counter { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--negative); }

/* ---------- Durum etiketi ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--cream-2);
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending_review { background: var(--gold-soft); color: var(--gold-light); }
.status.approved { background: var(--gold-soft); color: var(--gold); }
.status.published, .status.drafted, .status.used { background: var(--positive-soft); color: #9cc9a3; }
.status.failed { background: var(--negative-soft); color: #e3958f; }
.status.rejected, .status.discarded { background: var(--surface-3); color: var(--muted); }
.status.drafting, .status.revising { background: var(--info-soft); color: var(--info); }
.status.drafting::before, .status.revising::before { animation: pulse 1.2s ease-in-out infinite; }
.status.planned, .status.available { background: var(--surface-3); color: var(--cream-2); }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Tablo / liste ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: var(--fs-xs); padding: 11px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s var(--ease); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .title { font-weight: 700; color: var(--cream); }
td .meta { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.actions-cell { text-align: right; white-space: nowrap; }

.list { display: flex; flex-direction: column; }
.list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; transition: background 0.15s var(--ease);
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); color: inherit; }
.list-row .title { font-weight: 700; }
.list-row .meta { color: var(--muted); font-size: var(--fs-xs); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--ink-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: var(--radius-sm); font-size: var(--fs-sm);
  font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; gap: 7px; align-items: center;
}
.segmented button:hover { color: var(--cream); }
.segmented button[aria-pressed='true'] { background: var(--surface-2); color: var(--cream); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.segmented .n { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--cream); font-size: var(--fs-md); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- Haftalık şerit (imza öğe): hafta, ders programı gibi 7 sütun ---------- */
.week { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.week-head h3 { font-size: var(--fs-md); font-weight: 800; }
.week-head .range { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; margin-left: 8px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day { min-height: 168px; padding: 12px 10px 12px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; position: relative; }
.day:last-child { border-right: 0; }
.day-label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.day-label .date { font-size: var(--fs-lg); font-weight: 800; color: var(--cream-2); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.day.past { background: rgba(0, 0, 0, 0.14); }
.day.past .day-label { opacity: 0.55; }
.day.today { background: var(--gold-soft); }
.day.today .day-label { color: var(--gold-light); }
.day.today .day-label .date {
  color: var(--ink); background: var(--gold); border-radius: 7px; padding: 0 7px; min-width: 30px; text-align: center;
}
.day.postday .day-label::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); align-self: center; }

.slot {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 9px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); text-align: left; color: inherit; width: 100%;
  font-size: var(--fs-sm); line-height: 1.35; text-decoration: none; cursor: default;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.slot .kw { font-weight: 700; color: var(--cream); overflow-wrap: anywhere; }
.slot .slot-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.slot .intent { font-size: 11px; color: var(--muted); font-weight: 600; }
.slot.planned { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px rgba(214, 168, 79, 0.08); }
.slot.drafted { background: var(--positive-soft); border-color: rgba(111, 164, 119, 0.35); }
.slot.failed { background: var(--negative-soft); border-color: rgba(201, 104, 98, 0.4); }
button.slot, a.slot { cursor: pointer; }
button.slot:hover, a.slot:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--gold); color: inherit; }
.slot-add {
  display: grid; place-items: center; min-height: 64px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-xs); font-weight: 700; gap: 2px;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.slot-add:hover { border-color: var(--gold-line); color: var(--gold-light); background: var(--gold-soft); }
.week-empty { padding: 26px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.week-empty b { color: var(--cream); display: block; }

@media (max-width: 1100px) {
  .week-grid { grid-template-columns: repeat(7, minmax(108px, 1fr)); overflow-x: auto; }
}
@media (max-width: 900px) {
  .week-grid { display: flex; flex-direction: column; overflow: visible; }
  .day { min-height: 0; flex-direction: row; align-items: flex-start; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 12px 14px; }
  .day:last-child { border-bottom: 0; }
  .day-label { flex-direction: column-reverse; align-items: flex-start; gap: 0; width: 54px; flex: none; }
  .day.postday .day-label::after { display: none; }
  .day > :not(.day-label) { flex: 1; }
  .day:not(.has-slot):not(.can-add) { padding-block: 8px; }
  .day:not(.has-slot):not(.can-add) .day-label { flex-direction: row; align-items: baseline; gap: 8px; width: auto; }
  .day:not(.has-slot):not(.can-add) .day-label .date { font-size: var(--fs-md); }
  .slot-add { min-height: 44px; }
}

/* ---------- Genel bakış ---------- */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 24px; margin-top: 30px; align-items: start; }
.facts { display: grid; grid-template-columns: 1fr auto; row-gap: 0; }
.facts dt, .facts dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.facts dt { color: var(--cream-2); font-weight: 600; }
.facts dd { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.budget-bar { height: 6px; border-radius: 6px; background: var(--ink); overflow: hidden; margin-top: 8px; }
.budget-bar span { display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 6px; transform-origin: left; transition: transform 0.6s var(--ease); }
.budget-bar.hot span { background: var(--negative); }
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius);
  background: var(--gold-soft); border: 1px solid var(--gold-line); font-size: var(--fs-sm); color: var(--cream-2);
}
.notice svg { flex: none; color: var(--gold); margin-top: 1px; }
.notice.danger { background: var(--negative-soft); border-color: rgba(201, 104, 98, 0.45); }
.notice.danger svg { color: var(--negative); }

@media (max-width: 1100px) { .overview-grid { grid-template-columns: 1fr; } }

/* ---------- Olay akışı ---------- */
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 10px 18px; font-size: var(--fs-sm); align-items: start; }
.timeline .tick { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); margin-top: 6px; justify-self: center; box-shadow: 0 0 0 3px var(--surface); }
.timeline .tick.good { background: var(--positive); }
.timeline .tick.bad { background: var(--negative); }
.timeline .tick.gold { background: var(--gold); }
.timeline .what { color: var(--cream-2); }
.timeline .what b { color: var(--cream); font-weight: 700; }
.timeline .detail { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; overflow-wrap: anywhere; }
.timeline time { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Yazı düzenleyici ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.editor-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.cover { aspect-ratio: 16 / 9; background: var(--ink) center / cover no-repeat; border-radius: var(--radius-sm); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: var(--fs-sm); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-block { display: flex; flex-direction: column; gap: 10px; }
.side-block + .side-block { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.side-block h3 { font-size: var(--fs-sm); font-weight: 800; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  border: 0; background: none; padding: 9px 12px; font-weight: 700; font-size: var(--fs-sm); color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected='true'] { color: var(--gold-light); border-bottom-color: var(--gold); }
.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; color: var(--cream-2); }
.prose h2 { font-size: 22px; color: var(--cream); margin: 1.6em 0 0.5em; letter-spacing: -0.015em; }
.prose h3 { font-size: 18px; color: var(--cream); margin: 1.4em 0 0.4em; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: 0.25em 0; }
.prose strong { color: var(--cream); }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 1px solid var(--gold); color: var(--cream); background: var(--gold-soft); border-radius: 0 6px 6px 0; }
.prose table { margin: 1em 0 1.4em; border: 1px solid var(--line); border-radius: 8px; display: block; overflow-x: auto; }
.prose th { background: var(--surface-2); color: var(--cream-2); }
.prose td, .prose th { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.prose > :first-child { margin-top: 0; }
.serp { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ink); border: 1px solid var(--line-soft); }
.serp .t { color: #b9c7ff; font-size: 17px; line-height: 1.3; font-weight: 600; }
.serp .u { color: #9cc9a3; font-size: var(--fs-xs); margin-bottom: 4px; overflow-wrap: anywhere; }
.serp .d { color: var(--cream-2); font-size: var(--fs-sm); margin-top: 4px; }
.savebar {
  position: sticky; bottom: 0; z-index: 10; margin-top: 24px; padding: 12px 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  background: linear-gradient(0deg, var(--ink) 70%, transparent);
}
.savebar .dirty { margin-right: auto; color: var(--gold-light); font-size: var(--fs-sm); font-weight: 700; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .textarea.code { min-height: 380px; }
}

/* ---------- Sosyal medya ---------- */
.reel-list { display: flex; flex-direction: column; gap: 14px; }
.reel-row { display: grid; grid-template-columns: 210px 1fr; gap: 22px; padding: 16px; align-items: start; }
.reel-player { width: 210px; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); background: var(--ink); border: 1px solid var(--line); display: block; }
.reel-player.placeholder { display: grid; place-items: center; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; text-align: center; padding: 12px; aspect-ratio: auto; height: 96px; border-style: dashed; }
.reel-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.reel-body h3 { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.reel-concept { color: var(--cream-2); font-size: var(--fs-sm); line-height: 1.6; max-width: 72ch; }
.tip-list { display: flex; flex-direction: column; }
.tip-row { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.tip-row:last-child { border-bottom: 0; }
.tip-date { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tip-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tip-texts > .inline { grid-column: 1 / -1; }
.tip-texts .field + .field { margin-top: 0; }
@media (max-width: 900px) {
  .reel-row { grid-template-columns: 1fr; }
  .reel-player { width: min(260px, 100%); margin: 0 auto; }
  .tip-row { grid-template-columns: 1fr; }
  .tip-date { flex-direction: row; align-items: center; }
  .tip-texts { grid-template-columns: 1fr; }
}

.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform > p { margin: 4px 0 14px; }
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 18px; font-size: var(--fs-sm); color: var(--cream-2); }
.steps li::marker { color: var(--gold); font-weight: 800; }

/* ---------- Harcama ---------- */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.provider h2 { font-size: var(--fs-lg); font-weight: 800; }
.provider .budget-bar { margin-top: 12px; }
.spend-split { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 12px; font-size: var(--fs-xs); color: var(--cream-2); }
.spend-split b { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Kelime analizi (Google) ---------- */
tr.research-row td { background: var(--ink-deep); padding: 16px 18px 18px; }
.research { display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-sm); color: var(--cream-2); max-width: 1100px; }
.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.research-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.research-list li::marker { color: var(--gold); }

/* ---------- Ayarlar ---------- */
.settings { display: grid; gap: 22px; max-width: 920px; }
.settings .panel h2 { font-size: var(--fs-lg); font-weight: 800; }
.settings .panel > p { color: var(--muted); font-size: var(--fs-sm); margin: 4px 0 16px; }
.list-editor { display: flex; flex-direction: column; gap: 8px; }
.list-editor .item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--cream-2); }
.chip.main { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-light); }
.cat-group { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.cat-group:last-child { border-bottom: 0; }
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { cursor: pointer; }
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick span {
  display: inline-grid; place-items: center; min-width: 52px; padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-weight: 700; font-size: var(--fs-sm); color: var(--muted); transition: all 0.15s var(--ease);
}
.days-pick input:checked + span { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-light); }
.days-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Açılır düzenleyici (plan slotu) ---------- */
.popover {
  position: fixed; z-index: 60; width: min(380px, calc(100vw - 32px)); padding: 18px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.8);
  display: flex; flex-direction: column; gap: 14px; animation: pop 0.22s var(--ease);
}
.popover h3 { font-size: var(--fs-md); font-weight: 800; }
.popover .close { position: absolute; top: 10px; right: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(10, 8, 6, 0.45); }

/* ---------- Diyalog ve bildirim ---------- */
.dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--cream);
  padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
.dialog::backdrop { background: rgba(10, 8, 6, 0.6); backdrop-filter: blur(3px); }
.dialog-title { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 8px; }
.dialog-body { color: var(--cream-2); font-size: var(--fs-sm); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dialog .reason { margin-top: 14px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; gap: 10px; align-items: flex-start; max-width: 420px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--surface-3); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: var(--fs-sm); font-weight: 600;
  animation: toast-in 0.35s var(--ease);
}
.toast.ok svg { color: var(--positive); }
.toast.err { border-color: rgba(201, 104, 98, 0.5); }
.toast.err svg { color: var(--negative); }
.toast svg { flex: none; margin-top: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) { .toasts { right: 12px; left: 12px; bottom: 86px; align-items: stretch; } }

/* ---------- Giriş ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 15% -10%, rgba(214, 168, 79, 0.12), transparent 60%), var(--ink); }
.auth-box { width: min(400px, 100%); }
.auth-box .brand { margin-bottom: 28px; padding: 0; font-size: var(--fs-lg); }
.auth-box h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.auth-box > p { color: var(--muted); font-size: var(--fs-sm); margin: 6px 0 22px; }
.auth-box form { display: flex; flex-direction: column; }
.auth-box .btn { margin-top: 22px; min-height: 44px; }
.form-error { color: #e3958f; font-size: var(--fs-sm); font-weight: 600; margin-top: 12px; }

/* ---------- Yükleniyor ---------- */
.loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 40px 0; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
