/* Garson ekranı — mobil öncelikli.
   < 768px  : tek panel, geri oku ile gezinme
   >= 768px : masalar restoran salon yerleşimiyle; masa seçilince ürünler solda, sipariş sağda */

/* Program içinde açılır: tüm kurallar .g-kok altında kalır, programın stillerine dokunmaz.
   Tema programın açık/koyu mod ayarını izler (body.dark-mode). */
.g-kok {
    --g-bg: #f3f4f7;
    --g-yuzey: #ffffff;
    --g-yuzey-2: #eef0f4;
    --g-cizgi: #dfe2e8;
    --g-yazi: #1c2230;
    --g-yazi-2: #5d6576;
    --g-birincil: #1f6feb;
    --g-birincil-yazi: #ffffff;
    --g-bos: #1f9d55;
    --g-dolu: #1f6feb;
    --g-hesap: #8250df;
    --g-gecikme: #d1242f;
    --g-kilitli: #d49a00;
    --g-golge: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --g-radius: 12px;
    --g-ust-h: 56px;
    --g-alt-bosluk: env(safe-area-inset-bottom, 0px);
    color-scheme: light;

    position: fixed;
    inset: 0;
    z-index: 1050;
    background: var(--g-bg);
    color: var(--g-yazi);
    font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body.dark-mode .g-kok {
    --g-bg: #0f131a;
    --g-yuzey: #171c25;
    --g-yuzey-2: #202733;
    --g-cizgi: #2b3341;
    --g-yazi: #e6e9ef;
    --g-yazi-2: #9aa3b2;
    --g-birincil: #4c8dff;
    --g-bos: #3fb871;
    --g-dolu: #4c8dff;
    --g-hesap: #a682f0;
    --g-gecikme: #f0545c;
    --g-kilitli: #e5b33a;
    --g-golge: none;
    color-scheme: dark;
}

html.garson-acik, html.garson-acik body { overflow: hidden; }

.g-kok *, .g-kok *::before, .g-kok *::after { box-sizing: border-box; }
.g-kok button, .g-kok input, .g-kok textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.g-kok button { cursor: pointer; }
.g-kok button:focus { outline: none; }
.g-kok button:focus-visible { outline: 2px solid var(--g-birincil); outline-offset: 2px; }
.g-kok [hidden] { display: none !important; }
.g-kok h1, .g-kok h2, .g-kok h3 { color: inherit; font-family: inherit; line-height: 1.25; }

.g-kok svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.g-yukleme {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--g-yazi-2);
}

/* ---------- İskelet ---------- */
.g-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.g-ust {
    flex: none;
    height: var(--g-ust-h);
    padding: 0 8px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--g-yuzey);
    border-bottom: 1px solid var(--g-cizgi);
}

.g-ust-sol, .g-ust-sag { display: flex; align-items: center; gap: 4px; min-width: 0; }
.g-baslik { margin: 0; font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-kullanici { color: var(--g-yazi-2); font-size: 13px; max-width: 40vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.g-ikon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--g-yazi);
    text-decoration: none;
}
.g-ikon-btn:active { background: var(--g-yuzey-2); }
.g-geri { display: none; margin-left: -8px; }
.g-app:not([data-gorunum="masalar"]) .g-geri { display: inline-flex; }

.g-govde {
    flex: 1;
    min-height: 0;
    position: relative;
}

.g-panel {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.g-app[data-gorunum="masalar"] .g-panel-masalar,
.g-app[data-gorunum="siparis"] .g-panel-siparis,
.g-app[data-gorunum="urunler"] .g-panel-urunler { display: flex; }

/* ---------- Çipler ---------- */
.g-cipler {
    flex: none;
    display: flex;
    gap: 8px;
    padding: 10px 12px 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.g-cipler::-webkit-scrollbar { display: none; }

.g-cip {
    flex: none;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--g-cizgi);
    border-radius: 19px;
    background: var(--g-yuzey);
    color: var(--g-yazi);
    white-space: nowrap;
}
.g-cip.aktif { background: var(--g-yazi); border-color: var(--g-yazi); color: var(--g-yuzey); font-weight: 600; }
.g-filtreler { padding-top: 6px; }

.g-salon-satir { flex: none; display: flex; align-items: flex-start; padding-right: 12px; }
.g-salon-satir .g-cipler { flex: 1 1 auto; min-width: 0; }
.g-oturum-butonlar { flex: none; display: none; gap: 8px; margin: 10px 0 2px auto; }
.g-oturum-butonlar .g-btn { gap: 6px; }
.g-oturum-butonlar svg { width: 18px; height: 18px; }
.g-filtreler .g-cip { min-height: 32px; font-size: 13px; }

/* ---------- Masalar ---------- */
.g-masa-izgara {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    grid-auto-rows: min-content;
    gap: 10px;
    align-content: start;
}

.g-masa {
    position: relative;
    min-height: 92px;
    padding: 10px 10px 10px 14px;
    border: 1px solid var(--g-cizgi);
    border-radius: var(--g-radius);
    background: var(--g-yuzey);
    box-shadow: var(--g-golge);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.g-masa::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--g-renk, var(--g-bos));
}
.g-masa:active { transform: scale(.98); }
.g-masa.secili { outline: 2px solid var(--g-birincil); outline-offset: 1px; }
.g-masa-ad { font-weight: 650; font-size: 16px; line-height: 1.2; word-break: break-word; }
.g-masa-tutar { font-weight: 600; font-variant-numeric: tabular-nums; }
.g-masa-alt { margin-top: auto; color: var(--g-yazi-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-masa-durum { color: var(--g-renk); font-size: 12px; font-weight: 600; }

.g-masa.bos { --g-renk: var(--g-bos); }
.g-masa.dolu { --g-renk: var(--g-dolu); }
.g-masa.hesap { --g-renk: var(--g-hesap); }
.g-masa.gecikme { --g-renk: var(--g-gecikme); }
.g-masa.kilitli, .g-masa.acik { --g-renk: var(--g-kilitli); }
.g-masa.kilitli { opacity: .75; }

/* Masaüstü: restoran salon yerleşimi (konum/şekil restoranda tasarlandığı gibi) */
.g-masa-izgara.plan {
    display: block;
    position: relative;
    padding: 0;
    overflow: auto;
    background-color: var(--g-yuzey);
    background-image: radial-gradient(var(--g-cizgi) 1px, transparent 1px);
    background-size: 20px 20px;
}
.g-plan-alan { position: relative; min-width: 100%; min-height: 100%; }
.g-pmasa {
    position: absolute;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #000;
    font-size: 13px;
    line-height: 1.2;
    transition: opacity .15s;
}
.g-pmasa:active { filter: brightness(.95); }
.g-pmasa.secili { outline: 3px solid var(--g-birincil); outline-offset: 2px; }
.g-pmasa.soluk { opacity: .2; pointer-events: none; }
.g-pmasa.acik, .g-pmasa.kilitli { opacity: .45; }
.g-pmasa-sekil { display: block; }
.g-pmasa-sekil svg { display: block; width: 100%; height: auto; overflow: visible; stroke: none; }
.g-pmasa-yazi {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-align: center;
    pointer-events: none;
}
.g-pmasa-yazi b { font-weight: 700; word-break: break-word; }
.g-pmasa-yazi small { font-size: .85em; font-weight: 600; white-space: nowrap; }
/* restorandaki masa renkleri (mvc/App/CSS/salon.css) */
.g-pmasa.bos .st0 { fill: #68ad43; }
.g-pmasa.bos .st1 { fill: #83D856; }
.g-pmasa.dolu .st0 { fill: #435ab7; }
.g-pmasa.dolu .st1 { fill: #4F6EED; }
.g-pmasa.hesap .st0 { fill: #600CEC; }
.g-pmasa.hesap .st1 { fill: #854EE1; }
.g-pmasa.gecikme .st0 { fill: #e81818; }
.g-pmasa.gecikme .st1 { fill: #FF4343; }
.g-pmasa.acik .st0, .g-pmasa.kilitli .st0 { fill: #c8cc0e; }
.g-pmasa.acik .st1, .g-pmasa.kilitli .st1 { fill: #F9FF00; }

.g-lejant {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 8px 12px calc(8px + var(--g-alt-bosluk));
    color: var(--g-yazi-2);
    font-size: 12px;
    border-top: 1px solid var(--g-cizgi);
    background: var(--g-yuzey);
}
.g-lejant span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 767px) { .g-lejant .g-lejant-genis { display: none; } }
.g-nokta { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.g-nokta.bos { background: var(--g-bos); }
.g-nokta.dolu { background: var(--g-dolu); }
.g-nokta.hesap { background: var(--g-hesap); }
.g-nokta.gecikme { background: var(--g-gecikme); }
.g-nokta.kilitli { background: var(--g-kilitli); }

.g-bos-durum {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--g-yazi-2);
    text-align: center;
    grid-column: 1 / -1;
}
.g-bos-durum svg { width: 40px; height: 40px; stroke-width: 1.5; }
.g-bos-durum p { margin: 0; }

/* ---------- Sipariş ---------- */
.g-panel-siparis { background: var(--g-yuzey); }
.g-siparis-ic { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.g-siparis-baslik {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px 10px 16px;
    border-bottom: 1px solid var(--g-cizgi);
}
.g-siparis-baslik h2 { margin: 0; font-size: 18px; }
.g-siparis-baslik small { color: var(--g-yazi-2); }
#gMasalaraDonBtn { display: none; }

.g-sepet {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.g-satir {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid var(--g-cizgi);
}
.g-satir-ad { font-weight: 600; word-break: break-word; }
.g-satir-fiyat { color: var(--g-yazi-2); font-size: 13px; font-variant-numeric: tabular-nums; }
/* Sepet satırında birim: çok birimli üründe dokunulup değiştirilebilir */
.g-kok .g-satir-birim {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 26px;
    padding: 0 6px 0 9px;
    border: 1px solid var(--g-cizgi);
    border-radius: 13px;
    background: var(--g-yuzey-2);
    color: var(--g-birincil);
    font-size: 12.5px;
    font-weight: 600;
    vertical-align: middle;
}
.g-satir-birim svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.g-satir-birim-yazi { font-weight: 600; }
.g-secim-ipucu { margin: 10px 0 0 !important; font-size: 13px; }
.g-satir-tutar { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.g-satir-not {
    grid-column: 1 / -1;
    margin-top: -2px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--g-yuzey-2);
    font-size: 13px;
    color: var(--g-yazi-2);
}
.g-satir-araclar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.g-satir.gonderildi .g-satir-ad::after {
    content: "Mutfakta";
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--g-yuzey-2);
    color: var(--g-yazi-2);
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.g-satir.gonderildi .g-satir-ad, .g-satir.gonderildi .g-satir-tutar { color: var(--g-yazi-2); }

.g-adet {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--g-cizgi);
    border-radius: 10px;
    overflow: hidden;
}
.g-adet button {
    width: 44px;
    height: 40px;
    border: 0;
    background: var(--g-yuzey-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.g-adet button svg { width: 18px; height: 18px; }
.g-adet span { min-width: 44px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.g-adet-sabit { font-weight: 650; color: var(--g-yazi-2); }

.g-satir-btn {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--g-cizgi);
    border-radius: 10px;
    background: var(--g-yuzey);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.g-satir-btn svg { width: 18px; height: 18px; }
.g-satir-btn.sil { margin-left: auto; color: var(--g-gecikme); }

.g-siparis-alt {
    flex: none;
    padding: 12px 12px calc(12px + var(--g-alt-bosluk));
    border-top: 1px solid var(--g-cizgi);
    background: var(--g-yuzey);
}
.g-toplam { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.g-toplam span { color: var(--g-yazi-2); }
.g-toplam strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.g-siparis-butonlar { display: grid; grid-template-columns: 1fr; gap: 10px; }

.g-btn {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 650;
    text-decoration: none;
}
.g-btn svg { width: 20px; height: 20px; }
.g-btn:disabled { opacity: .5; }
/* .g-kok button { color: inherit } kuralını ezmesi için .g-kok ile */
.g-kok .g-btn-birincil { background: var(--g-birincil); color: var(--g-birincil-yazi); }
.g-btn-ikincil { background: var(--g-yuzey-2); color: var(--g-yazi); border-color: var(--g-cizgi); }
.g-btn-tehlike { background: var(--g-gecikme); color: #fff; }
.g-btn-ince { min-height: 38px; padding: 0 12px; font-size: 14px; background: var(--g-yuzey-2); border-color: var(--g-cizgi); color: var(--g-yazi); }

/* ---------- Ürünler ---------- */
.g-panel-urunler { background: var(--g-bg); }

/* Üst şerit yalnız geniş ekranda "Bitti" butonunu taşır; gruplar ızgarada kutucuk olarak gelir */

/* Grup kutucuğu (dokunmatik sipariş ekranındaki gibi). Geri kutucuğu her zaman ilk sıradadır. */
.g-grup-kart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px 34px 12px 16px;
    border: 1px solid var(--g-cizgi);
    border-radius: var(--g-radius);
    background: hsl(var(--g-harf-ton, 210) 55% 96%);
    box-shadow: var(--g-golge);
    text-align: left;
    color: var(--g-yazi);
    overflow: hidden;
}
.g-grup-kart::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--g-grup-renk, hsl(var(--g-harf-ton, 210) 55% 55%));
}
.g-grup-kart:active { transform: scale(.98); }
.g-grup-ad { font-weight: 700; line-height: 1.25; word-break: break-word; }
.g-grup-ad small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--g-yazi-2); }
.g-grup-ok { position: absolute; right: 10px; top: 50%; margin-top: -9px; width: 18px; height: 18px; fill: none; stroke: var(--g-yazi-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Geri kutucuğu: solda ok, altında bulunulan grubun adı */
.g-grup-geri { padding-left: 12px; background: var(--g-yuzey-2); border-style: dashed; }
.g-grup-geri::before { display: none; }
.g-grup-simge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--g-yazi);
    color: var(--g-yuzey);
}
.g-grup-simge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

body.dark-mode .g-kok .g-grup-kart:not(.g-grup-geri) { background: hsl(var(--g-harf-ton, 210) 25% 17%); }

.g-urun-izgara {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: min-content;
    gap: 10px;
    align-content: start;
}

.g-urun {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--g-cizgi);
    border-radius: var(--g-radius);
    background: var(--g-yuzey);
    box-shadow: var(--g-golge);
    overflow: hidden;
}
.g-urun.sepette { border-color: var(--g-birincil); }
.g-urun-ana {
    flex: 1;
    min-height: 82px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}
.g-urun-ana:active { background: var(--g-yuzey-2); }
.g-urun-ad { font-weight: 600; line-height: 1.25; word-break: break-word; }
.g-urun-fiyat { color: var(--g-yazi-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.g-urun-cubuk {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--g-cizgi);
}
.g-urun-cubuk button {
    width: 48px;
    height: 40px;
    border: 0;
    background: var(--g-yuzey-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.g-urun-cubuk button:disabled { opacity: .4; }
.g-urun-cubuk button svg { width: 18px; height: 18px; }
.g-urun-cubuk-adet { flex: 1; text-align: center; font-weight: 700; color: var(--g-birincil); font-variant-numeric: tabular-nums; }
.g-urun.ekleniyor .g-urun-ana { opacity: .6; }

/* ---------- Pencere, bildirim ---------- */
.g-perde {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(10, 14, 22, .45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.g-pencere {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 18px 16px calc(16px + var(--g-alt-bosluk));
    border-radius: 16px 16px 0 0;
    background: var(--g-yuzey);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}
.g-pencere h3 { margin: 0 0 10px; font-size: 18px; }
.g-pencere p { margin: 0 0 12px; color: var(--g-yazi-2); }
.g-pencere textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    border: 1px solid var(--g-cizgi);
    border-radius: 10px;
    background: var(--g-bg);
    font-size: 16px;
    resize: vertical;
}
/* Not alanı: sağ üst köşede tümünü silme düğmesi */
.g-not-kutu { position: relative; }
.g-not-kutu textarea { display: block; padding-right: 40px; }
.g-kok .g-not-temizle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--g-yuzey-2);
    color: var(--g-yazi-2);
}
.g-not-temizle[hidden] { display: none !important; }
.g-not-temizle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.g-hizli-notlar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.g-hizli-notlar .g-cip { min-height: 34px; font-size: 14px; }
.g-cip-fiyat { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.g-pencere-butonlar { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* Ürün seçim penceresi: adet, birim, özellik + not */
.g-secim-baslik { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--g-yazi-2); }
.g-secim-baslik:first-child { margin-top: 0; }
.g-secim-adet {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 220px;
    border: 1px solid var(--g-cizgi);
    border-radius: 10px;
    overflow: hidden;
}
.g-kok .g-secim-adet button {
    width: 56px;
    height: 44px;
    border: 0;
    background: var(--g-yuzey-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--g-yazi);
}
.g-secim-adet button:disabled { opacity: .4; }
.g-secim-adet button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.g-secim-adet span { flex: 1; text-align: center; font-size: 18px; font-weight: 700; color: var(--g-birincil); font-variant-numeric: tabular-nums; }
.g-secim-birimler { display: flex; flex-wrap: wrap; gap: 8px; }
.g-secim-birimler .g-cip { min-height: 44px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.g-secim-birimler .g-cip small { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }

.g-bildirim {
    position: fixed;
    left: 50%;
    bottom: calc(var(--g-alt-bosluk) + 96px);
    z-index: 60;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--g-yazi);
    color: var(--g-yuzey);
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.g-bildirim.goster { opacity: 1; transform: translate(-50%, 0); }
.g-bildirim.hata { background: var(--g-gecikme); color: #fff; }

.g-yukleniyor { opacity: .55; pointer-events: none; }

.g-yetkisiz {
    max-width: 420px;
    margin: 15vh auto 0;
    padding: 24px 16px;
    text-align: center;
}

/* ---------- Tablet / masaüstü ---------- */
@media (min-width: 768px) {
    .g-geri { display: none !important; }
    .g-ust { display: none; }
    .g-oturum-butonlar { display: flex; }
    .g-bildirim { bottom: 24px; }

    .g-govde {
        display: grid;
        grid-template-columns: 1fr 380px;
    }
    .g-panel { position: static; display: flex; }
    .g-panel-masalar { grid-column: 1; grid-row: 1; }
    .g-panel-urunler { grid-column: 1; grid-row: 1; display: none; }
    .g-panel-siparis { grid-column: 2; grid-row: 1; border-left: 1px solid var(--g-cizgi); display: flex; }

    .g-app[data-gorunum="urunler"] .g-panel-urunler { display: flex; }
    .g-app[data-gorunum="urunler"] .g-panel-masalar { display: none; }

    /* Masa seçili değilken boş sipariş paneli yer kaplamasın */
    .g-app:not(.sepet-var) .g-govde { grid-template-columns: 1fr; }
    .g-app:not(.sepet-var) .g-panel-siparis { display: none; }

    #gMasalaraDonBtn { display: inline-flex; }
    .g-siparis-butonlar { grid-template-columns: 1fr 1.4fr; }
    .g-siparis-alt { padding-bottom: 12px; }
    .g-urun-izgara { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .g-masa-izgara { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

    .g-perde { align-items: center; }
    .g-pencere { border-radius: 16px; padding-bottom: 16px; }
    .g-pencere-butonlar { flex-direction: row-reverse; }
    .g-pencere-butonlar .g-btn { flex: 1; }

    /* Sanal klavye açıkken pencere üste alınır, klavyenin üstünde kalacak kadar kısalır (--g-klavye-h JS'te ölçülür) */
    .g-perde.g-klavye-acik { align-items: flex-start; padding-top: 12px; }
    .g-perde.g-klavye-acik .g-pencere { max-height: calc(100vh - var(--g-klavye-h, 340px) - 12px); }
}

@media (min-width: 1200px) {
    .g-govde { grid-template-columns: 1fr 420px; }
}

/* ---------- Bağlantı şeridi ---------- */
.g-cevrimdisi {
    flex: none;
    padding: 8px 12px;
    background: var(--g-gecikme);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* ---------- Sipariş başlığı butonları ---------- */
.g-siparis-baslik-butonlar { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------- Mutfak durumu ---------- */
.g-rozet-hazir {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--g-bos);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.g-masa-hazir { color: var(--g-bos); font-size: 12px; font-weight: 650; }
.g-satir-btn.iptal { margin-left: auto; color: var(--g-gecikme); }

/* ---------- Pencere içi alanlar ---------- */
.g-pencere input.g-girdi {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--g-cizgi);
    border-radius: 10px;
    background: var(--g-bg);
    color: var(--g-yazi);
    font-size: 20px;
    letter-spacing: .2em;
    text-align: center;
}
.g-pencere textarea { color: var(--g-yazi); }
.g-hedef-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.g-hedef-salon { grid-column: 1 / -1; margin: 6px 0 0; color: var(--g-yazi-2); font-size: 13px; font-weight: 650; }
.g-hedef-liste .g-cip { min-height: 44px; justify-content: center; }
.g-menu-liste { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Ürün resmi ("Stok resmi göster" açıksa) ---------- */
.g-urun-resim {
    display: block;
    width: calc(100% + 24px);
    margin: -10px -12px 2px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--g-yuzey-2);
}
.g-urun.resimli .g-urun-ana { justify-content: flex-start; }
.g-urun.resimli .g-urun-fiyat { margin-top: auto; }

/* Resmi olmayan ürün: baş harfli renkli kutu (resimli kartlarla aynı boy) */
.g-urun-harf {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% + 24px);
    margin: -10px -12px 2px;
    aspect-ratio: 4 / 3;
    background: hsl(var(--g-harf-ton, 210) 55% 92%);
    color: hsl(var(--g-harf-ton, 210) 45% 35%);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}
body.dark-mode .g-kok .g-urun-harf {
    background: hsl(var(--g-harf-ton, 210) 30% 22%);
    color: hsl(var(--g-harf-ton, 210) 60% 78%);
}

/* ---------- Sepet çekmecesi (yalnız telefon) ----------
   Masa açıkken ürünler ekranının altında ince bir çubuk olarak durur; dokununca ya da yukarı kaydırınca açılır. */
.g-cekmece-tutamac, .g-cekmece-perde { display: none; }

@media (max-width: 767px) {
    .g-app { --g-peek: calc(74px + var(--g-alt-bosluk)); }

    /* sipariş açıkken arkada ürünler kalır */
    .g-app[data-gorunum="siparis"] .g-panel-urunler { display: flex; }
    .g-app.sepet-var .g-urun-izgara { padding-bottom: calc(var(--g-peek) + 16px); }

    .g-app.sepet-var[data-gorunum="urunler"] .g-panel-siparis,
    .g-app.sepet-var[data-gorunum="siparis"] .g-panel-siparis {
        display: flex;
        top: auto;
        height: min(88%, calc(100% - 32px));
        z-index: 20;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -12px 32px rgba(16, 24, 40, .18), 0 -1px 0 var(--g-cizgi);
        transform: translateY(calc(100% - var(--g-peek)));
        transition: transform .34s cubic-bezier(.22, .9, .25, 1);
        will-change: transform;
    }
    .g-app.sepet-var[data-gorunum="siparis"] .g-panel-siparis { transform: translateY(0); }
    .g-app.sepet-var .g-siparis-baslik { display: none; }

    .g-cekmece-perde {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 15;
        background: rgba(10, 14, 22, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }
    .g-app.sepet-var[data-gorunum="siparis"] .g-cekmece-perde { opacity: 1; pointer-events: auto; }

    .g-cekmece-tutamac {
        display: block;
        flex: none;
        padding: 8px 12px 10px 14px;
        touch-action: none;
        user-select: none;
        cursor: grab;
        border-bottom: 1px solid transparent;
        transition: border-color .2s;
    }
    .g-app[data-gorunum="siparis"] .g-cekmece-tutamac { border-bottom-color: var(--g-cizgi); }
    .g-cekmece-cizgi {
        display: block;
        width: 40px;
        height: 5px;
        margin: 0 auto 8px;
        border-radius: 3px;
        background: var(--g-cizgi);
    }
    .g-cekmece-ozet { display: flex; align-items: center; gap: 10px; min-height: 44px; }
    .g-cekmece-rozet {
        flex: none;
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        border-radius: 17px;
        background: var(--g-birincil);
        color: var(--g-birincil-yazi);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 750;
        font-variant-numeric: tabular-nums;
        box-shadow: 0 4px 12px rgba(31, 111, 235, .35);
    }
    .g-cekmece-rozet.zipla { animation: g-zipla .45s cubic-bezier(.3, 1.6, .5, 1); }
    .g-cekmece-yazi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
    .g-cekmece-yazi strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .g-cekmece-yazi small { color: var(--g-yazi-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .g-cekmece-yazi small.uyari { color: var(--g-kilitli); font-weight: 600; }
    .g-kok .g-cekmece-kaydet {
        flex: none;
        height: 38px;
        padding: 0 14px;
        border: 0;
        border-radius: 19px;
        background: var(--g-birincil);
        color: var(--g-birincil-yazi);
        font-weight: 700;
        font-size: 14px;
    }
    .g-cekmece-kaydet:disabled { opacity: .5; }
    .g-cekmece-diger { width: 38px; height: 38px; }
    .g-cekmece-diger circle { fill: currentColor; }
    .g-cekmece-ok { color: var(--g-yazi-2); transition: transform .3s; }
    .g-app[data-gorunum="siparis"] .g-cekmece-ok { transform: rotate(180deg); }
    /* açıkken hızlı Gönder gizlenir (alttaki büyük Gönder var), kapalıyken "Diğer" gizlenir */
    .g-app[data-gorunum="siparis"] .g-cekmece-kaydet { display: none; }
    .g-app[data-gorunum="urunler"] .g-cekmece-diger { display: none; }

    .g-panel-siparis.suruklen { transition: none !important; }
}

@keyframes g-zipla {
    0% { transform: scale(1); }
    40% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .g-panel-siparis, .g-cekmece-perde, .g-cekmece-ok { transition: none !important; }
    .g-cekmece-rozet.zipla { animation: none; }
}

/* Ürün kartında adet 1'deyken "−" yerine sepetten çıkar */
.g-urun-cubuk button.sil { color: var(--g-gecikme); }
