/* ==========================================================================
   noway — Yönetim Paneli Stili
   ========================================================================== */
:root {
  --p: #2e5bd8; --p-dark: #2447b0; --p-soft: #e7edfc;
  --ink: #17202e; --text: #3a4251; --muted: #7b8494; --line: #e4e7ec;
  --bg: #eef1f5; --card: #ffffff; --ok: #4f7a3a; --danger: #c23b1e; --warn: #b57628;
  --radius: 10px; --radius-sm: 7px; --sidebar: 252px;
  --shadow-sm: 0 1px 2px rgba(28,26,20,.05), 0 1px 3px rgba(28,26,20,.07);
  --shadow: 0 12px 34px -14px rgba(28,26,20,.28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-mono: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--p); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 650; }
img { max-width: 100%; display: block; }
.ic { display: inline-block; vertical-align: -.14em; flex: 0 0 auto; }

/* ---------- Layout ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); background: var(--ink); color: #cbd5e1; position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1.3rem; padding: .4rem .5rem 1.2rem; }
.sidebar__brand img { height: 30px; }
.sidebar__brand .dot { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: inline-block; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border-radius: 9px; color: #cbd5e1; font-weight: 600; font-size: .94rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--p); color: #fff; box-shadow: 0 4px 14px -4px var(--p); }
.side-nav a .ico { width: 22px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; }
.side-nav a.active .ico { opacity: 1; }
.side-nav a .ico .ic { width: 19px; height: 19px; }
.side-nav .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.side-nav__sep { height: 1px; background: rgba(255,255,255,.1); margin: 10px 6px; }
.sidebar__foot { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 8px; }
.sidebar__foot a, .sidebar__foot button { color: #94a3b8; font-size: .88rem; padding: .5rem .75rem; border-radius: 8px; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; display: flex; align-items: center; gap: .5rem; }
.sidebar__foot a:hover, .sidebar__foot button:hover { color: #fff; background: rgba(255,255,255,.07); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 0 26px; height: 62px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 1.2rem; margin: 0; }
.topbar__actions { display: flex; gap: .6rem; align-items: center; }
.content { padding: 26px; max-width: 1240px; }
.sidebar-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; padding: .6rem 1.1rem; border-radius: 9px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; font-family: inherit; transition: .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--p); color: #fff; }
.btn-primary:hover { background: var(--p-dark); }
.btn-light { background: #fff; color: var(--text); border-color: var(--line); }
.btn-light:hover { border-color: var(--p); color: var(--p); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-sm { padding: .38rem .7rem; font-size: .84rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }
.btn-sm .ic { width: 14px; height: 14px; }
.icon-btn .ic { width: 17px; height: 17px; }
.sidebar__foot a .ic, .sidebar__foot button .ic { width: 16px; height: 16px; }
.sidebar-toggle .ic { width: 20px; height: 20px; }

/* ---------- Cards / panels ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.05rem; }
.panel__body { padding: 20px; }
.panel + .panel { margin-top: 20px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Stat tiles ---------- */
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 14px; }
.stat-tile__ico { width: 46px; height: 46px; border-radius: 11px; background: var(--p-soft); color: var(--p); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stat-tile__ico .ic { width: 23px; height: 23px; }
.stat-tile__num { font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-tile__lbl { color: var(--muted); font-size: .85rem; margin-top: 3px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fafbfc; }
.t-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* ---------- Badges ---------- */
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-gray { background: #e2e8f0; color: #475569; }
.tag-blue { background: var(--p-soft); color: var(--p); }
.tag-amber { background: #fef3c7; color: #92400e; }
.tag-red { background: #fee2e2; color: #991b1b; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field > label:not(.switch) { display: block; font-weight: 600; color: var(--ink); margin-bottom: 5px; font-size: .9rem; }
.field .help { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=tel],
.field input[type=number], .field input[type=password], .field input[type=search], .field textarea, .field select,
.inp {
  width: 100%; padding: .62rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .inp:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(46,91,216,.14); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
select.inp, .field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2rem; }

/* checkbox switch */
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 42px; height: 24px; background: #cbd5e1; border-radius: 999px; position: relative; transition: background .18s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--p); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* color input */
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.color-field input[type=text] { max-width: 130px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #1e1b4b, #0f172a); }
.login-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 40px; width: 100%; max-width: 400px; }
.login-card .logo { text-align: center; margin-bottom: 1.5rem; }
.login-card .logo .dot { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.6rem; }
.login-card h1 { text-align: center; font-size: 1.35rem; }
.login-card p.sub { text-align: center; color: var(--muted); margin-top: 0; }

/* ---------- Flash / alerts ---------- */
.flash { padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: 18px; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.hint { background: var(--p-soft); color: #3730a3; border-radius: 10px; padding: .8rem 1rem; font-size: .88rem; margin-bottom: 16px; }

/* ---------- Page builder ---------- */
.builder-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.block-list { display: flex; flex-direction: column; gap: 10px; }
.block-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); }
.block-item.disabled { opacity: .55; }
.block-item__drag { cursor: grab; color: #cbd5e1; padding: 0 2px; display: inline-flex; }
.block-item__drag .ic { width: 18px; height: 18px; }
.block-item__drag:active { cursor: grabbing; }
.media-cell__del .ic { width: 15px; height: 15px; }
.block-item__ico { width: 40px; height: 40px; border-radius: 9px; background: var(--p-soft); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: 0 0 auto; }
.block-item__info { flex: 1; min-width: 0; }
.block-item__info strong { color: var(--ink); display: block; }
.block-item__info small { color: var(--muted); }
.block-item__actions { display: flex; gap: 4px; align-items: center; }
.block-item.dragging { opacity: .4; }
.block-list.drag-over-active .block-item { transition: transform .12s; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1rem; }
.icon-btn:hover { border-color: var(--p); color: var(--p); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.add-block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-block-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-family: inherit; font-size: .78rem; font-weight: 600; color: var(--text); transition: .15s; }
.add-block-btn:hover { border-color: var(--p); background: var(--p-soft); color: var(--p); transform: translateY(-2px); }
.add-block-btn .em { font-size: 1.5rem; }
.add-block-btn--product { border-color: #c7d2fe; background: #f5f3ff; }
.add-block-btn--product:hover { border-color: var(--p); }
.sticky-side { position: sticky; top: 82px; }

/* ---------- Section edit fields ---------- */
.repeater-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: #fafbff; position: relative; }
.repeater-item__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.repeater-item__head strong { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.repeater-drag { cursor: grab; color: #cbd5e1; }

/* media picker field */
.media-field { }
.media-preview { width: 100%; max-width: 260px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); font-size: .85rem; margin-bottom: 8px; position: relative; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
/* PDF önizleme: gerçek ilk sayfa + alt bilgi çubuğu (yeni sekmede aç) */
.media-preview--doc { max-width: 320px; aspect-ratio: 3/4; background: #fff; }
.media-preview--doc embed { width: 100%; height: 100%; border: 0; }
.media-doc-open { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: .78rem; font-weight: 600; text-align: center; color: #fff; background: linear-gradient(180deg, rgba(23,32,46,0), rgba(23,32,46,.82)); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-doc-open:hover { text-decoration: underline; }
.media-field__actions { display: flex; gap: 6px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: .6rem 1rem; font-family: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--p); border-bottom-color: var(--p); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Media library ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-cell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; position: relative; }
.media-cell__thumb { aspect-ratio: 1/1; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-cell__thumb img, .media-cell__thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-cell__meta { padding: 8px 10px; font-size: .76rem; color: var(--muted); }
.media-cell__meta b { color: var(--ink); display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-cell__del { position: absolute; top: 6px; right: 6px; background: rgba(15,23,42,.7); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; opacity: 0; transition: .15s; }
.media-cell:hover .media-cell__del { opacity: 1; }
.file-badge { position: absolute; top: 6px; left: 6px; background: rgba(15,23,42,.7); color: #fff; font-size: .68rem; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; }

.dropzone { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); background: #fff; cursor: pointer; transition: .15s; line-height: 1.7; }
.dropzone:hover, .dropzone.over { border-color: var(--p); background: var(--p-soft); color: var(--p); }

/* ---------- Modal (media picker) ---------- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.modal.open { display: flex; }
.modal__box { background: #fff; border-radius: 16px; width: 100%; max-width: 900px; box-shadow: var(--shadow); overflow: hidden; }
.modal__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal__head h3 { margin: 0; }
.modal__body { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-close { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pick-cell { border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg); aspect-ratio: 1/1; position: relative; }
.pick-cell img, .pick-cell video { width: 100%; height: 100%; object-fit: cover; }
.pick-cell:hover { border-color: var(--p); }
.pick-cell.sel { border-color: var(--p); box-shadow: 0 0 0 3px rgba(46,91,216,.2); }

/* ---------- Menü yöneticisi ---------- */
.menu-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.menu-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.menu-item.dragging { opacity: .4; }
.menu-item__row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.menu-item__drag { color: #cbd5e1; cursor: grab; display: inline-flex; flex: 0 0 auto; }
.menu-item__drag:active { cursor: grabbing; }
.menu-item__drag .ic { width: 16px; height: 16px; }
.menu-item__info { flex: 1; min-width: 0; }
.menu-item__info strong { color: var(--ink); display: block; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item__info small { color: var(--muted); font-size: .79rem; display: flex; align-items: center; gap: .3rem; }
.menu-item__info small .ic { width: 13px; height: 13px; flex: 0 0 auto; }
.menu-item__actions { display: flex; gap: 3px; align-items: center; flex: 0 0 auto; }
.menu-item__actions form { display: inline-flex; }
.menu-item__edit { padding: 6px 14px 16px; border-top: 1px solid var(--line); background: #fafbff; }
.menu-add { margin-top: 6px; }
.menu-add summary { list-style: none; cursor: pointer; }
.menu-add summary::-webkit-details-marker { display: none; }
.menu-add summary::marker { content: ''; }
.menu-add__form { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbff; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .em { font-size: 3rem; display: block; margin-bottom: .5rem; }

/* ---------- Ürün görsel yöneticisi ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.img-cell { position: relative; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: grab; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-cell.dragging { opacity: .4; }
.img-cell:first-child::before { content: "Kapak"; position: absolute; top: 4px; left: 4px; background: var(--p); color: #fff; font-size: .62rem; padding: 1px 6px; border-radius: 6px; z-index: 2; }
.img-cell__del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: rgba(15,23,42,.7); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }

/* ---------- WYSIWYG ---------- */
.wysiwyg-bar { display: flex; flex-wrap: wrap; gap: 3px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 6px; background: #f8fafc; }
.wysiwyg-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .3rem .55rem; font-size: .82rem; font-weight: 700; cursor: pointer; color: var(--text); font-family: inherit; }
.wysiwyg-btn:hover { border-color: var(--p); color: var(--p); }
.wysiwyg-area { border: 1px solid var(--line); border-radius: 0 0 8px 8px; min-height: 160px; padding: 12px 14px; background: #fff; line-height: 1.6; }
.wysiwyg-area:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(46,91,216,.14); }
.wysiwyg-area h2 { font-size: 1.3rem; } .wysiwyg-area h3 { font-size: 1.1rem; }
.wysiwyg-area:empty::before { content: "Buraya yazın…"; color: var(--muted); }

/* Klavye odak göstergeleri (erişilebilirlik) */
a:focus-visible, button:focus-visible, .btn:focus-visible, .icon-btn:focus-visible,
.tabs button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--p); outline-offset: 2px;
}

.muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1rem; }
.flex { display: flex; align-items: center; gap: .6rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .builder-layout { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 250px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4, .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .content { padding: 18px; }
}

/* ==========================================================================
   Editoryal marka dokunuşları (2026)
   ========================================================================== */
.sidebar__brand { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; }
.topbar h1 { font-family: var(--font-head); font-weight: 500; letter-spacing: -.01em; font-size: 1.35rem; }
.stat-tile__num { font-family: var(--font-head); font-weight: 500; }
.stat-tile__lbl, .side-nav__sep + a, table.data th, .file-badge, .tag { font-feature-settings: normal; }
table.data th { font-family: var(--font-mono); font-weight: 400; letter-spacing: .05em; font-size: .68rem; }
.empty-state h2 { font-family: var(--font-head); font-weight: 500; }
.login-card h1 { font-family: var(--font-head); font-weight: 500; }

/* Sıcak login ekranı */
.login-wrap { background: linear-gradient(150deg, #1e2a3b, #10161f); }
.login-card { border-radius: 14px; }
.login-card .logo .dot { background: var(--ink); color: var(--paper, #f4f1ea); font-family: var(--font-head); border-radius: 14px; position: relative; }
.login-card .logo .dot::after { content: ""; position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--p); }

/* Panel başlık vurgusu */
.stat-tile__ico { background: var(--p-soft); color: var(--p); }
.hint { background: var(--p-soft); color: #1e3a8a; border: 1px solid #c7d6f6; }
.hint a { color: var(--p-dark); }

/* Kenar çubuğu marka işareti + soğuk tonların ısıtılması */
.sidebar__brand .dot { width: 26px; height: 26px; border-radius: 7px; background: var(--p); }
.side-nav a.active { box-shadow: 0 6px 16px -6px var(--p); }
table.data th { background: #eef1f5; color: var(--muted); }
table.data tr:hover td { background: #f5f7fa; }
.tag-gray { background: #e4e7ec; color: #5b6472; }
.dropzone { background: var(--card); }
select.inp, .field select { background-color: var(--card); }
.wysiwyg-bar { background: #eef1f5; }

/* ==========================================================================
   CMS 2.0 — Kolay kullanım katmanı (komut paleti, toast, yapışkan kaydet,
   liste filtresi, kurulum listesi, kenar çubuğu katlama, koyu mod)
   Tümü additive; mevcut bileşenleri değiştirmez.
   ========================================================================== */

/* ---------- Üst bar araçları ---------- */
.topbar__actions { gap: .5rem; }
.topbar-search {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--bg); border: 1px solid var(--line);
  color: var(--muted); padding: .44rem .7rem; border-radius: 9px; cursor: pointer; font-family: inherit;
  font-size: .86rem; min-width: 210px; transition: .15s;
}
.topbar-search:hover { border-color: var(--p); color: var(--text); }
.topbar-search .ic { width: 15px; height: 15px; flex: 0 0 auto; }
.topbar-search__label { flex: 1; text-align: left; }
.topbar-search .kbd { margin-left: auto; }
.kbd {
  display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; font-size: .72rem; font-family: var(--font-mono);
  color: var(--muted); background: var(--card); line-height: 1.5; white-space: nowrap;
}
.tb-toggle { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.tb-toggle:hover { border-color: var(--p); color: var(--p); }
.tb-toggle .ic { width: 18px; height: 18px; }
.tb-toggle .icon-sun { display: none; }
[data-theme="dark"] .tb-toggle .icon-sun { display: inline-flex; }
[data-theme="dark"] .tb-toggle .icon-moon { display: none; }

/* ---------- Komut paleti (⌘K) ---------- */
.cmdk-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 11vh 20px 20px; }
.cmdk-overlay.open { display: flex; }
.cmdk { width: 100%; max-width: 600px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: 72vh; }
.cmdk__input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmdk__input-wrap > .ic { width: 20px; height: 20px; color: var(--muted); flex: 0 0 auto; }
.cmdk__input { flex: 1; border: 0; outline: 0; font-size: 1.05rem; font-family: inherit; background: transparent; color: var(--ink); }
.cmdk__results { overflow-y: auto; padding: 6px; }
.cmdk__group-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 5px; font-weight: 700; }
.cmdk__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--text); }
.cmdk__item .cmdk__ico { width: 34px; height: 34px; border-radius: 8px; background: var(--p-soft); color: var(--p); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cmdk__item .cmdk__ico .ic { width: 17px; height: 17px; }
.cmdk__item__txt { flex: 1; min-width: 0; }
.cmdk__item strong { color: var(--ink); font-weight: 600; font-size: .94rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk__item small { color: var(--muted); font-size: .8rem; }
.cmdk__item.active, .cmdk__item:hover { background: var(--p-soft); }
.cmdk__item.active strong { color: var(--p-dark); }
.cmdk__empty { padding: 34px; text-align: center; color: var(--muted); }
.cmdk__foot { border-top: 1px solid var(--line); padding: 8px 14px; display: flex; gap: 16px; font-size: .74rem; color: var(--muted); flex-wrap: wrap; }
.cmdk__foot span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Toast bildirimleri ---------- */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--p); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .9rem; color: var(--text); animation: toast-in .22s ease; }
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast.leaving { opacity: 0; transform: translateX(14px); transition: opacity .25s, transform .25s; }
.toast__ico { flex: 0 0 auto; margin-top: 1px; }
.toast.success .toast__ico { color: var(--ok); }
.toast.error .toast__ico { color: var(--danger); }
.toast__ico .ic { width: 18px; height: 18px; }
.toast__msg { flex: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- Yapışkan kaydet çubuğu ---------- */
.action-bar { position: sticky; bottom: 16px; z-index: 25; margin-top: 22px; padding: 11px 14px 11px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.action-bar__status { margin-right: auto; font-size: .86rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.action-bar__status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.action-bar.is-dirty .action-bar__status { color: var(--warn); font-weight: 600; }
.action-bar.is-dirty .action-bar__status .dot { background: var(--warn); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
[data-dirty-status] { display: none; font-size: .82rem; color: var(--warn); font-weight: 600; margin-bottom: 8px; align-items: center; gap: 6px; }
[data-dirty-status].show { display: flex; }

/* ---------- Liste araç çubuğu (arama + filtre) ---------- */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-box { position: relative; flex: 1 1 240px; min-width: 200px; max-width: 440px; }
.search-box > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; padding: .55rem .8rem .55rem 2.25rem; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: .9rem; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.search-box input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(46,91,216,.14); }
.list-toolbar select { padding: .52rem 2rem .52rem .8rem; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: .88rem; background: var(--card); color: var(--ink); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; }
.list-toolbar select:focus { outline: none; border-color: var(--p); }
.list-toolbar__count { color: var(--muted); font-size: .84rem; margin-left: auto; white-space: nowrap; }
.list-empty-filter td, .list-empty-filter { text-align: center; padding: 30px; color: var(--muted); }

/* ---------- Kurulum kontrol listesi (dashboard) ---------- */
.setup-card .panel__head { align-items: center; }
.setup-progress { display: flex; align-items: center; gap: 12px; }
.setup-progress__bar { width: 120px; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.setup-progress__bar span { display: block; height: 100%; background: var(--p); border-radius: 999px; transition: width .5s ease; }
.setup-progress__pct { font-size: .82rem; font-weight: 700; color: var(--p); font-family: var(--font-head); }
.checklist { display: flex; flex-direction: column; }
.checklist__item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.checklist__item:last-child { border-bottom: 0; }
.checklist__item .check-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: transparent; transition: .2s; }
.checklist__item .check-mark .ic { width: 13px; height: 13px; }
.checklist__item.done .check-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist__item.done .checklist__label { color: var(--muted); text-decoration: line-through; }
.checklist__grow { flex: 1; min-width: 0; }
.checklist__label { color: var(--ink); font-weight: 600; font-size: .92rem; display: block; }
.checklist__hint { color: var(--muted); font-size: .8rem; }
.checklist__item .btn { flex: 0 0 auto; }
.setup-done-banner { display: flex; align-items: center; gap: 12px; background: #dcfce7; color: #166534; border-radius: 10px; padding: 14px 16px; font-weight: 600; }
.setup-done-banner .ic { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------- Kenar çubuğu katlama (masaüstü) ---------- */
.sidebar__brand span:last-child, .side-nav a .nav-label, .sidebar__foot a span, .sidebar__foot button span { transition: opacity .12s; }
@media (min-width: 761px) {
  .admin-layout.collapsed { --sidebar: 76px; }
  .admin-layout.collapsed .sidebar { padding: 18px 10px; }
  .admin-layout.collapsed .sidebar__brand { justify-content: center; }
  .admin-layout.collapsed .sidebar__brand span:last-child,
  .admin-layout.collapsed .side-nav a .nav-label,
  .admin-layout.collapsed .sidebar__foot a span:not(.ic-wrap),
  .admin-layout.collapsed .sidebar__foot button span:not(.ic-wrap) { display: none; }
  .admin-layout.collapsed .side-nav a { justify-content: center; padding: .65rem; position: relative; }
  .admin-layout.collapsed .side-nav a .badge { position: absolute; top: 4px; right: 4px; margin: 0; padding: 0 5px; }
  .admin-layout.collapsed .sidebar__foot a, .admin-layout.collapsed .sidebar__foot button { justify-content: center; }
}
/* Katlama düğmesi yalnız masaüstünde */
.sidebar-collapse-btn { display: none; }
@media (min-width: 761px) { .sidebar-collapse-btn { display: inline-flex; } }

/* ---------- Koyu mod ---------- */
html[data-theme="dark"] {
  --p: #5b82ef; --p-dark: #4f75e6; --p-soft: #1f2b45;
  --ink: #eef2f8; --text: #c2ccdb; --muted: #8792a6; --line: #2a3547;
  --bg: #0f1621; --card: #18202e; --ok: #5fa64a; --danger: #e0573a; --warn: #d0934a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.35);
  --shadow: 0 16px 40px -14px rgba(0,0,0,.6);
}
[data-theme="dark"] .sidebar { background: #0b111b; }
[data-theme="dark"] .btn-light { background: var(--card); color: var(--text); }
[data-theme="dark"] .btn-light:hover { color: var(--p); }
[data-theme="dark"] .btn-danger { background: var(--card); border-color: #5e2a1e; }
[data-theme="dark"] .icon-btn, [data-theme="dark"] .field input, [data-theme="dark"] .field textarea,
[data-theme="dark"] .field select, [data-theme="dark"] .inp, [data-theme="dark"] .dropzone,
[data-theme="dark"] .wysiwyg-area, [data-theme="dark"] .wysiwyg-btn { background: var(--card); color: var(--ink); }
[data-theme="dark"] table.data th { background: #131b28; color: var(--muted); }
[data-theme="dark"] table.data tr:hover td { background: #1d2634; }
[data-theme="dark"] .repeater-item, [data-theme="dark"] .menu-item__edit, [data-theme="dark"] .menu-add__form { background: #131b28; }
[data-theme="dark"] .wysiwyg-bar { background: #131b28; }
[data-theme="dark"] .add-block-btn { background: var(--card); }
[data-theme="dark"] .add-block-btn--product { background: #1c2438; border-color: #33406a; }
[data-theme="dark"] .pick-cell, [data-theme="dark"] .media-cell, [data-theme="dark"] .img-cell { background: var(--bg); }
[data-theme="dark"] .stat-tile__ico { background: var(--p-soft); }
[data-theme="dark"] .hint { background: var(--p-soft); color: #cdd9f5; border-color: #33406a; }
[data-theme="dark"] .flash-success, [data-theme="dark"] .setup-done-banner { background: #16301f; color: #86efac; }
[data-theme="dark"] .flash-error { background: #3a1c14; color: #fca5a5; }
[data-theme="dark"] .tag-green { background: #16301f; color: #86efac; }
[data-theme="dark"] .tag-gray { background: #263041; color: #a9b4c5; }
[data-theme="dark"] .tag-amber { background: #3a2c10; color: #fcd66b; }
[data-theme="dark"] .tag-red { background: #3a1c14; color: #fca5a5; }
[data-theme="dark"] .tag-blue { background: var(--p-soft); color: #a9c0f5; }
[data-theme="dark"] .setup-progress__bar, [data-theme="dark"] .search-box input { background: #0f1621; }
[data-theme="dark"] .search-box input, [data-theme="dark"] .list-toolbar select { background: var(--card); }
[data-theme="dark"] .modal__box, [data-theme="dark"] .cmdk { background: var(--card); }
[data-theme="dark"] .cmdk-overlay, [data-theme="dark"] .modal { background: rgba(0,0,0,.6); }
[data-theme="dark"] .t-thumb.ph-media { color: var(--muted); }

/* ---------- Üst bar araçları — küçük ekran ---------- */
@media (max-width: 720px) {
  .topbar-search__label, .topbar-search .kbd { display: none; }
  .topbar-search { min-width: 0; padding: .44rem .55rem; }
  .topbar-viewsite { display: none; }
  .topbar { padding: 0 16px; gap: .5rem; }
}
@media (max-width: 420px) {
  .list-toolbar__count { display: none; }
}

/* ---------- Medya: bağlantı kopyala butonu ---------- */
.media-cell__copy { position: absolute; top: 6px; right: 40px; background: rgba(15,23,42,.7); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; opacity: 0; transition: .15s; display: flex; align-items: center; justify-content: center; }
.media-cell:hover .media-cell__copy { opacity: 1; }
.media-cell__copy:hover { background: var(--p); }
.media-cell__copy .ic { width: 15px; height: 15px; }
