/* =========================================================
   Restoran Yönetim Paneli — Tasarım Sistemi
   ========================================================= */

:root,
[data-bs-theme="light"] {
    --rp-primary: #f97316;
    --rp-primary-hover: #ea580c;
    --rp-primary-soft: rgba(249, 115, 22, .12);
    --rp-bg: #f4f5f9;
    --rp-surface: #ffffff;
    --rp-surface-2: #f8f9fc;
    --rp-border: #e8eaf0;
    --rp-text: #1d2433;
    --rp-muted: #6b7385;
    --rp-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
    --rp-shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
    --rp-sidebar: #12141b;
    --rp-sidebar-2: #1b1e28;
    --rp-sidebar-text: #a3a9b8;
    --rp-radius: 14px;
    --rp-radius-sm: 10px;

    --bs-primary: var(--rp-primary);
    --bs-primary-rgb: 249, 115, 22;
    --bs-body-bg: var(--rp-bg);
    --bs-body-color: var(--rp-text);
    --bs-border-color: var(--rp-border);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-link-color: var(--rp-primary-hover);
    --bs-link-color-rgb: 234, 88, 12;
    --bs-link-hover-color: #c2410c;
}

[data-bs-theme="dark"] {
    --rp-primary-soft: rgba(249, 115, 22, .18);
    --rp-bg: #0d0f14;
    --rp-surface: #161922;
    --rp-surface-2: #1c202b;
    --rp-border: #262b38;
    --rp-text: #e6e8ee;
    --rp-muted: #959cad;
    --rp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --rp-sidebar: #0a0c10;
    --rp-sidebar-2: #151820;

    --bs-body-bg: var(--rp-bg);
    --bs-body-color: var(--rp-text);
    --bs-border-color: var(--rp-border);
    --bs-secondary-bg: var(--rp-surface-2);
    --bs-tertiary-bg: var(--rp-surface-2);
    --bs-link-color: #fb923c;
    --bs-link-color-rgb: 251, 146, 60;
}

body {
    background: var(--rp-bg);
    color: var(--rp-text);
    font-size: .925rem;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rp-primary-soft); }

/* ---------- Bootstrap düzeltmeleri ---------- */
.btn-primary {
    --bs-btn-bg: var(--rp-primary);
    --bs-btn-border-color: var(--rp-primary);
    --bs-btn-hover-bg: var(--rp-primary-hover);
    --bs-btn-hover-border-color: var(--rp-primary-hover);
    --bs-btn-active-bg: #c2410c;
    --bs-btn-active-border-color: #c2410c;
    --bs-btn-disabled-bg: var(--rp-primary);
    --bs-btn-disabled-border-color: var(--rp-primary);
    font-weight: 600;
}
.btn-outline-primary {
    --bs-btn-color: var(--rp-primary-hover);
    --bs-btn-border-color: var(--rp-primary);
    --bs-btn-hover-bg: var(--rp-primary);
    --bs-btn-hover-border-color: var(--rp-primary);
    --bs-btn-active-bg: var(--rp-primary-hover);
    --bs-btn-active-border-color: var(--rp-primary-hover);
}
.btn { border-radius: var(--rp-radius-sm); font-weight: 500; --bs-btn-font-size: .9rem; }
.btn-sm { --bs-btn-font-size: .8rem; }
.btn-light { --bs-btn-bg: var(--rp-surface-2); --bs-btn-border-color: var(--rp-border); --bs-btn-color: var(--rp-text); --bs-btn-hover-bg: var(--rp-border); --bs-btn-hover-border-color: var(--rp-border); --bs-btn-hover-color: var(--rp-text); }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--rp-muted); border: 1px solid transparent; }
.btn-icon:hover { background: var(--rp-surface-2); color: var(--rp-text); border-color: var(--rp-border); }
.btn-sm.btn-icon { width: 32px; height: 32px; border-radius: 8px; }

.form-control, .form-select { border-radius: var(--rp-radius-sm); border-color: var(--rp-border); background-color: var(--rp-surface); padding: .55rem .8rem; font-size: .9rem; }
.form-select { padding-right: 2.25rem; }
.form-control-color { padding: .3rem; width: 3rem; height: 2.5rem; }
.form-control:focus, .form-select:focus { border-color: var(--rp-primary); box-shadow: 0 0 0 .2rem var(--rp-primary-soft); }
.form-check-input:checked { background-color: var(--rp-primary); border-color: var(--rp-primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem var(--rp-primary-soft); border-color: var(--rp-primary); }
.form-label { font-weight: 600; font-size: .82rem; color: var(--rp-text); margin-bottom: .35rem; }
.form-text { font-size: .78rem; }
.input-group-text { background: var(--rp-surface-2); border-color: var(--rp-border); color: var(--rp-muted); border-radius: var(--rp-radius-sm); }
.field-validation-error, .text-danger.small { font-size: .78rem; }
.input-validation-error { border-color: #ef4444 !important; }

.dropdown-menu { border-color: var(--rp-border); border-radius: 12px; padding: .4rem; background: var(--rp-surface); }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-size: .88rem; }
.dropdown-item:active { background: var(--rp-primary); }

.pagination { --bs-pagination-active-bg: var(--rp-primary); --bs-pagination-active-border-color: var(--rp-primary); --bs-pagination-color: var(--rp-text); --bs-pagination-bg: var(--rp-surface); --bs-pagination-border-color: var(--rp-border); --bs-pagination-hover-color: var(--rp-primary-hover); }
.page-link { border-radius: 8px !important; margin: 0 2px; }

.modal-content { background: var(--rp-surface); border-radius: var(--rp-radius); }
.nav-tabs { border-color: var(--rp-border); }
.nav-tabs .nav-link { color: var(--rp-muted); font-weight: 500; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--rp-primary-hover); background: transparent; border-bottom-color: var(--rp-primary); }

/* ---------- Kabuk ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--rp-sidebar);
    color: var(--rp-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
@media (max-width: 991.98px) {
    .sidebar { position: fixed; height: 100%; --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--rp-sidebar); }
}
@media (min-width: 992px) {
    /* Bootstrap, offcanvas-lg için geniş ekranda arka planı transparent !important yapar */
    .sidebar.offcanvas-lg { visibility: visible !important; transform: none !important; background-color: var(--rp-sidebar) !important; }
}

.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-link { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; box-shadow: 0 6px 18px rgba(249, 115, 22, .35); }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { color: #fff; font-size: .92rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--rp-sidebar-text); font-size: .72rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: #2a2e3a transparent; }
.nav-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #5d6475; padding: 1rem .75rem .4rem; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; margin-bottom: 2px; border-radius: 10px; color: var(--rp-sidebar-text); text-decoration: none; font-weight: 500; font-size: .89rem; transition: background .15s, color .15s; }
.nav-item i { font-size: 1.08rem; width: 20px; text-align: center; }
.nav-item:hover { background: var(--rp-sidebar-2); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .06)); color: #fff; box-shadow: inset 3px 0 0 var(--rp-primary); }
.nav-item.active i { color: var(--rp-primary); }
.sidebar-footer { padding: .9rem 1.25rem; font-size: .75rem; border-top: 1px solid rgba(255, 255, 255, .06); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 1rem;
    padding: .85rem 1.75rem;
    background: color-mix(in srgb, var(--rp-bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rp-border);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.2rem; font-weight: 700; margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { margin: 0; font-size: .8rem; color: var(--rp-muted); }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.topbar-clock { align-items: center; font-size: .82rem; color: var(--rp-muted); padding: .45rem .8rem; border: 1px solid var(--rp-border); border-radius: 10px; background: var(--rp-surface); font-variant-numeric: tabular-nums; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .3rem .6rem .3rem .3rem; border-radius: 12px; border: 1px solid var(--rp-border); background: var(--rp-surface); color: var(--rp-text); }
.user-chip strong { font-size: .82rem; }
.user-chip small { font-size: .72rem; color: var(--rp-muted); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.4rem; }

.content { padding: 1.75rem; flex: 1; }
@media (max-width: 575.98px) {
    .content { padding: 1rem; }
    .topbar { padding: .75rem 1rem; }
}

/* ---------- Kartlar ---------- */
.card {
    --bs-card-bg: var(--rp-surface);
    --bs-card-border-color: var(--rp-border);
    --bs-card-border-radius: var(--rp-radius);
    --bs-card-cap-bg: transparent;
    box-shadow: var(--rp-shadow);
}
.card-header { padding: 1rem 1.25rem; border-bottom-color: var(--rp-border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-title { font-size: .98rem; font-weight: 700; margin: 0; }
.card-subtitle { font-size: .78rem; color: var(--rp-muted); margin-top: .15rem; }
.card-body { padding: 1.25rem; }

.stat-card { position: relative; overflow: hidden; height: 100%; }
.stat-card .card-body { display: flex; flex-direction: column; gap: .4rem; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; }
.stat-label { font-size: .8rem; color: var(--rp-muted); font-weight: 500; }
.stat-value { font-size: clamp(1.1rem, 1.2vw + .75rem, 1.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 575.98px) {
    .stat-card .stat-icon { display: none; }
    .topbar-title p { display: none; }
    .stat-card .card-body { padding: 1rem; }
}
.stat-meta { font-size: .78rem; color: var(--rp-muted); }
.trend { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; font-size: .75rem; padding: .12rem .45rem; border-radius: 999px; }
.trend-up { color: #059669; background: rgba(16, 185, 129, .12); }
.trend-down { color: #dc2626; background: rgba(239, 68, 68, .12); }

.tone-orange { background: rgba(249, 115, 22, .12); color: #ea580c; }
.tone-green { background: rgba(16, 185, 129, .12); color: #059669; }
.tone-blue { background: rgba(59, 130, 246, .12); color: #2563eb; }
.tone-purple { background: rgba(139, 92, 246, .12); color: #7c3aed; }
.tone-pink { background: rgba(236, 72, 153, .12); color: #db2777; }
.tone-red { background: rgba(239, 68, 68, .12); color: #dc2626; }
[data-bs-theme="dark"] .tone-orange { color: #fb923c; }
[data-bs-theme="dark"] .tone-green { color: #34d399; }
[data-bs-theme="dark"] .tone-blue { color: #60a5fa; }
[data-bs-theme="dark"] .tone-purple { color: #a78bfa; }
[data-bs-theme="dark"] .tone-pink { color: #f472b6; }
[data-bs-theme="dark"] .tone-red { color: #f87171; }

/* ---------- Tablolar ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--rp-text); --bs-table-border-color: var(--rp-border); --bs-table-hover-bg: var(--rp-surface-2); margin: 0; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rp-muted); font-weight: 600; background: var(--rp-surface-2); border-bottom: 1px solid var(--rp-border); padding: .75rem 1rem; white-space: nowrap; }
.table > tbody td { padding: .8rem 1rem; vertical-align: middle; }
.table > tbody tr:last-child td { border-bottom: 0; }
.table-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--rp-surface-2); padding: .8rem 1rem; }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--rp-surface-2); flex-shrink: 0; display: grid; place-items: center; color: var(--rp-muted); border: 1px solid var(--rp-border); }
.thumb-lg { width: 72px; height: 72px; border-radius: 14px; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: .78rem; color: var(--rp-muted); }

/* ---------- Rozetler ---------- */
.badge-soft { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge-soft i { font-size: .72rem; }
.badge-success { background: rgba(16, 185, 129, .12); color: #047857; }
.badge-danger { background: rgba(239, 68, 68, .12); color: #b91c1c; }
.badge-warning { background: rgba(245, 158, 11, .15); color: #b45309; }
.badge-info { background: rgba(14, 165, 233, .12); color: #0369a1; }
.badge-primary { background: var(--rp-primary-soft); color: #c2410c; }
.badge-neutral { background: var(--rp-surface-2); color: var(--rp-muted); border: 1px solid var(--rp-border); }
[data-bs-theme="dark"] .badge-success { color: #34d399; }
[data-bs-theme="dark"] .badge-danger { color: #f87171; }
[data-bs-theme="dark"] .badge-warning { color: #fbbf24; }
[data-bs-theme="dark"] .badge-info { color: #38bdf8; }
[data-bs-theme="dark"] .badge-primary { color: #fb923c; }
.badge-purple { background: rgba(139, 92, 246, .12); color: #6d28d9; }
[data-bs-theme="dark"] .badge-purple { color: #a78bfa; }

/* ---------- Filtre çubuğu ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.toolbar .form-control, .toolbar .form-select { width: auto; min-width: 150px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--rp-muted); }
.search-box .form-control { padding-left: 2.2rem; min-width: 270px; }
@media (max-width: 575.98px) {
    .toolbar > * { flex: 1 1 100%; }
    .toolbar .form-control, .toolbar .form-select, .search-box .form-control { width: 100%; min-width: 0; }
}

.page-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }

/* ---------- Boş durum ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--rp-muted); }
.empty-state i { font-size: 2.6rem; opacity: .45; display: block; margin-bottom: .75rem; }
.empty-state h6 { color: var(--rp-text); font-weight: 600; }

/* ---------- Masa planı ---------- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .85rem; }
.table-tile {
    position: relative; border-radius: var(--rp-radius); padding: .9rem; min-height: 104px;
    background: var(--rp-surface); border: 1px solid var(--rp-border); border-top: 4px solid #10b981;
    display: flex; flex-direction: column; justify-content: space-between; transition: transform .15s, box-shadow .15s;
}
.table-tile:hover { transform: translateY(-2px); box-shadow: var(--rp-shadow); }
.table-tile .tile-name { font-weight: 800; font-size: 1.05rem; }
.table-tile .tile-meta { font-size: .74rem; color: var(--rp-muted); }
.table-tile.status-1 { border-top-color: #ef4444; background: color-mix(in srgb, #ef4444 5%, var(--rp-surface)); }
.table-tile.status-2 { border-top-color: #f59e0b; background: color-mix(in srgb, #f59e0b 6%, var(--rp-surface)); }
.table-tile.status-3 { border-top-color: #0ea5e9; }
.table-tile.inactive { opacity: .5; border-top-color: var(--rp-border); }
.table-tile .tile-actions { position: absolute; top: .4rem; right: .4rem; opacity: 0; transition: opacity .15s; }
.table-tile:hover .tile-actions { opacity: 1; }
@media (hover: none) { .table-tile .tile-actions { opacity: 1; } }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: .35rem; }

.mini-tables { display: flex; flex-wrap: wrap; gap: .35rem; }
.mini-table { min-width: 42px; padding: .3rem .4rem; border-radius: 8px; text-align: center; font-size: .72rem; font-weight: 700; background: rgba(16, 185, 129, .12); color: #047857; }
.mini-table.status-1 { background: rgba(239, 68, 68, .14); color: #b91c1c; }
.mini-table.status-2 { background: rgba(245, 158, 11, .16); color: #b45309; }
.mini-table.status-3 { background: rgba(14, 165, 233, .14); color: #0369a1; }
[data-bs-theme="dark"] .mini-table { color: #34d399; }
[data-bs-theme="dark"] .mini-table.status-1 { color: #f87171; }
[data-bs-theme="dark"] .mini-table.status-2 { color: #fbbf24; }
[data-bs-theme="dark"] .mini-table.status-3 { color: #38bdf8; }

/* ---------- Kategori kartları ---------- */
.category-card { height: 100%; transition: transform .15s, box-shadow .15s; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--rp-shadow-lg); }
.category-cover { height: 110px; border-radius: var(--rp-radius) var(--rp-radius) 0 0; position: relative; display: grid; place-items: center; overflow: hidden; }
.category-cover img { width: 100%; height: 100%; object-fit: cover; }
.category-cover .cat-icon { font-size: 2.4rem; color: #fff; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.category-cover .order-badge { position: absolute; top: .6rem; left: .6rem; background: rgba(0, 0, 0, .35); color: #fff; font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; backdrop-filter: blur(4px); }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .4rem; }
.icon-picker input { display: none; }
.icon-picker label { height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--rp-border); cursor: pointer; font-size: 1.15rem; color: var(--rp-muted); background: var(--rp-surface); transition: all .12s; }
.icon-picker label:hover { border-color: var(--rp-primary); color: var(--rp-primary); }
.icon-picker input:checked + label { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; }

/* ---------- Görsel yükleme ---------- */
.image-drop { border: 2px dashed var(--rp-border); border-radius: var(--rp-radius); padding: 1.25rem; text-align: center; cursor: pointer; background: var(--rp-surface-2); transition: border-color .15s, background .15s; position: relative; }
.image-drop:hover, .image-drop.dragover { border-color: var(--rp-primary); background: var(--rp-primary-soft); }
.image-drop img { max-width: 100%; max-height: 180px; border-radius: 10px; object-fit: cover; }
.image-drop .placeholder-icon { font-size: 2rem; color: var(--rp-muted); }
.image-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Sipariş detayı ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--rp-border); }
.timeline li { position: relative; padding-left: 44px; padding-bottom: 1.1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; border: 3px solid var(--rp-surface); }
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; font-variant-numeric: tabular-nums; }
.summary-row.total { border-top: 1px dashed var(--rp-border); margin-top: .4rem; padding-top: .8rem; font-weight: 800; font-size: 1.15rem; }

/* ---------- Grafik ---------- */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.progress-thin { height: 6px; border-radius: 99px; background: var(--rp-surface-2); }
.progress-thin .progress-bar { background: var(--rp-primary); border-radius: 99px; }

/* ---------- Toast & Onay ---------- */
.toast { border-radius: 12px; box-shadow: var(--rp-shadow-lg); font-weight: 500; color: #fff; }
.toast .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.confirm-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.8rem; background: rgba(239, 68, 68, .12); color: #dc2626; }

/* ---------- Giriş ekranı ---------- */
.auth-body { min-height: 100vh; background: var(--rp-bg); }
.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
@media (max-width: 991.98px) { .auth-split { grid-template-columns: 1fr; } .auth-hero { display: none !important; } }
.auth-hero {
    position: relative; overflow: hidden; color: #fff; padding: 3rem;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(251, 146, 60, .55), transparent 60%),
                radial-gradient(800px 500px at 90% 90%, rgba(234, 88, 12, .5), transparent 60%),
                linear-gradient(160deg, #1a1208, #0f0c08 60%);
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero h2 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; max-width: 460px; }
.auth-hero p { color: rgba(255, 255, 255, .7); max-width: 420px; }
.auth-feature { display: flex; gap: .8rem; align-items: center; margin-bottom: .9rem; color: rgba(255, 255, 255, .85); font-size: .92rem; }
.auth-feature i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fdba74; }
.auth-wrapper { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; min-height: 100vh; }
.auth-card { width: 100%; max-width: 410px; background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 20px; padding: 2.25rem; box-shadow: var(--rp-shadow-lg); }
.auth-card .form-control { padding: .7rem .9rem; }
.error-code { font-size: 4.5rem; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, #fb923c, #c2410c); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: .75rem; }

/* ---------- Yazdırma ---------- */
@media print {
    .sidebar, .topbar, .no-print, .toast-container { display: none !important; }
    .content { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    body { background: #fff; }
}

/* =========================================================
   v2 — Modallar, masa planı, seçenekler, reçete, tedarikçi
   ========================================================= */

/* ---------- Modal ---------- */
.modal-header { border-bottom-color: var(--rp-border); padding: 1rem 1.25rem; }
.modal-footer { border-top-color: var(--rp-border); padding: .85rem 1.25rem; }
.modal-body { padding: 1.25rem; }
.modal-title { display: flex; align-items: center; gap: .65rem; font-size: 1.05rem; }
.modal-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.modal-static .modal-dialog { transform: scale(1.015) !important; }
.preview-box { padding: .9rem; border-radius: 12px; background: var(--rp-surface-2); border: 1px dashed var(--rp-border); }

/* ---------- Segment sekmeler & çipler ---------- */
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-radius: 12px; }
.seg-tab { border: 0; background: transparent; color: var(--rp-muted); font-weight: 600; font-size: .85rem; padding: .45rem .85rem; border-radius: 9px; transition: all .15s; }
.seg-tab span { font-size: .72rem; font-weight: 700; margin-left: .25rem; padding: .05rem .4rem; border-radius: 99px; background: var(--rp-border); color: var(--rp-muted); }
.seg-tab:hover { color: var(--rp-text); }
.seg-tab.active { background: var(--rp-surface); color: var(--rp-text); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.seg-tab.active span { background: var(--rp-primary); color: #fff; }
a.seg-tab { text-decoration: none; display: inline-flex; align-items: center; }

.chip { display: inline-flex; align-items: center; gap: .1rem; border: 1px solid var(--rp-border); background: var(--rp-surface); color: var(--rp-muted); font-size: .8rem; font-weight: 600; padding: .35rem .75rem; border-radius: 99px; transition: all .15s; }
.chip:hover { border-color: var(--rp-primary); color: var(--rp-text); }
.chip.active { background: var(--rp-text); color: var(--rp-surface); border-color: var(--rp-text); }
.st-dot-empty { background: #10b981; } .st-dot-occupied { background: #ef4444; } .st-dot-reserved { background: #f59e0b; } .st-dot-cleaning { background: #0ea5e9; }

/* ---------- Masa planı ---------- */
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 1rem; }
.floor-table {
    --st: #10b981; --st-soft: rgba(16, 185, 129, .1);
    position: relative; border-radius: 16px; padding: .85rem .9rem .9rem; background: var(--rp-surface);
    border: 1px solid var(--rp-border); display: flex; flex-direction: column; gap: .55rem;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.floor-table::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 16px 16px 0 0; background: var(--st); }
.floor-table:hover { transform: translateY(-3px); box-shadow: var(--rp-shadow-lg); border-color: color-mix(in srgb, var(--st) 45%, var(--rp-border)); }
.floor-table.st-occupied { --st: #ef4444; --st-soft: rgba(239, 68, 68, .1); background: color-mix(in srgb, #ef4444 4%, var(--rp-surface)); }
.floor-table.st-reserved { --st: #f59e0b; --st-soft: rgba(245, 158, 11, .12); background: color-mix(in srgb, #f59e0b 5%, var(--rp-surface)); }
.floor-table.st-cleaning { --st: #0ea5e9; --st-soft: rgba(14, 165, 233, .1); }
.floor-table.is-inactive { opacity: .45; --st: #94a3b8; }
.floor-hit { position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.ft-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; pointer-events: none; }
.ft-head .ft-menu { pointer-events: auto; }
.ft-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.ft-visual { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: .2rem 0; }
.ft-seats { display: flex; gap: 6px; min-height: 8px; }
.ft-seats i { width: 18px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--st) 55%, transparent); }
.ft-board { width: 100%; max-width: 128px; height: 38px; border-radius: 10px; background: var(--st-soft); border: 1.5px solid color-mix(in srgb, var(--st) 50%, transparent); display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: var(--st); }
.ft-info { min-height: 38px; }
.ft-amount { font-weight: 800; font-size: .98rem; font-variant-numeric: tabular-nums; }
.ft-res { color: #b45309; font-size: .9rem; }
[data-bs-theme="dark"] .ft-res { color: #fbbf24; }
.ft-state { font-weight: 700; font-size: .85rem; color: var(--st); }
.ft-meta { font-size: .74rem; color: var(--rp-muted); }

.capacity-picker { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.capacity-picker input[type=radio] { display: none; }
.capacity-picker label { cursor: pointer; padding: .45rem .7rem; border-radius: 10px; border: 1px solid var(--rp-border); font-weight: 600; font-size: .85rem; color: var(--rp-muted); background: var(--rp-surface); }
.capacity-picker input[type=radio]:checked + label { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; }

/* ---------- Ürün listesi mini bağlantılar ---------- */
.mini-link { font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 99px; text-decoration: none; color: var(--rp-muted); border: 1px dashed var(--rp-border); }
.mini-link:hover { color: var(--rp-primary-hover); border-color: var(--rp-primary); }
.mini-link.on { border-style: solid; background: var(--rp-primary-soft); color: #c2410c; border-color: transparent; }
[data-bs-theme="dark"] .mini-link.on { color: #fb923c; }

/* ---------- Seçenek önizlemesi ---------- */
.pv-group { padding: .75rem 0; border-top: 1px solid var(--rp-border); }
.pv-title { display: flex; justify-content: space-between; font-weight: 700; font-size: .88rem; margin-bottom: .5rem; }
.pv-title span { font-size: .72rem; font-weight: 600; }
.pv-option { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border: 1px solid var(--rp-border); border-radius: 10px; margin-bottom: .35rem; cursor: pointer; transition: all .12s; }
.pv-option:hover { border-color: var(--rp-primary); }
.pv-option:has(input:checked) { border-color: var(--rp-primary); background: var(--rp-primary-soft); }
.pv-option input { accent-color: var(--rp-primary); width: 16px; height: 16px; }
.pv-option .pv-name { flex: 1; font-size: .86rem; font-weight: 500; }
.pv-option .pv-price { font-size: .8rem; font-weight: 700; color: var(--rp-muted); }
.pv-option.is-off { opacity: .45; cursor: not-allowed; }
.pv-total { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; padding: .85rem 1rem; border-radius: 12px; background: var(--rp-text); color: var(--rp-surface); }
.pv-total strong { font-size: 1.15rem; }

/* ---------- Reçete ---------- */
.recipe-table td { vertical-align: middle; }
.group-row td { background: var(--rp-surface-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rp-muted); padding: .45rem 1rem !important; }
.ing-pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .15rem .25rem .15rem .55rem; border-radius: 99px; background: var(--rp-surface-2); border: 1px solid var(--rp-border); margin: 0 .25rem .25rem 0; }
.ing-pill a { color: var(--rp-muted); }
.btn-link-x { border: 0; background: none; padding: 0 .15rem; color: var(--rp-muted); line-height: 1; }
.btn-link-x:hover { color: #dc2626; }

.fc-gauge { position: relative; width: 200px; height: 100px; margin: 0 auto; overflow: hidden; }
.fc-gauge .fc-arc { position: absolute; inset: 0 0 auto 0; width: 200px; height: 200px; border-radius: 50%;
    background: conic-gradient(from 270deg, #10b981 0deg 90deg, #f59e0b 90deg 105deg, #ef4444 105deg 180deg, transparent 180deg);
    -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%); opacity: .25; }
.fc-gauge::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 3px; height: 84px; background: var(--rp-text); border-radius: 3px;
    transform-origin: bottom center; transform: translateX(-50%) rotate(calc(var(--deg) - 90deg)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.fc-gauge::before { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--rp-text); transform: translateX(-50%); z-index: 1; }
.fc-value strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; margin-top: .4rem; }
.fc-value span { display: block; font-size: .72rem; color: var(--rp-muted); }
.fc-value[data-level="good"] strong { color: #059669; }
.fc-value[data-level="warn"] strong { color: #d97706; }
.fc-value[data-level="bad"] strong { color: #dc2626; }
.fc-gauge[data-level="none"]::after { display: none; }

/* ---------- Tedarikçi ---------- */
.due-chip { min-width: 62px; text-align: center; border-radius: 10px; padding: .3rem .4rem; background: var(--rp-surface-2); border: 1px solid var(--rp-border); line-height: 1.1; }
.due-chip strong { display: block; font-size: 1.05rem; }
.due-chip span { font-size: .65rem; color: var(--rp-muted); }
.due-chip.is-soon { background: rgba(245, 158, 11, .12); border-color: transparent; }
.due-chip.is-soon strong { color: #d97706; }
.due-chip.is-late { background: rgba(239, 68, 68, .12); border-color: transparent; }
.due-chip.is-late strong { color: #dc2626; }

.invoice-lines td { padding: .5rem .5rem !important; vertical-align: top; }
.invoice-lines .line-total { padding-top: .9rem !important; }
.invoice-lines .form-select-sm { padding-right: 1.75rem; }

.alert-light { background: var(--rp-surface); color: var(--rp-text); }
.min-w-0 { min-width: 0; }

.alert-card { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-radius: var(--rp-radius); text-decoration: none; color: var(--rp-text); border: 1px solid; transition: transform .15s; }
.alert-card:hover { transform: translateY(-2px); color: var(--rp-text); }
.alert-card > i:first-child { font-size: 1.4rem; }
.alert-card span { display: block; font-size: .78rem; color: var(--rp-muted); }
.alert-card-danger { background: rgba(239, 68, 68, .07); border-color: rgba(239, 68, 68, .25); }
.alert-card-danger > i:first-child { color: #dc2626; }
.alert-card-warning { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .3); }
.alert-card-warning > i:first-child { color: #d97706; }

.btn-icon:disabled, .btn-icon.disabled { border-color: transparent !important; background: transparent; opacity: .25; }
.due-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border: 1px solid var(--rp-border); border-radius: 12px; height: 100%; }

/* ---------- Form bölümleri (modal içi) ---------- */
.form-section { padding: 1.15rem 0; border-top: 1px dashed var(--rp-border); }
.modal-body > .form-section:first-child { padding-top: 0; border-top: 0; }
.row > [class*="col"] > .form-section { height: 100%; padding-bottom: 0; }
.form-section-head { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .9rem; }
.form-section-head h6 { margin: 0; font-size: .9rem; font-weight: 700; line-height: 1.3; }
.form-section-head p { margin: .1rem 0 0; font-size: .76rem; color: var(--rp-muted); line-height: 1.35; }
.fs-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .9rem; flex-shrink: 0; }

/* ---------- Birim seçici ---------- */
.unit-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.unit-picker input { position: absolute; opacity: 0; pointer-events: none; }
.unit-tile { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .65rem .25rem .55rem; margin: 0; border: 1.5px solid var(--rp-border); border-radius: 12px; background: var(--rp-surface); cursor: pointer; text-align: center; transition: border-color .15s, background .15s, box-shadow .15s; user-select: none; }
.unit-tile i { font-size: 1.2rem; color: var(--rp-muted); margin-bottom: .1rem; transition: color .15s; }
.unit-tile strong { font-size: .92rem; line-height: 1.1; }
.unit-tile small { font-size: .68rem; color: var(--rp-muted); }
.unit-tile:hover { border-color: var(--rp-primary); }
.unit-picker input:checked + .unit-tile { border-color: var(--rp-primary); background: var(--rp-primary-soft); box-shadow: 0 0 0 3px var(--rp-primary-soft); }
.unit-picker input:checked + .unit-tile i { color: var(--rp-primary); }
.unit-picker input:focus-visible + .unit-tile { outline: 2px solid var(--rp-primary); outline-offset: 2px; }
.unit-picker input:disabled + .unit-tile { opacity: .35; cursor: not-allowed; border-style: dashed; }
@media (max-width: 767.98px) { .unit-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Hızlı seçim çipleri ---------- */
.quick-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.quick-chips button { border: 1px solid var(--rp-border); background: var(--rp-surface-2); color: var(--rp-muted); font-size: .74rem; font-weight: 600; border-radius: 99px; padding: .22rem .65rem; transition: all .12s; }
.quick-chips button:hover { border-color: var(--rp-primary); color: var(--rp-text); }
.quick-chips button.active { border-color: var(--rp-primary); background: var(--rp-primary); color: #fff; }

/* ---------- Maliyet özeti ---------- */
.ing-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; }
.ing-summary > div { background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-radius: 10px; padding: .55rem .7rem; min-width: 0; }
.ing-summary span { display: block; font-size: .68rem; color: var(--rp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ing-summary strong { font-size: .95rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ing-meter { position: relative; height: 6px; border-radius: 99px; background: var(--rp-border); margin-top: .75rem; }
.ing-meter > div { height: 100%; border-radius: inherit; background: #10b981; transition: width .25s, background .25s; }
.ing-meter[data-level="low"] > div { background: #f59e0b; }
.ing-meter[data-level="out"] > div { background: #ef4444; }
.ing-meter::after { content: ""; position: absolute; left: var(--min, 33%); top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--rp-text); opacity: .45; }

/* ---------- Barkod ---------- */
.code-input .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.code-input .btn { border-color: var(--rp-border); color: var(--rp-muted); }
.code-input .btn:hover { color: var(--rp-primary); }
.code-input.scanned .form-control { animation: scan-flash .9s ease-out; }
@keyframes scan-flash { 0% { border-color: #10b981; box-shadow: 0 0 0 .3rem rgba(16, 185, 129, .35); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.form-control.is-warning { border-color: #f59e0b; }
.barcode-card { border: 1px dashed var(--rp-border); border-radius: 12px; background: var(--rp-surface-2); padding: .85rem; min-height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; text-align: center; }
.barcode-svg { background: #fff; border-radius: 8px; padding: .35rem .5rem .1rem; width: 100%; max-width: 230px; box-shadow: var(--rp-shadow); }
.barcode-svg svg { display: block; width: 100%; height: auto; }
.barcode-free { font: 700 1.05rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 8px; padding: .5rem .85rem; max-width: 100%; overflow-wrap: anywhere; }
.barcode-status { font-size: .74rem; font-weight: 600; }
.barcode-empty { color: var(--rp-muted); font-size: .76rem; line-height: 1.45; }
.barcode-empty > i:first-child { font-size: 1.9rem; display: block; opacity: .45; margin-bottom: .2rem; }
.code-tag { display: inline-flex; align-items: center; gap: .2rem; font: 600 .7rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--rp-text); background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-radius: 6px; padding: .05rem .4rem; margin-right: .25rem; vertical-align: 1px; }
.code-tag i { font-size: .8rem; color: var(--rp-muted); }
.code-tag-lg { font-size: .8rem; padding: .3rem .6rem; border-radius: 8px; }
.code-menu { min-width: 300px; padding: .4rem; border-radius: 12px; border-color: var(--rp-border); box-shadow: var(--rp-shadow-lg); }
.code-menu-head { padding: .45rem .6rem .6rem; border-bottom: 1px solid var(--rp-border); margin-bottom: .3rem; }
.code-menu-head strong { display: block; font-size: .82rem; }
.code-menu-head span { font-size: .74rem; color: var(--rp-muted); }
.code-menu .dropdown-item { display: flex; gap: .65rem; align-items: flex-start; border-radius: 8px; padding: .5rem .6rem; white-space: normal; font-size: .84rem; font-weight: 600; }
.code-menu .dropdown-item > i { font-size: 1rem; color: var(--rp-primary); margin-top: .05rem; }
.code-menu .dropdown-item small { display: block; font-weight: 400; font-size: .74rem; color: var(--rp-muted); }
.row-flash > td { animation: row-flash 1.2s ease-out; }
@keyframes row-flash { 0% { background: rgba(16, 185, 129, .18); } 100% { background: transparent; } }

/* Modal içeriği <form> ile sarıldığında da gövde kaydırılsın, başlık ve alt bar sabit kalsın */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-body { overflow-y: auto; }
.code-input .form-control::placeholder { text-transform: none; font-family: var(--bs-body-font-family); letter-spacing: 0; }

/* =========================================================
   Sayfa kabuğu: üst bar sabit, içerik kendi içinde kayar (masaüstü)
   Liste sayfaları (ViewData["FillPage"] = true → .content-fill):
   özet kartları + araç çubuğu sabit, yalnızca .card-fill içindeki tablo kayar,
   tablonun alt bilgisi (.table-footer) kartın altında sabit durur.
   ========================================================= */
.table-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.25rem; padding: .7rem 1.25rem; border-top: 1px solid var(--rp-border); background: var(--rp-surface); border-radius: 0 0 var(--rp-radius) var(--rp-radius); font-size: .8rem; color: var(--rp-muted); flex-shrink: 0; }
.table-footer strong { color: var(--rp-text); font-weight: 700; }
.table-footer .footer-stats { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.sticky-aside { position: sticky; top: 90px; }

@media (min-width: 992px) and (min-height: 600px) {
    html, body { height: 100%; overflow: hidden; }
    .admin-shell { height: 100vh; min-height: 0; }
    .main { height: 100vh; min-height: 0; }
    .content { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
    .sticky-aside { top: 0; }

    .content-fill { display: flex; flex-direction: column; }
    .content-fill > * { flex-shrink: 0; }
    .content-fill > .card-fill,
    .content-fill > .fill-area { flex: 1 1 0; min-height: 320px; margin-bottom: 0 !important; }
    .content-fill > .fill-area { overflow-y: auto; margin-right: -.5rem; padding-right: .5rem; }
    .card-fill { display: flex; flex-direction: column; }
    .card-fill > .card-header { flex-shrink: 0; }
    .card-fill > .table-responsive { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .card-fill > .empty-state { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    /* Sekmeli kartlar: görünen sekme (data-pane) kalan alanı doldurur */
    .card-fill > [data-pane]:not(.d-none) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .card-fill > [data-pane] > * { flex-shrink: 0; }
    .card-fill > [data-pane] > .table-responsive { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .card-fill .table-responsive > .table > thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--rp-border); }
    .card-fill .table-responsive > .table > tfoot td { position: sticky; bottom: 0; z-index: 2; box-shadow: inset 0 1px 0 var(--rp-border); }
    .card-fill > .table-footer { margin-top: auto; }
}

@media print {
    html, body, .admin-shell, .main { height: auto !important; overflow: visible !important; }
    .content { overflow: visible !important; }
    .content-fill { display: block !important; }
    .card-fill > .table-responsive { overflow: visible !important; }
}
.due-strip { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: .35rem; scrollbar-width: thin; }
.due-strip-item { flex: 0 0 290px; scroll-snap-align: start; }

/* ---------- Sol menü: göster / gizle (masaüstü) ---------- */
@media (min-width: 992px) {
    .sidebar { transition: width .2s ease; overflow: hidden; }
    .sidebar-toggle { margin-left: -.5rem; }
    .sidebar-collapsed .sidebar { width: 76px; }
    .sidebar-collapsed .brand-text,
    .sidebar-collapsed .nav-item span,
    .sidebar-collapsed .sidebar-footer span { display: none; }
    .sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
    .sidebar-collapsed .sidebar-nav { padding-left: .65rem; padding-right: .65rem; }
    .sidebar-collapsed .nav-section { font-size: 0; padding: .4rem 0 .35rem; }
    .sidebar-collapsed .nav-section::before { content: ""; display: block; height: 1px; margin: 0 .5rem; background: rgba(255, 255, 255, .08); }
    .sidebar-collapsed .nav-item { justify-content: center; gap: 0; padding: .55rem 0; }
    .sidebar-collapsed .nav-item.active { box-shadow: inset 3px 0 0 var(--rp-primary); }
    .sidebar-collapsed .sidebar-footer { text-align: center; padding-left: 0; padding-right: 0; }
}
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   Terminaller
   ========================================================= */
.terminal-card { transition: box-shadow .15s, transform .15s; }
.terminal-card:hover { box-shadow: var(--rp-shadow-lg); }
.terminal-icon { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--rp-surface-2); border: 1px solid var(--rp-border); color: var(--rp-muted); flex-shrink: 0; }
.terminal-dot { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--rp-surface); background: #94a3b8; }
.terminal-card[data-state="online"] .terminal-icon { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .25); color: #059669; }
.terminal-card[data-state="online"] .terminal-dot { background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: live-pulse 2s infinite; }
.terminal-card[data-state="unpaired"] .terminal-icon { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: #d97706; }
.terminal-card[data-state="unpaired"] .terminal-dot { background: #f59e0b; }
.terminal-card[data-state="off"] { opacity: .6; }
.terminal-card[data-state="off"] .terminal-dot { background: #ef4444; }
.terminal-name { font-size: 1rem; font-weight: 700; margin: 0; }
.terminal-session { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: 12px; background: var(--rp-surface-2); border: 1px solid var(--rp-border); }
.terminal-lock { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rp-surface); border: 1px solid var(--rp-border); color: var(--rp-muted); flex-shrink: 0; }
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; }
.terminal-meta { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 1rem 0 0; font-size: .8rem; }
.terminal-meta dt { color: var(--rp-muted); font-weight: 500; }
.terminal-meta dd { margin: 0; text-align: right; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-card .card-footer { background: transparent; border-top: 1px solid var(--rp-border); padding: .75rem 1.25rem; }
.terminal-hero { width: 72px; height: 72px; border-radius: 22px; display: inline-grid; place-items: center; font-size: 2rem; background: var(--rp-primary-soft); color: var(--rp-primary); }
.how-step { height: 100%; padding: 1.1rem; border: 1px dashed var(--rp-border); border-radius: 14px; background: var(--rp-surface-2); }
.how-step span { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--rp-primary); color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: .5rem; }
.how-step strong { display: block; margin-bottom: .2rem; }
.how-step p { margin: 0; font-size: .8rem; color: var(--rp-muted); }
.option-tile { padding: .8rem 1rem; border: 1px solid var(--rp-border); border-radius: 12px; background: var(--rp-surface-2); }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

/* Eşleştirme penceresi */
.pair-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .85rem; }
.pair-steps li { display: flex; gap: .75rem; font-size: .88rem; }
.pair-steps li > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rp-primary-soft); color: var(--rp-primary); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.pair-url { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; padding: .35rem .35rem .35rem .75rem; border: 1px solid var(--rp-border); border-radius: 10px; background: var(--rp-surface-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.pair-url strong { flex: 1; overflow-wrap: anywhere; }
.pair-code { display: flex; justify-content: center; align-items: center; gap: .45rem; margin: .5rem 0 .75rem; }
.pair-code b { width: 3.2rem; height: 4rem; border-radius: 14px; display: grid; place-items: center; font: 800 2.1rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--rp-text); color: var(--rp-surface); box-shadow: var(--rp-shadow); }
.pair-code i { width: 10px; }
.pair-expiry { text-align: center; font-size: .8rem; color: var(--rp-muted); }
.pair-live { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1rem; padding: .6rem; border-radius: 10px; background: var(--rp-surface-2); font-size: .82rem; font-weight: 600; color: var(--rp-muted); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #10b981; animation: live-pulse 1.6s infinite; }
.pair-done { text-align: center; padding: 1.5rem 0 1rem; }
.pair-done-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: #10b981; box-shadow: 0 10px 30px rgba(16, 185, 129, .35); animation: pop-in .35s ease-out; }
@keyframes pop-in { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 575.98px) { .pair-code b { width: 2.5rem; height: 3.2rem; font-size: 1.6rem; } }

/* Ürün formu · kasada satış (miktar sor / fiyat sor) */
.ask-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ask-tile { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px solid var(--rp-border); border-radius: 12px; background: var(--rp-surface-2); cursor: pointer; transition: border-color .15s, box-shadow .15s; margin: 0; }
.ask-tile:has(input:checked) { border-color: var(--rp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-primary) 15%, transparent); }
.ask-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.ask-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ask-text strong { font-size: .9rem; }
.ask-text small { color: var(--bs-secondary-color); font-size: .78rem; line-height: 1.3; }
.ask-tile .form-switch .form-check-input { width: 2.5em; height: 1.35em; margin: 0; cursor: pointer; }
.ask-example { padding: .65rem .9rem; border-radius: 10px; background: var(--rp-surface-2); font-size: .85rem; color: var(--bs-secondary-color); }
.ask-example i { color: var(--rp-primary); margin-right: .35rem; }
.ask-example b { color: var(--bs-body-color); }
@media (max-width: 767.98px) { .ask-tiles { grid-template-columns: 1fr; } }

/* Hızlı Satış kategorileri */
.qs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .55rem; }
.qs-tile { position: relative; display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 1px solid var(--rp-border); border-radius: 12px; background: var(--rp-surface); cursor: pointer; margin: 0; user-select: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.qs-tile input { position: absolute; opacity: 0; pointer-events: none; }
.qs-tile:hover { border-color: color-mix(in srgb, var(--rp-primary) 40%, var(--rp-border)); }
.qs-tile:has(input:checked) { border-color: var(--rp-primary); background: color-mix(in srgb, var(--rp-primary) 6%, var(--rp-surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-primary) 14%, transparent); }
.qs-tile:has(input:focus-visible) { outline: 2px solid var(--rp-primary); outline-offset: 2px; }
.qs-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.qs-tile:not(:has(input:checked)) .qs-ic { filter: grayscale(1); opacity: .55; }
.qs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.qs-text strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-text small { font-size: .74rem; color: var(--bs-secondary-color); }
.qs-tile.is-passive .qs-text small { color: #d97706; }
.qs-check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--rp-border); display: grid; place-items: center; flex: none; color: transparent; font-size: .85rem; transition: all .15s; }
.qs-tile:has(input:checked) .qs-check { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; }
.qs-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--rp-border); background: var(--rp-surface); color: var(--bs-secondary-color); font-size: .74rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.qs-chip input { display: none; }
.qs-chip:has(input:checked) { color: #059669; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .35); }
.qs-chip:has(input:disabled) { opacity: .6; cursor: progress; }
.qs-chip .on, .qs-chip:has(input:checked) .off { display: none; }
.qs-chip:has(input:checked) .on { display: inline; }

/* Yetkiler */
.perm-legend { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.perm-tag { display: inline-flex; align-items: center; padding: .05rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .02em; color: #b45309; background: rgba(245, 158, 11, .14); vertical-align: middle; white-space: nowrap; }
[data-bs-theme="dark"] .perm-tag { color: #fbbf24; }
.perm-table { --perm-col: 150px; }
.perm-table thead th { background: var(--rp-surface); vertical-align: bottom; padding-top: .9rem; padding-bottom: .9rem; }
.perm-name-col { min-width: 300px; }
.perm-role-col { width: var(--perm-col); min-width: var(--perm-col); text-align: center; }
.perm-role { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-transform: none; letter-spacing: 0; }
.perm-role small { font-size: .72rem; font-weight: 600; color: var(--bs-secondary-color); }
.perm-col-actions { display: flex; gap: .55rem; justify-content: center; }
.perm-col-actions .btn { font-size: .72rem; font-weight: 600; text-decoration: none; }
.perm-group td { background: var(--rp-surface-2) !important; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--bs-secondary-color); padding-top: .55rem; padding-bottom: .55rem; }
.perm-group i { margin-right: .45rem; color: var(--rp-primary); font-size: .85rem; }
.perm-table tbody tr:not(.perm-group) td { padding-top: .7rem; padding-bottom: .7rem; vertical-align: middle; }
.perm-table tbody tr:not(.perm-group):hover td { background: color-mix(in srgb, var(--rp-primary) 4%, transparent); }
.perm-name { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .45rem; }
.perm-desc { font-size: .78rem; color: var(--bs-secondary-color); margin-top: .1rem; }
.perm-switch { display: inline-flex; justify-content: center; margin: 0; padding: 0; min-height: 0; }
.perm-switch .form-check-input { width: 2.6em; height: 1.4em; margin: 0; float: none; cursor: pointer; }
.perm-lock { color: #059669; font-size: 1.15rem; opacity: .55; }
.perm-limit { max-width: 120px; margin: 0 auto; }
.perm-custom { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .7rem 1rem; border-radius: 12px; border: 1px solid rgba(139, 92, 246, .3); background: rgba(139, 92, 246, .07); font-size: .85rem; }
.perm-custom > i { color: #7c3aed; font-size: 1.1rem; }
.perm-user { display: inline-flex; align-items: baseline; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; background: var(--rp-surface); border: 1px solid var(--rp-border); text-decoration: none; font-weight: 600; color: var(--bs-body-color); }
.perm-user small { color: var(--bs-secondary-color); font-weight: 500; font-size: .72rem; }
.perm-user:hover { border-color: #7c3aed; }
/* Personel formu: yetki listesi */
.uperm-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.uperm-mode label { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .9rem; border: 1px solid var(--rp-border); border-radius: 12px; cursor: pointer; margin: 0; transition: border-color .15s, box-shadow .15s; }
.uperm-mode label:has(input:checked) { border-color: var(--rp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-primary) 14%, transparent); }
.uperm-mode input { margin-top: .2rem; accent-color: var(--rp-primary); }
.uperm-mode strong { display: block; font-size: .88rem; }
.uperm-mode small { color: var(--bs-secondary-color); font-size: .76rem; }
.uperm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem 1.5rem; }
.uperm-group h6 { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--bs-secondary-color); margin: 0 0 .45rem; display: flex; align-items: center; gap: .4rem; }
.uperm-group h6 i { color: var(--rp-primary); }
.uperm-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px dashed var(--rp-border); margin: 0; cursor: pointer; }
.uperm-item:last-child { border-bottom: 0; }
.uperm-item > span:first-child { font-size: .86rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.uperm-item .form-check-input { margin: 0; float: none; width: 2.4em; height: 1.3em; cursor: pointer; flex: none; }
.uperm-locked { opacity: .55; pointer-events: none; }
.uperm-note { display: flex; gap: .6rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; background: var(--rp-surface-2); font-size: .84rem; }
.uperm-note i { color: var(--rp-primary); font-size: 1.05rem; }
@media (max-width: 767.98px) { .uperm-mode { grid-template-columns: 1fr; } }

/* Restoran Mobil sayfası */
.mobile-connect { display: flex; gap: 1.1rem; align-items: center; }
.mobile-qr { width: 168px; height: 168px; flex: none; padding: .4rem; border-radius: 14px; background: #fff; border: 1px solid var(--rp-border); }
.mobile-qr svg { width: 100%; height: 100%; display: block; }
.mobile-steps { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; font-size: .88rem; }
.mobile-urls { display: grid; gap: .35rem; margin-top: 1rem; }
.mobile-url { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem .35rem .75rem; border-radius: 10px; border: 1px solid var(--rp-border); font-size: .86rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 0; }
.mobile-url.on { border-color: var(--rp-primary); background: color-mix(in srgb, var(--rp-primary) 6%, transparent); }
.mobile-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.mobile-feats > div { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; row-gap: .1rem; align-items: start; }
.mobile-feats i { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; }
.mobile-feats strong { font-size: .9rem; }
.mobile-feats span { font-size: .8rem; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) { .mobile-connect { flex-direction: column; align-items: stretch; } .mobile-qr { margin: 0 auto; } .mobile-feats { grid-template-columns: 1fr; } }

/* Terminal türü seçimi */
.kind-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.kind-tile { position: relative; display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border: 1px solid var(--rp-border); border-radius: 12px; cursor: pointer; margin: 0; transition: border-color .15s, box-shadow .15s; }
.kind-tile input { position: absolute; opacity: 0; pointer-events: none; }
.kind-tile > i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: var(--rp-surface-2); color: var(--rp-muted); flex: none; }
.kind-tile span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.kind-tile strong { font-size: .88rem; }
.kind-tile small { font-size: .75rem; color: var(--bs-secondary-color); }
.kind-tile:has(input:checked) { border-color: var(--rp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-primary) 14%, transparent); }
.kind-tile:has(input:checked) > i { background: var(--rp-primary); color: #fff; }
.pair-qr { width: 150px; height: 150px; margin: .25rem auto .5rem; padding: .35rem; border-radius: 12px; background: #fff; border: 1px solid var(--rp-border); }
.pair-qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 575.98px) { .kind-tiles { grid-template-columns: 1fr; } }
