/* ==========================================================================
   Şimal Bülten — Yönetim paneli
   --------------------------------------------------------------------------
   Hızlı düzenleme: renkleri, yazı tiplerini ve köşe yuvarlaklarını aşağıdaki
   :root bloğundan değiştirin; tüm panel buna göre güncellenir.
   İçindekiler
     1. Tasarım değişkenleri      6. Kartlar ve formlar
     2. Temel                     7. Bülten listesi
     3. İskelet (yan menü)        8. Düzenleme ekranı
     4. Sayfa başlığı             9. Bildirim ve onay penceresi
     5. Düğmeler                 10. Giriş / kurulum
                                 11. Mobil
   ========================================================================== */

/* 1. Tasarım değişkenleri ------------------------------------------------- */
:root {
  /* Renkler */
  --ink:        #0f2a26;   /* yan menü, koyu yüzeyler (Karadeniz yeşili) */
  --ink-2:      #1a3d37;
  --ink-text:   #c9d8d3;
  --paper:      #f3f5f3;   /* sayfa zemini */
  --surface:    #ffffff;   /* kartlar */
  --surface-2:  #f8faf9;
  --line:       #dfe6e3;
  --line-2:     #cbd6d2;
  --text:       #15211e;
  --muted:      #5c6d68;
  --brand:      #fa6800;   /* Şimal turuncusu: ana eylemler */
  --brand-dark: #d95a00;
  --brand-soft: #fff1e6;
  --brand-text: #b84c00;   /* açık zeminde okunur turuncu */
  --ok:         #237a58;
  --ok-soft:    #e3f3ec;
  --danger:     #c2352b;
  --danger-soft:#fdeceb;

  /* Yazı */
  --font:       "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head:  "Montserrat", "Figtree", system-ui, sans-serif;

  /* Biçim */
  --r-lg: 16px;
  --r:    11px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 42, 38, .05), 0 6px 20px -8px rgba(15, 42, 38, .12);
  --sidebar: 244px;
  --tabbar: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Temel ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font: 800 clamp(24px, 3vw, 30px)/1.15 var(--font-head); letter-spacing: -.02em; }
h2 { font: 700 18px/1.3 var(--font-head); letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
code { font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
kbd { font: 600 11px var(--font); padding: 1px 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.lead { color: var(--muted); margin-top: 6px; max-width: 62ch; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* 3. İskelet -------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px;
  background: var(--ink); color: var(--ink-text);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; padding: 2px 8px; }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.brand span { font: 600 17px var(--font-head); letter-spacing: -.01em; }
.brand strong { font-weight: 900; color: var(--brand); }
.sidenav { display: flex; flex-direction: column; gap: 4px; }
.sidenav a, .signout {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r);
  text-decoration: none; font-weight: 600; color: var(--ink-text);
  transition: background .15s, color .15s;
}
.sidenav a:hover, .signout:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidenav a[aria-current="page"] { background: var(--ink-2); color: #fff; }
.sidenav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.sidenav a[aria-current="page"] .ico { color: var(--brand); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.kbd-hint { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #8fa7a0; padding: 0 12px; }
.kbd-hint .ico { width: 16px; height: 16px; }
.main { padding: 32px clamp(18px, 3.2vw, 44px) 48px; min-width: 0; }
.main > * { max-width: 1120px; }
.page-edit .main > * { max-width: none; }
.tabbar { display: none; }

/* 4. Sayfa başlığı -------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.back .ico { width: 16px; height: 16px; }
.back:hover { color: var(--text); }
.head-actions { display: flex; gap: 8px; }

/* 5. Düğmeler ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font: 600 14px var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn .ico { width: 18px; height: 18px; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 12px -4px rgba(250,104,0,.55); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-soft:hover { background: var(--danger-soft); border-color: #f2c2be; color: var(--danger); }
.btn.danger-text { color: var(--danger); }
.btn.danger-text:hover { background: var(--danger-soft); }
.btn.sm { min-height: 38px; padding: 0 13px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 40px; min-height: 40px; padding: 0; }
.btn:disabled, .btn.is-busy { opacity: .7; cursor: progress; }
.btn.is-busy .ico { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 6. Kartlar ve formlar --------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card.inner { box-shadow: none; margin-top: 10px; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.card-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.card-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.card-ico .ico { width: 22px; height: 22px; }

.grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text); padding: 0; }
.label .ico { width: 16px; height: 16px; color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.hint.over { color: var(--danger); }

input, select, textarea {
  width: 100%; min-width: 0;
  padding: 10px 12px;
  font: 15px/1.4 var(--font); color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
input, select { min-height: 44px; }
select { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235c6d68' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }
textarea { resize: vertical; min-height: 88px; }
textarea.mono { font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(250, 104, 0, .16); }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }

.input-icon { position: relative; display: block; }
.input-icon > .ico { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 40px; }
.input-icon.has-toggle > input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border: 0; background: none; color: var(--muted); border-radius: var(--r-sm); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }

/* Görsel yükleme alanı */
.drop {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 76px; padding: 10px 14px 10px 10px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: var(--surface-2); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(250, 104, 0, .16); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; border: 0; }
.drop-thumb {
  flex: none; width: 76px; height: 56px; border-radius: var(--r-sm);
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop-thumb .ico { width: 24px; height: 24px; }
.drop-text { display: flex; flex-direction: column; min-width: 0; }
.drop-text strong { font-size: 14px; }
.drop-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.drop.has-image .drop-text strong { color: var(--brand-text); }

/* Kayıt çubuğu (yapışkan) */
.savebar {
  position: sticky; bottom: 16px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 8px 8px 8px 18px;
  background: var(--ink); color: var(--ink-text);
  border-radius: 14px;
  box-shadow: 0 12px 30px -10px rgba(15, 42, 38, .5);
}
.savebar-state { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.savebar-state .ico { width: 18px; height: 18px; color: #6fd0a6; }
.savebar.is-dirty .savebar-state { color: #fff; }
.savebar.is-dirty .savebar-state .ico { color: var(--brand); }
.savebar .btn.primary { box-shadow: none; }

/* 7. Bülten listesi ------------------------------------------------------- */
.create-bar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 16px 16px 16px 20px; margin-bottom: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.create-title { display: flex; align-items: center; gap: 8px; align-self: center; margin-right: 8px; font: 700 16px var(--font-head); }
.create-title .ico { color: var(--brand); }
.create-bar .field { flex: 1 1 120px; }
.create-bar .field:first-of-type { flex-basis: 160px; }
.field.compact { gap: 4px; }
.field.compact .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.search { position: relative; max-width: 360px; margin-bottom: 18px; }
.search .ico { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; height: 18px; }
.search input { padding-left: 40px; border-radius: 999px; }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.issue-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.issue-cover {
  position: relative; display: block; aspect-ratio: 1447 / 862; overflow: hidden;
  background: var(--c); text-decoration: none;
}
.issue-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.issue-cover:hover img { transform: scale(1.04); }
.issue-cover.default-cover::before {
  content: ""; position: absolute; inset: 0; background: var(--c); transition: transform .5s var(--ease);
  -webkit-mask: url("../img/cover-theme-mask.png") no-repeat 0 0 / 100% 100%;
          mask: url("../img/cover-theme-mask.png") no-repeat 0 0 / 100% 100%;
}
.issue-cover.default-cover:hover::before { transform: scale(1.04); }
.issue-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--c) 92%, #000) 100%); }
.issue-month {
  position: absolute; left: 16px; bottom: 10px; z-index: 1;
  font: 900 30px/1 var(--font-head); letter-spacing: -.04em; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.issue-no {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--text);
  font-size: 12.5px; font-weight: 700;
}
.issue-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; }
.issue-body h2 { font-size: 17px; }
.issue-meta { display: flex; gap: 16px; margin: 0; color: var(--muted); font-size: 13.5px; }
.issue-meta div { display: flex; align-items: center; gap: 6px; }
.issue-meta dt .ico { width: 16px; height: 16px; }
.issue-meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.issue-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; }
.issue-actions .btn.primary { margin-right: auto; }
.issue-actions form { display: contents; }
.issue-actions .btn.icon-only { border-color: transparent; background: transparent; color: var(--muted); }
.issue-actions .btn.icon-only:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.issue-actions .btn.danger-soft:hover { background: var(--danger-soft); color: var(--danger); border-color: #f2c2be; }

.empty { text-align: center; padding: 56px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); }
.empty > .ico { width: 56px; height: 56px; color: var(--brand); margin-bottom: 14px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 8px auto 0; }
.empty.small { padding: 32px 20px; margin-top: 16px; }
.empty.small > .ico { width: 44px; height: 44px; }
.empty-filter { color: var(--muted); padding: 20px 0; }

/* 8. Düzenleme ekranı ----------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 34vw); gap: 28px; align-items: start; }
.editor { min-width: 0; max-width: 860px; }

.jump {
  position: sticky; top: 0; z-index: 15;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: -8px -4px 16px; padding: 8px 4px;
  background: linear-gradient(var(--paper) 75%, transparent);
}
.jump::-webkit-scrollbar { display: none; }
.jump a {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--muted);
}
.jump a:hover, .jump a.is-active { color: var(--text); border-color: var(--line-2); }
.jump a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.jump .ico { width: 16px; height: 16px; }
.count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: 12px; text-align: center; }
.jump a.is-active .count { background: var(--brand); color: #fff; }

/* Tema rengi */
.theme-field { margin-top: 18px; }
.swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swatch {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sw); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .15s var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; min-height: 0; }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 4px; }
.swatch.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); display: grid; place-items: center; }
.swatch.custom .ico { width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); pointer-events: none; }
.hex { margin-left: 6px; padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font: 600 13px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); }

/* "30 günün 25 gününde 22 etkinlik" cümlesi */
.sentence {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  margin: 18px 0 8px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  font: 600 16px var(--font-head);
}
.sentence label { display: inline-flex; align-items: center; gap: 8px; }
.sentence input { width: 78px; min-height: 40px; text-align: center; font: 700 16px var(--font); }
.sentence b { color: var(--brand-text); }

/* Etkinlikler */
.events { margin-top: 40px; }
.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 70ch; }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.adder { flex: 0 1 auto; }
.adder[open] { flex: 1 1 100%; order: -1; }
.adder > summary { list-style: none; }
.adder > summary::-webkit-details-marker { display: none; }
.adder[open] > summary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.event-form { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.event-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.event { position: relative; }
.event:nth-child(4n+1):not(:first-child) { margin-top: 30px; }
.event:nth-child(4n+1):not(:first-child)::before {
  content: "Yeni PDF sayfası";
  position: absolute; left: 0; right: 0; top: -24px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: linear-gradient(var(--line-2), var(--line-2)) no-repeat right center / calc(100% - 120px) 1px;
}
.event details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: box-shadow .2s, border-color .2s;
}
.event details[open] { box-shadow: var(--shadow); border-color: var(--line-2); }
.event summary {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 6px; cursor: pointer; list-style: none;
}
.event summary::-webkit-details-marker { display: none; }
.handle { display: grid; place-items: center; width: 28px; height: 40px; color: var(--line-2); cursor: grab; border-radius: var(--r-sm); }
.handle:hover { color: var(--muted); background: var(--surface-2); }
.handle .ico { width: 20px; height: 20px; }
.ev-thumb { flex: none; width: 60px; height: 44px; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ev-text strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-accent { color: var(--brand-text); }
.ev-text small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.ev-text small .ico { width: 14px; height: 14px; }
.ev-tools { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.ev-tools .btn.icon-only { width: 34px; min-height: 34px; color: var(--muted); }
.ev-tools .btn.icon-only .ico { width: 16px; height: 16px; }
.chev { display: grid; place-items: center; width: 34px; transition: rotate .2s var(--ease); }
.chev .ico { width: 18px; height: 18px; }
details[open] .chev { rotate: 180deg; }
.event-body { padding: 6px 18px 18px; border-top: 1px solid var(--line); }
.event-body .event-form { padding-top: 16px; }
.event-delete { margin-top: -42px; width: max-content; }
.event.is-dragging { opacity: .45; }
.event.drop-before details { box-shadow: 0 -3px 0 var(--brand); }
.event.drop-after details { box-shadow: 0 3px 0 var(--brand); }
.event.is-flash details { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(250,104,0,.45); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* Canlı önizleme */
.preview-pane {
  position: sticky; top: 16px;
  height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: #e3e8e6; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 6px 6px 14px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.preview-head strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.preview-head strong .ico { color: var(--brand); width: 18px; height: 18px; }
.preview-head > div { display: flex; gap: 2px; }
.preview-head .btn.icon-only { width: 36px; min-height: 36px; color: var(--muted); }
.preview-pane iframe { flex: 1; width: 100%; border: 0; background: transparent; }
.preview-pane.is-loading iframe { opacity: .55; transition: opacity .2s; }
.only-mobile { display: none !important; }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 18px; height: 48px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 14px var(--font);
  box-shadow: 0 10px 24px -8px rgba(15, 42, 38, .55); cursor: pointer;
}
.fab .ico { color: var(--brand); }

/* 9. Bildirim ve onay penceresi ------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: 380px; padding: 12px 16px 12px 12px;
  background: var(--ink); color: #fff; border-radius: 12px;
  box-shadow: 0 14px 34px -12px rgba(15, 42, 38, .6);
  font-size: 14px; font-weight: 500; pointer-events: auto;
  animation: toast-in .3s var(--ease);
}
.toast .ico { width: 22px; height: 22px; color: #6fd0a6; }
.toast.error { background: #3b1513; }
.toast.error .ico { color: #ff8a80; }
.toast.out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.confirm { border: 0; padding: 0; border-radius: 18px; width: min(400px, calc(100vw - 32px)); box-shadow: 0 30px 60px -20px rgba(15, 42, 38, .45); }
.confirm::backdrop { background: rgba(15, 42, 38, .45); backdrop-filter: blur(2px); }
.confirm form { padding: 24px; text-align: center; }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); }
.confirm-icon .ico { width: 28px; height: 28px; }
.confirm-text { color: var(--muted); margin-top: 8px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.confirm .btn.ghost { border-color: var(--line-2); }

.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; font-weight: 500; }
.alert.error { background: var(--danger-soft); color: var(--danger); }

/* 10. Giriş / kurulum ----------------------------------------------------- */
.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-visual { position: relative; overflow: hidden; background: var(--ink); }
.auth-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 30%, rgba(15, 42, 38, .92) 92%); }
.auth-visual-text { position: absolute; left: 48px; right: 48px; bottom: 48px; z-index: 1; color: #fff; }
.auth-visual-text img { background: #fff; border-radius: 14px; padding: 6px; margin-bottom: 18px; }
.auth-visual-text p { font: 700 clamp(20px, 2.2vw, 28px)/1.25 var(--font-head); letter-spacing: -.02em; max-width: 22ch; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box.wide { max-width: 560px; }
.auth-box h1 { margin-top: 18px; }
.auth-box .lead { margin-bottom: 24px; }
.auth-box .alert { margin-bottom: 16px; }
.auth-logo { display: none; }
.group { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 18px; margin: 0; }
.group legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 700; }
.group legend .ico { color: var(--brand); }

/* 11. Mobil --------------------------------------------------------------- */
@media (max-width: 1200px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .editor { max-width: none; }
  .preview-pane {
    position: fixed; inset: 0; z-index: 60; height: auto; border-radius: 0; border: 0;
    transform: translateY(100%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
  }
  body.show-preview .preview-pane { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  body.show-preview { overflow: hidden; }
  .only-mobile { display: inline-flex !important; }
  .fab { bottom: 24px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--ink); border-top: 1px solid rgba(255,255,255,.06);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #8fa7a0; text-decoration: none; font-size: 11.5px; font-weight: 600;
  }
  .tabbar a .ico { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: #fff; }
  .tabbar a[aria-current="page"] .ico { color: var(--brand); }
  .fab { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); }
  .savebar { bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); }
  .page-edit .savebar { margin-right: 130px; }
  .toasts { left: 16px; right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-logo { display: block; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  #numbers .grid-3, #cover .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  #numbers .grid-3 input { padding: 10px 8px; }
  .card { padding: 16px; border-radius: 14px; }
  .card-head { margin-bottom: 16px; }
  .card-ico { width: 36px; height: 36px; }
  .create-bar { padding: 14px; }
  .create-title { width: 100%; }
  .create-bar .btn { flex: 1 1 100%; }
  .page-head { align-items: flex-start; }
  .head-actions .btn { min-height: 40px; padding: 0 12px; }
  .savebar { padding-left: 14px; }
  .savebar-state span { font-size: 13px; }
  .page-edit .savebar { margin-right: 0; }
  .page-edit .fab { bottom: calc(var(--tabbar) + 82px + env(safe-area-inset-bottom)); }
  .ev-thumb { display: none; }
  .ev-tools .btn.icon-only { width: 30px; }
  .event-body { padding: 4px 14px 14px; }
  .issue-grid { grid-template-columns: 1fr; }
  .sentence { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Toplu fotoğraf kuyruğu */
.bulk-photo-card { margin: 18px 0 20px; padding: 0; overflow: hidden; }
.bulk-photo-summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; }
.bulk-photo-summary::-webkit-details-marker { display: none; }
.bulk-photo-summary > span:nth-child(2) { display: grid; gap: 3px; }
.bulk-photo-summary strong { font-size: 15px; }
.bulk-photo-summary small { color: var(--muted); font-size: 13px; }
.bulk-photo-count { margin-left: auto; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 700; }
.bulk-photo-form { display: grid; gap: 14px; padding: 0 20px 20px; }
.bulk-photo-drop { min-height: 84px; }
.bulk-photo-queue { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.bulk-photo-row { display: grid; grid-template-columns: 38px 58px minmax(100px,1fr) minmax(220px,1.1fr) 34px; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bulk-photo-row.dragging { opacity: .45; border-color: var(--brand); }
.bulk-photo-order { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bulk-photo-grip { color: var(--muted); cursor: grab; font-size: 20px; line-height: 1; text-align: center; user-select: none; }
.bulk-photo-order button { width: 28px; height: 21px; border: 0; border-radius: 5px; background: var(--surface); color: var(--ink); cursor: pointer; line-height: 1; }
.bulk-photo-order button:hover { background: var(--brand-soft); color: var(--brand-text); }
.bulk-photo-row img { width: 58px; height: 48px; border-radius: 7px; object-fit: cover; background: var(--surface); }
.bulk-photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.bulk-photo-row select { width: 100%; min-width: 0; }
.bulk-photo-row [data-bulk-remove] { width: 32px; height: 32px; font-size: 20px; }
@media (max-width: 650px) {
  .bulk-photo-summary { padding: 14px; }
  .bulk-photo-form { padding: 0 14px 14px; }
  .bulk-photo-row { grid-template-columns: 30px 48px minmax(0,1fr) 32px; gap: 7px; }
  .bulk-photo-row img { width: 48px; height: 42px; }
  .bulk-photo-name { grid-column: 3; font-size: 12px; }
  .bulk-photo-row select { grid-column: 2 / 4; grid-row: 2; font-size: 12px; }
  .bulk-photo-row [data-bulk-remove] { grid-column: 4; grid-row: 1 / 3; }
  .bulk-photo-order { grid-row: 1 / 3; }
}
