/* ==========================================================================
   Yönetim paneli stilleri
   ========================================================================== */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo-latin-ext-wdth.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo-latin-wdth.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --ink: #1E3A5F; --ink-deep: #0F2440; --ink-2: #3B5375; --ground: #EEF2F6; --paper: #FFFFFF;
  --accent: #F2A93B; --line: #C9D2DE; --field: #6B7F99; --danger: #B42318; --ok: #1B7F5A;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Archivo', Arial, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
code { padding: 1px 6px; border-radius: 4px; background: #E4EAF1; font-size: 13px; }
.icon { flex: none; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }
.muted { color: var(--ink-2); }
.nowrap { white-space: nowrap; }

/* ---------- İskelet ---------- */
.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 20px 14px; background: var(--ink); color: var(--paper); overflow-y: auto; }
.sidebar-brand { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.sidebar-name { font-size: 17px; font-weight: 800; font-stretch: 125%; line-height: 1.2; }
.sidebar-sub { font-size: 13px; color: #CBD6E4; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
.sidebar a, .sidebar button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 8px; background: none; color: #E6ECF3; font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.sidebar a:hover, .sidebar button:hover { background: rgba(255, 255, 255, .08); color: var(--paper); }
.sidebar a[aria-current="page"] { background: var(--accent); color: var(--ink); }
.sidebar .count { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 800; }
.sidebar a[aria-current="page"] .count { background: var(--ink); color: var(--paper); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); }
.sidebar-foot form { margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 16px 32px; background: rgba(238, 242, 246, .95); border-bottom: 1.5px solid var(--ink); backdrop-filter: blur(6px); }
.page-title { font-size: 24px; line-height: 1.2; font-weight: 800; font-stretch: 112%; }
.topbar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-toggle { display: none; }
.content { flex: 1; width: 100%; max-width: 1240px; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 0 100vmax rgba(15, 36, 64, 0); }
  .admin-shell.is-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 36, 64, .45); }
  .sidebar-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
  .topbar { padding: 12px 16px; }
  .page-title { font-size: 20px; width: 100%; order: 3; }
  .content { padding: 20px 16px 48px; }
}

/* ---------- Düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover { background: #F6F8FB; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #F5B85A; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #FFF4F2; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-danger { color: var(--danger); }

/* ---------- Paneller ---------- */
.panel { display: flex; flex-direction: column; gap: 16px; padding: 22px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); min-width: 0; }
.panel-flush { padding: 0; gap: 0; overflow: hidden; }
.panel-flush .empty-text { padding: 22px; }
.panel-narrow { max-width: 720px; }
.panel-inline { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.panel-title { font-size: 17px; font-weight: 800; font-stretch: 112%; }
.panel-title-gap { margin-top: 12px; padding-top: 18px; border-top: 1px dashed var(--line); }
.sub-title { font-size: 15px; font-weight: 800; }
fieldset.panel { margin: 0; }
fieldset.panel > legend { padding: 0 6px; font-size: 16px; font-weight: 800; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.layout-wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.layout-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.main-stack, .side-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1100px) { .layout-2, .layout-wide, .layout-editor { grid-template-columns: 1fr; } }

/* ---------- İstatistik ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); text-decoration: none; }
.stat:hover { background: #FFF8EC; }
.stat-num { font-size: 34px; line-height: 1; font-weight: 800; font-stretch: 112%; }
.stat-label { font-size: 14px; color: var(--ink-2); }
.todo { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.todo li a { display: block; padding: 10px 12px; border: 1.5px dashed var(--field); border-radius: 8px; text-decoration: none; font-weight: 600; }
.todo li a:hover { border-style: solid; border-color: var(--ink); background: #FFF8EC; }
.empty-text { color: var(--ink-2); }

/* ---------- Sekmeler ve araç çubuğu ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 600; text-decoration: none; }
.tabs a span { font-size: 12px; color: var(--ink-2); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.tabs a[aria-current="page"] span { color: #CBD6E4; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .input { max-width: 380px; }
.input-auto { width: auto; max-width: 100%; }
.label-inline { font-weight: 700; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 12px 16px; border-bottom: 1.5px solid var(--ink); background: #F6F8FB; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-new td { background: #FFFBF2; }
.row-link { font-weight: 700; font-size: 15px; }
.sub { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.sub-cell { font-size: 13px; color: var(--ink-2); }
.inline-form { display: inline; margin: 0; }

.status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--paper); }
.status-yeni { background: var(--accent); }
.status-gorusuldu { background: #DCE8F7; }
.status-teklif { background: #E9E1FA; }
.status-kazanildi { background: #D5F2E5; border-color: var(--ok); color: #0F5A3F; }
.status-kapandi { background: #EEF1F5; border-color: var(--field); color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); font-weight: 700; text-decoration: none; }
.pager span { background: var(--accent); }

/* ---------- Talep detayı ---------- */
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.details { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; }
.details div { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.details dt { font-size: 13px; color: var(--ink-2); }
.details dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.message-box { padding: 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #F9FAFC; font-size: 15px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.danger-zone { margin: 0; display: flex; justify-content: flex-end; }

/* ---------- Form ---------- */
.stack-form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; min-width: 0; }
.label { font-size: 14px; font-weight: 700; }
.help { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.help-block { margin: 0; }
.input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--field); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; }
.input:hover { border-color: var(--ink); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242, 169, 59, .55); }
.input[readonly] { background: #F3F5F8; color: var(--ink-2); }
textarea.input { min-height: 90px; line-height: 1.55; resize: vertical; }
.input-lines { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.input-file { padding: 8px; }
select.input { padding-right: 32px; }
.radio-group, .check-list { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.radio-group legend { margin-bottom: 6px; padding: 0; }
.check-list { flex-direction: column; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 600; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.counter { font-size: 12px; color: var(--ink-2); }
.counter.over { color: var(--danger); font-weight: 700; }
.image-current { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; }
.image-current img { max-width: 140px; max-height: 90px; object-fit: contain; border-radius: 6px; background: var(--ground); }
.form-actions { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- Uyarılar ---------- */
.alert { padding: 12px 16px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { border-color: var(--ok); background: #EAF7F1; }
.alert-error { border-color: var(--danger); background: #FFF4F2; }
.alert-info { background: #EEF4FB; }

/* ---------- Editör (Quill) ---------- */
.editor-wrap { border: 1.5px solid var(--field); border-radius: 8px; background: var(--paper); overflow: hidden; }
.editor-wrap .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); background: #F6F8FB; font-family: inherit; }
.editor-wrap .ql-container.ql-snow { border: 0; font-family: inherit; font-size: 16px; }
.editor-wrap .ql-editor { min-height: 360px; line-height: 1.7; }
.editor-wrap .ql-editor h2 { font-size: 24px; }
.editor-wrap .ql-editor h3 { font-size: 19px; }
.editor-wrap.is-uploading { opacity: .7; }

/* ---------- Giriş ve kurulum ---------- */
.auth-page { min-height: 100vh; background-image: linear-gradient(rgba(30, 58, 95, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 58, 95, .07) 1px, transparent 1px); background-size: 32px 32px; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 64px 16px; }
.auth-wrap-wide { max-width: 760px; }
.auth-card { display: flex; flex-direction: column; gap: 18px; padding: 32px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); }
.auth-site { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.auth-title { font-size: 26px; line-height: 1.2; font-weight: 800; font-stretch: 125%; }
.auth-back { font-size: 14px; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.checks li { padding: 8px 12px; border-radius: 8px; background: #F3F5F8; }
.checks .ok { background: #EAF7F1; color: #0F5A3F; }
.checks .bad { background: #FFF4F2; color: var(--danger); font-weight: 700; }
.checks .warn { background: #FFF8EC; }

/* ---------- Tasarım seçimi (Demo 1 / Demo 3) ---------- */
.theme-picker { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.theme-picker > legend { margin-bottom: 8px; padding: 0; }
.theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.theme-option { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.theme-card { position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 44px 14px 14px; border: 1.5px solid var(--field); border-radius: 12px; background: var(--paper); cursor: pointer; }
.theme-card:hover { border-color: var(--ink); }
.theme-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: #FFFBF2; }
.theme-card input { position: absolute; top: 15px; right: 15px; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.theme-card input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-card-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.theme-card-text strong { font-size: 16px; color: var(--ink); }
.theme-card-text .status { margin-top: 4px; }
.theme-thumb { position: relative; flex: none; display: block; width: 104px; height: 70px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-thumb i { position: absolute; left: 10px; display: block; border-radius: 3px; }
.theme-thumb::after { content: ""; position: absolute; top: 12px; right: 10px; width: 32px; height: 46px; border-radius: 6px; }
.theme-thumb i:nth-child(1) { top: 14px; width: 46px; height: 7px; }
.theme-thumb i:nth-child(2) { top: 26px; width: 34px; height: 5px; }
.theme-thumb i:nth-child(3) { top: 42px; width: 26px; height: 10px; }
.theme-thumb-1 { background-color: #EEF2F6; background-image: linear-gradient(rgba(30, 58, 95, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 58, 95, .09) 1px, transparent 1px); background-size: 8px 8px; }
.theme-thumb-1 i:nth-child(1) { background: #1E3A5F; }
.theme-thumb-1 i:nth-child(2) { background: #3B5375; }
.theme-thumb-1 i:nth-child(3) { background: #F2A93B; box-shadow: inset 0 0 0 1px #1E3A5F; }
.theme-thumb-1::after { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px #1E3A5F; }
.theme-thumb-3 { border-color: #141831; background: radial-gradient(60px 40px at 78% 40%, rgba(123, 79, 240, .55), transparent 70%), radial-gradient(50px 40px at 25% 85%, rgba(61, 99, 240, .45), transparent 70%), #07080F; }
.theme-thumb-3 i:nth-child(1) { background: #EEF1FA; }
.theme-thumb-3 i:nth-child(2) { background: #AEB6CC; }
.theme-thumb-3 i:nth-child(3) { border-radius: 999px; background: linear-gradient(135deg, #3D63F0, #7B4FF0); }
.theme-thumb-3::after { background: #0F1222; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.auth-card .theme-options { margin-bottom: 4px; }

/* ---------- Katlanır bölümler (tasarıma göre ana sayfa metinleri) ---------- */
.fold { border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
.fold[open] { border-color: var(--ink); }
.fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 52px; padding: 8px 16px; font-size: 16px; font-weight: 800; font-stretch: 112%; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.fold[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.fold > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.fold-body { display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 18px; border-top: 1px dashed var(--line); }
.fold-body .sub-title { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }

/* ---------- Sayfa metinleri ---------- */
.text-intro { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }

/* ---------- SEO ---------- */
.seo-page { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.seo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .seo-grid { grid-template-columns: 1fr; } }
.serp-preview { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; font-family: Arial, Helvetica, sans-serif; min-width: 0; }
.serp-label { margin-bottom: 6px; font-family: 'Archivo', Arial, sans-serif; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.serp-site { display: flex; align-items: center; gap: 10px; min-width: 0; }
.serp-icon { flex: none; width: 26px; height: 26px; border: 1px solid #DADCE0; border-radius: 50%; background: #F1F3F4; }
.serp-site-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.serp-name { font-size: 14px; color: #202124; }
.serp-url { overflow: hidden; font-size: 12px; color: #4D5156; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { margin-top: 4px; font-size: 20px; line-height: 1.3; color: #1A0DAB; overflow-wrap: anywhere; }
.serp-desc { font-size: 14px; line-height: 1.58; color: #4D5156; overflow-wrap: anywhere; }
.len { display: inline-flex; align-items: center; min-height: 22px; margin-top: 4px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.len-ok { background: #D5F2E5; color: #0F5A3F; }
.len-warn { background: #FFF1D6; color: #7A4B00; }
.len-bad { background: #FFE4E0; color: var(--danger); }
.len-auto { background: #EEF1F5; color: var(--ink-2); }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.link-sm { margin-left: 8px; font-size: 13px; font-weight: 600; font-stretch: 100%; }

