/* Ahenket — Bootstrap üzerine ek stiller (masa, adisyon, mutfak, tema) */

/* Navbar marka gradyanı */
.bg-gradient-ahenket {
  background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 45%, #152a45 100%) !important;
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.15rem;
}

.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.15s ease, color 0.15s ease;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Sol kenar menüsü (masaüstü + mobil offcanvas) */
.app-shell {
  width: 100%;
}

.app-sidebar {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Kenar menüsü: Bootstrap .nav-link.active / bg-white ile çakışmayı önlemek için özel sınıflar */
.app-sidebar-nav .app-sidebar-nav-link {
  transition: background 0.15s ease, color 0.15s ease;
  color: rgba(255, 255, 255, 0.9) !important;
  background-color: transparent !important;
  border: 0 !important;
}

.app-sidebar-nav .app-sidebar-nav-link:hover,
.app-sidebar-nav .app-sidebar-nav-link:focus,
.app-sidebar-nav .app-sidebar-nav-link:focus-visible {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Aktif sayfa — opaklık sabit rgba (bg-white bg-opacity-* ile oluşan beyaz blok hatası yok) */
.app-sidebar-nav .app-sidebar-nav-link.app-sidebar-nav-link--active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.app-sidebar-nav .app-sidebar-nav-link.app-sidebar-nav-link--active-sale {
  color: #fff8dc !important;
  background-color: rgba(255, 193, 7, 0.28) !important;
}

.offcanvas .app-sidebar-nav .app-sidebar-nav-link:hover,
.offcanvas .app-sidebar-nav .app-sidebar-nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Panel istatistik kartları */
.stat-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-card-primary {
  border-top: 3px solid var(--bs-primary) !important;
}

.stat-card-amber {
  border-top: 3px solid var(--bs-warning) !important;
}

/* Panel — hızlı işlemler kartı */
.dashboard-quick-card {
  border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

/* Giriş sayfası */
.auth-page {
  background: linear-gradient(160deg, #1a2f4a 0%, #0f1c2e 40%, #1a2744 100%);
  padding: 1rem;
}

.auth-card-bs {
  border-radius: 1rem;
  max-width: 420px;
}

.login-brand-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #3d6ea8 0%, #1e4a7a 100%);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .auth-page {
  background: linear-gradient(160deg, #0d1117 0%, #161b22 100%);
}

/* Eski özel sınıflar (adisyon / masa / mutfak) — Bootstrap ile birlikte */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.table-tile {
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-height: 100px;
  border: 2px solid var(--bs-border-color);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.table-tile .table-label {
  font-size: 1.35rem;
  font-weight: 700;
}

.table-tile .table-name {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.status-empty {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.45) !important;
}

.status-occupied {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.5) !important;
}

.status-reserved {
  background: rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.4) !important;
}

.status-bill_pending {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.35) !important;
}

.floor-section {
  margin-bottom: 1.5rem;
}

/* Adisyon */
.ticket-layout {
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 40vh;
  overflow-y: auto;
}

.product-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  cursor: pointer;
  text-align: left;
  min-height: 56px;
}

.product-btn .price {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.cat-tabs .tab {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

.cat-tabs .tab.active {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}

.totals-box {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bs-tertiary-bg);
  border-radius: 8px;
}

.total-line {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.badge-note {
  display: block;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.inline {
  display: inline;
}

/* Mutfak */
.kitchen-ticket {
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.kitchen-ticket .pkg {
  font-size: 0.85rem;
  background: var(--bs-info-bg-subtle);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  display: inline-block;
}

.kitchen-ticket .dine {
  font-size: 0.85rem;
  background: var(--bs-warning-bg-subtle);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  display: inline-block;
}

.kitchen-ticket h3 {
  font-size: 1.5rem;
  margin: 0.25rem 0;
}

.kitchen-ticket .note {
  font-size: 1.1rem;
  color: var(--bs-danger);
  font-weight: 600;
}

/* ——— Hızlı satış ekranı ——— */
html.qs-html-fs {
  height: 100%;
  overflow: hidden;
}

html.qs-html-fs body#app-body {
  height: 100%;
  max-height: 100%;
}

.qs-fs-body {
  background: var(--bs-body-bg);
}

.qs-fs-main {
  -webkit-overflow-scrolling: touch;
}

/* Nötr koyu gri / antrasit — mor yok */
.quick-sale-page {
  background: linear-gradient(155deg, #18181b 0%, #27272a 42%, #3f3f46 78%, #18181b 100%);
  color: #f4f4f5;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.22);
}

/* Tam ekran: kenar boşluğu yok, ayrı uygulama hissi */
.quick-sale-page--fs {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qs-inner--fs {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.qs-layout--fs {
  flex: 1 1 auto;
  min-height: 0;
}

.qs-layout--fs > [class*="col-"] {
  min-height: 0;
}

/* Tam ekran: orta sütun (masa / paket) yatayda kalan alanı ve dikeyde yüksekliği doldurur */
.quick-sale-page--fs .qs-layout--fs {
  align-items: stretch;
}

.quick-sale-page--fs .qs-panel--fs-main {
  min-height: 0;
}

.quick-sale-page--fs .qs-block-fill {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.quick-sale-page--fs .qs-grid-scroll {
  overflow-y: auto;
  min-height: 0;
  align-content: flex-start;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
  .quick-sale-page--fs .qs-layout--fs {
    min-height: calc(100dvh - 5.5rem);
  }

  /* Hızlı ekle: sütun yüksekliğini doldur, sabit vh tavanını kaldır */
  .quick-sale-page--fs .qs-quick-panel .qs-quick-products-scroll {
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.quick-sale-page .qs-panel {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  min-height: 280px;
}

.quick-sale-page .qs-panel-dark {
  background: linear-gradient(180deg, #0c0c0e 0%, #1c1c1f 100%);
  border-radius: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 280px;
}

.qs-side-actions .qs-pill {
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.qs-side-actions .qs-pill:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.qs-table-card {
  border-radius: 1rem !important;
  border: 2px solid transparent !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.qs-tc-open {
  background: #ecfdf5 !important;
  border-color: #34d399 !important;
}

.qs-tc-empty {
  background: #fff1f2 !important;
  border-color: #fda4af !important;
}

.qs-table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.35rem 0.85rem rgba(0, 0, 0, 0.12);
}

.qs-card-active {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.qs-product-tile {
  border-radius: 0.85rem !important;
  border: 1px solid var(--bs-border-color) !important;
  background: var(--bs-body-bg) !important;
}

.qs-product-tile:hover {
  border-color: var(--bs-primary) !important;
  background: rgba(13, 110, 253, 0.06) !important;
}

.qs-product-tile-dark {
  border-radius: 0.85rem !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.qs-product-tile-dark:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.qs-product-tile--img {
  flex-direction: column;
  align-items: stretch !important;
}

.qs-prod-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: 140px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(145deg, #f4f4f5, #e4e4e7);
}

.qs-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qs-prod-thumb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 96px;
  color: #a1a1aa;
  font-size: 2rem;
}

.qs-prod-thumb--sm {
  width: 48px;
  height: 48px;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.qs-prod-thumb--sm .qs-prod-thumb-ph {
  min-height: 0;
  font-size: 1.25rem;
}

/* Ürünler / Favoriler: küçük kare görseller, sıkı grid (yarım satır görünümünü azaltır) */
.qs-prod-thumb--grid {
  width: 100%;
  max-width: 4.25rem;
  height: 4.25rem;
  margin-left: auto;
  margin-right: auto;
  max-height: none;
  aspect-ratio: 1;
  border-radius: 0.45rem;
}

@media (min-width: 576px) {
  .qs-prod-thumb--grid {
    max-width: 4.75rem;
    height: 4.75rem;
  }
}

.qs-prod-thumb--grid .qs-prod-thumb-ph {
  min-height: 0;
  font-size: 1.2rem;
}

.qs-product-tile--grid {
  min-height: 0;
}

.qs-product-tile--grid .qs-prod-name {
  font-size: 0.68rem;
  line-height: 1.25;
  max-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

@media (min-width: 576px) {
  .qs-product-tile--grid .qs-prod-name {
    font-size: 0.72rem;
  }
}

.qs-product-tile--grid .qs-prod-price {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
}

@media (min-width: 576px) {
  .qs-product-tile--grid .qs-prod-price {
    font-size: 0.75rem;
  }
}

/* Tam ekran: ürün listesi paneli dikeyde dolar, içeride kayar */
.quick-sale-page--fs #qs-panel-urunler .qs-product-scroll--main,
.quick-sale-page--fs #qs-panel-favoriler .qs-product-scroll--main {
  max-height: none !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.qs-action-stack .btn {
  font-size: 0.8rem;
  line-height: 1.25;
  padding: 0.5rem 0.65rem;
}

@media (min-width: 992px) {
  .qs-action-stack .btn {
    font-size: 0.875rem;
  }
}

/* Mobil alt dock */
.qs-mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: linear-gradient(180deg, #18181b 0%, #0c0c0e 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}

.qs-mobile-dock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.qs-mobile-dock-actions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.25rem;
}

.qs-mobile-dock-actions .btn-link {
  font-size: 0.7rem;
  max-width: 4.5rem;
}

.qs-mobile-dock-spacer {
  height: calc(168px + env(safe-area-inset-bottom, 0));
}

.qs-mobile-dock-print .btn {
  min-height: 2.25rem;
}

@media (min-width: 992px) {
  .qs-mobile-dock,
  .qs-mobile-dock-spacer {
    display: none !important;
  }
}

.qs-cart-panel {
  padding-bottom: 0.25rem;
}

@media (max-width: 991.98px) {
  .quick-sale-page .qs-panel {
    min-height: 0;
  }

  .qs-product-scroll {
    max-height: none;
  }

  /* Dar ekran: gömülü (tam ekran değil) hızlı satışta ürün listesine tavan */
  .quick-sale-page:not(.quick-sale-page--fs) #qs-product-list {
    max-height: min(55vh, 480px);
    overflow-y: auto;
    padding-bottom: 0.25rem;
  }

  .qs-inner--fs {
    padding-bottom: 0.5rem;
  }
}

.qs-product-scroll {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Hızlı ekle sütunu: genel .qs-product-scroll tavanını aş (tam ekranda flex ile dolar) */
.qs-quick-products-scroll {
  max-height: min(60vh, 560px);
}

.qs-lines {
  min-height: 120px;
  max-height: 38vh;
  overflow-y: auto;
  overflow-x: visible;
}

#qs-cart-column {
  min-width: min(100%, 300px);
}

.qs-line .d-flex {
  flex-wrap: nowrap;
}

.qs-line-remove {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -0.1rem;
}

.qs-qty-grp .btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.qs-qty-grp .qs-qty-lbl {
  pointer-events: none;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .qs-lines {
    max-height: min(36vh, 280px);
  }
}

.qs-seg .btn.active {
  font-weight: 600;
}

[data-bs-theme="dark"] .quick-sale-page .qs-panel {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* Garson mobil hızlı sipariş */
.waiter-sale {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.waiter-sale .ws-tables-intro-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, color-mix(in srgb, var(--bs-primary) 75%, #000) 100%);
  color: #fff;
  font-size: 1.1rem;
}

.waiter-sale .ws-table-card {
  touch-action: manipulation;
  min-height: 7.25rem;
  border: none;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  background: var(--bs-body-bg);
}

.waiter-sale .ws-table-card:hover {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1);
}

.waiter-sale .ws-table-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--bs-primary) 45%, transparent);
  outline-offset: 2px;
}

.waiter-sale .ws-table-card:active {
  transform: scale(0.98);
}

.waiter-sale .ws-table-card--free .ws-table-card-inner {
  border: 1px solid var(--bs-border-color);
  border-radius: inherit;
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, color-mix(in srgb, var(--bs-tertiary-bg) 65%, var(--bs-body-bg)) 100%);
}

.waiter-sale .ws-table-card--open .ws-table-card-inner {
  border: 1px solid color-mix(in srgb, var(--bs-success) 45%, var(--bs-border-color));
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bs-success) 14%, var(--bs-body-bg)) 0%, var(--bs-body-bg) 55%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bs-success) 12%, transparent);
}

.waiter-sale .ws-table-card-num {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bs-emphasis-color);
}

.waiter-sale .ws-table-card--open .ws-table-card-num {
  color: var(--bs-success-text-emphasis);
}

.waiter-sale .ws-table-card-ico {
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  background: color-mix(in srgb, var(--bs-secondary) 12%, transparent);
  color: var(--bs-secondary-color);
}

.waiter-sale .ws-table-card--open .ws-table-card-ico {
  background: color-mix(in srgb, var(--bs-success) 18%, transparent);
  color: var(--bs-success);
}

.waiter-sale .ws-table-card-foot {
  border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--bs-tertiary-bg) 40%, transparent);
}

.waiter-sale .ws-table-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.waiter-sale .ws-table-status--free {
  color: var(--bs-secondary-color);
}

.waiter-sale .ws-table-status--open {
  color: var(--bs-success-text-emphasis);
}

[data-bs-theme="dark"] .waiter-sale .ws-table-card {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .waiter-sale .ws-table-card:hover {
  box-shadow: 0 0.4rem 1.1rem rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .waiter-sale .ws-table-card--free .ws-table-card-inner {
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, color-mix(in srgb, var(--bs-body-bg) 88%, #fff) 100%);
}

.waiter-sale .ws-product-tile {
  touch-action: manipulation;
  background: var(--bs-body-bg);
}

.waiter-sale .ws-product-tile:active {
  transform: scale(0.98);
}

.waiter-sale .ws-prod-thumb img {
  object-fit: cover;
}

.waiter-sale-bottomnav {
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 1040;
}

/* Garson: menüdeyken de görünen canlı adisyon özeti (mobil, alt sekmenin üstü) */
.ws-live-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(3.35rem + env(safe-area-inset-bottom, 0px));
  z-index: 1035;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ws-live-dock-inner {
  background: transparent !important;
}

.ws-live-dock .btn-link:focus {
  box-shadow: none;
}

.waiter-sale .ws-hero-totals--pulse {
  animation: wsHeroPulse 0.55s ease-out;
}

@keyframes wsHeroPulse {
  0% {
    box-shadow: inset 0 0 0 2px var(--bs-primary);
  }
  100% {
    box-shadow: inset 0 0 0 0 transparent;
  }
}

.waiter-sale .ws-mobile-scroll-spacer {
  height: calc(7.75rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 992px) {
  .ws-live-dock {
    display: none !important;
  }

  .waiter-sale .ws-mobile-scroll-spacer {
    height: 0;
  }
}

.waiter-sale .ws-lines {
  max-height: min(50vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media print {
  .navbar,
  .app-sidebar,
  .app-topbar-mobile,
  .offcanvas,
  footer.border-top,
  .app-layout-footer,
  .waiter-sale-bottomnav,
  #theme-toggle {
    display: none !important;
  }

  .app-shell,
  .app-main-wrap {
    display: block !important;
  }

  .container-fluid {
    max-width: none !important;
    padding: 0 !important;
  }
}
