/* ===== 1966 Edremitspor — Admin panel (Panel tasarımı: açık tema, yeşil-sarı marka) ===== */
:root {
  --yesil: #0F8A3C;
  --yesil-koyu: #0b6e30;
  --sari: #FFD400;
  --koyu: #0C1F13;
  --sidebar: #0C1F13;
  --zemin: #F5F7F5;
  --kart: #ffffff;
  --kenar: #e7ede8;
  --kenar2: #d7ded9;
  --cizgi: #f0f3f0;
  --metin: #0C1F13;
  --gri: #66766c;
  --gri2: #8a978e;
  --kirmizi: #b04a4a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Barlow', system-ui, sans-serif; color: var(--metin); background: var(--zemin); -webkit-font-smoothing: antialiased; }
a { color: var(--yesil); text-decoration: none; }
a:hover { color: var(--yesil-koyu); }
h1, h2, h3, h4 { margin: 0; }
input, select, textarea, button { font-family: inherit; }
img { max-width: 100%; }
::selection { background: var(--sari); color: var(--koyu); }
/* hidden attribute her zaman gizlesin (.form-stack gibi display kuralları ezmesin) */
[hidden] { display: none !important; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Kabuk ===== */
.app { min-height: 100vh; background: var(--zemin); }

/* ===== Sidebar ===== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 256px; background: var(--sidebar);
  display: flex; flex-direction: column; z-index: 50; transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { height: 40px; width: auto; display: block; }
.sidebar-brand b { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .3px; display: block; line-height: 1.05; }
.sidebar-brand span { color: var(--sari); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; display: block; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: none; cursor: pointer;
  padding: 10px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
  background: transparent; color: rgba(255,255,255,.72); transition: background .12s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--yesil); color: #fff; }
.nav-item .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.28); }
.nav-item.active .dot { background: var(--sari); }
.nav-item .lbl { flex: 1; }
.nav-item .badge { flex: none; background: var(--sari); color: var(--koyu); font-size: 11px; font-weight: 700; border-radius: 100px; padding: 2px 8px; }
.sidebar-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; }
.sidebar-user .av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--yesil); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.sidebar-user .ad { color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.sidebar-user .rol { color: rgba(255,255,255,.5); font-size: 12px; }

/* ===== Ana alan ===== */
.main { margin-left: 256px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(245,247,245,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5ebe6; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; height: 64px;
}
.topbar h1 { font-size: 20px; font-weight: 700; color: var(--metin); letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.content { flex: 1; padding: 28px; }
.hamburger-admin { display: none; background: #fff; border: 1px solid var(--kenar2); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--metin); font-size: 16px; }
.back-btn { flex: none; background: #fff; border: 1px solid var(--kenar2); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--metin); font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.back-btn:hover { border-color: var(--yesil); color: var(--yesil); }

/* ===== Butonlar ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 9px; transition: all .13s ease; }
.btn-primary { background: var(--yesil); color: #fff; }
.btn-primary:hover { background: var(--yesil-koyu); color: #fff; }
.btn-white { background: #fff; border: 1px solid var(--kenar2); color: var(--metin); }
.btn-white:hover { border-color: var(--yesil); color: var(--yesil); }
.btn-danger { background: #fff; border: 1px solid #eccccc; color: var(--kirmizi); }
.btn-danger:hover { background: #fdf3f3; border-color: #d98a8a; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-exit { background: #fff; border: 1px solid var(--kenar2); color: #8a3d3d; font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.btn-exit:hover { border-color: #c05555; background: #fff5f5; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 18px; right: 22px; z-index: 200; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e2e8e4; border-radius: 10px; padding: 14px 18px;
  box-shadow: 0 12px 36px rgba(6,19,11,.14); min-width: 260px; animation: toastIn .22s ease;
}
.toast.basari { border-left: 5px solid var(--yesil); }
.toast.hata { border-left: 5px solid #c0392b; }
.toast .ikon { flex: none; width: 26px; height: 26px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.toast.basari .ikon { background: var(--yesil); }
.toast.hata .ikon { background: #c0392b; }
.toast .msg { font-size: 14px; font-weight: 500; color: var(--metin); }

/* ===== Araç çubuğu (arama + aksiyon) ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; max-width: 340px; min-width: 200px; }
.search span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa79e; font-size: 15px; }
.search input { width: 100%; background: #fff; border: 1px solid var(--kenar2); border-radius: 9px; padding: 10px 14px 10px 34px; font-size: 14px; color: var(--metin); outline: none; }
.search input:focus { border-color: var(--yesil); }

/* ===== Kart / liste ===== */
.wrapmax { max-width: 1560px; }
.card { background: var(--kart); border: 1px solid var(--kenar); border-radius: 14px; padding: 22px 24px; }
.card + .card { margin-top: 18px; }

.lst { background: var(--kart); border: 1px solid var(--kenar); border-radius: 14px; overflow-x: auto; }
.lst-inner { }
.lst-head { display: grid; gap: 12px; align-items: center; padding: 12px 20px; background: #f7faf8; border-bottom: 1px solid var(--kenar); font-size: 12px; font-weight: 700; color: var(--gri); letter-spacing: .4px; text-transform: uppercase; }
.lst-row { display: grid; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--cizgi); }
.lst-row:last-child { border-bottom: none; }
.lst-foot { padding: 13px 20px; font-size: 13px; color: var(--gri2); }
.sag { text-align: right; }
.satir-aksiyon { display: flex; justify-content: flex-end; gap: 6px; }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: repeating-linear-gradient(135deg,#e7ede8 0 6px,#f1f5f2 6px 12px); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--gri2); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.thumb { width: 52px; height: 40px; border-radius: 7px; object-fit: cover; background: repeating-linear-gradient(135deg,#e7ede8 0 7px,#f1f5f2 7px 14px); }
.thumb-sq { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: repeating-linear-gradient(135deg,#e7ede8 0 6px,#f1f5f2 6px 12px); }
.no-rozet { display: inline-flex; min-width: 30px; justify-content: center; background: var(--koyu); color: #fff; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 3px 8px; }

/* ===== Pill / durum ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 100px; padding: 3px 10px; }
.pill .nokta { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-green { color: var(--yesil); background: #eaf6ee; }
.pill-amber { color: #957100; background: #FFF6CC; }
.pill-red { color: var(--kirmizi); background: #fdeeee; }
.pill-gray { color: var(--gri); background: #f0f3f0; }
.etiket-cat { font-size: 12.5px; font-weight: 600; color: var(--yesil); background: #eaf6ee; border-radius: 6px; padding: 3px 9px; }

/* ===== Toggle switch ===== */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .kaydir { position: absolute; inset: 0; cursor: pointer; background: #c9d3cc; border-radius: 100px; transition: background .15s ease; }
.switch .kaydir:before { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease; }
.switch input:checked + .kaydir { background: var(--yesil); }
.switch input:checked + .kaydir:before { transform: translateX(19px); }
.switch.lg { width: 50px; height: 28px; }
.switch.lg .kaydir:before { width: 22px; height: 22px; }
.switch.lg input:checked + .kaydir:before { transform: translateX(22px); }

/* ===== İstatistik kartları ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; padding: 20px 22px; }
.stat .ust { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat .lbl { font-size: 13px; font-weight: 600; color: var(--gri); }
.stat .nokta { width: 9px; height: 9px; border-radius: 50%; }
.stat .val { font-size: 38px; font-weight: 700; line-height: 1; color: var(--metin); }
.stat .hint { font-size: 12.5px; color: var(--gri2); margin-top: 8px; }

/* ===== Formlar ===== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field > label { font-size: 13px; font-weight: 600; color: #455249; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=datetime-local], .field select, .field textarea {
  background: #fff; border: 1px solid var(--kenar2); border-radius: 9px; padding: 11px 13px; font-size: 14.5px; color: var(--metin); outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--yesil); }
.field textarea { resize: vertical; min-height: 90px; }
.field .yardim { font-size: 12px; color: var(--gri2); font-weight: 400; }
.form-row { display: grid; gap: 16px; }
.form-2 { grid-template-columns: 1fr 1fr; }
.form-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid #eef2ef; }
.val-hata { color: var(--kirmizi); font-size: 13px; }
.field input.input-validation-error, .field select.input-validation-error, .field textarea.input-validation-error { border-color: var(--kirmizi); }
.req { color: var(--kirmizi); font-weight: 700; margin-left: 2px; }

/* onay satırı (aktif toggle bloğu) */
.onay-blok { display: flex; align-items: center; justify-content: space-between; background: #f7faf8; border: 1px solid var(--kenar); border-radius: 10px; padding: 14px 16px; gap: 14px; }
.onay-blok .baslik { font-size: 14px; font-weight: 600; color: var(--metin); }
.onay-blok .aciklama { font-size: 12.5px; color: var(--gri2); }

/* dashed upload */
.upload { border: 2px dashed #cbd6ce; border-radius: 12px; background: #f9fbf9; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.upload:hover { border-color: var(--yesil); background: #f2f8f4; }
.upload .onizleme { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: repeating-linear-gradient(135deg,#e7ede8 0 8px,#f1f5f2 8px 16px); display: flex; align-items: center; justify-content: center; font-size: 11px; font-family: ui-monospace,monospace; color: var(--gri2); }
.upload .onizleme.genis { width: 100%; height: 96px; }
.upload input[type=file] { font-size: 12.5px; color: var(--gri); }

/* ===== Dosya seç butonu (tüm file input'lar) ===== */
input[type=file] { font-size: 13px; color: var(--gri2); max-width: 100%; }
input[type=file]::file-selector-button {
  margin-right: 12px; border: none; background: var(--yesil); color: #fff;
  padding: 9px 18px; border-radius: 9px; font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: background .13s ease;
}
input[type=file]::file-selector-button:hover { background: var(--yesil-koyu); }

/* ===== Segment (Otomatik/Manuel) ===== */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--kenar2); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button, .seg a { border: none; cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 8px 16px; border-radius: 7px; background: transparent; color: var(--gri); }
.seg .on { background: var(--yesil); color: #fff; }

/* ===== Sekmeler (ayarlar) ===== */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid #e5ebe6; margin-bottom: 22px; overflow-x: auto; }
.tabs a, .tabs button { border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; padding: 11px 4px; margin: 0 8px; color: var(--gri); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on, .tabs button.on { color: var(--yesil); border-bottom-color: var(--yesil); }

/* ===== Bölümler ===== */
.bolum-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #f5f7f5; }
.bolum-row:last-child { border-bottom: none; }
.bolum-row .tut { flex: none; color: #c2ccc5; font-size: 18px; line-height: 1; }
.bolum-row .ad { font-size: 14.5px; font-weight: 600; color: var(--metin); }
.bolum-row .desc { font-size: 12.5px; color: var(--gri2); }

/* ===== Mesaj kutusu ===== */
.inbox { display: grid; grid-template-columns: minmax(240px,340px) minmax(0,1fr); gap: 18px; align-items: start; }
.inbox-list { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; overflow: hidden; }
.inbox-item { display: flex; gap: 12px; width: 100%; text-align: left; border: none; border-left: 3px solid transparent; cursor: pointer; padding: 14px 16px; border-bottom: 1px solid var(--cizgi); background: #fff; }
.inbox-item.sel { background: #f3faf5; border-left-color: #cde9d6; }
.inbox-item .av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #dfe6e0; color: var(--gri); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.inbox-item.sel .av { background: var(--yesil); color: #fff; }

/* ===== Ziyaret grafiği ===== */
.grafik { display: flex; align-items: flex-end; gap: 4px; height: 240px; padding-top: 10px; }
.grafik .bar { flex: 1 1 0; min-width: 0; background: linear-gradient(180deg,#0F8A3C,#12a047); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; transition: background .15s ease; cursor: default; }
.grafik .bar:hover { background: linear-gradient(180deg,#0b6e30,#0F8A3C); }
.grafik .bar .tip {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-6px);
  background: #0C1F13; color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 5;
}
.grafik .bar:hover .tip,
.grafik .bar:active .tip,
.grafik .bar:focus .tip { opacity: 1; }        /* :active/:focus → dokunmatikte değeri göster */
.grafik .bar:focus { outline: none; }
.grafik-eksen { display: flex; gap: 4px; margin-top: 8px; }
.grafik-eksen span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10.5px; color: #98a49b; white-space: nowrap; overflow: hidden; }
.grafik-bos { height: 240px; display: flex; align-items: center; justify-content: center; color: #98a49b; font-size: 14px; }

/* ===== Harita seçici (ayarlar) ===== */
.harita-sec { height: 300px; border: 1px solid var(--kenar2); border-radius: 12px; overflow: hidden; position: relative; z-index: 0; }
@media (max-width: 560px) { .harita-sec { height: 240px; } }

/* ===== Boş durum ===== */
.bos { text-align: center; color: var(--gri2); padding: 44px; }

/* ===== Galeri/sponsor kartları ===== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; }

/* Sidebar arka planı (mobilde sidebar açıkken; dışına basınca kapatır) */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(6,19,11,.45); z-index: 45; }
.sidebar-backdrop.show { display: block; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger-admin { display: inline-flex; align-items: center; justify-content: center; }
  .form-2, .form-3 { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; }
}
@media (min-width: 861px) {
  .sidebar-backdrop { display: none !important; }  /* masaüstünde asla */
}

/* ===== Mobil cila (telefon) ===== */
@media (max-width: 560px) {
  /* Topbar ve içerik nefes alanı küçült */
  .topbar { padding: 0 14px; gap: 8px; height: 58px; }
  .topbar h1 { font-size: 17px; }
  .topbar-right { gap: 8px; }
  .content { padding: 16px 13px; }

  /* "Siteyi Gör" → sadece ikon (metni gizle) */
  .topbar-right .btn-txt { display: none; }
  .btn-sm { padding: 7px 10px; }
  .btn-exit { padding: 7px 11px; }

  /* Kart / stat ölçekleme */
  .card { padding: 18px 15px; border-radius: 12px; }
  .stat-grid { gap: 12px; margin-bottom: 16px; }
  .stat { padding: 16px 17px; }
  .stat .val { font-size: 30px; }
  .btn { padding: 10px 14px; }
  .form-foot { flex-wrap: wrap; }

  /* Toast ekrana sığsın */
  .toast { left: 12px; right: 12px; min-width: 0; }

  /* Ziyaret grafiği: yatay kaydırılabilir, barlar tıklanabilir genişlikte.
     overflow-x:auto dikeyi de auto'ya çevirir; üst tooltip kırpılmasın diye padding-top. */
  .grafik-kaydir { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 30px 0 4px; }
  .grafik, .grafik-eksen { min-width: 560px; }

  /* Segment kontrolü kompakt */
  .seg button, .seg a { padding: 7px 12px; font-size: 12.5px; }
}

/* --- Bilgi ipucu: label yanındaki yuvarlak "i" + hover/focus'ta animasyonlu balon --- */
.ipucu {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 5px; vertical-align: middle; flex: none;
  border-radius: 50%; background: var(--yesil, #0F8A3C); color: #fff;
  font-family: Georgia, 'Times New Roman', serif; font-size: 10px; font-weight: 700; font-style: italic;
  line-height: 1; cursor: help; position: relative; user-select: none;
}
.ipucu:hover, .ipucu:focus-visible { background: #0C6D2F; outline: none; }
.ipucu-balon {
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.96); transform-origin: bottom center;
  background: #0C1F13; color: #fff; text-align: left;
  font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.5;
  padding: 10px 13px; border-radius: 9px; width: max-content; max-width: 250px; white-space: normal;
  box-shadow: 0 10px 30px rgba(6,19,11,.28);
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 60;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2,.8,.3,1.25);
}
.ipucu-balon::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #0C1F13;
}
.ipucu-ornek { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.15); color: #cfe8d6; }
.ipucu-ornek b { color: #FFD400; }
.ipucu:hover .ipucu-balon, .ipucu:focus .ipucu-balon, .ipucu:focus-within .ipucu-balon {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1);
}
@media (max-width: 560px) { .ipucu-balon { max-width: 200px; } }
