@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #efe7da;
  --surface: #ffffff;
  --surface-2: #f7f3ec;
  --border: #e2dacb;
  --text: #14161a;
  --text-2: #52555c;
  --text-muted: #8a8d94;
  --accent: #14161a;
  --danger: #dc2626;
  --profit-solid: #22c55e;
  --profit-soft-bg: #dcfce7;
  --profit-soft-text: #15803d;
  --kcal-text: #c2410c;
  --shadow-sm: 0 1px 2px rgba(15,15,20,0.06);
  --shadow-md: 0 4px 16px rgba(15,15,20,0.08);
  --shadow-lg: 0 12px 32px rgba(15,15,20,0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Auth / marketing pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}
/* Musteri giris ekranlari: tanitim sitesinin kapagiyla ayni arka plan
   (lacivert gecis + masa fotografi), boylece siteden girise gecis butunlesik. */
.auth-shell.watermark { background: #0b1530; }
.auth-shell.watermark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(11,21,48,0.94) 0%, rgba(20,33,61,0.82) 50%, rgba(20,33,61,0.55) 100%),
    url('/static/images/site-hero.webp') center / cover no-repeat;
  z-index: 0;
}
.auth-shell.watermark .auth-card { box-shadow: 0 30px 80px rgba(0,0,0,0.45); border-color: transparent; }
/* Beyaz kart uzerinde giris kutulari net secilsin: daha koyu cerceve, hafif gri ic zemin. */
.auth-shell.watermark .field input {
  border: 1.5px solid #c3c8d2; background: #f8f9fb; border-radius: 0.65rem; padding: 0.7rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.auth-shell.watermark .field input:hover { border-color: #9aa1ae; }
.auth-shell.watermark .field input:focus {
  outline: none; background: #fff; border-color: #7b2ff7; box-shadow: 0 0 0 4px rgba(123,47,247,0.16);
}
.auth-back {
  position: absolute; top: 1.2rem; left: 1.4rem; z-index: 1;
  color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.auth-back:hover { color: #fff; }
.auth-shell .auth-card { position: relative; z-index: 1; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px -12px rgba(15,15,20,0.25), 0 2px 8px rgba(15,15,20,0.06);
  padding: 2.25rem 2rem 2rem;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d6249f, #7b2ff7, #2fd9c5);
}
.auth-logo {
  display: block;
  /* Pi19 logosu yatay (yaziyla birlikte): kirpilmadan, oranini koruyarak */
  width: 170px;
  height: auto;
  margin: 0.25rem auto 1.1rem;
  object-fit: contain;
}
.auth-brand { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.3rem; text-align: center; }
.auth-sub { color: var(--text-2); font-size: 0.88rem; margin: 0 0 1.75rem; text-align: center; }
.auth-card .field input {
  border-radius: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-color: #e2e3e8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card .field input:focus {
  outline: none;
  border-color: #7b2ff7;
  box-shadow: 0 0 0 3px rgba(123,47,247,0.14);
}
.auth-card .btn-primary {
  background: linear-gradient(90deg, #d6249f, #7b2ff7, #2fd9c5);
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 24px -6px rgba(123,47,247,0.4);
  padding: 0.75rem 1.1rem;
}
.auth-card .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 28px -6px rgba(123,47,247,0.5); }
/* Tum giris kartlari: Pi19 logosunun laciverti */
.auth-card::before { background: linear-gradient(90deg, #0b2a6b, #1d4ed8, #0b2a6b); }
.auth-card .btn-primary {
  background: linear-gradient(135deg, #0b2a6b, #1d4ed8);
  box-shadow: 0 10px 24px -6px rgba(11,42,107,0.45);
}
.auth-card--dark .btn-primary { background: linear-gradient(135deg, #1d4ed8, #3b82f6); box-shadow: 0 10px 24px -6px rgba(29,78,216,0.5); }
.auth-card--dark::before { background: linear-gradient(90deg, #1d4ed8, #3b82f6, #1d4ed8); }
.auth-card .btn-primary:hover { filter: brightness(1.12); box-shadow: 0 12px 28px -6px rgba(11,42,107,0.55); }
.auth-card .auth-foot a { color: #7b2ff7; text-decoration: none; font-weight: 600; }
.auth-card .auth-foot a:hover { text-decoration: underline; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.35rem; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
.color-swatch {
  width: 2.2rem; height: 2.2rem; border-radius: 0.5rem;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.field input[type="color"] {
  padding: 0.3rem;
  height: 2.5rem;
  cursor: pointer;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }
.translate-row { display: flex; align-items: center; gap: 0.6rem; margin-top: -0.4rem; }
.translate-status { font-size: 0.78rem; color: var(--text-muted); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--text); color: var(--surface); width: 100%; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
.auth-error { background: #fee2e2; color: #991b1b; border-radius: 0.5rem; padding: 0.6rem 0.8rem; font-size: 0.82rem; margin-bottom: 1rem; }
.impersonation-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1rem;
  padding: 0.55rem 1rem; background: #F97316; color: #fff; font-size: 0.85rem;
}
.impersonation-bar a { color: #fff; font-weight: 800; background: rgba(0,0,0,0.18); padding: 0.3rem 0.8rem; border-radius: 999px; text-decoration: none; }
.impersonation-bar a:hover { background: rgba(0,0,0,0.3); }
.auth-notice { background: var(--profit-soft-bg); color: var(--profit-soft-text); border-radius: 0.5rem; padding: 0.6rem 0.8rem; font-size: 0.82rem; margin-bottom: 1rem; }
.auth-foot { text-align: center; margin-top: 1.1rem; font-size: 0.85rem; color: var(--text-2); }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,12,10,0.35) 0%, rgba(10,12,10,0.45) 45%, rgba(8,10,8,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
  color: #ffffff;
}
.hero-content h1 {
  font-size: 2.35rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  text-wrap: balance;
}
.hero-content p {
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.8rem;
  line-height: 1.55;
  font-size: 1.05rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.home-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: #ffffff;
  color: #14161a;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.btn-hero-primary:hover { filter: brightness(0.96); }
.btn-hero-secondary {
  background: rgba(10,12,10,0.55);
  border: 1.5px solid rgba(255,255,255,0.75);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  backdrop-filter: blur(2px);
}
.btn-hero-secondary:hover { background: rgba(10,12,10,0.72); }
@media (max-width: 520px) {
  .hero-content h1 { font-size: 1.7rem; }
  .home-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Admin dashboard ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 15.5rem;
  flex-shrink: 0;
  background: #14161d;
  color: #d1d5db;
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  /* Yan barin kendisi kaymaz: logo hep ustte kalsin diye sadece liste kayar. */
  overflow: hidden;
}
/* yan-bar-logo */
.admin-brand { color: #fff; font-weight: 800; font-size: 1.1rem; padding: 0 0.5rem 1.2rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.55rem; }
.admin-brand-logo { width: 7.19rem; height: 7.19rem; border-radius: 0.6rem; object-fit: cover; background: rgba(255,255,255,0.9); }
.admin-brand-name { line-height: 1.25; }
/* Ayarlar grubu acilinca liste uzuyor: kaydirma yalnizca bu listede olur,
   ustteki logo ve isletme adi yerinde kalir. */
.admin-nav {
  display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-height: 0;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.admin-nav::-webkit-scrollbar { width: 6px; }
.admin-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 999px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.6rem;
  border-radius: 0.55rem;
  text-decoration: none;
  color: #d1d5db;
  font-size: 0.88rem;
  font-weight: 500;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); }
.admin-nav a.exit { color: #f87171; margin-top: auto; }
/* sekme-aktif: sol bardaki hangi bolumun acik oldugunu gosterir (bkz. public/js/admin.js) */
.admin-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
/* Ayarlar acilir grubu */
.ayar-grup { display: flex; flex-direction: column; }
.ayar-ok { margin-left: auto; font-size: 0.75rem; opacity: 0.7; transition: transform 0.2s; }
.ayar-grup.acik .ayar-ok { transform: rotate(180deg); }
.ayar-linkler { display: none; flex-direction: column; gap: 1px; margin: 0.15rem 0 0.3rem 1.1rem; padding-left: 0.6rem; border-left: 1px solid rgba(255,255,255,0.12); }
.ayar-grup.acik .ayar-linkler { display: flex; }
.admin-nav a.ayar-link { padding: 0.38rem 0.6rem; font-size: 0.84rem; opacity: 0.8; }
.admin-nav a.ayar-link:hover { opacity: 1; }
.admin-nav a.ayar-link.active { opacity: 1; background: rgba(217,119,6,0.22); color: #fff; }
.nav-icon {
  width: 1.9rem; height: 1.9rem; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem; font-weight: 800; flex-shrink: 0;
}
.nav-badge {
  margin-left: auto; background: #ef4444; color: #fff; font-size: 0.72rem; font-weight: 800;
  min-width: 1.3rem; height: 1.3rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  padding: 0 0.3rem;
}
.nav-badge[hidden] { display: none; }

/* Patron panelindeki Pi19 logosu: logo genis oranli ve beyaz zeminli,
   bu yuzden beyaz bir karta oturur ve contain ile kirpilmadan sigar. */
.yanbar-logo {
  width: 100%; max-width: 11rem; height: auto; display: block;
  background: #fff; border-radius: 0.6rem; padding: 0.5rem 0.6rem;
  object-fit: contain;
}
.admin-shell.yanbar-kapali .yanbar-logo { max-width: 3.2rem; padding: 0.25rem; border-radius: 0.45rem; }

/* ---- Yan bari daraltma ----
   Kapaliyken bar tamamen kaybolmaz, simge seridine doner: bolumler yine
   tek tikla acilir. Secim localStorage'da durur. */
/* Simge boyutunda ama gorulebilir: sagda durur, uzerine gelince
   markanin turuncusuna doner. */
.yanbar-dugme {
  width: 1.9rem; height: 1.9rem; padding: 0;
  margin: 0 0 0.9rem auto;              /* sag kenara yaslanir */
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04); color: #9aa3b2;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.yanbar-dugme:hover { background: #f97316; border-color: #f97316; color: #fff; }
.yanbar-dugme:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }
.yanbar-ok { display: block; transition: transform 0.18s; }

.admin-shell.yanbar-kapali .admin-sidebar { width: 4.4rem; padding-left: 0.6rem; padding-right: 0.6rem; }
/* Daralinca yazilar gider, simgeler ortalanir */
.admin-shell.yanbar-kapali .admin-brand-name,
.admin-shell.yanbar-kapali .admin-nav a span:not(.nav-icon):not(.nav-badge),
.admin-shell.yanbar-kapali .yanbar-yazi,
.admin-shell.yanbar-kapali .ayar-linkler { display: none; }
.admin-shell.yanbar-kapali .admin-brand { padding-bottom: 0.8rem; }
.admin-shell.yanbar-kapali .admin-brand-logo { width: 2.6rem; height: 2.6rem; }
.admin-shell.yanbar-kapali .admin-nav a { justify-content: center; padding: 0.5rem 0.2rem; }
.admin-shell.yanbar-kapali .yanbar-ok { transform: rotate(180deg); }
/* Daralinca dugme de ortalanir */
.admin-shell.yanbar-kapali .yanbar-dugme { margin-left: auto; margin-right: auto; }
/* Daralinca rozet simgenin kosesine biner */
.admin-shell.yanbar-kapali .nav-badge {
  position: absolute; top: 0.1rem; right: 0.1rem; margin: 0;
  min-width: 1rem; height: 1rem; padding: 0 0.2rem; font-size: 0.62rem;
}
.admin-shell.yanbar-kapali .admin-nav a { position: relative; }
@media (max-width: 780px) {
  /* Telefonda bar zaten yatay serit; daraltmanin anlami yok */
  .yanbar-dugme { display: none; }
  .admin-shell.yanbar-kapali .admin-sidebar { width: 100%; }
  .admin-shell.yanbar-kapali .admin-nav a span:not(.nav-icon):not(.nav-badge) { display: inline; }
}

.admin-main { flex: 1; min-width: 0; padding: 2rem 2.25rem 4rem; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.admin-header .muted { color: var(--text-2); font-size: 0.85rem; }
/* Sag ustte hangi yoneticiyle giris yapildigi gorunur. */
.oturum-bilgi { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
.oturum-etiket { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.oturum-mail { font-size: 0.88rem; font-weight: 700; color: var(--text); }
@media (max-width: 720px) { .oturum-bilgi { align-items: flex-start; } }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.75rem; border-radius: 999px;
}
.status-open { background: var(--profit-soft-bg); color: var(--profit-soft-text); }
.status-closed { background: #fee2e2; color: #991b1b; }

/* Siparis modulu rozetleri: abonelik durumundan bilerek farkli renkte â€”
   modulun kapali olmasi bir ariza degil, sadece acilmamis bir ozellik. */

/* Sifre alani: goster/gizle ve kopyala dugmeleri input'un icine oturur. */
.sifre-alani { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.sifre-alani input { flex: 1; min-width: 0; padding-right: 4rem; }
.sifre-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 0.25rem; cursor: pointer;
  color: var(--text-muted); display: inline-flex; align-items: center;
  border-radius: 0.35rem; line-height: 0;
}
.sifre-btn:hover { color: var(--text); background: var(--surface-2); }
.sifre-btn svg { width: 1.05rem; height: 1.05rem; }
.sifre-btn.kopyalandi { color: var(--profit-solid); }
.js-sifre-goster { right: 2rem; }
.js-sifre-kopyala { right: 0.35rem; }
/* Satir menusundeki input kurali daha ozgul, sag bosluk orada ayrica verilmeli â€”
   yoksa dugmeler yazilan sifrenin uzerine biner. */
.row-menu-item form .sifre-alani input { padding-right: 4rem; }

/* Giris ekranlari: tek dugme (sadece goz) oldugu icin sag bosluk daha dar. */
.sifre-alani--tek input { padding-right: 2.6rem; }
.sifre-alani--tek .sifre-btn { right: 0.4rem; }

.beni-hatirla {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-2);
  margin: -0.25rem 0 1rem; cursor: pointer; user-select: none;
}
.beni-hatirla input { width: auto; margin: 0; cursor: pointer; }
.auth-card--dark .beni-hatirla { color: #aab4be; }
/* Yonetici girisi: E-posta / Telefon sekmeleri (salt CSS, bkz. views/owner/login.ejs) */
.giris-yontem-form > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.giris-sekmeler { display: flex; gap: 0.3rem; padding: 0.25rem; margin-bottom: 1rem; border-radius: 0.7rem; background: rgba(127,127,127,0.14); }
.auth-card--dark .giris-sekmeler label { color: #fff; }
.giris-sekmeler label { flex: 1; text-align: center; padding: 0.5rem 0.4rem; border-radius: 0.5rem; font-size: 0.88rem; font-weight: 600; cursor: pointer; opacity: 0.65; transition: background 0.15s, opacity 0.15s; }
#yontem-email:checked ~ .giris-sekmeler label[for="yontem-email"],
#yontem-tel:checked ~ .giris-sekmeler label[for="yontem-tel"] { opacity: 1; background: rgba(127,127,127,0.28); }
#yontem-email:focus-visible ~ .giris-sekmeler label[for="yontem-email"],
#yontem-tel:focus-visible ~ .giris-sekmeler label[for="yontem-tel"] { outline: 2px solid currentColor; }
#yontem-email:checked ~ .giris-alan-tel,
#yontem-tel:checked ~ .giris-alan-email { display: none; }
.auth-card--dark .sifre-btn { color: #6b7280; }
.auth-card--dark .sifre-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
/* "Açık" rozeti "Aktif" ile ayni yesil: ikisi de "calisiyor" demek,
   farkli renk olmasi iki ayri anlam varmis gibi duruyordu. */
.status-siparis-acik { background: var(--profit-soft-bg); color: var(--profit-soft-text); }
.status-siparis-kapali { background: var(--surface-2); color: var(--text-muted); }

/* Yeni hesap acildiktan sonra bilgileri bir kez gosteren kutu */
.yeni-hesap {
  margin-top: 1.2rem; padding: 1rem 1.1rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 4px solid #1e40af; border-radius: 0.6rem;
}
.yeni-hesap-baslik { margin-bottom: 0.75rem; font-size: 0.95rem; }
.yeni-hesap-baslik span {
  display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.5rem;
  border-radius: 999px; font-size: 0.72rem; vertical-align: middle;
}
.yeni-hesap-tablo { width: 100%; border-collapse: collapse; margin-bottom: 0.6rem; }
.yeni-hesap-tablo td { padding: 0.28rem 0; font-size: 0.85rem; vertical-align: top; }
.yeni-hesap-tablo td:first-child { width: 8.5rem; color: var(--text-2); }
.yeni-hesap-tablo code {
  background: var(--surface); padding: 0.12rem 0.4rem;
  border-radius: 0.3rem; font-size: 0.85rem; word-break: break-all;
}
.yeni-hesap .muted { color: var(--text-2); font-size: 0.78rem; line-height: 1.5; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.panel h2 { margin: 0 0 1.1rem; font-size: 1.15rem; font-weight: 700; }
/* Sekme mimarisi: aktif olmayan ust-duzey bolum ve alt-sekme JS ile [hidden] alir.
   !important, .panel/.settings-subpanel uzerindeki baska bir display kuralinin
   onune gecmeyi garantiler (bkz. public/js/admin.js). */
.panel[hidden], .settings-subpanel[hidden] { display: none !important; }

/* Ayarlar bolumunun ikinci seviye sekmeleri */
.settings-subnav {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin: 0 0 1.4rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.settings-subnav button {
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.settings-subnav button:hover { background: var(--surface-2); color: var(--text); }
.settings-subnav button.active { background: var(--text); color: var(--surface); border-color: var(--text); }

.cat-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem; margin-top: 0.6rem;
}
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.9rem;
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  cursor: grab;
}
.cat-card.dragging { opacity: 0.4; cursor: grabbing; }
.cat-card-color { width: 100%; height: 2.19rem; flex-shrink: 0; }
.cat-card-body { padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.cat-card-body h3 { margin: 0; font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.cat-card-actions { margin-top: auto; display: flex; gap: 0.5rem; align-items: center; }

.product-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem; margin-top: 0.6rem;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.9rem;
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.product-card-media { width: 100%; height: 9rem; background: var(--surface-2); flex-shrink: 0; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-media-empty {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.78rem;
}
.product-card-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-card-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.product-card-title-row h3 { margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.product-card-price { font-weight: 800; font-size: 0.9rem; white-space: nowrap; }
.product-card-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.35rem; flex-wrap: wrap; }
.product-card-actions { margin-top: auto; padding-top: 0.5rem; display: flex; gap: 0.5rem; align-items: flex-start; }
.product-card-actions > details { flex: 1; min-width: 0; }
.product-card-actions > details > summary { width: 100%; justify-content: center; }
.product-card .form-grid { grid-template-columns: 1fr; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th { text-align: left; color: var(--text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table img.thumb { width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: 0.4rem; display: block; }
.row-actions { display: flex; gap: 0.4rem; }

.row-menu { display: inline-block; position: relative; }
.row-menu-summary { list-style: none; cursor: pointer; }
.row-menu-summary::-webkit-details-marker { display: none; }
.row-menu-panel {
  position: absolute; right: 0; top: 100%; margin-top: 0.4rem; z-index: 10;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.6rem;
  box-shadow: var(--shadow-md); padding: 0.4rem; min-width: 13rem;
  display: flex; flex-direction: column; gap: 0.1rem;
}
.row-menu-item summary {
  list-style: none; cursor: pointer;
  padding: 0.5rem 0.6rem; border-radius: 0.4rem;
  font-size: 0.84rem; font-weight: 500; color: var(--text);
}
.row-menu-item summary::-webkit-details-marker { display: none; }
.row-menu-item summary:hover { background: var(--surface-2); }
.row-menu-item[open] summary { background: var(--surface-2); }
.row-menu-item form {
  display: flex; gap: 0.4rem; align-items: center;
  padding: 0.3rem 0.6rem 0.5rem;
}
.row-menu-item form input {
  flex: 1; min-width: 0; padding: 0.4rem 0.6rem;
  border-radius: 0.5rem; border: 1px solid var(--border); font-size: 0.84rem;
}
.row-menu-plain {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text); font-weight: 500; font-size: 0.84rem;
  padding: 0.5rem 0.6rem; border-radius: 0.4rem; cursor: pointer;
}
.row-menu-plain:hover { background: var(--surface-2); }
.row-menu-divider { height: 1px; background: var(--border); margin: 0.3rem 0.2rem; }
.row-menu-danger {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--danger); font-weight: 600; font-size: 0.84rem;
  padding: 0.5rem 0.6rem; border-radius: 0.4rem; cursor: pointer;
}
.row-menu-danger:hover { background: #fee2e2; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.image-picker { display: flex; align-items: center; gap: 0.8rem; }
.image-picker .preview {
  width: 4rem; height: 4rem; border-radius: 0.5rem; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border);
}
.image-picker .hero-thumb { width: 12rem; height: 4.5rem; object-fit: cover; }
.hero-editor-frame {
  position: relative;
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 6 / 1;
  overflow: hidden;
  border-radius: 0.6rem;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: grab;
  background: var(--surface-2);
}
.hero-editor-frame.dragging { cursor: grabbing; }
.hero-editor-frame .hero-inner { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
.hero-editor-frame img {
  position: absolute;
  top: 0; left: 0;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.checkbox-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 10rem; overflow-y: auto; border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.6rem; }
.checkbox-list label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; font-weight: 500; }

.qr-url { font-size: 0.84rem; font-weight: 600; word-break: break-all; }

/* Uc sutun: sade QR (cerceveli kutu) + afis onizlemesi + afis rengi paleti.
   align-items:stretch ile ucu de ayni yukseklige gerilir, sade QR'in cercevesi
   afisle ayni boyda bir kutu olur (gorsel olarak dengeli durur). */
/* 1fr - auto - 1fr: sade QR ortadaki sutunda durur, boylece ustteki tam genislikteki
   aciklama yazisinin tam ortasina hizalanir; afis+palet grubu sag sutuna gider. */
.qr-previews { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2.5rem; margin-top: 1.1rem; }
.qr-preview-card { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.qr-preview-card img {
  border: 1px solid var(--border); border-radius: 0.7rem; box-shadow: var(--shadow-md);
  background: #fff;
}
/* Sade QR: gorunur bir cerceve kutusu icinde, afisle ayni yukseklikte, QR ortalanmis kucuk durur. */
.qr-preview-card--simple { grid-column: 2; min-width: 12rem; margin-left: -500px; }
.qr-poster-group { grid-column: 3; display: flex; align-items: stretch; gap: 2.5rem; flex-wrap: wrap; }
.qr-simple-frame {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  height: 100%; min-height: 14rem; padding: 1.5rem;
  border: 1px solid var(--border); border-radius: 0.7rem; background: #fff;
}
.qr-simple-frame img { width: 8rem; height: 8rem; border: none; box-shadow: none; padding: 0; }
/* Afis dikey oranli (1080x1580) â€” ekran yuksekligine gore olceklenir, yoksa sayfa boyu asilir. */
.qr-preview-card--poster { }
.qr-preview-card--poster img { max-width: 100%; width: auto; max-height: 38vh; height: auto; }
@media (max-height: 720px) {
  .qr-preview-card--poster img { max-height: 30vh; }
}

/* Afis rengi: ucuncu sutun, kucuk swatch izgarasi. */
.poster-palette { display: flex; flex-direction: column; gap: 0.7rem; padding-top: 0.2rem; }
.poster-palette-label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.poster-palette-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 0.5rem; }
.poster-palette-grid form { display: contents; }
.poster-swatch {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.poster-swatch:hover { transform: scale(1.12); }
.poster-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* Patron raporlari: ust ozet + gun/urun/garson/masa kirilimlarinin izgarasi. */
.report-summary { display: flex; gap: 1.5rem; margin: 1.1rem 0; }
.report-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; padding: 0.9rem 1.3rem; background: var(--surface-2); border-radius: 0.7rem; border: 1px solid var(--border); }
.report-stat-label { font-size: 0.78rem; color: var(--text-2); }
.report-stat-value { font-size: 1.4rem; font-weight: 700; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.3rem; margin-top: 0.5rem; }
.report-block {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 0.8rem; padding: 1rem 1.1rem;
}
.report-block h3 { font-size: 0.92rem; margin: 0 0 0.6rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.report-table th, .report-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); }
.report-table th { color: var(--text-2); font-weight: 600; }
.report-table td:last-child, .report-table th:last-child { text-align: right; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.theme-card { margin: 0; }
.theme-swatch-btn {
  all: unset; display: flex; flex-direction: column; gap: 0.6rem; width: 100%; box-sizing: border-box;
  cursor: pointer; padding: 0.8rem; border-radius: 0.9rem; border: 2px solid var(--border); transition: border-color 0.15s ease;
}
.theme-card.selected .theme-swatch-btn { border-color: var(--text); }
.theme-swatch-btn:hover { border-color: var(--text-2); }
.theme-swatch {
  height: 5rem; border-radius: 0.6rem; display: flex; overflow: hidden; border: 1px solid var(--border);
}
.theme-swatch-sidebar { width: 28%; height: 100%; }
.theme-swatch-card { flex: 1; margin: 0.7rem 0.7rem 0.7rem 0; border-radius: 0.4rem; display: flex; align-items: flex-end; padding: 0.4rem; }
.theme-swatch-accent { width: 1.6rem; height: 0.35rem; border-radius: 999px; }
.theme-name { font-size: 0.88rem; font-weight: 700; }
.theme-desc { font-size: 0.76rem; color: var(--text-2); line-height: 1.35; }
.auth-copyright { text-align: center; margin-top: 1.3rem; font-size: 0.72rem; color: var(--text-muted); }
.auth-tagline { text-align: center; font-size: 0.85rem; font-weight: 700; letter-spacing: 1.5px; color: #ea7a0c; text-transform: uppercase; margin: 0 0 0.6rem; }
/* Yonetici girisi "kontrol odasi": koyu zemin, silik nokta izgarasi, logo renklerinden
   isik huzmeleri. Musteri ekranindaki sicak fotografli zeminden ilk bakista ayrisir. */
.auth-shell.control-room { background: linear-gradient(140deg, #1d2450 0%, #26215a 50%, #173a4f 100%); }
.auth-shell.control-room::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(236,72,153,0.55), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(139,92,246,0.55), transparent 48%),
    radial-gradient(circle at 55% 95%, rgba(20,184,166,0.45), transparent 50%);
  filter: blur(12px);
}
.auth-shell.control-room::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.control-room .auth-card--dark {
  background: rgba(30,34,56,0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,0.16); box-shadow: 0 30px 80px rgba(10,10,40,0.45);
}
.admin-rozet {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  background: rgba(124,58,237,0.16); border: 1px solid rgba(167,139,250,0.35);
  color: #c4b5fd; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
}
.admin-rozet svg { width: 0.85rem; height: 0.85rem; }
.control-room .auth-card--dark { text-align: center; }
.control-room .auth-card--dark form { text-align: left; }
.auth-card--dark { background: #14161a; border-color: rgba(255,255,255,0.08); }
.auth-card--dark .auth-brand { color: #fff; }
.auth-card--dark .auth-sub { color: #aab4be; }
.auth-card--dark .field label { color: #aab4be; }
.auth-card--dark .field input {
  background: #1d2027;
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.auth-card--dark .field input::placeholder { color: #6b7280; }
.auth-card--dark .field input:focus { border-color: #7b2ff7; box-shadow: 0 0 0 3px rgba(123,47,247,0.25); }
.auth-card--dark .auth-foot { color: #aab4be; }
.auth-card--dark .auth-foot a { color: #a78bfa; }

.edit-modal {
  border: none;
  border-radius: 1rem;
  padding: 1.4rem 1.5rem 1.6rem;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--text);
}
.edit-modal::backdrop { background: rgba(15,15,20,0.55); }
.edit-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.edit-modal-head h3 { margin: 0; font-size: 1.05rem; }
.edit-modal-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
}
.edit-modal-close:hover { color: var(--text); }

.product-group { margin-top: 1.4rem; }
.product-group:first-of-type { margin-top: 0.6rem; }
.product-group-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.7rem; font-size: 0.95rem; font-weight: 700; padding-bottom: 0.45rem; border-bottom: 2px solid transparent; border-image: linear-gradient(to right, var(--cat-from, var(--border)), var(--cat-to, var(--border)) 55%, transparent) 1; }
/* Kategori rengi: baslikta nokta, kartta sol serit â€” hangi urunun nereye ait oldugu bir bakista anlasilir. */
.group-dot { width: 0.7rem; height: 0.7rem; border-radius: 999px; flex: 0 0 auto; background: linear-gradient(135deg, var(--cat-from, #64748b), var(--cat-to, #475569)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-from, #64748b) 22%, transparent); }
.product-group .product-card { border-left: 4px solid var(--cat-from, transparent); }
.product-group-count { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); background: var(--surface-2); border-radius: 999px; padding: 0.1rem 0.5rem; }

.bundle-profit { color: var(--profit-soft-text, #059669); font-weight: 700; }
.bundle-items { margin: 0.45rem 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--text-muted); }

.checkbox-list label { justify-content: flex-start; text-align: left; }
.checkbox-list input[type="checkbox"] { width: auto; min-width: 0; flex: 0 0 auto; margin: 0; padding: 0; height: auto; }

.cb-thumb { width: 2rem; height: 2rem; border-radius: 0.35rem; object-fit: cover; flex: 0 0 auto; display: block; }
.cb-thumb-empty { background: var(--surface-2); border: 1px dashed var(--border); }
.checkbox-list label { gap: 0.55rem; padding: 0.15rem 0; }

.bundle-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.bundle-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.55rem 0.2rem 0.2rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.76rem; font-weight: 600; color: var(--text-2); }
.bundle-chip img, .bundle-chip-empty { width: 1.5rem; height: 1.5rem; border-radius: 999px; object-fit: cover; flex: 0 0 auto; display: block; }

.price-date-admin { margin-top: 0.3rem; font-size: 0.7rem; color: var(--text-muted); }
.price-date-admin:empty { display: none; }

.cat-card-menu { border-style: dashed; }
.cat-card-note { margin: 0.25rem 0 0; font-size: 0.7rem; line-height: 1.35; color: var(--text-muted); }

.admin-subtitle { margin-top: 0.1rem; font-size: 0.86rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.01em; }

.admin-title-row { display: flex; align-items: center; gap: 0.9rem; }
.admin-logo { width: 6rem; height: 6rem; border-radius: 0.7rem; object-fit: cover; flex: 0 0 auto; box-shadow: var(--shadow-sm); background: var(--surface-2); }

/* ---------- Panel: telefon duzeni ---------- */
.admin-shell-mobile {}
@media (max-width: 780px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-brand { padding: 0 0.6rem 0 0.2rem; font-size: 0.95rem; white-space: nowrap; flex-direction: row; align-items: center; gap: 0.45rem; }
  .admin-brand-logo { width: 1.9rem; height: 1.9rem; border-radius: 0.4rem; }
  /* Telefonda yan bar yatay serit: kaydirma yine seridin kendisinde olur */
  .admin-nav { flex-direction: row; gap: 0.35rem; flex: 0 0 auto; overflow: visible; min-height: 0; }
  .admin-nav a { padding: 0.45rem 0.65rem; white-space: nowrap; font-size: 0.85rem; }
  .admin-nav a.exit { margin-top: 0; margin-left: 0.35rem; }
  .ayar-grup { flex-direction: row; }
  .ayar-linkler { flex-direction: row !important; margin: 0 0 0 0.35rem; padding-left: 0.35rem; }
  .admin-main { padding: 1rem 0.9rem 2.5rem; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .admin-logo { width: 4.4rem; height: 4.4rem; }
  .admin-header h1 { font-size: 1.35rem; }
  .qr-previews { grid-template-columns: 1fr; justify-items: center; }
  .qr-preview-card--simple, .qr-poster-group { grid-column: 1; }
  .qr-preview-card--poster img { max-height: 34vh; }
  .product-cards { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.7rem; }
  .cat-cards { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.7rem; }
  .edit-modal { max-width: 100%; max-height: 92vh; border-radius: 0.9rem; padding: 1.1rem; }
  .hero-editor-frame { max-width: 100%; }
}

.hero-editor-labels { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.3rem; }
.hero-editor-frame-mobile { max-width: 15rem; aspect-ratio: 4.8 / 1; cursor: default; }

/* ---------- Mutfak ekrani ---------- */
.kitchen-body { margin: 0; background: #0f1115; color: #e8eaed; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.kitchen-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.1rem; background: #171a21; border-bottom: 1px solid #262b35;
}
.kitchen-title { font-size: 1.05rem; font-weight: 800; }
.kitchen-sub { font-size: 0.75rem; color: #8b93a3; margin-top: 0.2rem; }
.kitchen-actions { display: flex; align-items: center; gap: 0.5rem; }
.kitchen-sound, .kitchen-back {
  border: 1px solid #2f3644; background: #1e222b; color: #e8eaed;
  font-size: 0.8rem; font-weight: 600; padding: 0.5rem 0.8rem; border-radius: 0.5rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.kitchen-sound[aria-pressed="true"] { border-color: #16a34a; color: #4ade80; }

/* ---- Mutfak fisi (yazici ciktisi) ----
   Ekranda gizli durur; yalnizca yazdirirken gorunur. Olculer 80mm termal
   fis yazicisina gore; A4 yazicida da duzgun basar. */
#fis-alan { display: none; }
.ticket-print { background: #1e222b; border: 1px solid #2f3644; color: #e8eaed; }
@media print {
  /* Yazdirirken ekrandaki her sey gizlenir, sadece fis kalir */
  body.kitchen-body > *:not(#fis-alan) { display: none !important; }
  #fis-alan { display: block; }
  body.kitchen-body { background: #fff; color: #000; }
  .fis {
    width: 72mm; margin: 0 auto; padding: 0 0 6mm;
    font-family: "Courier New", ui-monospace, monospace; color: #000;
    page-break-after: always;
  }
  .fis:last-child { page-break-after: auto; }
  .fis-baslik { text-align: center; font-size: 13pt; font-weight: 700; margin-bottom: 1mm; }
  .fis-masa { text-align: center; font-size: 17pt; font-weight: 700; margin-bottom: 2mm; }
  .fis-satir { display: flex; justify-content: space-between; font-size: 10pt; line-height: 1.5; }
  .fis-ayrac { border-top: 1px dashed #000; margin: 2mm 0; }
  .fis-urun { display: flex; gap: 2mm; font-size: 13pt; font-weight: 700; line-height: 1.45; }
  .fis-adet { min-width: 9mm; }
  .fis-not { margin-top: 2mm; font-size: 11pt; font-weight: 700; border: 1px solid #000; padding: 1.5mm; }
  @page { margin: 4mm; }
}

/* ---- POS ekrani: solda masalar, sagda secili masanin hesabi ---- */
.pos-ana { display: grid; grid-template-columns: 1fr 24rem; gap: 1rem; padding: 1rem; align-items: start; }
.pos-masalar { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.8rem; }
.pos-masa {
  display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start;
  padding: 0.9rem 1rem; min-height: 5.5rem; cursor: pointer; text-align: left;
  border-radius: 0.9rem; border: 2px solid #2f3644; background: #171a21; color: #e8eaed;
}
.pos-masa:hover { border-color: #475569; }
.pos-masa.dolu { background: #1f2937; border-color: #f59e0b; }
.pos-masa.secili { outline: 3px solid #38bdf8; outline-offset: 2px; }
.pos-masa.mutfakta { border-color: #ef4444; }
/* Servise hazir: plan kapaliyken de masa yesil yanar */
.pos-masa.hazir { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.pos-masa-ad { font-size: 1.05rem; font-weight: 800; }
.pos-masa-alt { font-size: 0.95rem; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.pos-masa-rozet {
  margin-top: auto; font-size: 0.7rem; font-weight: 700; color: #fecaca;
  background: rgba(239,68,68,0.18); padding: 0.1rem 0.4rem; border-radius: 0.4rem;
}

.pos-hesap {
  position: sticky; top: 1rem; background: #171a21; border: 1px solid #2f3644;
  border-radius: 1rem; padding: 1rem; color: #e8eaed;
}
.pos-hesap-bos { color: #94a3b8; text-align: center; padding: 2rem 0; }
.pos-hesap-bas { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.8rem; }
.pos-hesap-bas strong { font-size: 1.2rem; }
.pos-hesap-bas .muted { color: #94a3b8; font-size: 0.82rem; }
.pos-kalemler { list-style: none; margin: 0 0 0.8rem; padding: 0; max-height: 45vh; overflow-y: auto; }
.pos-kalemler li {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline;
  padding: 0.45rem 0; border-bottom: 1px dashed #2f3644; font-size: 0.95rem;
}
.pos-k-fiyat { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-k-fiyat.ikram { text-decoration: line-through; color: #94a3b8; }
.pos-toplam { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; font-weight: 800; padding-top: 0.5rem; border-top: 2px solid #2f3644; }
.pos-ikram-not { margin-top: 0.4rem; font-size: 0.8rem; color: #86efac; }
.pos-dugmeler { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.pos-dugmeler .btn { width: 100%; text-align: center; text-decoration: none; }
/* Koyu zeminde okunur cerceveli dugme */
.pos-dugmeler .btn-outline { background: transparent; color: #e8eaed; border: 2px solid #475569; }
.pos-dugmeler .btn-outline:hover { border-color: #94a3b8; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { filter: brightness(1.08); }
.pos-odeme-secim { display: flex; flex-direction: column; gap: 0.5rem; }
.pos-odeme-secim .btn { width: 100%; font-size: 1.05rem; padding: 0.8rem; }
@media (max-width: 860px) {
  .pos-ana { grid-template-columns: 1fr; }
  .pos-hesap { position: static; }
}

/* hidden niteligi, display veren siniflardan once gelsin */
[hidden] { display: none !important; }

/* --- Masa plani (garson/POS ekraninin icinde) --- */
/* Konumlar yuzde oldugu icin plan her ekran boyutunda ayni orani korur. */
/* Bolgeler ayni ekranda alt alta kumeler halinde durur:
   Ana Salon 10 masa, Ãœst Kat 8 masa, BahÃ§e 5 masa gibi. */
/* Plan ekrani pencereyi doldurur: kumeler asagi dogru buyur, alt bosluk kalmaz */
body.pos-body { display: flex; flex-direction: column; min-height: 100vh; }
body.pos-body .pos-ana { flex: 1; min-height: 0; align-items: stretch; }
body.pos-body .pos-hesap { align-self: start; }
.pos-sol { display: flex; flex-direction: column; min-height: 0; }
/* Tek ekran: ustte bolge secimi, altta salonun tamami */
.pos-masalar.pos-plan {
  display: flex; flex-direction: column; min-height: 32rem; flex: 1;
  border-radius: 1rem; border: 2px solid #2f3644;
}
/* overflow:hidden yok — masa tasima menusu kutunun disina tasabilmeli */
.pos-plan-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.9rem; background: #171a21; border-bottom: 1px solid #2f3644;
  border-radius: 0.85rem 0.85rem 0 0;
}
/* Bolgeler ust satirda buton; her biri kendi renginde, secili olan dolu */
.pos-bolge-sekmeler { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pos-bolge-sekme {
  font: inherit; font-weight: 800; font-size: 0.9rem; cursor: pointer;
  padding: 0.35rem 0.9rem; border-radius: 0.6rem;
  border: 2px solid var(--renk, #38bdf8); background: transparent; color: var(--renk, #38bdf8);
}
.pos-bolge-sekme:hover { background: color-mix(in srgb, var(--renk) 20%, transparent); }
.pos-bolge-sekme.etkin { background: var(--renk); color: #0b1120; }
.pos-bolge-ad-duzenle {
  width: 2rem; height: 2rem; border-radius: 0.5rem; line-height: 1;
  border: 1px solid #2f3644; background: transparent; color: #94a3b8;
  font: inherit; cursor: pointer;
}
.pos-bolge-ad-duzenle:hover { border-color: #38bdf8; color: #38bdf8; }
/* Masayi baska bolgeye gonderme menusu */
.pos-tasi-menu {
  position: absolute; z-index: 20; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 0.4rem; display: flex; flex-direction: column; min-width: 8rem;
  border-radius: 0.6rem; border: 1px solid #38bdf8; background: #0b1120;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.pos-tasi-menu button {
  padding: 0.5rem 0.7rem; border: 0; background: transparent; color: #e8eaed;
  font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; white-space: nowrap;
}
.pos-tasi-menu button:hover { background: #38bdf8; color: #0b1120; }
.pos-kume {
  display: flex; flex-direction: column; min-height: 0;
  border-radius: 1rem; border: 2px solid #2f3644;
  background: #12151b; overflow: hidden; touch-action: none;
}
/* Masalarin yerlestigi alan basligin ALTINDA baslar; boylece hicbir masa
   baslik seridinin arkasinda kalmaz. */
.pos-kume-alan {
  position: relative; flex: 1; min-height: 0;
  /* Ust kenardaki ince serit secili bolgenin rengini tasir */
  box-shadow: inset 0 3px 0 var(--renk, transparent);
  background-image:
    linear-gradient(#1c2129 1px, transparent 1px),
    linear-gradient(90deg, #1c2129 1px, transparent 1px);
  background-size: 2.5% 8%;
}
.pos-kume-bas {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.55rem 0.9rem; background: #171a21; border-bottom: 1px solid #2f3644;
}
.pos-kume-ad { font-weight: 800; color: #e8eaed; }
/* Bolge adi yerinde duzenlenir: tiklayinca kutuya doner */
.pos-kume-ad.duzenlenebilir { cursor: text; border-bottom: 1px dashed #475569; }
.pos-kume-ad.duzenlenebilir:hover { border-bottom-color: #38bdf8; color: #38bdf8; }
.pos-kume-ad-giris {
  font: inherit; font-weight: 800; width: 9rem; padding: 0.15rem 0.4rem;
  border-radius: 0.4rem; border: 1px solid #38bdf8; background: #0b1120; color: #e8eaed;
}
.pos-kume-sayi { font-size: 0.85rem; color: #94a3b8; }
/* Hizli masa ekleme: +2 / +4 / +6, tek dokunusta masa dusurur */
.pos-kume-ekle { margin-left: auto; display: flex; gap: 0.3rem; }
.pos-kume-ekle button {
  min-width: 2.4rem; padding: 0.3rem 0.5rem; border-radius: 0.6rem;
  border: 1px solid #38bdf8; background: transparent; color: #38bdf8;
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.pos-kume-ekle button:hover { background: #38bdf8; color: #0b1120; }
/* Kac masa eklenecegi kutusu */
.pos-masa-adet {
  width: 3.4rem; padding: 0.3rem 0.4rem; border-radius: 0.6rem;
  border: 1px solid #2f3644; background: #0b1120; color: #e8eaed;
  font: inherit; font-size: 0.85rem; font-weight: 700; text-align: center;
}
.pos-masa-adet:focus { outline: 2px solid #38bdf8; outline-offset: 1px; }
.pos-kume-bos {
  position: absolute; left: 1rem; right: 1rem; top: 50%; transform: translateY(-50%);
  margin: 0; text-align: center; font-size: 0.85rem;
}
/* Masayi kaldirma: kosedeki kucuk carpi, yalnizca bos masalarda */
/* Bolge degistirme (⇄) ayni gorunumde, carpinin hemen yaninda durur */
.pos-masa-sil, .pos-masa-tasi {
  position: absolute; top: -0.5rem; left: -0.5rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 1px solid #475569; background: #0b1120; color: #94a3b8;
  font-size: 1rem; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.pos-masa-tasi { left: auto; right: -0.5rem; font-size: 0.8rem; }
.pos-plan-masa:hover .pos-masa-sil,
.pos-plan-masa:focus-within .pos-masa-sil,
.pos-plan-masa:hover .pos-masa-tasi,
.pos-plan-masa:focus-within .pos-masa-tasi { opacity: 1; }
.pos-masa-sil:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
.pos-masa-tasi:hover { background: #38bdf8; border-color: #38bdf8; color: #0b1120; }
/* Dokunmatikte ustune gelme yok: dugmeler hep gorunur */
@media (hover: none) {
  .pos-masa-sil, .pos-masa-tasi { opacity: 1; }
}
.pos-plan-masa {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  width: 5.8rem; height: 5.2rem; padding: 0.3rem; text-align: center;
  border-radius: 0.8rem; border: 2px solid #475569; background: #1f2937; color: #e8eaed;
  font: inherit; cursor: pointer; user-select: none;
}
/* Masalar tek tip: sade kutu, sandalye isareti yok. Durum yalnizca
   cerceve renginden okunur (bos gri / dolu turuncu / hazir yesil). */
.pos-plan-masa.tasinir { cursor: grab; }
.pos-plan-masa.tasiniyor {
  cursor: grabbing; border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25); z-index: 5;
}
/* Masanin uzerinde tek yazi var, o yuzden daha buyuk ve uzaktan okunur */
.pos-plan-ad { font-size: 1rem; font-weight: 800; line-height: 1.15; }
/* Mutfakta bekleyen siparis sayisi: masanin kosesinde kucuk kirmizi daire */
.pos-plan-rozet {
  position: absolute; top: -0.4rem; right: -0.4rem;
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.3rem; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pos-plan-masa.dolu { background: #1f2937; border-color: #f59e0b; }
.pos-plan-masa.mutfakta { border-color: #ef4444; }
/* Servise hazir: masa yesil yanar, garson uzaktan gorur */
.pos-plan-masa.hazir { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.pos-plan-rozet.hazir { background: #22c55e; }
.pos-plan-masa.secili { outline: 3px solid #38bdf8; outline-offset: 2px; }

/* ikram rozeti: mutfak fisinde ve ekranda bedeli alinmayan kalemi isaretler */
.ikram-rozet {
  display: inline-block; margin-left: 0.45rem; padding: 0.1rem 0.45rem; border-radius: 0.4rem;
  background: #16a34a; color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  vertical-align: middle;
}

/* Garson cagrilari: her cagri kirmizi yanip sonen kucuk bir kare, ortada masa no. */
.wc-box { padding: 0.9rem 1.1rem 1rem; background: #fff1f2; border-bottom: 1px solid #fecdd3; }
.wc-box[hidden] { display: none; }
.wc-head { font-size: 0.95rem; font-weight: 800; color: #9f1239; margin-bottom: 0.7rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; }
.wc-head span { font-size: 0.78rem; font-weight: 600; color: #be123c; opacity: 0.8; }
.wc-tiles { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.wc-tile {
  width: 6.2rem; height: 6.2rem; flex-shrink: 0; border: none; border-radius: 1rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  background: #dc2626; color: #fff; font-family: inherit;
  animation: wcFlash 1s ease-in-out infinite;
}
.wc-lbl { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.14em; opacity: 0.85; }
.wc-no { font-size: 2.1rem; font-weight: 900; line-height: 1; max-width: 5.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Bahce 2" gibi uzun masa adlari kesilmesin: kucuk yazi, iki satira sarabilir. */
.wc-no.wc-no-uzun { font-size: 1.05rem; line-height: 1.15; white-space: normal; text-align: center; overflow-wrap: anywhere; max-height: 2.4em; }
.wc-time { font-size: 0.7rem; font-weight: 700; opacity: 0.9; }
.wc-tile.wc-done { animation: none; background: #94a3b8; }
@keyframes wcFlash {
  0%, 100% { background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,0.55); }
  50% { background: #7f1d1d; box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}
@media (prefers-reduced-motion: reduce) { .wc-tile { animation-duration: 2.4s; } }

.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.9rem; padding: 1rem; }
.kitchen-empty { grid-column: 1 / -1; text-align: center; color: #6b7280; padding: 4rem 1rem; font-size: 0.95rem; }

.ticket {
  background: #1e232d; border: 1px solid #454f61; border-left: 6px solid #3b82f6; border-radius: 0.7rem;
  padding: 0.85rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.15), 0 4px 14px -4px rgba(0,0,0,0.55);
}
.ticket.status-preparing { border-left-color: #f59e0b; box-shadow: 0 0 0 1px rgba(245,158,11,0.18), 0 4px 14px -4px rgba(0,0,0,0.55); }
.ticket.status-ready { background: #10291c; border-color: #16a34a; border-left-color: #22c55e; box-shadow: 0 0 0 1px rgba(34,197,94,0.35), 0 4px 18px -4px rgba(34,197,94,0.35); }
/* Mutfakta hazir siparisin butonu yok; garson alana kadar yesil etiket durur. */
.kitchen-ready-label { display: inline-flex; align-items: center; gap: 0.3rem; background: #16a34a; color: #fff; font-size: 0.82rem; font-weight: 800; padding: 0.45rem 0.8rem; border-radius: 0.45rem; }
/* 10 dakikayi gecen siparis dikkat cekmeli. */
.ticket.late { background: #2a1818; border-color: #a13030; box-shadow: 0 0 0 1px rgba(239,68,68,0.3), 0 4px 14px -4px rgba(0,0,0,0.55); }
.ticket-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
/* Siparis kaynagi etiketi: QR musteri (mavi) / garson (mor). */
.ticket-source { align-self: flex-start; font-size: 0.74rem; font-weight: 800; padding: 0.22rem 0.6rem; border-radius: 999px; margin-top: -0.2rem; }
.ticket-source.src-qr { background: rgba(59,130,246,0.18); color: #93c5fd; }
.ticket-source.src-garson { background: rgba(167,139,250,0.18); color: #c4b5fd; }
.ticket-cancel-window { font-size: 0.78rem; font-weight: 700; color: #fbbf24; margin-top: -0.3rem; }
.waiter-mode .ticket-source.src-qr { background: #dbeafe; color: #1d4ed8; }
.waiter-mode .ticket-source.src-garson { background: #ede9fe; color: #6d28d9; }
.ticket-table { font-size: 1.05rem; font-weight: 800; }
.ticket-time { font-size: 0.72rem; color: #8b93a3; white-space: nowrap; }
.ticket-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ticket-items li { font-size: 0.9rem; display: flex; gap: 0.45rem; }
.ticket-items .qty { font-weight: 800; color: #93c5fd; font-variant-numeric: tabular-nums; }
.ticket-note { font-size: 0.8rem; color: #fbbf24; background: #2a2413; border-radius: 0.4rem; padding: 0.4rem 0.55rem; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; border-top: 1px solid #2a303c; padding-top: 0.6rem; }
.ticket-total { font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-btns { display: flex; gap: 0.4rem; }
.ticket-btn { border: none; border-radius: 0.45rem; font-size: 0.78rem; font-weight: 700; padding: 0.45rem 0.7rem; cursor: pointer; }
.ticket-btn.primary { background: #2563eb; color: #fff; }
.ticket-btn.ghost { background: transparent; border: 1px solid #3f4654; color: #9aa3b2; }

/* Garsonun siparis girme ekraninda hazir siparis / garson cagrisi uyarisi. */
.gs-alert {
  flex-basis: 100%; display: flex; align-items: center; gap: 0.6rem;
  margin-top: 0.3rem; padding: 0.7rem 0.9rem; border-radius: 0.8rem;
  background: #16a34a; color: #fff; text-decoration: none; font-weight: 800; font-size: 0.92rem;
  animation: gsHazirFlash 1.1s ease-in-out infinite;
}
.gs-alert[hidden] { display: none; }
.gs-alert.gs-alert-cagri { animation-name: wcFlash; }
.gs-alert-ico { font-size: 1.1rem; }
.gs-alert-text { flex: 1; line-height: 1.3; }
.gs-alert-go { flex-shrink: 0; font-size: 0.8rem; background: rgba(0,0,0,0.2); padding: 0.35rem 0.7rem; border-radius: 999px; white-space: nowrap; }
@keyframes gsHazirFlash {
  0%, 100% { background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,0.55); }
  50% { background: #14532d; box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}

/* Siparis saatleri tablosu */
.saat-tablo { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; max-width: 30rem; }
.saat-tablo[hidden] { display: none; }
.saat-satir { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
.saat-gun { min-width: 8rem; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.saat-gun input { width: auto; margin: 0; }
.saat-satir input[type="time"] { width: 7.5rem; padding: 0.35rem 0.5rem; }
.saat-ayrac { color: var(--text-muted); }
.saat-satir:has(.saat-gun input:not(:checked)) input[type="time"] { opacity: 0.4; }

/* Personel PIN satirlari: ad, PIN (gizli/goster), degistir ve sil yan yana. */
.pin-liste { list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
/* ---- Yazici kartlari: ustte kimlik, altta acik yazili anahtarlar ---- */
/* ---- Ayar kutusu: her bolum kendi kartinda (baslik + aciklama + icerik) ---- */
.ayar-kutu {
  border: 1px solid var(--border, #e5e7eb); border-radius: 0.9rem; background: var(--surface, #fff);
  padding: 1rem 1.1rem; margin: 0 0 0.9rem; box-shadow: 0 1px 2px rgba(16,24,40,0.05);
}
.ayar-kutu-bas { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.8rem; }
.ayar-kutu-ikon { font-size: 1.3rem; line-height: 1.2; flex: 0 0 auto; }
.ayar-kutu-bas > div > strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.ayar-kutu-bas > div > span { display: block; font-size: 0.82rem; color: var(--text-2, #6b7280); line-height: 1.5; }
/* Aciklama icindeki kalin kelimeler satir kirmasin */
.ayar-kutu-bas > div > span strong { display: inline; font-size: inherit; margin: 0; color: inherit; }
.ayar-kutu-bas > div > span code { font-size: 0.95em; }
.ayar-kutu .switch-row:last-of-type { margin-bottom: 0; }

/* Yazicilar kutu kutu dizilir: dar ekranda alt alta, genis ekranda yan yana */
.yazici-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 0.8rem; margin-bottom: 0.9rem;
}
.yazici-kart {
  display: flex; flex-direction: column;
  border: 1px solid var(--border, #e5e7eb); border-radius: 0.9rem; background: var(--surface, #fff);
  padding: 0.9rem 1rem; box-shadow: 0 1px 2px rgba(16,24,40,0.05);
}
.yazici-ust { display: flex; align-items: center; gap: 0.6rem; }
.yazici-ikon { font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
.yazici-kimlik { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.yazici-kimlik strong { font-size: 1.02rem; line-height: 1.2; }
.yazici-adres { font-family: ui-monospace, "Courier New", monospace; font-size: 0.76rem; color: var(--text-2, #6b7280); }
.yazici-islem { display: flex; gap: 0.4rem; margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--border, #e5e7eb); }
.yazici-islem form { flex: 1; }
.yazici-islem .btn { width: 100% !important; }
.yazici-uyari {
  margin-top: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 0.5rem;
  background: rgba(220,38,38,0.08); color: #b91c1c; font-size: 0.78rem;
}
/* Ekleme formunda secilen USB yazici (IP/port alanlarinin yerine) */
.yazici-usb-secili { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; }
.yazici-secenekler {
  display: flex; flex-direction: column; gap: 0.6rem;
  margin-top: 0.8rem; padding-top: 0.75rem; border-top: 1px solid var(--border, #e5e7eb);
}
.yazici-secenek { display: flex; align-items: center; gap: 0.6rem; margin: 0; cursor: pointer; }
.yazici-secenek > span { display: flex; flex-direction: column; min-width: 0; }
.yazici-secenek strong { font-size: 0.85rem; font-weight: 600; }
.yazici-secenek em { font-style: normal; font-size: 0.75rem; color: var(--text-2, #6b7280); }
/* Kart icindeki anahtarlar biraz daha kucuk */
.ios-anahtar.ios-kucuk { width: 2.6rem; height: 1.5rem; }
.ios-kucuk .ios-top { width: 1.1rem; height: 1.1rem; top: 0.2rem; left: 0.2rem; }
.ios-kucuk input:checked + .ios-yuva .ios-top { transform: translateX(1.1rem); }

/* Yazici ekleme formundaki onay kutusu tek satirda kalsin */
.inline-form .beni-hatirla { white-space: nowrap; flex: 0 0 auto; }
/* Yazici listesindeki kucuk etiketler */
.rozet-yesil, .rozet-mavi {
  font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap;
}
.rozet-yesil { background: rgba(22,163,74,0.15); color: #15803d; }
.rozet-mavi { background: rgba(37,99,235,0.15); color: #1d4ed8; }
.rozet-sari { background: rgba(217,119,6,0.18); color: #b45309; }
.rozet-uyari { background: rgba(220,38,38,0.12); color: #b91c1c; font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
/* Tiklanabilir rozet: yazicinin secenegini acip kapatir */
.rozet-dugme {
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.rozet-dugme:hover { filter: brightness(0.95); border-color: rgba(0,0,0,0.15); }
.rozet-sonuk { background: rgba(127,127,127,0.12); color: var(--text-2, #9ca3af); text-decoration: line-through; }
.pin-satir { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.7rem; margin-bottom: 0.6rem; }
.pin-liste .pin-satir { margin: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 0.7rem; background: var(--surface); }
.pin-ad { min-width: 9rem; font-size: 0.92rem; font-weight: 700; display: inline-flex; flex-direction: column; }
.pin-ad small { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.pin-chip { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.2rem 0.3rem 0.2rem 0.7rem; border-radius: 999px; background: #ecfdf5; border: 1px solid #a7f3d0; }
.pin-deger { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.95rem; font-weight: 800; letter-spacing: 0.18em; color: #065f46; min-width: 3.2rem; }
.pin-goz { border: none; background: transparent; cursor: pointer; font-size: 0.9rem; padding: 0.2rem 0.35rem; border-radius: 999px; line-height: 1; }
.pin-goz:hover { background: rgba(6,95,70,0.1); }
.pin-eski { font-size: 0.8rem; font-weight: 700; color: #b45309; }
.pin-form { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.pin-form input { width: 7rem; }
.pin-form .btn { width: auto; flex-shrink: 0; }

/* ---------- Siparis ayarlari ---------- */
/* ---- Ayar satiri + iOS tarzi acma/kapama anahtari ---- */
.ayar-satir {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding: 0.9rem 1rem; margin: 0.6rem 0 0;
  border: 1px solid var(--border, #e5e7eb); border-radius: 0.9rem; background: var(--surface-2, #f9fafb);
}
.ayar-satir-metin { min-width: 0; }
.ayar-satir-metin strong { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; }
.ayar-satir-metin span { display: block; font-size: 0.82rem; color: var(--text-2, #6b7280); line-height: 1.45; }
.ayar-satir form { flex: 0 0 auto; margin: 0; }
/* Kopyalanacak kurulum komutu */
.kod-kutu {
  font-family: ui-monospace, "Courier New", monospace; font-size: 0.8rem; line-height: 1.5;
  padding: 0.7rem 0.8rem; border-radius: 0.6rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  background: #0f1115; color: #e8eaed; border: 1px solid #2f3644;
}
/* Ayar kutusu icindeki ikinci seviye baslik (or. "Kutu duzeni") */
.ayar-alt-baslik {
  margin: 1rem 0 0.1rem; padding-top: 0.9rem; font-size: 0.82rem; font-weight: 700;
  border-top: 1px solid var(--border, #e5e7eb); color: var(--text-2, #6b7280);
}
.ios-anahtar { position: relative; display: inline-block; width: 3.25rem; height: 1.9rem; flex: 0 0 auto; cursor: pointer; }
.ios-anahtar input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ios-yuva {
  position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1;
  transition: background 0.2s; pointer-events: none;
}
.ios-top {
  position: absolute; top: 0.2rem; left: 0.2rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.2s;
}
.ios-anahtar input:checked + .ios-yuva { background: #16a34a; }
.ios-anahtar input:checked + .ios-yuva .ios-top { transform: translateX(1.35rem); }
.ios-anahtar input:focus-visible + .ios-yuva { outline: 2px solid currentColor; outline-offset: 2px; }

/* Secenek kartlari: kucuk onizlemeyle secim (or. kutu duzeni) */
.secim-kartlari { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 0.5rem 0 0; }
.secim-kart { margin: 0; }
.secim-kart button {
  display: block; padding: 0.7rem 0.8rem; cursor: pointer; text-align: center; font: inherit;
  border: 2px solid var(--border, #e5e7eb); border-radius: 0.8rem; background: var(--surface, #fff); color: inherit;
}
.secim-kart button:hover { border-color: var(--text-2, #9ca3af); }
.secim-kart button:disabled { cursor: default; }
.secim-kilitli .secim-kart button:not(:disabled):hover { border-color: var(--border, #e5e7eb); }
.secim-kilitli .secim-kart:not(.secili) { opacity: 0.45; }
.secim-kart.secili button { border-color: #16a34a; background: rgba(22,163,74,0.08); }
.secim-onizleme { display: grid; gap: 3px; width: 4.6rem; margin: 0 auto 0.45rem; }
.secim-onizleme span { display: block; height: 1.15rem; border-radius: 3px; background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.secim-onizleme.iki { grid-template-columns: 1fr 1fr; }
.secim-onizleme.tek { grid-template-columns: 1fr; }
/* Kutusuz liste onizlemesi: ince satirlar alt alta */
.secim-onizleme.liste { grid-template-columns: 1fr; gap: 4px; }
.secim-onizleme.liste span { height: 0.55rem; }
/* Sayfa cevirme onizlemesi: ust cubuk cevriliyormus gibi egik durur */
.secim-onizleme.sayfa { grid-template-columns: 1fr; }
.secim-onizleme.sayfa span:first-child { transform: perspective(80px) rotateY(-24deg); transform-origin: left center; opacity: 0.75; }
.secim-kart-ad { font-size: 0.82rem; font-weight: 600; }

/* AÃ§/kapa satiri: metin solda, iOS tarzi anahtar sagda (panelin her yerinde ayni) */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; box-sizing: border-box;
  margin: 0.5rem 0; padding: 0.75rem 0.9rem; font-size: 0.85rem; cursor: pointer;
  color: var(--text, inherit);
  border: 1px solid var(--border, #e5e7eb); border-radius: 0.8rem; background: var(--surface-2, #f9fafb);
}
.switch-row > span { order: 1; min-width: 0; line-height: 1.45; }
.switch-row input[type="checkbox"] {
  order: 2; appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto;
  width: 3.25rem; height: 1.9rem; margin: 0; border: none; border-radius: 999px;
  background: #cbd5e1; cursor: pointer; transition: background 0.2s;
}
.switch-row input[type="checkbox"]::after {
  content: ''; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.2s;
}
.switch-row input[type="checkbox"]:checked { background: #16a34a; }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(1.35rem); }
.switch-row input[type="checkbox"]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* Anahtarin altindaki aciklama satiri */
.switch-alt { margin: -0.1rem 0 0.9rem; padding: 0 0.9rem; font-size: 0.8rem; color: var(--text-2, #6b7280); }
.inline-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0 0.9rem; }
.inline-form input { width: auto; flex: 0 1 12rem; }
.table-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Patron paneli ozeti: tek kutu, iki sutun. Renk anlam tasir —
   her durumun kendi rengi var, sayilar renge bakilarak taranabiliyor. */
.ozet-kutu {
  display: flex; flex-wrap: wrap; gap: 1.6rem 3rem;
  border: 1px solid var(--border, #d6cfc2); border-radius: 0.9rem;
  padding: 1.1rem 1.4rem; margin: 0 0 1.4rem;
  background: linear-gradient(180deg, #fcfbf9 0%, var(--surface, #fff) 55%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}
.ozet-blok { flex: 1 1 16rem; min-width: 14rem; }
.ozet-blok-bas {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #9ca3af; padding-bottom: 0.5rem; margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border, #d6cfc2);
}
/* Buyuk toplam: sutunun bas rakami */
.ozet-hero { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.ozet-hero b { font-size: 2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ozet-hero span { font-size: 0.82rem; color: #6b7280; }

.ozet-satir {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.32rem 0; font-size: 0.88rem;
}
/* Renk noktasi: satirin ne oldugunu yazidan once soyler */
.ozet-nokta {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  flex: 0 0 auto; background: #9ca3af; align-self: center;
}
.n-yesil, .p-start { background: #16a34a; }
.n-kirmizi { background: #dc2626; }
.n-mavi, .p-order { background: #2563eb; }
.n-turuncu { background: #d97706; }
.p-one { background: #ca8a04; }
.p-yok { background: #d1d5db; }
/* Nokta nokta cizgi: goz etiketten sayiya kaymadan gider */
.ozet-satir span {
  flex: 1; display: flex; align-items: baseline;
  white-space: nowrap; color: #4b5563;
}
.ozet-satir span::after {
  content: ""; display: inline-block; width: 100%; margin-left: 0.5rem;
  border-bottom: 1px dotted var(--border, #d6cfc2); transform: translateY(-0.2em);
}
.ozet-satir b { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.ozet-uyari b { color: #d97706; }
.ozet-sonuk span, .ozet-sonuk b { color: #9ca3af; }

/* Paket oran cubugu: dagilim tek bakista gorulur */
.ozet-cubuk {
  display: flex; height: 0.5rem; border-radius: 999px; overflow: hidden;
  background: #eef0f3; margin: 0 0 0.75rem;
}
.ozet-cubuk span { display: block; height: 100%; }
/* Paket aciklamasi: tablonun altinda tek satir */
.paket-aciklama { font-size: 0.82rem; color: #4b5563; margin: 0.8rem 0 0; line-height: 1.6; }
.paket-aciklama b { font-weight: 800; }
/* ---- Ayarlar > Personel: kisi bazli ekran ve yetki kutulari ---- */
.personel-hata { color: #b91c1c; font-size: 0.85rem; margin: 0 0 0.6rem; }
.personel-adresler { display: flex; flex-direction: column; gap: 0.35rem; margin: 0 0 1.1rem; }
.personel-adres { display: flex; align-items: center; gap: 0.5rem; }
.personel-adres-ad { width: 6.5rem; flex-shrink: 0; font-size: 0.82rem; font-weight: 700; }
.personel-adres input { flex: 0 1 22rem; width: auto; font-size: 0.82rem; }
.personel-adres .btn { width: auto; flex-shrink: 0; }
.personel-liste { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.personel-kart {
  border: 1px solid var(--border, #d6cfc2); border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
}
.personel-kart-bas { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.5rem; }
.personel-kart-bas .pin-ad { min-width: 9rem; }
.personel-sil { margin-left: auto; }
.personel-izinler { margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.personel-grup { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
.personel-grup-ad {
  width: 4.8rem; flex-shrink: 0;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #9ca3af;
}
.personel-kutu { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.84rem; cursor: pointer; white-space: nowrap; }
.personel-kutu input { width: auto; margin: 0; }
.personel-ekle-baslik { font-size: 0.88rem; margin: 1.2rem 0 0.5rem; }
.personel-ekle { border: 1px dashed var(--border, #d6cfc2); border-radius: 0.75rem; padding: 0.8rem 0.9rem; }
.personel-ekle .personel-grup + .personel-grup { margin-top: 0.35rem; }
@media (max-width: 640px) {
  .personel-adres { flex-wrap: wrap; }
  .personel-adres-ad { width: 100%; }
  .personel-sil { margin-left: 0; }
}

/* PIN giris ekrani: hangi ekranin girisi oldugu + masaustune ekle */
.pad-ekran { color: #f97316; }
.pad-masaustu { display: flex; justify-content: center; margin-top: 0.9rem; }
.pad-masaustu:empty { display: none; }

/* Self servis / paket servis: ekran hazirlaniyor */
.yakinda-alan { display: grid; place-items: center; padding: 3rem 1rem; }
.yakinda-kart {
  max-width: 34rem; text-align: center; padding: 2rem 1.6rem; border-radius: 1rem;
  background: #171a21; border: 1px solid #2f3644; color: #e8eaed;
}
.yakinda-ikon { font-size: 2.4rem; margin-bottom: 0.6rem; }
.yakinda-kart h1 { font-size: 1.3rem; margin: 0 0 0.6rem; }
.yakinda-kart p { margin: 0; color: #94a3b8; line-height: 1.6; font-size: 0.92rem; }

/* Panel basliginin sag tarafi: masaustune ekle + restoran durumu */
.admin-header-sag { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
.masaustu-dugme {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.8rem; border-radius: 999px; cursor: pointer;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  font: inherit; font-size: 0.78rem; font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.masaustu-dugme:hover { background: #ffedd5; border-color: #fdba74; }
.masaustu-dugme:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }
/* iPhone icin adim adim not */
.masaustu-ipucu {
  position: relative; margin: 0 0 1rem; padding: 0.8rem 2.4rem 0.8rem 1rem;
  border-radius: 0.7rem; background: #fff7ed; border: 1px solid #fed7aa;
  color: #7c2d12; font-size: 0.85rem; line-height: 1.5;
}
.masaustu-ipucu-kapat {
  position: absolute; top: 0.4rem; right: 0.5rem; width: 1.6rem; height: 1.6rem;
  border: 0; background: transparent; color: #9a3412; font-size: 1.2rem; cursor: pointer;
}

/* "Paneline gir": satir basina bir tane oldugu icin siyah dolgu agir
   duruyordu — yumusak mavi tona cekildi, uzerine gelince biraz koyulasir. */
.panel-gir {
  width: auto; background: #eef2ff; color: #4338ca;
  border: 1px solid #c7d2fe; font-weight: 700;
}
.panel-gir:hover { background: #e0e7ff; border-color: #a5b4fc; filter: none; }
.panel-gir:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }

/* Yeni isletme ekleme: ozet ile tablo arasinda durur */
.yeni-isletme { margin: 0 0 1.2rem; }
/* Panelin tek birincil eylemi: markanin turuncusuyla one cikar */
.yeni-isletme-dugme {
  display: inline-flex; align-items: center; cursor: pointer; list-style: none;
  padding: 0.5rem 1.1rem; border-radius: 0.6rem;
  background: #f97316; border: 1px solid #f97316; color: #fff;
  font-weight: 700; font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
  transition: background 0.15s, box-shadow 0.15s;
}
.yeni-isletme-dugme::-webkit-details-marker { display: none; }
.yeni-isletme-dugme::marker { content: ""; }
.yeni-isletme-dugme:hover { background: #ea680c; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.42); }
.yeni-isletme-dugme:focus-visible { outline: 2px solid #9a3412; outline-offset: 2px; }
/* Acikken kapatma eylemi: dolu turuncu yanlis mesaj verir, sade cerceveye doner */
.yeni-isletme[open] > .yeni-isletme-dugme {
  background: transparent; color: #b45309; border-color: #f0b27a; box-shadow: none;
}
/* Tablodaki paket secici: satiri sismesin diye dar ve sade */
.paket-sec { width: auto; min-width: 5.5rem; padding: 0.2rem 0.4rem; font-size: 0.82rem; font-weight: 700; }

/* Urun arama + kategori suzgeci (panel, acik tema) */
.urun-arac { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.2rem 0 1rem; }
.urun-arac input { width: auto; flex: 0 1 16rem; }
.urun-kat { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.urun-kat-btn {
  font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border, #d6cfc2); background: transparent; color: inherit;
}
.urun-kat-btn:hover { border-color: #2563eb; color: #2563eb; }
.urun-kat-btn.etkin { background: #2563eb; border-color: #2563eb; color: #fff; }

/* Masalar bolge bolge katlanir kutularda durur */
.masa-arac { display: flex; align-items: center; gap: 0.6rem; margin: 0.2rem 0 0.7rem; }
.masa-arac input { width: auto; flex: 0 1 14rem; }
.masa-bolge { border: 1px solid var(--border, #2a303c); border-radius: 0.7rem; margin-bottom: 0.5rem; }
.masa-bolge > summary {
  display: flex; align-items: center; gap: 0.6rem; cursor: pointer;
  padding: 0.5rem 0.8rem; font-size: 0.85rem; list-style: none;
}
.masa-bolge > summary::-webkit-details-marker { display: none; }
/* Ucgen isaret: kapaliyken saga, acikken asagi bakar */
.masa-bolge > summary::before {
  content: "▸"; color: #9aa3b2; font-size: 0.8rem; transition: transform 0.15s;
}
.masa-bolge[open] > summary::before { transform: rotate(90deg); }
.masa-bolge-ad { font-weight: 800; }
.masa-bolge-sayi { color: #9aa3b2; font-size: 0.8rem; }
.masa-bolge > .table-list { padding: 0 0.8rem 0.8rem; }
.table-chip { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--surface-2, #1c212b); border: 1px solid var(--border, #2a303c); border-radius: 0.55rem; padding: 0.35rem 0.5rem 0.35rem 0.7rem; }
.table-chip form { margin: 0; }
.table-chip-label { font-size: 0.82rem; font-weight: 700; }
.table-chip-btn { font-size: 0.72rem; font-weight: 700; text-decoration: none; color: #60a5fa; border: 1px solid #2f4a6b; border-radius: 0.35rem; padding: 0.15rem 0.4rem; }
.table-chip-del { border: none; background: transparent; color: #9aa3b2; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 0.15rem; }
.table-chip-del:hover { color: #ef4444; }

/* Owner panelinde QR afis onizlemesi */
.qr-onizleme { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.72); display: flex; align-items: center; justify-content: center; padding: 1.2rem; z-index: 120; }
.qr-onizleme[hidden] { display: none !important; }
.qr-onizleme-kutu { background: #fff; border-radius: 1rem; padding: 0.9rem; max-width: min(92vw, 30rem); max-height: 92vh; display: flex; flex-direction: column; gap: 0.6rem; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.qr-onizleme-bas { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.qr-onizleme-kapat { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #475569; }
.qr-onizleme img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 0.6rem; }

/* garson-ekrani: hazir/bekleyen ayrimi */
.waiter-block { padding: 0 1rem 1.2rem; }
.waiter-head { display: flex; align-items: center; gap: 0.6rem; margin: 1.1rem 0 0.7rem; font-size: 1.05rem; color: #e5e7eb; }
.waiter-head-ready { color: #34d399; }
.waiter-count { background: rgba(255,255,255,0.12); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.9rem; }
.waiter-empty { color: #9ca3af; font-size: 0.92rem; margin: 0.2rem 0 0; }
.waiter-state { color: #9ca3af; font-size: 0.9rem; align-self: center; }

/* personel-numpad: koyu zemin + canli renkli tus takimi */
.pad-body {
  min-height: 100vh; margin: 0; display: flex;
  background: #0b1020;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(99,102,241,0.30) 0%, transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(236,72,153,0.22) 0%, transparent 45%),
    radial-gradient(circle at 50% 40%, #16203a 0%, #0b1020 70%);
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.pad-shell { margin: auto; padding: 1.5rem 1.2rem; width: 100%; max-width: 23rem; }
.pad-card {
  background: #fff; border: 1px solid rgba(255,255,255,0.6); border-radius: 1.5rem;
  padding: 2rem 1.6rem 1.5rem; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 28px 70px -20px rgba(0,0,0,0.7);
}
/* Varsayilan: yatay Pi19 logosu, kirpilmadan */
.pad-logo { width: 9rem; height: auto; object-fit: contain; }
/* isletme logosu daha buyuk gosterilir: personel kendi isyerini ilk bakista taniyor */
.pad-logo-isletme { width: 5.4rem; height: 5.4rem; border-radius: 1rem; object-fit: cover; box-shadow: 0 2px 8px rgba(16,24,40,0.12); }
.pad-brand { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 0.85rem; color: #0f172a; }
.pad-sub { color: #64748b; font-size: 0.86rem; line-height: 1.5; margin: 0.4rem 0 1.4rem; }
.pad-error {
  background: #fff1f2; border: 1px solid #fecdd3; color: #be123c;
  border-radius: 0.7rem; padding: 0.65rem 0.8rem; font-size: 0.86rem; margin-bottom: 1.1rem; text-align: left;
}

.pad-slug-row { text-align: left; margin-bottom: 1.3rem; }
.pad-slug-row label {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #64748b; margin-bottom: 0.4rem;
}
.pad-slug-row input {
  width: 100%; box-sizing: border-box; padding: 0.75rem 0.9rem;
  border-radius: 0.7rem; border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
  font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.pad-slug-row input:focus {
  outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
}

/* PIN gostergesi: girilen her hane bir noktayi doldurur */
.pad-dots { display: flex; justify-content: center; gap: 0.75rem; min-height: 1.1rem; margin-bottom: 1.5rem; }
.pad-dot {
  width: 0.72rem; height: 0.72rem; border-radius: 50%;
  background: #fff; border: 2px solid #cbd5e1;
  transition: transform .14s cubic-bezier(.34,1.56,.64,1), background .14s, border-color .14s, box-shadow .14s;
}
.pad-dot.dolu {
  background: linear-gradient(140deg, #6366f1, #ec4899);
  border-color: transparent; transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.16);
}

.pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
.pad-key {
  font-size: 1.55rem; font-weight: 600; color: #312e81;
  padding: 0.85rem 0; border-radius: 0.9rem;
  border: 1px solid #e0e7ff;
  background: linear-gradient(160deg, #f5f7ff 0%, #e8ecfd 100%);
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  box-shadow: 0 1px 2px rgba(49,46,129,0.08);
  transition: background .12s, transform .08s, box-shadow .12s, color .12s;
}
.pad-key:hover { background: linear-gradient(160deg, #eef1ff 0%, #dfe5fc 100%); }
.pad-key:active {
  background: linear-gradient(160deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff; transform: translateY(1px) scale(0.97);
  box-shadow: 0 4px 14px -4px rgba(99,102,241,0.7);
}
/* Silme kirmizi, temizleme turuncu: yanlis tusa basmak zorlasir */
.pad-key-alt { font-size: 1.2rem; font-weight: 700; }
.pad-key[data-act="back"] { color: #be123c; background: linear-gradient(160deg, #fff1f3 0%, #ffe1e6 100%); border-color: #fecdd3; }
.pad-key[data-act="back"]:active { background: linear-gradient(160deg, #f43f5e 0%, #e11d48 100%); color: #fff; box-shadow: 0 4px 14px -4px rgba(244,63,94,0.7); }
.pad-key[data-act="clear"] { color: #b45309; background: linear-gradient(160deg, #fff8ec 0%, #ffefd5 100%); border-color: #fde3b0; }
.pad-key[data-act="clear"]:active { background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%); color: #fff; box-shadow: 0 4px 14px -4px rgba(245,158,11,0.7); }

.pad-enter {
  width: 100%; margin-top: 1.3rem; padding: 0.95rem;
  font-size: 1.02rem; font-weight: 700; letter-spacing: 0.01em;
  border: 0; border-radius: 0.85rem;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #ec4899 100%);
  color: #fff; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(139,92,246,0.85);
  transition: filter .15s, box-shadow .15s, transform .08s;
}
.pad-enter:hover:not(:disabled) { filter: brightness(1.07); box-shadow: 0 12px 28px -10px rgba(139,92,246,0.95); }
.pad-enter:active:not(:disabled) { transform: translateY(1px); }
.pad-enter:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; box-shadow: none; }

.pad-foot { margin-top: 1.1rem; font-size: 0.76rem; color: #94a3b8; }

/* Kucuk ekranda tuslar parmak boyuna yaklassin */
@media (max-height: 700px) {
  .pad-card { padding: 1.4rem 1.2rem 1.2rem; }
  .pad-sub { margin-bottom: 1rem; }
  .pad-key { padding: 0.7rem 0; font-size: 1.4rem; }
}

/* ---- ekran-ayrimi: mutfak ve garson ayri tasarim ---- */

/* MUTFAK: koyu "sicak hat" gorunumu. Tezgahtan uzaktan okunmali, bu yuzden
   yazi buyuk, kontrast yuksek, renk kodu (mavi/amber/yesil) belirgin. */
.kitchen-mode .kitchen-top { background: #12161f; border-bottom: 2px solid #f59e0b; }
.kitchen-mode .kitchen-title { font-size: 1.2rem; letter-spacing: 0.01em; }
.kitchen-mode .kitchen-grid { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.kitchen-mode .ticket { border-left-width: 9px; border-width: 2px; padding: 1rem 1.05rem; gap: 0.7rem; }
.kitchen-mode .ticket-table { font-size: 1.45rem; letter-spacing: -0.01em; }
.kitchen-mode .ticket-items li { font-size: 1.08rem; line-height: 1.35; }
.kitchen-mode .ticket-items .qty { font-size: 1.15rem; color: #fbbf24; min-width: 2.2rem; }
.kitchen-mode .ticket-note { font-size: 0.92rem; font-weight: 600; }
.kitchen-mode .ticket-btn { font-size: 0.9rem; padding: 0.6rem 0.9rem; }
.kitchen-mode .ticket.status-ready .ticket-btn.primary { background: #16a34a; }
.kitchen-mode .ticket.status-ready .ticket-btn.primary:hover { background: #15803d; }
.kitchen-mode .ticket.late { animation: mutfak-uyari 1.6s ease-in-out infinite; }
@keyframes mutfak-uyari {
  0%, 100% { border-color: #7f1d1d; }
  50% { border-color: #ef4444; }
}

/* GARSON: elde telefon/tablet ile tasinir. Aydinlik zemin, koyu lacivert ust cubuk
   (marka rengi), durum renkleri net: sirada gri, hazirlaniyor amber, hazir yesil,
   geciken kirmizi. Tek is masaya goturmek; o buton tam genislikte. */
.waiter-mode { background: #eef1f6; color: #0f172a; min-height: 100vh; }
.waiter-mode .kitchen-top {
  background: #14213d; border-bottom: none; color: #fff;
  box-shadow: 0 4px 18px rgba(20,33,61,0.25); position: sticky; top: 0; z-index: 5;
  flex-wrap: wrap; padding: 0.85rem 1.1rem;
}
.waiter-mode .kitchen-title { color: #fff; font-size: 1.1rem; }
.waiter-mode .kitchen-sub { color: rgba(255,255,255,0.65); }
.waiter-mode .kitchen-actions { flex-wrap: wrap; }
.waiter-mode .kitchen-sound, .waiter-mode .kitchen-back {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: #fff;
  border-radius: 999px; padding: 0.5rem 0.95rem;
}
.waiter-mode .kitchen-sound:hover, .waiter-mode .kitchen-back:hover { background: rgba(255,255,255,0.18); }
.waiter-mode .kitchen-sound[aria-pressed="true"] { border-color: #34d399; color: #34d399; background: rgba(52,211,153,0.12); }
.waiter-filter {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: #fff; border-radius: 999px;
  padding: 0.5rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.waiter-filter option { color: #0f172a; }
.waiter-mode .kitchen-grid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.9rem; padding: 0 0 0.4rem; align-items: start; }

/* Kart: beyaz, ustte durum renginde ince serit */
.waiter-mode .ticket {
  --durum: #94a3b8;
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid #e2e8f0; border-left: 1px solid #e2e8f0; border-radius: 1rem;
  padding: 1.05rem 1rem 0.95rem; box-shadow: 0 2px 10px rgba(15,23,42,0.06);
}
.waiter-mode .ticket::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--durum); }
.waiter-mode .ticket.status-new { --durum: #94a3b8; }
.waiter-mode .ticket.status-preparing { --durum: #f59e0b; }
.waiter-mode .ticket.status-ready { --durum: #16a34a; border-color: #bbf7d0; box-shadow: 0 8px 24px -6px rgba(22,163,74,0.35); }
.waiter-mode .ticket.late { --durum: #dc2626; border-color: #fecaca; background: #fff; box-shadow: 0 8px 24px -6px rgba(220,38,38,0.3); }
.waiter-mode .ticket-table { color: #0f172a; font-size: 1.25rem; }
.waiter-mode .ticket-time { color: #64748b; font-weight: 600; }
.waiter-mode .ticket.late .ticket-time { color: #dc2626; }
.waiter-mode .ticket-items li { color: #334155; }
.waiter-mode .ticket-items .qty { color: #f97316; }
.waiter-mode .ticket-note { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.waiter-mode .ticket-foot { border-top: 1px dashed #e2e8f0; flex-wrap: wrap; }
.waiter-mode .ticket-total { color: #0f172a; }

/* Durum etiketi (hazir olmayan kartlarda) */
.waiter-mode .waiter-state {
  font-size: 0.78rem; font-weight: 800; padding: 0.3rem 0.7rem; border-radius: 999px;
  color: #475569; background: #f1f5f9;
}
.waiter-mode .ticket.status-preparing .waiter-state { color: #b45309; background: #fef3c7; }

/* Servise hazir kartta buton tam genislikte: yanlis dokunma olmasin */
.waiter-mode .ticket.status-ready .ticket-btns { width: 100%; }
.waiter-mode .ticket.status-ready .ticket-btn.primary {
  width: 100%; background: #16a34a; font-size: 1rem; padding: 0.85rem 1rem; border-radius: 0.8rem;
  box-shadow: 0 6px 16px rgba(22,163,74,0.3);
}
.waiter-mode .ticket.status-ready .ticket-btn.primary:active { background: #15803d; transform: scale(0.98); }

/* Bolum basliklari: renkli nokta + baslik + sayi */
.waiter-mode .waiter-head {
  color: #334155; font-size: 1.02rem; font-weight: 800; letter-spacing: 0.01em;
  padding: 0; background: none; border-radius: 0; margin: 1.3rem 0 0.8rem;
}
.waiter-mode .waiter-head::before { content: ''; width: 0.7rem; height: 0.7rem; border-radius: 999px; background: #94a3b8; flex-shrink: 0; }
.waiter-mode .waiter-head-ready { color: #15803d; background: none; }
.waiter-mode .waiter-head-ready::before { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,0.18); }
.waiter-mode .waiter-count { background: #e2e8f0; color: #334155; font-weight: 800; font-size: 0.82rem; }
.waiter-mode .waiter-head-ready .waiter-count { background: #16a34a; color: #fff; }
.waiter-mode .waiter-empty {
  color: #94a3b8; font-weight: 600; text-align: center; padding: 1.4rem 1rem;
  border: 2px dashed #d7dde7; border-radius: 1rem; background: rgba(255,255,255,0.5);
}
.waiter-mode .waiter-empty[hidden] { display: none; }
.waiter-mode .waiter-block + .waiter-block { border-top: none; margin-top: 0; padding-top: 0; }
.waiter-mode .wc-box { margin: 0; border-bottom: 1px solid #fecdd3; }

/* ---- garson-siparis: garsonun mutfaga sozlu siparis girdigi ekran ---- */
.gs-body { min-height: 100vh; }
.gs-wrap { display: grid; grid-template-columns: 1fr 26rem; gap: 1.2rem; padding: 1rem; align-items: start; }
.gs-katalog { min-width: 0; }
.gs-arac { margin-bottom: 0.7rem; }
.gs-arac input {
  width: 100%; box-sizing: border-box; padding: 0.7rem 0.9rem; font-size: 1rem;
  border: 1px solid #cbd5e1; border-radius: 0.7rem; background: #fff; color: #0f172a;
}
.gs-arac input:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }

.gs-sekmeler { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.6rem; -webkit-overflow-scrolling: touch; }
.gs-sekme {
  flex: 0 0 auto; padding: 0.45rem 0.85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 0.88rem; font-weight: 600;
}
.gs-sekme.aktif { background: #0d9488; border-color: #0d9488; color: #fff; }

.gs-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; }
.gs-urun {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; text-align: left;
  padding: 0.75rem 0.8rem; border-radius: 0.7rem; border: 1px solid #e2e8f0; background: #fff;
  cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: transform .08s, box-shadow .12s, border-color .12s;
}
.gs-urun:active { transform: translateY(1px); }
.gs-urun.eklendi { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.18); }
.gs-urun-ad { font-size: 0.92rem; font-weight: 600; color: #0f172a; line-height: 1.25; }
.gs-urun-fiyat { font-size: 0.85rem; color: #0d9488; font-weight: 700; font-variant-numeric: tabular-nums; }
.gs-etiket { font-size: 0.7rem; color: #64748b; font-weight: 600; }
.gs-bos { color: #94a3b8; font-size: 0.9rem; padding: 1.5rem 0; text-align: center; }

/* Sag panel: garson elde tasirken uzaktan da okunsun diye buyuk yazi ve genis dokunma alanlari. */
.gs-sepet {
  position: sticky; top: 5.5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1.2rem;
  padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 8px 28px rgba(15,23,42,0.1);
}
.gs-masa { display: flex; flex-direction: column; gap: 0.45rem; }
.gs-masa label { font-size: 0.95rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #14213d; }
.gs-masa select, .gs-masa input {
  width: 100%; box-sizing: border-box; padding: 0.85rem 1rem; font-size: 1.5rem; font-weight: 800;
  border: 2px solid #cbd5e1; border-radius: 0.9rem; background: #f8fafc; color: #0f172a; font-family: inherit;
}
.gs-masa select:focus, .gs-masa input:focus, .gs-sepet textarea:focus { outline: none; border-color: #f97316; background: #fff; box-shadow: 0 0 0 4px rgba(249,115,22,0.16); }
.gs-sepet textarea {
  width: 100%; box-sizing: border-box; padding: 0.75rem 0.9rem; font-size: 1.05rem;
  border: 2px solid #cbd5e1; border-radius: 0.9rem; background: #f8fafc; color: #0f172a; font-family: inherit; resize: vertical;
}

.gs-sepet-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; max-height: 48vh; overflow-y: auto; }
.gs-sepet-liste li {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "ad fiyat" "adet ikram";
  align-items: center; gap: 0.5rem 0.7rem; font-size: 1.1rem;
  padding: 0.75rem 0.85rem; border-radius: 0.9rem; background: #f8fafc; border: 1px solid #e2e8f0;
}
/* ikram: bedeli alinmayan kalem â€” fiyat uzeri cizili, dugme yesil yanar */
.gs-ikram-btn {
  grid-area: ikram; justify-self: end;
  padding: 0.45rem 0.9rem; border-radius: 0.7rem; border: 2px solid #cbd5e1;
  background: #fff; color: #475569; font-size: 0.95rem; font-weight: 700; cursor: pointer;
}
.gs-ikram-btn.acik { background: #16a34a; border-color: #16a34a; color: #fff; }
.gs-s-fiyat.gs-ikram { text-decoration: line-through; color: #64748b; }
.gs-s-ad { grid-area: ad; color: #0f172a; font-weight: 700; line-height: 1.25; }
.gs-s-fiyat { grid-area: fiyat; color: #0f172a; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-s-adet { grid-area: adet; display: flex; align-items: center; gap: 0.5rem; }
.gs-s-adet button {
  width: 2.8rem; height: 2.8rem; border-radius: 0.8rem; border: 2px solid #cbd5e1;
  background: #fff; color: #0f172a; font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.gs-s-adet button:active { background: #e2e8f0; transform: scale(0.95); }
.gs-s-adet b { min-width: 2.2rem; text-align: center; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.gs-sepet-bos { color: #94a3b8; font-size: 1.05rem; margin: 0; text-align: center; padding: 1.2rem 0; border: 2px dashed #e2e8f0; border-radius: 0.9rem; }

.gs-toplam { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid #eef2f7; padding-top: 0.9rem; color: #475569; font-size: 1.15rem; font-weight: 700; }
.gs-toplam strong { font-size: 2rem; font-weight: 900; color: #0f172a; font-variant-numeric: tabular-nums; }
.gs-uyari { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; border-radius: 0.8rem; padding: 0.75rem 0.9rem; font-size: 1rem; font-weight: 600; }
.gs-gonder {
  padding: 1.15rem; border: 0; border-radius: 1rem; background: #f97316; color: #fff;
  font-size: 1.3rem; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(249,115,22,0.35);
}
.gs-gonder:active:not(:disabled) { background: #ea580c; transform: scale(0.99); }
.gs-gonder:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; box-shadow: none; }

/* Tablette panel biraz daralir, urun listesi sikismasin */
@media (max-width: 1100px) and (min-width: 821px) {
  .gs-wrap { grid-template-columns: 1fr 22rem; }
}
/* Telefonda sepet alta iner */
@media (max-width: 820px) {
  .gs-wrap { grid-template-columns: 1fr; }
  .gs-sepet { position: static; }
  .gs-liste { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
}

/* Garson listesi ustundeki yeni siparis butonu */
.waiter-new { background: #0d9488; border: 1px solid #0d9488; color: #fff; font-weight: 700; }
.waiter-mode .waiter-new { background: #f97316; border-color: #f97316; color: #fff; font-weight: 800; box-shadow: 0 6px 16px rgba(249,115,22,0.35); }
.waiter-mode .waiter-new:hover { background: #ea580c; }

/* garson-siparis: kategori gruplari ve urun gorselleri */
.gs-liste { display: block; }
.gs-grup { margin-bottom: 1.3rem; }
.gs-grup-bas {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 0 0.6rem; font-size: 0.95rem; font-weight: 700; color: #0f172a;
}
.gs-grup-bas::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.gs-grup-bas span {
  order: 1; background: #e2e8f0; color: #475569; border-radius: 999px;
  padding: 0.05rem 0.5rem; font-size: 0.75rem; font-weight: 700;
}
.gs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }

.gs-urun { padding: 0; overflow: hidden; gap: 0; }
.gs-gorsel {
  width: 100%; aspect-ratio: 4 / 3; display: block; background: #f1f5f9; position: relative;
}
.gs-gorsel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-gorsel-yok {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: #94a3b8;
  background: linear-gradient(140deg, #f1f5f9, #e2e8f0);
}
.gs-urun .gs-urun-ad { padding: 0.5rem 0.6rem 0.1rem; }
.gs-urun .gs-urun-fiyat { padding: 0 0.6rem 0.55rem; }

@media (max-width: 820px) {
  .gs-grid { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
}

/* --- Rapor grafikleri (SVG, ek kutuphane yok) --- */
/* Her bolum: ustte grafik, altta tablo — ikisi de kendi kutusunda */
/* Her bolum tek sira: solda rapor tablosu, sagda grafigi */
.rapor-liste { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
/* Disdaki blok yalnizca sarmalayici; cerceveyi icerideki iki kutu tasir */
.report-block.rapor-bolum { background: transparent; border: none; padding: 0; }
.rapor-bolum > .rapor-bolum-bas { margin-bottom: 0.6rem; padding: 0 0.2rem; }
/* Yazdir dugmesi tablonun ustunde durur: basilan sey tablodur, grafik degil */
.rapor-tablo-bas { display: flex; justify-content: flex-end; margin-bottom: 0.4rem; }
.rapor-bolum > .rapor-bolum-bas h3 { border-bottom: none; padding-bottom: 0; }
.rapor-ikili { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 900px) {
  .rapor-ikili { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.rapor-tablo, .rapor-grafik {
  min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 0.8rem; padding: 1rem 1.1rem;
}
/* Tam genislikte asiri yayilmasin: grafik ortalanip makul boyda kalir */
.grafik-svg { width: 100%; max-width: 46rem; margin: 0 auto; height: auto; display: block; overflow: visible; }
.grafik-svg text { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.grafik-svg rect, .grafik-svg path { transition: opacity 0.15s; }
.grafik-svg rect:hover, .grafik-svg path:hover { opacity: 0.82; }
/* Halka grafik kendi kutusunda ortalanir ve fazla buyumez */
#grafik-odeme .grafik-svg { max-width: 15rem; margin: 0 auto; }
/* Grafikler yazdirilan sayfada yer kaplamasin */
@media print { .rapor-grafik { display: none; } }

/* Rapor basliklari: sagda kendi yazdir dugmesi */
.rapor-bas { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rapor-bolum-bas { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.rapor-bolum-bas h3 { margin: 0; }
.rapor-yazdir-btn {
  border: 1px solid var(--border, #e2e8f0); background: transparent; cursor: pointer;
  border-radius: 0.5rem; padding: 0.25rem 0.5rem; font-size: 0.95rem; line-height: 1;
}
.rapor-yazdir-btn:hover { background: var(--surface, #f1f5f9); }
