/* ==========================================================================
   Yönetim paneli (/panel) ek stilleri. Yalnızca "adm-" önekli sınıflar.
   ========================================================================== */

/* Panelde flash mesajları üst başlık olmadığı için daha yukarıda */
body.admin .flash-stack { top: 16px; }
@media (min-width: 1024px) { body.admin .flash-stack { left: calc(50% + 136px); } }

/* Mobilde yan menü üst şerit gibi durur; içerik taşmasın */
body.admin { overflow-x: hidden; }
.admin-main .account-head .btn-row { gap: 8px; }

/* Göstergeler: 5'li satır */
.adm-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .adm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .adm-kpis { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.adm-kpis .kpi b { font-size: 24px; }
.adm-kpis .kpi .badge { margin-bottom: 2px; }
.adm-kpi-hot { box-shadow: 0 0 0 1px var(--warn), 0 10px 24px -18px var(--warn); }
.adm-kpi-hot .ic { color: var(--warn); }
@media (max-width: 480px) { .adm-kpis .kpi { padding: 14px; } .adm-kpis .kpi b { font-size: 20px; } }

/* Yayına hazırlık */
.adm-ready .stack > * + * { margin-top: 8px; }
.adm-check { align-items: center; }
.adm-check b { display: block; font-size: 14px; }
.adm-check span.small { display: block; opacity: .85; }
@media (max-width: 560px) { .adm-check { flex-wrap: wrap; } .adm-check .btn { margin-left: 28px; } }

/* İki sütunlu düzenler */
.adm-split { display: grid; gap: 20px; }
@media (min-width: 1100px) { .adm-split { grid-template-columns: 1.25fr 1fr; } }
.adm-edit { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1100px) { .adm-edit { grid-template-columns: minmax(0, 1fr) 340px; } }
.adm-edit > * { min-width: 0; }
.adm-narrow { max-width: 760px; }
.adm-settings { max-width: 920px; }

/* Liste satırları */
.adm-list { padding: 4px 18px; }
@media (max-width: 639px) { .adm-list { padding: 2px 12px; } }
.adm-list > .lrow + .lrow { border-top: 1px solid var(--line-2); }
.adm-lrow { align-items: center; }
.adm-lrow .lrow-img { width: 76px; height: 58px; }
.adm-lrow .lrow-main a:hover b { color: var(--brand-600); }
.adm-lrow .lrow-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-lrow .lrow-main small.adm-quote { white-space: normal; font-style: italic; }
.adm-ph { display: grid; place-items: center; color: var(--muted-2); }
.adm-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.adm-price { text-align: right; min-width: 110px; }
.adm-price b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-price small, .adm-when small { display: block; font-size: 11.5px; color: var(--muted); }
.adm-when { min-width: 120px; text-align: right; }
.adm-when b { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-lrow .lrow-actions { flex-wrap: nowrap; align-items: center; }
@media (max-width: 767px) {
  .adm-lrow { flex-wrap: wrap; }
  .adm-lrow .lrow-img { width: 64px; height: 50px; }
  .adm-lrow .lrow-main { flex: 1 1 calc(100% - 80px); }
  .adm-price, .adm-when { min-width: 0; text-align: left; order: 3; }
  .adm-price b, .adm-when b { display: inline; margin-right: 6px; }
  .adm-price small, .adm-when small { display: inline; }
  .adm-lrow .lrow-actions { order: 4; width: auto; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
}
.adm-inline-b { display: inline !important; font-size: inherit !important; font-weight: 650; }
.adm-inline { display: inline-flex; margin: 0; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-mini-row { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.adm-mini-row:first-of-type { border-top: 0; }
.adm-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.adm-strong { font-weight: 650; }
.adm-strong:hover { color: var(--brand-600); }
.adm-ref { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--navy-50); color: var(--navy-800); font: 600 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.adm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.adm-empty-sm { padding: 24px 16px; }
.adm-empty-sm p { margin: 0; display: flex; gap: 8px; justify-content: center; align-items: center; }

/* Açılır küçük menüler (details) */
.adm-pop { position: relative; }
.adm-pop > summary { list-style: none; }
.adm-pop > summary::-webkit-details-marker { display: none; }
.adm-pop-body { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 280px; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.adm-pop:not(.adm-pop-right) .adm-pop-body { right: auto; left: 0; }
@media (max-width: 767px) { .adm-pop .adm-pop-body { left: auto !important; right: 0 !important; width: min(280px, calc(100vw - 48px)); } }
.adm-menu { padding: 6px; width: 240px; }
.adm-menu a, .adm-menu-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none; font-size: 13px; font-weight: 550; text-align: left; color: var(--ink-2); cursor: pointer; }
.adm-menu a:hover, .adm-menu-btn:hover { background: var(--bg); color: var(--ink); }
.adm-menu form { display: block; }
.adm-menu-btn.is-danger { color: var(--danger); }

/* Son teklifler akışı */
.adm-feed { list-style: none; margin: 0; padding: 0; }
.adm-feed li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.adm-feed li:first-child { border-top: 0; padding-top: 0; }
.adm-feed b { font-size: 14px; font-weight: 650; }
.adm-feed .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-feed .grow a:hover b { color: var(--brand-600); }
.adm-feed small { display: block; font-size: 12px; color: var(--muted); }
.bar-row .adm-ellipsis { display: block; }
@media (max-width: 480px) { .bar-row { grid-template-columns: 110px 1fr 36px; } }

/* Ekspertiz düzenleyici */
.adm-exp { display: grid; gap: 10px; }
@media (min-width: 640px) { .adm-exp { grid-template-columns: 1fr 1fr; } }
.adm-exp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 600; }
.adm-exp-row small { display: block; font-weight: 500; font-size: 11.5px; }
.adm-exp-row .select { width: 160px; min-height: 40px; padding: 8px 30px 8px 10px; background-color: #fff; flex-shrink: 0; }

/* Tablolar mobilde kart gibi */
.table tr.adm-lead td { background: var(--ok-bg); }
@media (max-width: 767px) {
  .adm-table-cards thead { display: none; }
  .adm-table-cards, .adm-table-cards tbody, .adm-table-cards tr, .adm-table-cards td { display: block; width: 100%; }
  .adm-table-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .adm-table-cards td { padding: 3px 0; border: 0; text-align: left !important; }
  .adm-table-cards td.num { text-align: left !important; }
  .adm-table-cards td:empty { display: none; }
}
.adm-audit pre, .adm-json pre { margin: 8px 0 0; padding: 10px 12px; max-width: 520px; max-height: 320px; overflow: auto; border-radius: 10px; background: var(--navy-950); color: #d7e6ea; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.adm-json summary { cursor: pointer; color: var(--ink-2); }

/* Mesajlar */
.adm-msg.is-done { opacity: .75; }
.adm-body { font-size: 14px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-chat.chat .chat-main { display: flex; } /* site sohbetindeki ≤899px gizleme kuralı panelde geçerli değil */
.adm-chat .chat-item { color: inherit; }
.adm-chat .chat-item small + small { margin-top: 2px; }
.adm-bubble { position: relative; padding-right: 38px; }
.adm-bubble form { position: absolute; top: 6px; right: 6px; }
.adm-bubble-del { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .9); color: var(--danger); cursor: pointer; opacity: .55; }
.adm-bubble:hover .adm-bubble-del, .adm-bubble-del:focus { opacity: 1; }
.show-sm-only { display: none; }
@media (max-width: 639px) { .show-sm-only { display: inline-flex; margin-bottom: 6px; } }

/* Blog editörü */
.adm-title-input { font-size: 18px; font-weight: 650; }
.adm-prefix { border-left: 1px solid var(--line) !important; border-right: 0 !important; border-radius: 12px 0 0 12px !important; }
.input-affix .adm-prefix + .input { border-radius: 0 12px 12px 0; }
.adm-editor { font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 420px; resize: vertical; }
.adm-help summary { list-style: none; cursor: pointer; }
.adm-help summary::-webkit-details-marker { display: none; }
.adm-help[open] { flex-basis: 100%; }
.adm-help code { padding: 1px 5px; border-radius: 5px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 12px; }
.adm-faq { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--bg); }
.adm-faq .input, .adm-faq .textarea { background-color: #fff; min-height: 40px; }
.adm-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--line-2); }
.adm-cover.is-stock { object-fit: contain; padding: 12px; }

/* Karakter sayacı */
.adm-counter { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted-2); text-align: right; font-variant-numeric: tabular-nums; }
.adm-counter.is-ok { color: var(--ok); }
.adm-counter.is-over { color: var(--danger); }
.adm-seo-row { padding: 14px; border-radius: 14px; background: var(--bg); }
.adm-seo-row .input, .adm-seo-row .textarea { background-color: #fff; }

/* Reklam alanları */
.adm-banner-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .adm-banner-grid { grid-template-columns: minmax(0, 1fr) 260px; } }
.adm-banner-img { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px dashed var(--line); }
.adm-banner-img img { width: 100%; height: 100%; object-fit: cover; }
.adm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.adm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.adm-switch span { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: background .2s; }
.adm-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.adm-switch input:checked + span { background: var(--ok); }
.adm-switch input:checked + span::after { transform: translateX(18px); }
.adm-switch input:focus-visible + span { outline: 2px solid rgba(var(--brand-rgb), .7); outline-offset: 2px; }

/* Ayarlar */
.adm-tabs { background: #fff; border-radius: 14px 14px 0 0; padding: 0 8px; box-shadow: 0 0 0 1px rgba(223, 230, 239, .9); border-bottom: 0; }
.adm-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.adm-inline-form { flex-wrap: nowrap; gap: 8px; }
.adm-inline-form .input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .adm-inline-form { flex-wrap: wrap; } .adm-inline-form .btn { width: 100%; } }
.adm-danger-zone { box-shadow: 0 0 0 1px #f5cdc9, var(--shadow); }
.adm-tile-danger { background: var(--danger-bg); color: var(--danger); flex-shrink: 0; }

/* Giriş sayfası */
.admin-login .page-hero h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); max-width: 520px; }
.adm-login-mark { display: none; }
@media (max-width: 1023px) { .adm-login-mark { display: block !important; } }
.admin-login-form .flash-stack { position: static; transform: none; width: auto; margin-top: 16px; }
@media (max-width: 767px) {
  .adm-table-cards td.num b { font-size: 15px; }
  .card-head { flex-wrap: wrap; }
}

/* Cila: mobil kart tablolarda hücre etiketi (sayı / tarih sütunları) */
@media (max-width: 767px) {
  .adm-table-cards td.num[data-label]::before, .adm-table-cards td.nowrap[data-label]::before {
    content: attr(data-label) ": "; color: var(--muted); font-size: 12px; font-weight: 600;
  }
  .adm-table-cards td.num, .adm-table-cards td.nowrap { font-size: 13px; }
}

/* Cila: dosya seçme alanı */
input.input[type=file] { padding: 7px; min-height: 0; cursor: pointer; font-size: 13.5px; color: var(--muted); background: var(--bg); border-style: dashed; }
input.input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; transition: background .15s; }
input.input[type=file]:hover::file-selector-button { background: var(--brand); }
@media (min-width: 1024px) { .tabs-line.adm-tabs { flex-wrap: wrap; overflow: visible; } }

/* Finans: not alanlı işlem düğmeleri, sipariş uyarıları */
.adm-note { display: inline-block; position: relative; }
.adm-note > summary { list-style: none; cursor: pointer; }
.adm-note > summary::-webkit-details-marker { display: none; }
.adm-note[open] > summary { box-shadow: 0 0 0 2px var(--brand-300); }
.adm-note-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; gap: 6px; width: min(320px, 80vw); padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px -12px rgba(16, 32, 56, .35), 0 0 0 1px var(--line); }
.adm-note-form .input { height: 34px; font-size: 13px; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); }
.text-danger { color: var(--danger); }
@media (min-width: 1200px) { .adm-kpis.adm-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
