/* Reklam Yönet — düz, sade gelen kutusu. Tüm renkler token. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #F1F3F6; --line: #E4E7EC; --line-strong: #D0D5DD;
  --text: #101828; --text-2: #475467; --text-3: #667085;
  --primary: #4F46E5; --primary-press: #4338CA; --on-primary: #FFFFFF; --primary-soft: #EEF2FF;
  --fb: #1877F2; --ig: #D62976; --ok: #067647; --ok-soft: #ECFDF3; --warn: #B54708; --warn-soft: #FFFAEB;
  --danger: #D92D20; --danger-soft: #FEF3F2; --scrim: rgba(16, 24, 40, .5);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1116; --surface: #161B22; --surface-2: #1E242D; --line: #272E38; --line-strong: #353D49;
    --text: #F2F4F7; --text-2: #C2C8D0; --text-3: #98A2B3;
    --primary: #818CF8; --primary-press: #6366F1; --on-primary: #0E1116; --primary-soft: #1E2140;
    --fb: #4C9AFF; --ig: #F0569B; --ok: #47CD89; --ok-soft: #0F2A1E; --warn: #FDB022; --warn-soft: #2B2111;
    --danger: #F97066; --danger-soft: #2D1615; --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; transition: background .15s, border-color .15s, opacity .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:active { background: var(--primary-press); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; display: grid; gap: 14px; }
.login-card h1 { margin: 8px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-card .sub { margin: -8px 0 4px; color: var(--text-3); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: var(--on-primary); }
.logo-mark svg.i { width: 18px; height: 18px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea, .field select, .input { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 16px; font-weight: 400; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-err { margin: 0; min-height: 1.2em; color: var(--danger); font-size: 14px; }
.hint { margin: 0; color: var(--text-3); font-size: 13px; font-weight: 400; }

/* shell */
.shell { min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: calc(var(--safe-t) + 12px) 16px 10px; display: grid; gap: 12px; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; }
.top-title { flex: 1; min-width: 0; }
.top-title h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.top-actions { display: flex; gap: 8px; }
.sync { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; min-height: 28px; border: 0; background: none; color: var(--text-3); font-size: 13px; }
.sync svg.i { width: 14px; height: 14px; }
.sync.spin svg.i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: none; display: grid; place-items: center; }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--r); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.count { font-size: 12px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.seg button[aria-selected="true"] .count { color: var(--primary); }

.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text-3); transition: border-color .15s; }
.search:focus-within { border-color: var(--primary); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); padding: 10px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -2px 0 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chip svg.i { width: 14px; height: 14px; }

/* issues */
#issues { padding: 12px 16px 0; display: grid; gap: 8px; }
#issues:empty { display: none; }
.issue { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--warn-soft); color: var(--warn); border-radius: var(--r); font-size: 13px; }
.issue b { display: block; font-weight: 700; }
.issue span { color: var(--text-2); }

/* list */
.list { padding: 12px 16px calc(24px + var(--safe-b)); display: grid; gap: 10px; }
.more { text-align: center; padding: 0 16px calc(24px + var(--safe-b)); }
.empty { text-align: center; padding: 56px 24px; color: var(--text-3); }
.empty .empty-ic { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--text-3); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; transition: border-color .15s; }
.card.is-hidden { background: var(--surface-2); }
.card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.av { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; flex: none; }
.av .plat { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--surface); color: #fff; }
.av .plat svg.i { width: 10px; height: 10px; stroke-width: 2.4; }
.plat.fb { background: var(--fb); } .plat.ig { background: var(--ig); }
.who { min-width: 0; flex: 1; }
.who b { display: block; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge svg.i { width: 12px; height: 12px; stroke-width: 2.4; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.hid { background: var(--warn-soft); color: var(--warn); }
.text { font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.text.muted { color: var(--text-3); font-style: italic; }
.att { max-width: 180px; max-height: 180px; border-radius: var(--r-sm); object-fit: cover; }
.thread { display: grid; gap: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.rep { font-size: 14px; color: var(--text-2); }
.rep b { color: var(--text); font-weight: 700; margin-right: 4px; }
.rep.mine b { color: var(--primary); }
.ctx { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.ctx img, .ctx .ph { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line); }
.ctx div { min-width: 0; font-size: 12px; color: var(--text-3); line-height: 1.35; }
.ctx div b { display: block; color: var(--text-2); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts { display: flex; gap: 8px; }
.act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 14px; transition: background .15s, color .15s, border-color .15s; }
.act:active { background: var(--surface-2); }
.act.primary { flex: 1.4; background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.act.icon-only { flex: 0 0 44px; }
.act.danger { color: var(--danger); }
a.act { text-decoration: none; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 1.45; }
.note span { color: var(--text-2); }
.ext { display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px -4px 0; border-radius: var(--r-sm); color: var(--text-3); flex: none; }
.ext:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 380px) { .act { font-size: 13px; gap: 4px; } .act svg.i { width: 16px; height: 16px; } }
.act.on { color: var(--ok); border-color: var(--ok); }

.skel { height: 168px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sh 1.2s ease-in-out infinite; border: 1px solid var(--line); }
@keyframes sh { to { background-position: -200% 0; } }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease-out; }
.sheet-panel { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px 20px 0 0; animation: up .22s ease-out; }
.sheet-grab { width: 36px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px 8px 20px; }
.sheet-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sheet-head .icon-btn { border: 0; }
.sheet-body { overflow-y: auto; padding: 4px 20px calc(20px + var(--safe-b)); display: grid; gap: 14px; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.quote { padding: 12px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; }
.quote b { display: block; margin-bottom: 2px; }
.qchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.qchip { min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.qchip:active { background: var(--primary-soft); }
textarea.input { min-height: 112px; resize: vertical; line-height: 1.5; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.menu { display: grid; gap: 4px; }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border: 0; border-radius: var(--r); background: none; text-align: left; font-weight: 600; color: var(--text); }
.menu-item:active, .menu-item:hover { background: var(--surface-2); }
.menu-item svg.i { color: var(--text-3); }
.menu-item.danger, .menu-item.danger svg.i { color: var(--danger); }
.menu-item .sp { flex: 1; }
.menu-item .meta { color: var(--text-3); font-weight: 500; font-size: 13px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-align: left; width: 100%; }
.opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.opt .sp { flex: 1; }
.opt .ck { color: var(--primary); visibility: hidden; }
.opt[aria-pressed="true"] .ck { visibility: visible; }
.grp { display: grid; gap: 8px; }
.grp-t { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; }
.toggle input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--primary); }
.toggle input:checked::after { transform: translateX(18px); }
.item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-head b { flex: 1; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); }
.log { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log small { color: var(--text-3); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r); background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; animation: up .2s ease-out; }
.toast.bad { background: var(--danger); color: #fff; }

/* desktop */
@media (min-width: 960px) {
  .mobile-only { display: none !important; }
  .shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 20px 12px; border-right: 1px solid var(--line); background: var(--surface); }
  .side-logo { padding: 4px 8px 16px; }
  .side-sec { padding: 16px 12px 6px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-weight: 600; text-align: left; transition: background .15s, color .15s; }
  .side-nav button:hover { background: var(--surface-2); }
  .side-nav button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }
  .side-nav button .sp { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-nav .pic { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--line); }
  .side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .user-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 8px; border: 0; border-radius: var(--r); background: none; text-align: left; font-weight: 700; }
  .user-btn:hover { background: var(--surface-2); }
  .user-btn small { display: block; color: var(--text-3); font-weight: 500; font-size: 12px; }
  .top { padding: 20px 32px 14px; grid-template-columns: 1fr minmax(260px, 380px); align-items: center; }
  .top-row { grid-column: 1; }
  .search { grid-column: 2; grid-row: 1; }
  .top-title h1 { font-size: 26px; }
  #issues { padding: 16px 32px 0; max-width: 832px; }
  .list { padding: 16px 32px 40px; max-width: 832px; }
  .more { max-width: 832px; }
  .card { padding: 18px; }
  .act:hover { background: var(--surface-2); }
  .act.primary:hover { background: var(--primary-press); }
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { border-radius: 20px; max-height: 86dvh; }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 16px; }
}
@media (min-width: 1400px) { .list, #issues, .more { max-width: 900px; } }
.doc { max-width: 680px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.doc h2 { font-size: 18px; margin-top: 28px; }
.doc p { color: var(--text-2); }
