@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e7e9f2;
    --text: #1b1e2b;
    --muted: #767c8c;
    --primary: #e0243c;
    --primary-dark: #b31830;
    --primary-bg: #fdeaec;
    --danger: #e14a5e;
    --danger-bg: #fce9ec;
    --success: #2fa679;
    --success-bg: #e5f7f0;
    --sidebar-bg: #14151f;
    --sidebar-text: #a9acc0;
    --radius: 12px;
    --radius-lg: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
}
a { color: inherit; text-decoration: none; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle-switch .toggle-track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .18s; pointer-events: none; }
.toggle-switch .toggle-track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.toggle-switch input:checked + .toggle-track { background: var(--success); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(18px); }
.toggle-switch input:disabled { cursor: not-allowed; }
.toggle-switch input:disabled + .toggle-track { opacity: .5; }
.icon { width: 1.2em; height: 1.2em; vertical-align: -0.22em; }
.icon.small { width: 1em; height: 1em; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Login ---------- */
.login-body {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 20%, #3a0a14 0%, #14060a 45%, #060507 100%);
}
.login-card {
    background: var(--card);
    width: 380px;
    max-width: 92vw;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    text-align: center;
}
.login-brand { text-align: center; margin-bottom: 26px; display: flex; flex-direction: column; align-items: center; }
.login-logo-band {
    width: calc(100% + 72px);
    margin: -40px -36px 24px;
    padding: 30px 36px 24px;
    background: #0a0a0c;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo-band .login-logo-img { margin: 0; }
.login-logo {
    width: 48px; height: 48px;
    margin: 0 0 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1.05rem;
}
.login-logo-img { max-height: 48px; max-width: 160px; margin: 0 0 16px; display: block; }
.login-brand h1 { font-size: 1.4rem; margin: 0 0 6px; }
.login-brand p { font-size: 0.86rem; color: var(--muted); margin: 0; }
.login-hint { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: 16px; }
.login-card .form-group > span { display: block; text-align: left; }
.login-options { justify-content: center; gap: 16px; }

.login-card .form-group input {
    background: var(--primary-bg);
    border: 1px solid transparent;
    padding: 13px 16px;
    font-size: 0.92rem;
}
.login-card .form-group input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.login-card .form-group > span { font-size: 0.78rem; color: var(--muted); font-weight: 500; margin-bottom: 5px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 20px; font-size: 0.82rem; }
.login-options label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 400; }
.login-options a { color: var(--primary); font-weight: 600; }
.login-card .btn-primary { border-radius: 999px; padding: 13px; font-size: 0.9rem; background: var(--primary); }

/* ---------- Dashboard grafikleri (modern) ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.4s ease both; }

.grid-2col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: stretch; margin-bottom: 20px; }
@media (max-width: 860px) { .grid-2col { grid-template-columns: minmax(0,1fr); } }
.grid-2col > .panel { margin-bottom: 0; min-width: 0; }
.dashboard-main { min-width: 0; }

/* ---------- Dashboard: canlı menü önizleme ---------- */
.dashboard-layout { display: flex; align-items: flex-start; gap: 22px; }
.dashboard-main { flex: 1; min-width: 0; }
.dashboard-preview { width: 280px; flex-shrink: 0; position: sticky; top: 20px; }
@media (max-width: 1180px) { .dashboard-preview { display: none; } }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.preview-open-link { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--primary); }
.phone-frame {
    background: #0a0a0c;
    border-radius: 34px;
    padding: 14px 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    position: relative;
}
.phone-notch {
    position: absolute;
    top: 14px; left: 50%; transform: translateX(-50%);
    width: 70px; height: 18px;
    background: #0a0a0c;
    border-radius: 0 0 12px 12px;
    z-index: 2;
}
.phone-screen {
    width: 100%;
    height: 560px;
    overflow: hidden;
    border-radius: 22px;
    background: #0e0b09;
    position: relative;
}
.phone-screen iframe {
    display: block;
    border: none;
    width: 375px;
    height: 808px;
    transform-origin: top left;
    transform: scale(0.6933);
}

.trend-chart-wrap { width: 100%; aspect-ratio: 600 / 200; max-height: 170px; }
.trend-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.trend-dot { fill: var(--card); stroke: var(--primary); stroke-width: 2; opacity: 0; transition: opacity 0.15s ease; }
.trend-svg:hover .trend-dot { opacity: 1; }
.trend-chart-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); padding: 8px 2px 0; }

/* ---------- Analitik başlık / tarih aralığı ---------- */
.analytics-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.analytics-header h2 { margin: 0 0 3px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 5px; box-shadow: 0 0 0 3px var(--success-bg); }
.range-picker { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; }
.range-btn { padding: 7px 13px; border-radius: 8px; font-size: 0.76rem; font-weight: 700; color: var(--muted); }
.range-btn.active { background: var(--card); color: var(--primary-dark); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.report-picker {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0; padding: 8px 16px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.report-picker:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.report-picker:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.report-picker .icon { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.report-picker-input {
    border: none; background: transparent; padding: 0; height: auto;
    font-size: 0.85rem; font-weight: 700; color: var(--text); cursor: pointer;
}
.report-picker-input:focus { outline: none; }

/* ---------- İstatistik kartı trend rozetleri ---------- */
.stat-label-row { margin-bottom: 6px; }
.stat-label { font-size: 0.76rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-num-sub { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-left: 3px; }
.trend-badge { display: inline-block; margin-top: 6px; font-size: 0.76rem; font-weight: 700; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }

/* ---------- Saatlik ısı haritası ---------- */
.heatmap-wrap { overflow-x: auto; }
.heatmap-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(16px, 1fr)); gap: 2px; min-width: 560px; }
.heatmap-corner { grid-column: 1; }
.heatmap-hour-label { font-size: 0.65rem; color: var(--muted); text-align: left; }
.heatmap-day-label { font-size: 0.72rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; }
.heatmap-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 10px; font-size: 0.72rem; color: var(--muted); }
.heatmap-legend-swatch { width: 60px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(79,110,247,0.06), rgba(79,110,247,1)); }

/* ---------- Yığılmış çubuk (dil dağılımı) ---------- */
.stacked-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; }
.stacked-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.7rem; font-weight: 800; min-width: 2px; }
.stacked-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.stacked-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---------- Öneri kartları ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.insight-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fdfcfb; }
.insight-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-dark); background: var(--primary-bg); padding: 4px 9px; border-radius: 999px; margin-bottom: 10px; }
.insight-title { font-size: 0.9rem; margin: 0 0 6px; line-height: 1.4; }
.insight-desc { font-size: 0.8rem; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.insight-link { font-size: 0.8rem; font-weight: 700; color: var(--primary-dark); }
.insight-link:hover { text-decoration: underline; }

.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-badge {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg); color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 800;
}
.rank-row:nth-child(1) .rank-badge { background: #fdf0d5; color: #b8843e; }
.rank-row:nth-child(2) .rank-badge { background: #eef1f5; color: #6b7280; }
.rank-row:nth-child(3) .rank-badge { background: #fbe9df; color: #c2703d; }
.rank-body { flex: 1; min-width: 0; }
.rank-label-row { display: flex; justify-content: space-between; gap: 8px; font-size: 0.84rem; font-weight: 600; margin-bottom: 6px; }
.rank-label-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { color: var(--muted); font-weight: 700; flex-shrink: 0; }
.rank-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.rank-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); transition: width 0.7s cubic-bezier(.22,1,.36,1); }

.donut-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut-wrap { width: 130px; height: 130px; flex-shrink: 0; }
.donut-svg { width: 100%; height: 100%; }
.donut-svg circle { transition: stroke-dasharray 0.6s ease; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 140px; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-label { font-weight: 600; flex: 1; }
.donut-legend-pct { color: var(--muted); font-weight: 700; }

/* ---------- Shell / Sidebar ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1c1e2e 0%, var(--sidebar-bg) 55%, #0a0a11 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky; top: 0; height: 100vh;
    transition: transform 0.25s ease;
}
.sidebar-brand {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-align: center;
    padding: 26px 18px 18px;
    color: #fff;
}
.sidebar-logo-img { max-height: 40px; max-width: 80%; margin-bottom: 6px; }
.sidebar-brand-name { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.sidebar-brand-sub { font-size: 0.72rem; color: var(--sidebar-text); opacity: 0.7; }


.sidebar-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sidebar-text);
    opacity: 0.55;
    padding: 16px 12px 6px;
}
.nav-group-label:first-child { padding-top: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--sidebar-text);
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 8px; }
.sidebar-logout {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(225,74,94,0.5);
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 600;
}
.sidebar-logout:hover { background: rgba(225,74,94,0.1); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 26px;
    display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 1.15rem; margin: 0; flex: 1; }
.topbar-user { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.only-mobile { display: none; }
.icon-btn { background: none; border: none; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.icon-btn:hover { background: var(--bg); }

.content { padding: 26px; flex: 1; }

/* ---------- Cards / Grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-card .stat-num { font-size: 1.9rem; font-weight: 800; }
.stat-card .stat-label { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.stat-card .stat-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-bg); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.02rem; margin: 0; }
.panel-head p.hint { color: var(--muted); font-size: 0.82rem; margin: 2px 0 0; }

/* ---------- Buttons ---------- */
.btn { border: none; padding: 9px 16px; border-radius: 9px; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: opacity 0.15s; }
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-success { background: var(--success-bg); color: var(--success); }
.btn-ai { background: linear-gradient(135deg,#6d4bd6,#9a6bf0); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 11px; font-size: 0.78rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Table ---------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.87rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }

.tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-swatch { display: inline-flex; align-items: center; gap: 6px; }
.role-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.role-pill-admin { background: #fdeaec; color: #e0243c; }
.role-pill-staff { background: #ede9fe; color: #7c3aed; }
.role-pill-kitchen { background: #fef3c7; color: #d97706; }
.stock-pill-out { background: #fdeaec; color: #e0243c; }
.stock-pill-low { background: #fef3c7; color: #d97706; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group > span, .form-group > label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=url], textarea, select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    width: 100%;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.help-text { font-size: 0.75rem; color: var(--muted); }

.settings-tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.settings-tab-btn {
    padding: 10px 18px; border: none; background: none;
    font-size: 0.88rem; font-weight: 700; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.settings-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.settings-tab-pane { display: none; }
.settings-tab-pane.active { display: block; }

.lang-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-tab-btn { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 0.78rem; font-weight: 600; }
.lang-tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-tab-pane { display: none; }
.lang-tab-pane.active { display: block; }

.category-filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 18px; }
.category-filter-pill {
    padding: 7px 15px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
}
.category-filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.category-filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.chip-picker { display: flex; flex-wrap: wrap; gap: 8px; }

.variant-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.variant-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.variant-field { flex: 0 1 130px; min-width: 100px; }
.variant-field-price { flex: 0 1 110px; min-width: 90px; }
.variant-field-label { display: block; font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.variant-row input { width: 100%; box-sizing: border-box; padding: 9px 12px; }
.variant-remove-btn { flex-shrink: 0; width: 36px; height: 36px; padding: 0; font-size: 1.2rem; line-height: 1; }
.chip-option { position: relative; }
.chip-option input { position: absolute; opacity: 0; }
.chip-option label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 999px;
    border: 1.5px solid var(--border);
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    color: var(--muted);
}
.chip-option input:checked + label { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }

.image-upload {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.image-upload input[type="file"] { max-width: 100%; }
.image-preview {
    width: 84px; height: 84px; border-radius: 12px;
    background: var(--bg) center/cover no-repeat;
    border: 1px dashed var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    overflow: hidden;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

.color-input-row { display: flex; align-items: center; gap: 10px; }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 16px; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ---------- Media Library (WordPress tarzı galeri) ---------- */
.media-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.media-tab-btn { padding: 10px 16px; border: none; background: none; font-weight: 600; font-size: 0.85rem; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.media-tab-btn:hover { color: var(--text); }
.media-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.media-tab-pane { display: none; }
.media-tab-pane.active { display: block; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 4px; background: var(--bg); padding: 4px; border-radius: 8px; max-height: 480px; overflow-y: auto; }
.media-item { position: relative; aspect-ratio: 1; cursor: pointer; overflow: hidden; border-radius: 4px; background: #e2e2e2; }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.15s ease; }
.media-item:hover img { transform: scale(1.05); }
.media-item .media-item-check {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.15s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.media-item:hover .media-item-check { opacity: 1; }
.media-item .media-item-badge {
    position: absolute; inset: auto 0 0 0; background: linear-gradient(0deg, rgba(0,0,0,0.72), transparent);
    color: #fff; text-align: center; font-size: 0.68rem; font-weight: 600; padding: 14px 4px 5px; opacity: 0; transition: opacity 0.15s ease;
}
.media-item:hover .media-item-badge { opacity: 1; }
.media-empty { grid-column: 1/-1; text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.85rem; }

.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-dropzone .icon { width: 34px; height: 34px; color: var(--primary); margin-bottom: 10px; }
.upload-dropzone p { margin: 0 0 4px; color: var(--text); font-size: 0.9rem; }
.upload-dropzone:hover, .upload-dropzone.drag-over { border-color: var(--primary); background: var(--primary-bg); }

.media-detail { display: flex; gap: 0; max-width: 780px; width: 100%; padding: 0; overflow: hidden; }
.media-detail-preview { flex: 1.3; background: #17141a; display: flex; align-items: center; justify-content: center; min-height: 320px; }
.media-detail-preview img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.media-detail-info { flex: 1; padding: 22px; overflow-y: auto; position: relative; }
.media-detail-info h4 { margin: 0 0 6px; font-size: 0.92rem; word-break: break-all; }
.media-detail-info .meta-row { font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,12,9,0.5); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 640px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

.empty-hint { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- QR card ---------- */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.qr-card canvas { border-radius: 8px; }
.qr-link { font-size: 0.75rem; color: var(--muted); word-break: break-all; text-align: center; }

.print-only { display: none; }
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .admin-main, .content { padding: 0 !important; margin: 0 !important; }
    .print-only { display: block; }
    .print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
    .print-card { text-align: center; page-break-inside: avoid; }
    .print-card img { width: 100%; max-width: 220px; }
    .print-card div { margin-top: 6px; font-weight: 700; }
}

/* ---------- Siparişler ---------- */
.orders-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 20px; }
.orders-stat-grid-kitchen { grid-template-columns: repeat(2, minmax(160px, 260px)); }
.orders-panel { position: relative; overflow: hidden; }
.orders-panel::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), #f59e0b, var(--primary));
    background-size: 200% 100%;
    animation: ordersGradientShift 6s ease infinite;
}
@keyframes ordersGradientShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

.table-status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.table-status-card {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px 12px 16px; border-radius: 16px; border: 1px solid var(--border);
    background: var(--card); font-family: inherit; cursor: default;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.table-status-icon { width: 34px; height: 34px; color: var(--muted); }
.table-status-icon .icon { width: 100%; height: 100%; }
.table-status-card.empty { background: linear-gradient(160deg, var(--success-bg), var(--card) 70%); border-color: rgba(47,166,121,0.25); }
.table-status-card.empty .table-status-icon { color: var(--success); }
.table-status-card.occupied {
    cursor: pointer;
    border-color: rgba(224,36,60,0.35);
    background: linear-gradient(160deg, var(--primary-bg), var(--card) 75%);
    box-shadow: 0 6px 18px rgba(224,36,60,0.12);
}
.table-status-card.occupied .table-status-icon { color: var(--primary); }
.table-status-card.occupied:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(224,36,60,0.22); border-color: var(--primary); }
.table-status-name { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.01em; }
.table-status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
    padding: 4px 11px; border-radius: 999px; background: var(--success-bg); color: var(--success);
}
.table-status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.table-status-card.occupied .table-status-badge { background: var(--primary); color: #fff; }
.table-status-card.occupied .table-status-badge i { background: #fff; animation: statusPulse 1.6s ease infinite; }
@keyframes statusPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.order-queue { display: flex; flex-direction: column; gap: 14px; }
.order-card {
    border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; background: var(--card);
    transition: box-shadow .18s ease, border-color .18s ease;
}
.order-card.is-fresh { border-color: rgba(217,119,6,0.4); box-shadow: 0 6px 20px rgba(217,119,6,0.12); background: linear-gradient(160deg, #fffaf0, var(--card) 60%); }
.order-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.order-card-table { display: flex; align-items: center; gap: 8px; font-size: 0.98rem; }
.order-card-table-icon { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.order-card-table-icon .icon { width: 100%; height: 100%; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #d97706; animation: statusPulse 1.4s ease infinite; flex-shrink: 0; }
.order-card-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.order-card-time { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.order-card-time .icon { width: 13px; height: 13px; }
.order-total { font-weight: 800; color: var(--primary); font-size: 1.02rem; }
.order-items { margin: 0 0 14px; padding: 0; list-style: none; font-size: 0.88rem; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.order-items li { display: flex; align-items: center; gap: 6px; }
.order-item-qty { font-weight: 800; color: var(--primary); min-width: 26px; flex-shrink: 0; }
.order-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-item-subtotal { flex-shrink: 0; font-weight: 700; color: var(--muted); }
.order-card-actions { display: flex; gap: 8px; justify-content: flex-end; }
.order-card-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.order-grand-total {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 4px; padding: 14px 18px; border-radius: 16px;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 1rem;
}
.order-grand-total-amount { font-weight: 800; font-size: 1.15rem; }

.split-order-card { transition: box-shadow .15s ease, border-color .15s ease; }
.split-order-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.split-order-check input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary); }
.split-order-checkbox:checked ~ .order-card-head-right,
.split-order-card:has(.split-order-checkbox:checked) { border-color: var(--primary); }
.split-order-card:has(.split-order-checkbox:checked) { background: #fdeaec; }
.split-order-card:has(.split-item-checkbox:checked):not(:has(.split-order-checkbox:checked)) { border-color: rgba(224,36,60,0.45); }
.split-order-card .order-items li { display: block; }
.split-item-check { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; transition: background .12s ease; }
.split-item-check:hover { background: rgba(224,36,60,0.05); }
.split-item-check input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin: 0 4px 0 2px; accent-color: var(--primary); }
.split-item-check:has(.split-item-checkbox:checked) { background: rgba(224,36,60,0.08); }
.split-select-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    margin-top: 10px; padding: 12px 16px; border-radius: 14px;
    background: var(--bg); border: 1px dashed var(--border); font-size: 0.85rem; font-weight: 600; color: var(--muted);
}
.split-select-summary .icon { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
.split-select-count { color: var(--text); }
.split-select-amount { font-weight: 800; font-size: 1.05rem; color: var(--primary); }

.table-detail-heading { display: flex; align-items: center; gap: 10px; }
.table-detail-icon { width: 26px; height: 26px; color: var(--primary); flex-shrink: 0; }
.table-detail-icon .icon { width: 100%; height: 100%; }

.toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
    background: #1c1e2e; color: #fff; padding: 12px 18px; border-radius: 10px;
    font-size: 0.86rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease;
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

/* ---------- Global sipariş bildirimi (tam ekran) ---------- */
.admin-notif-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,10,12,0.86);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.admin-notif-overlay.open { opacity: 1; pointer-events: auto; }
.admin-notif-overlay-card {
    position: relative;
    background: var(--card);
    border-radius: 26px;
    padding: 40px 36px 32px;
    width: 100%; max-width: 420px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    transform: scale(0.85) translateY(10px);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.admin-notif-overlay.open .admin-notif-overlay-card { transform: scale(1) translateY(0); }
.admin-notif-overlay-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg); border: none; color: var(--muted);
    font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.admin-notif-overlay-icon {
    width: 84px; height: 84px; border-radius: 50%;
    background: var(--primary-bg); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    animation: notifBellShake 1.6s ease-in-out infinite;
    position: relative;
}
.admin-notif-overlay-icon::before {
    content: '';
    position: absolute; inset: -8px; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(224,36,60,0.4);
    animation: notifRing 1.8s ease-out infinite;
}
.admin-notif-overlay-icon .icon { width: 40px; height: 40px; }
@keyframes notifRing { 0% { box-shadow: 0 0 0 0 rgba(224,36,60,0.4); } 100% { box-shadow: 0 0 0 22px rgba(224,36,60,0); } }
@keyframes notifBellShake {
    0%, 50%, 100% { transform: rotate(0); }
    56% { transform: rotate(-14deg); } 62% { transform: rotate(12deg); }
    68% { transform: rotate(-10deg); } 74% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); }
}
.admin-notif-overlay-title { font-weight: 800; font-size: 1.5rem; margin-bottom: 8px; }
.admin-notif-overlay-sub { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.admin-notif-overlay-meta { font-size: 0.92rem; color: var(--muted); margin-bottom: 26px; }
.admin-notif-overlay-actions { display: flex; gap: 10px; }
.admin-notif-overlay-actions .btn { flex: 1; justify-content: center; padding: 13px; font-size: 0.95rem; }
.admin-notif-overlay-queue { margin-top: 16px; font-size: 0.78rem; color: var(--muted); }

.sidebar-backdrop { display: none; }

@media (max-width: 860px) {
    .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop {
        display: block;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 45;
        opacity: 0; pointer-events: none;
        transition: opacity .2s ease;
    }
    .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
    .only-mobile { display: flex; }
    .content { padding: 16px; }
    .topbar { padding: 14px 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 1rem; }
    .topbar-user { display: none; }
}

/* ---- Yıllık ciro ---- */
.yr-hero-head { margin-bottom: 16px; }
.yr-hero-head h2 { margin: 0; }
.yr-years { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.yr-year {
    flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.yr-year:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: rgba(224,36,60,0.35); }
.yr-year.active { background: linear-gradient(140deg, var(--primary), var(--primary-dark)); border-color: transparent; color: #fff; box-shadow: 0 10px 24px rgba(224,36,60,0.28); }
.yr-year-label { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 6px; }
.yr-year-label small { font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--primary-bg); color: var(--primary); }
.yr-year.active .yr-year-label small { background: rgba(255,255,255,0.22); color: #fff; }
.yr-year-amount { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.yr-year-meta { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.yr-year.active .yr-year-meta { color: rgba(255,255,255,0.8); }
.yr-year-track { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 6px; }
.yr-year-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.yr-year.active .yr-year-track { background: rgba(255,255,255,0.25); }
.yr-year.active .yr-year-track i { background: #fff; }

.yr-stat-sub { margin-top: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.yr-change { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.yr-change.up { background: var(--success-bg); color: var(--success); }
.yr-change.down { background: var(--danger-bg); color: var(--danger); }

.yr-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; height: 260px; align-items: stretch; }
.yr-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.yr-bar-value { font-size: 0.7rem; font-weight: 700; color: var(--muted); white-space: nowrap; height: 16px; font-variant-numeric: tabular-nums; }
.yr-bar-track { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; border-radius: 10px; background: var(--bg); }
.yr-bar { display: block; width: 100%; border-radius: 10px; background: linear-gradient(180deg, #f2627a, var(--primary)); transition: filter .15s ease, transform .15s ease; transform-origin: bottom; animation: yrGrow .6s ease both; }
.yr-bar-col:hover .yr-bar { filter: brightness(1.08); }
.yr-bar-col.best .yr-bar { background: linear-gradient(180deg, #34d399, #059669); }
.yr-bar-col.best .yr-bar-value { color: #059669; }
.yr-bar-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.yr-bar-col.current .yr-bar-label { color: var(--primary); }
.yr-bar-col.future { pointer-events: none; opacity: .4; }
@keyframes yrGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.yr-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 24px; }
.yr-month {
    display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--radius-lg);
    background: var(--card); border: 1px solid var(--border);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.yr-month:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.07); border-color: rgba(224,36,60,0.35); }
.yr-month.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.yr-month.best { border-color: rgba(5,150,105,0.45); }
.yr-month.future { pointer-events: none; opacity: .5; background: var(--bg); border-style: dashed; }
.yr-month-head { display: flex; align-items: center; gap: 8px; }
.yr-month-num { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800; background: var(--primary-bg); color: var(--primary); flex-shrink: 0; }
.yr-month.best .yr-month-num { background: #d1fae5; color: #059669; }
.yr-month-name { font-weight: 700; flex: 1; }
.yr-month-tag { font-size: 0.68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; gap: 3px; }
.yr-month-tag.best { background: #d1fae5; color: #059669; }
.yr-month-tag .icon { width: 11px; height: 11px; }
.yr-month-amount { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.yr-month-amount.muted { color: var(--muted); }
.yr-month-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.yr-month-track { height: 5px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.yr-month-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.yr-month.best .yr-month-track i { background: #059669; }

@media (max-width: 700px) {
    .yr-chart { gap: 4px; height: 200px; }
    .yr-bar-value { display: none; }
    .yr-bar-label { font-size: 0.66rem; }
    .yr-year { flex-basis: 170px; }
}

/* ---- Hesap bölme: ödenen ürünler ---- */
.split-item-check.is-paid { cursor: default; color: var(--muted); }
.split-item-check.is-paid:hover { background: transparent; }
.split-item-check.is-paid .order-item-name { text-decoration: line-through; }
.split-item-check.is-paid .order-item-qty { color: var(--muted); }
.split-paid-mark { width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; margin: 0 3px 0 1px; display: inline-flex; align-items: center; justify-content: center; background: var(--success); color: #fff; }
.split-paid-mark .icon { width: 12px; height: 12px; }
.split-paid-tag { flex-shrink: 0; font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success); }
.split-order-card.is-paid { background: var(--bg); border-color: rgba(47,166,121,0.35); }
.split-order-card.is-paid .order-total { color: var(--muted); text-decoration: line-through; }
.split-paid-summary { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; margin-bottom: 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.split-paid-summary > div { display: flex; justify-content: space-between; gap: 10px; }
.split-paid-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.split-paid-summary .is-paid b { color: var(--success); }
.split-pay-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.split-pay-btn .icon { width: 15px; height: 15px; margin: 0; vertical-align: 0; }
.split-pay-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Aylık ciro: gün gün ---- */
.md-chart { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: 4px; height: 220px; }
.md-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.md-bar-track { flex: 1; width: 100%; max-width: 26px; display: flex; align-items: flex-end; border-radius: 6px; background: var(--bg); }
.md-bar-track .yr-bar { border-radius: 6px; }
.md-bar-col:hover .yr-bar { filter: brightness(1.1); }
.md-bar-col.best .yr-bar { background: linear-gradient(180deg, #34d399, #059669); }
.md-bar-col.weekend .md-bar-track { background: #fbeef0; }
.md-bar-label { font-size: 0.68rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.md-bar-col.current .md-bar-label { color: #fff; background: var(--primary); border-radius: 999px; padding: 0 5px; }
.md-bar-col.future { pointer-events: none; opacity: .35; }

.md-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.md-cal-head { font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; padding-bottom: 2px; }
.md-day {
    min-height: 104px; display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--card); min-width: 0;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.md-day:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.07); border-color: rgba(224,36,60,0.4); }
.md-day.lvl-1 { background: #fff5f6; }
.md-day.lvl-2 { background: #fde4e8; }
.md-day.lvl-3 { background: #fbc9d1; }
.md-day.lvl-4 { background: #f8a9b6; border-color: rgba(224,36,60,0.35); }
.md-day.best { box-shadow: inset 0 0 0 2px #059669; }
.md-day.current { box-shadow: 0 0 0 3px var(--primary-bg); border-color: var(--primary); }
.md-day.future { pointer-events: none; opacity: .45; background: var(--bg); border-style: dashed; }
.md-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
.md-day-num { font-weight: 800; font-size: 0.95rem; }
.md-day-tag { font-size: 0.62rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; }
.md-day-tag.best { background: #059669; }
.md-day-tag .icon { width: 10px; height: 10px; }
.md-day-amount { font-weight: 800; font-size: 0.92rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-day-amount-short { display: none; font-weight: 800; font-size: 0.78rem; }
.md-day-meta { font-size: 0.7rem; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-day-empty { font-size: 0.74rem; color: var(--muted); margin-top: auto; }

@media (max-width: 860px) {
    .md-cal { gap: 4px; }
    .md-day { min-height: 64px; padding: 6px; border-radius: 9px; }
    .md-day-amount, .md-day-meta { display: none; }
    .md-day-amount-short { display: block; }
    .md-day-empty { font-size: 0.66rem; }
    .md-chart { gap: 2px; height: 170px; }
    .md-bar-label { font-size: 0.56rem; }
}
.split-unpay-btn {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; margin-left: 4px;
    padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
    font: inherit; font-size: 0.7rem; font-weight: 700; color: var(--muted); cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.split-unpay-btn .icon { width: 11px; height: 11px; }
.split-unpay-btn:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.split-unpay-btn:disabled { opacity: .5; cursor: wait; }
.split-order-card .order-card-head > .split-unpay-btn { margin-left: auto; }

/* ---- Kullanıcı menü yetkileri ---- */
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.perm-chip { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.perm-chip-all { background: var(--success-bg); border-color: transparent; color: var(--success); }
.perm-chip-none { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.perm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.perm-section-actions { display: flex; gap: 10px; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--primary); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.perm-groups.is-locked { opacity: .6; pointer-events: none; }
.perm-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg); }
.perm-group-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 6px 2px; }
.perm-item { display: flex !important; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; cursor: pointer; font-weight: 600 !important; font-size: 0.86rem; transition: background .12s ease; }
.perm-item:hover { background: var(--card); }
.perm-item input[type="checkbox"] { width: 16px !important; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }
.perm-item-icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; display: inline-flex; }
.perm-item-icon .icon { width: 100%; height: 100%; }
.perm-item:has(input:checked) { background: var(--primary-bg); }
.perm-item:has(input:checked) .perm-item-icon { color: var(--primary); }

.no-access { text-align: center; padding: 56px 24px; max-width: 520px; margin: 40px auto; }
.no-access-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--danger-bg); color: var(--danger); }
.no-access-icon .icon { width: 32px; height: 32px; }
.no-access h2 { margin: 0 0 6px; }
.no-access .hint { margin: 0 0 20px; }

/* ---- Mutfak: hazırlananlar ---- */
.order-card.is-prepared { background: linear-gradient(160deg, #f3fbf7, var(--card) 60%); border-color: rgba(47,166,121,0.3); }
.order-card.is-prepared .order-items { color: var(--muted); }
.prepared-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success); }
.prepared-tag .icon { width: 11px; height: 11px; }
@media (max-width: 480px) { .orders-stat-grid-kitchen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stat-card-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.07); border-color: rgba(47,166,121,0.45); }
.stat-card-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 0.78rem; font-weight: 700; color: var(--success); }
.stat-card-link .icon { width: 13px; height: 13px; }
.prepared-list { display: flex; flex-direction: column; gap: 10px; }

/* ---- Bugün hazırlananlar: yoğun gün listesi ---- */
.prepared-modal { max-width: 860px; display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.prep-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.prep-sum { padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.prep-sum span { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prep-sum b { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.prep-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.prep-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.prep-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.prep-search .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.prep-search input { flex: 1; border: 0 !important; outline: none; padding: 10px 0 !important; background: transparent; font: inherit; box-shadow: none !important; }
.prep-filter { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.prep-filter-btn { border: 0; background: transparent; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.prep-filter-btn.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.prep-list { flex: 1; min-height: 160px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; overscroll-behavior: contain; }
.prep-group-head {
    position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 10px;
    padding: 7px 14px; background: #f7f8fc; border-bottom: 1px solid var(--border);
    font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.prep-row { border-bottom: 1px solid var(--border); }
.prep-group:last-child .prep-row:last-child { border-bottom: 0; }
.prep-row-main {
    display: grid; grid-template-columns: 48px 120px minmax(0, 1fr) 62px 70px 16px; align-items: center; gap: 10px;
    padding: 9px 14px; cursor: pointer; font-size: 0.86rem; transition: background .1s ease;
}
.prep-row-main:hover, .prep-row.open .prep-row-main { background: #f6fbf8; }
.prep-row-main:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.prep-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.prep-table { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.prep-table b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-table small { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.prep-items { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-more { font-weight: 800; color: var(--text); }
.prep-qty { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-align: right; white-space: nowrap; }
.prep-dur { justify-self: end; font-size: 0.74rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prep-dur.mid { background: #fef3c7; color: #b45309; }
.prep-dur.slow { background: var(--danger-bg); color: var(--danger); }
.prep-chevron { width: 16px; height: 16px; color: var(--muted); display: inline-flex; transition: transform .15s ease; }
.prep-chevron .icon { width: 100%; height: 100%; }
.prep-row.open .prep-chevron { transform: rotate(90deg); }
.prep-detail { padding: 4px 14px 12px 72px; background: #f6fbf8; }
.prep-detail .order-items { margin-bottom: 8px; }
.prep-detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; }
.prep-detail-foot .btn { display: inline-flex; align-items: center; gap: 4px; }
.prep-detail-foot .btn .icon { width: 14px; height: 14px; }
.prep-foot { margin: 10px 0 0; font-size: 0.78rem; }

@media (max-width: 640px) {
    .prep-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prep-row-main { grid-template-columns: 44px minmax(0, 1fr) auto 14px; grid-template-areas: "time table dur chev" "time items items items"; row-gap: 2px; padding: 9px 12px; }
    .prep-time { grid-area: time; align-self: start; }
    .prep-table { grid-area: table; }
    .prep-items { grid-area: items; font-size: 0.8rem; }
    .prep-qty { display: none; }
    .prep-dur { grid-area: dur; }
    .prep-chevron { grid-area: chev; }
    .prep-detail { padding-left: 12px; }
    .prep-filter { width: 100%; }
    .prep-filter-btn { flex: 1; }
}

.stock-visibility { margin-top: -4px; }
.stock-visibility-row { display: flex !important; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-weight: 400 !important; }
.stock-visibility-row .toggle-switch { margin-top: 1px; }
.stock-visibility-row b { font-weight: 700; }
.stock-visibility-row small { display: block; margin-top: 3px; }

/* ---- Roller ---- */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.role-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--card); display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--border); }
.role-card-admin { border-top-color: var(--primary); }
.role-card-staff { border-top-color: #7c3aed; }
.role-card-kitchen { border-top-color: #d97706; }
.role-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.role-card-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.role-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; }
.role-card-hint { margin: 0; font-size: 0.8rem; color: var(--muted); }
.role-card .perm-chips { max-width: none; }
.role-card .btn:disabled { opacity: .4; cursor: not-allowed; }
.role-system-tag { font-size: 0.66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.role-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.role-type { display: block !important; cursor: pointer; font-weight: 400 !important; }
.role-type input { position: absolute; opacity: 0; pointer-events: none; }
.role-type-body { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); transition: border-color .12s ease, background .12s ease; }
.role-type-body b { font-size: 0.9rem; }
.role-type-body small { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.role-type:hover .role-type-body { border-color: rgba(224,36,60,0.4); }
.role-type input:checked + .role-type-body { border-color: var(--primary); background: var(--primary-bg); }
.role-type input:disabled + .role-type-body { opacity: .4; cursor: not-allowed; }
.role-type input:focus-visible + .role-type-body { box-shadow: 0 0 0 3px var(--primary-bg); }
@media (max-width: 640px) { .role-type-grid { grid-template-columns: minmax(0, 1fr); } }

.perm-custom-toggle { display: flex !important; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; border: 1px dashed var(--border); cursor: pointer; font-weight: 400 !important; }
.perm-custom-toggle input { width: 16px !important; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--primary); }
.perm-custom-toggle small { display: block; margin-top: 2px; }
.perm-custom-tag { display: inline-block; margin-top: 5px; font-size: 0.66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: #fef3c7; color: #b45309; }

/* ---- Garson: Sipariş Al ---- */
.to-step[hidden] { display: none !important; }
.to-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); margin-bottom: 14px; }
.to-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.to-search .icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.to-search input { flex: 1; border: 0 !important; outline: none; padding: 13px 0 !important; background: transparent; font: inherit; font-size: 1rem; box-shadow: none !important; min-width: 0; }

.to-table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.to-table {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 92px; padding: 14px;
    border-radius: 14px; border: 1.5px solid var(--border); background: var(--card); font: inherit; color: inherit; text-align: left; cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.to-table:hover { border-color: var(--primary); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.to-table:active { transform: scale(.97); }
.to-table-name { font-weight: 800; font-size: 1.05rem; }
.to-table-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 700; color: var(--success); }
.to-table-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.to-table.occupied { background: #fff7f8; border-color: rgba(224,36,60,0.3); }
.to-table.occupied .to-table-status { color: var(--primary); }
.to-table-flag { font-size: 0.68rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.to-table-flag.pending { background: #fef3c7; color: #b45309; }
.to-table-flag.cart { background: var(--primary); color: #fff; }

.to-menu-top {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0 12px; margin-bottom: 4px; background: var(--bg);
}
.to-back { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; color: inherit; }
.to-back .icon { width: 18px; height: 18px; }
.to-menu-table { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.to-menu-table small { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.to-menu-table b { font-size: 1.15rem; font-weight: 800; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.to-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.to-cats::-webkit-scrollbar { display: none; }
.to-cat { flex-shrink: 0; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font: inherit; font-size: 0.86rem; font-weight: 700; color: var(--text); cursor: pointer; white-space: nowrap; }
.to-cat small { font-weight: 700; color: var(--muted); margin-left: 2px; }
.to-cat.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.to-cat.active small { color: rgba(255,255,255,0.8); }

.to-cat-block { margin-bottom: 18px; }
.to-cat-title { font-size: 0.76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 8px; }
.to-product {
    display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px;
    border-radius: 14px; border: 1px solid var(--border); background: var(--card); transition: border-color .12s ease;
}
.to-product.in-cart { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.to-product.out { opacity: .5; }
.to-product img, .to-product-noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--bg); }
.to-product-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.to-product-body b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-product-price { font-size: 0.86rem; font-weight: 700; color: var(--success); }
.to-product-out { font-size: 0.72rem; font-weight: 800; color: var(--danger); }
.to-product-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.to-add-btn, .to-qty-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.to-add-btn { background: var(--primary); color: #fff; }
.to-add-btn:active, .to-qty-btn:active { transform: scale(.92); }
.to-qty-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; }
.to-add-btn .icon, .to-qty-btn .icon { width: 18px; height: 18px; }
.to-qty { min-width: 22px; text-align: center; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }

.to-cartbar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90;
    width: min(560px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px;
    padding: 12px 14px 12px 12px; border: 0; border-radius: 16px; cursor: pointer;
    background: var(--primary); color: #fff; font: inherit; box-shadow: 0 12px 30px rgba(224,36,60,0.35);
}
.to-cartbar[hidden] { display: none; }
.to-cartbar-count { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; background: rgba(255,255,255,0.22); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.to-cartbar-label { flex: 1; text-align: left; font-weight: 800; font-size: 1rem; }
.to-cartbar-total { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
body.to-has-cartbar .to-products { padding-bottom: 80px; }

.to-sheet { max-width: 520px; }
.to-variant-list { display: flex; flex-direction: column; gap: 8px; }
.to-variant { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--card); font: inherit; font-size: 1rem; cursor: pointer; color: inherit; }
.to-variant:hover { border-color: var(--primary); background: var(--primary-bg); }
.to-variant b { color: var(--success); }

.to-cart-lines { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.to-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 82px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.to-cart-line-name { display: flex; flex-direction: column; min-width: 0; }
.to-cart-line-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-cart-line-name small { color: var(--muted); font-weight: 600; }
.to-cart-line-qty { display: flex; align-items: center; gap: 6px; }
.to-cart-line-total { text-align: right; font-variant-numeric: tabular-nums; }
.to-cart-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; }
.to-cart-total b { font-size: 1.2rem; }
#toSendOrder { display: inline-flex; align-items: center; gap: 6px; }
#toSendOrder .icon { width: 16px; height: 16px; }

.to-done { text-align: center; padding: 48px 20px; max-width: 520px; margin: 20px auto; }
.to-done-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--success-bg); color: var(--success); }
.to-done-icon .icon { width: 38px; height: 38px; }
.to-done h2 { margin: 0 0 6px; }
.to-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.to-done-actions .btn { min-width: 150px; padding-top: 12px; padding-bottom: 12px; }

@media (max-width: 480px) {
    .to-table-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .to-menu-top .btn { display: none; }
}

/* Garson siparişi etiketi (Siparişler, mutfak, bildirim) */
.waiter-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #e0f2fe; color: #0369a1; white-space: nowrap; }
.waiter-tag .icon { width: 11px; height: 11px; }
.order-note { margin: -6px 0 12px; padding: 7px 10px; border-radius: 8px; background: #fffbeb; border: 1px dashed #fcd34d; font-size: 0.82rem; color: #92400e; }
.admin-notif-overlay-waiter { display: inline-block; margin: 6px auto 0; font-size: 0.8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #e0f2fe; color: #0369a1; }
.admin-notif-overlay-note { margin-top: 8px; font-size: 0.84rem; color: #92400e; background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px; padding: 6px 10px; }

/* ---- Odak modu (garson): sol menü yok, telefon/tablet için tam ekran ---- */
body.focus-mode { -webkit-tap-highlight-color: transparent; }
body.focus-mode .admin-shell { display: block; }
body.focus-mode .content { padding: 16px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); max-width: 1200px; margin: 0 auto; width: 100%; }
.focus-topbar { gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); padding-top: calc(10px + env(safe-area-inset-top)); }
.focus-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: var(--bg); flex-shrink: 0; }
.focus-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.focus-title b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-title small { font-size: 0.76rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-logout { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 0.85rem; font-weight: 700; color: var(--danger); flex-shrink: 0; }
.focus-logout .icon { width: 16px; height: 16px; }
body.focus-mode .to-tables-panel { padding: 18px; }

/* Sepet çubuğu varken bildirimler onun üstünde dursun */
body.to-has-cartbar .toast-stack { bottom: calc(96px + env(safe-area-inset-bottom)); right: 50%; transform: translateX(50%); align-items: center; }
.to-cartbar { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (max-width: 480px) { body.focus-mode .toast-stack { left: 16px; right: 16px; align-items: stretch; } body.focus-mode.to-has-cartbar .toast-stack { transform: none; } }

/* Tablet ve üstü: daha geniş dokunma alanları, çok sütunlu ürün listesi */
@media (min-width: 700px) {
    .to-table-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .to-table { min-height: 110px; padding: 16px; }
    .to-table-name { font-size: 1.2rem; }
    .to-cat-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .to-cat-title { grid-column: 1 / -1; margin-bottom: 0; }
    .to-product { margin-bottom: 0; padding: 12px; }
    .to-product img, .to-product-noimg { width: 64px; height: 64px; }
    .to-add-btn { width: 46px; height: 46px; }
    .to-menu-top { padding-top: 4px; }
}
@media (min-width: 1100px) {
    .to-cat-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .to-cart-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "qty total"; row-gap: 8px; }
    .to-cart-line-name { grid-area: name; }
    .to-cart-line-name b { white-space: normal; }
    .to-cart-line-qty { grid-area: qty; }
    .to-cart-line-total { grid-area: total; }
}
@media (max-width: 480px) { .to-cats { gap: 6px; } .to-cat { padding: 8px 11px; font-size: 0.8rem; } }
.focus-refresh { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--text); cursor: pointer; flex-shrink: 0; }
.focus-refresh .icon { width: 16px; height: 16px; }
.focus-refresh:active { transform: scale(.96); }
.focus-refresh.spinning .icon { animation: focusSpin .8s linear infinite; }
@keyframes focusSpin { to { transform: rotate(360deg); } }
@media (max-width: 380px) { .focus-refresh span, .focus-logout span { display: none; } }
.to-stock { align-self: flex-start; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-variant-numeric: tabular-nums; }
.to-stock.low { background: #fef3c7; color: #b45309; }
.to-stock.none { background: var(--danger-bg); color: var(--danger); }
.login-tour-link { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 10px; text-align: center; font-size: 0.84rem; font-weight: 700; color: var(--primary); background: var(--primary-bg); }
.login-tour-link:hover { background: #fbd5da; }
