/* Tüm Siparişler grid görünümü — tüm liste tabloları */

.table-responsive:has(> .table-panel),
.table-responsive:has(> table.table-panel),
.pm-table-card,
.panel-card:has(.table-panel) > .table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    background: #eef2f6;
    border: 1px solid #c5ced8;
    padding: 0;
    box-shadow: none;
}

.pm-table-card > .pm-table-scroll {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    border: none;
    padding: 0;
    background: transparent;
}

.panel-card:has(> .table-responsive > .table-panel),
.panel-card:has(> .table-responsive > table.table-panel) {
    padding: 0.55rem;
    overflow: hidden;
    background: #fff;
}

.table.table-panel,
table.pm-table {
    margin: 0;
    width: 100%;
    background: #fff;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid #c5ced8;
    border-radius: 12px;
    overflow: hidden;
}

.table-responsive:has(> .table-panel) > .table.table-panel,
.table-responsive:has(> table.table-panel) > table.table-panel,
.pm-table-card table.pm-table {
    border: none;
}

.table.table-panel > :not(caption) > * > *,
table.pm-table > :not(caption) > * > * {
    box-shadow: none !important;
    background-color: transparent !important;
    border-bottom-width: 0 !important;
}

.table.table-panel thead th,
table.pm-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f6 46%, #d9e0e8 100%) !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #111;
    border-top: 1px solid #c5ced8;
    border-left: 0;
    border-bottom: 1px solid #c5ced8 !important;
    border-right: 1px solid #c5ced8 !important;
    padding: 0.72rem 0.8rem;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -1px 0 #c5ced8,
        0 2px 3px rgba(15, 23, 42, 0.12);
    vertical-align: middle;
}

.table.table-panel thead th:first-child,
table.pm-table thead th:first-child {
    border-top-left-radius: 12px;
    border-left: 1px solid #c5ced8;
}

.table.table-panel thead th:last-child,
table.pm-table thead th:last-child {
    border-top-right-radius: 12px;
    border-right: 1px solid #c5ced8 !important;
}

.table.table-panel tbody td,
table.pm-table tbody td {
    padding: 0.55rem 0.7rem;
    vertical-align: middle;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
    border-top: 0;
    border-left: 0;
    border-bottom: 1px dashed #c5ced8 !important;
    border-right: 1px solid #c5ced8 !important;
    background: #fff !important;
}

.table.table-panel tbody td:first-child,
table.pm-table tbody td:first-child {
    border-left: 1px solid #c5ced8;
}

.table.table-panel tbody td:last-child,
table.pm-table tbody td:last-child {
    border-right: 1px solid #c5ced8 !important;
}

.table.table-panel tbody tr:nth-child(odd) > td,
table.pm-table tbody tr:nth-child(odd) > td {
    background: #fff !important;
}

.table.table-panel tbody tr:nth-child(even) > td,
table.pm-table tbody tr:nth-child(even) > td {
    background: #e8eef4 !important;
}

.table.table-panel tbody tr:hover > td,
table.pm-table tbody tr.pm-row:hover > td,
table.pm-table tbody tr:hover > td {
    background: #fff7f2 !important;
}

.table.table-panel tbody tr:last-child > td,
table.pm-table tbody tr:last-child > td {
    border-bottom: 1px solid #c5ced8 !important;
}

.table.table-panel tbody tr:last-child > td:first-child,
table.pm-table tbody tr:last-child > td:first-child {
    border-bottom-left-radius: 12px;
}

.table.table-panel tbody tr:last-child > td:last-child,
table.pm-table tbody tr:last-child > td:last-child {
    border-bottom-right-radius: 12px;
}

.table.table-panel tbody td,
.table.table-panel tbody td strong,
.table.table-panel tbody td .small,
.table.table-panel tbody td .pm-clip,
.table.table-panel tbody td .pm-strong,
.table.table-panel tbody td .pm-sub,
.table.table-panel tbody td .pm-money,
table.pm-table tbody td,
table.pm-table tbody td strong,
table.pm-table tbody td .pm-clip,
table.pm-table tbody td .pm-strong,
table.pm-table tbody td .pm-sub,
table.pm-table tbody td .pm-money {
    color: #000;
    font-weight: 500;
}

.table.table-panel tbody td .text-muted,
table.pm-table tbody td .text-muted {
    color: #1f2937 !important;
    font-weight: 500;
}

.table.table-panel tbody td .text-danger,
table.pm-table tbody td .text-danger {
    color: #dc2626 !important;
}

.table.table-panel tbody td .text-success,
table.pm-table tbody td .text-success {
    color: #15803d !important;
}

/* Kaynak ikonu — Tüm Siparişler */
.table.table-panel .pm-source-cell,
.table.table-panel .order-source-cell,
table.pm-table .pm-source-cell {
    width: 56px;
    text-align: center;
}

.table.table-panel .pm-brand,
table.pm-table .pm-brand,
.table.table-panel .order-source-badge,
.table.table-panel .order-type-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
}

.table.table-panel .pm-brand i,
table.pm-table .pm-brand i,
.table.table-panel .order-source-badge i,
.table.table-panel .order-type-icon i {
    width: auto;
    height: auto;
    font-size: 1.28rem;
    line-height: 1;
}

.table.table-panel .pm-brand img,
table.pm-table .pm-brand img,
.table.table-panel .order-source-badge img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.table.table-panel .pm-brand.has-logo,
table.pm-table .pm-brand.has-logo,
.table.table-panel .order-source-badge.has-logo {
    background: #fff;
}

/* Durum — Tüm Siparişler hapı */
.table.table-panel .pm-status-cell,
.table.table-panel .order-status-cell,
table.pm-table .pm-status-cell {
    width: 11%;
    min-width: 132px;
    text-align: center;
    vertical-align: middle;
    padding: 0.35rem 0.4rem;
}

.table.table-panel .pm-status-line,
.table.table-panel .order-status-panel .status-stack,
table.pm-table .pm-status-line {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    width: 100%;
    gap: 0.35rem;
}

.table.table-panel .order-status-panel {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    animation: none !important;
}

.table.table-panel .order-status-select,
.table.table-panel .order-status-select.form-select,
.table.table-panel .order-status-badge,
.table.table-panel .order-status-pill,
.table.table-panel .day-order-status,
.table.table-panel .pm-status,
table.pm-table .order-status-select,
table.pm-table .order-status-select.form-select,
table.pm-table .order-status-badge,
table.pm-table .day-order-status,
table.pm-table .pm-status {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    box-sizing: border-box;
    padding: 0 1.4rem 0 0.4rem !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    color-scheme: light;
}

html.theme-dark .table-responsive:has(> .table-panel),
html.theme-dark .table-responsive:has(> table.table-panel),
html.theme-dark .pm-table-card,
html.theme-dark .panel-card:has(.table-panel) > .table-responsive {
    color-scheme: dark;
    background: #141c2b !important;
    border-color: #334155 !important;
}

.table.table-panel .order-status-badge,
.table.table-panel .order-status-pill,
.table.table-panel .pm-status,
table.pm-table .order-status-badge,
table.pm-table .pm-status {
    padding: 0 0.7rem !important;
}

.table.table-panel .order-status-select option,
table.pm-table .order-status-select option {
    color: #111 !important;
    background: #fff !important;
}

.table.table-panel .order-status-select.day-order-status.waiting,
.table.table-panel .order-status-badge.waiting,
.table.table-panel .order-status-pill.waiting,
.table.table-panel .day-order-status.waiting,
table.pm-table .order-status-select.day-order-status.waiting,
table.pm-table .order-status-badge.waiting,
table.pm-table .day-order-status.waiting { background-color: #FF8A00 !important; background: #FF8A00 !important; }

.table.table-panel .order-status-select.day-order-status.preparing,
.table.table-panel .order-status-badge.preparing,
.table.table-panel .order-status-pill.preparing,
.table.table-panel .day-order-status.preparing,
table.pm-table .order-status-select.day-order-status.preparing,
table.pm-table .order-status-badge.preparing,
table.pm-table .day-order-status.preparing { background-color: #FF5A1F !important; background: #FF5A1F !important; }

.table.table-panel .order-status-select.day-order-status.ready,
.table.table-panel .order-status-badge.ready,
.table.table-panel .order-status-pill.ready,
.table.table-panel .day-order-status.ready,
table.pm-table .order-status-select.day-order-status.ready,
table.pm-table .order-status-badge.ready,
table.pm-table .day-order-status.ready { background-color: #7C3AED !important; background: #7C3AED !important; }

.table.table-panel .order-status-select.day-order-status.ontheway,
.table.table-panel .order-status-badge.ontheway,
.table.table-panel .order-status-pill.ontheway,
.table.table-panel .day-order-status.ontheway,
table.pm-table .order-status-select.day-order-status.ontheway,
table.pm-table .order-status-badge.ontheway,
table.pm-table .day-order-status.ontheway { background-color: #2563EB !important; background: #2563EB !important; }

.table.table-panel .order-status-select.day-order-status.completed,
.table.table-panel .order-status-badge.completed,
.table.table-panel .order-status-pill.completed,
.table.table-panel .day-order-status.completed,
table.pm-table .order-status-select.day-order-status.completed,
table.pm-table .order-status-badge.completed,
table.pm-table .day-order-status.completed { background-color: #16A34A !important; background: #16A34A !important; }

.table.table-panel .order-status-select.day-order-status.cancelled,
.table.table-panel .order-status-badge.cancelled,
.table.table-panel .order-status-pill.cancelled,
.table.table-panel .day-order-status.cancelled,
table.pm-table .order-status-select.day-order-status.cancelled,
table.pm-table .order-status-badge.cancelled,
table.pm-table .day-order-status.cancelled { background-color: #EF4444 !important; background: #EF4444 !important; }

table.pm-table .pm-status.is-Pending { background: #FF8A00 !important; }
table.pm-table .pm-status.is-InPool { background: #1A2940 !important; }
table.pm-table .pm-status.is-Assigned { background: #0F766E !important; }
table.pm-table .pm-status.is-PickedUp { background: #7C3AED !important; }
table.pm-table .pm-status.is-OnTheWay { background: #2563EB !important; }
table.pm-table .pm-status.is-Delivered { background: #16A34A !important; }
table.pm-table .pm-status.is-Cancelled { background: #EF4444 !important; }

.table.table-panel .pm-status.is-wrap,
.table.table-panel .order-status-badge.is-wrap,
.table.table-panel .day-order-status.is-wrap,
table.pm-table .pm-status.is-wrap,
table.pm-table .order-status-badge.is-wrap,
table.pm-table .day-order-status.is-wrap {
    display: inline-block !important;
    height: auto !important;
    min-height: 30px;
    white-space: pre-line !important;
    line-height: 1.2 !important;
    padding: 0.32rem 0.55rem !important;
    overflow: visible;
    text-overflow: clip;
    border-radius: 12px !important;
    text-align: center;
}

.table.table-panel .logistics-shift-badge,
.table.table-panel .badge.bg-success-subtle,
.table.table-panel .badge.bg-warning-subtle,
.table.table-panel .badge.bg-danger-subtle,
.table.table-panel .badge.bg-secondary-subtle,
table.pm-table .logistics-shift-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 96px;
    padding: 0 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    border: 0;
}

.table.table-panel .badge.bg-success-subtle,
.table.table-panel .logistics-shift-badge.on {
    background: #16A34A !important;
    color: #fff !important;
}

.table.table-panel .badge.bg-warning-subtle {
    background: #FF8A00 !important;
    color: #fff !important;
}

.table.table-panel .badge.bg-danger-subtle {
    background: #EF4444 !important;
    color: #fff !important;
}

.table.table-panel .badge.bg-secondary-subtle,
.table.table-panel .logistics-shift-badge.off {
    background: #64748B !important;
    color: #fff !important;
}

.table.table-panel .text-brand,
table.pm-table .text-brand,
.table.table-panel .bg-brand-light,
table.pm-table .bg-brand-light {
    color: #000 !important;
}

.table.table-panel .bg-brand-light,
table.pm-table .bg-brand-light {
    background: #e8eef4 !important;
}

/* POS ürün / sepet tablolarına dokunma */
.table-pos-page .table-panel,
.table-pos-cart-table,
.market-pos-page .table-panel {
    border-radius: 0;
}

.table-pos-cart-table thead th,
.table-pos-cart-table tbody td {
    background: inherit !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* Dark mode grid lists — light rules above are unchanged */
html.theme-dark .panel-card:has(> .table-responsive > .table-panel),
html.theme-dark .panel-card:has(> .table-responsive > table.table-panel) {
    background: #141c2b !important;
}

html.theme-dark .table.table-panel,
html.theme-dark table.pm-table {
    background: #141c2b !important;
    border-color: #334155 !important;
}

html.theme-dark .table.table-panel thead th,
html.theme-dark table.pm-table thead th {
    background: linear-gradient(180deg, #1e293b 0%, #162033 100%) !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.theme-dark .table.table-panel tbody td,
html.theme-dark table.pm-table tbody td,
html.theme-dark .table.table-panel tbody tr:nth-child(odd) > td,
html.theme-dark table.pm-table tbody tr:nth-child(odd) > td {
    background: #141c2b !important;
    color: #e8eef4 !important;
    border-color: #334155 !important;
}

html.theme-dark .table.table-panel tbody tr:nth-child(even) > td,
html.theme-dark table.pm-table tbody tr:nth-child(even) > td {
    background: #121a28 !important;
    color: #e8eef4 !important;
    border-color: #334155 !important;
}

html.theme-dark .table.table-panel tbody tr:hover > td,
html.theme-dark table.pm-table tbody tr.pm-row:hover > td,
html.theme-dark table.pm-table tbody tr:hover > td {
    background: #1e293b !important;
}

html.theme-dark .table.table-panel tbody td,
html.theme-dark .table.table-panel tbody td *,
html.theme-dark .table.table-panel tbody td strong,
html.theme-dark .table.table-panel tbody td .small,
html.theme-dark .table.table-panel tbody td .pm-clip,
html.theme-dark .table.table-panel tbody td .pm-strong,
html.theme-dark .table.table-panel tbody td .pm-sub,
html.theme-dark .table.table-panel tbody td .pm-money,
html.theme-dark .table.table-panel tbody td .text-muted,
html.theme-dark .table.table-panel tbody td .text-brand,
html.theme-dark .table.table-panel tbody td .bg-brand-light,
html.theme-dark table.pm-table tbody td,
html.theme-dark table.pm-table tbody td *,
html.theme-dark table.pm-table tbody td strong,
html.theme-dark table.pm-table tbody td .pm-clip,
html.theme-dark table.pm-table tbody td .pm-strong,
html.theme-dark table.pm-table tbody td .pm-sub,
html.theme-dark table.pm-table tbody td .pm-money,
html.theme-dark table.pm-table tbody td .text-muted,
html.theme-dark table.pm-table tbody td .text-brand,
html.theme-dark table.pm-table tbody td .bg-brand-light,
html.theme-dark .all-orders-table.table-panel tbody td,
html.theme-dark .all-orders-table.table-panel tbody td *,
html.theme-dark .all-orders-table.table-panel tbody td strong,
html.theme-dark .all-orders-table.table-panel tbody td .text-muted,
html.theme-dark .all-orders-table.table-panel tbody td .small,
html.theme-dark .day-orders-table.table-panel tbody td,
html.theme-dark .day-orders-table.table-panel tbody td *,
html.theme-dark .day-orders-table.table-panel tbody td strong,
html.theme-dark .day-orders-table.table-panel tbody td .text-muted,
html.theme-dark .day-orders-table.table-panel tbody td .small,
html.theme-dark .orders-browse-page .table-panel tbody td,
html.theme-dark .orders-browse-page .table-panel tbody td *,
html.theme-dark .orders-browse-page .table-panel tbody td strong,
html.theme-dark .orders-browse-page .table-panel tbody td .text-muted,
html.theme-dark .orders-browse-page .table-panel tbody td .small,
html.theme-dark .dispatch-app .table-panel tbody td,
html.theme-dark .dispatch-app .table-panel tbody td *,
html.theme-dark .dispatch-app .table-panel tbody td strong,
html.theme-dark .dispatch-app .pm-table tbody td,
html.theme-dark .dispatch-app .pm-table tbody td *,
html.theme-dark .dispatch-app .pm-table tbody td strong,
html.theme-dark .restaurant-all-orders .pm-table tbody td,
html.theme-dark .restaurant-all-orders .pm-table tbody td *,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-clip,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-strong,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-sub,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-money,
html.theme-dark .restaurant-all-orders .pm-table tbody td .pm-prep {
    color: #e8eef4 !important;
}

html.theme-dark .table.table-panel tbody td .text-muted,
html.theme-dark table.pm-table tbody td .text-muted,
html.theme-dark .table.table-panel tbody td .small,
html.theme-dark table.pm-table tbody td .small,
html.theme-dark .all-orders-table.table-panel tbody td .text-muted,
html.theme-dark .day-orders-table.table-panel tbody td .text-muted,
html.theme-dark .orders-browse-page .table-panel tbody td .text-muted,
html.theme-dark .all-orders-table.table-panel tbody td .small,
html.theme-dark .day-orders-table.table-panel tbody td .small,
html.theme-dark .orders-browse-page .table-panel tbody td .small {
    color: #94a3b8 !important;
}

html.theme-dark .table.table-panel tbody td .text-danger,
html.theme-dark table.pm-table tbody td .text-danger {
    color: #f87171 !important;
}

html.theme-dark .table.table-panel tbody td .text-success,
html.theme-dark table.pm-table tbody td .text-success {
    color: #4ade80 !important;
}

html.theme-dark .table.table-panel tbody td .bg-brand-light,
html.theme-dark table.pm-table tbody td .bg-brand-light {
    background: #1e293b !important;
    color: #e8eef4 !important;
}

html.theme-dark .table.table-panel tbody td .order-status-select,
html.theme-dark .table.table-panel tbody td .order-status-badge,
html.theme-dark .table.table-panel tbody td .order-status-pill,
html.theme-dark .table.table-panel tbody td .day-order-status,
html.theme-dark .table.table-panel tbody td .pm-status,
html.theme-dark .table.table-panel tbody td .badge,
html.theme-dark .table.table-panel tbody td .pm-brand,
html.theme-dark .table.table-panel tbody td .order-source-badge,
html.theme-dark .table.table-panel tbody td .order-type-icon,
html.theme-dark table.pm-table tbody td .order-status-select,
html.theme-dark table.pm-table tbody td .order-status-badge,
html.theme-dark table.pm-table tbody td .day-order-status,
html.theme-dark table.pm-table tbody td .pm-status,
html.theme-dark table.pm-table tbody td .badge,
html.theme-dark table.pm-table tbody td .pm-brand {
    color: #fff !important;
}
