/* ============================================================
   PICATIVE — YÖNETİM PANELİ
   Panel her müşteride aynı görünür; sitenin renklerinden bağımsızdır.
   Cam efektli koyu yan menü, yuvarlak kartlar, yumuşak gölgeler.
   ============================================================ */

:root {
  /* Panel kimliği */
  --p-ink:        #0f1117;
  --p-sidebar-1:  #14161f;
  --p-sidebar-2:  #1b1e2b;
  --p-accent:     #6c8cff;
  --p-accent-2:   #8b6cff;
  --p-accent-dim: rgba(108, 140, 255, .14);

  --p-bg:      #f5f6fa;
  --p-card:    #ffffff;
  --p-text:    #1a1d26;
  --p-body:    #4a5162;
  --p-muted:   #858ea3;
  --p-line:    #e7e9f0;
  --p-line-2:  #f0f2f7;

  --p-green:    #12a150;
  --p-green-bg: #e9f8ef;
  --p-red:      #e0333d;
  --p-red-bg:   #fdeef0;
  --p-amber:    #b07d18;
  --p-amber-bg: #fdf6e6;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(19, 23, 38, .05);
  --shadow-md: 0 4px 16px rgba(19, 23, 38, .07);
  --shadow-lg: 0 18px 50px rgba(19, 23, 38, .16);

  /* Eski sınıf adlarıyla uyum */
  --navy: var(--p-sidebar-1);
  --gold: var(--p-accent);
  --gold-dark: #4d69d6;
  --bg: var(--p-bg);
  --card: var(--p-card);
  --ink: var(--p-text);
  --text: var(--p-body);
  --muted: var(--p-muted);
  --line: var(--p-line);
  --green: var(--p-green);
  --green-bg: var(--p-green-bg);
  --red: var(--p-red);
  --red-bg: var(--p-red-bg);
  --radius: var(--r-md);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; border-radius: 4px; }

/* ============================
   YERLEŞİM
   ============================ */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  background: linear-gradient(168deg, var(--p-sidebar-2) 0%, var(--p-sidebar-1) 60%, #0d0f16 100%);
  color: #c9cfe0;
  overflow-x: hidden;
  transition: width .18s cubic-bezier(.4, 0, .2, 1), padding .18s cubic-bezier(.4, 0, .2, 1);
}
/* Menünün üstünde hafif renk sızıntısı — cam hissi */
.sidebar:before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -120px; left: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(108, 140, 255, .30), transparent 68%);
  filter: blur(38px);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

/* --- Kimlik bloğu: üstte Picative kilidi, altında yönetilen firma --- */
.sidebar-brand {
  padding: 14px 14px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* Katman A — Picative monogram + wordmark (ikincil) */
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark { flex-shrink: 0; display: block; }
.brand-lockup .lockup-text { display: block; min-width: 0; }
.brand-lockup strong {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-lockup .lockup-alt {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--p-accent);
}

/* Ayırıcı — iki kimlik katmanı arasında */
.sidebar-brand .brand-firma {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
/* Simge, nav ikon ızgarasıyla aynı hizada durur */
.brand-firma > i {
  font-style: normal;
  font-size: 14px;
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  color: #7f88a0;
}
.brand-firma .firma {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 16.5px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
/* Firma adı girilmemişse: nötr, ayarlara götüren bağlantı */
.brand-firma .firma-bos {
  color: rgba(255, 255, 255, .55);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  transition: color .16s;
}
.brand-firma .firma-bos:hover { color: #fff; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 4px; }

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 2px;
  min-height: 44px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
  color: #a8b0c5;
  transition: background .16s, color .16s;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.sidebar-nav a.is-active {
  background: linear-gradient(90deg, var(--p-accent-dim), rgba(139, 108, 255, .07));
  color: #fff;
}
.sidebar-nav a.is-active:before {
  content: "";
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--p-accent), var(--p-accent-2));
}
.sidebar-nav i {
  font-style: normal;
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: #7f88a0;
  transition: color .16s;
}
.sidebar-nav a:hover i, .sidebar-nav a.is-active i { color: var(--p-accent); }

.sidebar-nav .badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.nav-section {
  padding: 16px 14px 6px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7a8299;
}
/* İlk gruptaki başlık menünün tepesine yapışmasın diye daha dar boşluk alır */
.nav-group:first-child .nav-section { padding-top: 8px; }

.sidebar-foot {
  padding: 14px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: grid;
  gap: 8px;
}
.sidebar-foot a { font-size: 13px; color: #8d96ab; transition: color .16s; }
.sidebar-foot a:hover { color: #fff; }
/* Footer bağlantılarının ikon karşılığı yalnızca dar menüde belirir */
.sidebar-foot a > i { display: none; font-style: normal; }
.sidebar-foot .view-site { color: var(--p-accent); font-weight: 600; }

/* --- Menü daraltma düğmesi (footer'ın son elemanı) --- */
.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  margin-top: 2px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-sm);
  color: #8d96ab;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.sidebar-collapse:hover {
  background: rgba(255, 255, 255, .055);
  color: #fff;
  border-color: rgba(255, 255, 255, .14);
}
.sidebar-collapse svg { flex-shrink: 0; transition: transform .18s cubic-bezier(.4, 0, .2, 1); }

/* Daraltma yalnızca masaüstünde anlamlı; mobilde menü zaten off-canvas. */
@media (max-width: 900px) {
  .sidebar-collapse { display: none; }
}

/* --- Dar menüde beliren ipucu balonu (gövdeye bağlı tek öğe) --- */
.nav-tooltip {
  position: fixed;
  z-index: 70;
  left: 0; top: 0;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--p-sidebar-2);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity .12s ease, transform .12s ease;
}
.nav-tooltip.is-open { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ============================
   DAR MENÜ (yalnızca masaüstü)
   <html class="menu-dar"> sunucuda basılır → sayfa açılışında titreme olmaz.
   900px altında menü off-canvas çalıştığı için buradaki hiçbir kural geçerli değildir.
   ============================ */
@media (min-width: 901px) {
  .menu-dar .sidebar {
    width: 76px;
    padding: 14px 14px;   /* 14 + 48 + 14 */
  }

  /* Metinler gizlenir, ikonlar kalır; erişilebilir ad aria-label'da durur. */
  .menu-dar .sidebar-nav a span,
  .menu-dar .sidebar-brand .lockup-text,
  .menu-dar .sidebar-brand .firma,
  .menu-dar .sidebar-collapse span { display: none; }

  .menu-dar .sidebar-brand { padding: 14px 0 16px; }
  .menu-dar .brand-lockup { justify-content: center; gap: 0; }
  .menu-dar .sidebar-brand .brand-firma { justify-content: center; gap: 0; }

  .menu-dar .nav-section { display: none; }
  /* Başlıklar gizlenince gruplar ince çizgiyle ayrılır */
  .menu-dar .nav-group + .nav-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  .menu-dar .sidebar-nav a {
    width: 48px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0 auto 2px;
    justify-content: center;
    gap: 0;
  }
  .menu-dar .sidebar-nav i { font-size: 15px; }
  /* Aktif çubuk iki modda da menünün sol kenarında (x=0) durur */
  .menu-dar .sidebar-nav a.is-active:before { left: -14px; }

  /* Rozet, ikonun sağ üstünde noktaya döner */
  .menu-dar .sidebar-nav .badge {
    position: absolute;
    top: 6px; right: 6px;
    margin-left: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    border: 2px solid var(--p-sidebar-1);
    font-size: 10px;
    line-height: 16px;
  }

  .menu-dar .sidebar-collapse {
    width: 48px;
    height: 44px;
    padding: 0;
    margin: 2px auto 0;
    gap: 0;
    justify-content: center;
  }
  .menu-dar .sidebar-collapse svg { transform: rotate(180deg); }

  .menu-dar .sidebar-foot { padding: 14px 0; }
  .menu-dar .sidebar-foot a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    margin: 0 auto;
    border-radius: var(--r-sm);
  }
  .menu-dar .sidebar-foot a:hover { background: rgba(255, 255, 255, .055); }
  .menu-dar .sidebar-foot a > span { display: none; }
  .menu-dar .sidebar-foot a > i { display: block; font-size: 15px; }
}

/* Not: hareket azaltma kuralı dosyanın en sonundadır — mobil off-canvas geçişi
   (RESPONSIVE bölümü) burayı ezmesin diye kasten en sona bırakıldı. */

.admin-main { flex: 1; padding: 28px 32px 64px; min-width: 0; }

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}
.admin-head h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.admin-head p { color: var(--p-muted); font-size: 14.5px; margin-top: 5px; max-width: 660px; }

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: 100px;
  padding: 7px 8px 7px 16px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  z-index: 60;
  top: 14px; left: 14px;
  width: 44px; height: 44px;
  background: var(--p-sidebar-1);
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: var(--shadow-md);
}
.sidebar-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: #fff; }

/* ============================
   BİLDİRİMLER
   ============================ */
.note {
  padding: 14px 18px;
  border-radius: var(--r-md);
  margin-bottom: 18px;
  font-size: 14.5px;
  border: 1px solid transparent;
}
.note-success { background: var(--p-green-bg); border-color: #bfe8cf; color: #0b6b35; }
.note-error   { background: var(--p-red-bg);   border-color: #f6ced2; color: #a01722; }

/* ============================
   KARTLAR
   ============================ */
.card {
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.card-head .count {
  background: var(--p-line-2);
  color: var(--p-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  margin-left: 6px;
}
.card-note { color: var(--p-muted); font-size: 14px; margin-bottom: 18px; max-width: 720px; }

.panel-columns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 14px; }

.info-box {
  background: linear-gradient(135deg, #f8f9fd, #f4f6fc);
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  padding: 15px 17px;
}
.info-box b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--p-text); }
.info-box p { font-size: 13.5px; color: var(--p-body); }
.info-box code { background: #e9ecf5; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

.hint-note {
  background: var(--p-amber-bg);
  border: 1px solid #f2e3bf;
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 14px;
  color: #7a5f14;
  margin-bottom: 18px;
}

.empty { color: var(--p-muted); font-size: 14.5px; padding: 16px 0; }
.empty-state { text-align: center; padding: 56px 26px; }
.empty-state h2 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--p-muted); font-size: 14.5px; max-width: 460px; margin: 0 auto 20px; }

/* ============================
   ÖZET KUTULARI
   ============================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d9deee; }
.stat-card small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--p-muted);
}
.stat-card strong {
  display: block;
  font-size: 33px;
  font-weight: 700;
  line-height: 1.2;
  margin: 5px 0 2px;
  letter-spacing: -.02em;
}
.stat-card span { font-size: 13px; color: var(--p-body); }
.stat-card.highlight { border-color: rgba(108, 140, 255, .45); background: linear-gradient(150deg, #fff, #f7f9ff); }
.stat-card.highlight strong { color: var(--p-accent); }

.quick-links { display: grid; gap: 9px; }
.quick-links a {
  display: block;
  padding: 13px 16px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  transition: border-color .18s, background .18s, transform .18s;
}
.quick-links a:hover { border-color: rgba(108, 140, 255, .5); background: #f8faff; transform: translateX(2px); }
.quick-links b { display: block; font-size: 14.5px; font-weight: 600; }
.quick-links span { font-size: 13px; color: var(--p-muted); }

.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--p-line-2);
  font-size: 14px;
}
.status-list li:last-child { border-bottom: 0; }
.status-list span { color: var(--p-muted); }
.status-list b { font-weight: 600; text-align: right; word-break: break-word; }

/* ============================
   TABLOLAR
   ============================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--p-muted);
  padding: 0 12px 11px;
  border-bottom: 1px solid var(--p-line);
}
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--p-line-2);
  vertical-align: middle;
  font-size: 14.5px;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fafbff; }
.data-table td small { display: block; color: var(--p-muted); font-size: 12.5px; margin-top: 2px; }
.data-table.compact td { padding: 9px 12px; font-size: 13.5px; }
.data-table .right { text-align: right; }
.data-table .nowrap { white-space: nowrap; }
.data-table .muted { color: var(--p-muted); font-size: 12.5px; }
.data-table tr.is-new td { background: #f8faff; }
.data-table tr.is-hidden-row td { opacity: .5; }

.row-title { font-weight: 600; font-size: 15px; }
.row-title:hover { color: var(--p-accent); }

.thumb {
  width: 68px; height: 50px;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
  background: var(--p-line-2);
}
.thumb-empty { display: grid; place-items: center; color: var(--p-muted); border: 1px dashed var(--p-line); }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  margin-left: 7px;
  vertical-align: middle;
}
.pill-new  { background: linear-gradient(135deg, var(--p-accent), var(--p-accent-2)); color: #fff; }
.pill-gold { background: var(--p-accent-dim); color: var(--gold-dark); }

/* ============================
   SEKMELER
   ============================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tabs-standalone { margin-bottom: 18px; }
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--p-body);
  transition: background .16s, color .16s, border-color .16s;
}
.tabs a b {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--p-line-2);
  color: var(--p-muted);
  padding: 1px 8px;
  border-radius: 20px;
}
.tabs a:hover { border-color: #cdd4e8; }
.tabs a.is-active {
  background: var(--p-ink);
  color: #fff;
  border-color: var(--p-ink);
}
.tabs a.is-active b { background: rgba(255, 255, 255, .16); color: #cdd5ee; }

/* ============================
   FORMLAR
   ============================ */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; } .col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }
.form-grid > .form-row:not([class*="col-"]) { grid-column: span 12; }

.form-row { margin-bottom: 18px; }
.form-row > label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 7px;
}
.form-row .req { color: var(--p-red); }
.form-row small { display: block; font-size: 12.5px; color: var(--p-muted); margin-top: 6px; line-height: 1.5; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--p-text);
  transition: border-color .16s, box-shadow .16s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px var(--p-accent-dim);
  outline: none;
}
.form-row textarea { resize: vertical; line-height: 1.65; }
.form-row input[type="file"] {
  width: 100%;
  padding: 11px;
  border: 1.5px dashed #d6dcee;
  border-radius: var(--r-md);
  background: #fafbff;
  font-size: 13.5px;
  cursor: pointer;
}
.form-row input[type="file"]:hover { border-color: var(--p-accent); }
.heading-input { font-size: 16px !important; font-weight: 500; }

.form-check label { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.form-check input { width: 18px; height: 18px; accent-color: var(--p-accent); cursor: pointer; }
.switch-row { display: grid; gap: 6px; align-content: start; padding-top: 24px; }
.stat-block { border-right: 1px solid var(--p-line-2); padding-right: 18px; }
.stat-block:last-child { border-right: 0; }

.image-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #fafbff;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.image-preview img { width: 92px; height: 68px; object-fit: contain; border-radius: var(--r-sm); background: #fff; }
.remove-image { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--p-red); cursor: pointer; font-weight: 500; }
.remove-image input { accent-color: var(--p-red); }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 0;
  padding: 14px 0;
  background: rgba(245, 246, 250, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--p-line);
}
.inline-form { display: inline-block; }
.hidden-form { display: none; }

.serp-preview { margin-top: 8px; }
.serp-preview > small { font-size: 12.5px; color: var(--p-muted); }
.serp {
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  padding: 15px 17px;
  margin-top: 8px;
  background: #fff;
  max-width: 620px;
}
.serp b { display: block; color: #1a0dab; font-size: 17px; font-weight: 400; line-height: 1.3; }
.serp span { display: block; color: #0d652d; font-size: 13px; margin: 3px 0 5px; }
.serp p { color: #4d5156; font-size: 13.5px; line-height: 1.5; }

/* ============================
   BUTONLAR
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s, box-shadow .16s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-2));
  color: #fff;
  box-shadow: 0 3px 12px rgba(108, 140, 255, .32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(108, 140, 255, .42); }
.btn-ghost { background: #fff; border-color: var(--p-line); color: var(--p-body); }
.btn-ghost:hover { border-color: #c9d1e8; color: var(--p-text); }
.btn-danger { background: #fff; border-color: #f3ccd0; color: var(--p-red); }
.btn-danger:hover { background: var(--p-red); color: #fff; border-color: var(--p-red); }
.btn-small { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.toggle {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter .16s;
}
.toggle:hover { filter: brightness(.97); }
.toggle.on  { color: var(--p-green); border-color: #bfe8cf; background: var(--p-green-bg); }
.toggle.off { color: var(--p-muted); border-color: var(--p-line); background: var(--p-line-2); }

.icon-button {
  width: 32px; height: 32px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--p-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.icon-button:hover { border-color: var(--p-accent); color: var(--p-accent); background: #f8faff; }
.icon-button.danger:hover { border-color: var(--p-red); color: var(--p-red); background: var(--p-red-bg); }

.link-button {
  display: block;
  background: none;
  border: 0;
  padding: 4px 0 0;
  font-size: 12.5px;
  color: var(--p-muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.link-button:hover { color: var(--p-accent); }

.status-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 13.5px;
  background: #fff;
  cursor: pointer;
}
.status-select:hover { border-color: var(--p-accent); }

/* ============================
   SATIR KARTLARI
   ============================ */
.row-card { display: flex; gap: 22px; align-items: flex-start; }
.row-card.is-dim { opacity: .6; }
.row-form { flex: 1; min-width: 0; }
.row-actions { margin-top: 2px; }
.row-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
  padding-left: 22px;
  border-left: 1px solid var(--p-line-2);
}

/* ============================
   GALERİ YÖNETİMİ
   ============================ */
.gallery-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.gallery-admin-item {
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .18s;
}
.gallery-admin-item:hover { box-shadow: var(--shadow-md); }
.gallery-admin-item img { width: 100%; height: 130px; object-fit: cover; display: block; }
.gallery-admin-item input {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--p-line-2);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13px;
}
.gallery-admin-item input:focus { outline: none; background: #f8faff; }
.gallery-admin-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding: 8px 10px;
  border-top: 1px solid var(--p-line-2);
}

/* ============================
   REFERANSLAR
   ============================ */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.partner-card { margin-bottom: 0; }
.partner-card.is-dim { opacity: .6; }
.partner-logo {
  height: 96px;
  display: grid;
  place-items: center;
  background: #fafbff;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  padding: 12px;
}
.partner-logo img { max-height: 72px; max-width: 100%; object-fit: contain; }
.no-logo { color: var(--p-muted); font-size: 13px; }
.partner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--p-line-2);
}

/* ============================
   TALEPLER
   ============================ */
.lead-detail { border-left: 3px solid var(--p-accent); }
.lead-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--p-line-2);
  border-bottom: 1px solid var(--p-line-2);
  margin-bottom: 18px;
}
.lead-facts small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin-bottom: 3px;
}
.lead-facts b { font-size: 15px; font-weight: 600; }
.lead-facts a:hover { color: var(--p-accent); }
.lead-message {
  background: #fafbff;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 20px;
  white-space: pre-line;
}

/* ============================
   ŞEMALAR
   ============================ */
.card-split { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.card-split .card-note { flex: 1; min-width: 240px; margin-bottom: 0; }
.card-split .form-grid { flex: 1; min-width: 260px; }

.diagram { margin: 0; flex-shrink: 0; width: 260px; }
.diagram svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  background: #fff;
}
.diagram figcaption { font-size: 12px; line-height: 1.5; color: var(--p-muted); margin-top: 7px; text-align: center; }

.diagram .d-page { fill: #1b1e2b; }
.diagram .d-page.light { fill: #f1f3f9; }
.diagram .d-dim { fill: rgba(255, 255, 255, .22); }
.diagram .d-line { fill: rgba(255, 255, 255, .15); }
.diagram .d-hot { fill: var(--p-accent); }
.diagram .d-green { fill: #2f8a4f; }
.diagram .d-rule { stroke: rgba(255, 255, 255, .18); stroke-width: 1; }
.diagram .d-label { fill: rgba(255, 255, 255, .5); font-size: 9px; font-family: "Plus Jakarta Sans", sans-serif; }
.diagram .d-label.light { fill: rgba(26, 29, 38, .45); }
.diagram .d-page.light ~ .d-dim,
.diagram .d-page.light ~ g .d-dim { fill: rgba(26, 29, 38, .16); }
.diagram .d-page.light ~ .d-line,
.diagram .d-page.light ~ g .d-line { fill: rgba(26, 29, 38, .12); }
.diagram .d-page.light ~ .d-rule { stroke: rgba(26, 29, 38, .16); }

.diagram-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.diagram-row .diagram { width: 200px; }

/* ============================
   TEKRAR EDEN ALT GRUPLAR
   ----------------------------
   Bir kartta birbirinin aynısı görünen alanlar olduğunda ("1. rakam",
   "2. rakam") her grup kendi şemasını taşır; şema o grubun sitede nereye
   denk geldiğini işaretler. Alan adları da sadeleşir: "1. rakam" değil
   sadece "Rakam".
   ============================ */
.altgrup-satir {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.altgrup {
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  background: var(--p-line-2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.altgrup > .diagram { width: 100%; }
.altgrup .altgrup-basi { display: flex; align-items: center; gap: 9px; }
.altgrup .altgrup-basi .no {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: var(--p-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.altgrup .altgrup-basi .ad { font-size: 13.5px; font-weight: 650; color: var(--p-text); }
.altgrup .form-row { margin-bottom: 0; }

/* Şemasız kullanım için ince ayırıcı şerit. */
.alt-baslik {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
}
.alt-baslik::after { content: ""; flex: 1; height: 1px; background: var(--p-line); }
.alt-baslik .no {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--p-accent-dim);
  color: var(--p-accent);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.alt-baslik .ad {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--p-muted);
}

/* ============================
   ÇİZİMLİ SEÇENEK KARTLARI
   ----------------------------
   Form::secenekKartlari() — adı tek başına anlaşılmayan seçenekler için
   açılır listenin yerine geçer. Radyo düğmesidir, JavaScript gerektirmez.
   ============================ */
.secenek-grubu { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.secenek-grubu > legend {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 8px;
  padding: 0;
}
.secenekler {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.secenek {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1.5px solid var(--p-line);
  border-radius: var(--r-md);
  background: var(--p-card);
  padding: 13px;
  cursor: pointer;
}
.secenek input { position: absolute; opacity: 0; pointer-events: none; }
.secenek:hover { border-color: var(--p-muted); }
.secenek:has(input:checked) { border-color: var(--p-accent); background: var(--p-accent-dim); }
.secenek:focus-within { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.secenek svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  background: #fff;
}
.secenek .secenek-ad { font-size: 14px; font-weight: 650; color: var(--p-text); }
.secenek .secenek-not { font-size: 12.5px; line-height: 1.45; color: var(--p-muted); }

/* Şema sınıfları .diagram altında tanımlı; kartlarda da geçerli olmalı. */
.secenek .d-page { fill: #1b1e2b; }
.secenek .d-page.light { fill: #f1f3f9; }
.secenek .d-dim { fill: rgba(255, 255, 255, .22); }
.secenek .d-line { fill: rgba(255, 255, 255, .15); }
.secenek .d-hot { fill: var(--p-accent); }
.secenek .d-rule { stroke: rgba(255, 255, 255, .18); stroke-width: 1; }
.secenek .d-label { fill: rgba(255, 255, 255, .5); font-size: 9px; font-family: "Plus Jakarta Sans", sans-serif; }

/* ============================
   YETKİ GÖSTERGELERİ
   ============================ */
.role-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--p-line-2);
  color: var(--p-muted);
}
.role-tag.admin { background: var(--p-accent-dim); color: var(--gold-dark); }

.admin-only-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--p-accent-dim);
  color: var(--gold-dark);
  white-space: nowrap;
}
.admin-only-box {
  margin-top: 18px;
  padding: 18px 18px 4px;
  border: 1.5px dashed #d6dcee;
  border-radius: var(--r-md);
  background: #fafbff;
}
.admin-only-box .admin-only-tag { margin-bottom: 12px; }

/* ============================
   KULLANICI YÖNETİMİ
   ============================ */
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.pw-form {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.pw-form input {
  width: 210px;
  padding: 9px 12px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
}

/* ============================
   TASARIM EKRANI
   ============================ */
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type="color"] {
  width: 52px; height: 42px;
  padding: 3px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.color-field input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  text-transform: lowercase;
}

.preset-row { display: flex; gap: 12px; flex-wrap: wrap; }
.preset {
  display: block;
  border: 2px solid var(--p-line);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
  min-width: 150px;
}
.preset:hover { border-color: #c9d1e8; transform: translateY(-2px); }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset:has(input:checked) { border-color: var(--p-accent); background: #f8faff; }
.preset-chips { display: flex; gap: 4px; margin-bottom: 9px; }
.preset-chips i { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .08); display: block; }
.preset b { font-size: 13px; font-weight: 600; display: block; }

input[type="range"] { width: 100%; accent-color: var(--p-accent); margin: 6px 0 2px; }
.range-note { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--p-muted); }
.range-note b { font-size: 14px; color: var(--p-accent); font-weight: 700; }

/* ============================
   GİRİŞ EKRANI
   ============================ */
.login-body {
  background: linear-gradient(150deg, var(--p-sidebar-2), var(--p-sidebar-1) 55%, #0b0d13);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-body:before {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 140, 255, .28), transparent 66%);
  filter: blur(60px);
  top: -180px; right: -140px;
}
.login-box {
  position: relative;
  width: 100%;
  max-width: 410px;
  background: rgba(255, 255, 255, .97);
  border-radius: 22px;
  padding: 38px 36px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand strong { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.login-brand span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-top: 4px;
  font-weight: 600;
}
.login-form { margin-bottom: 18px; }
.login-form .btn { margin-top: 6px; padding: 13px; font-size: 15px; }
.login-note { font-size: 12.5px; color: var(--p-muted); text-align: center; line-height: 1.6; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-columns { grid-template-columns: 1fr; }
  .stat-block { border-right: 0; padding-right: 0; }
}

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    position: fixed;
    z-index: 55;
    left: 0; top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .3);
  }
  .sidebar.open { transform: translateX(0); }
  .admin-main { padding: 74px 16px 50px; }
  .admin-head { flex-direction: column; gap: 12px; }
  .admin-user { align-self: flex-start; }

  .form-grid > [class*="col-"] { grid-column: span 12; }
  .row-card { flex-direction: column; }
  .row-side {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 0;
    border-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--p-line-2);
    width: 100%;
    justify-content: flex-start;
  }
  .card-split { flex-direction: column; }
  .diagram, .diagram-row .diagram { width: 100%; max-width: 300px; }
  .pw-form { position: static; flex-direction: column; box-shadow: none; margin-top: 8px; }
  .pw-form input { width: 100%; }

  .card > .data-table,
  .card > form > .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 560px) {
  .card { padding: 18px 16px; border-radius: var(--r-md); }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-head h1 { font-size: 21px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn, .form-actions .btn { width: 100%; }
  .gallery-admin { grid-template-columns: 1fr 1fr; }
  .gallery-admin-item img { height: 100px; }
}

/* ============================
   HAREKET AZALTMA
   En sonda durur: mobil off-canvas geçişini de kapatabilmesi için
   RESPONSIVE bölümünden sonra gelmek zorunda.
   ============================ */
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-collapse svg,
  .nav-tooltip { transition: none; }
}
