:root {
  --accent:  #ff6b35;
  /* Yedek tanımlar: normalde layout tema rengine göre bunları ezer. Layout'suz
     sayfalarda (giriş, fiş, kilit ekranı) burası devreye girer. */
  --accent-rgb: 255,107,53;
  --accent-strong: #d1571c;
  --accent-text: #ff8a5c;
  --accent-soft: rgba(255,107,53,.15);
  --accent2: #0FAE9E;
  --bg:      #f4f5f9;
  --surface: #ffffff;
  --sidebar: #111827;
  --sidebar-w: 240px;
  --border:  #e5e7eb;
  --ink:     #111827;
  --ink2:    #374151;
  --muted:   #6b7280;
  --green:   #16a34a;
  --red:     #dc2626;
  --warn:    #d97706;
  --radius:  12px;
  --radius-lg: 18px;
  --shadow:  0 2px 10px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
body { font-family: Inter, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.admin-shell, body { display: flex; min-height: 100vh; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--sidebar); color: #c9d0de;
  display: flex; flex-direction: column; z-index: 100;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.brand span, .brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #ff3a1a);
  display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 14px;
}
.brand b { color: #fff; font-size: 14px; font-weight: 800; }
.side nav { padding: 12px 10px; flex: 1; }
.side nav a {
  display: flex; align-items: center; gap: 9px;
  color: #9ca3af; padding: 10px 12px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; transition: background .12s, color .12s; margin-bottom: 2px;
}
.side nav a:hover { background: #1f2937; color: #e5e7eb; }
.side nav a.active { background: #1e2538; color: #fff; border-left: 3px solid var(--accent); padding-left: 9px; }
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.sidebar-footer span { font-size: 13px; color: #9ca3af; }
.sidebar-footer a { color: #6b7280; font-size: 13px; }
.sidebar-footer a:hover { color: #ef4444; }

.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,245,249,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar small { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.topbar h1 { font-size: 20px; font-weight: 800; margin-top: 2px; }
.topbar .topbar-right { display: flex; align-items: center; gap: 10px; }

.main-content { padding: 22px 24px; flex: 1; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { font-size: 16px; font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow); }
.stats small { color: var(--muted); font-weight: 700; font-size: 12px; }
.stats b { display: block; font-size: 26px; font-weight: 900; margin: 6px 0 3px; }
.stats span { color: var(--green); font-weight: 700; font-size: 12px; }

.btn-primary, .primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: 0;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; transition: filter .12s; white-space: nowrap;
}
.btn-primary:hover, .primary:hover { filter: brightness(.92); }
.btn-soft, .soft {
  background: var(--bg); color: var(--ink); border: 1.5px solid var(--border);
  padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 13px;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn-soft:hover { background: var(--border); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-icon-danger {
  width: 36px; height: 36px; border-radius: 9px; border: 0;
  background: #fee2e2; color: var(--red); display: grid; place-items: center; cursor: pointer;
}
.btn-icon-danger:hover { background: #fecaca; }

.alert { padding: 11px 15px; border-radius: 11px; font-weight: 700; margin-bottom: 16px; }
.alert-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: var(--surface); color: var(--ink); width: 100%;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.1);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-vertical { display: grid; gap: 12px; }
.form-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; background: #f9fafb; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 18px; }
.form-card.vertical { grid-template-columns: 1fr; }
.form-card input, .form-card select { border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.form-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.check-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }

.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.status-ok  { background: #dcfce7; color: #166534; }
.status-off { background: #fee2e2; color: var(--red); }

.orders-summary {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 22px;
}
.osm-card {
  background: var(--surface); border-radius: var(--radius); border: 1.5px solid var(--border);
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.osm-card b { display: block; font-size: 28px; font-weight: 900; }
.osm-card small { color: var(--muted); font-size: 12px; font-weight: 700; }
.osm-yeni  b { color: var(--accent); }
.osm-aktif b { color: var(--warn); }
.osm-teslim b { color: var(--green); }
.osm-iptal b { color: var(--red); }

.orders-section { margin-bottom: 28px; }
.orders-section-title { font-size: 16px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.aktif-badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 13px; }

.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 14px; }
.order-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.order-card--yeni { border-color: var(--accent); background: #fff9f7; }
.order-card--warn { border-color: var(--warn); background: #fffbf0; }

/* Başlık taşması düzeltmesi: uzun teslimat-tercihi rozeti ('Zili çalın ·
   Gelmeden arayın' gibi) nowrap olduğu için satıra sığmayınca esnek kutu
   sipariş numarasını 1 karakter genişliğe eziyor, numara alt alta
   kırılıyordu. Bilgi kutusu artık sarmalanır (rozet gerekirse kendi
   satırına iner), numara ve tutar tek satırda sabit kalır. */
.ocard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ocard-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ocard-no { font-weight: 800; font-size: 15px; white-space: nowrap; }
.ocard-price { font-size: 17px; font-weight: 900; color: var(--ink); white-space: nowrap; flex: 0 0 auto; }

.ocard-dur {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.dur-yeni  { background: #fff0e9; color: #c2410c; }
.dur-onay  { background: #dcfce7; color: #166534; }
.dur-hazir { background: #fef3c7; color: #92400e; }
.dur-yolda { background: #dbeafe; color: #1d4ed8; }
.dur-teslim { background: #f0fdf4; color: #15803d; }
.dur-iptal { background: #fee2e2; color: var(--red); }

.ocard-body { display: flex; flex-direction: column; gap: 6px; }
.ocard-customer { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink2); }
.ocard-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.ocard-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 12px; }
.ocard-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; flex: 1; }
.ocard-select {
  border: 1.5px solid var(--border); border-radius: 9px; padding: 7px 10px;
  font-size: 12.5px; font-weight: 700; background: var(--bg); flex: 1; min-width: 110px;
}

.geçmis-table-wrap { overflow-x: auto; }
.gecmis-table { min-width: 560px; }
.gecmis-cards { display: none; }

.gecmis-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px; margin-bottom: 9px;
}

.empty-orders { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-orders h3 { color: var(--ink); margin: 12px 0 6px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kademe-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.odeme-yontem-list { display: grid; gap: 8px; }
.odeme-yontem-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 600; transition: border-color .12s;
}
.odeme-yontem-item:has(input:checked) { border-color: var(--accent); background: #fff9f7; }
.odeme-yontem-item input { accent-color: var(--accent); }

.auth-shell { background: #0b0d17; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-box { width: min(420px,92vw); background: #fff; border-radius: 22px; padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-logo span { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg,var(--accent),#ff3a1a); display: grid; place-items: center; color: #fff; font-weight: 900; }
.auth-logo b { font-size: 18px; font-weight: 800; }
.auth-box h2 { font-size: 23px; font-weight: 900; margin-bottom: 4px; }
.auth-box p { color: var(--muted); margin-bottom: 18px; font-size: 13.5px; }
.auth-box form { display: grid; gap: 13px; }
.auth-box label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.auth-box input { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.auth-box input:focus { outline: none; border-color: var(--accent); }
.auth-box button { border: 0; border-radius: 12px; padding: 13px; background: linear-gradient(135deg,var(--accent),#ff3a1a); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; margin-top: 2px; }
.auth-error { background: #fee2e2; color: var(--red); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; font-weight: 700; margin-bottom: 14px; }

[hidden] { display: none ; }
.mini-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  /* Mobil çekmece kuralları bilerek burada DEĞİL, dosyanın en sonunda toplandı — bkz.
     "Mobil menü çekmecesi" bölümü. Burada tanımlandığında, dosyanın ilerisindeki
     `.menu-ac { display:none }` aynı özgüllükte ve daha sonra geldiği için kazanıyor ve
     hamburger düğmesi hiçbir genişlikte görünmüyordu. */
  .main { margin-left: 0; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .orders-summary { grid-template-columns: repeat(2,1fr); }
  .order-cards { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-content { padding: 14px 16px; }
  .topbar { padding: 0 16px; }
  .topbar h1 { font-size: 17px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .geçmis-table-wrap { display: none; }
  .gecmis-cards { display: block; }
  .ocard-form { flex-direction: column; }
  .ocard-select { min-width: unset; width: 100%; }
  .ocard-actions { flex-direction: column; }
  .ocard-actions .btn-soft, .ocard-actions .btn-primary { width: 100%; justify-content: center; }
}

.side nav a { display: flex; align-items: center; gap: 9px; }
.side nav a svg { opacity: .65; flex-shrink: 0; }
.side nav a:hover svg, .side nav a.active svg { opacity: 1; }

.side { display: flex; flex-direction: column; }
.side nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }

.alert-err { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

.auth-shell { display: block ; }

.iade-uyari {
  background: #fef3c7; border: 1.5px solid #fbbf24;
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13.5px; color: #92400e; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.iade-uyari a { font-weight: 800; color: #78350f; text-decoration: underline; }
.iade-badge {
  background: #fef3c7; color: #92400e; border: 1px solid #fbbf24;
  border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 800;
}
.tr-iade td { background: #fffbf0; }

.index-hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1e2133, #111827);
  color: #fff; border-radius: var(--radius-lg); padding: 22px 24px;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.index-hero-info h2 { font-size: 22px; font-weight: 900; margin: 6px 0 4px; }
.index-hero-info p  { color: #9ca3af; font-size: 13px; margin: 0; }
.idx-badge { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 11px; }
.idx-acik  { background: #dcfce7; color: #166534; }
.idx-kapali { background: #fee2e2; color: #dc2626; }

.odetail-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start;
}
.odetail-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px;
}
.odetail-meta > div {
  background: #f9fafb; border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px;
}
.odetail-meta small { display: block; font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.odetail-meta b { display: block; font-size: 13.5px; font-weight: 800; }
.odetail-meta span { display: block; font-size: 12.5px; color: #6b7280; margin-top: 2px; }

.gecmis-card--iade { background: #fffbf0; border-color: #fbbf24; }

@media (max-width: 900px) {
  .odetail-grid { grid-template-columns: 1fr; }
  .odetail-meta { grid-template-columns: 1fr; }
}

/* ── Masalar / QR menü ── */
.masa-ekle { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.masa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.masa-kart { border: 1px solid #e5e8ef; border-radius: 14px; padding: 16px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.masa-kart.pasif { opacity: .55; }
.masa-qr { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.masa-qr img, .masa-qr canvas { display: block; }
.masa-bilgi { text-align: center; }
.masa-bilgi b { display: block; font-size: 16px; }
.masa-link { font-size: 12px; color: var(--brand, var(--accent)); text-decoration: none; }
.masa-islem { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.masa-duzenle { display: flex; gap: 4px; width: 100%; margin-bottom: 4px; }
.masa-duzenle input[name=masaAdi] { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid #d7dbe3; border-radius: 7px; font-size: 13px; }
.masa-duzenle input[type=number] { padding: 5px; border: 1px solid #d7dbe3; border-radius: 7px; font-size: 13px; }
.soft.danger { color: #b91c1c; }

/* ── QR menü ayar formu ── */
.qr-ayar-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.qr-ayar-form .field { display: flex; flex-direction: column; gap: 5px; }
.qr-ayar-form .field > span { font-size: 13px; font-weight: 600; color: #374151; }
.qr-ayar-form input[type=text], .qr-ayar-form select, .qr-ayar-form textarea { padding: 9px 11px; border: 1px solid #d7dbe3; border-radius: 9px; font-size: 14px; font-family: inherit; }
.qr-ayar-form input[type=color] { width: 60px; height: 38px; padding: 2px; border: 1px solid #d7dbe3; border-radius: 8px; cursor: pointer; }
.qr-renk-satir { display: flex; gap: 16px; }
.qr-arkaplan { border: 1px dashed #d7dbe3; border-radius: 12px; padding: 14px; background: #fafbfc; display: flex; flex-direction: column; gap: 8px; }
.qr-etiket { font-size: 13px; font-weight: 600; color: #374151; }
.qr-bg-onizleme img { max-width: 200px; max-height: 110px; border-radius: 8px; object-fit: cover; }

/* ── Yeni sipariş sesi / bildirim ─────────────────────────────────────────── */
.ses-dugme { border: 1px solid #e2ded9; background: #fff; border-radius: 10px; width: 36px; height: 36px; font-size: 17px; line-height: 1; cursor: pointer; padding: 0; transition: box-shadow .15s ease, border-color .15s ease; }
.ses-dugme:hover { border-color: #ff6b35; }
.ses-dugme[data-durum="acik"] { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
/* Kilitli = ses AÇIK ama tarayıcı bu sayfada henüz izin vermedi. Kapalı değil, bekliyor —
   ikon yine 🔔 kalır, yalnızca çerçeve nabız atar. */
.ses-dugme[data-durum="kilitli"] { border-color: #f59e0b; animation: sesNabiz 2s ease-in-out infinite; }
.ses-dugme[data-durum="kapali"] { opacity: .55; }
@keyframes sesNabiz { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.45); } 50% { box-shadow: 0 0 0 5px rgba(245,158,11,0); } }

/* Kilitliyken bir bildirim düşerse: ses kuyruğa alınır, bu çubuk çıkar, tıklanınca çalar. */
.ses-kilit-uyari { position: fixed; left: 18px; bottom: 18px; z-index: 9100; border: none; border-radius: 12px; background: #f59e0b; color: #1f2937; font-family: inherit; font-size: 14px; font-weight: 800; padding: 13px 18px; cursor: pointer; box-shadow: 0 10px 28px rgba(245,158,11,.35); }
.ses-kilit-uyari:hover { background: #fbbf24; }
.ses-rozet { display: none; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; margin-left: -6px; }

.yeni-siparis-toast { position: fixed; right: 18px; bottom: 18px; z-index: 9000; background: #111827; color: #fff; border-radius: 14px; padding: 14px 18px; min-width: 230px; box-shadow: 0 12px 34px rgba(0,0,0,.28); opacity: 0; transform: translateY(14px); transition: opacity .25s ease, transform .25s ease; }
.yeni-siparis-toast.acik { opacity: 1; transform: translateY(0); }
.yeni-siparis-toast .yst-ust { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.yeni-siparis-toast .yst-alt { font-size: 13px; opacity: .8; }
.yeni-siparis-toast .yst-link { display: inline-block; margin-top: 9px; color: var(--accent-text); font-size: 13px; font-weight: 700; text-decoration: none; }
.yeni-siparis-toast .yst-link:hover { text-decoration: underline; }

/* Masa (QR) kaynaklı sipariş rozeti */
.masa-rozet { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: #7c3aed; background: #ede9fe; padding: 2px 8px; border-radius: 6px; }

/* ── Tahsilat rozetleri ───────────────────────────────────────────────────── */
.odeme-rozet { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.odeme-ok { color: #15803d; background: #dcfce7; }
.odeme-bekliyor { color: #b45309; background: #fef3c7; }
.odeme-iptal { color: #9ca3af; background: #f3f4f6; }
.btn-tahsil { border-color: #16a34a !important; color: #15803d !important; font-weight: 800; }
.btn-tahsil:hover { background: #dcfce7 !important; }

/* ── Aktif personel göstergesi (üst bar) ──────────────────────────────────── */
.personel-chip { display:flex; flex-direction:column; align-items:flex-start; gap:1px; padding:6px 12px; border:1px solid #e2ded9; border-radius:10px; text-decoration:none; color:inherit; line-height:1.2; }
.personel-chip:hover { border-color:#ff6b35; }
.personel-chip.chip-secili { border-color:#16a34a; background:#f0fdf4; }
.personel-chip .chip-ad { font-size:13px; font-weight:800; }
.personel-chip .chip-rol { font-size:10.5px; color:#8a8480; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }

/* ── Masa ızgarası (garson servis ekranı) ─────────────────────────────────── */
.masa-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:12px; }
.masa-kutu { display:block; padding:16px 14px; border-radius:14px; text-decoration:none; color:inherit; border:1.5px solid #e5e7eb; background:#fff; transition:border-color .15s, box-shadow .15s; min-height:104px; }
.masa-kutu:hover { border-color:#ff6b35; box-shadow:0 4px 14px rgba(0,0,0,.06); }
.masa-kutu.masa-dolu { border-color:#f59e0b; background:#fffbeb; }
.masa-kutu .masa-ad { font-size:16px; font-weight:900; margin-bottom:6px; }
.masa-kutu .masa-tutar { font-size:19px; font-weight:900; color:#b45309; }
.masa-kutu .masa-alt { font-size:12px; color:#6b7280; margin-top:3px; }
.masa-kutu .masa-durum { font-size:11px; font-weight:800; color:#92400e; margin-top:6px; }
.masa-kutu .masa-alt-bos { font-size:12.5px; color:#9ca3af; margin-top:10px; }

/* ── Adisyon ekranı ───────────────────────────────────────────────────────── */
.adisyon-duzen { display:grid; grid-template-columns:minmax(320px,1fr) minmax(320px,1.1fr); gap:18px; align-items:start; }
@media (max-width:900px) { .adisyon-duzen { grid-template-columns:1fr; } }
.adisyon-tablo td { vertical-align:top; }
.satir-not { font-size:11.5px; color:#6b7280; margin-top:2px; }
.adisyon-toplam { display:flex; justify-content:space-between; align-items:center; margin-top:14px; padding-top:14px; border-top:2px dashed #e5e7eb; font-size:16px; }
.adisyon-toplam b { font-size:22px; font-weight:900; }
.adisyon-kapat { margin-top:16px; padding-top:16px; border-top:1px solid #f0f0f0; }
.menu-ara { width:100%; padding:10px 13px; border:1px solid #e2ded9; border-radius:10px; font-size:14px; font-family:inherit; margin-bottom:14px; }
.menu-grup { margin-bottom:16px; }
.menu-grup h4 { margin:0 0 8px; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:#8a8480; }
.menu-urunler { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:8px; }
.menu-urun-form { margin:0; }
.menu-urun { width:100%; display:flex; flex-direction:column; gap:4px; align-items:flex-start; text-align:left; padding:11px 12px; border:1px solid #e5e7eb; border-radius:11px; background:#fff; cursor:pointer; font-family:inherit; }
.menu-urun:hover { border-color:#ff6b35; background:rgba(var(--accent-rgb),.07); }
.menu-urun .mu-ad { font-size:13px; font-weight:700; line-height:1.3; }
.menu-urun .mu-fiyat { font-size:13px; font-weight:900; color:var(--accent); }

/* ── Personel ekranı ──────────────────────────────────────────────────────── */
.tablo-sar { overflow-x:auto; }
.satir-pasif { opacity:.5; }
.rol-aciklama { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; margin-bottom:18px; }
.rol-kutu { border:1px solid #eef0f4; border-radius:11px; padding:11px 13px; background:#fafbfc; }
.rol-kutu b { display:block; font-size:13.5px; margin-bottom:3px; }
.rol-kutu span { font-size:12px; color:#6b7280; line-height:1.5; }
.rol-rozet { display:inline-block; font-size:11px; font-weight:800; padding:2px 9px; border-radius:6px; }
.rol-yonetici { color:#7c3aed; background:#ede9fe; }
.rol-kasiyer  { color:#15803d; background:#dcfce7; }
.rol-garson   { color:#1d4ed8; background:#dbeafe; }
.rol-kurye    { color:#b45309; background:#fef3c7; }

/* Servis edilmiş ama hesabı kapanmamış masa — tahsilat bekliyor */
.masa-kutu.masa-odeme { border-color:#16a34a; background:#f0fdf4; }
.masa-kutu.masa-odeme .masa-tutar { color:#15803d; }
.masa-kutu.masa-odeme .masa-durum { color:#15803d; }

/* ── Parçalı tahsilat ─────────────────────────────────────────────────────── */
.odeme-kismi { color:#1d4ed8; background:#dbeafe; }
.tahsilat-liste { margin-top:12px; display:grid; gap:6px; }
.tahsilat-satir { display:flex; align-items:center; gap:10px; padding:7px 11px; background:#f0fdf4; border:1px solid #dcfce7; border-radius:9px; font-size:13px; }
.tahsilat-satir b { margin-left:auto; font-size:14px; color:#15803d; }
.adisyon-kalan b { color:#b45309; }
.tahsil-tutar { max-width:110px; }

/* Adisyon satırında adet düzenleme */
.adet-duzen { display:flex; align-items:center; gap:7px; }
.adet-duzen form { margin:0; display:inline; }
.adet-btn { width:26px; height:26px; border:1px solid #e2ded9; border-radius:7px; background:#fff; font-size:15px; font-weight:800; line-height:1; cursor:pointer; padding:0; color:#374151; }
.adet-btn:hover { border-color:#ff6b35; }
.adet-btn.adet-artir { background:rgba(var(--accent-rgb),.07); border-color:rgba(var(--accent-rgb),.35); color:var(--accent); }
.adet-sayi { min-width:24px; text-align:center; font-weight:800; font-size:14px; }


/* space-between üç öğeyi dağıtıyor; başlık hamburger'in yanında kalsın diye sağa itiyoruz. */
.topbar-baslik { min-width: 0; margin-right: auto; }
.menu-urun-sar form { margin: 0; }
.topbar-baslik h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Adisyon satır notu ───────────────────────────────────────────────────── */
.not-ac { border: 1px dashed #d7dbe3; background: #fff; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: #6b7280; padding: 3px 9px; cursor: pointer; margin-top: 5px; font-family: inherit; }
.not-ac:hover { border-color: var(--accent); color: var(--accent); }
.not-form { margin-top: 8px; display: grid; gap: 6px; background: #fafbfc; border: 1px solid #eef0f4; border-radius: 10px; padding: 9px; }
.not-form input[type=text], .not-form input[type=number] { width: 100%; padding: 7px 9px; border: 1px solid #e2ded9; border-radius: 8px; font-size: 13px; font-family: inherit; }
.not-form .not-alt { display: flex; gap: 6px; align-items: center; }
.not-form .not-alt label { font-size: 11.5px; color: #6b7280; font-weight: 700; white-space: nowrap; }
.not-form button { border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800; padding: 7px 12px; cursor: pointer; font-family: inherit; }
.satir-not { font-size: 11.5px; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 2px 7px; margin-top: 4px; display: inline-block; font-weight: 700; }

/* Menüdeki üründe hızlı "notlu ekle" düğmesi (mobilde uzun basma güvenilir değil) */
.menu-urun-sar { position: relative; }
.menu-urun-not { position: absolute; top: 4px; right: 4px; border: none; background: transparent; font-size: 13px; line-height: 1; padding: 3px; cursor: pointer; opacity: .5; }
.menu-urun-not:hover { opacity: 1; }

/* Menüdeki ürüne satır içi not girişi */
.mu-not-alan { display: flex; gap: 5px; padding: 6px; border-top: 1px dashed #eef0f4; }
.mu-not-alan input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #e2ded9; border-radius: 7px; font-size: 12.5px; font-family: inherit; }
.mu-not-alan button { border: none; border-radius: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 10px; cursor: pointer; font-family: inherit; }


/* ══ MOBİL UYUM ════════════════════════════════════════════════════════════
   Amaç: dar ekranda sayfanın sağa sola KAYMAMASI. Yatay taşmanın üç kaynağı vardı:
   üst bardaki öğelerin sığmaması, tabloların kendi genişliklerini sayfaya dayatması ve
   boşluksuz uzun metinlerin (sipariş numarası, e-posta) satırı zorlaması.
   ════════════════════════════════════════════════════════════════════════ */

/* Izgara ve esnek kutu çocukları varsayılan olarak min-width:auto taşır; içeriklerinden
   küçülemezler. Yatay taşmanın en sık görünmeyen sebebi budur. */
.main, .main-content, .panel, .adisyon-duzen > *, .topbar-baslik { min-width: 0; }

/* Boşluksuz uzun metinler satırı zorlamasın. */
.panel-head small, .ocard-no, .satir-not, .gecmis-table td, .odetail-meta span { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  /* Tablo, sayfayı değil KENDİNİ kaydırsın. Blok kutuya dönüşünce içindeki satırlar
     anonim bir tablo kutusu oluşturur ve taşan kısım bu kutu içinde kayar. */
  .main-content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main-content table th, .main-content table td { white-space: nowrap; }
  /* Ürün adı ve not gibi uzun alanlar sarabilsin. */
  .adisyon-tablo td:first-child, .gecmis-table td:first-child { white-space: normal; }
  .not-form { max-width: 260px; }
}

@media (max-width: 640px) {
  /* Üst bar: hamburger + başlık + zil + personel + kilit 375 px'e sığmıyordu. */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-baslik small { display: none; }
  .topbar h1 { font-size: 16px; }
  .topbar .topbar-right { gap: 6px; }
  .personel-chip { padding: 5px 8px; max-width: 92px; }
  .personel-chip .chip-rol { display: none; }
  .personel-chip .chip-ad { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .panel { padding: 14px; }
  .panel-head { flex-wrap: wrap; gap: 4px 10px; }
  .masa-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .menu-urunler { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .adisyon-toplam b { font-size: 19px; }
  .rol-aciklama { grid-template-columns: 1fr; }

  /* Adisyon garsonun ana ekranı — yan yana kaydırmak zorunda kalmasın diye burada
     tablonun 560px'lik asgari genişliği kaldırılıp sütunlar sıkıştırılıyor.
     (Sipariş geçmişi tablosu bu genişlikte zaten gizlenip kart düzenine geçiyor.) */
  .adisyon-tablo { min-width: 0; }
  .adisyon-tablo th, .adisyon-tablo td { padding: 8px 5px; white-space: normal; }
  .adisyon-tablo th:nth-child(2), .adisyon-tablo td:nth-child(2) { width: 96px; }
  .adet-duzen { gap: 5px; }
  .adet-btn { width: 30px; height: 30px; }
}

/* ══ MOBİL MENÜ ÇEKMECESİ ═══════════════════════════════════════════════════
   DİKKAT — bu bölüm dosyanın SONUNDA olmalı ve bölünmemelidir.
   Önce taban kurallar, sonra kendi medya sorgusu gelir. Medya sorgusu özgüllük
   eklemediği için, taban `.menu-ac { display:none }` kuralı dosyada daha SONRA yer
   alırsa medya sorgusundaki `display:inline-flex` ezilir ve hamburger düğmesi hiçbir
   genişlikte görünmez. Bu hata bir kez yaşandı; yeni kural eklerken bu bloğun altına
   `.menu-*` seçicisi yazmayın.
   ═════════════════════════════════════════════════════════════════════════ */

/* Gizli anahtar: ekranda yer kaplamaz ama :checked durumu CSS'e kanca olur.
   display:none kullanılmaz — o durumda bazı tarayıcılar durumu takip etmez. */
.menu-anahtar { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.menu-ac { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 12px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #374151; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.menu-ac:hover { border-color: var(--accent); color: var(--accent); }
.menu-ac:active { background: #f3f4f6; }
.menu-ortu { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 99; }

@media (max-width: 900px) {
  /* Kenar çubuğu gizlenmez, soldan açılır çekmeceye dönüşür. */
  .side {
    display: flex;
    width: 274px; max-width: 84vw;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 0 0 44px rgba(0,0,0,.45);
  }
  /* Onay kutusu işaretliyse çekmece açılır — JS gerekmez.
     `.acik` sınıfı JS'in eklediği eşdeğer kancadır; ikisi birlikte çalışır. */
  .menu-anahtar:checked ~ .side,
  .side.acik { transform: translateX(0); }

  .menu-anahtar:checked ~ .menu-ortu,
  .menu-ortu.acik { display: block; }

  .menu-ac { display: inline-flex; }
}

/* Açık kaydırma kutusu — tablo genel kuralına ek olarak, kritik ekranlarda garanti eder. */
.tablo-kaydir { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* ── Günlük ciro raporu ───────────────────────────────────────────────────── */
.gun-secici { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.gun-secici input[type=date] { padding:8px 11px; border:1px solid #e2ded9; border-radius:9px; font-family:inherit; font-size:13.5px; }
.saat-grafik { display:flex; align-items:flex-end; gap:5px; height:150px; padding-top:8px; }
.saat-sutun { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:5px; }
.saat-cubuk { width:100%; background:linear-gradient(180deg,var(--accent-text),var(--accent)); border-radius:5px 5px 0 0; min-height:3px; }
.saat-sutun span { font-size:10.5px; color:#8a8378; font-weight:700; }

/* ── Bildirim zili ve şube seçici ─────────────────────────────────────────── */
.bildirim-sar { position: relative; display: flex; align-items: center; }
.bildirim-kutu { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 88vw; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.16); z-index: 200; overflow: hidden; }
.bildirim-kutu .bk-ust { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid #f0f0f0; }
.bildirim-kutu .bk-ust b { font-size: 13.5px; }
.bildirim-kutu .bk-ust button { border: none; background: transparent; color: var(--accent); font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; padding: 0; }
.bildirim-kutu .bk-liste { max-height: 380px; overflow-y: auto; }
.bildirim-kutu .bk-satir { padding: 11px 14px; border-bottom: 1px solid #f6f6f6; }
.bildirim-kutu .bk-satir.bk-yeni { background: rgba(var(--accent-rgb),.07); border-left: 3px solid var(--accent); }
.bildirim-kutu .bk-baslik { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.bildirim-kutu .bk-mesaj { font-size: 12.5px; color: #6b7280; line-height: 1.5; }
.bildirim-kutu .bk-zaman { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.bildirim-kutu .bk-bos { padding: 26px 14px; text-align: center; color: #9ca3af; font-size: 13px; }
.personel-chip.sube-chip { border-color: #c7d2fe; background: #eef2ff; }
.personel-chip.sube-chip .chip-rol { color: #4338ca; }

/* ════════════════════════════════════════════════════════════════════
   TASARIM KATMANI (v27) — yönetim paneliyle aynı tasarım sistemi.

   Önceki kuralların ÜSTÜNE yazılır; sınıf adları değişmez, ekranlar
   olduğu gibi çalışır. Yalnız görünüm: yazı tipi, renk anlamı, boşluk,
   çizgi ve köşe hiyerarşisi. Dar ekran kuralları bu katmanın sonunda
   yeniden verilir (aksi hâlde buradaki genel değerler onları ezerdi).
   Mobil çekmece (.side transform) kurallarına dokunulmaz.
   ════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f9fafb;
  --border: #e4e7ec; --border-strong: #d0d5dd;
  --ink: #101828; --ink2: #344054; --muted: #667085; --faint: #98a2b3;
  --green: #067647; --red: #b42318; --warn: #b54708;
  --ok-bg: #ecfdf3; --ok-line: #abefc6; --err-bg: #fef3f2; --err-line: #fecdca;
  --warn-bg: #fffaeb; --warn-line: #fedf89; --info: #175cd3; --info-bg: #eff8ff; --info-line: #b2ddff;
  --sidebar: #141a26; --sidebar-hover: #1c2433; --sidebar-active: #232d40; --sidebar-ink: #a7b0c0;
  --radius: 8px; --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  --shadow-md: 0 12px 32px -8px rgba(16,24,40,.18), 0 4px 8px -4px rgba(16,24,40,.06);
  --focus: 0 0 0 3px rgba(var(--accent-rgb), .22);
}
body { font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Kenar çubuğu ── */
.side { background: var(--sidebar); color: var(--sidebar-ink); scrollbar-width: thin; scrollbar-color: #2b3547 transparent; }
.brand { padding: 18px 18px 16px; border-bottom-color: rgba(255,255,255,.06); }
.brand span, .brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); font-weight: 700; }
.brand b { font-weight: 600; }
.side nav { padding: 10px 10px 16px; gap: 0; }
.side nav a {
  color: var(--sidebar-ink); padding: 7px 10px; border-radius: 7px; font-weight: 500; font-size: 13.5px;
  margin-bottom: 1px; border-left: 0; position: relative;
}
.side nav a:hover { background: var(--sidebar-hover); color: #e6e9ef; }
.side nav a.active { background: var(--sidebar-active); color: #fff; border-left: 0; padding-left: 10px; }
.side nav a.active::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side nav a.active svg { color: var(--accent-text); }

/* Menü grupları: başlık tıklanınca kapanır/açılır; seçim tarayıcıda hatırlanır. */
.nav-grup { margin-top: 10px; }
.nav-grup:first-child { margin-top: 0; }
.nav-grup > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: #7c879b; border-radius: 6px; user-select: none;
}
.nav-grup > summary::-webkit-details-marker { display: none; }
.nav-grup > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.nav-grup:not([open]) > summary::after { transform: rotate(-45deg); }
.nav-grup > summary:hover { color: #cbd2de; }
.nav-grup.aktif-grup > summary { color: #cbd2de; }

.sidebar-footer { border-top-color: rgba(255,255,255,.06); padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
.sidebar-footer .kullanici { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sidebar-footer .avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--sidebar-active); color: #e6e9ef; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.sidebar-footer .kullanici span { color: #e6e9ef; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .alt-baglanti { color: #7c879b; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.sidebar-footer .alt-baglanti:hover { color: #e6e9ef; background: var(--sidebar-hover); }
.sidebar-footer .cikis { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: #7c879b; }
.sidebar-footer .cikis:hover { background: rgba(180,35,24,.18); color: #f97066; }

/* ── Üst çubuk ── */
.topbar { background: rgba(244,245,247,.88); backdrop-filter: saturate(1.4) blur(10px); height: 56px; }
.topbar small { font-weight: 500; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 0; }
.ses-dugme { border-color: var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.ses-dugme:hover { border-color: var(--border-strong); }
.personel-chip { border-color: var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); padding: 5px 10px; }
.personel-chip .chip-ad { font-weight: 600; }
.personel-chip .chip-rol { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.personel-chip.sube-chip { border-color: #c7d7fe; background: #eef4ff; }
.ses-rozet { font-weight: 600; }

/* ── Yüzeyler ── */
.panel, .mini-card { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: var(--shadow); }
.panel + .panel, .panel + section, section + .panel { margin-top: 16px; }
.panel-head h3 { font-size: 15px; font-weight: 600; }
.panel-head small { color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.panel-page h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.muted { color: var(--muted); }

.stats div, .osm-card { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stats small, .osm-card small { font-weight: 500; font-size: 13px; color: var(--muted); }
.stats b, .osm-card b { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stats span { font-weight: 500; }
.index-hero { background: var(--sidebar); border-radius: var(--radius-lg); }
.index-hero-info h2 { font-weight: 600; }
.idx-badge { font-weight: 600; }

/* ── Tablolar ── */
table { font-variant-numeric: tabular-nums; }
th { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom-color: var(--border-strong); white-space: nowrap; }
td { padding: 10px 12px; }
tbody tr:hover td { background: #fafbfc; }
tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--border-strong); }
.tablo-sar, .tablo-kaydir, .geçmis-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.panel .tablo-sar, .panel .geçmis-table-wrap, .panel .tablo-kaydir { border: 0; border-radius: 0; }

/* ── Rozetler ── */
.badge, .ocard-dur, .odeme-rozet, .masa-rozet, .rol-rozet, .iade-badge { font-weight: 500; border-radius: 999px; }
.badge { padding: 1px 9px; line-height: 20px; border: 1px solid transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.ok, .status-ok { background: var(--ok-bg); color: var(--green); border-color: var(--ok-line); }
.badge.err, .status-off { background: var(--err-bg); color: var(--red); border-color: var(--err-line); }

/* ── Formlar ── */
.field > span, .field span { font-size: 13px; font-weight: 500; color: var(--ink2); }
.field input, .field select, .field textarea, .form-card input, .form-card select {
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  min-height: 36px; padding: 8px 11px;
}
/* Genel giriş kutuları :where() ile SIFIR özgüllükte: adisyon notu, adet gibi
   sınıfı olan küçük kutuların kendi ölçüleri her zaman kazanır. */
:where(.main-content input[type=text], .main-content input[type=search], .main-content input[type=number], .main-content input[type=date],
.main-content input[type=email], .main-content input[type=tel], .main-content input[type=password], .main-content input:not([type]),
.main-content select, .main-content textarea) {
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  min-height: 36px; padding: 8px 11px;
}
:where(.main-content input, .main-content select, .main-content textarea):focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.main-content input[type=checkbox], .main-content input[type=radio] { accent-color: var(--accent); min-height: 0; box-shadow: none; }
.form-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.form-note, .hint { font-size: 13px; color: var(--muted); }
.check-label { font-weight: 500; }

/* ── Düğmeler ── */
.btn-primary, .primary {
  background: var(--accent); border: 1px solid var(--accent-strong); border-radius: var(--radius);
  min-height: 36px; padding: 0 14px; font-weight: 500; box-shadow: var(--shadow); justify-content: center;
}
.btn-primary:hover, .primary:hover { filter: none; background: var(--accent-strong); }
.btn-soft, .soft {
  background: var(--surface); color: var(--ink2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  min-height: 36px; padding: 0 12px; font-weight: 500; box-shadow: var(--shadow); justify-content: center;
}
.btn-soft:hover, .soft:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.soft.danger, .btn-soft.danger { color: var(--red); border-color: var(--err-line); }
.btn-icon-danger { background: var(--err-bg); color: var(--red); border: 1px solid var(--err-line); border-radius: var(--radius); }

/* ── Uyarılar ── */
.alert { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; border-radius: var(--radius); padding: 11px 14px; font-size: 13.5px; }
.alert::before { content: ''; flex: 0 0 4px; align-self: stretch; border-radius: 4px; background: currentColor; opacity: .55; }
.alert-ok { background: var(--ok-bg); color: var(--green); border-color: var(--ok-line); }
.alert-err { background: var(--err-bg); color: var(--red); border-color: var(--err-line); }
.alert.info { background: var(--info-bg); color: #194185; border: 1px solid var(--info-line); }
.alert.warn, .iade-uyari { background: var(--warn-bg); color: #93370d; border: 1px solid var(--warn-line); }

/* ── Sipariş kartları ── */
.order-card { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.order-card--yeni { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .10); background: var(--surface); }
.order-card--warn { border-color: var(--warn-line); background: var(--warn-bg); }
.ocard-no { font-weight: 600; }
.ocard-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.ocard-meta { font-weight: 500; }
.ocard-select { border: 1px solid var(--border-strong); border-radius: var(--radius); font-weight: 500; background: var(--surface); }
.orders-section-title { font-weight: 600; font-size: 15px; }
.auth-box { border-radius: 16px; }
.auth-box h2 { font-weight: 600; }
.auth-box button { background: var(--accent); font-weight: 600; border-radius: var(--radius); }

/* Bu katmanın genel değerlerinden sonra dar ekran düzeltmeleri yeniden. */
@media (max-width: 640px) {
  .topbar h1 { font-size: 16px; }
  .panel { padding: 14px; }
}
