/* ==========================================================================
   DIAMOND KAFE POS — KONSEPT 2: ARTISAN ESPRESSO (SICAK KAHVE EVİ TASARIMI)
   Palet: Yulaf Kremi (#F7F2EA) · Kavrulmuş Espresso (#231914) · Bakır (#B8642B)
   ========================================================================== */

:root,
[data-theme="light"] {
    --font-heading: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Ana Marka ve Vurgu Tonları (Mat Bakır / Karamel) */
    --brand-primary: #b8642b;
    --brand-primary-hover: #964e1e;
    --brand-accent: #9a5220;
    --brand-soft-bg: #f5ece0;

    /* Durum Renkleri (Sakin, Göz Yormayan Doğal Tonlar) */
    --status-empty: #4a7c59;
    --status-empty-bg: #edf5f0;
    --status-empty-border: #c5ded0;
    --status-empty-text: #2f593c;

    --status-occupied: #a84320;
    --status-occupied-bg: #fdece6;
    --status-occupied-border: #e9bfb0;
    --status-occupied-text: #943718;

    --status-bill: #c67a1b;
    --status-bill-bg: #fff8eb;
    --status-bill-border: #eed39b;
    --status-bill-text: #8c520a;

    /* Zemin, Kart ve Çizgi Yüzeyleri */
    --pos-sidebar-bg: #231914;
    --pos-sidebar-fg: #faf6f0;
    --pos-bg: #f7f2ea;
    --pos-nav-bg: rgba(250, 246, 240, 0.96);
    --pos-surface: #ffffff;
    --pos-surface-card: #fcf9f5;
    --pos-surface-subtle: #efe7da;
    --pos-surface-input: #ffffff;
    --pos-border: #e6dccf;
    --pos-border-strong: #d5c7b4;
    --pos-text: #231914;
    --pos-text-muted: #78695e;

    /* Köşe Yuvarlaklıkları ve Yumuşak Gölgeler */
    --radius-card: 16px;
    --radius-btn: 11px;
    --radius-badge: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-panel: 0 2px 14px rgba(35, 25, 20, 0.04);
    --shadow-card: 0 1px 4px rgba(35, 25, 20, 0.04);
}

/* Opsiyonel Akşam / Gece Modu (Sıcak Koyu Espresso) */
[data-theme="dark"] {
    --brand-primary: #c97338;
    --brand-primary-hover: #b8642b;
    --brand-accent: #e08e55;
    --brand-soft-bg: rgba(201, 115, 56, 0.16);

    --status-empty: #529466;
    --status-empty-bg: rgba(82, 148, 102, 0.15);
    --status-empty-border: rgba(82, 148, 102, 0.35);
    --status-empty-text: #7bc490;

    --status-occupied: #d9653b;
    --status-occupied-bg: rgba(217, 101, 59, 0.15);
    --status-occupied-border: rgba(217, 101, 59, 0.40);
    --status-occupied-text: #f59c7d;

    --status-bill: #d99338;
    --status-bill-bg: rgba(217, 147, 56, 0.16);
    --status-bill-border: rgba(217, 147, 56, 0.45);
    --status-bill-text: #f7c37e;

    --pos-sidebar-bg: #140f0c;
    --pos-sidebar-fg: #f5efe8;
    --pos-bg: #1b1512;
    --pos-nav-bg: rgba(27, 21, 18, 0.96);
    --pos-surface: #241c18;
    --pos-surface-card: #2c231e;
    --pos-surface-subtle: #342923;
    --pos-surface-input: #1f1815;
    --pos-border: rgba(250, 246, 240, 0.08);
    --pos-border-strong: rgba(250, 246, 240, 0.16);
    --pos-text: #f5efe8;
    --pos-text-muted: #a8998e;

    --shadow-panel: 0 6px 22px rgba(0, 0, 0, 0.28);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   1. TEMEL TİPOGRAFİ VE ZEMİN
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--pos-bg);
    color: var(--pos-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pos-text);
}

/* ==========================================================================
   2. APP-SHELL İSKELETİ (SOL DİKEY ESPRESSO BAR + SAĞ ÇALIŞMA ALANI)
   ========================================================================== */
.artisan-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.artisan-sidebar {
    width: 78px;
    flex-shrink: 0;
    background-color: var(--pos-sidebar-bg);
    color: var(--pos-sidebar-fg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 18px 8px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1040;
}

.artisan-brand {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background-color: var(--brand-primary);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(184, 100, 43, 0.35);
    transition: transform 0.15s ease;
}

.artisan-brand:hover {
    transform: scale(1.05);
}

.artisan-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.artisan-nav-link {
    width: 62px;
    padding: 9px 4px;
    border-radius: 12px;
    color: rgba(250, 246, 240, 0.65) !important;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    transition: all 0.16s ease;
    text-align: center;
    line-height: 1.1;
}

.artisan-nav-link i {
    font-size: 1.2rem;
    color: inherit !important;
}

.artisan-nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.artisan-nav-link.active {
    color: #ffffff !important;
    background-color: rgba(184, 100, 43, 0.32);
    box-shadow: inset 0 0 0 1px rgba(184, 100, 43, 0.55);
}

.artisan-sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.artisan-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(250, 246, 240, 0.8) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.artisan-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.artisan-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(184, 100, 43, 0.28);
    border: 1px solid rgba(184, 100, 43, 0.6);
    color: #faf6f0;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artisan-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Mobil Ekranlarda Telefon Ergonomisi Uyumlaması */
@media (max-width: 991.98px) {
    .artisan-shell {
        flex-direction: column;
    }
    .artisan-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 8px 12px;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .artisan-sidebar::-webkit-scrollbar {
        display: none;
    }
    .artisan-brand {
        margin-bottom: 0;
        width: 34px;
        height: 34px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    .artisan-nav {
        flex-direction: row;
        width: auto;
        gap: 4px;
        flex-wrap: nowrap;
    }
    .artisan-nav-link {
        width: auto;
        padding: 6px 10px;
        flex-direction: row;
        gap: 5px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .artisan-nav-link i {
        font-size: 1rem;
    }
    .artisan-sidebar-bottom {
        flex-direction: row;
        width: auto;
        gap: 6px;
        flex-shrink: 0;
    }
    .artisan-icon-btn {
        width: 34px;
        height: 34px;
    }
    .artisan-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.76rem;
    }
    .artisan-main > .container-fluid {
        padding: 12px !important;
    }
}

/* ==========================================================================
   3. KASA APP-SHELL: TAM BOY ADİSYON ÇEKMECESİ VE MİNİMAL MASA KARTLARI
   ========================================================================== */
.pos-workspace {
    display: grid;
    grid-template-columns: 1fr 390px;
    min-height: 100vh;
}

@media (max-width: 1199.98px) {
    .pos-workspace {
        grid-template-columns: 1fr 340px;
    }
}

@media (max-width: 991.98px) {
    .pos-workspace {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.pos-floor-area {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pos-receipt-drawer {
    background-color: var(--pos-surface);
    border-left: 1px solid var(--pos-border);
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

@media (max-width: 991.98px) {
    .pos-receipt-drawer {
        height: auto;
        position: static;
        border-left: none;
        border-top: 1px solid var(--pos-border);
    }
}

/* Segment Filtre Kapsülü (Tümü | Salon | Bahçe | Teras) */
.artisan-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    background-color: var(--pos-surface-subtle);
    padding: 4px;
    border-radius: 13px;
}

.artisan-pill {
    border: none !important;
    background: transparent !important;
    color: var(--pos-text-muted) !important;
    padding: 6px 14px !important;
    border-radius: 9px !important;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.artisan-pill:hover {
    color: var(--pos-text) !important;
}

.artisan-pill.active {
    background-color: var(--pos-sidebar-bg) !important;
    color: var(--pos-sidebar-fg) !important;
    box-shadow: 0 2px 6px rgba(35, 25, 20, 0.14);
}

/* Kasa ve Garson Ekranlarında Aynı Boyutlu Masa Karoları (Sabit Sütun Genişliği) */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 176px);
    gap: 16px;
    justify-content: start;
}

@media (max-width: 575.98px) {
    .table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Masa Kartları: Kareye Yakın Oranlı Şık Karolar ve Net Durum Çerçeveleri */
.table-item,
.table-card {
    background-color: var(--pos-surface) !important;
    border: 2px solid var(--pos-border) !important;
    border-radius: 20px !important;
    padding: 16px !important;
    min-height: 138px;
    aspect-ratio: 1.18 / 1;
    box-shadow: 0 3px 10px rgba(35, 25, 20, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

@media (max-width: 575.98px) {
    .table-item,
    .table-card {
        aspect-ratio: auto;
        min-height: 118px;
        padding: 12px !important;
        border-radius: 16px !important;
    }
    .artisan-pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        scrollbar-width: none;
    }
    .artisan-pills::-webkit-scrollbar {
        display: none;
    }
    .artisan-pill {
        white-space: nowrap;
        padding: 6px 12px !important;
    }
}

.table-item:hover,
.table-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(35, 25, 20, 0.10);
}

/* 1. Boş Masa: Net Yeşil Çerçeve ve Ferah Zemin */
.table-item.border-success,
.table-card.border-success {
    border: 2px solid #22c55e !important;
    background: linear-gradient(160deg, #ffffff 45%, #f0fdf4 100%) !important;
}

[data-theme="dark"] .table-item.border-success,
[data-theme="dark"] .table-card.border-success {
    border: 2px solid #22c55e !important;
    background: linear-gradient(160deg, #241c18 45%, rgba(34, 197, 94, 0.15) 100%) !important;
}

/* 2. Dolu Masa: Net Kırmızı Çerçeve ve Sıcak Zemin */
.table-item.border-danger,
.table-card.border-danger {
    border: 2px solid #ef4444 !important;
    background: linear-gradient(160deg, #ffffff 40%, #fef2f2 100%) !important;
}

[data-theme="dark"] .table-item.border-danger,
[data-theme="dark"] .table-card.border-danger {
    border: 2px solid #ef4444 !important;
    background: linear-gradient(160deg, #241c18 40%, rgba(239, 68, 68, 0.18) 100%) !important;
}

/* 3. Hesap İsteyen Masa: Turuncu / Kehribar Çerçeve & Vurgu */
.table-item.border-warning,
.table-card.border-warning {
    border: 2.5px solid #f59e0b !important;
    background: linear-gradient(160deg, #fffbeb 30%, #fef3c7 100%) !important;
}

[data-theme="dark"] .table-item.border-warning,
[data-theme="dark"] .table-card.border-warning {
    border: 2.5px solid #f59e0b !important;
    background: linear-gradient(160deg, #241c18 30%, rgba(245, 158, 11, 0.24) 100%) !important;
}

/* 4. Garson Çağıran Masa: Mor / İndigo Çerçeve & Vurgu (Boş veya Dolu Üzerine Öncelikli) */
.table-item.pulse-waiter,
.table-card.pulse-waiter {
    border: 2.5px solid #8b5cf6 !important;
    background: linear-gradient(160deg, #faf5ff 30%, #ede9fe 100%) !important;
}

[data-theme="dark"] .table-item.pulse-waiter,
[data-theme="dark"] .table-card.pulse-waiter {
    border: 2.5px solid #a78bfa !important;
    background: linear-gradient(160deg, #241c18 30%, rgba(139, 92, 246, 0.26) 100%) !important;
}

/* Kasada Seçili Masa Vurgusu */
.table-item.selected-table {
    box-shadow: 0 0 0 3px rgba(35, 25, 20, 0.22), 0 8px 20px rgba(35, 25, 20, 0.12) !important;
    transform: translateY(-2px);
}

/* Masa İkon Yuvası */
.table-tile-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(35, 25, 20, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--pos-text-muted);
}

[data-theme="dark"] .table-tile-icon {
    background: rgba(255, 255, 255, 0.07);
}

/* Masa Durum Etiketleri */
.badge-empty {
    background-color: #dcfce7;
    color: #15803d;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

[data-theme="dark"] .badge-empty {
    background-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.badge-occupied {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

[data-theme="dark"] .badge-occupied {
    background-color: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
}

.badge-bill {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-waiter {
    background-color: #ede9fe;
    color: #6d28d9;
    border: 1px solid #c4b5fd;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Alt İnce Durum Çubuğu */
.artisan-statbar {
    background-color: var(--pos-surface-subtle);
    border-radius: 13px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* ==========================================================================
   4. MEVCUT BOOTSTRAP SINIFLARININ ARTISAN TEMAYA UYUMLANMASI
   ========================================================================== */
.glass-panel {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-panel);
}

.bg-black {
    background-color: var(--pos-surface-card) !important;
}

.bg-dark {
    background-color: var(--pos-surface) !important;
}

[data-theme="light"] .text-white,
[data-theme="light"] .text-light {
    color: var(--pos-text) !important;
}

[data-theme="light"] .text-secondary,
[data-theme="light"] .text-muted {
    color: var(--pos-text-muted) !important;
}

[data-theme="light"] .text-warning {
    color: var(--brand-primary) !important;
}

[data-theme="light"] .text-success {
    color: var(--status-empty) !important;
}

[data-theme="light"] .text-danger {
    color: var(--status-occupied) !important;
}

[data-theme="light"] .text-info {
    color: #3b6e8c !important;
}

[data-theme="light"] .border-secondary {
    border-color: var(--pos-border) !important;
}

[data-theme="light"] .table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #fcf9f5;
    --bs-table-hover-bg: #f7f2ea;
    --bs-table-color: #231914;
    --bs-table-border-color: #e6dccf;
    color: #231914 !important;
}

.table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--pos-text-muted) !important;
    border-bottom: 1px solid var(--pos-border) !important;
    padding-top: 10px;
    padding-bottom: 10px;
}

.table tbody td {
    border-bottom: 1px solid var(--pos-border) !important;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ==========================================================================
   STANDART ARTISAN MODAL & ONAY PENCERESİ TASARIM SİSTEMİ
   ========================================================================== */
.modal-backdrop.show {
    opacity: 1 !important;
    background-color: rgba(28, 20, 15, 0.52) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.fade .modal-dialog {
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-content,
[data-theme="light"] .modal-content,
[data-theme="dark"] .modal-content {
    background-color: var(--pos-surface) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border-strong) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 60px rgba(24, 16, 12, 0.28), 0 4px 16px rgba(24, 16, 12, 0.08) !important;
    overflow: hidden;
}

.modal-header {
    background-color: var(--pos-surface-card) !important;
    border-bottom: 1px solid var(--pos-border) !important;
    padding: 18px 24px !important;
    align-items: center;
}

.modal-header .modal-title {
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em;
    color: var(--pos-text) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background-color: var(--brand-soft-bg);
    color: var(--brand-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.modal-title-icon i {
    color: var(--brand-primary) !important;
}

.modal-header .btn-close {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 10px !important;
    background-color: var(--pos-surface-subtle) !important;
    background-size: 10px;
    opacity: 0.75;
    transition: all 0.15s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
    background-color: var(--pos-border-strong) !important;
}

[data-theme="light"] .btn-close-white {
    filter: none !important;
}

[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

.modal-body {
    padding: 22px 24px !important;
}

.modal-body .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-text-muted) !important;
    margin-bottom: 5px;
}

.modal-body :not(input):not(select):not(textarea).bg-black,
.modal-body :not(input):not(select):not(textarea).bg-dark {
    background-color: var(--pos-surface-card) !important;
    border-color: var(--pos-border) !important;
    border-radius: 14px !important;
}

.modal-footer {
    background-color: var(--pos-surface-card) !important;
    border-top: 1px solid var(--pos-border) !important;
    padding: 14px 24px !important;
    gap: 8px;
}

.modal-footer .btn {
    padding: 8px 20px !important;
    border-radius: 12px !important;
    font-size: 0.88rem;
}

/* Özel CafeModal Onay / Uyarı / Prompt Katmanı (Açık Modalların Üstünde de Çalışır) */
.cafe-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 109000;
    background-color: rgba(24, 16, 12, 0.56);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.cafe-dialog-backdrop.show {
    opacity: 1;
}

.cafe-dialog-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--pos-surface);
    color: var(--pos-text);
    border: 1px solid var(--pos-border-strong);
    border-radius: 24px;
    box-shadow: 0 28px 64px rgba(20, 12, 8, 0.34);
    padding: 28px 24px 22px;
    text-align: center;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cafe-dialog-backdrop.show .cafe-dialog-card {
    transform: scale(1) translateY(0);
}

.cafe-dialog-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    margin-bottom: 16px;
}

.cafe-dialog-icon.variant-primary {
    background-color: var(--brand-soft-bg);
    color: var(--brand-primary);
}

.cafe-dialog-icon.variant-success {
    background-color: var(--status-empty-bg);
    color: var(--status-empty);
}

.cafe-dialog-icon.variant-danger {
    background-color: var(--status-occupied-bg);
    color: #dc2626;
}

.cafe-dialog-icon.variant-warning {
    background-color: var(--status-bill-bg);
    color: #d97706;
}

.cafe-dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--pos-text);
    margin-bottom: 8px;
}

.cafe-dialog-message {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--pos-text-muted);
    margin-bottom: 22px;
}

.cafe-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cafe-dialog-actions.single-action {
    grid-template-columns: 1fr;
}

.cafe-dialog-actions .btn {
    padding: 10px 16px !important;
    border-radius: 13px !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control,
.form-select,
.input-group-text {
    background-color: var(--pos-surface-input) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border-strong) !important;
    border-radius: var(--radius-btn) !important;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(184, 100, 43, 0.14) !important;
}

.form-control::placeholder {
    color: var(--pos-text-muted) !important;
    opacity: 0.85 !important;
}

/* ==========================================================================
   5. BUTONLAR VE SEKMELER (SADE, RAFİNE KAHVE EVİ STİLİ)
   ========================================================================== */
.btn,
button:not(.btn-close) {
    border-radius: var(--radius-btn) !important;
    font-weight: 600;
    transition: all 0.15s ease;
}

/* Ana Bakır Buton */
.btn-cafe-primary,
.btn-warning {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--brand-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-cafe-primary *,
.btn-warning * {
    color: #ffffff !important;
}

.btn-cafe-primary:hover,
.btn-warning:hover {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
    color: #ffffff !important;
}

/* İkincil / Yumuşak Yulaf Butonlar */
.btn-outline-warning,
.btn-outline-secondary,
.btn-secondary,
.btn-outline-light,
.btn-outline-info {
    background-color: var(--pos-surface-subtle) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border) !important;
}

.btn-outline-warning:hover,
.btn-outline-warning.active,
.btn-outline-secondary:hover,
.btn-outline-light:hover,
.btn-outline-info:hover,
.btn-check:checked + .btn-outline-warning {
    background-color: var(--pos-sidebar-bg) !important;
    color: var(--pos-sidebar-fg) !important;
    border-color: var(--pos-sidebar-bg) !important;
}

.btn-outline-warning:hover *,
.btn-outline-warning.active *,
.btn-outline-info:hover * {
    color: var(--pos-sidebar-fg) !important;
}

/* Başarı ve Silme Butonları */
.btn-success {
    background-color: var(--status-empty) !important;
    color: #ffffff !important;
    border: 1px solid var(--status-empty) !important;
}
.btn-success * { color: #ffffff !important; }

.btn-outline-success {
    background-color: var(--status-empty-bg) !important;
    color: var(--status-empty-text) !important;
    border: 1px solid var(--status-empty-border) !important;
}
.btn-outline-success:hover,
.btn-check:checked + .btn-outline-success {
    background-color: var(--status-empty) !important;
    color: #ffffff !important;
    border-color: var(--status-empty) !important;
}
.btn-outline-success:hover *,
.btn-check:checked + .btn-outline-success * { color: #ffffff !important; }

.btn-outline-primary {
    background-color: var(--pos-surface-subtle) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border) !important;
}
.btn-check:checked + .btn-outline-primary {
    background-color: var(--pos-sidebar-bg) !important;
    color: #ffffff !important;
    border-color: var(--pos-sidebar-bg) !important;
}
.btn-check:checked + .btn-outline-primary * { color: #ffffff !important; }

.btn-danger {
    background-color: var(--status-occupied) !important;
    color: #ffffff !important;
    border: 1px solid var(--status-occupied) !important;
}
.btn-danger * { color: #ffffff !important; }

.btn-outline-danger {
    background-color: var(--status-occupied-bg) !important;
    color: var(--status-occupied-text) !important;
    border: 1px solid var(--status-occupied-border) !important;
}
.btn-outline-danger:hover,
.btn-check:checked + .btn-outline-danger {
    background-color: var(--status-occupied) !important;
    color: #ffffff !important;
    border-color: var(--status-occupied) !important;
}
.btn-outline-danger:hover *,
.btn-check:checked + .btn-outline-danger * { color: #ffffff !important; }

/* Kategori Sekmeleri (Nav Pills - Masaüstünde Alt Satıra Sarılır, Telefonda Parmakla Kaydırılır) */
.nav-pills {
    background-color: var(--pos-surface-subtle);
    padding: 6px;
    border-radius: 14px;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .nav-pills {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .nav-pills::-webkit-scrollbar {
        display: none;
    }
}

.nav-pills .nav-link {
    background: transparent !important;
    color: var(--pos-text-muted) !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 6px 12px !important;
    font-weight: 600;
    font-size: 0.81rem;
    white-space: nowrap;
}

.nav-pills .nav-link.active {
    background-color: var(--pos-sidebar-bg) !important;
    color: var(--pos-sidebar-fg) !important;
}
.nav-pills .nav-link.active * {
    color: var(--pos-sidebar-fg) !important;
}

/* Garson & Kasa Ürün Kartları */
.pos-menu-item-btn,
.btn-dark {
    background-color: var(--pos-surface-card) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border) !important;
    border-radius: 14px !important;
    transition: all 0.15s ease !important;
}

.pos-menu-item-btn:hover,
.btn-dark:hover {
    background-color: var(--brand-soft-bg) !important;
    border-color: var(--brand-primary) !important;
    transform: translateY(-1px);
}

/* Rozet Kontrastları (Açık Temada bg-dark / bg-black Rozetlerin Görünmez Olmasını Engeller) */
[data-theme="light"] .badge.bg-dark,
[data-theme="light"] .badge.bg-black {
    background-color: var(--pos-surface-subtle) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border-strong) !important;
}

[data-theme="light"] .badge.bg-danger:not(.bg-opacity-25):not(.bg-opacity-10),
[data-theme="light"] .badge.bg-success:not(.bg-opacity-25):not(.bg-opacity-10),
[data-theme="light"] .badge.bg-primary:not(.bg-opacity-25):not(.bg-opacity-10),
[data-theme="light"] .badge.bg-secondary:not(.bg-opacity-25):not(.bg-opacity-10) {
    color: #ffffff !important;
}

[data-theme="light"] .badge.bg-success.bg-opacity-25 {
    background-color: var(--status-empty-bg) !important;
    color: var(--status-empty-text) !important;
    border-color: var(--status-empty-border) !important;
}

[data-theme="light"] .badge.bg-danger.bg-opacity-25 {
    background-color: var(--status-occupied-bg) !important;
    color: var(--status-occupied-text) !important;
    border-color: var(--status-occupied-border) !important;
}

[data-theme="light"] .badge.bg-warning.bg-opacity-25,
[data-theme="light"] .badge.bg-warning.bg-opacity-10 {
    background-color: var(--status-bill-bg) !important;
    color: var(--status-bill-text) !important;
    border-color: var(--status-bill-border) !important;
}

[data-theme="light"] .badge.bg-primary.bg-opacity-25,
[data-theme="light"] .badge.bg-info.bg-opacity-25 {
    background-color: var(--pos-surface-subtle) !important;
    color: var(--pos-text) !important;
    border-color: var(--pos-border-strong) !important;
}

/* Animasyonlar: Dolu masa sabit, Hesap (Kehribar) ve Garson Çağrısı (Mor) canlı nabız */
.pulse-occupied { animation: none !important; }

@keyframes pulse-bill-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.28); }
}

@keyframes pulse-waiter-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
    50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.34); }
}

.pulse-bill { animation: pulse-bill-glow 2s infinite; }
.pulse-waiter { animation: pulse-waiter-glow 1.4s infinite !important; }

/* Bildirim Toast */
.pos-toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-toast {
    background: var(--pos-sidebar-bg);
    color: var(--pos-sidebar-fg);
    padding: 12px 16px;
    border-radius: 13px;
    box-shadow: 0 10px 26px rgba(35, 25, 20, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}
.pos-toast * { color: var(--pos-sidebar-fg) !important; }

/* Garson Mobil Alt Sabit Adisyon Çubuğu */
.waiter-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--pos-sidebar-bg);
    color: var(--pos-sidebar-fg);
    padding: 10px 16px;
    z-index: 1035;
    box-shadow: 0 -4px 18px rgba(35, 25, 20, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* 80mm Termal Fiş Yazdırma */
@media print {
    @page {
        margin: 0;
        size: 80mm auto;
    }
    html, body, body.modal-open {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    .artisan-sidebar, header, footer, nav, .pos-toast-container, .modal, .modal-backdrop {
        display: none !important;
    }
    body * {
        visibility: hidden !important;
    }
    #thermalReceiptArea,
    #thermalReceiptArea.d-none {
        display: block !important;
        visibility: visible !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 80mm !important;
        max-width: 100% !important;
        color: #000000 !important;
        background: #ffffff !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        padding: 5mm !important;
        z-index: 999999 !important;
    }
    #thermalReceiptArea * {
        visibility: visible !important;
        color: #000000 !important;
    }
}
