*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2cb84b;
  --blue-dark: #1e9e3a;
  --orange: #2cb84b;
  --orange-dark: #1e9e3a;
  --red: #d32f2f;
  --gray-bg: #f5f5f5;
  --gray-border: #ddd;
  --text: #222;
  --text-light: #666;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--gray-bg);
  color: var(--text);
  overflow: hidden;
}

/* SCREENS */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.screen.hidden { display: none; }
.screen.active { display: flex; }

/* LOGIN */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 32px;
}
#app-logo-wrap img { height: 56px; width: auto; object-fit: contain; display: block; margin: 0 auto 4px; }
.login-logo h1 { font-size: 1.5rem; color: #111; text-align: center; font-weight: 300; font-style: italic; margin-top: 4px; }
.login-logo p { color: var(--text-light); text-align: center; margin-top: 4px; }
.lang-switcher { display: flex; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.lang-btn { background: none; border: 2px solid transparent; border-radius: 8px; font-size: 1.4rem; padding: 2px 6px; cursor: pointer; opacity: 0.5; transition: opacity 0.15s, border-color 0.15s; line-height: 1; }
.lang-btn:hover { opacity: 0.8; }
.lang-btn.active { opacity: 1; border-color: var(--green); }
.login-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
#recaptcha-container { width: 100%; display: flex; justify-content: center; min-height: 0; }
.grecaptcha-badge { visibility: hidden !important; }
#otp-section { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
#otp-desc { font-size: .88rem; color: #666; text-align: center; margin: 0; line-height: 1.5; }
#otp-status { font-size: .82rem; color: #1a73e8; text-align: center; min-height: 18px; margin: 0; }
#otp-error { font-size: .84rem; color: #c62828; text-align: center; background: #fce4ec; border-radius: 8px; padding: 8px 12px; margin: 0; }
#otp-input {
  width: 100%;
  padding: 16px 12px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 14px;
  text-align: center;
  border: 2px solid var(--gray-border);
  border-radius: 14px;
  outline: none;
  color: #222;
  background: #fafafa;
  transition: border-color .15s;
  font-family: monospace;
}
#otp-input:focus { border-color: var(--green); background: #fff; }
#btn-verify-otp { font-size: 1rem; padding: 14px; border-radius: 14px; font-weight: 700; }
.otp-actions { display: flex; gap: 10px; }
.btn-secondary { background: #f0f4f8; color: #444; border: 2px solid #e0e8f0; padding: 11px 16px; border-radius: 12px; font-size: .88rem; font-weight: 600; cursor: pointer; flex: 1; transition: background .15s; }
.btn-secondary:hover { background: #e0e8f0; }
.otp-recaptcha-note { font-size: .65rem; color: #ccc; text-align: center; margin: 0; }
.otp-recaptcha-note a { color: #ccc; }
.login-form label { font-weight: 600; font-size: 0.9rem; color: var(--text-light); }
.phone-input-wrap {
  display: flex;
  border: 2px solid var(--gray-border);
  border-radius: 12px;
  overflow: visible;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.phone-input-wrap:focus-within {
  border-color: var(--blue);
}
.country-select-wrap {
  position: relative;
  flex-shrink: 0;
}
.country-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f5f5f5;
  border: none;
  border-right: 2px solid var(--gray-border);
  border-radius: 10px 0 0 10px;
  padding: 0 12px;
  height: 100%;
  min-height: 54px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: background .15s;
}
.country-btn:hover { background: #ebebeb; }
#country-flag { font-size: 1.3rem; line-height: 1; font-family: "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif; }
.country-option { font-family: 'Segoe UI', Arial, sans-serif; }
#country-code { font-size: .95rem; font-weight: 700; color: #333; font-family: 'Segoe UI', Arial, sans-serif; }
.country-caret { font-size: .65rem; color: #888; margin-left: 2px; }
.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  min-width: 220px;
  z-index: 300;
  overflow: hidden;
}
.country-dropdown.hidden { display: none; }
.country-option {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  font-size: .95rem;
  cursor: pointer;
  transition: background .1s;
  gap: 4px;
}
.country-option:hover { background: #f0faf2; }
.country-option.active { background: #e8f5e9; font-weight: 700; }
.country-option span:not(.fi) { color: #888; font-size: .85rem; margin-left: auto; font-family: 'Segoe UI', Arial, sans-serif; white-space: nowrap; }
.phone-input-wrap input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 1.1rem;
  outline: none;
  border-radius: 0 10px 10px 0;
  background: #fff;
  min-width: 0;
}
.error-msg { color: var(--red); font-size: 0.85rem; }

/* TOP BAR */
.top-bar {
  background: #ffffff;
  padding: 6px 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  position: relative;
}
.screen > .top-bar:not(.top-bar-main) {
  padding-top: max(6px, env(safe-area-inset-top));
}
.top-bar-main {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
}
.top-bar-main .search-tabs {
  flex: 1;
  min-width: 0;
}

/* PROFIL DROPDOWN */
.profile-wrap {
  position: relative;
  flex-shrink: 0;
}
.btn-profile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2a7a3b;
  border: 2px solid #666;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-profile:hover, .btn-profile.active { background: var(--blue); border-color: var(--blue); }

.profile-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  min-width: 170px;
  z-index: 200;
  overflow: hidden;
}
.profile-dropdown.hidden { display: none; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  font-size: .95rem;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.profile-menu-item:hover { background: #f5f5f5; }
.profile-menu-item + .profile-menu-item { border-top: 1px solid #eee; }
.profile-menu-logout { color: #d32f2f; }
.profile-menu-logout:hover { background: #fff5f5; }

/* TOPTANCI SWITCH - topbar'da kompakt */
.btn-switch-wholesaler {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  color: #111;
  background: transparent;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .15s;
  height: 36px;
}
.search-tabs {
  display: flex;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  background: transparent;
  color: #111;
  border: 1.5px solid #ccc;
  padding: 0 4px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-btn svg { width: 30px; height: 22px; }
.tab-btn[data-tab="text"] svg { width: 30px; height: 30px; }
.tab-btn.active { background: transparent; color: #aaa; border-color: #aaa; }

/* SEARCH AREA */
.search-area {
  flex-shrink: 0;
  padding: 8px 8px 12px;
  background: #fff;
}
#tab-scan {
  margin: -8px;
}
#tab-scan .scanner-wrap {
  border-radius: 0;
}
.tab-content.hidden { display: none; }
.tab-content.active { display: block; }

.manual-wrap { display: flex; flex-direction: column; gap: 0; padding: 8px 0 0; }
.manual-wrap .search-input-row {
  display: flex;
  align-items: center;
  border: 1.5px solid #ccc;
  border-radius: 100px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.manual-wrap .search-input-row input {
  flex: 1;
  padding: 11px 16px;
  font-size: 15px;
  border: none;
  outline: none;
  background: transparent;
  color: #333;
}
.manual-wrap .search-input-row .search-icon-btn {
  background: transparent;
  border: none;
  border-left: 1.5px solid #ccc;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 44px;
}
.manual-wrap .search-input-row .search-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: #555;
}

/* SCANNER */
.scanner-wrap {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scanner-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  z-index: 1;
  transition: opacity 0.3s;
}
.camera-placeholder.hidden { display: none; }
.scanner-wrap video::-webkit-media-controls { display: none !important; }
.scanner-wrap video::-webkit-media-controls-enclosure { display: none !important; }
.scanner-wrap video::--webkit-media-controls-panel { display: none !important; }
.scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scanner-frame {
  width: 55%;
  aspect-ratio: 1.8;
  border: none;
  border-radius: 0;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.35);
  position: relative;
}
.sc-corner {
  position: absolute;
  width: 22px;
  height: 22px;
}
.sc-tl { top: 0; left: 0;  border-top: 3px solid #fff; border-left: 3px solid #fff;  border-radius: 3px 0 0 0; }
.sc-tr { top: 0; right: 0; border-top: 3px solid #fff; border-right: 3px solid #fff; border-radius: 0 3px 0 0; }
.sc-bl { bottom: 0; left: 0;  border-bottom: 3px solid #fff; border-left: 3px solid #fff;  border-radius: 0 0 0 3px; }
.sc-br { bottom: 0; right: 0; border-bottom: 3px solid #fff; border-right: 3px solid #fff; border-radius: 0 0 3px 0; }
.scanner-laser {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange) 30%, var(--orange) 70%, transparent);
  border-radius: 2px;
  animation: laser-sweep 2s ease-in-out infinite;
}
@keyframes laser-sweep {
  0%   { top: 8%;  opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}
.btn-torch {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  pointer-events: all;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-torch.visible { display: flex; }
.btn-torch.active  { background: rgba(255,220,0,0.7); color: #000; }
.btn-scan { display: none; }
.scanner-placeholder {
  width: 100%;
  height: 170px;
  background: #333;
}

/* BRAND ICONS */
/* BRAND TAB GRID */
.search-area.brand-active { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.search-area.brand-selected { padding: 0; }
#tab-brand { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0; }.brand-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 10px; }
.brand-grid-item { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 1.5px solid #eee; border-radius: 14px; padding: 12px 6px 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s; }
.brand-grid-item:active { background: #fff3ee; border-color: var(--orange); }
.brand-grid-item img { width: 80px; height: 80px; object-fit: contain; border-radius: 10px; }
.brand-grid-item span { font-size: .82rem; font-weight: 600; color: #333; text-align: center; word-break: break-word; line-height: 1.3; }
.brand-grid-empty { grid-column: 1/-1; text-align: center; padding: 40px 20px; color: #aaa; font-size: .9rem; }

/* MANUAL / TEXT */
.cat-pills-wrap { padding: 8px 0; background: #0000002e; flex-shrink: 0; }
.cat-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill-btn { flex-shrink: 0; padding: 5px 13px; border-radius: 20px; font-size: .78rem; font-weight: 600; border: 2px solid var(--gray-border); background: #fff; color: #555; cursor: pointer; white-space: nowrap; }
.cat-pill-btn.active { background: #111; border-color: #111; color: #fff; }


/* SEARCH RESULTS */
/* ── PROMOSYON SLIDER ── */
.promo-slider-wrap {
  flex-shrink: 0;
  padding: 10px 0 6px;
  background: #f5f5f5;
}
.promo-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 10px;
  padding: 0 12px;
}
.promo-slider::-webkit-scrollbar { display: none; }

.promo-slide {
  scroll-snap-align: center;
  flex-shrink: 0;
  width: calc(100vw - 28px);
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.13);
  cursor: pointer;
  position: relative;
}

/* Kare resim alanı */
.promo-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.promo-slide-img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}
.promo-slide-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* Ürün adı + fiyatlar — resmin altında beyaz bölüm */
.promo-slide-info {
  background: #fff;
  padding: 10px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.promo-slide-name {
  font-size: .9rem;
  font-weight: 700;
  color: #222;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

/* Fiyatlar */
.promo-slide-prices {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}
.promo-old-price {
  text-decoration: line-through;
  color: #aaa;
  font-size: 1rem;
}
.promo-new-price {
  background: #2e7d32;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.promo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ccc;
  transition: background .2s;
}
.promo-dot.active { background: #e85d1a; }

.search-results {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  min-height: 0;
  padding-bottom: 70px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-border);
  cursor: pointer;
  font-size: 0.88rem;
}
.search-result-item:hover { background: var(--gray-bg); }
.search-result-item.in-cart { background: #e8f5e9; }
.search-result-item.in-cart::after { content: '✓'; margin-left: auto; color: #2e7d32; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.search-result-item .barcode { color: var(--text-light); font-size: 0.75rem; }
.sri-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; flex-shrink: 0; background: #f5f5f5; border: 1px solid #eee; }
.sri-thumb-empty { background: #f0f0f0; }
.search-results-loader {
  text-align: center;
  padding: 14px;
  color: #aaa;
  font-size: 0.82rem;
}
.sri-thumb {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
  flex-shrink: 0;
}
.sri-thumb-empty {
  background: #f0f0f0;
}
.sri-text { flex: 1; min-width: 0; }
.sri-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ARA BUTTON ROW */

/* ORDER LIST */
/* STICKY CART BAR */
.sticky-cart-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1.5px solid #e0e0e0;
  box-shadow: 0 -3px 16px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 90;
  flex-shrink: 0;
}
.sticky-cart-bar.hidden { display: none; }
.sticky-cart-bar { cursor: pointer; }
.sticky-cart-left { display: flex; align-items: center; gap: 10px; }
.sticky-cart-icon-wrap {
  position: relative;
  width: 40px; height: 40px;
  background: #2e7d32;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sticky-cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e85d1a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}
.sticky-cart-info { display: flex; flex-direction: column; gap: 1px; }
.sticky-cart-title { font-size: 0.88rem; font-weight: 700; color: #222; }
.sticky-cart-sub   { font-size: 0.75rem; color: #777; }
.sticky-cart-right { display: flex; align-items: center; gap: 8px; }
.sticky-cart-total { font-size: 0.88rem; font-weight: 700; color: #222; }
.sticky-cart-toggle {
  background: none; border: none; cursor: pointer;
  padding: 4px; display: flex; align-items: center;
}

/* CART SLIDE-UP PANEL */
.cart-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  transition: opacity 0.25s;
}
.cart-panel-overlay.hidden { display: none; }
.cart-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
  z-index: 201;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.cart-panel.open { transform: translateY(0); }
.cart-panel-handle {
  width: 40px; height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}
.cart-panel .order-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
}
.cart-panel .btn-order-row {
  margin: 8px;
  margin-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Sepet paneli açıkken ana ekranın sticky bar'ı gizle */
.cart-panel.open ~ * .sticky-cart-bar { display: none; }

.order-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
}
.order-list {
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  min-height: 80px;
  padding: 6px;
}
.empty-list {
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--gray-border);
  font-size: 0.85rem;
}
.order-item:last-child { border-bottom: none; }
.order-unit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 58px;
  text-align: center;
}
.order-unit-adt { background: #e8f5e9; color: #2e7d32; }
.order-unit-kol { background: #fff3e0; color: #e65100; }
.order-unit-kas { background: #efebe9; color: #5d4037; }
.order-unit-pal { background: #ffebee; color: #c62828; }
.order-item-name { flex: 1; }
.order-item-barcode { font-size: 0.72rem; color: var(--text-light); }
.order-item-del {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}

/* TOPTANCI ADI */
.wholesaler-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px 0;
  flex-shrink: 0;
}

/* SIPARIS VER */
.btn-order-row {
  display: none;
  gap: 8px;
  margin: 8px;
  margin-bottom: max(8px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.btn-order {
  flex: 1;
  background: #e85d1a;
  color: #fff;
  border: none;
  padding: 14px 8px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s;
  text-align: center;
}
.btn-order:hover { background: #c44a0e; }
.btn-order-secondary { background: #f0f0f0; color: #444; }
.btn-order-secondary:hover { background: #e0e0e0; }
.btn-order-wa { background: #25a244; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-order-wa:hover { background: #1a7a32; }

/* PRODUCT SCREEN */
.product-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 10px;
  gap: 6px;
  flex-shrink: 0;
}
.product-top-bar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 14px; right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.btn-fav-product {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #eee;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.btn-fav-product:active { transform: scale(1.2); }
.btn-fav-product svg { fill: #ccc; transition: fill .2s; }
.btn-fav-product.active svg { fill: #e53935; }
/* Listem ekranı */
.list-screen-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 14px 4px;
  border-bottom: 1px solid var(--gray-border);
  flex-shrink: 0;
}
.list-tab-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-border);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
}
.list-tab-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.my-list-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--gray-border);
  cursor: pointer;
}
.list-item:active { background: #f5f5f5; }
.list-item-info { flex: 1; min-width: 0; }
.list-item-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-brand { font-size: 0.78rem; color: var(--text-light); }
.list-item-fav {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.list-item-fav svg { fill: #ddd; transition: fill .2s; }
.list-item-fav.active svg { fill: #e53935; }
.product-image-wrap {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 4px;
}
.product-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
}
#product-img { width: 100%; height: 100%; object-fit: contain; }
#product-name { font-size: 1rem; font-weight: 700; text-align: center; line-height: 1.3; margin-top: 2px; }
.product-barcode { color: var(--text-light); font-size: 0.75rem; letter-spacing: 0.8px; }
.product-barcode-wrap { display: flex; justify-content: center; margin: 4px 0 2px; background: #fff; border-radius: 8px; padding: 4px 8px; }
.product-brand { color: #888; font-size: 0.82rem; }
.product-price { color: var(--blue); font-weight: 800; font-size: 1.05rem; margin-top: 2px; }

/* QTY TABLE */
.qty-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s;
}
.qty-row:has(input:not([value="0"])):has(input[value]):not(:has(input[value="0"])) {
  border-color: #c8e6c9;
  box-shadow: 0 1px 6px rgba(56,142,60,.12);
}
.qty-unit-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}
.qty-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 20px;
  width: fit-content;
}
.qty-badge-adet { background: #e3f2fd; color: #1565c0; }
.qty-badge-koli  { background: #fff3e0; color: #e65100; }
.qty-badge-kasa  { background: #f3e5f5; color: #6a1b9a; }
.qty-badge-palet { background: #e8f5e9; color: #2e7d32; }
.qty-label-info {
  font-size: 0.72rem;
  font-weight: 500;
  color: #999;
  padding-left: 2px;
}
.qty-stepper {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #e0e0e0;
}
.qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}
.qty-btn.minus { color: #e53935; }
.qty-btn.minus:active { background: #ffebee; }
.qty-btn.plus  { color: #2e7d32; }
.qty-btn.plus:active  { background: #e8f5e9; }
.qty-row input[type="number"] {
  width: 46px;
  text-align: center;
  border: none;
  border-left: 1.5px solid #e0e0e0;
  border-right: 1.5px solid #e0e0e0;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  background: #fff;
  height: 38px;
  outline: none;
  color: #222;
  -moz-appearance: textfield;
}
.qty-row input[type="number"]::-webkit-outer-spin-button,
.qty-row input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-add {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.15s;
}
.btn-add:hover { background: #b71c1c; }

.btn-cancel {
  width: 100%;
  background: none;
  color: var(--text-light);
  border: 2px solid var(--gray-border);
  padding: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

/* CONFIRM */
.confirm-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}
.confirm-area .scanner-wrap {
  width: 100%;
  max-width: 320px;
}
.confirm-message {
  background: var(--gray-bg);
  border: 2px solid var(--gray-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
#confirm-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
  text-transform: uppercase;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--blue-dark); }

.hidden { display: none !important; }

/* SEPETİ TEMİZLE */
.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #eee;
}
.cart-panel-wholesaler {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-panel-wicon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}
.cart-panel-wicon.cart-panel-wicon-logo {
  width: auto;
  max-width: 90px;
  height: 32px;
  object-fit: contain;
  border-radius: 3px;
}
.cart-panel-wicon.hidden { display: none; }
.cart-panel-wname {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}
.btn-clear-cart {
  background: none;
  color: var(--red);
  border: 1.5px solid var(--red);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-clear-cart.hidden { display: none; }
.cart-total-wrap {
  display: block;
  padding: 10px 12px;
  margin-top: 6px;
  background: #f0faf2;
  border-radius: 8px;
  border: 1.5px solid #c8e6c9;
  font-size: .9rem;
  font-weight: 600;
  color: #2e7d32;
}
.cart-total-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1b5e20;
}
.tax-row {
  display: block;
  font-size: .82rem;
  color: #555;
  margin-bottom: 2px;
}
.tax-total {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #1b5e20;
  margin-top: 4px;
  border-top: 1px solid #c8e6c9;
  padding-top: 4px;
}

/* TOPTANCI DEĞİŞTİR BUTONU */
.btn-switch-wholesaler:hover { border-color: #999; }
.btn-switch-wholesaler.hidden { display: none; }
.switch-w-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}
.switch-w-icon-logo {
  width: auto;
  max-width: 72px;
  height: 28px;
  border-radius: 3px;
  object-fit: contain;
}
.switch-w-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* TOPTANCI SEÇİM LİSTESİ */
.wholesaler-choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.wholesaler-choice-btn:hover {
  border-color: var(--primary);
  background: #fff8f5;
  color: var(--primary);
}
.w-choice-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
}
.w-choice-emoji {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.w-choice-name {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
}

/* SİPARİŞLERİM */
.btn-siparislerim {
  width: calc(100% - 16px);
  margin: 4px 8px 8px;
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 13px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.top-bar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}
.btn-back {
  background: var(--blue);
  border: none;
  font-size: .88rem;
  color: #fff;
  cursor: pointer;
  padding: 7px 14px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
}
.btn-close-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #eee;
  color: #555;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  z-index: 1;
}
.btn-close-circle:hover { background: #ddd; }
.my-orders-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.order-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  overflow: hidden;
  flex-shrink: 0;
}
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: nowrap;
}
.order-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.order-card-ref {
  font-size: .83rem;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}
.order-card-date {
  font-size: .74rem;
  color: #aaa;
  flex-shrink: 0;
  white-space: nowrap;
}
.oc-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.oc-badge-pending   { background:#fff3e0; color:#e65100; }
.oc-badge-confirmed { background:#e8f5e9; color:#2e7d32; }
.oc-badge-shipped   { background:#e3f2fd; color:#1565c0; }
.oc-badge-completed { background:#ede7f6; color:#4527a0; }
.oc-badge-cancelled { background:#fce4ec; color:#b71c1c; }
.oc-badge-received  { background:#f3e5f5; color:#6a1b9a; }
.order-card-body { padding: 0 12px; }
.order-card-note {
  margin: 8px 0 4px;
  padding: 6px 10px;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  border-radius: 4px;
  font-size: .78rem;
  color: #555;
}
.oc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 0;
}
.oc-table td {
  padding: 6px 4px;
  border-bottom: 1px solid #f5f5f5;
  font-size: .81rem;
  vertical-align: middle;
}
.oc-table tr:last-child td { border-bottom: none; }
.oc-table .oc-num { color: #ccc; width: 20px; font-size: .75rem; }
.oc-table .oc-name { color: #333; }
.oc-table .oc-brand { font-size: .7rem; color: #bbb; }
.oc-table .oc-qty { text-align: right; color: #555; font-size: .78rem; white-space: nowrap; padding-left: 8px; }
.order-card-actions {
  display: flex;
  gap: 6px;
  padding: 8px 0 10px;
  border-top: 1px solid #f0f0f0;
  margin-top: 6px;
}
.oc-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.oc-btn-pdf     { background: #555; color: #fff; }
.oc-btn-receive { background: #2e7d32; color: #fff; }
.oc-btn-done    { background: #f3e5f5; color: #6a1b9a; cursor: default; }

/* eski class'lar için geriye dönük uyumluluk */
.status-pending   { background: #fff3e0; color: #e65100; }
.status-confirmed { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }
.order-card-item {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}
.order-card-item:last-child { border-bottom: none; }
.order-card-qty { font-weight: 600; color: #333; white-space: nowrap; margin-left: 8px; }

/* SCANNER NOT FOUND */
.scanner-not-found {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: #c62828;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  gap: 10px;
  z-index: 9998;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  min-width: 260px;
  animation: snf-in .18s ease forwards;
}
.scanner-not-found.hidden { display: none; }
@keyframes snf-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.snf-icon {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
}
.snf-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}
.snf-barcode {
  font-size: 1rem;
  opacity: .85;
  font-family: monospace;
  letter-spacing: .08em;
  text-align: center;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  max-width: 88vw;
  text-align: center;
  white-space: pre-line;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #c62828; }
.toast.success { background: #2e7d32; }

/* CONFIRM MODAL */
.camera-modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--blue);
}
.camera-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #222;
  text-align: center;
  margin-bottom: 10px;
}
.camera-modal-desc {
  font-size: .9rem;
  color: #555;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 4px;
}
.cmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cmodal-overlay.hidden { display: none; }
.cmodal-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  text-align: center;
  animation: cmodal-in .18s ease;
}
@keyframes cmodal-in {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.cmodal-icon { font-size: 2.2rem; margin-bottom: 12px; }
.cmodal-msg {
  font-size: .95rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 20px;
}
.cmodal-btns {
  display: flex;
  gap: 10px;
}
.cmodal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.cmodal-btn:hover { opacity: .85; }
.cmodal-cancel {
  background: #f0f0f0;
  color: #555;
}
.cmodal-ok {
  background: var(--primary, #2cb84b);
  color: #fff;
}

/* ===== SİPARİŞ ÖZET EKRANI ===== */
.review-header {
  background: #fff;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}
.review-wholesaler {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-wicon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #eee;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}
.review-wicon.review-wicon-logo {
  width: auto;
  max-width: 100px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  padding: 4px;
  background: #fff;
}
.review-wicon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #fff3ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.review-wname {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2cb84b;
}
.review-subtitle {
  font-size: .78rem;
  color: #aaa;
  margin-top: 2px;
}
.review-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  padding-bottom: 220px;
  background: #f5f7fa;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Review ürün kartı */
.review-item {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,.07);
  border: 1.5px solid #eee;
}
.review-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.review-item-name {
  font-size: .92rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}
.review-item-barcode {
  font-size: .72rem;
  color: #bbb;
  letter-spacing: .5px;
  margin-top: 2px;
}
.review-item-del {
  background: none;
  border: none;
  color: #ddd;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 6px;
}
.review-item-del:active { color: #d32f2f; background: #ffebee; }

/* Birim blokları */
.rv-units-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rv-unit-block {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.rv-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rv-unit-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 80px;
}
.rv-unit-info {
  font-size: .7rem;
  color: #aaa;
  font-weight: 500;
  padding-left: 2px;
}
.rv-unit-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rv-unit-price {
  font-size: .8rem;
  font-weight: 700;
  color: #2e7d32;
  white-space: nowrap;
}

/* Review stepper — aynı pill tasarımı */
.rv-stepper {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #e0e0e0;
}
.rv-qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rv-minus { color: #e53935; }
.rv-minus:active { background: #ffebee; }
.rv-plus  { color: #2e7d32; }
.rv-plus:active  { background: #e8f5e9; }
.rv-qty-val {
  width: 40px;
  height: 34px;
  text-align: center;
  border: none;
  border-left: 1.5px solid #e0e0e0;
  border-right: 1.5px solid #e0e0e0;
  padding: 0;
  font-size: .92rem;
  font-weight: 700;
  background: #fff;
  outline: none;
  color: #222;
  -moz-appearance: textfield;
}
.rv-qty-val::-webkit-outer-spin-button,
.rv-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; }
.rv-unit-del {
  background: none;
  border: none;
  color: #ddd;
  font-size: .9rem;
  cursor: pointer;
  padding: 6px 6px 6px 10px;
  border-left: 1.5px solid #eee;
  flex-shrink: 0;
  line-height: 1;
}
.rv-unit-del:active { color: #d32f2f; }

.review-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  background: #f0f4f8;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}
.review-footer .btn-order { width: 100%; }
.review-btn-row { display: flex; gap: 8px; }
.review-btn-row .btn-order { flex: 1; }
.order-note {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: .88rem;
  font-family: inherit;
  resize: none;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}
.order-note:focus { border-color: var(--color-primary, #2e7d32); }

/* ===== BAŞARI EKRANI ===== */
#screen-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fdf8;
  position: relative;
  overflow: hidden;
}
.success-bg-check {
  position: absolute;
  font-size: 150vw;
  line-height: 1;
  color: #2cb84b;
  opacity: .05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
  user-select: none;
  font-weight: 900;
}
.success-wrap {
  text-align: center;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.success-wlogo {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}
.success-wlogo img {
  max-width: 120px;
  max-height: 72px;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid #e0f0e0;
  box-shadow: 0 4px 16px rgba(44,184,75,.15);
  background: #fff;
  padding: 6px;
}
.success-wname {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a6b2e;
  margin-bottom: 20px;
}
.success-check {
  font-size: 3.5rem;
  line-height: 1;
  color: #2cb84b;
  margin-bottom: 12px;
  font-weight: 900;
}
.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a6b2e;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.success-ref {
  font-size: .85rem;
  color: #888;
  margin-bottom: 6px;
}
.success-phone {
  font-size: .95rem;
  font-weight: 600;
  color: #2cb84b;
  margin-bottom: 0;
}
.btn-new-order-confirm {
  margin-top: 28px;
  width: 100%;
}

.btn-goto-orders {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  background: transparent;
  border: 1.5px solid var(--color-primary, #2e7d32);
  color: var(--color-primary, #2e7d32);
  border-radius: 20px;
  font-size: .82rem;
  cursor: pointer;
  letter-spacing: .01em;
}

/* ===== PROFİL EKRANI ===== */
.profile-edit-wrap {
  padding: 16px;
  max-width: 520px;
  margin: 0 auto;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-section-title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-primary, #2e7d32);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 20px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e0f2e1;
  padding-bottom: 4px;
}
.profile-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #555;
  margin-top: 10px;
  margin-bottom: 4px;
}
.profile-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  box-sizing: border-box;
}
.profile-input:focus { border-color: var(--color-primary, #2e7d32); }
.profile-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-save-btn { margin-top: 24px; width: 100%; }
.profile-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 12px;
}
.profile-msg.ok  { background: #e8f5e9; color: #2e7d32; }
.profile-msg.err { background: #ffebee; color: #c62828; }
.profile-msg.hidden { display: none; }

/* ===== SİPARİŞLERİM — toptancı badge ===== */
.order-card-wholesaler {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.order-card-wicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
  flex-shrink: 0;
}
.order-card-wname {
  font-size: .8rem;
  font-weight: 700;
  color: #2cb84b;
}

/* APP HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 4px 12px;
  padding-top: max(4px, env(safe-area-inset-top));
  flex-shrink: 0;
}
.app-header-logo img {
  height: 20px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
  display: block;
}
.app-header-menu-wrap { position: relative; display: flex; align-items: center; gap: 4px; }

/* Bildirim ikonu */
.app-header-notif { position: relative; background: none; border: none; cursor: pointer; padding: 6px; display: flex; align-items: center; color: #333; border-radius: 8px; }
.app-header-notif:hover { background: #f0f0f0; }
.notif-badge { position: absolute; top: 2px; right: 2px; background: #e53935; color: #fff; border-radius: 10px; font-size: .65rem; font-weight: 700; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px; pointer-events: none; }

/* Bildirim overlay */
.notif-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 500; }
.notif-overlay.open { display: block; }

/* Kayan panel */
.notif-panel { position: fixed; top: 0; right: -360px; width: 340px; max-width: 95vw; height: 100%; background: #fff; z-index: 501; box-shadow: -4px 0 20px rgba(0,0,0,.15); display: flex; flex-direction: column; transition: right .28s ease; }
.notif-panel.open { right: 0; }
.notif-panel-header { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 1px solid #eee; background: #fafafa; }
.notif-panel-title-row { display: flex; align-items: center; }
.notif-panel-title-row span { font-weight: 700; font-size: .95rem; flex: 1; }
.notif-panel-action-row { display: flex; gap: 8px; }
.notif-mark-all { flex: 1; font-size: .75rem; background: none; border: 1px solid #ddd; border-radius: 6px; padding: 6px 8px; cursor: pointer; color: #555; }
.notif-mark-all:hover { background: #f0f0f0; }
.notif-delete-all { flex: 1; font-size: .75rem; background: none; border: 1px solid #fcc; border-radius: 6px; padding: 6px 8px; cursor: pointer; color: #c0392b; }
.notif-delete-all:hover { background: #fef0f0; }
.notif-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #888; padding: 4px 6px; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: background .15s; }
.notif-item:hover { background: #fafafa; }
.notif-item.unread { background: #fff8f0; border-left: 3px solid #e85d1a; }
.notif-item.unread:hover { background: #fff3e8; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: #e85d1a; flex-shrink: 0; margin-top: 5px; }
.notif-item.read .notif-dot { background: #ddd; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: .87rem; color: #222; margin-bottom: 2px; }
.notif-body { font-size: .8rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: .72rem; color: #aaa; margin-top: 3px; }
.notif-empty { padding: 40px 16px; text-align: center; color: #bbb; font-size: .88rem; }
.app-header-hamburger {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border-radius: 8px;
}
.app-header-hamburger:hover { background: #f0f0f0; }
.app-header-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  border-radius: 2px;
}
.app-header-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  min-width: 170px;
  z-index: 300;
  overflow: hidden;
}
.app-header-dropdown.hidden { display: none; }
.app-hdr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  font-size: .95rem;
  color: #222;
  cursor: pointer;
  text-align: left;
}
.app-hdr-item:hover { background: #f5f5f5; }
.app-hdr-item-logout { color: #c62828; border-top: 1px solid #eee; }
.app-hdr-lang { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid #eee; }
.app-hdr-lang button { background: none; border: 2px solid transparent; border-radius: 6px; font-size: 1.3rem; padding: 2px 5px; cursor: pointer; opacity: 0.55; transition: opacity .15s, border-color .15s; }
.app-hdr-lang button:hover { opacity: 1; border-color: var(--green); }

/* === DESKTOP: Kamera scanner gizle === */
.mobile-only-tab {
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 769px), (hover: hover) and (pointer: fine) {
  .mobile-only-tab { display: none !important; }
  #tab-scan { display: none !important; }
}

/* === NATIVE APP: MLKit scanner === */
.native-scan-area {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1;
  padding: 40px 20px;
}
.btn-native-scan {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(232,93,26,0.35);
}
.btn-native-scan:active { opacity: 0.85; transform: scale(0.97); }

#pdf-modal { display: none; position: fixed; inset: 0; z-index: 9999; }
.pdf-modal-overlay { display: flex; align-items: stretch; justify-content: center; width: 100%; height: 100%; background: rgba(0,0,0,.7); }
.pdf-modal-box { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 900px; background: #fff; }
.pdf-modal-close { position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 1; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 1rem; cursor: pointer; }
.pdf-modal-frame { flex: 1; border: none; width: 100%; height: 100%; }

html.native-app #scanner-video,
html.native-app .scanner-overlay { display: none !important; }
html.native-app .native-scan-area { display: flex; }
html.native-app #btn-torch { display: none !important; }

/* iOS safe area — login, choose-wholesaler, confirm screens */
#screen-login,
#screen-choose-wholesaler {
  padding-top: env(safe-area-inset-top);
}
#screen-confirm .success-wrap {
  padding-top: max(32px, env(safe-area-inset-top));
}

/* Yatay kullanımı engelle */
@media (orientation: landscape) and (max-height: 600px) {
  body::before {
    content: '';
    position: fixed; inset: 0; background: #000; z-index: 99998;
  }
  body::after {
    content: '🔄 Lütfen cihazı dik tutun';
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem; font-weight: 700; text-align: center;
  }
}
