/* Clineo Reklam Komuta Merkezi — tasarım sistemi v2
   Tek tema: açık. Kâğıt beyazı zemin, lacivert mürekkep, tek vurgu (teal).
   Yazı: Plus Jakarta Sans (gövde) · Space Grotesk (başlık) · JetBrains Mono (kod/sayı).
   Kural: vurgu rengi = eylem. Durum renkleri yalnız durum bildirir, süs değildir. */

:root {
  /* Zemin ve yüzeyler */
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f7f9fc;
  --well: #f4f6fa;
  --th-bg: #fafbfd;
  --side-bg: #ffffff;
  --top-fade: rgba(245, 247, 251, .92);
  --overlay: rgba(15, 27, 61, .34);
  --input-bg: #ffffff;

  /* Mürekkep */
  --text: #0f1b3d;
  --muted: #55637f;
  --faint: #8593ad;

  /* Çizgiler */
  --line: rgba(15, 27, 61, .09);
  --line-strong: rgba(15, 27, 61, .16);

  /* Renkler — teal tek vurgu, kalanı durum */
  --teal: #0d9488;
  --teal-deep: #0f766e;
  --teal-soft: #e6f6f4;
  --blue: #2563eb;
  --blue-soft: #eaf1fe;
  --amber: #b45309;
  --amber-soft: #fdf3e4;
  --green: #047857;
  --green-soft: #e6f6ef;
  --red: #dc2626;
  --red-soft: #fdedec;
  --violet: #6d28d9;
  --violet-soft: #f1ecfd;

  /* Etkileşim */
  --hover: rgba(15, 27, 61, .045);
  --btn-hover: #eef2f8;
  --ring: 0 0 0 3px rgba(13, 148, 136, .16);

  /* Ölçüler */
  --r: 14px;
  --r-s: 10px;
  --r-xs: 8px;
  --pad: 28px;
  --sh-1: 0 1px 2px rgba(15, 27, 61, .05);
  --sh-2: 0 1px 2px rgba(15, 27, 61, .05), 0 10px 24px -14px rgba(15, 27, 61, .28);
  --sh-3: 0 20px 50px -20px rgba(15, 27, 61, .35), 0 2px 6px rgba(15, 27, 61, .06);
  --shadow: var(--sh-2);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 520px at 88% -12%, rgba(13, 148, 136, .07), transparent 62%),
    radial-gradient(760px 560px at -8% 22%, rgba(37, 99, 235, .05), transparent 58%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 42%, #eef2f8 100%);
}
::selection { background: rgba(13, 148, 136, .18); }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

* { scrollbar-width: thin; scrollbar-color: rgba(85, 99, 127, .3) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(85, 99, 127, .26); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(85, 99, 127, .4); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Giriş ekranı ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 38px 34px; box-shadow: var(--sh-3);
  animation: rise .45s cubic-bezier(.2, .8, .3, 1);
}
.auth-logo { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.auth-logo img { height: 34px; width: auto; }
.auth-logo .name {
  font-family: var(--font); font-weight: 700; font-size: 10.5px;
  letter-spacing: .16em; color: var(--teal-deep); text-transform: uppercase;
  padding-left: 13px; border-left: 1px solid var(--line);
}
.auth-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.auth-card h1 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.auth-err {
  background: var(--red-soft); border: 1px solid rgba(220, 38, 38, .24);
  color: #b91c1c; border-radius: var(--r-s); padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}

.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--faint); font-size: 12px; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#gbtn { display: flex; justify-content: center; min-height: 44px; }

/* ---------- Ana yerleşim ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); border-right: 1px solid var(--line);
  padding: 18px 12px 20px; display: flex; flex-direction: column; gap: 2px;
}
.side-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 4px 10px 20px; }
.side-logo img { height: 28px; width: auto; max-width: 100%; }
.side-logo small {
  display: block; font-family: var(--font); font-weight: 700; font-size: 9.5px;
  letter-spacing: .16em; color: var(--teal-deep); text-transform: uppercase;
}
.nav-grp {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--faint);
  text-transform: uppercase; padding: 18px 12px 6px;
}
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-s);
  color: var(--muted); font-size: 13.8px; font-weight: 600; cursor: pointer;
  transition: background .14s, color .14s; user-select: none;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.on { background: var(--teal-soft); color: #0b5a52; }
.nav-item.on svg { opacity: 1; color: var(--teal-deep); }
.nav-item.on::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-deep);
}
.nav-item .n-badge {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.side-foot { margin-top: auto; padding: 14px 12px 0; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); }
.side-foot a { color: var(--muted); }

.main { min-width: 0; padding: 0 var(--pad) 60px; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 0 14px;
  background: linear-gradient(180deg, var(--top-fade) 72%, transparent);
  backdrop-filter: blur(6px);
}
.topbar h1 { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.topbar .desc { color: var(--muted); font-size: 13px; margin-top: 1px; }
.topbar .grow { flex: 1; }
.topbar > div:last-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view { animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* Üst sekme şeridi (alt ekranlar) */
.tabstrip {
  display: flex; gap: 2px; margin: 0 0 18px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabstrip::-webkit-scrollbar { display: none; }
.tabstrip .ts {
  padding: 9px 14px 11px; font-size: 13.4px; font-weight: 700; color: var(--muted);
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .14s, border-color .14s;
}
.tabstrip .ts:hover { color: var(--text); }
.tabstrip .ts.on { color: var(--teal-deep); border-bottom-color: var(--teal-deep); }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px; box-shadow: var(--sh-1);
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 4px; letter-spacing: -.01em; }
.card .hint { color: var(--muted); font-size: 12.8px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .grow { flex: 1; }
.card.flat { box-shadow: none; background: var(--surface-2); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-deep); margin-bottom: 6px;
}
.grow { flex: 1; }
.hint { color: var(--muted); font-size: 12.8px; }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi .num {
  font-family: var(--display); font-size: 30px; font-weight: 700;
  letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.kpi .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; }
.kpi .delta { font-size: 11.5px; font-weight: 800; margin-left: 8px; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- Bugün: görev rayı (imza öğesi) ---------- */
.rail { display: flex; flex-direction: column; }
.task {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 13px 14px 13px 17px; border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: none; }
.task::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 99px; background: var(--line-strong);
}
.task.acil::before { background: var(--red); }
.task.uyari::before { background: var(--amber); }
.task.bilgi::before { background: var(--blue); }
.task.tamam::before { background: var(--green); }
.task .ico {
  width: 34px; height: 34px; border-radius: var(--r-s); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--well); color: var(--muted);
}
.task .ico svg { width: 17px; height: 17px; }
.task.acil .ico { background: var(--red-soft); color: var(--red); }
.task.uyari .ico { background: var(--amber-soft); color: var(--amber); }
.task.bilgi .ico { background: var(--blue-soft); color: var(--blue); }
.task.tamam .ico { background: var(--green-soft); color: var(--green); }
.task .txt { flex: 1; min-width: 0; }
.task .tt { font-weight: 700; font-size: 13.8px; }
.task .ts2 { color: var(--muted); font-size: 12.4px; margin-top: 1px; }
.task .when { font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.rail-empty { display: flex; align-items: center; gap: 12px; padding: 22px 16px; color: var(--muted); }
.rail-empty .big { font-size: 22px; }

/* ---------- Rozet & pil ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; border: 1px solid var(--line-strong);
  color: var(--muted); background: var(--surface); white-space: nowrap;
}
.pill.teal { background: var(--teal-soft); border-color: rgba(13, 148, 136, .26); color: #0b5a52; }
.pill.blue { background: var(--blue-soft); border-color: rgba(37, 99, 235, .24); color: #1d4fd8; }
.pill.amber { background: var(--amber-soft); border-color: rgba(180, 83, 9, .26); color: #92400e; }
.pill.green { background: var(--green-soft); border-color: rgba(4, 120, 87, .24); color: #046a4e; }
.pill.red { background: var(--red-soft); border-color: rgba(220, 38, 38, .24); color: #b91c1c; }
.pill.violet { background: var(--violet-soft); border-color: rgba(109, 40, 217, .24); color: #5b21b6; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--r-s); font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  cursor: pointer; box-shadow: var(--sh-1);
  transition: background .14s, border-color .14s, box-shadow .14s, transform .1s;
  white-space: nowrap; text-decoration: none !important;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--btn-hover); border-color: rgba(15, 27, 61, .22); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--teal); }
.btn.primary { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn.primary:hover { background: #0b6157; border-color: #0b6157; box-shadow: 0 6px 18px -6px rgba(13, 148, 136, .5); }
.btn.danger { border-color: rgba(220, 38, 38, .3); color: #b91c1c; background: var(--red-soft); }
.btn.danger:hover { background: #fbdcda; border-color: rgba(220, 38, 38, .45); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--hover); border-color: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn.xs { padding: 3px 9px; font-size: 11.5px; border-radius: var(--r-xs); gap: 5px; box-shadow: none; }
.btn.xs svg { width: 12px; height: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.wa { border-color: rgba(21, 128, 61, .3); color: #15803d; background: #eaf8ee; }
.btn.wa:hover { background: #dcf2e3; }

/* ---------- Form ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.field .cnt { float: right; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.field .cnt.over { color: var(--red); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="time"],
input[type="datetime-local"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; background: var(--input-bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-s); color: var(--text); padding: 9px 12px; font-size: 13.8px;
  font-family: inherit; outline: none; transition: border-color .14s, box-shadow .14s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1; min-width: 140px; margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal-deep); cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--teal-deep); cursor: pointer; }

/* ---------- Tablo ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
table { width: 100%; border-collapse: collapse; font-size: 13.3px; min-width: 640px; }
th {
  text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); padding: 11px 14px; border-bottom: 1px solid var(--line-strong);
  position: sticky; top: 0; background: var(--th-bg); z-index: 2;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td .sub { color: var(--faint); font-size: 11.5px; }
.mini-select { width: auto; padding: 4px 26px 4px 9px; font-size: 12px; border-radius: var(--r-xs); }

/* ---------- Boş durum ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .big { font-size: 28px; margin-bottom: 8px; opacity: .55; line-height: 1; }
.empty .big svg { width: 30px; height: 30px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 14.5px; }
.empty span { font-size: 13px; }
.empty .btn { margin-top: 14px; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 18px 18px; overflow-y: auto; animation: fade .18s ease-out;
}
.modal {
  width: 100%; max-width: 560px; background: var(--surface-solid);
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  box-shadow: var(--sh-3); animation: rise .3s cubic-bezier(.2, .8, .3, 1);
}
.modal.wide { max-width: 760px; }
.modal h3 { font-family: var(--display); font-size: 17px; margin-bottom: 16px; letter-spacing: -.01em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- Toast ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px 12px 14px; font-size: 13.5px; box-shadow: var(--sh-3);
  max-width: 360px; animation: rise .3s cubic-bezier(.2, .8, .3, 1);
  display: flex; align-items: baseline; gap: 9px; color: var(--text);
}
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; transform: translateY(-1px); }
.toast.err::before { background: var(--red); }
.toast.ok::before { background: var(--green); }

/* ---------- Panel yardımcıları ---------- */
.dash-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.int-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-mini { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lead-mini:last-child { border-bottom: none; }
.lead-mini .av {
  width: 32px; height: 32px; border-radius: var(--r-s); flex: none;
  background: var(--teal-soft); color: #0b5a52;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px;
}
.lead-mini .nm { font-weight: 700; font-size: 13.3px; }
.lead-mini .grow { flex: 1; min-width: 0; }
.lead-mini .sub { color: var(--muted); font-size: 12px; }
.progress { height: 8px; border-radius: 99px; background: var(--well); overflow: hidden; border: 1px solid var(--line); }
.progress i {
  display: block; height: 100%; width: 100%; background: var(--teal-deep); border-radius: 99px;
  transform-origin: left; transform: scaleX(0); transition: transform .5s cubic-bezier(.2, .8, .3, 1);
}

/* ---------- Kampanya kartları ---------- */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.camp {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.camp:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
.camp .nm { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.camp .meta { display: flex; gap: 7px; flex-wrap: wrap; }
.camp .utm { font-size: 11.5px; color: var(--faint); font-family: var(--mono); word-break: break-all; }
.camp .foot { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

/* ---------- Takvim ---------- */
.cal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cal-head h3 { font-family: var(--display); font-size: 16px; min-width: 150px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; padding: 4px 0; }
.cal-day {
  min-height: 96px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 6px 7px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 3px; overflow-y: auto;
}
.cal-day:hover { border-color: var(--teal); box-shadow: var(--sh-1); }
.cal-add {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; color: var(--faint);
  padding: 3px 4px; border-radius: 6px; border: 1px dashed var(--line-strong);
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.cal-add svg { width: 10px; height: 10px; }
.cal-add:hover { color: var(--teal-deep); border-color: var(--teal); background: var(--teal-soft); }
.cal-day.out { background: var(--well); color: var(--faint); }
.cal-day.out .d { color: var(--faint); }
.cal-day.today { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.cal-day .d { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-day.today .d { color: var(--teal-deep); }
.cal-it {
  font-size: 10.8px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; background: var(--blue-soft); color: #1d4fd8;
}
/* Tür rengi durumun önüne geçer: iş ve özel kayıtlar bir bakışta ayrılsın */
.cal-it.t-is { background: var(--amber-soft); color: #92400e; }
.cal-it.t-ozel { background: var(--violet-soft); color: #5b21b6; }
.kat-list { display: flex; flex-direction: column; gap: 4px; max-height: 168px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; background: var(--surface-2); }
.kat-it { font-size: 13px; }
.kat-it .sub { color: var(--faint); font-size: 11.5px; }
.cal-it.s-hazir { background: var(--amber-soft); color: #92400e; }
.cal-it.s-yayında { background: var(--green-soft); color: #046a4e; }
.cal-it.s-üretimde { background: var(--violet-soft); color: #5b21b6; }

/* ---------- Metinler ---------- */
.text-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.text-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; cursor: pointer; box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.text-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
.text-card .tt { font-weight: 800; font-size: 14px; margin: 6px 0; }
.text-card .prev { color: var(--muted); font-size: 12.5px; max-height: 56px; overflow: hidden; }
.ai-out {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-s); padding: 14px; font-size: 13.3px; white-space: pre-wrap;
  max-height: 340px; overflow-y: auto; line-height: 1.6;
}
.multi-line { display: flex; flex-direction: column; gap: 7px; }
.multi-line input { font-size: 13px; }

/* ---------- Stüdyo ---------- */
.studio { display: grid; grid-template-columns: 330px 1fr; gap: 18px; align-items: start; }
.studio-prev {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--sh-1);
  background-image: linear-gradient(45deg, var(--well) 25%, transparent 25%),
    linear-gradient(-45deg, var(--well) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--well) 75%),
    linear-gradient(-45deg, transparent 75%, var(--well) 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
/* Boyutu JS'teki fitCanvas() belirler (en-boy oranı korunsun diye).
   Buradaki max-height bir daha eklenmesin: satır içi yüksekliği kırpıp görseli ezer. */
/* Genişlik/yükseklik yalnızca fitCanvas() tarafından verilir.
   Buraya max-width/max-height EKLEME: satır içi ölçüyle çakışır, yakınlaştırma
   matematiği elementin gerçek boyutundan sapar. */
.cv-view {
  position: relative; overflow: hidden;
  border-radius: var(--r-s); box-shadow: var(--sh-3); background: var(--well);
}
.cv-view canvas { display: block; will-change: transform; }
.cv-view.zoomed { cursor: move; }
.zoom-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.zoom-bar .btn { min-width: 38px; padding: 6px 10px; }
#zm-lbl { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }

/* Logo yeri seçici — 3x3 hazır konum */
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 168px; }
.pos-cell {
  aspect-ratio: 1; display: flex; padding: 5px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-xs);
}
.pos-cell i { width: 11px; height: 11px; border-radius: 2px; background: var(--faint); }
.pos-cell:nth-child(3n+1) { justify-content: flex-start; }
.pos-cell:nth-child(3n+2) { justify-content: center; }
.pos-cell:nth-child(3n+3) { justify-content: flex-end; }
.pos-cell:nth-child(-n+3) { align-items: flex-start; }
.pos-cell:nth-child(n+4):nth-child(-n+6) { align-items: center; }
.pos-cell:nth-child(n+7) { align-items: flex-end; }
.pos-cell:hover { border-color: var(--teal-deep); }
.pos-cell.on { border-color: var(--teal-deep); background: var(--teal-soft, var(--surface-2)); }
.pos-cell.on i { background: var(--teal-deep); }
.bg-pick { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.bg-pick img { width: 46px; height: 46px; object-fit: cover; border-radius: var(--r-xs); border: 1px solid var(--line); }

/* ---------- Kitaplık: bırakma alanı ve içe alma tepsisi ---------- */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 28px 24px;
  text-align: center; color: var(--muted); cursor: pointer; background: var(--surface);
  transition: border-color .15s, background .15s, color .15s; font-size: 13.5px;
}
.drop b { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.drop svg { width: 22px; height: 22px; margin-bottom: 6px; color: var(--faint); }
.drop:hover, .drop.over { border-color: var(--teal); background: var(--teal-soft); color: var(--text); }
.drop.over svg, .drop:hover svg { color: var(--teal-deep); }
.drop .fmts { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.drop .fmts span {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--faint);
  border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; background: var(--surface);
}

.tray { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); margin-top: 16px; overflow: hidden; }
.tray-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tray-head b { font-size: 13.5px; }
.tray-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tray-item:last-child { border-bottom: none; }
.tray-item .th {
  width: 46px; height: 46px; border-radius: var(--r-xs); flex: none; overflow: hidden;
  background: var(--well); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.tray-item .th img { width: 100%; height: 100%; object-fit: cover; }
.tray-item .th svg { width: 20px; height: 20px; color: var(--amber); }
.tray-item .nm { font-weight: 700; font-size: 13.2px; }
.tray-item .sub { color: var(--muted); font-size: 12px; }
.tray-item .bar { flex: 1; height: 5px; border-radius: 99px; background: var(--well); overflow: hidden; max-width: 130px; }
.tray-item .bar i {
  display: block; height: 100%; width: 100%; background: var(--teal-deep); border-radius: 99px;
  transform-origin: left; transform: scaleX(0); transition: transform .3s ease;
}
.fmt {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  background: var(--blue-soft); color: #1d4fd8; white-space: nowrap;
}
.fmt.kare { background: var(--teal-soft); color: #0b5a52; }
.fmt.story { background: var(--violet-soft); color: #5b21b6; }
.fmt.kapak { background: var(--blue-soft); color: #1d4fd8; }
.fmt.uyum { background: var(--amber-soft); color: #92400e; }

/* ---------- Gönderi bestecisi: platform gönderi önizlemesi ---------- */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.pv { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); overflow: hidden; box-shadow: var(--sh-1); }
.pv-top { display: flex; align-items: center; gap: 9px; padding: 11px 12px; }
.pv-av {
  width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--teal-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.pv-nm { font-weight: 700; font-size: 13px; }
.pv-sub { font-size: 11px; color: var(--faint); }
.pv-img { background: var(--well); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pv-img img { display: block; width: 100%; }
.pv-img.pv-yok {
  display: flex; align-items: center; justify-content: center; min-height: 120px;
  color: var(--faint); font-size: 12.5px;
}
.pv-body { padding: 11px 12px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.pv-hidden { color: var(--faint); }
.pv-more { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pv-bos { color: var(--faint); font-style: italic; }

/* ---------- Gönderi bestecisi: platform boyut önizlemeleri ---------- */
.sz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.sz .box { position: relative; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--well); box-shadow: var(--sh-1); }
.sz .box canvas { display: block; width: 100%; height: auto; }
.sz .safe { position: absolute; left: 0; right: 0; border: 0 dashed rgba(220, 38, 38, .6); background: rgba(220, 38, 38, .09); pointer-events: none; }
.sz .safe.t { top: 0; height: 14%; border-bottom-width: 1px; }
.sz .safe.b { bottom: 0; height: 22%; border-top-width: 1px; }
.sz .nm { font-size: 12.5px; font-weight: 700; margin-top: 7px; }
.sz .sub { font-size: 11px; color: var(--faint); margin-bottom: 6px; }

/* ---------- Kitaplık ızgarası ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin-top: 16px; }
.asset {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--sh-1); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.asset:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
.asset .th { position: relative; aspect-ratio: 1; background: var(--well); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.asset .th img { width: 100%; height: 100%; object-fit: cover; }
.asset .th .vid { font-size: 24px; color: var(--faint); line-height: 1; }
.asset .th .vid svg { width: 26px; height: 26px; }
.asset .th .fmt { position: absolute; left: 7px; top: 7px; box-shadow: var(--sh-1); }
.asset .th .seq {
  position: absolute; right: 7px; top: 7px; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  background: rgba(15, 27, 61, .72); color: #fff; border-radius: 6px; padding: 1px 6px;
}
.asset .inf { padding: 9px 11px 2px; }
.asset .nm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .sub { color: var(--faint); font-size: 11px; }
.asset .acts { display: flex; gap: 5px; padding: 8px 9px 10px; align-items: center; }
.group-head {
  display: flex; align-items: center; gap: 9px; margin: 22px 0 8px; font-size: 12.5px;
  font-weight: 800; color: var(--muted);
}
.group-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Yayınla ---------- */
.chan { display: flex; align-items: center; gap: 14px; }
.chan img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--teal); }
.step { display: flex; gap: 12px; padding: 10px 0; }
.step .n {
  width: 24px; height: 24px; border-radius: 50%; flex: none; font-size: 12px; font-weight: 800;
  background: var(--teal-soft); color: var(--teal-deep); display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(13, 148, 136, .28);
}
.copy-line {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-xs); padding: 7px 11px; font-size: 12px;
  font-family: var(--mono); word-break: break-all;
}
.soon { opacity: .8; }
.soon .nm { font-weight: 800; font-size: 14px; }

/* ---------- Kontrol listesi ---------- */
.chk-grp { margin-bottom: 22px; }
.chk-grp h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; color: var(--faint); }
.chk-item { display: flex; align-items: flex-start; gap: 11px; padding: 9px 12px; border-radius: var(--r-s); transition: background .12s; }
.chk-item:hover { background: var(--hover); }
.chk-item input { margin-top: 3px; }
.chk-item .lb { flex: 1; font-size: 13.6px; }
.chk-item.done .lb { color: var(--faint); text-decoration: line-through; }
.chk-item .nt { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- Markdown (strateji) ---------- */
.md { font-size: 14px; line-height: 1.7; max-width: 860px; }
.md h1 { font-family: var(--display); font-size: 22px; margin: 8px 0 14px; letter-spacing: -.02em; }
.md h2 { font-family: var(--display); font-size: 17px; margin: 24px 0 10px; color: var(--teal-deep); }
.md h3 { font-size: 14.5px; margin: 18px 0 8px; color: var(--text); }
.md p { margin: 9px 0; }
.md ul, .md ol { margin: 9px 0 9px 22px; }
.md li { margin: 4px 0; }
.md code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; font-family: var(--mono); }
.md pre { background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--r-s); overflow-x: auto; margin: 10px 0; }
.md pre code { background: none; border: none; padding: 0; }
.md table { min-width: 0; margin: 10px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line-strong); padding: 6px 10px; }
.md th { position: static; background: var(--surface-2); }
.md blockquote { border-left: 2px solid var(--line-strong); padding: 2px 14px; color: var(--muted); margin: 10px 0; }
.md hr { border: none; border-top: 1px solid var(--line-strong); margin: 18px 0; }
.md strong { color: var(--text); font-weight: 800; }

/* ---------- Sekme pilleri (görünüm içi) ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 7px 14px; border-radius: 99px; font-size: 12.8px; font-weight: 700; cursor: pointer;
  color: var(--muted); border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; user-select: none;
}
.tab:hover { color: var(--text); background: var(--hover); }
.tab.on { background: var(--teal-soft); border-color: rgba(13, 148, 136, .26); color: #0b5a52; }

/* ---------- Duyarlılık ---------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
  .studio { grid-template-columns: 1fr; }
  /* Önizleme üstte kalsın — ayar yaparken sonucu görmeden çalışılmasın */
  .studio-prev { order: -1; position: sticky; top: 64px; z-index: 5; padding: 10px; }
  /* Dokunmatik hedefler en az 44px */
  .pos-grid { max-width: 200px; gap: 8px; }
  .pos-cell { min-width: 44px; min-height: 44px; }
  .studio input[type="range"] { height: 34px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 40; flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden; padding: 10px 12px; gap: 6px;
    border-right: none; border-bottom: 1px solid var(--line); box-shadow: var(--sh-1);
  }
  .side-logo { padding: 0 10px 0 0; flex-direction: row; align-items: center; flex: none; }
  .side-logo img { height: 24px; }
  .side-logo small { display: none; }
  .nav-grp, .side-foot { display: none; }
  .nav-item { flex: none; padding: 8px 11px; }
  .nav-item.on::before { left: 0; right: 0; top: auto; bottom: -10px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }
  .main { padding: 0 14px 40px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .cal-day { min-height: 58px; }
  .task { padding-left: 14px; }
  :root { --pad: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
