:root {
    --brand: #1F65F4;
    --brand-2: #3B82F6;
    --brand-soft: #EFF6FF;
    --brand-dark: #1E40AF;
    --bg: #FFFFFF;
    --surface: #F8FAFC;
    --surface-2: #F1F5F9;
    --text: #0F172A;
    --text-2: #475569;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F172A;
        --surface: #1E293B;
        --surface-2: #334155;
        --text: #F8FAFC;
        --text-2: #CBD5E1;
        --border: #334155;
        --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }

.brand-mark {
    font-weight: 900;
    font-size: 2rem;
    color: var(--brand);
    letter-spacing: -0.04em;
}
.admin-sidebar .brand-mark { display: flex; justify-content: center; text-align: center; }
.sidebar-toggle {
    margin: .5rem auto 0; width: 34px; height: 26px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
    cursor: pointer; font-size: .8rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { color: var(--brand); border-color: var(--brand); }

.sb-collapsed .admin-sidebar { width: 72px; padding: 1rem .5rem; }
.sb-collapsed .admin-sidebar .branch-switcher,
.sb-collapsed .admin-sidebar .nav-group-title { display: none; }
.sb-collapsed .admin-nav a { font-size: 0; justify-content: center; gap: 0; padding: .6rem; }
.sb-collapsed .admin-nav a svg { width: 20px; height: 20px; flex: none; }
.sb-collapsed .admin-sidebar .brand-mark { font-size: 1.15rem; }
.sb-collapsed .admin-logo { max-width: 48px; }
.menu-header .brand-mark { font-size: 1.5rem; display: flex; align-items: center; }
.menu-logo {
    max-height: 50px;
    max-width: 188px;
    display: inline-block;
}
.menu-logo-dark { display: none; }
.menu-page.theme-dark .menu-logo-light { display: none; }
.menu-page.theme-dark .menu-logo-dark { display: inline-block; }
.admin-logo { max-height: 44px; max-width: 170px; display: inline-block; }

.stack { display: flex; flex-direction: column; gap: 1rem; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem 1.4rem;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.1s ease;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}

label span { display: block; font-size: 0.85rem; color: var(--text-2); margin-bottom: 0.35rem; }

.notice { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.9rem; }
.notice-error { background: #FEF2F2; color: #991B1B; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.landing .actions { margin-top: 1.5rem; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 280px;
    flex-shrink: 0;
    transition: width .18s ease, padding .18s ease;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.nav-group { margin-top: .5rem; }
.nav-group:first-child { margin-top: 0; }
.nav-group-title {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-2);
    padding: .5rem .85rem .3rem;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 0.6rem 0.85rem;
    border-radius: calc(var(--radius) / 2);
    color: #fff;
    font-weight: 500;
}
.admin-nav a svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .85; }
.admin-nav a:hover { background: var(--surface-2); color: #fff; }
.admin-nav a.active { background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(31,101,244,.25); }
.admin-nav a.active svg { opacity: 1; }
.admin-nav a.active:hover { background: var(--brand); color: #fff; }
.scope-badge {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 600;
    background: var(--brand-soft);
    color: var(--brand);
    text-transform: none;
    letter-spacing: 0;
    vertical-align: 2px;
}
.scope-badge.is-main { background: var(--brand); color: #fff; }
.scope-badge.is-off { background: var(--surface-2); color: var(--text-2); }
.feat-status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.feat-status .tag { min-width: 62px; text-align: center; }
.tag-off { background: var(--surface-2); color: var(--text-2); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg label { margin: 0; display: block; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg span { display: block; padding: .28rem .7rem; font-size: .75rem; font-weight: 600; color: var(--text-2); cursor: pointer; border-left: 1px solid var(--border); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }

.group-block { margin-bottom: 1.75rem; }
.group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .5rem;
}
.group-head h2 { margin: 0; font-size: 1.05rem; }
.group-head h2 small { font-weight: 500; color: var(--text-2); font-size: .75rem; margin-left: .35rem; }
.group-head .actions { display: flex; gap: .35rem; align-items: center; }
.group-head .actions form { margin: 0; }

.tag { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); }
.tag-new { background: var(--brand-soft); color: var(--brand); }
.tag-upd { background: #FEF3C7; color: #92400E; }
.tag-err { background: #FEE2E2; color: #991B1B; }
.tag-cat { background: #E0E7FF; color: #3730A3; margin-left: .3rem; }
[data-theme="dark"] .tag-upd { background: #453214; color: #FBBF24; }
[data-theme="dark"] .tag-err { background: #3D1A1A; color: #F87171; }
[data-theme="dark"] .tag-cat { background: #242B4D; color: #A5B4FC; }

.admin-main { flex: 1; padding: 1.5rem 2rem; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.text-success { color: #16A34A !important; }
.text-danger { color: #DC2626 !important; }
.row-current td { background: var(--surface-2); }
.row-current td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.data-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.dash-card h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--text-2); }
.dash-card .value { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--text); }

.user-badge { font-size: 0.9rem; color: var(--text-2); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.data-table th, .data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.data-table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); }
.data-table tr:last-child td { border-bottom: none; }

.actions { display: flex; gap: 0.5rem; align-items: center; }
.actions form { display: inline; }

.btn-sm {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}
.btn-sm:hover { background: var(--border); }

.btn-danger { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.btn-danger:hover { background: #FEE2E2; }

.form-card {
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Ürün formu: sol alanlar, sağ reçete+varyant */
.form-card.product-form { max-width: 1150px; }
.product-form .pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.product-form .variant-row.recipe-row { grid-template-columns: 2fr 1fr auto; }
.recipe-del { width: 32px; padding: 0; flex-shrink: 0; }
@media (max-width: 900px) { .product-form .pf-cols { grid-template-columns: 1fr; } }

/* Stok tablosu: satir ici duzenleme */
.stock-table td { vertical-align: middle; }
.stock-table input, .stock-table select { width: 100%; padding: .4rem .55rem; font-size: .85rem; }
.stock-table .stock-col-unit { width: 90px; }
.stock-table .stock-col-num { width: 120px; }
.stock-add-row td { border-top: 2px dashed var(--border); }
.stock-new-row { background: rgba(31,101,244,.06); }
.stock-new-row input, .stock-new-row select { border-color: var(--brand); }

.actions-row { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }

label.row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
label.row input { width: auto; }

.variant-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0;
}
.variant-box legend { font-weight: 600; padding: 0 0.5rem; }
.variant-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.menu-page {
    --menu-bg: #F8FAFC;
    --menu-surface: #FFFFFF;
    --menu-surface-2: #F1F5F9;
    --menu-header-bg: var(--menu-surface);
    --menu-text: #0F172A;
    --menu-text-2: #64748B;
    --menu-border: #E2E8F0;
    --menu-accent: #1F65F4;
    --menu-price: var(--menu-accent);

    --brand: var(--menu-accent);
    --bg: var(--menu-bg);
    --surface: var(--menu-surface);
    --surface-2: var(--menu-surface-2);
    --text: var(--menu-text);
    --text-2: var(--menu-text-2);
    --border: var(--menu-border);

    min-height: 100vh;
    padding-bottom: 6rem;
    background: var(--menu-bg);
    color: var(--menu-text);
}
.menu-page.theme-dark {
    --menu-bg: #0B1220;
    --menu-surface: #141F36;
    --menu-surface-2: #1D2B49;
    --menu-text: #F1F5F9;
    --menu-text-2: #94A3B8;
    --menu-border: #263650;
}
.menu-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font-size: 1rem; cursor: pointer;
}
.menu-page .menu-header { background: var(--menu-header-bg); color: var(--menu-text); border-bottom-color: var(--menu-border); }
.menu-page .product-info .price, .menu-page .product-footer .price { color: var(--menu-price); }
.menu-page .category-tabs { background: var(--menu-bg); }
.menu-page .cat-tab { background: var(--menu-surface-2); color: var(--menu-text); }
.menu-page .product-card { background: var(--menu-surface); border-color: var(--menu-border); color: var(--menu-text); }
.menu-page .product-info h3 { color: var(--menu-text); }
.menu-page .product-info .desc { color: var(--menu-text-2); }
.menu-page .menu-category h2 { color: var(--brand); }
.menu-page .notice-error { background: #FEF2F2; color: #B91C1C; }
body:has(.menu-page) .theme-toggle { display: none; }
.menu-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.menu-header h1 { margin: 0; font-size: 1.25rem; }
.menu-header p { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.menu-header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.menu-body { display: flex; flex-direction: column; }
.menu-page[data-cat="left"] .menu-body, .menu-page[data-cat="right"] .menu-body { flex-direction: row; }
.menu-page[data-cat="right"] .menu-body { flex-direction: row-reverse; }

.menu-search { flex: 0 1 360px; width: 360px; margin-left: auto; min-width: 160px; }
.menu-header-actions { margin-left: .5rem; }
.menu-header .btn-primary, .menu-header .review-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 1.1rem; border-radius: 999px;
    font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.menu-page .menu-theme-toggle,
.menu-page .cat-toggle { width: 40px; height: 40px; flex-shrink: 0; }
.menu-page .social-icon { width: 40px; height: 40px; }
.search-input {
    width: 100%;
    padding: .6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: .95rem;
}
.search-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cat-filter { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.cat-pill {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
}
.cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem;
    background: var(--bg);
    justify-content: center;
}
.menu-page[data-cat="top"] .category-tabs {
    position: sticky;
    top: calc(var(--menu-header-h, 68px) - 1px);
    z-index: 9;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.menu-page[data-cat="left"] .category-tabs,
.menu-page[data-cat="right"] .category-tabs {
    flex-direction: column;
    width: 30%;
    min-width: 220px;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(100vh - var(--menu-header-h, 72px));
    position: sticky;
    top: var(--menu-header-h, 72px);
    border-right: 1px solid var(--border);
    background: var(--surface);
}
.menu-page[data-cat="right"] .category-tabs { border-right: none; border-left: 1px solid var(--border); }
.cat-tab {
    white-space: nowrap;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
}
.menu-page[data-cat="left"] .cat-tab,
.menu-page[data-cat="right"] .cat-tab {
    white-space: normal;
    text-align: left;
    border-radius: var(--radius);
}
.cat-tab:hover, .cat-tab.active { background: var(--brand); color: #fff; }

/* Varyant secici */
.menu-page .product-card { cursor: pointer; }
.variant-hint { color: var(--text-2); font-size: .75rem; }
.variant-sheet {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 70;
    width: min(360px, calc(100vw - 2rem));
    background: var(--menu-surface, var(--surface));
    color: var(--menu-text, var(--text));
    border: 1px solid var(--menu-border, var(--border));
    border-radius: 14px; padding: 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.variant-sheet .cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.variant-sheet .cart-head h2 { margin: 0; font-size: 1rem; }
.variant-option {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    width: 100%; padding: .7rem .9rem; margin-bottom: .5rem;
    border: 1px solid var(--menu-border, var(--border)); border-radius: 10px;
    background: var(--menu-surface-2, var(--surface-2)); color: var(--menu-text, var(--text));
    font-size: .9rem; cursor: pointer; text-align: left;
}
.variant-option:hover { border-color: var(--brand); }
.variant-option strong { color: var(--menu-price, var(--brand)); }

/* Siparis takip */
.menu-header .btn-outline {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 1.1rem; border-radius: 999px;
    border: 1px solid var(--menu-border, var(--border));
    background: transparent; color: var(--menu-text, var(--text));
    font-size: .85rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.menu-header .btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.track-form { display: flex; gap: .5rem; margin-bottom: .75rem; }
.track-form .search-input { flex: 1; border-radius: 10px; }
.track-form .btn-primary { border-radius: 10px; padding: 0 1rem; }
.track-result:empty { display: none; }
.track-card {
    border: 1px solid var(--menu-border, var(--border)); border-radius: 10px;
    padding: .8rem .9rem; background: var(--menu-surface-2, var(--surface-2));
}
.track-card p { margin: 0; }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.track-status { font-size: .75rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.track-msg { font-size: .85rem; color: var(--menu-text-2, var(--text-2)); margin-top: .4rem !important; }
.track-items { margin: .6rem 0 0; padding: .5rem 0 0 1.1rem; border-top: 1px dashed var(--menu-border, var(--border)); font-size: .85rem; }
.track-items li { margin: .15rem 0; }
.track-card .track-meta { color: var(--menu-text-2, var(--text-2)); font-size: .8rem; margin-top: .5rem !important; }
.track-err { color: #B91C1C; font-size: .85rem; margin: 0; }

.closed-banner {
    display: flex; align-items: center; gap: .8rem;
    max-width: 520px; margin: 0 auto 1rem;
    padding: .8rem 1rem; border-radius: 14px;
    background: var(--menu-surface-2, var(--surface-2));
    border: 1px solid var(--menu-border, var(--border));
    border-left: 4px solid #F59E0B;
}
.closed-banner svg { width: 26px; height: 26px; color: #F59E0B; flex-shrink: 0; }
.closed-banner strong { display: block; font-size: .95rem; }
.closed-banner span { font-size: .8rem; color: var(--menu-text-2, var(--text-2)); }

/* Urun badge'leri */
.product-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.pf-badges { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.pf-right { display: flex; align-items: center; gap: .45rem; margin-left: auto; flex: none; }
.pf-right .price { margin: 0; }
.p-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600; line-height: 1;
    padding: .28rem .5rem; border-radius: 999px;
    border: 1px solid var(--menu-border, var(--border));
    background: var(--menu-surface-2, var(--surface-2));
    color: var(--menu-text-2, var(--text-2));
}
.p-badge.b-cal { color: #B45309; border-color: #F59E0B55; background: #F59E0B14; }
.p-badge.b-gluten { color: #92400E; border-color: #D9770655; background: #D9770614; }
.p-badge.b-allergen { color: #B91C1C; border-color: #EF444455; background: #EF444414; position: relative; cursor: help; }
.p-badge .badge-tip {
    display: none; position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30;
    background: var(--menu-surface, var(--surface)); color: var(--menu-text, var(--text));
    border: 1px solid var(--menu-border, var(--border)); border-radius: 8px;
    padding: .45rem .65rem; font-size: .72rem; font-weight: 500; white-space: nowrap;
    box-shadow: 0 6px 18px rgba(15,23,42,.15);
}
.p-badge.b-allergen:hover .badge-tip { display: block; }
.menu-category { scroll-margin-top: calc(var(--menu-header-h, 68px) + 64px); }
.menu-page[data-cat="left"] .menu-category,
.menu-page[data-cat="right"] .menu-category { scroll-margin-top: calc(var(--menu-header-h, 72px) + 8px); }

.menu-list { flex: 1; min-width: 0; }
.menu-category { padding: 1rem; }
.menu-category h2 {
    position: sticky;
    top: calc(var(--menu-header-h, 68px) + 63px);
    z-index: 8;
    margin: -.5rem -1rem .75rem;
    padding: .7rem 1rem;
    background: var(--menu-bg);
    color: var(--brand);
    border-bottom: 1px solid var(--menu-border, var(--border));
}
.menu-page[data-cat="left"] .menu-category h2,
.menu-page[data-cat="right"] .menu-category h2 { top: calc(var(--menu-header-h, 72px) + 4px); }
.products { display: grid; gap: 0.75rem; }

/* Kategoriler Üstte 2 Sütun — yatay kartlar, 2 sütun */
.products-grid { grid-template-columns: repeat(2, 1fr); }
.products-grid .product-card { display: flex; flex-direction: row; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .75rem; }
.products-grid .product-image { width: 80px; height: 80px; flex-shrink: 0; object-fit: cover; border-radius: 10px; }
.products-grid .product-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.products-grid .product-info h3 { font-size: 1rem; margin: 0 0 .25rem; }
.products-grid .product-info .desc { margin: 0 0 .5rem; color: var(--text-2); font-size: .85rem; }
.products-grid .product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: .5rem; }

/* Kategoriler Üstte 4 Sütun — dikey kartlar, 4 sütun */
.products-cards { grid-template-columns: repeat(4, 1fr); }
.products-cards .product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.products-cards .product-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.products-cards .product-info { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: .65rem .75rem .75rem; }
.products-cards .product-info h3 { font-size: .9rem; margin: 0 0 .15rem; }
.products-cards .product-info .desc { margin: 0 0 .5rem; color: var(--text-2); font-size: .75rem; }
.products-cards .product-footer { display: flex; justify-content: space-between; align-items: center; gap: .25rem; margin-top: auto; }
.products-cards .product-footer .price { margin: 0; font-weight: 700; color: var(--brand); font-size: .9rem; }
.products-cards .add-to-cart { min-width: 30px; height: 30px; font-size: 1rem; }

/* Liste düzenleri — yatay kartlar (görsel solda), sıra sayısı değişken */
.products-list { display: flex; flex-direction: column; }
.products-list.products-c2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.products-list.products-c3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.products-list .product-card { display: flex; flex-direction: row; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .75rem; }
.products-list .product-image { width: 72px; height: 72px; flex-shrink: 0; object-fit: cover; border-radius: 10px; }
.products-list .product-info { flex: 1; display: flex; flex-direction: column; }
.products-list .product-info h3 { margin: 0 0 .25rem; font-size: 1rem; }
.products-list .product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .25rem; gap: .5rem; }

/* Mobil kategori offcanvas (sol/sağ düzenlerde) */
.cat-toggle { display: none; }
.cat-backdrop { display: none; }

/* Responsive */
@media (max-width: 560px) {
    .products-cards { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(1, 1fr); }
    .products-list.products-c2, .products-list.products-c3 { grid-template-columns: repeat(1, 1fr); }
}
@media (min-width: 561px) and (max-width: 900px) {
    .products-list.products-c3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .menu-page[data-cat="left"] .menu-body,
    .menu-page[data-cat="right"] .menu-body { flex-direction: column; }
    .menu-page[data-cat="left"] .cat-toggle,
    .menu-page[data-cat="right"] .cat-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
        background: var(--surface-2); color: var(--text); font-size: 1.1rem; cursor: pointer;
    }
    .menu-page[data-cat="left"] .category-tabs {
        position: fixed; top: 0; left: 0; bottom: 0; height: auto;
        width: min(78vw, 300px); min-width: 0; z-index: 60;
        transform: translateX(-105%); transition: transform .25s ease;
        border-right: 1px solid var(--border); overflow-y: auto;
    }
    .menu-page[data-cat="right"] .category-tabs {
        position: fixed; top: 0; right: 0; bottom: 0; height: auto;
        width: min(78vw, 300px); min-width: 0; z-index: 60;
        transform: translateX(105%); transition: transform .25s ease;
        border-left: 1px solid var(--border); border-right: none; overflow-y: auto;
    }
    .menu-page.cat-open[data-cat="left"] .category-tabs,
    .menu-page.cat-open[data-cat="right"] .category-tabs { transform: translateX(0); }
    .cat-backdrop {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .menu-page.cat-open .cat-backdrop { opacity: 1; pointer-events: auto; }
    .menu-header { flex-wrap: wrap; row-gap: .6rem; }
    .menu-header .menu-search { order: 3; flex: 1 1 100%; margin: 0; }
    .menu-header-actions { margin-left: auto; flex-wrap: wrap; }
}

.menu-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.social-bar { display: flex; gap: .4rem; margin-left: auto; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--brand); }
.review-btn { background: var(--brand); color: #fff; border-radius: 999px; padding: .4rem .9rem; }

.layout-options, .qr-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.layout-card, .qr-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.layout-card:has(input:checked), .qr-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.layout-card:has(input:checked) .layout-title, .qr-card:has(input:checked) .qr-title { color: var(--brand-dark); }
.layout-card:has(input:checked) .pw-side span, .layout-card:has(input:checked) .pw-lines i, .layout-card:has(input:checked) .pw-img { background: #B8C6BC; }
.layout-card:has(input:checked) .pw-item { background: #fff; }
.layout-card input, .qr-card input { display: none; }
.layout-title, .qr-title { font-weight: 600; font-size: .9rem; }
.layout-preview { width: 100%; height: auto; border-radius: 6px; background: #F8FAFC; }
.preview-wire {
    width: 100%;
    height: 185px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #F8FAFC;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pw-main { flex: 1; display: flex; gap: 8px; min-height: 0; }
.preview-list-left .pw-main, .preview-list-right .pw-main { flex-direction: row; }
.preview-list-right .pw-main { flex-direction: row-reverse; }
.pw-top { display: flex; justify-content: space-between; align-items: center; height: 12px; flex-shrink: 0; }
.pw-logo { width: 18px; height: 7px; background: var(--brand); border-radius: 3px; }
.pw-dots { display: flex; gap: 3px; }
.pw-dots i { width: 4px; height: 4px; border-radius: 50%; background: #94A3B8; }
.pw-pills { display: flex; gap: 4px; flex: none; overflow: hidden; }
.pw-pills span { height: 8px; width: 34px; border-radius: 5px; background: #E2E8F0; flex: none; }
.pw-pills span:first-child { background: var(--brand); }
.pw-side { width: 30%; min-width: 60px; background: #E2E8F0; border-radius: 6px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pw-side span { height: 5px; background: #CBD5E1; border-radius: 2px; }
.pw-items { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; }
.pw-items.pw-cols2, .pw-items.pw-cols3, .pw-items.pw-cols4 { display: grid; gap: 5px; }
.pw-items.pw-cols2 { grid-template-columns: repeat(2, 1fr); }
.pw-items.pw-cols3 { grid-template-columns: repeat(3, 1fr); }
.pw-items.pw-cols4 { grid-template-columns: repeat(4, 1fr); }
.pw-item { display: flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #E2E8F0; border-radius: 5px; padding: 4px; }
.pw-items.pw-cols4 .pw-item { flex-direction: column; align-items: stretch; }
.pw-img { width: 14px; height: 14px; background: #CBD5E1; border-radius: 3px; flex-shrink: 0; }
.pw-items.pw-cols2 .pw-img, .pw-items.pw-cols3 .pw-img { width: 12px; height: 12px; }
.pw-items.pw-cols4 .pw-img { width: 100%; height: 16px; }
.pw-lines { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pw-lines i { height: 3px; background: #CBD5E1; border-radius: 1px; }
.pw-lines i:nth-child(2) { width: 60%; }
.pw-btn { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; align-self: flex-end; }

.qr-preview { width: 100%; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: .75rem; }
.qr-preview img { max-width: 80px; }
.qr-placeholder { width: 80px; height: 80px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.qr-meta { font-size: .75rem; color: var(--text-2); margin-top: .25rem; }

.collapse { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; background: var(--surface); }
.collapse summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; }
.collapse summary::-webkit-details-marker { display: none; }
.collapse-body { padding: 1rem; border-top: 1px solid var(--border); }

/* Medya yukleme alanlari (logo/favicon) */
.media-field {
    display: flex; flex-direction: column; gap: .5rem;
    border: 1px solid var(--border); border-radius: 12px;
    padding: .9rem; background: var(--surface);
}
.media-field > label { font-weight: 600; font-size: .85rem; color: var(--text); }
.media-preview {
    height: 90px; display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px dashed var(--border);
    border-radius: 10px; overflow: hidden;
}
.media-preview.is-dark { background: #141F36; }
.media-preview.is-small { height: 64px; }
.media-preview img { max-width: 140px; max-height: 100%; object-fit: contain; }
.media-preview.is-small img { max-width: 44px; }
.media-empty { color: var(--text-2); font-size: .8rem; }
.media-field input[type="file"] { font-size: .8rem; color: var(--text-2); }
.media-field input[type="file"]::file-selector-button {
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface-2); color: var(--text);
    padding: .4rem .9rem; margin-right: .6rem;
    font-size: .8rem; font-weight: 600; cursor: pointer;
}
.media-field input[type="file"]::file-selector-button:hover { border-color: var(--brand); color: var(--brand); }
/* Base product info typography */
.product-info h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--text); }
.product-info .desc { margin: 0; color: var(--text-2); font-size: 0.85rem; }
.product-info .price { margin: 0; font-weight: 700; color: var(--brand); }
.add-to-cart { min-width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--brand); color: #fff; font-size: 1.1rem; cursor: pointer; }

.cart-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 20;
}
.cart-count {
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    width: 1.4rem;
    height: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}
.cart-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    z-index: 30;
    max-height: 70vh;
    overflow-y: auto;
}
@media (min-width: 768px) {
    .cart-sheet {
        left: auto;
        right: 1.25rem;
        bottom: 92px;
        width: 380px;
        max-height: min(560px, calc(100vh - 140px));
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
        display: flex;
        flex-direction: column;
        animation: cartPop 0.22s ease-out;
    }
    .cart-sheet[style*="none"] { display: none; }
    .cart-sheet #cartItems { overflow-y: auto; }
    @keyframes cartPop {
        from { opacity: 0; transform: translateY(14px) scale(0.97); }
        to { opacity: 1; transform: none; }
    }
}
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { margin: 0; }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.qty-controls { display: flex; gap: 0.35rem; }
.btn-qty {
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin: 1rem 0;
}

.adisyon-alerts { position: fixed; bottom: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; }
.adisyon-alerts .notice-new {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border: 1px solid var(--brand-2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.adisyon-section { margin-bottom: 2rem; }
.adisyon-section h2 { margin: 0 0 1rem; color: var(--brand); }
.adisyon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}
.adisyon-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}
.adisyon-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; display: flex; align-items: baseline; gap: .4rem; }
.adisyon-card h3 .tname { flex: 1; min-width: 0; }
.adisyon-card .order-status { margin: 0; font-size: 0.9rem; color: var(--text-2); }
.adisyon-card .order-total { margin: 0.5rem 0 0; font-weight: 700; color: var(--brand); }
.adisyon-card .order-time { margin: 0; font-size: 0.8rem; color: var(--text-2); }
.adisyon-card.empty .empty { color: var(--text-2); margin: 1rem 0 0; }

.adisyon-card.status-pending { border-left: 5px solid #F59E0B; }
.adisyon-card.status-confirmed { border-left: 5px solid var(--brand-2); }
.adisyon-card.status-preparing { border-left: 5px solid #8B5CF6; }
.adisyon-card.status-ready { border-left: 5px solid #10B981; }
.adisyon-card.status-served { border-left: 5px solid #64748B; }
.adisyon-card.blink { box-shadow: 0 0 0 4px rgba(31, 101, 244, 0.35); }

.status-actions { display: flex; gap: 0.4rem; margin-top: 1rem; flex-wrap: nowrap; }
.status-actions form { display: flex; flex: 1; min-width: 0; }
.status-actions .btn-sm {
    flex: 1; min-width: 0; min-height: 34px; justify-content: center;
    border-radius: 8px; font-weight: 600; font-size: .8rem;
    white-space: nowrap; padding: .35rem .3rem; overflow: hidden; text-overflow: ellipsis;
}
.status-actions form .btn-sm {
    background: var(--brand); border-color: var(--brand); color: #fff;
}
.status-actions form .btn-sm.btn-danger {
    background: #DC2626; border-color: #DC2626; color: #fff;
}
.status-actions > a.btn-sm {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    flex: 1;
}
.status-actions > a.btn-sm:hover { border-color: var(--brand); color: var(--brand); }

.sticky-actions {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: .75rem;
    background: var(--bg, #0f1626); padding: .6rem 0;
    border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}
.merge-confirm {
    border: 1px solid #F59E0B; border-left: 4px solid #F59E0B;
    background: rgba(245, 158, 11, .08); border-radius: 12px;
    padding: .9rem 1.1rem; margin-bottom: 1rem; max-width: 700px;
    display: flex; flex-direction: column; gap: .35rem; font-size: .9rem;
}
.merge-actions { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }

.drag-handle { color: var(--text-2); user-select: none; text-align: center; }
.sortable tr { transition: background 0.15s ease; }
.sortable tr.dragging { opacity: 0.5; background: rgba(31, 101, 244, 0.08); }
.hint { color: var(--text-2); font-size: 0.85rem; margin: 0 0 0.8rem; }

html[data-theme="dark"] {
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-2: #334155;
    --text: #F8FAFC;
    --text-2: #CBD5E1;
    --border: #334155;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.theme-toggle {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 50;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.8rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
}

.menu-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.social-bar { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.form-inline { display: flex; flex-wrap: nowrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.form-inline input[type="text"] { flex: 1; min-width: 150px; }
.form-inline select { flex: 0 1 auto; min-width: 150px; }

.brand-layout { display: grid; grid-template-columns: 60% 30%; gap: 1.25rem; align-items: start; }
.brand-media { display: flex; flex-direction: column; gap: 1rem; }
.media-boxes { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; align-items: stretch; }
.media-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.media-box > .box-title { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.media-box .layout-options { flex: 1; grid-template-columns: repeat(2, 1fr); }
.media-box .layout-card { height: 100%; }
.media-box .form-group { margin: 0; }
.order-type-row { display: flex; gap: 1rem; margin: .5rem 0; }
.order-type-row label { display: flex; align-items: center; gap: .35rem; font-weight: 500; }
@media (max-width: 900px) {
    .brand-layout { grid-template-columns: 1fr; }
    .media-boxes { grid-template-columns: 1fr; }
}

.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.form-grid .wide { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 500; margin-bottom: .35rem; }
.form-group input[type="checkbox"] { width: auto; margin-right: .4rem; }
form h2 { margin: 1.5rem 0 .75rem; font-size: 1.2rem; color: var(--brand); }
.receipt { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); max-width: 600px; color: #000; }
.receipt p, .receipt td, .receipt th, .receipt li, .receipt h2, .receipt strong, .receipt small, .receipt span { color: #000; }
.receipt .receipt-lines th, .receipt .receipt-lines td { border-bottom-color: #bbb; }
.receipt .receipt-totals { border-top-color: #999; }
.receipt .receipt-totals .grand { border-top-color: #999; }
.receipt .receipt-note { background: #f4f4f4; }
.receipt .receipt-footer { border-top-color: #999; color: #000; }
.receipt .receipt-footer span { color: #000; }
.receipt-meta p { display: flex; gap: .4rem; margin: .2rem 0; }
.receipt-meta p strong { min-width: 82px; display: inline-block; }
.receipt-header { text-align: center; margin-bottom: 1.5rem; }
.receipt-header h2 { margin: 0 0 .25rem; }
.receipt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.receipt-logo { max-width: 150px; max-height: 60px; object-fit: contain; filter: grayscale(1) contrast(1.15); }
.receipt-brand h2 { margin: 0; }
.receipt-brand p { margin: .15rem 0; font-size: .9rem; }
.receipt-dest { text-align: right; font-size: .9rem; }
.receipt-dest p { margin: .1rem 0; }
.receipt-dest .r-branch { font-weight: 700; }
.receipt-dest .r-no { font-weight: 700; margin-top: .3rem; }
.receipt-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding-top: .6rem; border-top: 1px dashed var(--border); font-size: .72rem; color: var(--text-2); }
.receipt-meta p { margin: .25rem 0; }
.receipt-lines { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.receipt-lines th, .receipt-lines td { padding: .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.receipt-lines .num { text-align: right; }
.receipt-totals { border-top: 2px dashed var(--border); padding-top: 1rem; margin-top: 1rem; }
.receipt-totals p { display: flex; justify-content: space-between; margin: .25rem 0; }
.receipt-totals .grand { font-size: 1.2rem; margin-top: .75rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.receipt-note { background: var(--surface-2); padding: .75rem; border-radius: var(--radius); margin: 1rem 0; }
.receipt-actions { margin-top: 1.5rem; text-align: center; }
@media print {
    body * { visibility: hidden; }
    #receipt, #receipt * { visibility: visible; }
    #receipt { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; }
    .receipt-actions { display: none; }
}




/* Menü tema seçici renk örnekleri */
.theme-swatches { display: flex; gap: 6px; justify-content: center; padding: 6px 0; }
.theme-swatches span { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border); }

/* QR şablon yer tutucuları */
.qrw { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 7px; min-height: 150px; }
.qrw .pw-logo { width: 30px; height: 12px; border-radius: 6px; }
.qrw-line { height: 3px; background: #CBD5E1; border-radius: 2px; }
.qrw-arc { height: 9px; border-top: 1.5px dashed #94A3B8; border-radius: 50%; margin: 0 -3px; }
.qrw-arc-v { width: 9px; align-self: stretch; border-left: 1.5px dashed #94A3B8; border-radius: 50%; margin: 0 4px; flex-shrink: 0; }
.qrw-qr { width: 46px; height: 46px; margin: 2px auto; border: 1.5px solid #94A3B8; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #94A3B8; flex-shrink: 0; }
.qrw-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qrw-col { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.qrw-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 5px; display: flex; justify-content: space-between; }
.qrw-foot i { display: block; height: 3px; width: 34%; background: #CBD5E1; border-radius: 2px; }
.qrw-foot i:last-child { width: 22%; }

/* Ekran Menusu builder */
.screen-orient-tabs { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 1rem; flex-wrap: wrap; }
.screen-orient-tabs > a { padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: .85rem; }
.screen-orient-tabs > a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.screen-orient-tabs .screen-urls { margin-left: auto; font-size: .8rem; color: var(--text-2); }
.screen-orient-tabs code { background: var(--surface-2); padding: .15rem .5rem; border-radius: 6px; }
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sb-pages { display: flex; gap: .4rem; }
.sb-tab { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.sb-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sb-tools { display: flex; align-items: center; gap: .6rem; }
.sb-tools select { width: auto; }
.screen-builder { max-width: none; width: 100%; }
.sb-area { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.25rem; align-items: stretch; width: 100%; }
.sb-pool { display: flex; flex-direction: column; min-width: 0; }
.sb-pool h3 { font-size: .8rem; color: var(--text-2); margin: 0 0 .5rem; }
.sb-dropzone { min-height: 320px; border: 1.5px dashed var(--border); border-radius: var(--radius); padding: .6rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; align-content: flex-start; }
.sb-dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.sb-grid { display: grid; gap: .9rem; width: 100%; align-items: start; }
.sb-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .8rem; font-size: .85rem; font-weight: 500; cursor: grab; display: flex; align-items: center; justify-content: space-between; gap: .5rem; user-select: none; }
.sb-chip::after { content: "\2630"; color: var(--text-2); }
.sb-chip:active { cursor: grabbing; }
.sb-actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
@media (max-width: 900px) {
    .sb-area { grid-template-columns: 1fr; }
    .sb-dropzone { min-height: 120px; }
    .screen-orient-tabs .screen-urls { margin-left: 0; width: 100%; }
}

/* Mobil admin: off-canvas sidebar + yatay kayan tablolar */
.admin-burger { display: none; }
.admin-backdrop { display: none; }
@media (max-width: 900px) {
    .admin-burger {
        display: inline-flex; align-items: center; justify-content: center;
        position: fixed; top: .7rem; left: .7rem; z-index: 85;
        width: 42px; height: 42px; border-radius: 10px;
        border: 1px solid var(--border); background: var(--surface);
        color: var(--text); font-size: 1.15rem; cursor: pointer;
        box-shadow: var(--shadow);
    }
    .admin-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
        width: 280px !important; max-width: 84vw; padding: 1.5rem !important;
        transform: translateX(-106%); transition: transform .22s ease;
        box-shadow: 0 0 40px rgba(15, 23, 42, .25);
    }
    .admin-shell.nav-open .admin-sidebar { transform: translateX(0); }
    .admin-backdrop {
        display: block; position: fixed; inset: 0; z-index: 80;
        background: rgba(15, 23, 42, .45);
        opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .admin-shell.nav-open .admin-backdrop { opacity: 1; pointer-events: auto; }
    .admin-main { padding: 4rem 1rem 1.25rem; min-width: 0; }
    .sidebar-toggle { display: none; }
    /* Daraltma stilleri mobilde gecersiz - menu acikken tam gorunur */
    .sb-collapsed .admin-sidebar .branch-switcher,
    .sb-collapsed .admin-sidebar .nav-group-title { display: block; }
    .sb-collapsed .admin-nav a { font-size: 1rem; justify-content: flex-start; gap: .55rem; padding: .6rem .85rem; }
    .sb-collapsed .admin-sidebar .brand-mark { font-size: inherit; }
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-scroll .data-table { min-width: 560px; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .form-inline { flex-wrap: wrap; }
}

/* Menu header drawer: masaustunde icerigi aynen basar */
.menu-more-toggle, .menu-drawer-head, .drawer-label, .menu-drawer-backdrop, .menu-drawer-foot { display: none; }
.menu-drawer { display: contents; }

@media (max-width: 768px) {
    .menu-more-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
        border: 1px solid var(--menu-border, var(--border));
        background: var(--menu-surface-2, var(--surface-2));
        color: var(--menu-text, var(--text)); font-size: 1.25rem; cursor: pointer;
    }
    .menu-drawer {
        display: flex; flex-direction: column; gap: .6rem;
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
        width: min(80vw, 300px); padding: 1rem; overflow-y: auto;
        background: var(--menu-surface, var(--surface));
        border-left: 1px solid var(--menu-border, var(--border));
        transform: translateX(105%); transition: transform .25s ease;
        box-shadow: -8px 0 30px rgba(15, 23, 42, .3);
    }
    .menu-page.drawer-open .menu-drawer { transform: translateX(0); }
    .menu-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
    .menu-drawer-head h2 { margin: 0; font-size: 1rem; }
    .drawer-head-actions { display: flex; align-items: center; gap: .5rem; }
    .menu-drawer .menu-drawer-head .menu-theme-toggle {
        width: 40px; height: 40px; border-radius: 50%; padding: 0;
        justify-content: center; flex-shrink: 0;
    }
    .menu-page .desk-theme { display: none !important; }
    .menu-drawer-foot {
        display: block; margin-top: auto; padding-top: .8rem;
        border-top: 1px solid var(--menu-border, var(--border));
        font-size: .72rem; color: var(--menu-text-2, var(--text-2));
        text-align: center;
    }
    .menu-drawer-backdrop {
        display: block; position: fixed; inset: 0; z-index: 75;
        background: rgba(15, 23, 42, .45);
        opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .menu-page.drawer-open .menu-drawer-backdrop { opacity: 1; pointer-events: auto; }
    /* Drawer icindeki dugmeler tam genislik satir gibi */
    .menu-drawer .btn-outline, .menu-drawer .review-btn {
        width: 100%; justify-content: flex-start; border-radius: 10px;
        display: flex; align-items: center; gap: .55rem; height: 44px; padding: 0 1rem;
        font-size: .9rem; border: 1px solid var(--menu-border, var(--border));
        background: var(--menu-surface-2, var(--surface-2));
        color: var(--menu-text, var(--text));
    }
    .menu-drawer .menu-theme-toggle {
        width: 100%; height: 44px; border-radius: 10px; padding: 0 1rem;
        display: flex; align-items: center; gap: .6rem; font-size: .95rem;
    }
    .menu-drawer .drawer-label { display: inline; font-size: .9rem; font-weight: 600; }
    .menu-drawer .social-bar { margin-left: 0; margin-top: .4rem; }

    /* Badge satiri + fiyat ortali, sigmazsa alt satira ortali iner */
    .menu-page .product-footer { flex-wrap: wrap; row-gap: .35rem; justify-content: center; text-align: center; }
    .menu-page .pf-badges { flex-wrap: wrap; gap: .25rem; justify-content: center; }
    .menu-page .p-badge { font-size: .6rem; padding: .1rem .38rem; white-space: nowrap; }
    .menu-page .pf-right { margin-left: 0; justify-content: center; }
    .menu-page .product-footer .price { font-size: .82rem; }
}

/* Platform paneli */
.panel-topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: .8rem 1.5rem; background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
}
.panel-topbar .brand-mark { font-size: 1.3rem; }
.panel-topbar nav { display: flex; gap: .25rem; margin-left: 1rem; }
.panel-topbar nav a {
    padding: .45rem .9rem; border-radius: 8px; font-weight: 600; font-size: .9rem;
    color: var(--text-2); text-decoration: none;
}
.panel-topbar nav a:hover { background: var(--surface-2); color: var(--text); }
.panel-topbar .panel-user { margin-left: auto; font-size: .85rem; color: var(--text-2); }
.panel-badge {
    font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-dark);
}
.panel-main { padding: 1.5rem; max-width: 1200px; margin: 0 auto; }
.panel-main .admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem; }
.panel-main .admin-header h1 { margin: 0; }
.panel-main .form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.panel-main .form-group > label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.panel-main .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.pkg-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.pkg-feature {
    display: flex !important; flex-direction: row !important; align-items: center; gap: .55rem;
    border: 1px solid var(--border); border-radius: 10px; padding: .65rem .85rem;
    font-size: .88rem; font-weight: 600; cursor: pointer; background: var(--surface-2);
    color: var(--text); transition: border-color .15s, background .15s, color .15s;
}
.pkg-feature input { margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.pkg-feature span { white-space: nowrap; }
.pkg-feature:has(input:checked) {
    border-color: var(--brand); background: var(--brand); color: #fff;
}
.pkg-feature:has(input:checked) input { accent-color: #fff; }

/* Hesap iste bildirimi ayrimi */
.notice-new.is-bill { border-left: 4px solid #F59E0B; }
.menu-header-actions #requestBill { display: inline-flex; align-items: center; gap: .35rem; }

/* Masaustu header siralamasi: Garson - Hesap - Takip - Degerlendir - Sosyal - Tema */
@media (min-width: 769px) {
    .menu-header-actions #callWaiterHeader { order: 1; }
    .menu-header-actions #requestBill { order: 2; }
    .menu-header-actions #trackOrderBtn { order: 3; }
    .menu-header-actions .review-btn { order: 4; }
    .menu-header-actions .social-bar { order: 5; }
    .menu-header-actions .desk-theme { order: 6; }
}
@media (max-width: 560px) {
    .menu-header-actions .btn-primary, .menu-header-actions .btn-outline { padding: 0 .7rem; font-size: .78rem; }
    .menu-header-actions .btn-primary svg, .menu-header-actions .btn-outline svg { flex-shrink: 0; }
}

/* Ekran menusu canli onizleme */
.screen-work { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.screen-preview { position: sticky; top: 1rem; }
.screen-preview-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; font-weight: 700; font-size: .9rem; }
.tv-frame { background: #111827; border-radius: 14px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06); margin: 0 auto; }
.tv-frame.is-portrait { width: 270px; }
.tv-frame.is-landscape { width: 100%; max-width: 560px; }
.tv-frame iframe { display: block; width: 100%; border: 0; border-radius: 6px; background: #0b0f17; }
.tv-frame.is-portrait iframe { aspect-ratio: 9 / 16; height: auto; }
.tv-frame.is-landscape iframe { aspect-ratio: 16 / 9; height: auto; }
@media (max-width: 1100px) {
    .screen-work { grid-template-columns: 1fr; }
    .screen-preview { position: static; }
}

/* === UI/UX turu: landing, topbar, standart butonlar, adisyon === */

/* Landing */
.lp { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.lp-hero {
    background: linear-gradient(135deg, #0A1E4F 0%, #1F65F4 100%);
    color: #fff; padding: clamp(2rem, 6vw, 5rem);
    display: flex; flex-direction: column; justify-content: center; gap: 1rem;
}
.lp-logo { height: 44px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.lp-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.12; margin: 0; font-weight: 800; }
.lp-sub { font-size: 1.05rem; color: #D7E3FF; margin: 0 0 .5rem; }
.lp-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.lp-feats li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: .7rem .95rem; }
.lp-feats strong { display: block; font-size: .95rem; }
.lp-feats span { font-size: .8rem; color: #D7E3FF; }
.lp-card { display: flex; flex-direction: column; justify-content: center; gap: .75rem; padding: clamp(2rem, 5vw, 4rem); background: var(--bg); }
.lp-card h2 { margin: 0; font-size: 1.6rem; }
.lp-card p { color: var(--text-2); margin: 0 0 .5rem; }
.lp-btn { width: 100%; padding: .9rem 1rem; font-size: 1rem; }
.lp-btn-ghost { display: block; text-align: center; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); font-size: .9rem; text-decoration: none; }
.lp-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.lp-foot { color: var(--text-2); margin-top: 1.5rem; text-align: center; font-size: .75rem; }
@media (max-width: 860px) { .lp { grid-template-columns: 1fr; } .lp-hero { padding: 2.5rem 1.5rem; } }

/* Üst bar (sağ üst: ayarlar + profil) */
.admin-topbar {
    position: fixed; top: 0; left: 280px; right: 0; height: 52px; z-index: 40;
    display: flex; align-items: center; justify-content: flex-end; gap: .4rem;
    padding: 0 1.5rem 0 4rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.sb-collapsed ~ .admin-topbar, .admin-shell:has(.sb-collapsed) .admin-topbar { left: 72px; }
.tb-links { display: flex; gap: .25rem; margin-right: .75rem; }
.tb-link {
    display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem;
    border-radius: 8px; color: var(--text-2); font-size: .82rem; font-weight: 600; text-decoration: none;
}
.tb-link:hover { background: var(--surface-2); color: var(--text); }
.tb-link svg { width: 16px; height: 16px; }
.tb-profile { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); padding: .3rem .4rem; border-radius: 10px; }
.tb-profile:hover { background: var(--surface-2); }
.tb-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.tb-avatar-init { display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem; border: none; }
.tb-who { display: flex; flex-direction: column; line-height: 1.15; }
.tb-who strong { font-size: .85rem; }
.tb-who small { font-size: .7rem; color: var(--text-2); }
.admin-main { padding-top: 4.5rem; }
@media (max-width: 1024px) {
    .admin-topbar { left: 0; padding-left: 4.2rem; }
    .tb-link span { display: none; }
    .tb-who { display: none; }
}

/* Adisyon Ekranı nav CTA */
.admin-nav a.nav-cta {
    margin-top: .6rem; font-weight: 700; border-radius: 10px; padding: .75rem .85rem;
    border: 1.5px solid var(--brand); color: var(--brand); background: transparent;
}
.admin-nav a.nav-cta:hover { background: var(--brand-soft); }
.admin-nav a.nav-cta.active {
    background: var(--brand); color: #fff;
    box-shadow: 0 4px 14px rgba(31,101,244,.3);
}
.sb-collapsed .admin-nav a.nav-cta { padding: .6rem; margin-top: .6rem; }
.admin-nav a.nav-cta-top { margin-top: 0; margin-bottom: .5rem; }

/* Topbar install butonu (button elemani icin sifirlama) */
button.tb-link { background: none; border: 0; font-family: inherit; cursor: pointer; }
.tb-install:not([hidden]) { display: inline-flex; }

/* Standart buton boyutu */
.btn-primary {
    padding: .5rem 1rem; font-size: .85rem; border-radius: 8px;
    border: 1px solid var(--brand); min-height: 34px;
}
.btn-sm { min-height: 34px; justify-content: center; font-weight: 500; }

/* Sayfa başlığı altına ayırma çizgisi */
.admin-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}
.admin-header > div, .admin-header > .actions, .admin-header > .form-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Sayısal sütunlar: sağa yaslı, tek satır */
.data-table .num { text-align: right; white-space: nowrap; }

/* Gösterge Paneli şube tablosu: tutar sütunlarına eşit alan */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .branch-stats { min-width: 860px; }
.branch-stats { table-layout: fixed; }
.branch-stats th:first-child, .branch-stats td:first-child { width: 16%; }
.data-table.branch-stats th:last-child { width: auto; }
.branch-stats td { overflow: hidden; text-overflow: ellipsis; }

/* Raf ürünleri */
.tag-danger { background: #FEE2E2; color: #991B1B; }
.tag-paid { background: #D1FAE5; color: #065F46; }
.tag-pending { background: #FEF3C7; color: #92400E; }
.tag-pay-btn { margin-left: .4rem; }
.expense-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1.25rem; }
.expense-filter input[type="date"] { flex: 0 1 auto; width: auto; }
.expense-filter select { min-width: 150px; }
[data-theme="dark"] .tag-danger { background: #3D1A1A; color: #F87171; }
.shelf-row-out td { opacity: .55; }
.shelf-add-form { display: flex; gap: .35rem; align-items: center; }
.shelf-add-form input { width: 80px; padding: .35rem .5rem; }
.shelf-tag { display: inline-block; margin-left: .4rem; padding: .1rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); }
.shelf-tag.out { background: #FEE2E2; color: #991B1B; }
[data-theme="dark"] .shelf-tag.out { background: #3D1A1A; color: #F87171; }
.prod-row.shelf-out td { opacity: .55; }

/* Menü: tükenen ürün */
.product-card.is-out { opacity: .55; cursor: not-allowed; }
.soldout-badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; background: #FEE2E2; color: #991B1B; margin-bottom: .15rem; }

/* Liste eylem sütunu: sağa yaslı, içerik kadar */
.data-table td.actions { display: table-cell; text-align: right; white-space: nowrap; width: 1%; }
.data-table td.actions > :not(:first-child) { margin-left: .35rem; }
.data-table th:last-child { width: 1%; }

/* Ayarlar > Şubeler: yoğun eylem hücresi taşmadan sarar, kart dışına kanamaz */
.collapse-body { overflow-x: auto; }
.collapse .data-table { min-width: 620px; }
.collapse .data-table td.actions { white-space: normal; min-width: 190px; }
.collapse .data-table td.actions .btn-sm { margin: .1rem 0; }

/* Mobil üst bar: ikonlar rahatlasın */
@media (max-width: 640px) {
    .admin-topbar { padding: 0 .6rem 0 4rem; gap: .1rem; height: 56px; }
    .tb-links { gap: 0; margin-right: .25rem; }
    .tb-link { padding: .45rem .5rem; }
    .tb-link svg { width: 18px; height: 18px; }
    .tb-profile { padding: .25rem; }
    .tb-avatar { width: 30px; height: 30px; }
}

/* Stok tablosu: inputlar daralmasın, yatay kaydırma ile rahat yazılsın */
.stock-table { min-width: 720px; }
.stock-table input, .stock-table select { min-width: 0; }
.stock-table input[type="text"] { min-width: 150px; }
.stock-table input[type="number"] { min-width: 90px; }
.stock-table select { min-width: 80px; }
.stock-table .stock-col-num { width: 110px; }

/* Gün sonu raporu kart ızgarası */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.collapse .data-table td.actions select { max-width: 140px; }

/* Ekran menüsü builder: önizleme alta, daha büyük */
.screen-work { grid-template-columns: 1fr; }
.screen-preview { position: static; }
.tv-frame.is-portrait { width: 380px; max-width: 100%; }
.tv-frame.is-landscape { max-width: 900px; }

/* Adisyon doluluk + birleştirme */
.occ-badge {
    display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem;
    border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
    font-size: .82rem; font-weight: 600; color: var(--text-2);
}
.occ-badge::first-letter { color: var(--brand); }
.adisyon-card.busy { background: var(--brand); color: #fff; border-color: var(--brand); }
.adisyon-card.busy h3 { color: #fff; }
.adisyon-card.busy .order-status, .adisyon-card.busy .order-time { color: rgba(255,255,255,.8); }
.adisyon-card.busy .order-total { color: #fff; }
.adisyon-card.busy .status-actions .btn-sm { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); color: #fff; }
.adisyon-card.busy .status-actions .btn-sm:hover { background: rgba(255,255,255,.28); }
.adisyon-card.busy .status-actions .btn-sm.btn-danger { background: rgba(0,0,0,.25); border-color: rgba(0,0,0,.3); color: #FECACA; }
.adisyon-card.is-merged { border-style: dashed; border-width: 1.5px; }
.cap-foot {
    margin: .75rem 0 0; padding-top: .5rem; border-top: 1px solid var(--border);
    font-size: .72rem; color: var(--text-2); text-align: right;
}
.adisyon-card.busy .cap-foot { border-color: rgba(255,255,255,.35); color: rgba(255,255,255,.85); }
.merge-group {
    grid-column: span var(--gspan, 2);
    border: 1.5px dashed var(--brand); border-radius: var(--radius);
    padding: .85rem; min-width: 0;
}
.merge-group-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; flex-wrap: wrap; }
.merge-group-head form { margin-left: auto; }
.merge-group-cap { font-size: .75rem; color: var(--text-2); font-weight: 600; }
.merge-group-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.adisyon-card.member { background: var(--surface); border-style: dashed; box-shadow: none; }
.member-note { margin: 0; font-size: .8rem; color: var(--text-2); }
.merge-tag {
    display: inline-block; font-size: .62rem; font-weight: 700; vertical-align: middle;
    background: rgba(0,0,0,.18); color: inherit; padding: .15rem .45rem; border-radius: 999px; margin-left: .35rem;
}
.merge-check { display: none; position: absolute; top: .6rem; right: .6rem; z-index: 2; }
.adisyon-card { position: relative; }
.merge-mode .adisyon-card.empty:not(.is-merged) .merge-check { display: block; }
.merge-check input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.merge-bar {
    display: none; position: sticky; bottom: 1rem; margin-top: 1.25rem; z-index: 30;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: .8rem 1rem; align-items: center; gap: .75rem; box-shadow: var(--shadow);
}
.merge-mode .merge-bar { display: flex; }
.move-mode .move-bar { display: flex; }
.merge-bar span { flex: 1; font-size: .9rem; }

/* Masa Tasi modu */
.move-mode .merge-check { display: none !important; }
.move-mode .adisyon-card { cursor: pointer; }
.move-mode .adisyon-card.empty:not(.member):hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.move-mode .adisyon-card.move-src { box-shadow: 0 0 0 4px var(--brand); }
.move-mode .status-actions { pointer-events: none; opacity: .6; }

/* data-table estetik turu: belirgin başlık, ayrımlar, hover */
.data-table thead th {
    background: rgba(148, 163, 184, .14);
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-2);
    padding: .75rem 1rem;
    border-bottom: 2px solid rgba(148, 163, 184, .4);
    white-space: nowrap;
}
.data-table td { border-bottom: 1px solid rgba(148, 163, 184, .18); }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover td { background: rgba(148, 163, 184, .07); }
.data-table .row-current td { background: rgba(148, 163, 184, .1); }
.data-table .row-current:hover td { background: rgba(148, 163, 184, .13); }

/* Ortak onay/uyarı penceresi */
.ridi-dialog-overlay {
    position: fixed; inset: 0; z-index: 9999; display: none;
    align-items: center; justify-content: center; padding: 1rem;
    background: rgba(10, 18, 38, .5); backdrop-filter: blur(3px);
}
.ridi-dialog-overlay.open { display: flex; }
.ridi-dialog {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 1.4rem 1.4rem 1.1rem; width: 100%; max-width: 420px;
    animation: ridiDialogIn .15s ease-out;
}
@keyframes ridiDialogIn {
    from { opacity: 0; transform: scale(.94) translateY(6px); }
    to { opacity: 1; transform: none; }
}
.ridi-dialog-msg {
    margin: 0 0 1.2rem; font-size: .95rem; line-height: 1.55;
    color: var(--text); white-space: pre-line;
}
.ridi-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }


/* Gun sonu raporu toolbar + istatistik izgarasi */
.report-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.report-toolbar .form-inline { margin: 0 !important; }
.report-toolbar .form-inline input[type="date"] { height: 38px; }
.report-toolbar .btn-sm, .report-toolbar .btn-primary { height: 38px; display: inline-flex; align-items: center; }
.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.report-stats .dash-card { margin: 0; }

/* Odeme yontemi secim penceresi */
.ridi-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.ridi-pay-btn {
 padding: .85rem .5rem; border-radius: 10px;
 border: 1px solid var(--border, rgba(255,255,255,.14));
 background: rgba(255,255,255,.06); color: inherit; font-family: inherit;
 font-size: .92rem; font-weight: 600;
 cursor: pointer; transition: border-color .15s, background .15s;
}
.ridi-pay-btn:hover, .ridi-pay-btn:focus-visible { border-color: #1F65F4; background: rgba(31,101,244,.12); outline: none; }

/* Sahip maliyet sutunlari */
.cost-col { display: none; }
.costs-on .cost-col { display: table-cell; }
.cost-pos { color: #3ddc84; }
.cost-neg { color: #ff6b6b; }

/* Stok maliyet hucre */
.cost-cell { display: flex; flex-wrap: nowrap; align-items: center; gap: .35rem; min-width: 150px; }
.cost-cell input { flex: 1 1 auto; min-width: 90px; }
.cost-per { flex: 0 0 auto; color: var(--muted, #8b94a7); font-size: .72rem; white-space: nowrap; }
