/* ============================================================
   style.css — Celalin Yeri Modern UI
   Tasarım: Inter font, warm dark theme, glassmorphism kartlar,
   gradient aksanlar, 3-kırılımlı responsive (mobile/tablet/desktop)
   ============================================================ */

/* ===== RESET & TOKENS ===== */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Renk paleti — warm dark */
  --bg:          #0f1117;
  --bg2:         #161921;
  --panel:       #1c2030;
  --panel2:      #232838;
  --border:      #2d3347;
  --border2:     #3a4160;

  /* Aksanlar */
  --amber:       #f59e0b;
  --amber-dim:   #d97706;
  --amber-glow:  rgba(245,158,11,.18);
  --teal:        #10b981;
  --teal-dim:    #059669;
  --teal-glow:   rgba(16,185,129,.18);
  --red:         #ef4444;
  --red-dim:     #dc2626;
  --red-glow:    rgba(239,68,68,.15);

  /* Metin */
  --text:        #f1f0ed;
  --text2:       #9ca3af;
  --text3:       #6b7280;

  /* Boyutlar */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   22px;
  --header-h:    64px;
  --editbar-h:   52px;

  /* Animasyon */
  --ease:        cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
header {
  height: var(--header-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,.4);
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dim));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 12px var(--amber-glow);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: .95rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand-sub  { font-size: .7rem; color: var(--text3); font-weight: 400; }

/* Stats */
.header-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  flex-shrink: 0;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}
.stat-icon { font-size: 1rem; }
.stat-info { display: flex; flex-direction: column; line-height: 1.2; }
.stat-info b { font-size: .95rem; font-weight: 700; color: var(--teal); }
.stat-info span { font-size: .65rem; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-divider { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }

/* Sync kartı */
.sync-card { gap: 6px; }
.sync-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--text3);
  transition: background .3s;
  flex-shrink: 0;
}
.sync-dot.online  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); }
.sync-dot.syncing { background: var(--amber); animation: pulse 1s infinite; }
.sync-dot.offline { background: var(--red); }
.sync-label { font-size: .72rem; color: var(--text3); white-space: nowrap; }

@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }

/* Butonlar */
.header-btns {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== BUTON SİSTEMİ ===== */
button {
  cursor: pointer; border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 500; font-size: .85rem;
  transition: all .15s var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; line-height: 1;
}
button:active { transform: scale(.96); }

/* Icon buton (header) */
.btn-icon {
  background: transparent;
  color: var(--text2);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: .82rem;
}
.btn-icon:hover { background: var(--panel2); color: var(--text); border-color: var(--border); }
.btn-icon.active, .btn-icon.editon {
  background: rgba(245,158,11,.15);
  color: var(--amber);
  border-color: rgba(245,158,11,.3);
}
.btn-icon svg { flex-shrink: 0; }

/* Primer buton */
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--teal-glow);
  font-size: .88rem;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 14px var(--teal-glow); }

/* Tehlike butonu */
.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-dim));
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--red-glow);
  font-size: .88rem;
  font-weight: 600;
}
.btn-danger:hover { filter: brightness(1.1); }

/* Ghost butonlar */
.btn-outline-success {
  background: var(--teal-glow);
  color: var(--teal);
  border: 1px solid rgba(16,185,129,.3);
  padding: 8px 14px;
}
.btn-outline-success:hover { background: rgba(16,185,129,.25); }

.btn-outline-muted {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 8px 14px;
}
.btn-outline-muted:hover { background: var(--panel2); color: var(--text); }

.btn-ghost-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,.3);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: .88rem;
}
.btn-ghost-danger:hover { background: var(--red-glow); }

/* Undo devre dışı */
#undoBtn:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }

/* ===== DÜZENLEME ÇUBUĞU ===== */
.editbar {
  display: none;
  height: var(--editbar-h);
  background: linear-gradient(90deg, rgba(245,158,11,.08), rgba(245,158,11,.04));
  border-bottom: 1px solid rgba(245,158,11,.2);
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.editbar.show { display: flex; }
.editbar-info {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--amber); font-weight: 500;
}
.editbar-actions { display: flex; gap: 8px; }

/* ===== KAT PLANI ===== */
.layout-wrap {
  flex: 1;
  overflow: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(16,185,129,.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245,158,11,.03) 0%, transparent 60%),
    var(--bg);
}

.floor {
  position: relative;
  background: #f0ddc0;
  margin: auto;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.3),
    0 12px 60px rgba(0,0,0,.6),
    0 4px 20px rgba(0,0,0,.4);
  border-radius: 2px;
}

/* ===== KAT PLANI ELEMANLARİ ===== */
.wall   { position: absolute; background: #12151e; z-index: 5; }
.door   { position: absolute; background: #f0ddc0; z-index: 6; border: 1px dashed #b9a87f; }
.door-label { position: absolute; color: #8a7350; z-index: 7; pointer-events: none; }
.column {
  position: absolute; background: #12151e; border: 3px solid #2a2d34; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  color: #9a9a9a; font-weight: 700; border-radius: 2px;
}
.room-label {
  position: absolute; font-weight: 700; color: #6e5436;
  letter-spacing: 1px; text-align: center; line-height: 1.3;
  pointer-events: none; z-index: 2;
}
.fixture {
  position: absolute; border-radius: 3px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; z-index: 6;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); padding: 2px;
  border: 2px solid rgba(0,0,0,.35); overflow: hidden;
}
.wc-room {
  position: absolute; background: #eef2f7; border: 3px solid #12151e; z-index: 4;
  display: flex; align-items: flex-start; justify-content: center;
  color: #3a5bad; font-weight: 700;
}

/* ===== MASA BUTONLARI ===== */
.table-btn {
  position: absolute;
  border: 2px solid #a07850;
  background: linear-gradient(160deg, #d4aa7d, #c09060);
  color: #2b1d10;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700;
  transition: filter .12s, box-shadow .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15);
  padding: 4px; overflow: hidden; z-index: 7;
  font-family: 'Inter', system-ui, sans-serif;
}
.table-btn:active { filter: brightness(1.15); }

/* Dolu masa */
.table-btn.occupied {
  background: linear-gradient(160deg, #16a34a, #15803d);
  border-color: #166534;
  color: #fff;
  box-shadow:
    0 0 0 2px #4ade80,
    0 4px 16px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.1);
}
.table-btn.occupied .ttotal { color: #fde68a; }
.table-btn .ttime { color: #bbf7d0; opacity: .9; font-size: .78em; }

/* Uzun süre açık */
.table-btn.long-open {
  box-shadow:
    0 0 0 2px var(--amber),
    0 4px 16px rgba(0,0,0,.4),
    0 0 20px rgba(245,158,11,.2);
}
.table-btn.long-open .ttime { color: #fde68a; }

/* Düzenleme modu */
.table-btn.editing {
  cursor: grab;
  border-style: dashed;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber), 0 0 14px rgba(245,158,11,.25);
}
.table-btn.editing:active { cursor: grabbing; }

/* Silme butonu */
.table-del {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: #fff;
  border: 2px solid var(--bg);
  font-size: .68rem; display: flex; align-items: center; justify-content: center;
  z-index: 9; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 100; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--panel);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.4);
}
.modal-wide { max-width: 560px; }

.modal-head {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--panel); z-index: 2;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title-wrap { display: flex; align-items: center; gap: 12px; }
.modal-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.order-icon    { background: linear-gradient(135deg, rgba(16,185,129,.2), rgba(16,185,129,.1)); }
.settings-icon { background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(245,158,11,.1)); }
.modal-head h2 { font-size: 1.1rem; font-weight: 700; }

.close-x {
  background: var(--panel2); color: var(--text2);
  border: 1px solid var(--border);
  width: 34px; height: 34px; border-radius: var(--radius-md);
  padding: 0; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.close-x:hover { color: var(--text); border-color: var(--border2); }

.modal-body { padding: 20px 24px 24px; }

/* Section label */
.section-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: 10px; margin-top: 4px;
  display: flex; justify-content: space-between; align-items: center;
}

/* ===== ÜRÜN GRİDİ ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.prod-btn {
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 8px;
  border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .15s var(--ease);
  text-align: center;
}
.prod-btn:hover { border-color: var(--teal); background: rgba(16,185,129,.08); }
.prod-btn:active { background: var(--teal-glow); border-color: var(--teal); color: var(--teal); }
.prod-btn .pprice { font-size: .72rem; color: var(--text3); font-weight: 400; }

/* ===== SİPARİŞ LİSTESİ ===== */
.order-list { list-style: none; margin-bottom: 16px; }
.order-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: .9rem; gap: 10px;
}
.order-item:last-child { border-bottom: none; }
.order-item .qty-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.qty-ctrl button {
  width: 30px; height: 30px; padding: 0; border-radius: var(--radius-sm);
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--text); font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.qty-ctrl button:hover { border-color: var(--border2); background: var(--border); }
.qty-ctrl .qty-num { font-weight: 600; min-width: 20px; text-align: center; }

.order-item .line-total {
  min-width: 72px; text-align: right;
  color: var(--teal); font-weight: 600;
}
.empty-note {
  color: var(--text3); text-align: center; padding: 20px 0;
  font-size: .88rem;
}

/* Toplam */
.grand-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--bg2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 1.1rem; font-weight: 600;
}
.grand-total b { color: var(--amber); font-size: 1.35rem; font-weight: 800; }

/* Masa meta bilgisi */
.table-meta {
  display: none;
  font-size: .8rem; color: var(--text3);
  padding: 6px 12px; margin-bottom: 14px;
  background: var(--bg2); border-radius: var(--radius-sm);
  border-left: 3px solid var(--teal);
}

/* Modal aksiyonları */
.modal-actions {
  display: flex; gap: 10px; margin-top: 4px;
}
.modal-actions button { flex: 1; padding: 13px; font-size: .92rem; }
.modal-actions-settings { margin-top: 16px; }

/* ===== AYARLAR ===== */
.settings-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: var(--bg2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.settings-row:hover { border-color: var(--border2); }
.settings-row input[type=text]   { flex: 2; }
.settings-row input[type=number] { flex: 1; }
.settings-row .btn-ghost-danger  { padding: 7px 10px; border-radius: var(--radius-sm); }

input[type=text], input[type=number] {
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: .9rem; font-family: inherit; width: 100%;
  transition: border-color .15s;
}
input[type=text]:focus, input[type=number]:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}
input::placeholder { color: var(--text3); }

.add-prod-form {
  display: flex; gap: 8px; margin: 14px 0;
  padding: 14px; background: var(--bg2);
  border-radius: var(--radius-md); border: 1px solid var(--border);
}
.add-prod-form input[type=number] { max-width: 90px; }
.add-prod-form .btn-primary { padding: 10px 16px; flex-shrink: 0; }

/* ===== SATIŞ GEÇMİŞİ ===== */
.history-section { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.history-sum-inline { font-size: .85rem; font-weight: 600; color: var(--text2); }
.history-sum-inline b { color: var(--amber); }

.history-list {
  list-style: none;
  max-height: 220px; overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}
.history-item {
  display: flex; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .84rem; gap: 10px;
  background: var(--bg2);
  transition: background .1s;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--panel2); }
.history-item .h-when { color: var(--text3); font-size: .78rem; }
.history-item .h-total { color: var(--teal); font-weight: 700; flex-shrink: 0; }
.history-empty { color: var(--text3); font-size: .88rem; text-align: center; padding: 16px; }
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 22px; border-radius: var(--radius-lg);
  font-weight: 500; font-size: .88rem;
  z-index: 200; opacity: 0;
  transition: opacity .25s, transform .25s var(--ease);
  pointer-events: none; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ===== KAYDEDİLDİ ROZETİ ===== */
.saved-badge {
  position: fixed; top: 12px; left: 50%;
  transform: translateX(-50%) translateY(-40px);
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  color: #fff; padding: 7px 20px; border-radius: 20px;
  font-size: .82rem; font-weight: 600; z-index: 150;
  opacity: 0; pointer-events: none;
  box-shadow: 0 4px 16px var(--teal-glow);
  transition: opacity .25s, transform .25s var(--ease);
}
.saved-badge.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== ONAY MODALİ ===== */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .18s;
}
.confirm-overlay.show { opacity: 1; }
.confirm-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 400px;
  padding: 32px 28px; text-align: center;
  transform: scale(.92) translateY(8px);
  transition: transform .22s var(--ease);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.confirm-overlay.show .confirm-box { transform: scale(1) translateY(0); }
.confirm-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.confirm-msg { font-size: .92rem; color: var(--text2); margin-bottom: 4px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; margin-top: 24px; }
.confirm-actions button {
  flex: 1; padding: 16px 10px; font-size: 1.05rem; font-weight: 700; border-radius: var(--radius-md);
}
.confirm-no  { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.confirm-yes { background: linear-gradient(135deg, var(--teal), var(--teal-dim)); color: #fff; box-shadow: 0 4px 14px var(--teal-glow); }
.confirm-yes.danger { background: linear-gradient(135deg, var(--red), var(--red-dim)); box-shadow: 0 4px 14px var(--red-glow); }

/* ===== BÜYÜK DOKUNMA MODU ===== */
body.big-mode .prod-btn    { padding: 20px 8px; font-size: 1.15rem; min-height: 80px; }
body.big-mode .prod-btn .pprice { font-size: .95rem; }
body.big-mode .order-item  { font-size: 1.1rem; padding: 16px 0; }
body.big-mode .qty-ctrl button { width: 46px; height: 46px; font-size: 1.5rem; }
body.big-mode .order-item .line-total { font-size: 1.15rem; min-width: 90px; }
body.big-mode .grand-total { font-size: 1.15rem; }
body.big-mode .grand-total b { font-size: 1.55rem; }
body.big-mode .modal-actions button { padding: 18px; font-size: 1.15rem; }
body.big-mode .modal-head h2 { font-size: 1.3rem; }

/* ===== TABLET MODU ===== */
/* Tablet modunda sipariş modalı yan panel olarak açılır */
body.tablet-mode .modal-overlay#orderModal {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(0,0,0,.5);
}
body.tablet-mode .modal-overlay#orderModal .modal {
  max-width: 360px;
  max-height: 100vh;
  height: 100%;
  border-radius: 0;
  border-left: 1px solid var(--border);
  border-top: none; border-bottom: none; border-right: none;
}
body.tablet-mode .modal-head {
  border-radius: 0;
}

/* Tablet modunda kat planı tam genişlik, modal sidebar */
body.tablet-mode .layout-wrap {
  transition: width .25s var(--ease);
}

/* Tablet mod badge */
#tabletModeBtn.active {
  background: rgba(16,185,129,.15);
  color: var(--teal);
  border-color: rgba(16,185,129,.3);
}

/* ===== RESPONSIVE: TABLET (761 — 1024px) ===== */
@media (min-width: 761px) and (max-width: 1024px) {
  header { padding: 0 14px; gap: 10px; }
  .brand-sub { display: none; }
  .header-stats { padding: 6px 10px; gap: 0; }
  .stat-card { padding: 0 8px; }
  .stat-info b { font-size: .88rem; }
  .btn-icon span { display: none; }
  .btn-icon { padding: 8px 10px; }
}

/* ===== RESPONSIVE: MOBİL (≤ 760px) ===== */
@media (max-width: 760px) {
  :root { --header-h: auto; }

  header {
    flex-wrap: wrap;
    padding: 10px 14px;
    height: auto;
    gap: 10px;
  }
  .header-brand { width: 100%; }
  .brand-name { font-size: 1rem; }

  .header-stats {
    width: 100%; justify-content: space-around;
    background: var(--bg2);
    padding: 8px 12px;
  }
  .stat-card { padding: 0 6px; }
  .stat-info b { font-size: .9rem; }

  .header-btns { width: 100%; flex-wrap: wrap; }
  .btn-icon { flex: 1; justify-content: center; }
  .btn-icon span { display: none; }
  .btn-primary#settingsBtn { flex: 1; justify-content: center; }

  /* Mobilde modal bottom sheet */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: none;
  }
  .modal-head { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }

  /* Ayarlar modalı tam ekran */
  .modal-overlay#settingsModal .modal {
    max-height: 100vh;
    border-radius: 0;
  }

  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .confirm-actions button { padding: 18px 10px; font-size: 1.1rem; }
  .confirm-title { font-size: 1.2rem; }

  .editbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .editbar-info { font-size: .78rem; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .header-btns button { min-width: 0; }
}

/* ===== SCROLLBAR ===== */
.layout-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.layout-wrap::-webkit-scrollbar-track { background: transparent; }
.layout-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 6px; }
.layout-wrap::-webkit-scrollbar-corner { background: transparent; }