/* İçerik Stüdyosu — Zenrota tasarım dili (GMR / Social Publisher ile ortak).
   Tüm renkler token; koyu tema [data-theme="dark"] ya da sistem tercihiyle. */

:root {
  --red: #d8291c; --red-d: #b11f14; --red-l: #ec3c28; --red-xl: #ff5a45; --ink: #1c1c24;
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --surface-3: #f1f1f4;
  --border: #ececef;
  --border-strong: #dcdce2;
  --text: #24252b;
  --text-2: #4a4e57;
  --text-3: #80858e;
  --accent: #d8291c;
  --accent-hover: #b11f14;
  --accent-soft: #fce9e7;
  --accent-text: #ffffff;
  --link: #c4241a;
  --info: #1f63c7;    --info-soft: #e8f0fc;
  --success: #157a41; --success-soft: #e4f4ea;
  --warning: #a84d05; --warning-soft: #fdf0e1;
  --danger: #b11f14;  --danger-soft: #fce9e7;
  --violet: #6b3fc4;  --violet-soft: #efe9fb;
  /* 3B ikon renkleri */
  --c-red: #cf3b2f; --c-orange: #d9752e; --c-amber: #d49a2a; --c-green: #3f9466; --c-teal: #3b8f88;
  --c-blue: #4677c4; --c-indigo: #5b62b8; --c-purple: #8160b0; --c-pink: #c25a7c; --c-slate: #6b707c;
  --shadow-sm: 0 1px 2px rgba(28,28,36,.05), 0 4px 16px -6px rgba(28,28,36,.10);
  --shadow: 0 2px 6px rgba(28,28,36,.06), 0 18px 40px -16px rgba(28,28,36,.22);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 252px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --focus: 0 0 0 3px rgba(216,41,28,.25);
  --diff-add: #e2f5e8; --diff-del: #fde5e2;
  --glass: rgba(255,255,255,.72);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171b; --surface: #1d1e23; --surface-2: #222328; --surface-3: #2a2b31;
    --border: #2d2e35; --border-strong: #3b3c44;
    --text: #e3e4e8; --text-2: #a9acb4; --text-3: #7f838c;
    --accent: #e0574c; --accent-hover: #ea6a60; --accent-soft: #2e2121; --accent-text: #ffffff; --link: #f08a80;
    --info: #8fb3e8; --info-soft: #1c2533;
    --success: #6cbf8f; --success-soft: #1a2a21;
    --warning: #e3a868; --warning-soft: #2e2519;
    --danger: #ec8b82; --danger-soft: #2e2121;
    --violet: #b4a6e3; --violet-soft: #25222f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px -8px rgba(0,0,0,.6);
    --shadow: 0 2px 6px rgba(0,0,0,.4), 0 22px 44px -18px rgba(0,0,0,.8);
    --diff-add: #15301f; --diff-del: #3a1c19; --glass: rgba(26,26,34,.72);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16171b; --surface: #1d1e23; --surface-2: #222328; --surface-3: #2a2b31;
  --border: #2d2e35; --border-strong: #3b3c44;
  --text: #e3e4e8; --text-2: #a9acb4; --text-3: #7f838c;
  --accent: #e0574c; --accent-hover: #ea6a60; --accent-soft: #2e2121; --accent-text: #ffffff; --link: #f08a80;
  --info: #8fb3e8; --info-soft: #1c2533;
  --success: #6cbf8f; --success-soft: #1a2a21;
  --warning: #e3a868; --warning-soft: #2e2519;
  --danger: #ec8b82; --danger-soft: #2e2121;
  --violet: #b4a6e3; --violet-soft: #25222f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px -8px rgba(0,0,0,.6);
  --shadow: 0 2px 6px rgba(0,0,0,.4), 0 22px 44px -18px rgba(0,0,0,.8);
  --diff-add: #15301f; --diff-del: #3a1c19; --glass: rgba(26,26,34,.72);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; } h2 { font-size: 18px; font-weight: 700; } h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 .75em; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: color-mix(in srgb, var(--red) 25%, transparent); }
[x-cloak] { display: none !important; }
.icon { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-lg { width: 21px; height: 21px; }

/* ================================================================ 3B ikon rozetleri */
.ico3d {
  --s: 36px; --c: var(--c-red);
  width: var(--s); height: var(--s); flex: 0 0 var(--s); border-radius: calc(var(--s) * .3); display: inline-grid; place-items: center;
  background:
    radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(150deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 85%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.15),
              0 calc(var(--s) * .12) calc(var(--s) * .3) calc(var(--s) * -.14) color-mix(in srgb, var(--c) 55%, transparent);
  color: #fff; position: relative; transform: translateZ(0);
}
.ico3d .icon { width: 56%; height: 56%; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); vertical-align: 0; }
.ico3d.flat { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); box-shadow: none; }
.ico3d.sm { --s: 28px; } .ico3d.lg { --s: 50px; } .ico3d.xl { --s: 60px; }
.c-red { --c: var(--c-red); } .c-orange { --c: var(--c-orange); } .c-amber { --c: var(--c-amber); } .c-green { --c: var(--c-green); }
.c-teal { --c: var(--c-teal); } .c-blue { --c: var(--c-blue); } .c-indigo { --c: var(--c-indigo); } .c-purple { --c: var(--c-purple); }
.c-pink { --c: var(--c-pink); } .c-slate { --c: var(--c-slate); }

/* ================================================================ yerleşim */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 3px;
}
.brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 16px; color: var(--text); text-decoration: none !important; }
.brand img { height: 22px; width: auto; align-self: flex-start; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
.brand-sub { font-size: 10.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: #fff; box-shadow: 0 8px 18px -8px rgba(216,41,28,.8); }
.brand-mark img { width: 20px; height: 20px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 12px;
  color: var(--text-2); font-weight: 560; transition: background .18s, color .18s, transform .18s; position: relative;
}
.nav-link .ico3d { --s: 28px; background: var(--surface-3); color: var(--text-2); box-shadow: none; }
.nav-link .ico3d .icon { filter: none; width: 54%; height: 54%; }
.nav-link:hover .ico3d { color: var(--text); }
.nav-link.active .ico3d { background: var(--accent); color: #fff; box-shadow: 0 4px 10px -6px var(--accent); }
.nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link .count {
  margin-left: auto; font-size: 11.5px; min-width: 22px; text-align: center; border-radius: 999px; padding: 1px 7px; font-weight: 700; color: #fff;
  background: var(--accent);
}
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--text); border-radius: 12px; }
.me:hover { background: var(--surface-3); text-decoration: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none;
  background: var(--accent);
}
.me .who { line-height: 1.25; min-width: 0; }
.me .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--text-3); }
.foot-actions { display: flex; gap: 6px; }
.foot-actions .btn { flex: 1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar .crumb { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.budget-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.budget-pill .mini-meter { width: 54px; height: 5px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.budget-pill .mini-meter span { display: block; height: 100%; background: var(--c-green); border-radius: 9px; }
.content { padding: 24px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }
.content > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.content > *:nth-child(2) { animation-delay: .04s; } .content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; } .content > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head .sub { color: var(--text-3); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }

/* ================================================================ hero */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px 30px; margin-bottom: 20px; color: var(--text); min-height: 176px;
  background: linear-gradient(120deg, var(--surface) 0%, var(--surface) 45%, color-mix(in srgb, var(--accent) 7%, var(--surface)) 100%);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.hero::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.hero canvas.mini3d { position: absolute; right: 0; top: 0; width: 48%; height: 100%; pointer-events: none; }
.hero .hero-in { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { font-size: 28px; }
.hero p { color: var(--text-2); margin: 8px 0 18px; font-size: 15px; }
.hero .meta { font-size: 12.5px; color: var(--text-3); margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ================================================================ kartlar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; font-weight: 400; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }

.tilt { transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }
.tilt:hover { box-shadow: var(--shadow); }

/* stat / KPI kartları */
.stat { padding: 18px 20px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.stat:hover { box-shadow: var(--shadow); }

.stat-label { color: var(--text-3); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat-label .icon { color: var(--c, var(--red)); }
.stat-value { font-size: 30px; font-weight: 780; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.stat-hint { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico3d { --s: 50px; }
.stat.accent-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.meter { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--c-green); transform-origin: left; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
.meter.warn > span { background: var(--c-amber); }
.meter.over > span { background: var(--c-red); }
@keyframes grow { from { transform: scaleX(0); } }

/* ================================================================ tablo */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-3);
  padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .title-cell { font-weight: 620; color: var(--text); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.card > .table-wrap:first-child .table th:first-child, .card > .table-wrap:first-child table th:first-child { border-top-left-radius: var(--radius); }
.card > .table-wrap:first-child .table th:last-child { border-top-right-radius: var(--radius); }

/* ================================================================ rozetler */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  white-space: nowrap; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 18%, transparent); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 18%, transparent); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 18%, transparent); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 18%, transparent); }
.badge-violet { background: var(--violet-soft); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 18%, transparent); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.badge.pulse::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); margin: 2px 4px 2px 0; white-space: nowrap;
}

/* ================================================================ butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 620; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; touch-action: manipulation;
}
.btn:hover { box-shadow: var(--shadow-sm); background: var(--surface-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-success { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 31px; }
.htmx-request .btn-spinner, .btn-spinner.htmx-request { display: inline-block; }
.btn-spinner { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================ formlar */
.form-grid { display: grid; gap: 16px; }
.field label, .label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 7px; color: var(--text-2); }
.field .help, .helptext { color: var(--text-3); font-size: 12px; margin-top: 5px; }
.field .errorlist, .errorlist { color: var(--danger); font-size: 12.5px; margin: 5px 0 0; padding: 0; list-style: none; font-weight: 600; }
.input, .field input[type=text], .field input[type=number], .field input[type=password], .field input[type=email], .field input[type=url], .field input[type=search], .field input[type=date],
.field select, .field textarea, textarea.input, select.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.input { min-height: 100px; resize: vertical; line-height: 1.55; padding: 10px 12px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--red); }
.field input[type=checkbox] { width: 17px; height: 17px; vertical-align: -3px; margin-right: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
textarea.editor-area, .field textarea.editor-area { font-family: var(--mono); font-size: 13px; min-height: 560px !important; }

/* ================================================================ sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab {
  padding: 10px 14px; color: var(--text-3); font-weight: 650; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ================================================================ uyarılar */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 13px; border: 1px solid transparent; margin-bottom: 12px; font-weight: 500; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 18%, transparent); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 18%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 18%, transparent); }
.alert-error, .alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 18%, transparent); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 400px; }
.toast-stack .alert { box-shadow: var(--shadow); margin: 0; backdrop-filter: blur(10px); animation: toast-in .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ================================================================ boş durum */
.empty { text-align: center; padding: 52px 20px; color: var(--text-2); }
.empty > .icon { width: 28px; height: 28px; padding: 14px; box-sizing: content-box; border-radius: 18px; margin-bottom: 14px;
  color: var(--text-3); background: var(--surface-3); box-shadow: none; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }

/* ================================================================ zaman çizelgesi */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.success::before { background: var(--c-green); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.warning::before { background: var(--c-amber); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.error::before { background: var(--red); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.info::before { background: var(--c-blue); box-shadow: 0 0 0 3px var(--surface); }
.timeline .when { color: var(--text-3); font-size: 12px; }

/* ================================================================ makale metni */
.prose { font-size: 16px; line-height: 1.8; color: var(--text); max-width: 74ch; }
.prose h2 { font-size: 20px; margin: 1.6em 0 .5em; } .prose h3 { font-size: 16.5px; margin: 1.3em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; } .prose li { margin: .3em 0; }
.prose blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 3px solid var(--red); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose table { border-collapse: separate; border-spacing: 0; margin: 1em 0; font-size: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.prose th { background: var(--surface-2); font-weight: 650; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose tr:last-child td { border-bottom: 0; }
.prose code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose mark { background: var(--warning-soft); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ================================================================ diff */
.diff { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.diff .add { background: var(--diff-add); display: block; border-left: 3px solid var(--c-green); padding-left: 6px; }
.diff .del { background: var(--diff-del); display: block; text-decoration: line-through; opacity: .85; border-left: 3px solid var(--red); padding-left: 6px; }
.diff .ctx { color: var(--text-3); display: block; padding-left: 9px; }
.diff ins { background: var(--diff-add); text-decoration: none; border-radius: 3px; } .diff del { background: var(--diff-del); border-radius: 3px; }

/* ================================================================ skor halkası */
.score {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-weight: 750; font-variant-numeric: tabular-nums;
  background: conic-gradient(var(--score-color, var(--accent)) calc(var(--v, 0) * 1%), var(--surface-3) 0); position: relative; font-size: 13px; flex: none;
}
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score span { position: relative; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 38px; gap: 10px; align-items: center; font-size: 12.5px; margin: 7px 0; }

/* ================================================================ hat şeridi */
.pipeline-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; position: relative; }
.pipeline-step {
  padding: 14px 15px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; color: var(--text); text-decoration: none !important; display: block; overflow: hidden;
}
.pipeline-step::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--c, var(--border-strong)); opacity: .9; }
a.pipeline-step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pipeline-step .n { font-size: 26px; font-weight: 780; font-variant-numeric: tabular-nums; margin-top: 8px; line-height: 1; }
.pipeline-step .l { font-size: 12.5px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pipeline-step .ico3d { --s: 26px; }
.pipeline-step::after { opacity: .55; }
.pipeline-step.hot { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.pipeline-step.hot .n { color: var(--accent); }
.pipeline-step.zero .n { color: var(--text-3); }

/* ================================================================ giriş */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; }

/* ================================================================ duyarlı */
@media (max-width: 1200px) {
  .pipeline-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .hero canvas.mini3d { width: 100%; opacity: .35; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 272px; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(10,10,14,.45); z-index: 45; backdrop-filter: blur(2px); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 48px; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .pipeline-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none !important; }
  .hero { padding: 22px; border-radius: 18px; } .hero h1 { font-size: 23px; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* tema düğmesi: hangi temadaysak diğerini göster */
.theme-dark-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: inline-flex; align-items: center; gap: 6px; }
:root[data-theme="dark"] .theme-light-only { display: none; }
.theme-light-only { display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark-only { display: inline-flex; align-items: center; gap: 6px; }
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
}

/* tablolarda linkler metin renginde; kırmızı sadece üzerine gelince (göz yormasın) */
.table td a:not(.btn):not(.badge) { color: var(--text); font-weight: 600; }
.table td a:not(.btn):not(.badge):hover { color: var(--accent); text-decoration: none; }
.timeline a, .dash-list a { color: var(--text-2); font-weight: 600; }
.timeline a:hover, .dash-list a:hover { color: var(--accent); text-decoration: none; }
