:root {
  --bg: #f5f6f8; --card: #fff; --ink: #14181f; --muted: #6b7280; --line: #e4e7ec;
  --accent: #0f3d5c; --accent-ink: #fff; --ok: #14804a; --warn: #b45309; --err: #b42318;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0; }
h1 small { font-size: 13px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 2px 9px; vertical-align: middle; margin-left: 6px; font-weight: 600; }
h2 { font-size: 17px; margin: 28px 0 10px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.grow { flex: 1; }

.top { background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 20px; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; padding: 14px 0; }
.top nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.top nav a { padding: 16px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.top nav a.on { color: var(--ink); border-color: var(--accent); }
.top nav a.quiet { font-weight: 400; }
.count { background: var(--err); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }

main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.actions, .buttons, .connect { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.connect { margin-top: 14px; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; background: #e7f6ee; color: var(--ok); border: 1px solid #bfe6d0; }
.flash.err { background: #fdecea; color: var(--err); border-color: #f6c9c4; }
.todo { background: #fff8eb; border: 1px solid #f3dfb4; border-radius: var(--radius); padding: 6px 14px; margin-bottom: 20px; }
.todo div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f3e7c9; }
.todo div:last-child { border: 0; }
.todo a { white-space: nowrap; font-weight: 600; text-decoration: none; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; text-align: center; color: var(--muted); }

.btn { display: inline-block; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; list-style: none; }
.btn::-webkit-details-marker { display: none; }
.btn:hover { border-color: #c5cbd6; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.big { padding: 11px 30px; font-size: 16px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.btn:disabled { opacity: .6; cursor: wait; }
.link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link.danger { color: var(--err); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; scroll-margin-top: 70px; }
.card h2 { margin-top: 0; }
.card h3 { margin-top: 22px; }
.card.narrow { width: 100%; max-width: 400px; }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 12px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), textarea, select { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; color: var(--ink); }
input[type=file] { display: block; margin-top: 6px; }
input[type=color] { display: block; margin-top: 5px; width: 60px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
textarea { resize: vertical; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ok { color: var(--ok); font-weight: 600; text-transform: none; letter-spacing: 0; }
.warn { color: var(--warn); font-weight: 600; text-transform: none; letter-spacing: 0; }
.help { background: var(--bg); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.help summary { cursor: pointer; font-weight: 600; }
.help ol { margin: 10px 0 0; padding-left: 20px; }
.help li { margin-bottom: 6px; }
code, pre { background: #eef1f5; border-radius: 6px; font: 13px ui-monospace, Consolas, monospace; }
code { padding: 2px 6px; word-break: break-all; }
pre { padding: 10px 12px; overflow-x: auto; margin: 0 0 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.checks li { padding: 5px 0 5px 24px; position: relative; font-weight: 400; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.checks li.ok::before { content: "✓"; }
.checks li.warn::before { content: "!"; }
.planrow { display: grid; grid-template-columns: 80px 1fr 120px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.planrow input[type=time] { margin: 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: block; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; }
.chip input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#plan .cols { margin-top: 16px; }
.logobox { background: repeating-conic-gradient(#e9ecf1 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 10px; padding: 12px; display: inline-block; margin-bottom: 10px; }
.logobox img { max-height: 60px; max-width: 200px; display: block; }
.inline { margin-top: 14px; max-width: 380px; }

.draft { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: 300px 1fr; gap: 0; margin-bottom: 18px; overflow: hidden; scroll-margin-top: 70px; }
.draft.compact { grid-template-columns: 150px 1fr; }
.preview { background: #0d1117; position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; align-self: start; }
.preview img, .preview video { width: 100%; flex: 0 0 100%; display: block; scroll-snap-align: start; object-fit: cover; aspect-ratio: 4 / 5; }
.preview.story img, .preview.story video, .preview.reel img, .preview.reel video { aspect-ratio: 9 / 16; }
.pill { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 99px; pointer-events: none; }
.draft .body { padding: 18px 20px; min-width: 0; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.when { font-weight: 600; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #e8eef5; color: var(--accent); }
.badge.f-reel { background: #fdeef5; color: #a3195b; }
.badge.f-story { background: #fff3e0; color: #b45309; }
.texts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 16px; }
.texts p { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
.pop { position: relative; }
.pop[open] { flex-basis: 100%; }
.pop form { margin-top: 10px; padding: 14px; background: var(--bg); border-radius: 10px; max-width: 480px; }
.pop.wide form { max-width: none; }
.more { margin-bottom: 12px; }
.more summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-bottom: 8px; }
.states { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.state { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: #eef1f5; }
.state a { color: inherit; }
.s-done { background: #e7f6ee; color: var(--ok); }
.s-failed { background: #fdecea; color: var(--err); }
.s-processing, .s-waiting { background: #fff8eb; color: var(--warn); }
.errtext { color: var(--err); font-size: 13px; flex-basis: 100%; }

.announce { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.announce summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.announce form { margin-top: 12px; }
.end { display: flex; align-items: flex-end; padding-bottom: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.row:last-child { border: 0; }

.drop { display: block; border: 2px dashed #c5cbd6; border-radius: var(--radius); padding: 30px 20px; text-align: center; cursor: pointer; background: var(--card); margin-bottom: 8px; font-weight: 400; }
.drop strong { display: block; font-size: 16px; margin-bottom: 4px; }
.drop span { color: var(--muted); }
.drop.over { border-color: var(--accent); background: #eef4f8; }
.progress { min-height: 22px; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile.off { opacity: .5; }
.thumb { position: relative; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e9ecf1; }
.info { padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; flex: 1; }
.info p { flex: 1; }
.foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.foot form { display: flex; gap: 10px; }

@media (max-width: 720px) {
  .draft, .draft.compact { grid-template-columns: 1fr; }
  .draft.compact .preview { max-width: 180px; }
  .texts, .cols { grid-template-columns: 1fr; }
  .planrow { grid-template-columns: 1fr; }
  .top nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .top nav a { padding: 10px 10px; }
  .btn.big { flex: 1; text-align: center; }
}
.half { max-width: calc(50% - 9px); }
[hidden] { display: none !important; }
.check input[type=radio] { flex: none; margin-top: 4px; }
.check:has(input[type=radio]) { align-items: flex-start; }
.flags { background: #fff8eb; border: 1px solid #f3dfb4; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.flags strong { color: var(--warn); }
.flags ul { margin: 6px 0 0; padding-left: 18px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.btn.small { padding: 6px 12px; font-size: 13px; font-weight: 500; }
.paused { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cols.three { grid-template-columns: repeat(3, 1fr); }

/* Onay ekranı: tek paylaşım, büyük önizleme */
.notice { display: block; background: #fff8eb; border: 1px solid #f3dfb4; border-radius: 10px; padding: 9px 14px; margin-bottom: 18px; color: var(--warn); text-decoration: none; font-size: 14px; }
.review { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 28px; align-items: start; }
.stage { position: sticky; top: 78px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 40px rgba(17, 24, 23, .14); background: #0d1117; }
.stage .preview img, .stage .preview video { aspect-ratio: auto; height: auto; max-height: calc(100vh - 120px); object-fit: contain; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.pager { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.pager span { margin-right: auto; }
.pager .btn { padding: 2px 12px; font-size: 18px; line-height: 1.4; }
.pager .btn.off { opacity: .35; pointer-events: none; }
.side h3 { margin-top: 18px; }
.caption { font-size: 14.5px; overflow-wrap: anywhere; }
.decide { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.decide .btn.big { padding: 12px 28px; font-size: 16px; }
.empty.tall { padding: 80px 20px; display: grid; gap: 12px; justify-items: center; }
.empty.tall strong { font-size: 18px; color: var(--ink); }
@media (max-width: 820px) {
  .review { grid-template-columns: 1fr; }
  .stage { position: static; max-width: 420px; margin: 0 auto; }
  .decide { position: sticky; bottom: 0; background: var(--card); padding-bottom: 12px; margin-bottom: -12px; }
  .decide > form { flex: 1; }
  .decide > form .btn { width: 100%; }
}
.check { cursor: pointer; }
.check input[type=checkbox], .check input[type=radio] { flex: none; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--accent); }
.check:has(input[type=checkbox]) { align-items: flex-start; }
.check > span { flex: 1; min-width: 0; }
.narrow-form { max-width: 460px; }

/* Takvim: ay görünümü */
.monthnav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.monthnav strong { min-width: 130px; text-align: center; font-size: 16px; }
.monthnav .btn { padding: 2px 12px; font-size: 18px; line-height: 1.4; }
.monthnav .muted { margin-left: auto; font-size: 13px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dow { background: var(--card); padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.day { background: var(--card); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day.other { background: #fafbfc; }
.day.other .num { opacity: .45; }
.day.past { background: #f7f8fa; }
.day.over { outline: 2px dashed var(--accent); outline-offset: -3px; background: #eef4f8; }
.day .num { font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.day.today .num::first-letter { color: var(--accent); }
.day.today { box-shadow: inset 0 2px 0 var(--accent); }
.special { font-size: 10.5px; font-weight: 600; color: #b42318; }
.themebar { font-size: 10.5px; background: #e8f3f1; color: #23605a; border-radius: 4px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .chip { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; padding: 3px 5px; border-radius: 7px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: #fff; text-decoration: none; color: var(--ink); font-size: 11.5px; line-height: 1.25; cursor: pointer; min-width: 0; }
.month .chip img { grid-row: span 2; width: 26px; height: 26px; object-fit: cover; border-radius: 4px; }
.month .chip span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .chip small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .chip.f-reel { border-left-color: #a3195b; }
.month .chip.f-story { border-left-color: #b45309; }
.month .chip.s-pending { background: #fff8eb; }
.month .chip.s-published { opacity: .7; }
.month .chip.s-failed, .month .chip.s-partial { background: #fdecea; }
.month .chip.ghost { border-style: dashed; background: transparent; color: var(--muted); cursor: default; grid-template-columns: 1fr; }
.month .chip[draggable=true] { cursor: grab; }
.row.past { opacity: .55; }
@media (max-width: 820px) {
  .month { grid-template-columns: 1fr; }
  .dow, .day.other { display: none; }
  .day { min-height: 0; }
}
.month .chip span { padding: 0; border: 0; border-radius: 0; display: block; background: none; color: inherit; font-size: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; font-weight: 700; }
.stat span { color: var(--muted); font-size: 13px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.comment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.comment > img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.comment blockquote { margin: 6px 0 12px; padding: 8px 12px; background: var(--bg); border-radius: 8px; }
.scroll { overflow-x: auto; }
.notice.busy { color: var(--accent); background: #eef4f8; border-color: #cfe0ea; }
