/* Restoran paneli - sade, cerceve yok, build adimi yok (projenin genel uslubu). */
:root {
  --bg: #0d1117;
  --surface: #161d27;
  --surface-2: #1e2733;
  --text: #e8eef6;
  --muted: #93a1b1;
  --line: #2a3543;
  --s1: #54b9ff;
  --ok: #3fbf7f;
  --warn: #e8a13a;
  --err: #ef6a6a;
}
* { box-sizing: border-box; }
/* .center-wrap (login ekrani) display:flex tanimladigi icin, YAZAR
   (author) kurallari esit ozgullukte tarayicinin varsayilan [hidden]
   davranisini EZER - JS loginView.hidden=true dese bile login ekrani
   gorunmeye devam edip panelin ustunde bos yer kaplar. Bu kural bunu
   HER ZAMAN kazanacak sekilde duzeltir (C:\toplu\public\shared.css'te
   zaten var, burada eksikti). */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--s1) 7%, transparent) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 14px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.12); }
.card.narrow { width: 100%; max-width: 420px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }

.segbar { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.seg { position: relative; flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .1s ease; }
/* Yeni siparis geldiginde "Siparisler" sekmesinde goze carpan kirmizi nokta -
   personel farketmeden ekrandan uzaklasirsa bile sekmeye gozu takilsin diye. */
.notif-dot { position: absolute; top: 2px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px var(--surface); }
.seg:active { transform: scale(.96); }
.seg.active { background: var(--s1); border-color: var(--s1); color: #06121f; font-weight: 600; box-shadow: 0 2px 12px color-mix(in srgb, var(--s1) 40%, transparent); }
.pane { display: none; }
.pane.active { display: block; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
label.radio { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; margin-right: 14px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--s1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s1) 20%, transparent); }
input[type="color"] { padding: 2px; height: 40px; }
input[type="radio"], input[type="checkbox"] { width: auto; }
input[readonly] { color: var(--muted); }
.filter { margin-bottom: 12px; }

.btn { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .08s ease; }
.btn:hover { border-color: color-mix(in srgb, var(--s1) 50%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.primary { background: var(--s1); border-color: var(--s1); color: #06121f; font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--s1) 88%, white); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.link { background: none; border: none; color: var(--s1); text-decoration: underline; padding: 4px 0; }

.msg { padding: 9px 11px; border-radius: 9px; margin-bottom: 12px; font-size: 14px; }
.msg.err { background: rgba(239,106,106,.14); color: var(--err); }
.msg.ok { background: rgba(63,191,127,.14); color: var(--ok); }
.inline-msg { margin-left: 10px; font-size: 13px; color: var(--muted); }

.group-title {
  margin: 22px 0 10px; padding: 8px 14px; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--s1); background: color-mix(in srgb, var(--s1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--s1) 30%, transparent);
}
.group-title:first-child { margin-top: 0; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mrow-hidden { opacity: .5; }
.menu-group { cursor: grab; border-radius: 12px; transition: opacity .12s ease; }
.menu-group.dragging { opacity: .4; }
.menu-group.drop-before { box-shadow: inset 0 3px 0 var(--s1); }
.menu-group.drop-after { box-shadow: inset 0 -3px 0 var(--s1); }
.drag-handle { cursor: grab; color: var(--muted); margin-right: 2px; }
.cat-title-main { display: flex; align-items: center; gap: 8px; }
.cat-thumb { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.mrow .mname { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.mrow .mname small { color: var(--muted); }
.mrow .mprice { width: 110px; flex: 0 0 auto; text-align: right; }
.mrow .mimg { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.mrow .mimg img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.mrow .mnote { flex: 1 1 auto; min-width: 200px; resize: vertical; font: inherit; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.badge.sirada { color: var(--muted); }
.badge.gonderildi { color: var(--warn); border-color: var(--warn); }
.badge.uygulandi { color: var(--ok); border-color: var(--ok); }
.badge.hata { color: var(--err); border-color: var(--err); }
.badge.onay_bekliyor { color: var(--warn); border-color: var(--warn); }
.badge.reddedildi { color: var(--muted); border-color: var(--line); }
.badge.degisti { color: var(--s1); border-color: var(--s1); }

.split { display: grid; grid-template-columns: 1fr; gap: 16px; }
.phone { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #000; height: 520px; }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }

.qr-wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
#qrBox { background: #fff; padding: 12px; border-radius: 12px; line-height: 0; }
#qrBox img, #qrBox canvas { display: block; }
.qr-side { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }

/* Ozel-stilli dosya yukleme dugmesi: GERCEK <input type=file> dogrudan
   goruntulenen dugmenin TAM UZERINE (opacity:0, tam boy/genislik) kaplanir -
   boylece kullanicinin parmagi/tiklamasi HER ZAMAN dogrudan input'un kendi
   uzerine duser (bir <label for> baglantisina veya JS .click() tetiklemesine
   guvenmez). Bazi mobil/gomulu tarayicilarda (bkz. app.js yorumlari) o iki
   yontem sessizce basarisiz olabiliyor - bu, dosya secicileri icin en saglam,
   yaygin kullanilan teknik. */
/* transform:scale() (.btn:active'den miras) dokunmatik tarayicilarda
   tiklamayi "kaydirma jesti" sanip IPTAL etme riski tasiyor - tam da bu
   dugmenin uzerinde oturan dosya girisi icin ISTENMEYEN bir davranis, o
   yuzden BURADA acikca iptal edilir. */
.upload-btn { position: relative; display: inline-block; overflow: hidden; }
.upload-btn:active { transform: none; }
.upload-btn input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 100px; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .12s ease, border-color .12s ease; }
.preset-swatch:hover { border-color: var(--text); transform: scale(1.1); }
.preset-swatch:active { transform: scale(.95); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1.15fr .85fr; }
}
