/* ==========================================================================
   Pendik İş Merkezi Çay Ocağı PWA — Mobile-First Responsive Stylesheet
   ========================================================================== */

:root {
  --primary: #102b35;
  --primary-dark: #0a1f26;
  --primary-light: #1b424f;
  --primary-soft: #e7eff1;
  --accent: #cf844e;
  --accent-hover: #bd7444;
  --accent-soft: #faeee4;
  --bg-app: #f5f6f3;
  --bg-card: #ffffff;
  --text-main: #1c3038;
  --text-muted: #697c82;
  --text-subtle: #8e9fa3;
  --border-subtle: #e2e8e4;
  --border-focus: #cf844e;
  --success: #286653;
  --success-bg: #e5f5ed;
  --warning: #986b1b;
  --warning-bg: #fff5df;
  --danger: #a54431;
  --danger-bg: #fff0ea;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --safe-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  --safe-top: max(8px, env(safe-area-inset-top, 0px));
}

/* Base reset & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100dvh;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-size: 14px;
  line-height: 1.45;
}

/* Critical iOS Safari rule: form inputs must be at least 16px to prevent viewport auto-zoom */
button, input, select, textarea {
  font-family: inherit;
  font-size: 16px;
}

input, select, textarea {
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  border: 0;
  background: transparent;
  color: inherit;
  user-select: none;
  -webkit-user-select: none;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* App Shell (Mobile default) */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Desktop sidebar hidden on mobile */
.sidebar {
  display: none;
}

/* Main Area */
.main {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Top bar (mobile optimized with safe area) */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(env(safe-area-inset-top, 0px) + 4px) 12px 4px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--primary);
  line-height: 1.15;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-date-pill {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: #eef2f0;
  color: #45605d;
}

.status.ok {
  color: var(--success);
  background: var(--success-bg);
}

.status.off {
  color: var(--danger);
  background: var(--danger-bg);
}

.status.warn {
  color: var(--warning);
  background: var(--warning-bg);
}

.status.neutral {
  color: #38565b;
  background: #e5eceb;
}

/* Bekleyen işlem varken çip aynı zamanda "şimdi eşitle" düğmesidir (ayrı Eşitle düğmesi yer kaplamaz) */
.status-btn {
  border: 0;
  min-height: 30px;
  cursor: pointer;
  touch-action: manipulation;
}

.status-btn:active {
  filter: brightness(0.95);
}

.dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* Main content padding accounts for bottom navigation and cart bar */
.content {
  padding: 12px 14px calc(76px + var(--safe-bottom));
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.content.has-cart-bar {
  padding-bottom: calc(142px + var(--safe-bottom));
}

/* Section Header */
.sectionhead {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}

.sectionhead-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sectionhead h2 {
  margin: 2px 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--primary);
}

.sectionhead p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Buttons */
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 750;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(207, 132, 78, 0.22);
  min-height: 44px;
  text-align: center;
  touch-action: manipulation;
  transition: transform 0.1s ease, background 0.15s ease;
}

.primary:active {
  background: var(--accent-hover);
  transform: scale(0.98);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--primary);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  min-height: 44px;
  touch-action: manipulation;
}

.secondary:active {
  background: #f0f3f1;
}

.btn-small {
  border: 0;
  background: #eaf0ec;
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  min-height: 32px;
}

.link-btn, .inline-link {
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  padding: 8px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
}

.full {
  width: 100%;
}

/* Badges */
.badge {
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  border-radius: 20px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge.light {
  background: #f2f3ee;
  color: #796d55;
}

.badge.success {
  background: var(--success-bg);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.muted {
  background: #edf0ee;
  color: #55676a;
}

/* Notice Banner */
.notice-banner {
  border: 1px solid #d9e4dd;
  border-radius: var(--radius-md);
  background: #eef5f0;
  color: #2b5446;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.notice-banner.orange {
  background: #fff4e5;
  border-color: #f7ddb2;
  color: #8c5b16;
}

/* Mobilde dar, kaydırmayla kaybolan uyarı şeridi (içerik yukarıya itilmez) */
.notice-banner.compact {
  margin: 8px 12px 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Panels & Cards */
.panel {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  min-width: 0;
  box-shadow: 0 1px 4px rgba(16, 43, 53, 0.03);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.panel-title h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 2px 0 0;
  color: var(--primary);
}

/* ==========================================================================
   Sipariş Ekranı (Mobile-First Order Screen)
   ========================================================================== */

.orders-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 1. Üst Müşteri Seçim Bölümü */
.customer-card-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(16, 43, 53, 0.03);
}

/* Arama alanı + "Yeni" düğmesi tek satırda */
.customer-search-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.customer-search-row .customer-search-autocomplete {
  flex: 1;
  min-width: 0;
}

.customer-add-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid #f2ceb3;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  touch-action: manipulation;
}

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

.customer-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.customer-pills::-webkit-scrollbar {
  display: none;
}

.customer-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: #f7f9f7;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  touch-action: manipulation;
}

.customer-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.customer-active-banner {
  background: #f4f8f6;
  border: 1px solid #dbe6e0;
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.customer-active-info {
  flex: 1 1 140px;
  min-width: 0;
}

.customer-active-info strong {
  display: block;
  font-size: 14px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-active-info small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-active-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.customer-change-btn {
  min-height: 38px;
  padding: 4px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.repeat-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #f2ceb3;
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 750;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Müşteri Arama & Autocomplete Bileşeni */
.customer-search-autocomplete {
  position: relative;
  width: 100%;
}

.customer-search-input-wrap {
  position: relative;
  width: 100%;
}

.customer-search-input-wrap input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 36px;
  min-height: 44px;
  color: var(--text-main);
  font-size: 16px; /* iOS Safari otomatik zoom yapmasını engeller */
  outline: none;
  box-shadow: 0 1px 3px rgba(16, 43, 53, 0.03);
}

.customer-search-input-wrap input:focus {
  border-color: var(--border-focus);
}

.customer-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px 8px;
  color: var(--text-subtle);
  font-size: 14px;
  cursor: pointer;
  min-height: auto;
  line-height: 1;
}

.customer-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(16, 43, 53, 0.12);
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.customer-suggestion-item {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f3f1;
  cursor: pointer;
  min-height: 44px; /* iPhone dokunma hedefi min 44px */
  text-align: left;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  transition: background 0.15s ease;
}

.customer-suggestion-item:last-child {
  border-bottom: none;
}

.customer-suggestion-item:active,
.customer-suggestion-item.highlighted {
  background: #f0f5f3;
}

.customer-suggestion-item.selected {
  background: #e6f4ea;
  border-left: 3px solid var(--primary);
}

.customer-suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.customer-suggestion-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-suggestion-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.customer-suggestion-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 8px;
}

.customer-no-results {
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* 2. Orta Bölüm: Arama ve Kategoriler */
.order-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-and-menu-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.search-and-menu-bar .search-input-wrap {
  flex: 1;
  min-width: 0;
}

.menu-edit-trigger-btn {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
  padding: 10px 14px;
  min-height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input-wrap input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  min-height: 44px;
  color: var(--text-main);
  font-size: 16px; /* Prevents iOS auto-zoom */
  outline: none;
  box-shadow: 0 1px 3px rgba(16, 43, 53, 0.03);
}

.search-input-wrap input:focus {
  border-color: var(--border-focus);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-subtle);
  pointer-events: none;
}

.category-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

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

.category {
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  touch-action: manipulation;
}

.category.selected {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

/* Günlük Menü Düzenleyici */
.menu-editor {
  background: #f7faf7;
  border: 1px solid #dde7df;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
}

.menu-editor-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.menu-editor-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-switch {
  border: 1px solid #c8dfcc;
  background: #e7f4ea;
  color: #336f4c;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
}

.menu-switch.is-off {
  background: #f9eae3;
  border-color: #e9cfc0;
  color: #aa6246;
}

/* 3. Büyük Dokunmatik Ürün Kartları */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 10px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 84px;
  min-width: 0;
  text-align: left;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s ease, border-color 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 1px 4px rgba(16, 43, 53, 0.03);
}

.product-card:active {
  transform: scale(0.975);
  background-color: #fafcfb;
}

.product-card.in-cart {
  border-color: #dfba9f;
  background: #fffcf9;
}

.product-name {
  font-size: 15px;
  font-weight: 750;
  color: var(--primary);
  line-height: 1.25;
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.product-price {
  font-size: 15px;
  font-weight: 850;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.product-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #edf3ef;
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 750;
  flex-shrink: 0;
}

/* Sepetteki ürünün adet kontrolü: kartın tam genişliği, 40px yükseklik (başparmakla rahat) */
.product-stepper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  background: #f0f4f2;
  border-radius: 10px;
  padding: 3px;
}

.product-stepper button {
  min-height: 40px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  touch-action: manipulation;
}

.product-stepper button:active {
  background: #e6ede9;
}

.product-qty {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  min-width: 46px;
  text-align: center;
  white-space: nowrap;
}

.product-grid-empty {
  grid-column: 1 / -1;
}

/* Menü yönetimi ekranındaki kategori simgesi */
.product-symbol {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f4efe6;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Mobil Sabit Sepet Özeti Çubuğu (Sticky Bottom Bar)
   ========================================================================== */
.cart-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(56px + var(--safe-bottom));
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 45;
  box-shadow: 0 6px 20px rgba(10, 31, 38, 0.35);
  animation: slideUpBar 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpBar {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.cart-bar-badge {
  background: #254b56;
  color: #ffffff;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-bar-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cart-bar-total {
  font-size: 17px;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.cart-bar-customer {
  font-size: 11px;
  color: #a8c1c4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-bar-view-btn {
  background: #20414b;
  color: #e3eff1;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-bar-save-btn {
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
  box-shadow: 0 2px 8px rgba(207, 132, 78, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cart-bar-save-btn:active {
  background: var(--accent-hover);
}

/* ==========================================================================
   Mobil Alt Sepet Paneli (Bottom Sheet)
   ========================================================================== */
.cart-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 38, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-sheet {
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  padding: 12px 16px var(--safe-bottom);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  animation: sheetUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #d5deda;
  border-radius: 4px;
  margin: 0 auto 10px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sheet-head h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  color: var(--primary);
}

.sheet-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f3f1;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.sheet-scroll-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f1;
}

.cart-row-info {
  flex: 1;
  min-width: 0;
}

.cart-row-info strong {
  display: block;
  font-size: 13px;
  color: var(--primary);
  word-break: break-word;
}

.cart-row-info small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-row-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f6f4;
  border-radius: var(--radius-sm);
  padding: 2px;
}

.cart-row-stepper button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cart-row-stepper span {
  font-size: 13px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

.cart-row-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
}

.cart-sheet-foot {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.cart-total-row span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

.cart-total-row strong {
  font-size: 22px;
  font-weight: 850;
  color: var(--primary);
}

/* Desktop Cart Panel (Hidden on mobile) */
.cart-panel-desktop {
  display: none;
}

/* ==========================================================================
   Form Stacks & Inputs
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  color: #4b6066;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 16px; /* Must be 16px for iOS */
  outline: none;
  min-height: 44px;
  transition: border-color 0.15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--border-focus);
}

.field textarea {
  resize: vertical;
  min-height: 64px;
}

.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697c82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   Genel Bakış Ekranı (Home Overview)
   ========================================================================== */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  box-shadow: 0 1px 3px rgba(16, 43, 53, 0.03);
}

.metric.emphasis {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.metric.emphasis .metric-top {
  color: #adc6c9;
}

.metric-top i {
  font-style: normal;
  color: var(--accent);
  font-size: 16px;
}

.metric strong {
  display: block;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.5px;
  margin: 12px 0 4px;
  word-break: break-word;
}

.metric small {
  font-size: 10px;
  color: var(--text-subtle);
  line-height: 1.3;
}

.metric.emphasis small {
  color: #9cbabb;
}

.home-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-row, .list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0f3f1;
  padding: 10px 0;
}

.alert-row:last-child, .list-row:last-child {
  border-bottom: 0;
}

.alert-row > span {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-row strong, .list-row strong {
  display: block;
  font-size: 12px;
  color: var(--primary);
}

.alert-row small, .list-row small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.mini-icon {
  display: grid;
  place-items: center;
  background: #eaf1ed;
  color: var(--success);
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  font-size: 16px;
}

.mini-icon.teal {
  background: #e8f0f2;
  color: #1a5b67;
}

.grow {
  flex: 1;
  min-width: 0;
}

.rowright {
  text-align: right;
  flex-shrink: 0;
}

.rowright strong {
  display: block;
  font-size: 13px;
}

.big-number {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.5px;
  color: var(--primary);
  margin: 12px 0 8px;
}

.subtle {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.caution {
  color: #a46d26;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick {
  background: #f7f9f7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  font-weight: 750;
  font-size: 13px;
  color: var(--primary);
  text-align: left;
  min-height: 48px;
  touch-action: manipulation;
}

.quick:active {
  background: #eef2ef;
}

/* ==========================================================================
   Adisyonlar Ekranı (Tabs)
   ========================================================================== */
.tab-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
  background: #ffffff;
}

.tab-summary {
  width: 100%;
  border: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  min-height: 52px;
  touch-action: manipulation;
}

.tab-summary:active {
  background: #f7faf8;
}

.tab-summary .grow strong {
  font-size: 13px;
  color: var(--primary);
  display: block;
}

.tab-summary .grow small, .tab-money small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.tab-money {
  text-align: right;
  flex-shrink: 0;
}

.tab-money strong {
  font-size: 14px;
  color: var(--accent);
}

.chev {
  font-size: 16px;
  color: var(--text-subtle);
}

.tab-expand {
  padding: 0 14px 14px;
  background: #fafbfa;
  border-top: 1px solid var(--border-subtle);
}

.tab-details {
  padding: 10px 0;
}

.tab-order {
  display: grid;
  grid-template-columns: 46px 1fr 70px;
  gap: 8px;
  padding: 8px 0;
  font-size: 11px;
  border-bottom: 1px solid #f0f3f1;
}

.tab-order:last-child {
  border-bottom: 0;
}

.tab-order span {
  color: var(--text-muted);
}

.tab-order strong {
  color: var(--primary);
}

.tab-order > span:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--primary);
}

.tab-receipt {
  display: flex;
  justify-content: space-between;
  background: #edf3f0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11px;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-receipt span b {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.tab-receipt .outstanding {
  color: var(--accent);
}

.pay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.pay-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==========================================================================
   Cari Hesap & Finans Mobil Kartları (Mobile Cards instead of Wide Tables)
   ========================================================================== */
.customer-cards-list, .expense-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-mobile-card, .expense-mobile-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(16, 43, 53, 0.03);
}

.customer-card-header, .expense-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.customer-card-name strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.customer-card-name small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.customer-card-balance {
  text-align: right;
  flex-shrink: 0;
}

.customer-card-balance span {
  display: block;
  font-size: 10px;
  color: var(--text-subtle);
  font-weight: 700;
  text-transform: uppercase;
}

.customer-card-balance strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
  color: var(--accent);
}

.customer-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0f3f1;
  padding-top: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-due-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.customer-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.expense-mobile-card .expense-amount {
  font-size: 15px;
  font-weight: 850;
  color: var(--primary);
}

/* Empty states */
.empty {
  color: var(--text-subtle);
  text-align: center;
  font-size: 13px;
  padding: 36px 12px;
  line-height: 1.6;
}

.empty.small {
  padding: 20px 10px;
}

/* ==========================================================================
   Mobil Alt Navigasyon (Bottom Navigation Bar)
   ========================================================================== */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  box-shadow: 0 -4px 18px rgba(16, 43, 53, 0.08);
}

.bottomnav button {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: 0;
  color: #7d9095;
  padding: 4px;
  touch-action: manipulation;
  transition: color 0.12s ease;
}

.bottomnav button.active {
  color: var(--accent);
  font-weight: 800;
}

.bottomnav button span {
  font-size: 20px;
  line-height: 20px;
}

.bottomnav button small {
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

/* Toast Notifications */
#toast-host {
  position: relative;
  z-index: 1000;
}

.toast {
  position: fixed;
  bottom: calc(66px + var(--safe-bottom));
  left: 14px;
  right: 14px;
  background: #173640;
  color: #ffffff;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 650;
  z-index: 1000;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(10, 31, 38, 0.4);
  line-height: 1.4;
  animation: slideToast 0.2s ease-out;
}

@keyframes slideToast {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 38, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 70;
  padding: 16px;
}

.modal {
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--primary);
}

.icon-button {
  border: 0;
  background: #f0f3f1;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* Login screen */
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0c2832, #24464d);
  padding: 20px;
}

.login-card {
  background: #ffffff;
  padding: 28px 22px;
  border-radius: var(--radius-xl);
  width: min(400px, 100%);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
}

.login-logo {
  width: 52px;
  height: 52px;
  background: #f7ebe0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 26px;
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: 23px;
  margin: 6px 0;
  color: var(--primary);
}

.login-card > p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-card form {
  margin: 20px 0 6px;
}

.fatal, .boot {
  margin: 20vh auto;
  padding: 24px;
  max-width: 440px;
  text-align: center;
}

/* ==========================================================================
   Masaüstü & Tablet Geniş Ekran Desteği (min-width: 851px)
   ========================================================================== */
@media (min-width: 851px) {
  .shell {
    flex-direction: row;
  }

  .sidebar {
    width: 250px;
    background: var(--primary);
    color: #eff5f3;
    display: flex;
    flex-direction: column;
    padding: 28px 16px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 32px;
  }

  .brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: -0.2px;
  }

  .brand small {
    display: block;
    margin-top: 3px;
    color: #a4bebf;
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .logo {
    display: grid;
    place-items: center;
    background: #1f424c;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
  }

  .side-heading, .tiny-label {
    color: #799a9f;
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 750;
    margin: 0 12px 14px;
  }

  .sidebar nav {
    display: grid;
    gap: 6px;
  }

  .nav-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 0;
    color: #bcd0d1;
    text-align: left;
    background: transparent;
    border-radius: 11px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 600;
  }

  .nav-item.active {
    color: #ffffff;
    background: #254a53;
  }

  .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
  }

  .sidefoot {
    margin-top: auto;
    background: #183b44;
    border: 1px solid #2d5059;
    border-radius: 14px;
    padding: 16px 12px;
  }

  .sidefoot strong, .sidefoot span {
    display: block;
    font-size: 12px;
    margin: 4px 0;
    overflow-wrap: anywhere;
  }

  .sidefoot span {
    color: #a4bebf;
  }

  .text-btn {
    background: transparent;
    border: 0;
    color: var(--accent);
    padding: 6px 0;
    font-size: 12px;
    font-weight: 750;
  }

  .main {
    margin-left: 250px;
    width: calc(100% - 250px);
  }

  .topbar {
    padding: 24px 36px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .content {
    padding: 28px 36px 60px;
    max-width: 1440px;
  }

  .content.has-cart-bar {
    padding-bottom: 60px;
  }

  .bottomnav {
    display: none;
  }

  .cart-bar {
    display: none;
  }

  /* Desktop layout for Orders */
  .orders-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.9fr);
    gap: 20px;
    align-items: start;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .cart-panel-desktop {
    display: block;
    position: sticky;
    top: 90px;
  }

  /* Desktop layout for Overview */
  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .metric strong {
    font-size: 24px;
  }

  .home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .toast {
    bottom: 24px;
    right: 24px;
    left: auto;
    max-width: 440px;
  }
}

/* ==========================================================================
   Yapay Zekâ Raporlama Paneli Stilleri
   ========================================================================== */
.ai-report-panel {
  background: #ffffff;
  border: 1px solid #dce5e0;
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(16, 43, 53, 0.04);
}

.ai-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: #eef3f1;
  padding: 4px;
  border-radius: var(--radius-md);
}

.ai-type-tab {
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 750;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-type-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.ai-range-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.ai-range-pills::-webkit-scrollbar {
  display: none;
}

.ai-range-pill {
  padding: 7px 11px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: #f7f9f7;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  min-height: 36px;
}

.ai-range-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.ai-preview-box {
  background: #f8faf8;
  border: 1px solid #e3ebe5;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ai-preview-metric {
  background: #ffffff;
  border: 1px solid #e8ede9;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.ai-preview-metric span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.ai-preview-metric strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
  color: var(--primary);
  margin-top: 2px;
}

.ai-copy-btn {
  background: #173b44;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(23, 59, 68, 0.25);
  transition: transform 0.1s ease, background 0.15s ease;
}

.ai-copy-btn:active {
  transform: scale(0.98);
  background: #0f272e;
}

/* ==========================================================================
   Bildirimler ve Hatırlatmalar (In-App Notifications)
   ========================================================================== */
.notif-bell-btn {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease, background 0.15s ease;
  padding: 0;
}

.notif-bell-btn:active {
  transform: scale(0.95);
  background: #f4efe6;
}

.notif-bell-btn .bell-icon {
  font-size: 19px;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  min-width: 19px;
  height: 19px;
  line-height: 19px;
  border-radius: 10px;
  padding: 0 5px;
  text-align: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
}

/* Bottom Sheet / Modal Backdrop */
.notif-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 38, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 65;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeIn 0.15s ease-out;
}

.notif-sheet {
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 12px 16px var(--safe-bottom);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  animation: sheetUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) {
  .notif-sheet-backdrop {
    justify-content: center;
    align-items: center;
    padding: 24px;
  }
  .notif-sheet {
    width: 520px;
    border-radius: 20px;
    max-height: 85vh;
    padding: 20px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
}

.notif-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.notif-sheet-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 850;
  color: var(--primary);
}

/* Filter Tabs */
.notif-tabs {
  display: flex;
  gap: 6px;
  background: #f0f3f1;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.notif-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  color: #55676a;
  cursor: pointer;
  text-align: center;
  min-height: 36px;
  transition: all 0.15s ease;
}

.notif-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Bulk actions bar */
.notif-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #f9fbf9;
  border: 1px dashed #d1ded8;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #3b5b52;
}

.notif-bulk-btn {
  background: #ffffff;
  border: 1px solid #b9cec5;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 750;
  color: var(--primary);
  cursor: pointer;
  min-height: 32px;
}

.notif-bulk-btn:active {
  background: #eef5f2;
}

/* Scrollable list */
.notif-list-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  max-height: calc(88dvh - 170px);
}

/* Notification Card */
.notif-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid #94a3b8;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(10, 31, 38, 0.04);
  transition: opacity 0.2s ease, background 0.15s ease;
}

.notif-card.overdue {
  border-left-color: #dc2626;
  background: #fffcfc;
}

.notif-card.due {
  border-left-color: #ea580c;
  background: #fffdfb;
}

.notif-card.soon {
  border-left-color: #eab308;
  background: #fffefb;
}

.notif-card.is-read {
  opacity: 0.72;
  background: #fafbfa;
}

.notif-card.is-snoozed {
  border-left-style: dashed;
  background: #fdfaf6;
}

.notif-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.notif-cat-tag {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 6px;
}

.notif-read-tag {
  font-size: 10px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border-radius: 6px;
  padding: 2px 6px;
}

.notif-snooze-tag {
  font-size: 10px;
  font-weight: 700;
  color: #854d0e;
  background: #fef9c3;
  border-radius: 6px;
  padding: 2px 6px;
}

.notif-amount {
  font-size: 16px;
  font-weight: 850;
  color: var(--primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.notif-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}

.notif-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.notif-card-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #475569;
  padding-top: 2px;
}

.notif-delay-text {
  font-weight: 750;
  color: #dc2626;
}

/* Notification Action Buttons */
.notif-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #f1f4f2;
}

.notif-action-btn {
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  padding: 6px 10px;
  min-height: 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  touch-action: manipulation;
  white-space: nowrap;
}

.notif-action-btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.notif-action-btn.secondary {
  background: #eef2f0;
  color: var(--primary);
}

.notif-action-btn.outline {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #4b635c;
}

.notif-action-btn:active {
  transform: scale(0.97);
}

/* Empty State */
.notif-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.notif-empty-icon {
  font-size: 36px;
  margin-bottom: 4px;
}

.notif-empty strong {
  font-size: 15px;
  color: var(--primary);
}

.notif-empty small {
  font-size: 12px;
  max-width: 280px;
  line-height: 1.4;
}

/* ==========================================================================
   BÖLÜM B — Ürün ve Menü Yönetimi Mobil Stilleri
   ========================================================================== */
.menu-editor-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-editor-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(16, 43, 53, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
}

.menu-item-card.is-passive {
  background: #fbfbfb;
  border-color: #e5e7eb;
  opacity: 0.78;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.menu-item-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item-title-group strong {
  font-size: 15px;
  color: var(--primary);
  display: block;
}

.menu-item-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8faf9;
  border: 1px solid #edf2ef;
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.menu-item-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item-stat span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.menu-item-stat strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.menu-item-toggles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px dashed #e9eee9;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.menu-switch.status-active {
  border: 1px solid #c8dfcc;
  background: #e7f4ea;
  color: #2b6140;
}

.menu-switch.status-passive {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
}

.badge.ok {
  background: #e7f4ea;
  color: #2b6140;
  border: 1px solid #c8dfcc;
}

/* Sepet çubuğu: dar ekranda ("Sepet 2", "Kaydet" kısaltması) toplam tutar HER ZAMAN tam görünür */
.cb-count { display: none; }
.cart-bar-info { flex-shrink: 0; }

@media (max-width: 400px) {
  .cart-bar { left: 8px; right: 8px; padding: 6px 8px; gap: 6px; }
  .cart-bar-left { gap: 6px; }
  .cart-bar-badge { display: none; }
  .cb-count { display: inline; }
  .cb-long { display: none; }
  .cart-bar-total { font-size: 16px; }
  .cart-bar-customer { max-width: 110px; }
  .cart-bar-actions { gap: 5px; }
  .cart-bar-view-btn { padding: 8px 9px; }
  .cart-bar-save-btn { padding: 8px 10px; }
}

/* Çok dar ekranlarda (≤360px) üst bar öğeleri tek satırda kalacak şekilde küçülür */
@media (max-width: 360px) {
  .topbar { padding-left: 8px; padding-right: 8px; }
  .topbar-header { gap: 4px; }
  .topbar h1 { font-size: 16px; }
  .top-actions { gap: 4px; }
  .status { padding: 3px 6px; font-size: 10px; gap: 4px; }
  .notif-bell-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .content { padding-left: 10px; padding-right: 10px; }
  .notice-banner.compact { margin-left: 10px; margin-right: 10px; }
  .customer-add-btn { padding: 0 9px; }
}
