/* Mavi Portal — arayüz */
:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --primary: #1f43b8;
  --primary-ink: #ffffff;
  --primary-soft: #eef2fd;
  --gold: #a8844c;
  --green: #067647;
  --green-soft: #ecfdf3;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --red: #b42318;
  --red-soft: #fef3f2;
  --blue: #175cd3;
  --blue-soft: #eff8ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre.code { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---- Kabuk ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: 0 0 236px; background: #0e1726; color: #cdd5df; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 16px; padding: 4px 10px 18px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #2b54d6, #18328f); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.brand-has-logo { padding: 0 2px 16px; }
.brand-logo { display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.brand-logo img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.brand-logo-light { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sidebar .brand-logo { width: 100%; min-height: 56px; padding: 10px 14px; }
.sidebar .brand-logo img { max-height: 40px; }
.sidebar .brand-logo-dark { padding: 6px 4px; }
.topbar-logo { display: none; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid var(--line, #e5e7eb); }
.logo-preview.on-dark { background: #0e1726; border-color: #0e1726; }
.logo-preview .brand-logo { padding: 10px 14px; }
.logo-preview img { max-height: 48px; max-width: 100%; }
.radio-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 10px; color: #cdd5df; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-link:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; color: #fff; }
.nav-badge-amber { background: #dc6803; }
.nav-badge-red { background: #d92d20; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.user-chip:hover { text-decoration: none; }
.user-chip span:last-child { display: flex; flex-direction: column; min-width: 0; }
.user-chip strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: #98a2b3; font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 650; flex: 0 0 32px; }
.sidebar .link-btn { color: #98a2b3; }
.main { flex: 1; min-width: 0; padding: 22px 28px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.topbar h1 { margin: 0; }
.topbar-user { display: none; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-nav { display: none; }

/* ---- Kart, ızgara ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-top { align-items: start; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 18px; }

/* ---- Düğmeler ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important; line-height: 1.3; }
.btn:hover { background: #f9fafb; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #193a9f; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #05603a; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-outline { color: var(--red); border-color: #fda29b; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }

/* ---- Rozet, uyarı ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge-gray { background: #f2f4f7; color: #344054; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: var(--green); border-color: #abefc6; }
.alert-error { background: var(--red-soft); color: var(--red); border-color: #fecdca; }
.alert-info { background: var(--blue-soft); color: var(--blue); border-color: #b2ddff; }
.alert-warn { background: var(--amber-soft); color: var(--amber); border-color: #fedf89; }
.alert ul { margin: 4px 0 0 18px; padding: 0; }

/* ---- Form ---- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.field > span { font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=number], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; width: 100%; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 67, 184, .15); }
.form-inline input { width: auto; flex: 1; min-width: 120px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--primary); }
.counter { font-size: 12px; color: var(--muted); text-align: right; font-weight: 400; }
.counter.over { color: var(--red); font-weight: 600; }

/* ---- Tablo ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-compact td { padding: 6px 8px; }
.table-wrap { overflow-x: auto; }

/* ---- İstatistik kutuları ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.delta-up { color: var(--green); font-weight: 600; }
.delta-down { color: var(--red); font-weight: 600; }

/* ---- Hesap kutuları ---- */
.acc { display: flex; align-items: center; gap: 12px; }
.acc img, .acc .acc-ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #eef0f3; flex: 0 0 40px; }
.acc-name { font-weight: 650; }
.acc-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.pi { width: 15px; height: 15px; vertical-align: -2px; }
.pi-ig { color: #c13584; }
.pi-tt { color: #111; }

/* ---- Grafik ---- */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---- Paylaşım listesi ---- */
.post-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #eef0f3; flex: 0 0 52px; }
.post-main { flex: 1; min-width: 0; }
.post-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.post-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.metric-inline { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.metric-inline b { font-weight: 650; }

/* ---- Yeni paylaşım ---- */
.compose { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dropzone { display: block; border: 2px dashed var(--line-2); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; background: #fafbfc; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone strong { color: var(--ink); display: block; margin-bottom: 2px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 12px; }
.media-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f2f4f7; aspect-ratio: 4 / 5; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .mi-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.media-item .mi-bar button { background: rgba(255,255,255,.92); border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; padding: 3px 7px; cursor: pointer; color: var(--ink); }
.media-item .mi-tag { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.media-item .mi-pos { position: absolute; top: 6px; right: 6px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.progress { height: 6px; background: #eaecf0; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.upload-row { font-size: 13px; margin-top: 8px; }
.target { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.target.on { border-color: #b4c3f0; background: #fbfcff; }
.target-head { display: flex; align-items: center; gap: 10px; }
.target-head .acc { flex: 1; }
.target-body { margin-top: 12px; display: none; }
.target.on .target-body { display: block; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg label { padding: 6px 11px; font-size: 13px; font-weight: 600; cursor: pointer; border-right: 1px solid var(--line-2); color: var(--ink-2); background: #fff; }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--primary); color: #fff; }
.seg label:has(input:disabled) { color: #b0b7c3; cursor: not-allowed; }
.preview-frame { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 360px; margin: 0 auto; }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; font-weight: 650; }
.preview-head .dot-av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.preview-media { background: #111; position: relative; }
.preview-media img, .preview-media video { width: 100%; display: block; }
.preview-cap { padding: 10px 12px 14px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.preview-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.sticky { position: sticky; top: 16px; }
.warnings { margin-top: 10px; }
.tt-box { background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tt-box .row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Kırpma penceresi */
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { background: #fff; border-radius: 14px; width: min(920px, 100%); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 10px; flex-wrap: wrap; }
.modal-body { padding: 12px 16px; overflow: auto; flex: 1; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.crop-wrap { max-height: 62vh; }
.crop-wrap img { max-width: 100%; display: block; }

/* ---- Takvim ---- */
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfc; }
.cal-day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 12px; background: #fff; }
.cal-day.out { background: #fafbfc; color: #b0b7c3; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-num { font-weight: 650; margin-bottom: 4px; display: block; }
.cal-item { display: flex; gap: 5px; align-items: center; border-radius: 6px; padding: 3px 5px; margin-bottom: 3px; color: var(--ink); background: #f2f4f7; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.cal-item:hover { text-decoration: none; filter: brightness(.97); }
.cal-item.st-published { background: var(--green-soft); }
.cal-item.st-scheduled, .cal-item.st-publishing, .cal-item.st-sending { background: var(--blue-soft); }
.cal-item.st-pending_approval { background: var(--amber-soft); }
.cal-item.st-failed, .cal-item.st-rejected, .cal-item.st-partial { background: var(--red-soft); }
.cal-item .pi { width: 12px; height: 12px; flex: 0 0 12px; }
.cal-list { display: none; }

/* ---- Yorumlar ---- */
.inbox { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-list { max-height: 75vh; overflow-y: auto; padding: 6px; }
.inbox-post { display: flex; gap: 10px; padding: 9px; border-radius: 10px; color: var(--ink); align-items: center; }
.inbox-post:hover { background: #f5f6f8; text-decoration: none; }
.inbox-post.active { background: var(--primary-soft); }
.inbox-post img, .inbox-post .ph { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #eef0f3; flex: 0 0 46px; }
.inbox-post .ip-main { min-width: 0; flex: 1; }
.inbox-post .ip-text { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-post .ip-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .c-av { width: 34px; height: 34px; border-radius: 50%; background: #eef0f3; flex: 0 0 34px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 650; color: var(--muted); }
.comment .c-main { flex: 1; min-width: 0; }
.comment .c-head { font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment .c-text { white-space: pre-wrap; word-break: break-word; margin: 2px 0 6px; }
.comment .c-actions { display: flex; gap: 12px; font-size: 13px; align-items: center; flex-wrap: wrap; }
.comment.hidden-c .c-text { color: var(--muted); font-style: italic; }
.replies { margin-left: 44px; border-left: 2px solid var(--line); padding-left: 12px; }
.replies .comment { padding: 8px 0; }
.reply-form { display: none; margin-top: 8px; gap: 8px; }
.reply-form.open { display: flex; }
.reply-form textarea { min-height: 60px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }

/* ---- Diğer ---- */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 4px; }
.qr { width: 200px; height: 200px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.qr img, .qr svg { width: 100%; height: 100%; }
.secret { background: #f2f4f7; padding: 2px 6px; border-radius: 4px; letter-spacing: .05em; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-top: 0; }
.list-menu { padding: 6px; }
.list-menu a, .list-menu button { display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--ink); border-radius: 8px; background: none; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
.list-menu a:hover, .list-menu button:hover { background: #f5f6f8; text-decoration: none; }
.list-menu svg { width: 20px; height: 20px; color: var(--muted); }
.list-menu .nav-badge { margin-left: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lib-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.lib-item .lib-img { aspect-ratio: 1; background: #eef0f3; position: relative; }
.lib-item .lib-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item .lib-meta { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.lib-item .lib-meta strong { color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.detail-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.detail-media img, .detail-media video { width: 100%; border-radius: 8px; display: block; background: #eef0f3; }
.kv { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.kv div span { display: block; font-size: 12px; color: var(--muted); }
.kv div b { font-size: 18px; }

/* ---- Giriş ---- */
.auth-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #e5ebfb 0, transparent 60%), var(--bg); }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: 100%; max-width: 400px; box-shadow: 0 12px 40px rgba(16,24,40,.08); }
.auth-card-wide { max-width: 760px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 20px; }

/* ---- Mobil ---- */
@media (max-width: 1100px) {
  .compose { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .sidebar { display: none; }
  .main { padding: 14px 14px 92px; }
  .topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0; margin: -8px 0 10px; }
  .topbar h1 { font-size: 19px; }
  .topbar-logo { display: flex; flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; }
  .topbar-logo img { max-height: 24px; max-width: 110px; }
  .topbar-logo.brand-logo-dark { background: #0e1726; }
  .topbar h1 { margin-right: auto; }
  .topbar-user { display: block; }
  .grid-2, .grid-3, .inbox { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .mobile-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 5px 0; position: relative; }
  .mobile-nav a:hover { text-decoration: none; }
  .mobile-nav a.active { color: var(--primary); }
  .mobile-nav svg { width: 22px; height: 22px; }
  .mobile-nav .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; }
  .dot-amber { background: #dc6803; }
  .dot-red { background: #d92d20; }
  .cal { display: none; }
  .cal-list { display: block; }
  .inbox-list { max-height: none; }
  .dl { grid-template-columns: 100px 1fr; }
  .table-stack thead { display: none; }
  .table-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table-stack td { display: block; border: 0; padding: 3px 0; }
}
@media (max-width: 480px) {
  .stats { gap: 10px; }
  .stat-value { font-size: 22px; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== v1.2: Profil, gönderi görünümü, istatistik ===== */
.crumbs { font-size: 13px; color: var(--muted); margin: -6px 0 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs .pi { width: 14px; height: 14px; vertical-align: -2px; }
.btn-ghost { background: transparent; border-color: transparent; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.txt-up { color: #067647; }
.txt-down { color: #b42318; }
.img-missing { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #eef0f3, #e4e7ec); }
body.modal-open { overflow: hidden; }

/* Değişim rozeti */
.delta { display: inline-block; font-size: 12px; font-weight: 650; padding: 1px 7px; border-radius: 999px; margin-top: 4px; }
.delta-up { background: #ecfdf3; color: #067647; }
.delta-down { background: #fef3f2; color: #b42318; }
.delta-flat, .delta-new { background: #f2f4f7; color: var(--muted); }

/* Profil */
.profile-card { padding-bottom: 12px; }
.profile-head { display: flex; gap: 28px; align-items: flex-start; }
.profile-avatar { flex: 0 0 120px; width: 120px; height: 120px; border-radius: 50%; padding: 4px; background: #e4e7ec; }
.profile-avatar.has-story { background: conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.profile-avatar img, .profile-avatar .img-missing { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; display: block; background: #fff; }
.profile-info { flex: 1; min-width: 0; }
.profile-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-title h2 { margin: 0; font-size: 22px; font-weight: 600; }
.platform-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; }
.platform-pill .pi { width: 14px; height: 14px; }
.pill-instagram { background: #fdf2fa; color: #c11574; }
.pill-tiktok { background: #f2f4f7; color: #101828; }
.profile-stats { list-style: none; padding: 0; margin: 14px 0 10px; display: flex; gap: 26px; flex-wrap: wrap; font-size: 15px; }
.profile-stats strong { font-weight: 700; }
.profile-name { font-weight: 650; }
.profile-bio { white-space: normal; margin-top: 2px; line-height: 1.45; }
.profile-link { display: inline-block; margin-top: 4px; font-weight: 600; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.profile-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.profile-kpis > div { display: flex; flex-direction: column; align-items: flex-start; }
.profile-kpis span { font-size: 12px; color: var(--muted); }
.profile-kpis strong { font-size: 20px; font-weight: 700; }

/* Hikayeler */
.story-row { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.story-bubble { flex: 0 0 auto; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; }
.story-bubble:hover { text-decoration: none; }
.story-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: #d0d5dd; display: block; }
.story-bubble.live .story-ring { background: conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.story-ring img, .story-ring .img-missing { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; display: block; }
.story-time { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.story-views { font-size: 11px; font-weight: 650; }

/* Gönderi ızgarası */
.tabs-center { justify-content: center; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.pg-cell { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #eef0f3; border-radius: 2px; }
.post-grid-tall .pg-cell { aspect-ratio: 3 / 4; }
.pg-cell img, .pg-cell .img-missing { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pg-cell:hover img { transform: scale(1.03); }
.pg-type { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pg-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px; background: rgba(16, 24, 40, .45); color: #fff; font-weight: 700; font-size: 15px; opacity: 0; transition: opacity .15s; }
.pg-cell:hover .pg-over, .pg-cell:focus-visible .pg-over { opacity: 1; }

/* Pencere */
.modal-backdrop { position: absolute; inset: 0; }
.modal .modal-box { position: relative; }
.modal-wide { width: min(1080px, 100%); }
.modal-close { position: absolute; top: 8px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.pv-loading { padding: 60px; text-align: center; color: var(--muted); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #d0d5dd; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Gönderi ayrıntısı */
.pv { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
.pv-media { position: relative; background: #0b0f17; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 320px; max-height: 78vh; }
.pv-media > img, .pv-media > video, .pv-media .slide img, .pv-media .slide video { max-width: 100%; max-height: 78vh; width: 100%; object-fit: contain; display: block; }
.pv-tall, .pv-story { aspect-ratio: 9 / 16; max-height: 78vh; justify-self: center; width: 100%; max-width: 440px; }
.pv-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 54px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); text-decoration: none; }
.pv-play:hover { text-decoration: none; background: rgba(0,0,0,.15); }
.slider { position: relative; width: 100%; height: 100%; }
.slider .slide { display: none; }
.slider .slide.active { display: flex; align-items: center; justify-content: center; height: 100%; }
.sl-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); font-size: 22px; cursor: pointer; }
.sl-prev { left: 8px; } .sl-next { right: 8px; }
.sl-count { position: absolute; top: 8px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pv-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; max-height: 80vh; overflow-y: auto; padding-right: 4px; }
.pv-head { display: flex; align-items: center; gap: 8px; padding-right: 36px; }
.pv-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.pv-caption { white-space: normal; background: #f9fafb; border-radius: 8px; padding: 10px 12px; font-size: 14px; max-height: 180px; overflow-y: auto; }
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.mbox { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mbox span { display: block; font-size: 11.5px; color: var(--muted); }
.mbox strong { font-size: 17px; font-weight: 700; }
.h-sub { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 14px 0 6px; text-transform: none; }
.pv-comments { border-top: 1px solid var(--line); }
.pv-newc { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.pv-newc textarea { flex: 1; }

/* Yatay çubuklar */
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 9px; background: #f2f4f7; border-radius: 999px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 999px; }
.hb-val { font-weight: 650; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.hb-val small { color: var(--muted); font-weight: 500; }

/* İstatistik sayfası */
.an-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.acc-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; }
.acc-chip:hover { text-decoration: none; border-color: var(--line-2); }
.acc-chip.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.acc-chip-av, .acc-chip .img-missing { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.acc-chip span { display: flex; flex-direction: column; line-height: 1.2; }
.acc-chip small { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 3px; }
.acc-chip small .pi { width: 12px; height: 12px; }
.an-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.an-controls form { margin: 0; }
.an-range { margin: 0 0 14px; }
.seg { display: inline-flex; background: #f2f4f7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.seg-sm a { padding: 3px 9px; font-size: 12px; }
.highlights ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.hl-ico { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: #f2f4f7; color: var(--muted); margin-top: 1px; }
.hl-up .hl-ico { background: #ecfdf3; color: #067647; }
.hl-down .hl-ico { background: #fef3f2; color: #b42318; }
.hl-warn .hl-ico { background: #fffaeb; color: #b54708; font-weight: 800; }
.hl-time .hl-ico, .hl-info .hl-ico { background: var(--primary-soft); color: var(--primary); }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi strong { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.kpi small { font-size: 12px; margin-top: 2px; }
.mini-kpis { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.mini-kpis span { display: block; font-size: 12px; color: var(--muted); }
.mini-kpis strong { font-size: 19px; }
.gl-summary { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.gl-summary strong { font-size: 18px; margin-left: 4px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot-up { background: #12b76a; } .dot-down { background: #f04438; }
.gl-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #f2f4f7; margin: 10px 0 4px; }
.gl-up { background: #12b76a; } .gl-down { background: #f04438; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.legend i.dashed { background: repeating-linear-gradient(90deg, #98a2b3 0 5px, transparent 5px 9px); }
.demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.heatmap-wrap { overflow-x: auto; }
.heatmap { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; font-size: 11px; }
.heatmap th { color: var(--muted); font-weight: 600; text-align: center; padding: 0 2px; }
.heatmap tbody th { text-align: left; padding-right: 6px; }
.heatmap td { height: 22px; border-radius: 4px; }
.heatmap td.hm-empty { background: #f9fafb; }
.online-top { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.top-posts .tp-thumb { width: 52px; }
.top-posts .tp-thumb img, .top-posts .tp-thumb .img-missing { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.plain { list-style: none; margin: 0; padding: 0; }
.people li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
details.weak { margin-top: 12px; }
details.weak summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.callout { border-left: 4px solid #101828; }
.checks { padding-left: 18px; margin: 8px 0; }
.checks li { margin: 3px 0; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pv { grid-template-columns: minmax(0, 1fr); }
  .pv-media { min-height: 220px; max-height: 60vh; }
  .pv-side { max-height: none; overflow: visible; }
  .highlights ul { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 0; align-items: stretch; }
  .modal-wide { width: 100%; max-height: 100vh; border-radius: 0; }
}
@media (max-width: 600px) {
  .profile-head { gap: 16px; }
  .profile-avatar { flex-basis: 84px; width: 84px; height: 84px; }
  .profile-title h2 { font-size: 18px; }
  .profile-stats { gap: 14px; font-size: 14px; }
  .profile-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { gap: 2px; }
  .pg-over { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi strong { font-size: 20px; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-controls { width: 100%; }
  .hbars li { grid-template-columns: minmax(80px, 42%) 1fr auto; }
}
.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; position: relative; }
.stat-link:hover { text-decoration: none; border-color: var(--line-2); box-shadow: 0 2px 10px rgba(16,24,40,.06); }
.stat-go { position: absolute; right: 14px; bottom: 12px; font-size: 12.5px; font-weight: 650; color: var(--primary); }
.post-row-link { color: inherit; text-decoration: none; }
.post-row-link:hover { text-decoration: none; background: #f9fafb; }
.post-row-link .post-title { color: var(--ink); font-weight: 600; }
img.post-thumb { object-fit: cover; }
.post-thumb.img-missing { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 8px; }
.pv-side > * { flex-shrink: 0; }
.pv-newc textarea { min-height: 46px; height: 46px; }
.heatmap { table-layout: fixed; }
.heatmap thead th:first-child, .heatmap tbody th { width: 36px; }
.heatmap thead th { overflow: visible; white-space: nowrap; font-size: 10px; }
.post-grid { max-width: 980px; margin: 0 auto; }

/* ===== Portal içinde (iframe) görünüm ===== */
body.embed { background: #fff; }
.embed-shell { display: block; min-height: 0; }
.embed .main { padding: 0 18px 40px; }
.embed-nav { position: sticky; top: 0; z-index: 30; display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); margin: 0 -18px 16px; padding: 8px 14px 0; scrollbar-width: thin; }
.embed-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 10px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.embed-nav a:hover { color: var(--ink); text-decoration: none; }
.embed-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.embed-nav svg { width: 17px; height: 17px; flex: 0 0 17px; }
.embed-nav .nav-badge { margin-left: 2px; }
.embed .topbar { position: static; margin: 0 0 14px; padding: 0; background: none; }
.embed .topbar h1 { font-size: 20px; }
.embed .topbar-logo { display: none !important; }
.embed .auth-main { min-height: 0; padding-top: 30px; }
@media (max-width: 860px) {
  .embed .main { padding: 0 10px 30px; }
  .embed-nav { margin: 0 -10px 12px; padding: 6px 6px 0; }
  .embed-nav a span { font-size: 13px; }
}
