/* ============================================================
   YÖNETİM PANELİ — admin.html
   style.css + app.css'ten SONRA yüklenir. Yalnızca yönetim sayfasında kullanılır.
   ============================================================ */

/* kabuk: yönetici oturumu doğrulanana kadar görünmez (kural admin.html içinde) */
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- üst çubuk ---------- */
.adm-top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: rgba(33, 26, 65, 0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
[data-theme="safak"] .adm-top { background: rgba(250, 246, 236, 0.9); }
.adm-top-tag {
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; color: var(--gold);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap;
}
.adm-top-nav { display: flex; gap: 4px; margin-left: auto; }
.adm-top-nav a {
  color: var(--txt-dim); text-decoration: none; font-size: 0.84rem; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap; transition: 0.2s;
}
.adm-top-nav a:hover { color: var(--gold-2); background: var(--card-2); }
.adm-user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.adm-user-name { font-weight: 700; font-size: 0.86rem; white-space: nowrap; }
.adm-user-mail { font-size: 0.72rem; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* ---------- yerleşim: yan menü + içerik ---------- */
.adm-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; flex: 1; }
.adm-side {
  position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; padding: 22px 14px;
  border-right: 1px solid var(--line);
}
.adm-nav { display: flex; flex-direction: column; gap: 4px; }
.adm-nav-h { margin: 18px 14px 6px; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; color: var(--txt-dim); }
.adm-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid transparent;
  color: var(--txt-dim); text-decoration: none; font-size: 0.92rem; font-weight: 600; transition: 0.18s;
}
.adm-nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-nav a:hover { color: var(--gold-2); background: var(--card-2); }
.adm-nav a.on { color: var(--gold-2); background: rgba(240, 199, 110, 0.1); border-color: var(--line); }
[data-theme="safak"] .adm-nav a.on { background: rgba(169, 131, 47, 0.1); }
.adm-main { min-width: 0; padding: 28px 28px 70px; }
.adm-view { max-width: 1240px; margin: 0 auto; animation: fadeUp 0.3s ease; }

@media (max-width: 900px) {
  .adm-top { gap: 8px; padding: 8px 12px; }
  .adm-top-tag { display: none; }
  .adm-user { display: none; }
  .adm-top-nav a[href="/account"] { display: none; }
  .brand-text { font-size: 1.15rem; }
  .adm-layout { grid-template-columns: 1fr; }
  .adm-side {
    position: sticky; top: 57px; z-index: 40; height: auto; padding: 8px 10px; overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-bottom: 1px solid var(--line); background: rgba(33, 26, 65, 0.93); backdrop-filter: blur(14px);
  }
  [data-theme="safak"] .adm-side { background: rgba(250, 246, 236, 0.95); }
  .adm-nav { flex-direction: row; gap: 6px; }
  .adm-nav a { white-space: nowrap; padding: 9px 12px; }
  .adm-nav a svg { width: 16px; height: 16px; }
  .adm-nav-h { display: none; }
  .adm-main { padding: 18px 14px 60px; }
}

/* ---------- sayfa başlığı ---------- */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.adm-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.1; margin-top: 4px; }
.adm-head .kicker { margin-bottom: 0; }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-sub { color: var(--txt-dim); font-size: 0.92rem; max-width: 640px; margin: -10px 0 20px; }

/* ---------- kartlar, sayılar, listeler ---------- */
.adm-card { padding: 22px; margin-bottom: 20px; }
.adm-card > h3 { font-size: 1.3rem; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-card > h3 a { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--gold-2); text-decoration: none; white-space: nowrap; }
.adm-card > h3 a:hover { text-decoration: underline; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  display: block; text-decoration: none; color: var(--txt); padding: 18px 20px; position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--rad); background: var(--card); transition: 0.2s;
}
.stat:hover { border-color: var(--gold); transform: translateY(-2px); }
.stat small { display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--gold); }
.stat b { display: block; font-family: var(--serif); font-size: 2.5rem; line-height: 1.15; font-weight: 700; }
.stat span { font-size: 0.8rem; color: var(--txt-dim); }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.adm-grid .span2 { grid-column: 1 / -1; }
.adm-grid > * { min-width: 0; }
.adm-grid .adm-card { margin-bottom: 0; }
.adm-grid { margin-bottom: 20px; }
@media (max-width: 1000px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-list { list-style: none; display: flex; flex-direction: column; }
.adm-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.adm-list li:first-child { border-top: 0; padding-top: 0; }
.adm-list li:last-child { padding-bottom: 0; }
.adm-list .li-main { flex: 1; min-width: 0; }
.adm-list .li-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-list .li-main small { display: block; font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-list .li-time { font-size: 0.76rem; color: var(--txt-dim); white-space: nowrap; }
.adm-list li a { color: var(--txt); text-decoration: none; }
.adm-list li a:not(.btn):hover { color: var(--gold-2); text-decoration: underline; }
.adm-list li a.btn { color: var(--gold-2); text-decoration: none; }
.adm-empty { color: var(--txt-dim); font-size: 0.9rem; }

/* ---------- araç çubuğu, tablo, rozetler ---------- */
.adm-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.adm-toolbar .input { width: auto; flex: 1 1 220px; max-width: 360px; margin-bottom: 0; }
.adm-toolbar select.input { flex: 0 0 auto; width: auto; min-width: 132px; }
.adm-toolbar .spacer { flex: 1; }
.adm-tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--rad); background: var(--card); }
table.adm-tbl { width: 100%; border-collapse: collapse; min-width: 620px; }
.adm-tbl th {
  text-align: left; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.adm-tbl td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; vertical-align: middle; }
[data-theme="safak"] .adm-tbl td { border-bottom-color: rgba(58, 74, 31, 0.1); }
.adm-tbl tbody tr { transition: background 0.15s; }
.adm-tbl tbody tr:hover { background: var(--card-2); }
.adm-tbl tbody tr:last-child td { border-bottom: 0; }
.adm-tbl td strong { display: block; }
.adm-tbl td small { font-size: 0.74rem; }
.adm-tbl .t-title a { display: block; color: var(--txt); text-decoration: none; font-weight: 700; }
.adm-tbl .t-title small { display: block; }
.adm-tbl .t-title a:hover { color: var(--gold-2); }
.adm-tbl .t-num { text-align: center; font-weight: 700; }
.adm-tbl .t-actions { white-space: nowrap; text-align: right; }
.adm-tbl .t-actions .btn { padding: 6px 12px; font-size: 0.76rem; margin-left: 6px; }
.adm-tbl .t-actions .icon-btn { width: 30px; height: 30px; margin-left: 6px; vertical-align: middle; }

/* ---------- sayfa onayları (erişim): hesaba açılan hesaplamalar ve yazılar ---------- */
.access-sum { white-space: nowrap; }
.access-sum small { display: block; color: var(--txt-dim); }
.approve-title { margin: 4px 0 10px; font-size: 0.86rem; font-weight: 700; color: var(--gold-2); }
.approve-title small, .approve-group legend small { font-weight: 500; color: var(--txt-dim); font-size: 0.78rem; letter-spacing: 0; text-transform: none; }
.approve-group { border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 12px; margin: 0 0 14px; min-width: 0; }
.approve-group legend { padding: 0 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-dim); }
.approve-group .chk { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 0.9rem; cursor: pointer; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.approve-group .chk:first-of-type { border-top: 0; }
.approve-group .chk input { width: 16px; height: 16px; flex: none; accent-color: var(--gold-2); }
.approve-group .chk .badge { margin-left: 4px; }
/* onay satırı: kutu + isteğe bağlı bitiş tarihi (süreli onay). Tarih kutusu yalnız kutu işaretliyken görünür. */
.approve-row { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.approve-row:first-of-type { border-top: 0; }
.approve-row .chk { flex: 1 1 180px; min-width: 0; border-top: 0; padding: 0; }
.approve-row .until { display: none; align-items: center; gap: 6px; }
.approve-row .chk:not(:has(input:checked)) ~ .until { display: none !important; }
.approve-row .chk:has(input:checked) ~ .until { display: flex; }
.approve-row .until-l { font-size: 0.74rem; color: var(--txt-dim); white-space: nowrap; }
.approve-row .until.has .until-l { color: var(--gold-2); font-weight: 700; }
.approve-row .until-dt { width: auto; margin: 0; padding: 6px 8px; font-size: 0.8rem; }
.approve-row .until-dt.bad { border-color: var(--danger); }
html:not([data-theme="safak"]) .until-dt { color-scheme: dark; }
.until-x { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; background: var(--card-2); color: var(--txt-dim); font-size: 0.75rem; flex: none; }
.until-x:hover { color: var(--danger); }
/* grup düzenleyici: üye seçme listesi */
.member-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 10px; margin-bottom: 4px; }
.member-pick .chk { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 0.9rem; cursor: pointer; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.member-pick .chk:first-of-type { border-top: 0; }
.member-pick .chk input { width: 16px; height: 16px; flex: none; accent-color: var(--gold-2); }
.member-pick .chk b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-pick .chk small { color: var(--txt-dim); white-space: nowrap; }
.member-pick .chk.dis { opacity: 0.55; }
.adm-sub a, .adm-note a { color: var(--gold-2); font-weight: 700; }
.adm-note small { color: var(--txt-dim); }

/* ---------- zamanlı erişim: bölüm / yazı satırları (durum + hızlı süreler + bitiş tarihi) ---------- */
.win-list { display: flex; flex-direction: column; }
.win-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.win-list .win-row:first-child { border-top: 0; padding-top: 4px; }
.win-list .win-row:last-child { padding-bottom: 0; }
.win-main { min-width: 0; }
.win-main b { display: block; font-size: 1rem; }
.win-main b a { color: var(--txt); text-decoration: none; }
.win-main b a:hover { color: var(--gold-2); text-decoration: underline; }
.win-main b .badge { margin-left: 6px; vertical-align: middle; }
.win-main small { display: block; font-size: 0.76rem; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-state { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.win-until { font-size: 0.82rem; color: var(--gold-2); white-space: nowrap; }
.win-row.open .win-until [data-remain] { color: var(--txt); font-weight: 700; }
.win-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.win-label, .win-or { font-size: 0.76rem; color: var(--txt-dim); }
.win-or { margin-left: 6px; }
.win-controls .btn { padding: 6px 12px; font-size: 0.78rem; }
.win-controls .input { width: auto; margin: 0; padding: 8px 10px; font-size: 0.84rem; }
html:not([data-theme="safak"]) .win-dt { color-scheme: dark; }   /* koyu temada takvim simgesi görünür */
@media (max-width: 640px) {
  .win-row { grid-template-columns: 1fr; }
  .win-state { justify-content: flex-start; }
}
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); color: var(--txt-dim); white-space: nowrap;
}
.badge.pub, .badge.ok, .badge.admin { background: rgba(240, 199, 110, 0.14); color: var(--gold-2); }
.badge.draft, .badge.off { background: rgba(167, 139, 250, 0.14); color: var(--lilac-2); }
.badge.dis, .badge.bad { background: rgba(253, 164, 175, 0.14); color: var(--danger); }
[data-theme="safak"] .badge.pub, [data-theme="safak"] .badge.ok, [data-theme="safak"] .badge.admin { background: rgba(169, 131, 47, 0.14); color: var(--gold); }
[data-theme="safak"] .badge.draft, [data-theme="safak"] .badge.off { background: rgba(124, 92, 158, 0.14); color: var(--lilac); }

.btn-danger { background: rgba(253, 164, 175, 0.14); color: var(--danger); border-color: rgba(253, 164, 175, 0.35); }
.btn-danger:hover { background: rgba(253, 164, 175, 0.26); }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none !important; }

/* ---------- form parçaları ---------- */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.field .input { margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--gold-3); }
.switch-row { display: flex; align-items: flex-start; gap: 16px; padding: 6px 0; }
.switch-row .sw-txt { flex: 1; }
.switch-row .sw-txt b { display: block; font-size: 0.98rem; }
.switch-row .sw-txt small { display: block; font-size: 0.84rem; margin-top: 2px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); transition: 0.2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--txt-dim); transition: 0.2s; }
.switch input:checked + i { background: linear-gradient(135deg, var(--gold), var(--gold-3)); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(20px); background: var(--gold-ink); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(240, 199, 110, 0.3); }

/* ---------- yükleme / hata ---------- */
.adm-loading { display: grid; gap: 14px; }
.adm-loading .skel { min-height: 80px; }
.spin {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold);
  animation: spin 0.7s linear infinite; display: inline-block; vertical-align: -3px; margin-right: 8px;
}
.adm-note { border-left: 3px solid var(--gold); padding: 10px 14px; background: var(--card-2); border-radius: 0 12px 12px 0; font-size: 0.86rem; color: var(--txt-dim); }
.adm-note b { color: var(--txt); }
.kv-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 0.9rem; }
.kv-list dt { color: var(--txt-dim); }
.kv-list dd { font-weight: 700; word-break: break-all; }

/* ---------- pencere (üye düzenle, şifre, sil onayı) ---------- */
.adm-modal {
  border: 1px solid var(--line); border-radius: 20px; padding: 0; width: min(520px, calc(100% - 28px)); color: var(--txt);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: var(--shadow); max-height: calc(100dvh - 30px); overflow: auto;
}
[data-theme="safak"] .adm-modal { background: linear-gradient(180deg, #fdfbf4, var(--bg-1)); }
.adm-modal::backdrop { background: rgba(8, 4, 18, 0.78); backdrop-filter: blur(6px); }
[data-theme="safak"] .adm-modal::backdrop { background: rgba(46, 42, 32, 0.5); }
.adm-modal[open] { animation: khPop 0.28s ease; }
.adm-modal-in { padding: 28px 28px 24px; position: relative; }
.adm-modal-in h3 { font-size: 1.6rem; color: var(--gold-2); margin-bottom: 4px; padding-right: 36px; }
.adm-modal-sub { color: var(--txt-dim); font-size: 0.88rem; margin-bottom: 18px; }
.adm-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.adm-modal .modal-x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: var(--card-2); color: var(--txt); font-size: 0.9rem; }
.adm-modal .modal-x:hover { background: rgba(255, 255, 255, 0.15); }
.adm-modal form .btn[type="submit"] { width: 100%; justify-content: center; margin-top: 6px; }
.cover-row, .gen-row { display: flex; gap: 8px; align-items: center; }
.cover-row .input, .gen-row .input { flex: 1; width: auto; min-width: 0; }
.cover-row .btn, .gen-row .btn { flex: none; }
.adm-list li > a.btn { flex: none; }

/* ---------- YAZI DÜZENLEYİCİ ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-title {
  width: 100%; font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; color: var(--txt);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0 12px; outline: none; line-height: 1.15; margin-bottom: 16px;
}
.editor-title::placeholder { color: color-mix(in srgb, var(--txt-dim) 40%, transparent); }
.editor-title:focus { border-bottom-color: var(--gold); }
.adm-sticky { position: sticky; top: 84px; }
.save-state { font-size: 0.78rem; color: var(--txt-dim); min-height: 1.3em; }
.save-state.dirty { color: var(--gold-2); }
.save-state.err { color: var(--danger); }
.ed-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.ed-foot .hint { margin: 0; }
.cover-prev {
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3);
  display: grid; place-items: center; color: var(--txt-dim); font-size: 0.8rem; margin-top: 10px; text-align: center; padding: 8px;
}
.cover-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-prev.has { background: none; }
.slug-line { display: flex; align-items: center; gap: 0; }
.slug-line em { font-family: monospace; font-size: 0.82rem; color: var(--txt-dim); white-space: nowrap; line-height: 41px; }
.slug-line .input { flex: 1; width: auto; min-width: 0; font-family: monospace; font-size: 0.86rem; }
.ed-actions { display: grid; gap: 8px; }
.ed-actions .btn { width: 100%; justify-content: center; }
.ed-danger { display: flex; gap: 8px; }
.ed-danger .btn { flex: 1; justify-content: center; }
/* Quill: temaya uydurulmuş görünüm */
.ql-toolbar.ql-snow {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px 14px 0 0;
  font-family: var(--sans); padding: 6px 8px; position: sticky; top: 70px; z-index: 5;
}
.ql-container.ql-snow {
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--card);
  font-family: var(--sans); font-size: 1.02rem; min-height: 420px;
}
.ql-toolbar.ql-snow .ql-stroke, .ql-toolbar.ql-snow .ql-stroke-miter { stroke: var(--txt-dim); }
.ql-toolbar.ql-snow .ql-fill, .ql-toolbar.ql-snow .ql-stroke.ql-fill { fill: var(--txt-dim); }
.ql-toolbar.ql-snow button:hover:not(.ql-active) .ql-stroke, .ql-toolbar.ql-snow button:hover:not(.ql-active) .ql-stroke-miter,
.ql-toolbar.ql-snow .ql-picker-label:hover:not(.ql-active) .ql-stroke { stroke: var(--gold-2); }
.ql-toolbar.ql-snow button:hover:not(.ql-active) .ql-fill, .ql-toolbar.ql-snow button:hover:not(.ql-active) .ql-stroke.ql-fill { fill: var(--gold-2); }
.ql-toolbar.ql-snow button:hover .ql-stroke, .ql-toolbar.ql-snow button:focus .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke, .ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-item:hover .ql-stroke, .ql-toolbar.ql-snow .ql-picker-item.ql-selected .ql-stroke { stroke: var(--gold-2); }
.ql-toolbar.ql-snow button:hover .ql-fill, .ql-toolbar.ql-snow button:focus .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill, .ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-fill,
.ql-toolbar.ql-snow button:hover .ql-stroke.ql-fill, .ql-toolbar.ql-snow button.ql-active .ql-stroke.ql-fill { fill: var(--gold-2); }
.ql-toolbar.ql-snow .ql-picker { color: var(--txt); }
.ql-toolbar.ql-snow .ql-picker-options { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { color: var(--txt-dim); }
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { fill: var(--txt-dim); }
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { stroke: var(--txt-dim); }
.ql-toolbar.ql-snow .ql-picker-item:hover { color: var(--gold-2); }
.ql-toolbar.ql-snow .ql-picker.ql-header { width: 112px; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item::before { content: "Normal"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "Başlık 2"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "Başlık 3"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { content: "Başlık 4"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before { content: "Başlık 2"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before { content: "Başlık 3"; }
.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before { content: "Başlık 4"; }
.ql-container.ql-snow .ql-tooltip { background: var(--bg-3); border-color: var(--line); color: var(--txt); box-shadow: var(--shadow); border-radius: 10px; }
.ql-container.ql-snow .ql-tooltip input[type=text] { background: var(--card); border-color: var(--line); color: var(--txt); }
.ql-container.ql-snow .ql-tooltip::before { content: "Bağlantı:"; }
.ql-container.ql-snow .ql-tooltip a.ql-action::after { content: "Düzenle"; }
.ql-container.ql-snow .ql-tooltip a.ql-remove::before { content: "Kaldır"; }
.ql-container.ql-snow .ql-tooltip a { color: var(--gold-2); }
.ql-container .ql-editor { padding: 22px 26px 30px; line-height: 1.75; font-size: 1.04rem; color: var(--txt); min-height: 420px; }
.ql-container .ql-editor.ql-blank::before { color: color-mix(in srgb, var(--txt-dim) 50%, transparent); font-style: normal; left: 26px; }
.ql-container .ql-editor h2, .ql-container .ql-editor h3, .ql-container .ql-editor h4 { color: var(--txt); font-weight: 600; line-height: 1.22; }
.ql-container .ql-editor h2 { font-size: 1.9rem; margin: 1.5em 0 0.4em; }
.ql-container .ql-editor h3 { font-size: 1.5rem; margin: 1.4em 0 0.4em; }
.ql-container .ql-editor h4 { font-size: 1.18rem; margin: 1.3em 0 0.4em; }
.ql-container .ql-editor h2:first-child, .ql-container .ql-editor h3:first-child, .ql-container .ql-editor h4:first-child { margin-top: 0; }
.ql-container .ql-editor p { margin-bottom: 0.9em; }
.ql-container .ql-editor p:last-child { margin-bottom: 0; }
.ql-container .ql-editor blockquote { border-left: 3px solid var(--gold); background: var(--card-2); border-radius: 0 12px 12px 0; padding: 12px 18px; margin: 1em 0; font-family: var(--serif); font-style: italic; font-size: 1.18rem; color: var(--txt); }
.ql-container .ql-editor ul, .ql-container .ql-editor ol { padding-left: 1.5em; margin-bottom: 0.9em; }
.ql-container .ql-editor li { margin-bottom: 0.3em; }
.ql-container .ql-editor li.ql-indent-1 { padding-left: 1.5em; }
.ql-container .ql-editor a { color: var(--gold-2); }
.ql-container .ql-editor img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 1em auto; }
.ql-container .ql-editor hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.ql-container .ql-editor .ql-align-center { text-align: center; }
.ql-container .ql-editor .ql-align-right { text-align: right; }
.ql-container .ql-editor .ql-align-justify { text-align: justify; }
.ed-source { width: 100%; min-height: 420px; font-family: monospace; font-size: 0.88rem; line-height: 1.6; }

/* ---------- yazdırma ---------- */
@media print {
  .adm-top, .adm-side, .adm-toolbar, .adm-actions, .kh-toast, .adm-modal, .ed-actions, .ed-danger, .ql-toolbar, .save-state, .ed-foot, .no-print { display: none !important; }
  body, [data-theme] body { background: #fff !important; color: #111; }
  .adm-layout { display: block; }
  .adm-view { max-width: none; }
  .adm-main { padding: 0; }
  .editor-grid { display: block; }
  .ed-title-wrap, .editor-title { margin-bottom: 10px; }
  .ql-container.ql-snow { border: 0; min-height: 0; }
}
