:root {
  --navy: #0b1f3a; --navy-2: #12305a; --red: #e30a17; --red-2: #b8000e;
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f7f9fc; --text: #0e1726; --muted: #5b6b80; --border: #e1e6ee;
  --ok: #0f8a4b; --warn: #b26b00; --bad: #c8102e; --info: #1f5fbf;
  --sidebar: var(--navy); --sidebar-text: #dbe5f3;
  --shadow: 0 1px 2px rgba(11,31,58,.06), 0 4px 16px rgba(11,31,58,.06);
  --radius: 14px;
  --c-haber: #1f5fbf; --c-reklam: #e30a17; --c-cekim: #7c3aed; --c-montaj: #b26b00; --c-reels: #db2777; --c-hikaye: #0891b2; --c-ozel_gun: #0f8a4b; --c-icerik_fikri: #64748b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#07111f; --surface:#0e1b2e; --surface-2:#13233a; --text:#e8eef7; --muted:#9fb0c6; --border:#203450; --sidebar:#050d18; --shadow:none; color-scheme: dark; } }
:root[data-theme="dark"] { --bg:#07111f; --surface:#0e1b2e; --surface-2:#13233a; --text:#e8eef7; --muted:#9fb0c6; --border:#203450; --sidebar:#050d18; --shadow:none; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--info); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .spacer { flex: 1; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Yerleşim */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--sidebar); color: var(--sidebar-text); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font-weight: 800; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--red); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.brand small { display: block; font-weight: 500; color: #9fb3cf; font-size: 11px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.active { background: rgba(227,10,23,.18); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.nav .ic { width: 20px; text-align: center; }
.nav .badge { margin-left: auto; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 10px 22px; display: flex; gap: 10px; align-items: center; }
.topbar .title { font-weight: 700; }
.content { padding: 20px 22px 110px; max-width: 1280px; }
.bottomnav { display: none; }
.fab { position: fixed; right: 18px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--red); color: #fff; border: 0; font-size: 30px; box-shadow: 0 8px 24px rgba(227,10,23,.4); z-index: 30; cursor: pointer; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: block; position: fixed; inset: 0 25% 0 0; z-index: 60; height: 100%; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
  .topbar { padding: 10px 16px; }
  .content { padding: 14px 16px 130px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; min-height: 48px; justify-content: center; }
  .bottomnav a.active { color: var(--red); font-weight: 700; }
  .bottomnav .ic { font-size: 20px; line-height: 1; }
  .fab { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .hide-m { display: none !important; }
}

/* Bileşenler */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.pad0 { padding: 0; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .card-h h2 { margin: 0; }
.kpi { padding: 14px; } .kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; } .kpi .l { color: var(--muted); font-size: 13px; }
.kpi.alert .v { color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 9px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; white-space: nowrap; }
.btn:hover { border-color: var(--navy-2); text-decoration: none; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.red { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: progress; }
:root[data-theme="dark"] .btn.primary, :root:not([data-theme="light"]) .btn.primary { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: #1d4fa0; border-color: #1d4fa0; } }
:root[data-theme="dark"] .btn.primary { background: #1d4fa0; border-color: #1d4fa0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.red { background: var(--red); color: #fff; border-color: var(--red); }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.badge.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); }
.score { display: inline-grid; place-items: center; min-width: 46px; height: 46px; border-radius: 12px; font-weight: 800; font-size: 18px; color: #fff; }
.score.s1 { background: var(--red); } .score.s2 { background: #e0730b; } .score.s3 { background: #2f6fd1; } .score.s4 { background: #7a8799; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.item .body { flex: 1; min-width: 0; }
.item h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; }
.banner { padding: 12px 14px; border-radius: 12px; border: 1px solid; margin-bottom: 14px; font-size: 14px; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.banner.info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 7%, var(--surface)); }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tabs a, .chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; cursor: pointer; }
.tabs a.active, .chip.active { background: var(--navy); border-color: var(--navy); color: #fff; text-decoration: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; width: 100%; min-height: 42px; }
input[type=checkbox], input[type=radio] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--red); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--info) 50%, transparent); border-color: var(--info); }
label.f { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; } label.f > span { display: block; margin-bottom: 4px; color: var(--muted); }
label.f.missing > span { color: var(--bad); } label.f.missing input, label.f.missing select { border-color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; } th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.status-select { width: auto; min-height: 34px; padding: 5px 8px; font-size: 13px; font-weight: 600; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--navy-2); }
.copybox { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 12px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.copybox .btn { float: right; margin: -4px -4px 6px 8px; }
.field-title { font-weight: 700; font-size: 13px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.msg { padding: 10px 13px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-weight: 600; }
.toast.err { background: var(--bad); }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(7,17,31,.55); }
.dlg-h { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; } .dlg-h h2 { margin: 0; }
.dlg-b { padding: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; } .legend span { display: inline-flex; gap: 5px; align-items: center; }

/* Takvim */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--border); gap: 1px; }
.cal .dow { background: var(--surface-2); padding: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.cal .day { background: var(--surface); min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day.other { background: var(--surface-2); opacity: .6; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--red); }
.cal .day.drag { background: color-mix(in srgb, var(--info) 12%, var(--surface)); }
.cal .day.heavy .dn::after { content: " • yoğun"; color: var(--red); font-weight: 700; }
.cal .dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.ev { font-size: 12px; padding: 3px 6px; border-radius: 6px; color: #fff; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid rgba(0,0,0,.25); }
.ev.locked::before { content: "🔒 "; }
.ev.done { opacity: .5; text-decoration: line-through; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.week .day { min-height: 260px; }
@media (max-width: 860px) {
  .cal .day { min-height: 64px; padding: 3px; } .ev { font-size: 10.5px; padding: 2px 4px; }
  .week { grid-template-columns: 1fr; } .week .day { min-height: 0; }
}
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1000px 600px at 10% 0%, #163b6e 0%, var(--navy) 50%, #050d18 100%); }
.login .card { width: min(400px, 100%); }
.pill-ai { font-size: 11px; font-weight: 700; color: var(--info); text-transform: uppercase; letter-spacing: .04em; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 0; border-top: 1px solid var(--border); margin-top: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
