* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f3f0;
  color: #1b1b1b;
  /* Telefonda panele girince ekranin yana kaymasina karsi güvenlik agi -
     asil sebep (grid/flex elemanlarinin kucuk ekranda kucul(e)memesi) ayrica
     duzeltildi, ama ileride benzer bir eleman eklenirse sayfa yine de yatay
     kaymasin diye bu satir kaliyor. */
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- topbar (admin) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #1b1b1b;
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #c0392b;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: 0.5px;
}
.brand .mark-img, .mark-img {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: block;
}
.brand h1 { font-size: 17px; margin: 0; line-height: 1.1; }
.brand .tagline { font-size: 12px; color: #b8b8b8; }
.topbar-nav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.topbar-nav a { opacity: 0.85; }
.topbar-nav a:hover { opacity: 1; }
.nav-logout { color: #f5a4a4 !important; }

.content { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---------- flash messages ---------- */
.flash-wrap { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.flash-success { background: #e3f6e8; color: #1c6b34; border: 1px solid #b6e3c1; }
.flash-error { background: #fbe8e6; color: #a1291b; border: 1px solid #f3b9b2; }

/* ---------- panels/cards ---------- */
.panel {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 20px;
}
.panel h3 { margin-top: 0; font-size: 17px; }
.section-title { font-size: 20px; margin: 30px 0 14px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 720px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.qr-panel { text-align: center; }
.qr-img { width: 170px; height: 170px; border-radius: 12px; border: 1px solid #eee; margin: 6px 0 12px; }
.public-url { font-size: 13px; margin-bottom: 14px; word-break: break-all; color: #555; }

.muted { color: #767676; }
.muted.small { font-size: 13px; }
.muted.center { text-align: center; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: #444; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], input[type=color] {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #d8d6d1;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
input[type=color] { padding: 4px; height: 40px; width: 80px; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 140px; }
.printed-menu-options select { padding: 8px 10px; border-radius: 8px; border: 1px solid #d8d6d1; font-family: inherit; font-size: 13px; background: #fff; flex: 1; min-width: 150px; }
.printed-menu-options button { flex: 1 1 100%; margin-top: 2px; }

.btn-primary, .btn-danger, .btn-ghost {
  border: none;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: #1b1b1b; color: #fff; }
.btn-primary:hover { background: #333; }
.btn-primary.full, .btn-ghost.full, .btn-danger.full { width: 100%; display: block; box-sizing: border-box; text-align: center; margin-top: 4px; }
.btn-primary.small, .btn-danger.small, .btn-ghost.small { padding: 6px 11px; font-size: 13px; }

/* ---------- panel: QR kodu + yazdirilabilir cikti butonlari ----------
   Ucu bir alanda (QR indir / yazdirilabilir QR standi / basili menu)
   birbirine yakin duran butonlar daha once ".btn-ghost.full" icin genislik
   kurali olmadigindan ust uste biniyordu (yukaridaki kural bunu cozuyor).
   Asagidaki ".qr-action" sarmalayicisi da uc eylemi birbirinden ince bir
   ayrac ile ayirip duzenli/orantili bir dikey ritim veriyor. */
.qr-action { margin-top: 14px; text-align: left; }
.qr-action + .qr-action { padding-top: 16px; border-top: 1px solid #eee7dd; }
.qr-action .btn-primary, .qr-action .btn-ghost { margin-top: 0; }
.qr-action .muted.small { margin-top: 8px; }

/* ---------- ayarlar sayfasi: en altta sabit "Kaydet" cubugu ---------- */
/* Kaydet dugmesi artik formun ortasinda kalmiyor - butun panel sayfasi
   boyunca her zaman ekranin en altinda sabit kaliyor, HTML'in "form"
   attribute'u sayesinde hala dogru formu gonderiyor. */
.settings-save-spacer { height: 76px; }
.settings-save-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid #eae8e2;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.07);
  padding: 12px 20px;
  z-index: 200;
  display: flex;
  justify-content: center;
}
.settings-save-bar .btn-primary {
  max-width: 560px;
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
}
.btn-danger { background: #fbe8e6; color: #a1291b; }
.btn-danger:hover { background: #f6d3cf; }
.btn-ghost { background: #f0efe9; color: #333; }
.btn-ghost:hover { background: #e5e3db; }

details > summary { list-style: none; cursor: pointer; display: inline-block; }
details > summary::-webkit-details-marker { display: none; }
details form, details .edit-item-form { margin-top: 10px; }
.edit-item-form { width: 100%; }

/* ---------- auth ---------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 40px; }
.auth-card { background: #fff; border-radius: 18px; padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-card h2 { margin-top: 0; }

/* ---------- category / item management ---------- */
.category-card { }
.category-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
.category-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }

.item-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.item-row {
  display: grid;
  grid-template-columns: 18px 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #faf9f6;
}
.item-row.item-hidden { opacity: 0.5; }
.item-thumb { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; }
.item-thumb.placeholder { display: flex; align-items: center; justify-content: center; background: #eee; font-size: 20px; }
.item-name { font-weight: 700; font-size: 14px; }
.item-desc { font-size: 12px; color: #767676; }
.badge-muted { font-size: 10px; background: #e3e1d8; color: #666; padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.item-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item-actions form { margin: 0; }
.item-actions details { position: relative; }

/* Kucuk ekranda (telefon) urun satirinin "Duzenle" butonuna basildiginda
   acilan form, satirin dar bir grid hucresine (sadece buton genisligi
   kadar) sikismak yerine tum kartin genisligini kullansin diye
   item-actions bu grid hucresini tamamen kaplayip yeni bir satira gecer. */
@media (max-width: 560px) {
  .item-row { grid-template-columns: 18px 44px minmax(0, 1fr) auto; }
  .item-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; }
  /* Kategori duzenleme formu da ayni sebepten dar kaliyordu - kategori
     basligi ile yan yana durmaya calisan buton satiri, kucuk ekranda
     kendi tam genislikte satirina gecsin ki icindeki form sikismasin. */
  .category-head { flex-wrap: wrap; }
  .category-actions { width: 100%; }
}

.add-item-block { margin-top: 4px; }

.empty-state { text-align: center; color: #767676; padding: 40px 20px; }

/* ---------- public menu page ---------- */
.public-body { background: #f7f6f3; padding-bottom: 40px; }
.menu-hero {
  color: #fff;
  padding: 46px 24px 34px;
  text-align: center;
  border-radius: 0 0 26px 26px;
}
/* Restoran kendi banner gorselini yukleyince: fotograf gorunsun diye alan
   biraz daha yuksek, icerik dikeyde ortalanmis, yazilara hafif golge. */
.menu-hero-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 230px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.menu-hero-photo h1,
.menu-hero-photo .menu-note,
.menu-hero-photo .menu-branch { text-shadow: 0 2px 10px rgba(0,0,0,0.55); }
.menu-hero-photo .hero-toolbar { align-self: stretch; }
.menu-hero-photo .social-buttons a {
  background: rgba(0,0,0,0.32);
  border-color: rgba(255,255,255,0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@media (min-width: 768px) {
  .menu-hero-photo { min-height: 300px; }
}
.menu-logo { width: 68px; height: 68px; border-radius: 16px; object-fit: cover; margin-bottom: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.menu-hero h1 { margin: 0; font-size: 26px; }
.menu-note { opacity: 0.85; margin: 8px 0 0; font-size: 14px; }

.cat-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: #f7f6f3;
  z-index: 5;
  border-bottom: 1px solid #eae8e2;
}
.cat-nav a {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #eae8e2;
}

.menu-body { max-width: 640px; margin: 0 auto; padding: 10px 18px 20px; }
.menu-category { margin-bottom: 30px; scroll-margin-top: 70px; }
.menu-category h2 { font-size: 19px; margin-bottom: 12px; }

.menu-items { display: flex; flex-direction: column; gap: 14px; }
.menu-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.menu-item-photo { width: 78px; height: 78px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.menu-item-body { flex: 1; min-width: 0; }
.menu-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.menu-item-name { font-weight: 700; font-size: 15px; }
.menu-item-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.menu-item-desc { font-size: 13px; color: #767676; margin: 4px 0 0; line-height: 1.4; }

.menu-empty { text-align: center; padding: 60px 20px; color: #767676; }
.menu-footer { text-align: center; padding: 20px; color: #a3a3a3; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-logo { width: 22px; height: 22px; border-radius: 6px; opacity: 0.85; }
.footer-company-note { font-size: 10px; color: #bcbcbc; opacity: 0.85; margin-top: -2px; }
.footer-company-note:hover { text-decoration: underline; opacity: 1; }
.footer-price-date { font-size: 11px; color: #b7b7b7; }

/* ---------- locked menu page ---------- */
.locked-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.locked-card { background: #fff; border-radius: 18px; padding: 40px 30px; max-width: 380px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.locked-icon { font-size: 40px; margin-bottom: 10px; }
.locked-card h1 { font-size: 20px; margin: 0 0 10px; }
.locked-card p { margin: 6px 0; }

/* ---------- trial / approval banner (dashboard) ---------- */
.banner { border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; font-size: 14px; }
.banner-warn { background: #fff4d6; border: 1px solid #f2d78a; color: #7a5b00; }
.banner-danger { background: #fbe8e6; border: 1px solid #f3b9b2; color: #a1291b; }
.banner-ok { background: #e3f6e8; border: 1px solid #b6e3c1; color: #1c6b34; }
.banner strong { display: block; margin-bottom: 4px; font-size: 15px; }

/* ---------- admin dashboard rows ---------- */
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-row-title { display: flex; align-items: center; gap: 10px; font-size: 15px; flex-wrap: wrap; }
.badge-ok, .badge-locked, .badge-trial {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
}
.badge-ok { background: #e3f6e8; color: #1c6b34; }
.badge-locked { background: #fbe8e6; color: #a1291b; }
.badge-trial { background: #fff4d6; color: #7a5b00; }

/* ---------- stat cards ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 820px) { .stat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card { background: #fff; border-radius: 14px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 12px; color: #767676; margin-top: 2px; }

/* ---------- search bar ---------- */
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.search-bar input[type=text] { flex: 1; min-width: 180px; }
.search-bar select { padding: 10px 12px; border-radius: 9px; border: 1px solid #d8d6d1; font-family: inherit; font-size: 14px; background: #fff; }

/* ---------- admin row card ---------- */
.admin-row-card { display: flex; flex-direction: column; gap: 12px; }
.admin-row-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; border-top: 1px solid #eee; padding-top: 12px; }
.admin-row-tools details { position: relative; }
.admin-row-tools button:disabled { opacity: 0.4; cursor: not-allowed; }

.notes-box { min-width: 260px; max-width: 360px; }
.note-line { background: #faf9f6; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }

.admin-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: 14px; }
.admin-list li { padding: 4px 0; border-bottom: 1px solid #f0efe9; }

/* ---------- settings page ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.field-checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.field-checkbox input[type=checkbox] { width: 16px; height: 16px; }

/* ---------- banner info (payment) ---------- */
.banner-info { background: #e8f0fe; border: 1px solid #b6cdf3; color: #1a3d7a; }
.banner-info a { color: #1a3d7a; font-weight: 700; }

/* ---------- badge / rozet pills ---------- */
.badge-pill {
  display: inline-block; font-size: 10px; font-weight: 700; color: #fff;
  padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle;
}

/* ---------- drag & drop reorder ---------- */
.drag-handle { cursor: grab; color: #b8b5ab; font-size: 16px; padding: 0 4px; user-select: none; }
.category-card[draggable="true"] { cursor: default; }
.category-head { cursor: default; }
.item-row[draggable="true"], .category-card[draggable="true"] { transition: opacity 0.15s; }
.item-row[draggable="true"]:active, .category-card[draggable="true"]:active { opacity: 0.6; }

/* ---------- view stats chart ---------- */
.view-chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 10px; }
.view-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.view-bar { width: 100%; max-width: 18px; background: linear-gradient(180deg, #9333ea, #6366f1); border-radius: 4px 4px 0 0; min-height: 2px; }
.view-bar-label { font-size: 9px; color: #a3a3a3; margin-top: 4px; writing-mode: vertical-rl; transform: rotate(180deg); height: 26px; }

/* ---------- language switch (public menu) ---------- */
.lang-switch { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.lang-switch a {
  color: #fff; opacity: 0.7; font-size: 12px; font-weight: 700; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.5); border-radius: 20px; padding: 3px 12px;
}
.lang-switch a.active { opacity: 1; background: rgba(255,255,255,0.18); }

/* ---------- branch picker / label (public menu) ---------- */
.menu-branch { color: #fff; opacity: 0.85; font-size: 13px; margin: -4px 0 6px; }
.branch-picker {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center;
  padding: 10px 16px; background: #faf9f6; border-bottom: 1px solid #f0efe9; font-size: 13px;
}
.branch-picker a { color: var(--theme, #c0392b); font-weight: 700; text-decoration: none; }

/* ---------- hero toolbar (dil + karanlik mod) ---------- */
.hero-toolbar { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 8px; }
.lang-switch-btn {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.5); color: #fff;
  border-radius: 20px; padding: 3px 10px; font-size: 13px; cursor: pointer;
}
.lang-select {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.5); color: #fff;
  border-radius: 20px; padding: 4px 10px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.lang-select option { color: #111; }

/* ---------- Arapca (RTL) destegi ---------- */
html[dir="rtl"] .menu-item { flex-direction: row-reverse; }
html[dir="rtl"] .menu-item-top { flex-direction: row-reverse; }
html[dir="rtl"] .badge-pill { margin-right: 6px; margin-left: 0; }
html[dir="rtl"] .cat-nav, html[dir="rtl"] .social-buttons, html[dir="rtl"] .branch-picker,
html[dir="rtl"] .campaign-banner, html[dir="rtl"] .rate-us-toast { direction: rtl; }
html[dir="rtl"] .menu-item-allergens, html[dir="rtl"] .menu-item-desc,
html[dir="rtl"] .menu-item-name, html[dir="rtl"] .menu-item-body { text-align: right; }
html[dir="rtl"] .rate-us-toast { flex-direction: row-reverse; }

/* ---------- sosyal medya / harita butonlari ---------- */
.social-buttons { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; margin-top: 12px; }
.social-buttons a {
  color: #fff; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px; padding: 5px 14px;
}

/* ---------- alerjen bilgisi ---------- */
.item-allergens { font-size: 11px; color: #a1291b; margin-top: 4px; }
.menu-item-allergens { font-size: 11px; color: #a1291b; margin: 6px 0 0; }

/* ---------- gramaj / pisirme yontemi / ek aciklama ---------- */
.item-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; color: #767676; }
.item-extra-note { margin-top: 4px; font-style: italic; color: #8a8a8a; }
.menu-item-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; font-size: 12px; color: #8a8a8a; }
.menu-item-extra-note { margin: 4px 0 0; font-size: 12px; font-style: italic; color: #8a8a8a; }
html.dark-mode .menu-item-meta { color: #6b6a64; }
html.dark-mode .menu-item-extra-note { color: #6b6a64; }
.allergen-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.allergen-check { display: flex; align-items: center; gap: 5px; font-weight: 400; }

/* ---------- tukendi durumu ---------- */
.badge-soldout { background: #ececec !important; }
.menu-item-soldout { opacity: 0.55; }
.menu-item-soldout .menu-item-photo { filter: grayscale(1); }

/* ---------- kampanya banner'i ---------- */
.campaign-banner {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  color: #fff; padding: 10px 16px; font-size: 13px; font-weight: 600; text-align: center;
}
.campaign-banner-text { flex: 1; max-width: 640px; }
.campaign-banner-close {
  background: transparent; border: none; color: #fff; opacity: 0.8; cursor: pointer; font-size: 14px;
}

/* ---------- menu ici arama ---------- */
.menu-search-wrap { padding: 12px 16px 0; max-width: 640px; margin: 0 auto; }
.menu-search-input {
  width: 100%; padding: 10px 14px; border-radius: 20px; border: 1px solid #e2e0d8;
  font-size: 14px; font-family: inherit; box-sizing: border-box;
}
.menu-search-input:focus { outline: none; border-color: var(--theme, #c0392b); }

/* ---------- "bizi degerlendirin" hatirlatmasi ---------- */
.rate-us-toast {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 420px;
  margin: 0 auto; background: #1b1b1b; color: #fff; border-radius: 14px; padding: 12px 14px;
  align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); font-size: 13px;
}
.rate-us-btn {
  background: var(--theme, #c0392b); color: #fff; border-radius: 20px; padding: 6px 12px;
  font-weight: 700; white-space: nowrap; text-decoration: none;
}
.rate-us-close { background: transparent; border: none; color: #bbb; cursor: pointer; font-size: 14px; }

/* ---------- google yorum indirim kodu ---------- */
.review-code-modal {
  position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,0.6);
  align-items: center; justify-content: center; padding: 20px;
}
.review-code-inner {
  position: relative; background: #fff; border-radius: 18px; padding: 28px 24px; max-width: 340px;
  width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.review-code-inner h3 { margin: 6px 0 12px; font-size: 18px; }
.review-code-icon { font-size: 32px; }
.review-code-value {
  font-size: 32px; font-weight: 800; letter-spacing: 4px; background: #f4f3ef; border-radius: 12px;
  padding: 14px 10px; margin-bottom: 14px; color: var(--theme, #c0392b);
}
.review-code-close {
  position: absolute; top: 12px; right: 12px; background: #f0efe9; color: #333;
  border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 14px; cursor: pointer;
}
html.dark-mode .review-code-inner { background: #211f1b; color: #eee; }
html.dark-mode .review-code-value { background: #171613; }
html.dark-mode .review-code-close { background: #322f28; color: #eee; }

/* ---------- rezervasyon modali ---------- */
.reservation-modal-overlay {
  position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.reservation-modal-box {
  position: relative; background: #fff; border-radius: 18px; padding: 28px 24px; max-width: 380px;
  width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.3); max-height: 88vh; overflow-y: auto;
}
.reservation-modal-box h3 { margin: 0 0 14px; font-size: 18px; text-align: center; }
.reservation-modal-close {
  position: absolute; top: 12px; right: 12px; background: #f0efe9; color: #333;
  border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 14px; cursor: pointer;
}
.reservation-sent-msg { text-align: center; color: #1c7c3f; font-weight: 600; padding: 10px 0; }
html.dark-mode .reservation-modal-box { background: #211f1b; color: #eee; }
html.dark-mode .reservation-modal-close { background: #322f28; color: #eee; }

/* ---------- karanlik mod (public menu) ---------- */
html.dark-mode body.public-body { background: #171613; color: #eee; }
html.dark-mode .cat-nav { background: #171613; border-bottom-color: #2c2a25; }
html.dark-mode .cat-nav a { background: #211f1b; border-color: #322f28; color: #eee; }
html.dark-mode .menu-item { background: #211f1b; box-shadow: none; }
html.dark-mode .menu-item-desc { color: #a3a19a; }
html.dark-mode .menu-empty { color: #a3a19a; }
html.dark-mode .branch-picker { background: #1c1b17; border-bottom-color: #2c2a25; }
html.dark-mode .menu-footer { color: #6b6a64; }
html.dark-mode .footer-company-note { color: #55534d; }
html.dark-mode .footer-price-date { color: #6b6a64; }
html.dark-mode .menu-search-input { background: #211f1b; border-color: #322f28; color: #eee; }

/* ---------- kategori navi: aktif link (scroll-spy) ---------- */
.cat-nav a.active { background: var(--theme, #c0392b); color: #fff; border-color: transparent; }
html.dark-mode .cat-nav a.active { background: var(--theme, #c0392b); color: #fff; }

/* ---------- "Populer" rozeti ---------- */
.badge-popular { background: #ea580c !important; }

/* ---------- sefin onerileri carousel ---------- */
.chefs-picks-wrap { max-width: 640px; margin: 14px auto 0; padding: 0 16px; }
.chefs-picks-title { font-size: 16px; margin: 0 0 10px; }
.chefs-picks-scroller {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory;
}
.chefs-pick-card {
  flex: 0 0 auto; width: 140px; background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); scroll-snap-align: start;
}
.chefs-pick-photo { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.chefs-pick-name { font-size: 13px; font-weight: 700; margin-top: 6px; line-height: 1.3; }
.chefs-pick-price { font-size: 13px; font-weight: 800; margin-top: 2px; }
html.dark-mode .chefs-pick-card { background: #211f1b; box-shadow: none; }

/* ---------- menuyu paylas ---------- */
.share-menu-wrap { position: relative; }
.share-menu-dropdown {
  position: absolute; top: 110%; left: 50%; transform: translateX(-50%); z-index: 20;
  background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  flex-direction: column; gap: 4px; min-width: 190px;
}
.share-menu-dropdown a, .share-menu-dropdown button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: #222; font-size: 13px; font-family: inherit; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; text-decoration: none; box-sizing: border-box;
}
.share-menu-dropdown a:hover, .share-menu-dropdown button:hover { background: #f4f3ef; }
html.dark-mode .share-menu-dropdown { background: #211f1b; }
html.dark-mode .share-menu-dropdown a, html.dark-mode .share-menu-dropdown button { color: #eee; }
html.dark-mode .share-menu-dropdown a:hover, html.dark-mode .share-menu-dropdown button:hover { background: #322f28; }
html[dir="rtl"] .share-menu-dropdown a, html[dir="rtl"] .share-menu-dropdown button { text-align: right; }

/* ---------- fotograf buyutme (lightbox) ---------- */
.menu-item-photo.lightbox-trigger, .chefs-pick-photo.lightbox-trigger { cursor: zoom-in; }
.photo-lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.85);
  align-items: center; justify-content: center; padding: 24px;
}
.photo-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; object-fit: contain; }
.photo-lightbox-close {
  position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,0.15); color: #fff;
  border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 16px; cursor: pointer;
}

/* ---------- panel: foto galerisi secici (urun formu icinde) ---------- */
.photo-gallery-picker { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.photo-gallery-preview { font-size: 12px; color: #1c6b34; font-weight: 600; }

/* ---------- panel: foto galerisi modali ---------- */
.photo-gallery-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,18,14,0.65);
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.photo-gallery-modal-inner {
  background: #fff; border-radius: 16px; padding: 20px; max-width: 720px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.photo-gallery-modal-head { display: flex; justify-content: space-between; align-items: center; }
.photo-gallery-modal-head h3 { margin: 0; font-size: 17px; }
.photo-gallery-modal-close {
  background: #f4f3ef; border: none; border-radius: 50%; width: 30px; height: 30px;
  cursor: pointer; font-size: 14px; color: #444;
}
.photo-gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px;
  max-height: 60vh; overflow-y: auto;
}
.photo-gallery-thumb {
  cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  background: #f7f6f3; text-align: center; transition: border-color 0.15s;
}
.photo-gallery-thumb:hover { border-color: var(--kodio-accent, #c0392b); }
.photo-gallery-thumb img { width: 100%; height: 80px; object-fit: cover; display: block; }
.photo-gallery-thumb span { display: block; font-size: 11px; padding: 5px 4px; color: #444; line-height: 1.3; }

/* ---------- yonetici: galeri yonetimi sayfasi ---------- */
.gallery-manage-card {
  background: #f7f6f3; border-radius: 10px; padding: 8px; text-align: center;
}
.gallery-manage-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; display: block; }
.gallery-manage-card details { margin-top: 6px; }
.gallery-manage-card input[type=file] { font-size: 11px; max-width: 140px; }
.gallery-manage-label { font-size: 12px; font-weight: 700; margin-top: 6px; color: #333; }
.gallery-manage-card input[type=text] { font-size: 11px; max-width: 160px; margin-top: 4px; }
.gallery-group-heading { font-size: 16px; margin: 22px 0 10px; }
.gallery-group-heading:first-child { margin-top: 0; }

/* ---------- panel: foto galerisi modali - filtre cubugu ---------- */
.photo-gallery-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.photo-gallery-group-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-gallery-group-tab {
  background: #f4f3ef; border: 1px solid #e2e0d8; border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer; color: #444;
}
.photo-gallery-group-tab.active { background: var(--kodio-accent, #c0392b); color: #fff; border-color: transparent; }
.photo-gallery-search-input {
  flex: 1; min-width: 180px; padding: 7px 12px; border-radius: 20px; border: 1px solid #e2e0d8;
  font-size: 13px; font-family: inherit;
}

/* ---------- panel: hazir sablon secici (ayarlar sayfasi) ---------- */
.template-picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px;
}
.template-picker-card {
  cursor: pointer; border: 2px solid #eae8e2; border-radius: 12px; padding: 10px; text-align: center;
  transition: border-color 0.15s, transform 0.1s; background: #fff;
}
.template-picker-card:hover { border-color: var(--tpl-color, #c0392b); transform: translateY(-1px); }
.template-picker-swatch {
  height: 44px; border-radius: 8px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--tpl-color, #c0392b), #faf9f6 135%);
}
.template-picker-swatch-dark {
  background: linear-gradient(135deg, var(--tpl-color, #c0392b), #171613 135%);
}
.template-picker-label { font-size: 12px; font-weight: 700; color: #222; }
.template-picker-example { font-size: 11px; color: #888; margin-top: 2px; line-height: 1.3; }

/* ---------- Yonetici: iletisim mesajlari ---------- */
.nav-count { display: inline-block; min-width: 18px; padding: 1px 7px; border-radius: 999px; background: #7c3aed; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; vertical-align: middle; }
.msg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.msg-filter { display: flex; gap: 6px; }
.msg-filter a { padding: 6px 12px; border-radius: 999px; background: #f0efe9; color: #333; text-decoration: none; font-size: 13px; }
.msg-filter a.active { background: #1e1b4b; color: #fff; }
.msg-card.msg-unread { box-shadow: inset 0 0 0 2px #c4b5fd; }
.msg-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg-name { font-size: 16px; }
.msg-actions { display: flex; gap: 6px; align-items: flex-start; }
.msg-actions form { margin: 0; }
.msg-contact { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 14px; }
.msg-contact a { color: #6d28d9; text-decoration: none; font-weight: 600; }
.msg-body { white-space: pre-wrap; margin: 10px 0 0; padding: 12px 14px; background: #faf9f6; border-radius: 10px; font-size: 14px; line-height: 1.55; }

/* ---------- Yonetici: Web Sitesi yonetimi ---------- */
.site-admin { max-width: 1180px; }
.site-tabs { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.site-tabs nav { display: flex; gap: 6px; flex-wrap: wrap; background: #fff; padding: 6px; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.site-tabs nav a { padding: 9px 14px; border-radius: 10px; text-decoration: none; color: #444; font-weight: 600; font-size: 14px; white-space: nowrap; }
.site-tabs nav a:hover { background: #f4f2ee; }
.site-tabs nav a.active { background: #1e1b4b; color: #fff; }
.site-intro p { margin: 0 0 6px; }
.site-intro code, .site-list-head code { background: #f0edff; color: #5b21b6; padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.site-content-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.site-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); max-height: calc(100vh - 32px); overflow: auto; }
.site-toc a { padding: 7px 10px; border-radius: 8px; color: #444; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.site-toc a:hover { background: #f4f2ee; color: #1e1b4b; }
.site-sections { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.site-sections .panel { margin: 0; }
.site-sec > summary { cursor: pointer; list-style: none; display: block; font-weight: 700; font-size: 16px; padding-left: 22px; position: relative; }
.site-sec > summary::-webkit-details-marker { display: none; }
.site-sec > summary::before { content: "▸"; position: absolute; left: 0; top: 0; transition: transform .2s; color: #7c3aed; }
.site-sec[open] > summary::before { transform: rotate(90deg); }
.site-sec > summary small { display: block; margin-top: 2px; font-weight: 500; color: #777; font-size: 13px; }
.site-sec[open] > summary { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.site-form .field { margin-bottom: 14px; }
.site-admin .field textarea, .site-admin .field select { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 9px; border: 1px solid #d8d6d1; font-size: 14px; font-family: inherit; line-height: 1.55; background: #fff; resize: vertical; }
.site-admin .field input[type=text] { width: 100%; box-sizing: border-box; }
.site-admin .field textarea:focus, .site-admin .field input:focus, .site-admin .field select:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.site-form .hint { margin: 4px 0 0; }
.site-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; font-size: 14.5px; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #d6d3cc; flex: none; transition: background .2s; }
.switch::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,.25); transition: transform .2s; }
.switch-row input:checked + .switch { background: #7c3aed; }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 3px solid #c4b5fd; outline-offset: 2px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.site-grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; align-items: end; }
.site-grid-form .field-wide { grid-column: 1 / -1; }
.site-grid-form .field { margin-bottom: 10px; }
.site-list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.site-list-head h3 { margin: 4px 0; }
.site-list-head p { margin: 0; max-width: 680px; }
.empty-note { padding: 18px; text-align: center; background: #faf9f6; border-radius: 12px; }
.site-items { display: flex; flex-direction: column; gap: 10px; }
.site-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: #faf9f6; border: 1px solid #eee; }
.site-item:not(:has(.si-thumb)) { grid-template-columns: 1fr auto; }
.site-item.is-off { opacity: .6; }
.si-thumb { width: 56px; height: 56px; border-radius: 12px; background: #ede9fe; display: grid; place-items: center; overflow: hidden; color: #5b21b6; font-weight: 800; }
.si-thumb img { width: 100%; height: 100%; object-fit: cover; }
.si-logo { background: #fff; border: 1px solid #eee; width: 96px; }
.si-logo img { object-fit: contain; padding: 6px; box-sizing: border-box; }
.si-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.si-main a { overflow-wrap: anywhere; }
.si-quote { margin: 4px 0; font-size: 14px; color: #555; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.si-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #ecebe6; color: #555; }
.tag-ok { background: #e3f6e8; color: #1c6b34; }
.tag-off { background: #fbe8e6; color: #a1291b; }
.si-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.si-actions form { margin: 0; }
.icon-btn { min-width: 34px; }
.si-edit { grid-column: 1 / -1; }
.si-edit > summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: #6d28d9; }
.si-edit[open] > summary { margin-bottom: 12px; }
.slug-input { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 10px; background: #fff; overflow: hidden; }
.slug-input span { padding: 0 4px 0 12px; color: #888; font-size: 13px; white-space: nowrap; }
.slug-input input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; min-width: 0; }
.page-flags { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 6px 0 16px; }
/* Zengin metin editoru */
.rte { border: 1px solid #ddd; border-radius: 12px; background: #fff; overflow: hidden; }
.rte.uploading { opacity: .6; pointer-events: none; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #f7f6f2; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 2; }
.rte-bar button { border: 1px solid #e3e1da; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; font-family: inherit; }
.rte-bar button:hover { background: #ede9fe; border-color: #c4b5fd; }
.rte-bar button.on { background: #1e1b4b; color: #fff; }
.rte-sep { width: 1px; background: #e3e1da; margin: 2px 4px; }
.rte-area { min-height: 160px; padding: 14px 16px; outline: none; font-size: 15px; line-height: 1.65; }
.rte-big .rte-area { min-height: 380px; }
.site-admin .rte .rte-src { border: 0 !important; border-radius: 0 !important; font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: 13px !important; min-height: 200px; }
.prose-admin h2 { font-size: 22px; margin: 18px 0 8px; }
.prose-admin h3 { font-size: 18px; margin: 16px 0 6px; }
.prose-admin p { margin: 0 0 10px; }
.prose-admin img { max-width: 100%; height: auto; border-radius: 10px; }
.prose-admin blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid #c4b5fd; background: #f7f5ff; }
.prose-admin a { color: #6d28d9; }
@media (max-width: 860px) {
  .site-content-layout { grid-template-columns: 1fr; }
  .site-toc { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .site-grid-form { grid-template-columns: 1fr; }
  .site-item { grid-template-columns: auto 1fr; }
  .site-item:not(:has(.si-thumb)) { grid-template-columns: 1fr; }
  .si-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
