/* İslambol Yayınları yönetim paneli. Görünüm "Beyaz Vitrin" diliyle uyumlu: beyaz kartlar, açık gri zemin, tek kırmızı vurgu.
   CSP style-src 'self': satır içi stil yok; her şey sınıfla. Yazı tipi: typography.css'ten Inter. */
:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #5e5e63;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --edge: #86868b;
  --page: #f5f5f7;
  --accent: #b5151f;
  --accent-hover: #97101a;
  --accent-tint: #fdecee;
  --focus: #0071e3;
  --ok-bg: #e6f4ea;
  --ok-ink: #1b5a35;
  --danger-bg: #fff1f0;
  --danger-ink: #9a1621;
  --danger-line: #f1c4c2;
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1:focus, .admin-main:focus { outline: none; }
code { font: 14px var(--mono); background: #ececf0; padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.initial-loading { text-align: center; margin: 25vh auto; }
.align-right { text-align: right; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 40; padding: 12px 18px; background: #fff; color: var(--ink); font-weight: 600; border: 2px solid var(--focus); border-radius: 10px; }
.skip-link:focus { top: 12px; text-decoration: none; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- Düğmeler ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 1px solid var(--line); border-radius: 980px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s, border-color .15s; }
.button:hover { background: #efeff2; border-color: #b8b8be; text-decoration: none; }
.button-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
.button-danger:hover { background: #ffe1de; border-color: #e7a6a3; }
.button-danger-solid { background: #b3261e; border-color: #b3261e; color: #fff; }
.button-danger-solid:hover { background: #8f1d17; border-color: #8f1d17; }
.button-small { min-height: 44px; padding: 6px 16px; font-size: 14px; }
.file-button { position: relative; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Form alanları ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-label { font-size: 14px; font-weight: 600; }
.req { color: var(--accent); }
.field > input, .field > select, .field > textarea, .search-input { width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px; background: #fff; border: 1px solid var(--edge); border-radius: 12px; font-size: 16px; font-weight: 400; }
.field > textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.field > textarea.mono { font: 14px/1.6 var(--mono); }
.field > input[readonly] { background: #efeff2; color: var(--muted); }
.field small, .section-help, .card-help { color: var(--muted); font-size: 14px; line-height: 1.45; }
.field-wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.checkbox-field input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.form-error { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--danger-line); border-radius: 12px; background: var(--danger-bg); color: var(--danger-ink); font-size: 15px; }
.inline-note { margin: 0; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--page); color: var(--ink); font-size: 14px; }
.empty-note { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }

/* ---------- Giriş ---------- */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-intro { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 7vw, 110px); background: var(--page); }
.login-intro h1 { max-width: 550px; margin-bottom: 22px; font-size: clamp(40px, 4.6vw, 64px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.login-intro p { max-width: 420px; color: var(--muted); font-size: 17px; }
.login-intro .eyebrow { max-width: none; font-size: 12px; color: var(--accent); }
.login-brand { margin-bottom: 64px; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.login-brand:hover { text-decoration: none; }
.login-brand span { color: var(--accent); }
.login-brand small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px; background: #fff; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { margin-bottom: 8px; font-size: 30px; letter-spacing: -.02em; }
.login-card form { display: grid; gap: 14px; margin: 28px 0 24px; }
.login-card form .form-error { margin: 0; }
.login-card .button { width: 100%; }
.local-note { margin: 0 0 20px; padding: 16px 18px; border-radius: 12px; background: var(--page); color: var(--muted); font-size: 14px; }
.login-return { margin: 0; }

/* ---------- Kabuk: kenar çubuğu ---------- */
.admin-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.mobile-bar { display: none; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 28px 16px 20px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-brand { padding: 0 14px; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand span { color: var(--accent); }
.sidebar-caption { margin: 2px 0 28px; padding: 0 14px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 12px; background: transparent; color: #3a3a3d; font-size: 15px; text-align: left; }
.nav-item:hover { background: var(--page); }
.nav-item[aria-current] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.nav-count { min-width: 28px; padding: 2px 8px; border-radius: 20px; background: var(--page); color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; }
.nav-item[aria-current] .nav-count { background: #fff; color: var(--accent); }
.sidebar-bottom { display: grid; gap: 2px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.side-link { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 12px; background: none; color: #3a3a3d; font-size: 14px; text-align: left; text-decoration: none; }
.side-link:hover { background: var(--page); text-decoration: none; }
.admin-main { width: 100%; max-width: 1240px; min-width: 0; margin-inline: auto; padding: 48px clamp(20px, 4vw, 56px) 72px; }

/* ---------- Sayfa başlığı, sayılar, kısayollar ---------- */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(30px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: 17px; }
.section-title { margin: 0 0 16px; font-size: 22px; letter-spacing: -.02em; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.shortcut { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 132px; padding: 24px 76px 24px 26px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; text-align: left; transition: border-color .15s, box-shadow .2s; }
.shortcut:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgb(0 0 0 / .06); }
.shortcut-title { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.shortcut-text { color: var(--muted); font-size: 15px; }
.shortcut-go { position: absolute; right: 22px; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 20px; }
.note { padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.note h2 { margin-bottom: 6px; font-size: 17px; }
.note p { margin: 0; color: var(--muted); }

/* ---------- Liste (tablo) ---------- */
.content-card { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
.table-tools { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.search-input { max-width: 440px; }
.table-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); background: #fafafc; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 20px; border-top: 1px solid var(--line-soft); font-size: 15px; vertical-align: middle; }
.data-table tbody tr:first-child td { border-top: 0; }
.cell-status { white-space: nowrap; }
.cell-status .badge + .badge { margin-left: 6px; }
.cell-wide { max-width: 420px; color: var(--muted); }
.record-title { display: flex; align-items: center; gap: 14px; min-width: 240px; max-width: 560px; }
.record-title strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.record-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.record-thumb { flex: none; width: 40px; height: 56px; border-radius: 4px; background: var(--page); object-fit: contain; }
.record-thumb-author { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.record-thumb-campaign { width: 72px; height: 42px; object-fit: cover; }
.initial-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--line-soft); color: var(--muted); font-weight: 600; }
.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 30px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-draft { background: #efeff2; color: #55555a; }
.badge-preview { background: var(--accent-tint); color: var(--accent); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.empty { padding: 60px 25px; color: var(--muted); text-align: center; }

/* ---------- Sayfa içi formlar (vitrin, site ayarları) ---------- */
.panel-form { display: block; }
.form-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-fieldset > * + * { margin-top: 20px; }
.form-card { display: grid; gap: 18px; padding: 28px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
.form-card h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.form-card .card-help { margin: -8px 0 0; max-width: 70ch; }
.form-card > .button { justify-self: start; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgb(255 255 255 / .94); box-shadow: 0 8px 28px rgb(0 0 0 / .1); backdrop-filter: blur(12px); }
.form-bar .form-error { margin: 0 0 12px; }
.form-bar-row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.save-status { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--muted); font-size: 14px; }
.spinner { flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Kontrol listeleri ve kategori seçimi */
.checklist { display: grid; gap: 10px; }
.check-list { max-height: 340px; margin: 0; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; list-style: none; }
.check-list li + li { border-top: 1px solid var(--line-soft); }
.check-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 14px; cursor: pointer; }
.check-row:hover { background: var(--page); }
.check-row input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.check-text { display: grid; flex: 1; min-width: 0; }
.check-title { font-weight: 500; overflow-wrap: anywhere; }
.check-text small { color: var(--muted); font-size: 13px; }
.check-count { margin: 0; color: var(--muted); font-size: 14px; }
.category-field { display: block; }
.category-field legend { margin-bottom: 10px; padding: 0; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.check-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 8px 16px 8px 12px; border: 1px solid var(--edge); border-radius: 980px; background: #fff; font-size: 15px; cursor: pointer; }
.check-chip:hover { background: var(--page); }
.check-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.check-chip input { flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
.check-chip span { overflow-wrap: anywhere; }

/* Telefon bağlantı önizlemesi, satış noktaları */
.link-preview { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--page); }
.link-preview-label { color: var(--muted); font-size: 13px; }
.link-preview code { padding: 0; background: none; font-size: 15px; }
.link-preview code.is-invalid { color: var(--danger-ink); }
.repeater-row { min-width: 0; margin: 0 0 14px; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fafafc; }
.repeater-row > * + * { margin-top: 14px; }
.repeater-legend { padding: 0 8px; font-size: 15px; font-weight: 600; }
.repeater-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.repeater-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* ---------- Diyalog ---------- */
dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .28); }
dialog[data-size="narrow"] { width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .42); }
.dialog-heading { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line-soft); background: #fff; }
.dialog-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.close-dialog { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--page); font-size: 26px; line-height: 1; }
.close-dialog:hover { background: var(--line-soft); }
.editor-body { padding: 26px 28px; }
.editor-body .form-error { margin-bottom: 20px; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-section { grid-column: 1 / -1; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.editor-grid > .form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.015em; }
.section-help { margin: 0; }
.editor-footer { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--line-soft); background: #fafafc; }
.confirmation-body h3 { margin-bottom: 10px; font-size: 19px; overflow-wrap: anywhere; }
.confirmation-body p { color: var(--muted); }
.confirmation-body p:last-child { margin-bottom: 0; }

/* Görsel yükleme ve önizleme sayfaları */
.image-box { display: flex; align-items: flex-start; gap: 20px; padding: 16px; border: 1px dashed #a1a1a6; border-radius: 14px; background: var(--page); }
.image-frame { flex: none; display: grid; place-items: center; width: 132px; min-height: 132px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.image-preview { display: block; max-width: 100%; max-height: 190px; object-fit: contain; }
.image-empty { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.image-actions small { flex-basis: 100%; }
.preview-section { display: grid; gap: 12px; }
.preview-section > * { margin: 0; }
.preview-counter { font-weight: 600; }
.preview-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.preview-item { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; }
.preview-thumb { flex: none; width: 48px; height: 64px; border-radius: 4px; background: var(--page); object-fit: cover; }
.preview-name { font-weight: 500; }
.preview-actions { display: flex; gap: 8px; margin-left: auto; }
.preview-actions .button-small { min-width: 44px; padding-inline: 12px; }
.preview-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.preview-section .file-button { justify-self: start; }

/* Sayfa metni düzenleme */
.insert-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.md-help { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--page); }
.md-help summary { display: flex; align-items: center; min-height: 32px; font-weight: 600; cursor: pointer; }
.md-help ul { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; }
.field > .insert-bar + small, .field > .inline-note, .field > small { margin-top: 2px; }

/* ---------- Yayın çubuğu (sayfanın üstünde yapışık) ---------- */
.publish-bar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -48px calc(-1 * clamp(20px, 4vw, 56px)) 32px; padding: 14px clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .96); backdrop-filter: blur(10px); }
.publish-bar[data-state="pending"] { background: #fff8e8; border-bottom-color: #ecd9a4; }
.publish-bar[data-state="error"] { background: var(--danger-bg); border-bottom-color: var(--danger-line); }
.publish-bar[data-state="busy"] { background: #eef5ff; border-bottom-color: #bcd4f5; }
.publish-text { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 15px; line-height: 1.4; }
.publish-text > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.publish-text small { color: var(--muted); font-size: 13px; }
.publish-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.publish-actions .button { min-height: 44px; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--edge); }
.dot-ok { background: #2f9e5b; }
.dot-pending { background: #e0a21b; }
.dot-error { background: #c93a2f; }
.dot-off { background: var(--edge); }
.publish-detail { margin-top: 6px; }
.publish-detail summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.publish-detail pre { max-height: 140px; margin: 6px 0 0; padding: 10px; overflow: auto; border-radius: 8px; background: rgb(0 0 0 / .05); font: 12px/1.4 var(--mono); white-space: pre-wrap; }

.publish-foreign { display: block; margin-top: 2px; }
.foreign-list { display: grid; gap: 6px; margin: 0 0 14px; padding-left: 20px; list-style: disc; font-size: 14px; overflow-wrap: anywhere; }

/* ---------- Kitaplık: arama, süzgeç, kapak kartları ---------- */
.library-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.library-tools .search-input { flex: 1 1 280px; max-width: 420px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 980px; background: #fff; font-size: 15px; }
.chip span { color: var(--muted); font-size: 13px; }
.chip:hover { background: var(--page); }
.chip.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.is-on span { color: #d5d5da; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 20px; }
.book-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; transition: box-shadow .2s, border-color .2s; }
.book-card:hover { border-color: var(--line); box-shadow: 0 10px 28px rgb(0 0 0 / .08); }
.book-card.is-draft { background: #fafafc; }
.book-card.is-draft .book-cover img { opacity: .55; }
.book-cover { display: grid; place-items: center; aspect-ratio: 2 / 3; padding: 14px; border: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--page); }
.book-cover img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 6px 18px rgb(0 0 0 / .16); }
.book-cover-empty { display: grid; place-items: center; width: 70%; aspect-ratio: 2 / 3; border-radius: 6px; background: var(--line-soft); color: var(--muted); font-size: 32px; font-weight: 600; }
.book-info { flex: 1; display: grid; align-content: start; gap: 4px; padding: 14px 16px 4px; }
.book-info h3 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.book-info p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.book-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-soft { background: #eef2fb; color: #2c4a86; }
.book-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 16px; }
.book-card-new { align-items: center; justify-content: center; gap: 6px; min-height: 280px; padding: 24px; border: 2px dashed #a1a1a6; background: transparent; color: var(--ink); text-align: center; }
.book-card-new:hover { border-color: var(--accent); background: var(--accent-tint); box-shadow: none; }
.book-card-new .plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 34px; line-height: 1; }
.book-card-new strong { font-size: 18px; }
.book-card-new small { color: var(--muted); font-size: 13px; }
.book-empty { grid-column: 1 / -1; }
.card-menu { position: relative; }
.card-menu summary { min-width: 44px; padding-inline: 12px; list-style: none; cursor: pointer; }
.card-menu summary::-webkit-details-marker { display: none; }
.card-menu-list { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 6; display: grid; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 14px 36px rgb(0 0 0 / .18); }
.card-menu-list button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; font-size: 14px; text-align: left; }
.card-menu-list button:hover { background: var(--page); }
.card-menu-list .is-danger { color: var(--danger-ink); }
.card-menu-list .is-danger:hover { background: var(--danger-bg); }

/* ---------- Sade kitap formu ---------- */
.book-editor { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 28px; align-items: start; }
.book-editor-cover { display: grid; gap: 12px; }
.dropzone { display: grid; place-items: center; aspect-ratio: 2 / 3; padding: 14px; border: 2px dashed #a1a1a6; border-radius: 16px; background: var(--page); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-tint); }
.dropzone-body { display: grid; justify-items: center; gap: 8px; max-width: 100%; max-height: 100%; color: var(--muted); font-size: 14px; text-align: center; }
.dropzone-body strong { color: var(--ink); font-size: 17px; }
.dropzone-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 24px; }
.dropzone-image { display: block; max-width: 100%; max-height: 330px; object-fit: contain; box-shadow: 0 6px 18px rgb(0 0 0 / .18); }
.dropzone-change { font-size: 13px; }
.dropzone-help, .dropzone-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dropzone-status:empty { display: none; }
.cover-extras { display: grid; gap: 10px; }
.extra-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; }
.extra-card img { flex: none; width: 64px; max-height: 88px; object-fit: contain; border-radius: 4px; }
.extra-card > div { display: grid; gap: 4px; min-width: 0; font-size: 14px; }
.extra-card small { color: var(--muted); font-size: 12px; }
.link-button { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; text-decoration: underline; }
.guide { margin: 0 0 4px; padding: 12px 16px; border: 1px solid #f1e3b5; border-radius: 12px; background: #fff9e6; font-size: 14px; }
.guide summary { display: flex; align-items: center; min-height: 32px; font-weight: 600; cursor: pointer; }
.guide ul { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 20px; list-style: disc; }
.guide-example { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed #e4d49a; color: #4a4a4f; }
.more-info { border: 1px solid var(--line-soft); border-radius: 14px; background: #fff; }
.more-info > summary { display: flex; align-items: center; min-height: 52px; padding: 8px 18px; font-weight: 600; cursor: pointer; }
.more-grid { padding: 4px 18px 20px; }

/* ---------- Bildirim ---------- */
.notification { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(460px, calc(100vw - 32px)); padding: 16px 22px; border: 1px solid #b6dcc3; border-radius: 14px; background: var(--ok-bg); color: var(--ok-ink); box-shadow: 0 12px 40px rgb(0 0 0 / .14); font-size: 15px; font-weight: 500; }
.notification[data-kind="error"] { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger-ink); }

/* ---------- Dar ekran (telefon ve küçük tablet) ---------- */
@media (max-width: 900px) {
  .admin-shell { display: block; }
  .mobile-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .95); backdrop-filter: blur(10px); }
  .mobile-bar .sidebar-brand { padding: 0; font-size: 22px; }
  .mobile-title { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar { position: fixed; inset: 60px 0 auto 0; z-index: 14; display: none; height: auto; max-height: calc(100dvh - 60px); padding: 12px 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgb(0 0 0 / .14); }
  .sidebar.is-open { display: flex; }
  .sidebar > .sidebar-brand, .sidebar-caption { display: none; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
  .admin-main { padding: 28px 16px 56px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 24px; }
  .page-heading .button { width: 100%; }
  .shortcuts { grid-template-columns: 1fr; }
  .shortcut { min-height: 0; padding: 20px 68px 20px 20px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 240px; padding: 28px; }
  .login-brand { margin-bottom: 20px; }
  .login-intro h1 { margin-bottom: 10px; font-size: 38px; }
  .login-intro p:not(.eyebrow) { display: none; }
  .login-panel { align-items: flex-start; padding: 32px 22px; }
  .table-tools { flex-wrap: wrap; padding: 14px 16px; }
  .search-input { max-width: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 16px; border-top: 1px solid var(--line-soft); }
  .data-table tbody tr:first-child { border-top: 0; }
  .data-table td { display: block; padding: 0; border: 0; }
  .cell-main, .cell-actions, .cell-wide, .empty { grid-column: 1 / -1; }
  .cell-meta { color: var(--muted); font-size: 14px; }
  .cell-wide { max-width: none; }
  .record-title { min-width: 0; max-width: none; }
  .row-actions { justify-content: flex-start; }
  .form-card { padding: 20px 18px; }
  .form-row, .repeater-grid, .editor-grid { grid-template-columns: 1fr; }
  .form-bar { bottom: 8px; padding: 12px; }
  .form-bar-row { flex-wrap: wrap; }
  .form-bar-row .button { flex: 1 1 100%; }
  .form-bar-row .save-status { flex-basis: 100%; }
  dialog:not([data-size="narrow"]) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  dialog[data-size="narrow"] { width: calc(100vw - 24px); }
  .dialog-heading { padding: 14px 16px; }
  .dialog-heading h2 { font-size: 19px; overflow-wrap: anywhere; }
  .editor-body { padding: 20px 16px; }
  .editor-footer { flex-wrap: wrap; padding: 12px 16px; }
  .editor-footer .save-status { flex-basis: 100%; }
  .editor-footer .button { flex: 1 1 0; }
  .image-box { flex-direction: column; }
  .preview-item { flex-wrap: wrap; }
  .preview-actions { flex-basis: 100%; margin-left: 0; }
  .repeater-actions { justify-content: flex-start; }
  .notification { right: 16px; bottom: 16px; left: 16px; max-width: none; }
  .publish-bar { position: static; flex-wrap: wrap; margin: -28px -16px 20px; padding: 12px 16px; }   /* dar ekranda yer kaplamasın: sayfanın başında durur */
  .publish-actions { flex: 1 1 100%; }
  .publish-actions .button { flex: 1 1 0; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .book-card-new { min-height: 200px; }
  .book-actions { padding: 10px 12px 12px; }
  .book-editor { grid-template-columns: 1fr; gap: 18px; }
  .dropzone { aspect-ratio: auto; min-height: 200px; }
  .dropzone-image { max-height: 240px; }
  .library-tools .search-input { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
