/* Sosyal Medya Paneli — koyu tema tasarım sistemi (derleme adımı yok) */
:root {
  --bg: #14161b;
  --bg-2: #181b21;
  --surface: #1e2129;
  --surface-2: #252935;
  --surface-3: #2d3241;
  --border: #2e3340;
  --border-strong: #3d4354;
  --text: #eceef3;
  --text-2: #c3c8d4;
  --muted: #9aa1b0;
  --primary: #6c5ce7;
  --primary-hover: #7d6ff0;
  --primary-soft: rgba(124, 111, 240, .16);
  --primary-text: #b4abfa;
  --success: #3fb27f;
  --success-soft: rgba(63, 178, 127, .14);
  --warning: #d6a246;
  --warning-soft: rgba(214, 162, 70, .14);
  --danger: #e5625c;
  --danger-soft: rgba(229, 98, 92, .14);
  --info: #5b9cf0;
  --info-soft: rgba(91, 156, 240, .14);
  --sim: #45b3c4;
  --sim-soft: rgba(69, 179, 196, .14);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  --focus: 0 0 0 3px rgba(156, 143, 255, .55);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
ul { margin: 0; padding-left: 1.2em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: .9rem; }
.xsmall { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 6px; }
.stack-lg > * + * { margin-top: 20px; }

:focus { outline: none; }
:focus-visible { outline: 2px solid #a99ff9; outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav-link:focus-visible, .dropzone:focus-within { outline: none; box-shadow: var(--focus); }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- İkonlar ---------- */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.pf { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; flex: none; color: #fff; }
.pf .icon { width: 17px; height: 17px; }
.pf-sm { width: 24px; height: 24px; border-radius: 6px; }
.pf-sm .icon { width: 14px; height: 14px; }
.pf-instagram { background: #b5367a; }
.pf-facebook { background: #2d6ad8; }
.pf-tiktok { background: #23262e; border: 1px solid #454b5a; }
.pf-youtube { background: #c8312b; }
.pf-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.brand-mark .icon { width: 19px; height: 19px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 550; text-decoration: none;
}
.nav-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--primary-soft); color: #fff; }
.nav-link[aria-current="page"] .icon { color: var(--primary-text); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 32px; }
.nav-sub a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: .92rem; min-height: 36px; display: flex; align-items: center; }
.nav-sub a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-sub a[aria-current="page"] { color: var(--text); background: var(--surface); }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.project-select { display: flex; align-items: center; gap: 8px; min-width: 0; }
.project-select select { min-width: 200px; max-width: 320px; }
.content { padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.scrim { display: none; }

/* Deneme modu rozeti */
.mode-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--warning-soft); color: #f0c66f; border: 1px solid rgba(214, 162, 70, .35); white-space: nowrap; }
.mode-pill.live { background: var(--success-soft); color: #74d3a5; border-color: rgba(63, 178, 127, .35); }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-flat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

.stat { display: flex; align-items: center; gap: 14px; }
.stat .num { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); }
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-icon.primary { background: var(--primary-soft); color: var(--primary-text); }
.stat-link { color: inherit; display: block; }
.stat-link:hover { text-decoration: none; border-color: var(--border-strong); }

/* ---------- Form ---------- */
label.field, .field { display: block; }
.field > .label, .label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=password], input[type=url], input[type=search], input[type=date], input[type=datetime-local], input[type=email], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; font-size: 1rem; background: var(--bg-2); color: var(--text);
}
input::placeholder, textarea::placeholder { color: #7a8191; }
input:hover, select:hover, textarea:hover { border-color: #4d5468; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1b0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
input[type=color] { width: 46px; height: 46px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-2); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; flex: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { display: none; color: #f08f8a; font-size: .88rem; margin-top: 6px; font-weight: 550; }
.field-error.show { display: flex; gap: 6px; align-items: flex-start; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check > input { margin-top: 2px; }
.check-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); cursor: pointer; min-height: 56px; }
.check-card:hover { border-color: var(--border-strong); }
.check-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.check-card.disabled { opacity: .55; cursor: not-allowed; }
.counter { font-size: .82rem; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.over { color: var(--danger); font-weight: 700; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 6px; margin: 0; }
legend { padding: 0 6px; font-size: .92rem; font-weight: 600; color: var(--text-2); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg a, .seg button { min-height: 38px; padding: 7px 14px; border-radius: 8px; color: var(--text-2); font-weight: 600; background: transparent; border: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; }
.seg a:hover, .seg button:hover { color: var(--text); text-decoration: none; }
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: var(--surface-3); color: #fff; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; font-size: .97rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: transparent; color: #f08f8a; border-color: rgba(229, 98, 92, .5); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger-solid { background: #c94a45; border-color: #c94a45; color: #fff; }
.btn-danger-solid:hover { background: #d6534e; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn { min-width: 44px; padding: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
.badge .dot { width: 7px; height: 7px; }
.b-neutral { background: var(--surface-3); color: var(--text-2); }
.b-primary { background: var(--primary-soft); color: var(--primary-text); }
.b-success { background: var(--success-soft); color: #74d3a5; }
.b-warning { background: var(--warning-soft); color: #f0c66f; }
.b-danger { background: var(--danger-soft); color: #f29a95; }
.b-info { background: var(--info-soft); color: #93bdf6; }
.b-sim { background: var(--sim-soft); color: #86d3df; }
.b-outline { border-color: var(--border-strong); color: var(--text-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: currentColor; }
.st-draft { color: var(--text-2); } .st-scheduled { color: #93bdf6; } .st-processing { color: var(--primary-text); }
.st-published { color: #74d3a5; } .st-simulated { color: #86d3df; } .st-failed { color: #f29a95; }
.st-needs_check { color: #f0c66f; } .st-cancelled { color: var(--muted); }

/* ---------- Uyarı kutuları ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 10px; border: 1px solid; white-space: pre-line; }
.alert .icon { margin-top: 2px; }
.alert-danger { background: var(--danger-soft); border-color: rgba(229, 98, 92, .4); color: #f6c2bf; }
.alert-warning { background: var(--warning-soft); border-color: rgba(214, 162, 70, .4); color: #f3dba8; }
.alert-info { background: var(--info-soft); border-color: rgba(91, 156, 240, .4); color: #c9dcfa; }
.alert-success { background: var(--success-soft); border-color: rgba(63, 178, 127, .4); color: #b9e8cf; }
.alert a { color: inherit; text-decoration: underline; }

/* ---------- Boş durum / yükleniyor ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.empty h3 { color: var(--text); }
.skeleton { background: var(--surface-2); border-radius: 8px; height: 16px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px 0; }

/* ---------- Listeler ---------- */
.item-list { display: flex; flex-direction: column; }
.item { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--border); color: inherit; min-height: 64px; }
.item:first-child { border-top: 0; }
a.item:hover { text-decoration: none; background: var(--surface-2); border-radius: 10px; }
.item .meta { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.time-chip { min-width: 64px; text-align: center; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); font-weight: 700; line-height: 1.2; }
.time-chip small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }

.post-card { display: block; color: inherit; }
.post-card:hover { text-decoration: none; border-color: var(--border-strong); }
.target-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.target-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: .88rem; background: var(--bg-2); }

.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.filters .field, .date-range .field { min-width: 0; }
.filters input[type=date] { min-width: 0; }

/* ---------- Takvim ---------- */
.cal-wrap { overflow: hidden; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: .82rem; font-weight: 650; color: var(--muted); text-align: center; padding: 4px 0 6px; }
.cal .day { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; min-height: 118px; padding: 7px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.cal .day:hover { border-color: var(--border-strong); }
.cal .day.other { opacity: .45; }
.cal .day.today .num { background: var(--primary); color: #fff; }
.cal .day.selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal .num { font-size: .85rem; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.cal-chip { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 7px; background: var(--surface-2); font-size: .78rem; min-width: 0; border-left: 3px solid currentColor; }
.cal-chip .t { font-weight: 700; color: var(--text); }
.cal-chip .n { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal .dots .dot { width: 7px; height: 7px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Yeni paylaşım ---------- */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 22px; align-items: start; }
.compose-side { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex: none; }
.dropzone { position: relative; border: 2px dashed var(--border-strong); border-radius: 12px; padding: 34px 20px; text-align: center; background: var(--bg-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .btn { position: relative; z-index: 1; pointer-events: none; }
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.video-box { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.preview { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; object-fit: contain; display: block; }
.preview-lg { max-height: 62vh; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.acc-group + .acc-group { margin-top: 16px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.target-card { border-left: 3px solid var(--border-strong); }
.target-card.t-instagram { border-left-color: #b5367a; }
.target-card.t-facebook { border-left-color: #2d6ad8; }
.target-card.t-tiktok { border-left-color: #7d8496; }
.target-card.t-youtube { border-left-color: #c8312b; }
.target-card + .target-card { margin-top: 14px; }
details.more { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 10px; }
details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; min-height: 40px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary .chev { transform: rotate(90deg); }
.chev { transition: transform .15s; }
.summary-list { display: flex; flex-direction: column; gap: 8px; }
.summary-row { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.summary-row .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-actions { display: none; }
.error-summary { scroll-margin-top: calc(var(--topbar-h) + 20px); }
.error-summary ul { margin-top: 6px; }
.error-summary button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; text-align: left; }

/* ---------- Tablo ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.table-scroll { overflow-x: auto; }

/* Olay geçmişi */
.events { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 150px 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; align-items: start; }
.ev time { color: var(--muted); }
.ev.warn .msg { color: #f0c66f; } .ev.error .msg { color: #f29a95; }

/* Entegrasyon */
.integration { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-2); }
.integration + .integration { margin-top: 12px; }
.integration > summary { cursor: pointer; font-weight: 650; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 36px; }
.integration ul { margin: 6px 0 10px; }
.approval { border-left: 3px solid var(--warning); padding: 6px 12px; margin: 8px 0; background: var(--surface); border-radius: 0 8px 8px 0; }

/* Video kütüphanesi */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

/* ---------- Diyalog ---------- */
dialog { border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0; width: min(94vw, 520px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 6, 9, .72); }
.dlg-body { padding: 22px; }
.dlg-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.dlg-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--primary-soft); color: var(--primary-text); }
.dlg-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }

/* ---------- Bildirimler ---------- */
.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(92vw, 400px); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); color: var(--text); padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: var(--shadow); white-space: pre-line; border-left: 4px solid var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast .icon { margin-top: 2px; }
.toast.ok .icon { color: var(--success); } .toast.err .icon { color: var(--danger); }

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: min(100%, 420px); }
.login-card .brand { padding: 0 0 22px; justify-content: center; font-size: 1.15rem; }


/* ---------- Ek bileşenler ---------- */
.sidebar-foot .mode-pill { white-space: normal; border-radius: 10px; align-items: flex-start; line-height: 1.35; }
.sidebar-foot .mode-pill .icon { margin-top: 2px; }
.item .title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item .meta { min-width: 0; }
.badges { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sub-line { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; }
.sub-line > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.date-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; grid-column: span 2; }
.month-title { text-transform: capitalize; min-width: 150px; text-align: center; }
.project-swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; margin-top: 4px; }
.compose-form { min-width: 0; }
.topbar-mode { display: inline-flex; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .compose { grid-template-columns: minmax(0, 1fr); }
  .compose-side { position: static; }
  /* Tek sütunda özet aşağı iner; eylemler her zaman erişilebilir olsun diye alt çubukta sabitlenir */
  .compose-side .desktop-actions { display: none; }
  .mobile-actions {
    display: flex; gap: 10px; justify-content: flex-end; position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; z-index: 25;
    padding: 12px 28px calc(12px + env(safe-area-inset-bottom)); background: var(--bg-2); border-top: 1px solid var(--border);
  }
  .mobile-actions .btn { min-width: 170px; }
  .has-mobile-actions .content { padding-bottom: 100px; }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); visibility: hidden; }
  .shell.nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 6, 9, .6); z-index: 35; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .new-btn-text { display: none; }
  .topbar-spacer { display: none; }
  .mobile-actions { left: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .project-select select { min-width: 0; width: 100%; max-width: none; }
  .project-select { flex: 1; }
  .project-select .label-text { display: none; }
  .content { padding: 18px 16px 28px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.4rem; }
}
@media (max-width: 640px) {
  .topbar-mode .mode-text { display: none; }
  .topbar-mode .mode-pill { padding: 6px 9px; }
  .hide-sm { display: none !important; }
  .item { flex-wrap: wrap; }
  .item:has(> .time-chip) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; }
  .item:has(> .time-chip) > .badges { grid-column: 2; justify-self: start; justify-content: flex-start; }
  .item > .meta { flex-basis: 60%; }
  .stat-icon { display: none; }
  .project-select select { min-width: 120px; }
  .grid-stats { gap: 12px; }
  .stat .num { font-size: 1.5rem; }
  .stat-icon { width: 38px; height: 38px; }
  .card { padding: 16px; }
  .month-title { min-width: 0; font-size: 1.05rem; }
  .cal .day { min-height: 58px; padding: 5px; align-items: center; }
  .cal .cal-chip, .cal .more-n { display: none; }
  .cal .dots { display: flex; justify-content: center; }
  .cal { gap: 4px; }
  .video-box { grid-template-columns: 110px minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .date-range { grid-column: auto; }
  .ev { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .toasts { top: auto; bottom: 92px; right: 50%; transform: translateX(50%); }
  .dlg-actions .btn { flex: 1; }
  .mobile-actions .btn { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
