:root {
    --bg-main: #f1f5f9;
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-soft: rgba(16, 185, 129, 0.1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --sidebar-bg: #ffffff;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-lg: 24px;
    --radius-md: 16px;
    --sidebar-width: 260px;
    --topbar-height: 80px;
}

.dark-mode {
    --bg-main: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
    --sidebar-bg: #1e293b;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    transition: background-color 0.3s;
    line-height: 1.5;
    overflow-x: hidden;
    max-width: 100%;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    max-width: 100%;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    margin-left: var(--sidebar-width);
    padding: 0 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: all 0.3s ease;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Navigation */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.logo-icon {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    background: none;
    border-radius: 8px;
    padding: 4px;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-icon:hover {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #10b981 transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #059669);
    border-radius: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.2s;
    font-weight: 600;
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.nav-item:hover:not(.active) {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border: 1px solid var(--glass-border);
    margin-top: 24px;
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.04);
    padding: 10px 16px;
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: inherit;
    width: 100%;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-info {
    display: none;
}

@media (min-width: 1024px) {
    .user-info {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-weight: 800;
        font-size: 0.78rem;
        letter-spacing: 0.3px;
    }

    .user-role {
        font-size: 0.63rem;
        color: var(--text-muted);
        letter-spacing: 0.3px;
    }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--sidebar-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.emerald {
    background: #ecfdf5;
    color: #10b981;
}

.stat-icon.orange {
    background: #fff7ed;
    color: #f97316;
}

.stat-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
}

/* Area Filter Buttons */
.area-btn {
    padding: 5px 10px;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--text-main);
}

@media (min-width: 1024px) {
    .area-btn {
        padding: 7px 14px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .area-btn .area-count {
        font-size: 0.85em;
    }
}

.area-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #b91c1c;
    color: #dc2626;
}

.area-btn.active {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-color: #dc2626;
    font-weight: 800;
    box-shadow: 0 0 0 2px #dc2626, 0 2px 8px rgba(220, 38, 38, 0.4);
}

.area-btn .area-count {
    opacity: 0.75;
    font-size: 0.9em;
    font-weight: 600;
}

/* Table Grid */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.table-card {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.table-card:hover {
    transform: translateY(-3px);
}

.table-card.occupied {
    border-left: 3px solid var(--accent);
}

.table-card.available {
    border-left: 3px solid #cbd5e1;
}

.table-card.reserved {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-id {
    font-weight: 800;
    font-size: 0.9rem;
}

.region-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 1px;
}

.status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    background: #e2e8f0;
    color: #1e293b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: var(--sidebar-bg);
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-body {
    display: flex;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.product-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.order-section {
    width: 300px;
    min-width: 300px;
    height: 100%;
    background: rgba(0, 0, 0, 0.02);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
    min-height: 0;
}

.order-section>div:first-child {
    flex-shrink: 0;
}

.order-section .order-summary-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.order-section .payment-methods,
.order-section #customerSelectorBox,
.order-section>div:last-child {
    flex-shrink: 0;
    padding-top: 8px;
}

/* Category & Products */
.category-tabs {
    display: flex;
    gap: 12px;
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    min-height: auto;
    padding: 4px;
    position: relative;
    z-index: 10;
}

/* New Category Button Styles - Replaces Inline JS Styles */
.category-tab-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    background: rgba(128, 128, 128, 0.08);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-main);
    margin: 3px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.category-tab-btn:hover {
    background: rgba(128, 128, 128, 0.15);
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.category-tab-btn.active {
    border: 1px solid #10b981;
    background: #10b981;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Explicit Dark Mode Overrides for Safety */
.dark-mode .category-tab-btn {
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.dark-mode .category-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .category-tab-btn.active {
    color: white !important;
    background: #10b981;
    border-color: #10b981;
}

.tab-pill {
    padding: 12px 20px !important;
    border-radius: 12px !important;
    border: 2px solid #94a3b8 !important;
    background: #cbd5e1 !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    color: #0f172a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease !important;
}

.tab-pill:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-2px);
}

.tab-pill.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Category Sidebar */
.category-sidebar {
    width: 140px;
    min-width: 140px;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 4px;
}

/* Mobile category tabs — hidden on desktop, shown on mobile via media query */
#mobileCategoryTabs {
    display: none;
}

.category-tabs-container {
    display: none;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 12px;
}

.category-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.category-sidebar-item.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    position: relative;
    z-index: 0;
    margin-top: 12px;
    padding-bottom: 16px;
}

.product-item {
    background: var(--sidebar-bg);
    padding: 6px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    box-shadow: var(--shadow-soft);
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    height: 130px;
}

.product-item img,
.product-item>div:first-child img {
    height: 55px !important;
    object-fit: cover;
    border-radius: 6px;
}

.product-item-img,
.product-item>div:first-child {
    width: 100%;
    height: 55px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f3f4f6;
}

.product-item strong {
    font-size: 0.7rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 0;
    flex-shrink: 1;
}

.product-item span {
    margin-top: auto;
    flex-shrink: 0;
}

.product-item>div:first-child {
    position: relative;
    z-index: 1;
}

.product-item>strong,
.product-item>span {
    position: relative;
    z-index: 1;
}

.product-item:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

/* Sidebar hidden mode (garson) */
.sidebar-hidden .sidebar {
    transform: translateX(-100%);
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 300;
    transition: transform 0.3s ease;
}

.sidebar-hidden .sidebar.sidebar-open {
    transform: translateX(0);
    pointer-events: auto;
}

.sidebar-hidden .main-wrapper {
    margin-left: 0 !important;
}

.sidebar-toggle-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-right: 12px;
}

.sidebar-hidden .sidebar-toggle-btn {
    display: flex;
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    cursor: pointer;
    margin-left: auto;
    transition: background 0.2s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-hidden .sidebar-close-btn {
    display: flex;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 299;
}

.sidebar-hidden .sidebar.sidebar-open~.sidebar-overlay {
    display: block;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-success {
    background: #3b82f6;
    color: white;
}

.full-width {
    width: 100%;
}

/* Payment Method Buttons */
.pay-method-btn {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pay-method-btn:hover {
    background: var(--accent-soft) !important;
    color: var(--accent-dark) !important;
    border-color: var(--accent);
    transform: scale(1.05);
}

.pay-method-btn.active {
    background: var(--accent) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: scale(1.02);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 24px 8px;
    }

    .sidebar span,
    .logo span {
        display: none;
    }

    .nav-item {
        justify-content: center;
    }

    .main-wrapper {
        margin-left: 80px;
    }

    .order-section {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: min(280px, 85vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        top: 0;
        bottom: auto;
        left: 0;
        padding: 24px 16px;
        border: none;
        border-right: 1px solid var(--glass-border);
        border-radius: 0;
        background: var(--sidebar-bg);
        backdrop-filter: none;
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
        z-index: 400;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        pointer-events: auto;
    }

    .sidebar.sidebar-open ~ .sidebar-overlay {
        display: block;
        backdrop-filter: blur(2px);
        background: rgba(0, 0, 0, 0.5);
    }

    .logo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        margin-bottom: 20px;
        flex-shrink: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        justify-content: flex-start;
        align-items: stretch;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 4px;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex: 0 0 auto;
        height: auto;
        width: 100%;
        padding: 12px 16px;
        border-radius: 12px;
        justify-content: flex-start;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-item span {
        display: inline;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .nav-item i {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .nav-item.active {
        background: var(--accent);
        color: white;
        box-shadow: 0 4px 12px var(--accent-soft);
    }

    .sidebar-toggle-btn {
        display: flex;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .option-btn {
        background: var(--bg-main);
        color: var(--text-main);
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        font-size: 0.8rem !important;
        padding: 12px !important;
    }

    .option-btn.active {
        background: var(--accent) !important;
        color: white !important;
        border-color: var(--accent) !important;
    }

    .sub-category-item {
        background: var(--accent-soft) !important;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 16px) 12px;
    }

    .top-bar {
        height: 60px;
        padding: 0 12px;
        border-radius: 16px;
        margin-top: 12px;
        margin-bottom: 10px;
        position: sticky;
        top: 0;
        z-index: 90;
    }

    .search-bar {
        display: flex;
        flex: 1;
        max-width: none;
    }

    .user-info {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .user-name {
        font-weight: 800;
        font-size: 0.72rem;
        letter-spacing: 0.4px;
        line-height: 1.1;
    }

    .user-role {
        font-size: 0.58rem;
        font-weight: 700;
        color: var(--text-muted);
        letter-spacing: 0.4px;
        line-height: 1.1;
    }

    .modal-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .category-sidebar {
        display: none;
    }

    .product-section {
        flex: 1 1 100%;
        min-height: 0;
        padding: 12px;
        padding-bottom: 80px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Order section becomes a bottom sheet on mobile */
    .order-section {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 82%;
        border-left: none;
        border-top: none;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -12px 40px rgba(0,0,0,0.18);
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 300;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px 16px 24px;
        background: var(--sidebar-bg);
    }

    .order-section.mobile-sheet-open {
        transform: translateY(0);
    }

    /* Sheet handle bar */
    .order-section::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(0,0,0,0.15);
        border-radius: 2px;
        margin: -12px auto 16px;
    }

    /* Mobile cart bar */
    .mobile-cart-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--accent, #6366f1), #8b5cf6);
        color: white;
        padding: 14px 20px;
        cursor: pointer;
        z-index: 200;
        transition: opacity 0.2s;
        touch-action: manipulation;
        border-radius: 0;
    }

    .mobile-cart-bar.hidden {
        display: none !important;
    }

    /* Sheet backdrop */
    #mobileSheetBackdrop {
        display: none;
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 250;
        border-radius: 0;
    }

    #mobileSheetBackdrop.open {
        display: block;
    }

    /* Modal content needs relative positioning for sheet overlay */
    #orderModal .modal-content {
        position: relative;
        overflow: hidden;
    }

    body.modal-open .sidebar {
        display: none !important;
    }

    /* Kategori sekmeleri container - başlık altında sabit */
    .category-tabs-container {
        display: block !important;
        flex-shrink: 0;
        background: var(--sidebar-bg);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 0 12px;
    }

    /* Mobilde yatay kaydırılabilir kategori sekmeleri */
    #mobileCategoryTabs {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 0;
        gap: 8px;
        min-height: 44px;
    }

    #mobileCategoryTabs::-webkit-scrollbar {
        display: none;
    }

    #mobileCategoryTabs .category-tab-btn {
        flex-shrink: 0;
        min-height: 40px;
        padding: 8px 16px;
        font-size: 0.8rem;
        touch-action: manipulation;
    }

    /* Alt kategori sekmeleri mobilde */
    #subCategoryTabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 4px 0 8px;
        min-height: 40px;
    }

    #subCategoryTabs::-webkit-scrollbar {
        display: none;
    }

    #subCategoryTabs .category-tab-btn {
        flex-shrink: 0;
        min-height: 36px;
        touch-action: manipulation;
    }

    /* Admin - alan filtresi yatay kaydırılabilir */
    #tableFilters {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding: 3px !important;
        gap: 6px !important;
        width: 100% !important;
    }

    #tableFilters::-webkit-scrollbar {
        display: none;
    }

    #tableFilters .area-btn {
        flex-shrink: 0;
        white-space: nowrap;
        touch-action: manipulation;
    }
}

/* Utils */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode .icon-btn {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Table Utils */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    font-size: 0.9rem;
}

.premium-card {
    background: var(--sidebar-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.order-summary-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.order-item-row {
    background: var(--sidebar-bg);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #059669);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #047857);
}

.dark-mode ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #34d399, #10b981);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #10b981, #059669);
}

/* Toast Notifications */
.toast-msg {
    padding: 16px 24px;
    border-radius: 20px;
    background: var(--sidebar-bg);
    color: var(--text-main);
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 300px;
    display: flex;
    align-items: center;
}

.toast-msg.success {
    border-left: 6px solid var(--accent);
}

.toast-msg.error {
    border-left: 6px solid #ef4444;
}

.toast-msg.info {
    border-left: 6px solid #3b82f6;
}

.dark-mode .toast-msg {
    border-color: rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

/* Dark mode specific overrides */
.dark-mode .product-item,
.dark-mode .order-item-row,
.dark-mode .premium-card,
.dark-mode .stat-card,
.dark-mode .table-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .status-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.dark-mode .area-btn {
    color: #f8fafc;
}

.dark-mode .area-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.dark-mode .area-btn.active {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px #dc2626, 0 2px 8px rgba(220, 38, 38, 0.4);
}

.dark-mode .order-section {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode .category-sidebar {
    background: rgba(0, 0, 0, 0.2);
    border-right-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .category-sidebar-item {
    color: var(--text-main);
}

.dark-mode .category-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== QUICK ORDER — TAM YENİDEN TASARIM ===== */
#quickView {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* desktop: panel'ler kendi içinde scroll eder */
}

/* Mobil tab bar — sadece mobilde görünür */
.quick-tab-bar {
    display: none;
    background: var(--sidebar-bg);
    border-radius: 16px;
    padding: 4px;
    gap: 4px;
    flex-shrink: 0;
    margin-bottom: 8px;
}
.quick-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.quick-tab.active {
    background: var(--accent);
    color: #fff;
}
.quick-tab-badge {
    background: #fff;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 20px;
    min-width: 18px;
    align-items: center;
    justify-content: center;
}

.quick-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.quick-order-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    flex: 1;
    min-height: 0;
    height: 100%;
}

/* Sol — ürün seçimi */
.quick-product-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--sidebar-bg);
    border-radius: 24px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    min-height: 0;
    overflow: hidden;
}

#quickCatList {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex-shrink: 0;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
#quickCatList::-webkit-scrollbar { display: none; }

#quickCatList .tab-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: max-content !important;
    font-size: 0.78rem !important;
    padding: 8px 14px !important;
}

#quickSubCatList {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}
#quickSubCatList::-webkit-scrollbar { display: none; }
#quickSubCatList .tab-pill-sub {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: max-content;
    font-size: 0.74rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.04);
    border: 1.5px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}
.dark-mode #quickSubCatList .tab-pill-sub {
    background: rgba(255,255,255,0.05);
}
#quickSubCatList .tab-pill-sub.active,
#quickSubCatList .tab-pill-sub:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

#quickProdGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 6px 2px 4px;
    scrollbar-width: thin;
    align-content: start;
}

/* Ürün kartı */
.quick-product-card {
    position: relative;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    min-height: 80px;
    overflow: visible;
    user-select: none;
}
.quick-product-card:active {
    transform: scale(0.96);
}
.quick-product-card.in-cart {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.quick-product-card .qpc-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    word-break: break-word;
    max-width: 100%;
}
.quick-product-card .qpc-price {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--accent-dark);
}
.quick-product-card .qpc-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16,185,129,0.4);
    z-index: 2;
}
.quick-product-card .qpc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
    width: 100%;
}
.qpc-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.1s;
    flex-shrink: 0;
}
.qpc-btn:active { transform: scale(0.9); }
.qpc-btn-minus {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}
.qpc-btn-plus {
    background: rgba(16,185,129,0.15);
    color: #10b981;
}
.qpc-qty {
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 16px;
    text-align: center;
    color: var(--text-main);
}

/* Sağ — sepet */
.quick-summary-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    min-height: 0;
}
.dark-mode .quick-summary-panel {
    background: rgba(16,185,129,0.04) !important;
    border-color: rgba(16,185,129,0.15) !important;
}
.quick-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.quick-cart-header h3 {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
}
.quick-cart-total-badge {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent-dark);
}
#quickSummaryList {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 14px;
    scrollbar-width: thin;
}
.quick-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.84rem;
    padding: 24px 0;
}
.quick-cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    background: var(--bg-main);
    border-radius: 14px;
    margin-bottom: 7px;
}
.quick-cart-item-info {
    flex: 1;
    min-width: 0;
}
.quick-cart-item-name {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-cart-item-price {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.quick-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.quick-cart-item-total {
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--accent-dark);
    min-width: 52px;
    text-align: right;
    flex-shrink: 0;
}
/* Ödeme yöntemleri */
#quickPaymentMethodsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
#quickPaymentMethodsContainer .quick-pay-btn {
    flex: 1;
    min-width: 60px;
    padding: 9px 6px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s;
}
#quickPaymentMethodsContainer .quick-pay-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
/* Ödeme butonu */
#quickPayBtn {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    transition: all 0.2s;
}
#quickPayBtn:not(:disabled) {
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

/* ===== QUICK ORDER — MOBİL / MASAÜSTÜ RESPONSIVE ===== */
@media (max-width: 900px) {
    #quickView {
        height: calc(100dvh - 64px);
        padding: 8px;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .quick-tab-bar {
        display: flex;
    }
    .quick-order-layout {
        grid-template-columns: 1fr !important;
        flex: 1;
        min-height: 0;
        overflow: visible;
    }
    .quick-product-container {
        height: 100%;
        min-height: 0;
        padding: 10px;
        gap: 8px;
    }
    #quickProdGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 6px;
    }
    .quick-product-card {
        padding: 10px 6px 8px;
        border-radius: 14px;
        min-height: 70px;
        gap: 3px;
    }
    .quick-product-card .qpc-name {
        font-size: 0.75rem;
        color: var(--text-main) !important;
    }
    .quick-product-card .qpc-price {
        font-size: 0.8rem;
    }
    .quick-summary-panel {
        min-height: 0;
        border-radius: 20px;
        padding: 14px;
        display: flex;
        flex-direction: column;
    }
    #quickSummaryList {
        flex: 1;
        min-height: 60px;
        -webkit-overflow-scrolling: touch;
    }
    #quickPayBtn {
        flex-shrink: 0 !important;
        margin-top: 8px;
    }
    #quickPaymentMethodsContainer {
        flex-shrink: 0;
    }
    .quick-product-header {
        display: none;
    }
}

@media (min-width: 901px) {
    .quick-tab-bar { display: none; }
    #quickProductPane,
    #quickCartPane {
        display: flex !important;
        flex-direction: column;
    }
}

.dark-mode .tab-pill.active {
    background: var(--accent);
    color: white;
}

.dark-mode .personnel-sub-modal .modal-content {
    background: #1e293b;
    color: white;
}

.dark-mode .personnel-sub-modal .stat-card {
    background: #0f172a;
}

.dark-mode .personnel-sub-modal .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .personnel-sub-modal .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .personnel-sub-modal .premium-card {
    border-color: rgba(255, 255, 255, 0.1);
}


@media (max-width: 992px) {
    .finance-layout {
        grid-template-columns: 1fr !important;
    }

    .finance-nav {
        flex-direction: row !important;
        overflow-x: auto;
        padding: 8px !important;
    }

    .finance-nav .nav-item {
        width: auto !important;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    #waiterCallContainer {
        bottom: 20px !important;
        right: 12px !important;
        width: calc(100% - 24px) !important;
    }
}

/* ============================================================
   SETTINGS PAGE STYLES
   ============================================================ */

.settings-layout {
    display: flex;
    min-height: calc(100vh - var(--topbar-height) - 40px);
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.settings-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dark-mode .settings-sidebar {
    border-right-color: rgba(255, 255, 255, 0.06);
}

.settings-sidebar .settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.settings-sidebar .settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
}

.dark-mode .settings-sidebar .settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-sidebar .settings-nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-left-color: var(--accent);
    font-weight: 700;
}

.settings-sidebar .settings-nav-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.settings-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-height) - 40px);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.settings-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.settings-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dark-mode .settings-section-label {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.settings-section-label .settings-pin {
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.5;
}

.settings-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.dark-mode .settings-divider {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.settings-sidebar-header {
    padding: 16px 24px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.settings-sidebar-header i {
    width: 18px;
    height: 18px;
}

/* Settings Row - label + control */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    gap: 16px;
}

.dark-mode .settings-row {
    border-bottom-color: rgba(255, 255, 255, 0.03);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

/* Toggle Switch */
.settings-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.settings-toggle .toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.settings-toggle input:checked+.toggle-slider {
    background: var(--accent);
}

.settings-toggle input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Settings Select */
.settings-select {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-main);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 180px;
    cursor: pointer;
    appearance: auto;
}

.dark-mode .settings-select {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Settings Input */
.settings-input {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-main);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    width: 100%;
    transition: border-color 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent);
}

.dark-mode .settings-input {
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-input-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Settings Slider */
.settings-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #cbd5e1;
    outline: none;
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.settings-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

/* Settings Actions Container */
.settings-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Settings Buttons - both naming conventions */
.btn-settings-save,
.settings-btn-save {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: #f59e0b;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-settings-save:hover,
.settings-btn-save:hover {
    opacity: 0.9;
}

.btn-settings-reconnect,
.settings-btn-reconnect {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-settings-reconnect:hover,
.settings-btn-reconnect:hover {
    opacity: 0.9;
}

.btn-settings-danger,
.settings-btn-danger {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: #ef4444;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-settings-danger:hover,
.settings-btn-danger:hover {
    opacity: 0.9;
}

/* Settings Nav container */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Settings Form */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Settings Warning */
.settings-warning {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-warning i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Settings Select Wide */
.settings-select-wide {
    min-width: 240px;
}

/* Printer Styles */
.settings-printer-info {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-printer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 800;
    color: var(--accent-dark);
}

.settings-printer-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.settings-printer-list-header {
    background: #f59e0b;
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.settings-printer-list {
    margin-top: 8px;
}

.settings-printer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.settings-printer-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

/* Icon Danger Button */
.btn-icon-danger {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.btn-icon-danger:hover {
    opacity: 0.8;
}

.btn-icon-danger i {
    width: 16px;
    height: 16px;
}

/* Payment Methods Table */
.settings-table,
.payment-methods-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.settings-table th,
.payment-methods-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid var(--border);
    text-align: left;
}

.settings-table td,
.payment-methods-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
}

.dark-mode .settings-table td,
.dark-mode .payment-methods-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Subscription Info */
.settings-subscription-info {
    background: var(--sidebar-bg);
    padding: 20px 24px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.dark-mode .settings-subscription-info {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Integration Cards */
.settings-integration-cards,
.integration-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.integration-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .integration-card {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.05);
}

.integration-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.integration-card-icon img,
.integration-card-icon i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.integration-card-name {
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.integration-card-expiry {
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 700;
}

.integration-card-expiry.active {
    background: #dcfce7;
    color: #16a34a;
}

.integration-card-expiry.expired {
    background: #fef2f2;
    color: #ef4444;
}

/* Currency warning */
.currency-warning {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 16px 0;
}

/* Subscription info bar */
.subscription-info {
    background: var(--sidebar-bg);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .subscription-info {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Settings form group (vertical) */
.settings-form-group {
    margin-bottom: 16px;
}

.settings-form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

/* Settings nav item span - desktop'ta görünür */
.settings-sidebar .settings-nav-item span {
    display: inline;
}

/* Responsive settings */
@media (max-width: 1024px) {
    .settings-layout {
        flex-direction: column;
        min-height: unset;
        border-radius: var(--radius-md);
    }

    .settings-sidebar {
        width: 100%;
        min-width: 100%;
        flex-direction: column;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        background: var(--sidebar-bg);
    }

    .settings-sidebar-header {
        display: none;
    }

    .settings-sidebar .settings-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 10px;
        gap: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-items: center;
    }

    .settings-sidebar .settings-nav::-webkit-scrollbar {
        display: none;
    }

    /* Mobilde sadece ikon - span tamamen gizle */
    .settings-sidebar .settings-nav-item span {
        display: none !important;
    }

    .settings-sidebar .settings-nav-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border-left: none;
        border-bottom: none;
        border-radius: 12px;
        padding: 0;
        min-width: 44px !important;
        max-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        background: transparent;
        transition: background 0.2s, color 0.2s;
        flex-shrink: 0;
    }

    .settings-sidebar .settings-nav-item i {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .settings-sidebar .settings-nav-item.active {
        background: var(--accent-soft);
        color: var(--accent);
        border-left-color: transparent;
    }

    .settings-sidebar .settings-nav-item:not(.active) {
        color: var(--text-muted);
    }

    .settings-content {
        padding: 20px 16px;
        max-height: none;
        overflow-y: visible;
    }

    .settings-title {
        font-size: 1.1rem;
    }

    .settings-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .settings-row span:first-child {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* ===== X REPORT STYLES ===== */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.report-header-actions {
    display: flex;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-main);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.xr-container {
    animation: fadeIn 0.3s ease;
}

.xr-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.xr-title h3 {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.xr-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-main);
    padding: 6px 14px;
    border-radius: 10px;
}

/* Top Stats Row */
.xr-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.xr-stat {
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.xr-stat:hover {
    transform: translateY(-2px);
}

.xr-stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.xr-stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.xr-stat.green {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.xr-stat.green .xr-stat-label {
    color: var(--accent);
}

.xr-stat.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.xr-stat.blue .xr-stat-label {
    color: #3b82f6;
}

.xr-stat.orange {
    background: rgba(249, 115, 22, 0.08);
    color: #c2410c;
}

.xr-stat.orange .xr-stat-label {
    color: #f97316;
}

.xr-stat.red {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.xr-stat.red .xr-stat-label {
    color: #ef4444;
}

/* Grid Layout */
.xr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.xr-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards */
.xr-card {
    background: var(--sidebar-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.xr-card-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

/* Badges */
.xr-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.xr-badge.warn {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.xr-badge.ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

/* Tables */
.xr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.xr-table th {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    border-bottom: 1.5px solid var(--border);
    text-align: left;
}

.xr-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.xr-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.xr-table tfoot td {
    font-weight: 800;
    border-top: 2px solid var(--accent);
    border-bottom: none;
    padding-top: 10px;
    color: var(--accent-dark);
}

.xr-right {
    text-align: right !important;
}

/* Highlight rows */
.xr-row-highlight td {
    font-weight: 800 !important;
    border-top: 2px solid var(--accent);
    color: var(--accent-dark);
}

.xr-row-ikram td {
    color: #f97316;
    font-weight: 600;
}

.xr-row-iptal td {
    color: #ef4444;
    font-weight: 600;
}

/* Type badges for ikram/iptal */
.xr-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
}

.xr-type-badge.ikram {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.xr-type-badge.iptal,
.xr-type-badge.zai {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Scrollable table container */
.xr-table-scroll {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
}

.xr-table-scroll::-webkit-scrollbar {
    width: 4px;
}

.xr-table-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .xr-grid {
        grid-template-columns: 1fr;
    }

    .xr-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .xr-table-scroll {
        overflow: hidden;
    }

    .xr-table {
        width: 100%;
        table-layout: auto;
        word-break: break-word;
        border-radius: 8px;
    }
}

@media (max-width: 640px) {
    .xr-stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .report-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .report-header-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .report-header-actions .btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
        justify-content: center;
        text-align: center;
    }

    .xr-card {
        padding: 12px;
        overflow: hidden;
        margin-bottom: 12px;
    }

    .xr-card-title {
        font-size: 0.95rem;
    }

    .xr-stat {
        padding: 14px;
    }

    .xr-stat-value {
        font-size: 1.3rem;
    }

    .xr-table th,
    .xr-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
        white-space: normal;
    }

    #reportsView>div[style*="display:flex"] {
        flex-wrap: wrap !important;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .table-card {
        padding: 8px !important;
    }

    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 4px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 6px !important;
    }

    .stat-card {
        padding: 8px !important;
        gap: 8px !important;
    }

    .stat-icon {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
    }

    .stat-value {
        font-size: 0.85rem !important;
    }
}

/* Spin Animation for Loading Indicators */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   PRODUCT MANAGEMENT - Card Grid Styles
   ============================================================ */

/* Page Header: title + subtitle left, action buttons right */
.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.pm-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Action buttons container (Toplu Fiyat, Yeni Ürün) */
.pm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.pm-actions button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Search input + category dropdown side by side */
.pm-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pm-filters input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: var(--sidebar-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
}

.pm-filters input[type="text"]:focus {
    border-color: var(--accent);
}

.pm-filters select {
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: var(--sidebar-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.pm-filters select:focus {
    border-color: var(--accent);
}

/* Card grid: responsive auto-fill */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Individual product card */
.pm-product-card {
    background: var(--sidebar-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card image area */
.pm-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg-main);
}

.pm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pm-product-card:hover .pm-card-image img {
    transform: scale(1.05);
}

/* ============================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================================ */

/* GPU-layer promotion for scrollable containers */
.product-list,
.order-summary-list,
.nav-menu,
#tablesGrid {
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

/* Touch targets — minimum 44px for all interactive elements on mobile */
@media (max-width: 768px) {

    /* CRITICAL: Remove expensive backdrop-filter on mobile — saves massive GPU paint */
    .sidebar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--sidebar-bg) !important;
    }

    .modal {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.6) !important;
    }

    .top-bar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--sidebar-bg) !important;
    }

    /* Kill all animations on mobile — biggest perf win */
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0.1s !important;
    }

    /* Remove hover transforms that cause layout thrashing on touch */
    .table-card:hover,
    .product-item:hover,
    .stat-card:hover,
    .xr-stat:hover {
        transform: none !important;
    }

    /* Remove box-shadows on cards to reduce paint complexity */
    .table-card,
    .stat-card,
    .product-item {
        box-shadow: none !important;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    /* Optimize product grid for mobile — smaller cards, less gap */
    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 6px !important;
    }

    .product-item {
        padding: 6px !important;
        border-radius: 10px !important;
    }

    .product-item img,
    .product-item>div:first-child {
        height: 60px !important;
        border-radius: 8px !important;
    }

    /* Larger touch targets for buttons */
    .btn,
    button {
        min-height: 44px;
        touch-action: manipulation;
    }

    .pay-method-btn {
        min-height: 48px !important;
        font-size: 0.85rem !important;
    }

    /* Category tabs — horizontal scroll, no wrap on mobile */
    .category-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px !important;
        min-height: auto !important;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab-btn {
        flex-shrink: 0;
        padding: 10px 14px !important;
        font-size: 0.75rem !important;
    }

    /* Order summary items — tighter spacing */
    .order-item-row {
        padding: 10px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }

    /* Table grid — 2 columns on mobile */
    .grid-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .table-card {
        padding: 10px !important;
        border-radius: 10px !important;
    }

    /* Modern grid — 3 columns on mobile */
    .modern-grid-layout {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 6px !important;
    }

    .modern-grid-layout .table-card {
        border-radius: 10px !important;
        padding: 0 !important;
    }

    .modern-grid-layout .table-graphic-container {
        padding: 8px 4px 6px !important;
        border-bottom: none !important;
    }

    .modern-grid-layout .m-table-graphic {
        width: 36px !important;
        height: 36px !important;
    }

    .modern-grid-layout .m-table-surface {
        border-width: 2px !important;
        padding: 2px !important;
    }

    .modern-grid-layout .m-table-surface .t-name {
        font-size: 0.45rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
    }

    .modern-grid-layout .m-table-surface .t-region {
        display: none !important;
    }

    .modern-grid-layout .m-chair {
        display: none !important;
    }

    .modern-grid-layout .m-pulse {
        width: 7px !important;
        height: 7px !important;
        top: 4px !important;
        left: 4px !important;
        border-width: 1px !important;
    }

    .modern-grid-layout .m-status-badge {
        font-size: 0.4rem !important;
        padding: 2px 4px !important;
        top: 4px !important;
        right: 4px !important;
    }

    .modern-grid-layout .m-table-details {
        padding: 0 4px 6px !important;
        gap: 2px !important;
    }

    .modern-grid-layout .m-info-row {
        display: none !important;
    }

    .modern-grid-layout .m-total {
        font-size: 0.55rem !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .modern-grid-layout .m-btn-group {
        padding-top: 2px !important;
        gap: 2px !important;
    }

    .modern-grid-layout .m-btn {
        padding: 4px 2px !important;
        font-size: 0.4rem !important;
        border-radius: 6px !important;
    }

    /* Stats grid — single row scroll */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .stat-card {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .stat-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .stat-value {
        font-size: 1rem !important;
    }

    /* Modal body — full screen, no border radius */
    .modal {
        padding: 0 !important;
    }

    .modal-content {
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    /* Prevent body scroll when modal is open */
    body.modal-open {
        overflow: hidden !important;
        width: 100% !important;
    }

    /* Add padding for iOS safe area */
    .page-view {
        padding-bottom: env(safe-area-inset-bottom, 16px) !important;
    }

    /* Order section — scrollable bottom half */
    .order-section {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        height: auto !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        flex: 0 0 auto !important;
    }

    /* Product section — scrollable top half */
    .product-section {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px !important;
        overflow-y: auto !important;
        flex: 1 1 50% !important;
        min-height: 0 !important;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .table-card {
        padding: 8px !important;
    }

    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 4px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 6px !important;
    }

    .stat-card {
        padding: 8px !important;
        gap: 8px !important;
    }

    .stat-icon {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
    }

    .stat-value {
        font-size: 0.85rem !important;
    }
}

/* Spin Animation for Loading Indicators */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   PRODUCT MANAGEMENT - Card Grid Styles
   ============================================================ */

/* Page Header: title + subtitle left, action buttons right */
.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.pm-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Action buttons container (Toplu Fiyat, Yeni Ürün) */
.pm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.pm-actions button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Search input + category dropdown side by side */
.pm-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pm-filters input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: var(--sidebar-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
}

.pm-filters input[type="text"]:focus {
    border-color: var(--accent);
}

.pm-filters select {
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: var(--sidebar-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.pm-filters select:focus {
    border-color: var(--accent);
}

/* Card grid: responsive auto-fill */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Individual product card */
.pm-product-card {
    background: var(--sidebar-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card image area */
.pm-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg-main);
}

.pm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pm-product-card:hover .pm-card-image img {
    transform: scale(1.05);
}

.pm-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

/* Card body: content below image */
.pm-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Hover: slight elevation */
.pm-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.06);
}

/* Category badge: colored, uppercase, small, rounded */
.pm-category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badge */
.pm-status-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
}

.pm-status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.pm-status-badge.inactive {
    background: #fce7f3;
    color: #9d174d;
}

/* Card product name */
.pm-product-card .pm-product-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

/* Card price */
.pm-product-card .pm-product-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--accent);
}

/* Card description */
.pm-product-card .pm-product-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Card footer: edit + delete buttons */
.pm-product-card .pm-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Edit button - matches site accent theme */
.pm-btn-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md, 12px);
    background: var(--accent-soft, rgba(16, 185, 129, 0.1));
    color: var(--accent-dark, #059669);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-btn-edit:hover {
    background: var(--accent, #10b981);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Delete button - subtle danger style */
.pm-btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md, 12px);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================================
   PRODUCT MANAGEMENT - Responsive Breakpoints
   ============================================================ */

/* 768px – 1023px: 2-3 cards per row */
@media (max-width: 1023px) {
    .pm-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .pm-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .pm-filters input[type="text"] {
        min-width: 0;
        width: 100%;
    }
}

/* Below 768px: 1-2 cards per row, stack header & filters vertically */
@media (max-width: 767px) {
    .pm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pm-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .pm-actions button {
        flex: 1;
        min-width: 120px;
    }

    .pm-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
}

/* ============================================================
   PRODUCT MANAGEMENT - Dark Mode Overrides
   ============================================================ */

.dark-mode .pm-product-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .pm-card-image {
    background: #0f172a;
}

.dark-mode .pm-card-image-placeholder {
    background: #0f172a;
}

.dark-mode .pm-product-card:hover {
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.4), 0 4px 8px -2px rgba(0, 0, 0, 0.3);
}

.dark-mode .pm-status-badge.active {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.dark-mode .pm-status-badge.inactive {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.dark-mode .pm-filters input[type="text"] {
    background: #1e293b;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .pm-filters select {
    background: #1e293b;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .pm-card-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .pm-btn-edit {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.dark-mode .pm-btn-edit:hover {
    background: #10b981;
    color: white;
}

.dark-mode .pm-btn-delete {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.dark-mode .pm-btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* =========================================
   MODERN TABLE GRAPHIC DESIGN
========================================= */
.modern-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 10px;
}

.table-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    isolation: isolate;
}

.table-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.table-graphic-container {
    padding: 24px 20px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.dark-mode .table-graphic-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

/* Graphic for the top-down table view */
.m-table-graphic {
    position: relative;
    width: 82px;
    height: 82px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.m-table-surface {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--sidebar-bg);
    border-radius: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid #e2e8f0;
    transition: all 0.3s;
    padding: 6px;
}

.dark-mode .m-table-surface {
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.4);
    border: 3px solid #334155;
    background: #1e293b;
}

.m-table-surface .t-name {
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.m-table-surface .t-region {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.m-chair {
    position: absolute;
    width: 32px;
    height: 12px;
    background: #cbd5e1;
    border-radius: 12px;
    z-index: 1;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .m-chair {
    background: #475569;
}

.m-chair.top {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
}

.m-chair.bottom {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
}

.m-chair.left {
    left: -16px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
}

.m-chair.right {
    right: -16px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
}

/* Colors based on table status */
.table-card.available .m-table-surface {
    border-color: #10b981;
}

.table-card.available .m-chair {
    background: rgba(16, 185, 129, 0.4);
}

.table-card.occupied .m-table-surface {
    border-color: #f43f5e;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.table-card.occupied .m-chair {
    background: rgba(244, 63, 94, 0.4);
}

.table-card.occupied {
    background: linear-gradient(135deg, var(--sidebar-bg), rgba(244, 63, 94, 0.03));
}

.table-card.reserved .m-table-surface {
    border-color: #f59e0b;
}

.table-card.reserved .m-chair {
    background: rgba(245, 158, 11, 0.4);
}

.table-card.reserved {
    background: linear-gradient(135deg, var(--sidebar-bg), rgba(245, 158, 11, 0.03));
}

.m-pulse {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 14px;
    height: 14px;
    background: #f43f5e;
    border-radius: 50%;
    z-index: 10;
    border: 2px solid var(--sidebar-bg);
}

.m-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: #f43f5e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: m-pulse-anim 2s infinite;
}

@keyframes m-pulse-anim {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.m-table-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.m-status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    background: var(--bg-main);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.m-status-badge.occupied {
    background: #fee2e2;
    color: #ef4444;
}

.m-status-badge.available {
    background: #d1fae5;
    color: #10b981;
}

.m-status-badge.reserved {
    background: #fef3c7;
    color: #f59e0b;
}

.m-receipt-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    z-index: 10;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    animation: receiptBadgePulse 2s ease-in-out infinite;
}

@keyframes receiptBadgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.dark-mode .m-receipt-badge {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.5);
}

.m-info-row {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 8px 0;
}

.m-btn-group {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.m-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.m-btn.primary {
    background: var(--accent);
    color: white;
}

.m-btn.primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.m-btn.secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.dark-mode .m-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
}

.m-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   GARSON TAM EKRAN - RESPONSIVE TASARIM
   Tüm ekran boyutları için kapsamlı garson modu stilleri
   ============================================================ */

/* === TEMEL GARSON STILLER (tüm ekranlar) === */

/* Top bar - garson modunda daha kompakt ve sticky */
.sidebar-hidden .top-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 12px;
}

/* Garson modunda arama çubuğu her zaman görünür */
.sidebar-hidden .search-bar {
    display: flex;
    flex: 1;
    max-width: 400px;
}

/* Garson modunda kullanıcı adı görünür */
.sidebar-hidden .user-info {
    display: flex;
    flex-direction: column;
}

/* Sidebar açıkken daha geniş ve gölgeli */
.sidebar-hidden .sidebar {
    width: min(300px, 85vw);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
}

/* Alan filtreleri - yatay kaydırma */
.sidebar-hidden #tableFilters {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    -ms-overflow-style: none;
}

/* Yeni Masa butonu garson modunda tamamen gizli (tüm ekran boyutları) */
.sidebar-hidden #dashboardView .btn-primary {
    display: none !important;
}

.sidebar-hidden #tableFilters::-webkit-scrollbar {
    display: none;
}

/* Stats grid - 3 sütun her zaman */
.sidebar-hidden .stats-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Masa grid - garson için daha büyük kartlar */
.sidebar-hidden .modern-grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* === GARSON TABLET (768px - 1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar-hidden .modern-grid-layout {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }

    .sidebar-hidden .m-table-graphic {
        width: 68px !important;
        height: 68px !important;
    }

    .sidebar-hidden .m-table-surface .t-name {
        font-size: 0.72rem !important;
    }

    .sidebar-hidden .main-wrapper {
        padding: 0 20px 20px 20px;
        gap: 16px;
    }

    .sidebar-hidden .top-bar {
        margin-top: 20px;
    }

    .sidebar-hidden .stats-grid {
        gap: 12px;
    }
}

/* === GARSON MOBİL (max 768px) === */
@media (max-width: 768px) {
    /* Top bar */
    .sidebar-hidden .top-bar {
        height: 60px;
        padding: 0 12px;
        gap: 10px;
        border-radius: 16px;
        margin-bottom: 10px;
    }

    /* Arama çubuğu mobilde görünür */
    .sidebar-hidden .search-bar {
        display: flex !important;
        flex: 1;
        max-width: none;
        padding: 8px 12px;
        border-radius: 10px;
    }

    /* Kullanıcı bilgisi */
    .sidebar-hidden .user-info {
        display: flex !important;
    }

    .sidebar-hidden .user-profile img {
        width: 34px;
        height: 34px;
    }

    /* Hamburger butonu */
    .sidebar-hidden .sidebar-toggle-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.04) !important;
        flex-shrink: 0;
    }

    /* Ana alan */
    .sidebar-hidden .main-wrapper {
        padding: 0 10px calc(env(safe-area-inset-bottom, 0px) + 16px) 10px;
        gap: 10px;
    }

    .sidebar-hidden .top-bar {
        margin-top: 10px;
    }

    /* Dashboard üst satır */
    .sidebar-hidden #dashboardView > div:first-child {
        gap: 10px !important;
        margin-bottom: 12px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        max-width: 100% !important;
    }

    /* Alan filtresi container */
    .sidebar-hidden #tableFilters {
        flex: 1 !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding: 3px !important;
        gap: 6px !important;
        width: 100% !important;
    }

    /* Alan filtre butonları */
    .sidebar-hidden .area-btn {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.78rem;
        white-space: nowrap;
        min-height: 38px;
        touch-action: manipulation;
    }

    /* Stats grid */
    .sidebar-hidden .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .sidebar-hidden .stat-card {
        padding: 11px 10px !important;
        gap: 10px !important;
        border-radius: 14px !important;
    }

    .sidebar-hidden .stat-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        flex-shrink: 0;
    }

    .sidebar-hidden .stat-label {
        font-size: 0.68rem !important;
    }

    .sidebar-hidden .stat-value {
        font-size: 0.95rem !important;
    }

    /* Masa grid - 3 kolon (admin ile aynı) */
    .sidebar-hidden .modern-grid-layout {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 6px !important;
    }

    /* Masa kartları */
    .sidebar-hidden .modern-grid-layout .table-card {
        border-radius: 10px !important;
        padding: 0 !important;
    }

    .sidebar-hidden .modern-grid-layout .table-graphic-container {
        padding: 8px 4px 6px !important;
        border-bottom: none !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-graphic {
        width: 40px !important;
        height: 40px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-surface {
        border-width: 2px !important;
        padding: 2px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-surface .t-name {
        font-size: 0.5rem !important;
        font-weight: 800 !important;
        line-height: 1 !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-surface .t-region {
        display: none !important;
    }

    .sidebar-hidden .modern-grid-layout .m-chair {
        display: none !important;
    }

    .sidebar-hidden .modern-grid-layout .m-pulse {
        width: 7px !important;
        height: 7px !important;
        top: 4px !important;
        left: 4px !important;
        border-width: 1px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-status-badge {
        font-size: 0.4rem !important;
        padding: 2px 4px !important;
        top: 4px !important;
        right: 4px !important;
        border-radius: 4px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-receipt-badge {
        font-size: 0.4rem !important;
        padding: 2px 4px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-details {
        padding: 0 4px 6px !important;
        gap: 2px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-info-row {
        display: none !important;
    }

    .sidebar-hidden .modern-grid-layout .m-total {
        font-size: 0.58rem !important;
        font-weight: 800 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .sidebar-hidden .modern-grid-layout .m-btn-group {
        padding-top: 2px !important;
        gap: 2px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-btn {
        padding: 5px 2px !important;
        font-size: 0.48rem !important;
        border-radius: 6px !important;
        min-height: 28px !important;
        touch-action: manipulation;
    }

    /* Garson modunda sidebar - mobil sol çekmece (bottom bar değil) */
    .sidebar-hidden .sidebar {
        top: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: min(280px, 85vw) !important;
        flex-direction: column !important;
        padding: 24px 16px !important;
        border-radius: 0 !important;
        border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Sidebar açıkken */
    .sidebar-hidden .sidebar.sidebar-open {
        transform: translateX(0) !important;
        z-index: 500 !important;
        pointer-events: auto !important;
    }

    /* Logo göster */
    .sidebar-hidden .sidebar .logo {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
    }

    /* Nav menü dikey */
    .sidebar-hidden .sidebar .nav-menu {
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important;
        gap: 4px !important;
        padding: 0 !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    /* Nav item tam genişlik dikey */
    .sidebar-hidden .sidebar .nav-item {
        flex: 0 0 auto !important;
        height: auto !important;
        width: 100% !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    /* Span (label) görünür */
    .sidebar-hidden .sidebar .nav-item span {
        display: inline !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }

    /* Sidebar overlay blur */
    .sidebar-hidden .sidebar-overlay {
        backdrop-filter: blur(2px) !important;
        background: rgba(0, 0, 0, 0.5) !important;
    }

    /* Sipariş modalı - garson */
    .sidebar-hidden #orderModal .modal-content {
        border-radius: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    .sidebar-hidden #orderModal .modal-header {
        padding: 12px 16px !important;
        min-height: 58px;
        flex-shrink: 0;
    }

    .sidebar-hidden #orderModal .modal-header h3,
    .sidebar-hidden #orderModal .modal-header h2 {
        font-size: 1rem !important;
    }

    .sidebar-hidden #orderModal .modal-body {
        flex-direction: column !important;
        height: calc(100dvh - 58px) !important;
        overflow: hidden !important;
    }

    /* Ürün listesi tam yükseklik - bottom sheet ile */
    .sidebar-hidden #orderModal .product-section {
        flex: 1 1 100% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 10px 10px 80px !important;
    }

    /* Sipariş özeti - bottom sheet olarak konumlanır */
    .sidebar-hidden #orderModal .order-section {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: 82% !important;
        border-left: none !important;
        border-top: none !important;
        border-radius: 24px 24px 0 0 !important;
        box-shadow: 0 -12px 40px rgba(0,0,0,0.18) !important;
        flex: 0 0 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 20px 16px 24px !important;
        transform: translateY(100%) !important;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 300 !important;
    }

    .sidebar-hidden #orderModal .order-section.mobile-sheet-open {
        transform: translateY(0) !important;
    }

    /* Kategori sidebar gizli - mobil kategoriler */
    .sidebar-hidden #orderModal .category-sidebar {
        display: none !important;
    }

    /* Ödeme butonu büyük */
    .sidebar-hidden #orderModal .order-section .btn.full-width {
        min-height: 48px !important;
        font-size: 0.9rem !important;
        border-radius: 14px !important;
    }

    /* Bildirimler üstte — alttaki sepet/ödeme butonunu kapatmasın */
    #notificationContainer {
        right: 12px !important;
        left: 12px !important;
        top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
        bottom: auto !important;
        align-items: stretch;
    }

    .sidebar-hidden .toast-msg {
        min-width: auto !important;
        width: 100% !important;
        border-radius: 14px !important;
        padding: 12px 16px !important;
        font-size: 0.85rem !important;
    }
}

/* === GARSON KÜÇÜK TELEFON (max 480px) === */
@media (max-width: 480px) {
    .sidebar-hidden .top-bar {
        height: 54px;
        padding: 0 10px;
        border-radius: 14px;
    }

    .sidebar-hidden .search-bar {
        padding: 7px 10px;
    }

    .sidebar-hidden .search-bar input {
        font-size: 0.85rem;
    }

    .sidebar-hidden .main-wrapper {
        padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 12px) 8px;
        gap: 8px;
    }

    .sidebar-hidden .top-bar {
        margin-top: 8px;
    }

    .sidebar-hidden .stat-card {
        padding: 9px 8px !important;
        gap: 7px !important;
        border-radius: 12px !important;
    }

    .sidebar-hidden .stat-icon {
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
    }

    .sidebar-hidden .stat-icon svg,
    .sidebar-hidden .stat-icon i {
        width: 14px !important;
        height: 14px !important;
    }

    .sidebar-hidden .stat-label {
        font-size: 0.6rem !important;
    }

    .sidebar-hidden .stat-value {
        font-size: 0.85rem !important;
    }

    .sidebar-hidden .modern-grid-layout {
        gap: 8px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-graphic {
        width: 52px !important;
        height: 52px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-surface .t-name {
        font-size: 0.58rem !important;
    }

    .sidebar-hidden .modern-grid-layout .m-btn {
        padding: 7px 3px !important;
        font-size: 0.6rem !important;
        min-height: 32px !important;
    }

    .sidebar-hidden .area-btn {
        padding: 7px 10px !important;
        font-size: 0.72rem !important;
        min-height: 34px !important;
    }

    /* Sidebar toggle kompakt */
    .sidebar-hidden .sidebar-toggle-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .sidebar-hidden .user-profile img {
        width: 30px;
        height: 30px;
    }
}

/* === GARSON LANDSCAPE MOBİL === */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .sidebar-hidden .top-bar {
        height: 50px;
        border-radius: 12px;
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .sidebar-hidden .main-wrapper {
        padding: 0 10px 6px 10px;
        gap: 6px;
    }

    .sidebar-hidden .stats-grid {
        display: none !important;
    }

    .sidebar-hidden .modern-grid-layout {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-table-graphic {
        width: 44px !important;
        height: 44px !important;
    }

    .sidebar-hidden .modern-grid-layout .table-graphic-container {
        padding: 8px 4px 6px !important;
    }

    .sidebar-hidden .modern-grid-layout .m-btn {
        padding: 6px 3px !important;
        font-size: 0.58rem !important;
        min-height: 28px !important;
    }

    /* Landscape sipariş modal - yan yana */
    .sidebar-hidden #orderModal .modal-body {
        flex-direction: row !important;
        height: calc(100dvh - 58px) !important;
    }

    .sidebar-hidden #orderModal .order-section {
        position: relative !important;
        transform: none !important;
        width: 260px !important;
        max-height: none !important;
        border-left: 2px solid rgba(0, 0, 0, 0.06) !important;
        border-top: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .sidebar-hidden #orderModal .product-section {
        flex: 1 !important;
        padding-bottom: 10px !important;
    }

    .mobile-cart-bar {
        display: none !important;
    }
}

/* Mobile cart bar: desktop'ta gizli, sadece mobile media query gösterir */
.mobile-cart-bar {
    display: none;
}

/* ===== KULLANICI YÖNETİMİ — KART LİSTESİ ===== */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
}

.user-card {
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 14px 16px;
    transition: box-shadow 0.15s;
}

.user-card:hover {
    box-shadow: var(--shadow-soft);
}

.user-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.user-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.user-card-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.user-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .user-card-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .user-card-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }
}

/* =========================================================
   FİŞ YAZDIRMA İPTAL İKONU (8. BUTON İÇİN SVG İKON)
   ========================================================= */
.modal-body > div > div:nth-child(8)::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 8px auto;
    /* Aşağıdaki satır, iptal edilmiş yazıcı ikonunun ta kendisidir */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3Cline x1='3' y1='3' x2='21' y2='21'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Sisteme sonradan gerçek ikon eklenirse çakışmayı önleme kodu */
.modal-body > div > div:nth-child(8):has(svg)::before,
.modal-body > div > div:nth-child(8):has(i)::before {
    display: none !important;
}
/* =========================================================
   ÜRÜN BAZLI ÖDEME - DESKTOP + CHROME + EXE
   ========================================================= */

@media (min-width: 769px) {

    .urun-odeme-modal {
        padding: 12px !important;
    }

    .urun-odeme-content {
        width: min(900px, 94vw) !important;
        max-width: 900px !important;

        /* Chrome adres çubuğu yüzünden aşağı taşmayı engeller */
        max-height: calc(100dvh - 24px) !important;

        padding: 20px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;

        border-radius: 24px !important;
    }

    .urun-odeme-grid {
        grid-template-columns: 1fr auto 1fr !important;
        gap: 12px !important;
    }

    .urun-odeme-grid > div:first-child,
    .urun-odeme-grid > div:last-child {
        min-height: 320px !important;
    }
}


/* =========================================================
   ÜRÜN BAZLI ÖDEME - MOBİL
   ========================================================= */

@media (max-width: 768px) {

    .urun-odeme-modal {
        padding: 6px !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
    }

    .urun-odeme-content {
        width: 100% !important;
        max-width: 100% !important;

        max-height: calc(100dvh - 12px) !important;

        margin: 0 !important;
        padding: 12px !important;

        border-radius: 16px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .urun-odeme-grid {
        display: grid !important;

        /* Telefonda yan yana değil alt alta */
        grid-template-columns: 1fr !important;

        gap: 10px !important;
    }

    .urun-odeme-grid > div:first-child,
    .urun-odeme-grid > div:last-child {
        min-height: 220px !important;
    }

    .urun-odeme-actions {
        min-width: 0 !important;

        padding: 4px 0 !important;

        display: grid !important;

        /* Taşıma butonları 2 kolon */
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        gap: 6px !important;
    }

    .urun-odeme-actions button {
        width: 100% !important;
        min-height: 42px !important;

        padding: 8px 5px !important;

        font-size: 0.68rem !important;
    }
}

/* ============================================================
   KITCHEN SCREEN — FINAL RESPONSIVE DESIGN
   Sadece mutfak/bar ekranının görünümünü etkiler.
   ============================================================ */
#kitchenView {
    width: 100%;
    min-width: 0;
    padding-bottom: 12px;
}

.kitchen-screen {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kitchen-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--sidebar-bg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.dark-mode .kitchen-toolbar {
    border-color: rgba(255, 255, 255, 0.07);
}

.kitchen-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.kitchen-heading-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    color: #ea580c;
    background: rgba(249, 115, 22, 0.12);
}

.kitchen-heading-icon svg {
    width: 23px;
    height: 23px;
}

.kitchen-heading h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.kitchen-heading p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.kitchen-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-main);
    flex-shrink: 0;
}

.kitchen-filter-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    min-height: 38px;
    padding: 7px 10px 7px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.kitchen-filter-btn b {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.68rem;
    background: rgba(100, 116, 139, 0.12);
    color: inherit;
}

.kitchen-filter-btn:hover {
    color: var(--text-main);
    background: rgba(100, 116, 139, 0.08);
}

.kitchen-filter-btn.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.2);
}

.kitchen-filter-btn.active b {
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.9);
}

.kitchen-locked-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--bg-main);
}

.kitchen-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    align-items: start;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.kitchen-ticket {
    min-width: 0;
    overflow: hidden;
    background: var(--sidebar-bg);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 20px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.kitchen-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.085);
}

.dark-mode .kitchen-ticket {
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
}

.kitchen-ticket-warning {
    border-color: rgba(245, 158, 11, 0.28);
}

.kitchen-ticket-late {
    border-color: rgba(239, 68, 68, 0.34);
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.075);
}

.kitchen-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 74px;
    padding: 13px 15px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.035));
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.kitchen-ticket-warning .kitchen-ticket-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.035));
}

.kitchen-ticket-late .kitchen-ticket-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.035));
}

.dark-mode .kitchen-ticket-header {
    border-bottom-color: rgba(255, 255, 255, 0.055);
}

.kitchen-table-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.kitchen-table-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.dark-mode .kitchen-table-icon {
    color: #6ee7b7;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.kitchen-table-icon svg {
    width: 19px;
    height: 19px;
}

.kitchen-table-block h3 {
    margin: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: -0.01em;
}

.kitchen-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 650;
}

.kitchen-ticket-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kitchen-ticket-meta svg {
    width: 12px;
    height: 12px;
}

.kitchen-ticket-age {
    min-width: 67px;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.1;
}

.kitchen-ticket-age span {
    display: block;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 650;
    margin-bottom: 3px;
}

.kitchen-ticket-age strong {
    font-size: 0.92rem;
    font-weight: 850;
    color: #059669;
}

.kitchen-ticket-age-warning strong {
    color: #d97706;
}

.kitchen-ticket-age-late strong {
    color: #dc2626;
}

.kitchen-ticket-body {
    display: flex;
    flex-direction: column;
}

.kitchen-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 70px;
    padding: 11px 13px;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.085);
}

.kitchen-item:last-child {
    border-bottom: 0;
}

.dark-mode .kitchen-item {
    border-bottom-color: rgba(255, 255, 255, 0.075);
}

.kitchen-item-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.kitchen-qty {
    flex: 0 0 auto;
    min-width: 38px;
    height: 30px;
    padding: 0 7px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, 0.11);
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 900;
}

.dark-mode .kitchen-qty {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
}

.kitchen-item-info {
    min-width: 0;
    flex: 1;
}

.kitchen-item-topline {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.kitchen-product-name {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.84rem;
    line-height: 1.3;
    font-weight: 780;
    overflow-wrap: anywhere;
}

.kitchen-type-badge {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 3px 6px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.52rem;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: 0.035em;
}

.kitchen-type-kitchen {
    background: #f97316;
}

.kitchen-type-bar {
    background: #7c3aed;
}

.kitchen-note {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 7px;
    padding: 7px 8px;
    border-radius: 9px;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    font-size: 0.7rem;
    line-height: 1.35;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.dark-mode .kitchen-note {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.kitchen-note svg {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    flex: 0 0 auto;
}

.kitchen-item-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.kitchen-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 23px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #047857;
    background: rgba(16, 185, 129, 0.09);
    font-size: 0.64rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.kitchen-time svg {
    width: 11px;
    height: 11px;
}

.kitchen-time-warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.11);
}

.kitchen-time-late {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.dark-mode .kitchen-time-fresh {
    color: #6ee7b7;
}

.dark-mode .kitchen-time-warning {
    color: #fcd34d;
}

.dark-mode .kitchen-time-late {
    color: #fca5a5;
}

.kitchen-ready-btn {
    min-width: 82px;
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.16);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.kitchen-ready-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.24);
}

.kitchen-ready-btn:active {
    transform: translateY(0) scale(0.98);
}

.kitchen-ready-btn svg {
    width: 14px;
    height: 14px;
}

.kitchen-empty-state {
    grid-column: 1 / -1;
    min-height: 330px;
    padding: 48px 24px;
    border: 1px dashed rgba(100, 116, 139, 0.22);
    border-radius: 22px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}

.kitchen-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.kitchen-empty-icon svg {
    width: 30px;
    height: 30px;
}

.kitchen-empty-state h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 850;
}

.kitchen-empty-state p {
    max-width: 390px;
    margin: 7px 0 0;
    font-size: 0.78rem;
    line-height: 1.55;
}

.kitchen-error-state .kitchen-empty-icon {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.kitchen-error-state .btn {
    margin-top: 16px;
}

@media (min-width: 1500px) {
    .kitchen-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 900px) {
    .kitchen-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .kitchen-filters {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .kitchen-filters::-webkit-scrollbar {
        display: none;
    }

    .kitchen-filter-btn {
        flex: 0 0 auto;
    }

    .kitchen-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    }
}

@media (max-width: 768px) {
    #kitchenView {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    }

    .kitchen-screen {
        gap: 10px;
    }

    .kitchen-toolbar {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .kitchen-heading {
        gap: 10px;
    }

    .kitchen-heading-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }

    .kitchen-heading-icon svg {
        width: 20px;
        height: 20px;
    }

    .kitchen-heading h2 {
        font-size: 1rem;
    }

    .kitchen-heading p {
        font-size: 0.7rem;
    }

    .kitchen-filters {
        margin: 0 -2px;
        padding: 3px;
        border-radius: 12px;
    }

    .kitchen-filter-btn {
        min-height: 36px;
        padding: 6px 9px;
        font-size: 0.72rem;
    }

    .kitchen-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .kitchen-ticket {
        border-radius: 16px;
    }

    .kitchen-ticket:hover {
        transform: none;
    }

    .kitchen-ticket-header {
        min-height: 66px;
        padding: 11px 12px;
    }

    .kitchen-table-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
    }

    .kitchen-table-block h3 {
        font-size: 0.92rem;
        max-width: 180px;
    }

    .kitchen-ticket-meta {
        font-size: 0.62rem;
        gap: 4px 8px;
    }

    .kitchen-item {
        padding: 10px 11px;
        min-height: 68px;
    }

    .kitchen-product-name {
        font-size: 0.8rem;
    }

    .kitchen-note {
        font-size: 0.67rem;
    }

    .kitchen-ready-btn {
        min-width: 78px;
        min-height: 36px;
    }

    .kitchen-empty-state {
        min-height: 260px;
        padding: 38px 20px;
    }
}

@media (max-width: 440px) {
    .kitchen-item {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .kitchen-item-side {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-left: 47px;
    }

    .kitchen-ready-btn {
        min-width: 108px;
        min-height: 40px;
    }

    .kitchen-ticket-age {
        min-width: 55px;
    }

    .kitchen-table-block h3 {
        max-width: 145px;
    }
}

/* ============================================================
   DESKTOP ADMIN SCROLL FIX
   Web tarafında iç içe scroll yerine .main-wrapper ana scroll alanıdır.
   Mobil davranışa dokunmaz.
   ============================================================ */
@media (min-width: 769px) {
    .main-wrapper {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior-y: auto;
        scrollbar-gutter: stable;
    }

    .page-view {
        min-width: 0;
        overflow: visible;
    }

    .settings-layout {
        overflow: visible;
        align-items: flex-start;
    }

    .settings-content {
        min-width: 0;
        max-height: none !important;
        overflow: visible !important;
    }

    .settings-sidebar {
        position: sticky;
        top: calc(var(--topbar-height) + 28px);
        max-height: calc(100vh - var(--topbar-height) - 52px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* =========================================================
   ÜST BAR KULLANICI KARTI — TEK SATIR + ROL İKONU
   ========================================================= */
.user-info,
.sidebar-hidden .user-info {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
}

.user-name,
.sidebar-hidden .user-name {
    font-weight: 800 !important;
    font-size: 0.76rem !important;
    line-height: 1.15 !important;
    letter-spacing: 0.25px !important;
    white-space: nowrap !important;
}

.user-role,
.sidebar-hidden .user-role {
    display: none !important;
}

.user-profile img,
.sidebar-hidden .user-profile img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    object-fit: contain !important;
    padding: 6px !important;
    border-radius: 12px !important;
    background: var(--accent-soft) !important;
    border: 1px solid rgba(16, 185, 129, 0.18) !important;
    box-shadow: none !important;
}

.dark-mode .user-profile img,
.dark-mode .sidebar-hidden .user-profile img {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.28) !important;
}

@media (max-width: 768px) {
    .user-name,
    .sidebar-hidden .user-name {
        font-size: 0.7rem !important;
        letter-spacing: 0.15px !important;
    }

    .user-profile img,
    .sidebar-hidden .user-profile img {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        padding: 5px !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 380px) {
    .user-name,
    .sidebar-hidden .user-name {
        font-size: 0.64rem !important;
    }
}
/* ALT KATEGORİLER - MASAÜSTÜNDE TEK SATIR */
@media (min-width: 769px) {
    #subCategoryTabs,
    .category-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 10px !important;
        padding: 4px 0 10px !important;
        scrollbar-width: none;
    }

    #subCategoryTabs::-webkit-scrollbar,
    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    #subCategoryTabs .category-tab-btn,
    .category-tabs .category-tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 10px 14px !important;
    }
}
