/* Neta Havuz Sayım - Ultimate Responsive & Warehouse Design System */

:root {
  --primary: #006699;
  --primary-hover: #00527C;
  --primary-dark: #003D5C;
  --primary-light: #E0F2FE;
  --primary-border: #BAE6FD;
  --primary-accent: #0284C7;
  
  --bg-app: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --surface-hover: #F8FAFC;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --border: #E2E8F0;
  --border-subtle: #EDF2F7;
  --border-focus: #0284C7;

  /* Badges */
  --badge-shelf-bg: #E0F2FE;
  --badge-shelf-text: #0369A1;
  --badge-shelf-border: #BAE6FD;

  --badge-serial-bg: #F3E8FF;
  --badge-serial-text: #7E22CE;
  --badge-serial-border: #E9D5FF;

  --badge-lot-bg: #FEF3C7;
  --badge-lot-text: #B45309;
  --badge-lot-border: #FDE68A;

  --badge-exp-bg: #FFE4E6;
  --badge-exp-text: #BE123C;
  --badge-exp-border: #FECDD3;

  --badge-unit-bg: #DCFCE7;
  --badge-unit-text: #15803D;
  --badge-unit-border: #BBF7D0;

  --danger: #EF4444;
  --danger-hover: #DC2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECDD3;

  --success: #10B981;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;

  --warning: #F59E0B;
  --warning-bg: #FFFBEB;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.07), 0 2px 6px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.1), 0 4px 8px -2px rgb(0 0 0 / 0.04);
  --shadow-glow: 0 0 0 3px rgba(2, 132, 199, 0.25);
  
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================= */
/* 1. HEADER */
/* ============================================================= */
header.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284C7 0%, #004D73 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.header-title h1 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.header-title .subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Status Indicators */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 20px;
  background: var(--success-bg);
  color: #065F46;
  border: 1px solid var(--success-border);
  font-weight: 700;
  transition: all 0.3s ease;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

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

.btn-shelf-badge {
  background: var(--badge-shelf-bg);
  color: var(--badge-shelf-text);
  border-color: var(--badge-shelf-border);
}

.btn-shelf-badge:hover {
  background: #BAE6FD;
}

.btn-connect-device {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-connect-device:hover {
  background: #0284C7;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-icon-btn:hover {
  background: #E2E8F0;
  color: var(--primary);
}

.header-icon-btn:active {
  transform: scale(0.94);
}

.btn-terminal-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #0284C7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #0284C7;
  font-size: 16px;
  position: relative;
}

.btn-terminal-mode-toggle:hover {
  background: #DBEAFE;
  border-color: #93C5FD;
}

.btn-terminal-mode-toggle.active {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
  color: #FFFFFF !important;
  border-color: #0284C7 !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.45) !important;
}

.btn-terminal-mode-toggle.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 4px #22C55E;
}

/* Terminal Quick Switch Bar */
.terminal-quick-switch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.btn-terminal-chip {
  flex: 1 1 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 40px;
}

.btn-terminal-chip:hover {
  border-color: #0284C7;
}

.btn-terminal-chip.active {
  background: #EFF6FF;
  border-color: #0284C7;
  color: #0369A1;
  font-weight: 700;
}

.btn-terminal-chip .chip-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E2E8F0;
  color: #475569;
  font-weight: 600;
}

.btn-terminal-chip.active .chip-status {
  background: #0284C7;
  color: #FFFFFF;
}

/* ============================================================= */
/* 2. MAIN LAYOUT & RESPONSIVE DASHBOARD GRID */
/* ============================================================= */
.app-main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Novice 3-Step Guide Banner */
.quick-guide-banner {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-xs);
  position: relative;
  transition: all 0.3s ease;
}

.quick-guide-banner.hidden {
  display: none !important;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.guide-title {
  font-size: 13px;
  font-weight: 800;
  color: #0369A1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-close-btn {
  background: none;
  border: none;
  color: #0369A1;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.guide-close-btn:hover {
  background: rgba(3, 105, 161, 0.1);
}

/* Dashboard Two-Column Responsive Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

/* On Large screens (Desktop/Monitor > 1024px) */
@media (min-width: 1025px) {
  .dashboard-grid {
    grid-template-columns: 440px 1fr;
    gap: 20px;
  }
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================= */
/* 3. ACTIVE SHELF BAR & QUICK SHELF CHIPS */
/* ============================================================= */
.shelf-bar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}

.shelf-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.shelf-current-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.shelf-current-info .label {
  color: var(--text-muted);
  font-weight: 500;
}

.shelf-current-info .shelf-badge-bold {
  background: var(--badge-shelf-bg);
  color: var(--badge-shelf-text);
  border: 1.5px solid var(--badge-shelf-border);
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.btn-switch-shelf-link {
  background: none;
  border: none;
  color: var(--primary-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-switch-shelf-link:hover {
  text-decoration: underline;
}

.quick-shelves-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quick-shelves-row::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.shelf-quick-chip {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shelf-quick-chip:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #CBD5E1;
}

.shelf-quick-chip.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-add-shelf-chip {
  background: #F0FDF4 !important;
  border: 1px dashed #86EFAC !important;
  color: #166534 !important;
}

.btn-add-shelf-chip:hover {
  background: #DCFCE7 !important;
  border-color: #4ADE80 !important;
}

/* Handheld Terminal & Scanner Mode Quick Switch Bar */
.terminal-quick-switch-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.btn-terminal-chip {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-alt, #F8FAFC);
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main, #334155);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-terminal-chip:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-terminal-chip:active {
  transform: scale(0.97);
}

.btn-terminal-chip.active {
  background: #E0F2FE;
  border-color: #0284C7;
  color: #0369A1;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.btn-terminal-chip .chip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.btn-terminal-chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-terminal-chip .chip-status {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.btn-terminal-chip.active .chip-status {
  background: #0284C7;
  color: #FFFFFF;
}

/* ============================================================= */
/* 4. CRYSTAL-CLEAR 2-OPTION MODE SELECTOR (Segmented Cards) */
/* ============================================================= */
.mode-segmented-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}

.mode-selector-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-segmented-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-card-option {
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.mode-card-option:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.mode-card-option.selected {
  border-color: #0284C7;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

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

.mode-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-card-option.selected .mode-card-title {
  color: #0369A1;
}

.mode-radio-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  transition: all 0.2s;
}

.mode-card-option.selected .mode-radio-check {
  background: #0284C7;
  border-color: #0284C7;
}

.mode-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.mode-card-option.selected .mode-card-desc {
  color: #0284C7;
  font-weight: 500;
}

/* ============================================================= */
/* 5. SCANNER INPUT CARD (Hardware Wedge & Laser Target) */
/* ============================================================= */
.scanner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scanner-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scanner-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.scanner-status-hint {
  font-size: 11px;
  color: #10B981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.scanner-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.scanner-icon {
  position: absolute;
  left: 14px;
  font-size: 20px;
  color: #0284C7;
  pointer-events: none;
}

.scanner-input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 46px;
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scanner-input:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18);
}

.scanner-input::placeholder {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: #94A3B8;
}

.scanner-input-clear-btn {
  position: absolute;
  right: 12px;
  background: #E2E8F0;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #64748B;
  font-size: 13px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.scanner-input-clear-btn:hover {
  background: #CBD5E1;
  color: #0F172A;
}

/* Glove-friendly action buttons */
.scanner-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  min-height: 42px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, #0284C7 0%, #004D73 100%);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  background: #0284C7;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #E2E8F0;
}

.btn-camera {
  background: #F8FAFC;
  color: #0284C7;
  border-color: #BAE6FD;
}

.btn-camera:hover {
  background: #E0F2FE;
}

.btn-serial-trigger {
  background: var(--badge-serial-bg);
  color: var(--badge-serial-text);
  border-color: var(--badge-serial-border);
}

.btn-serial-trigger:hover {
  background: #E9D5FF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

/* ============================================================= */
/* FULLSCREEN CAMERA BARCODE SCANNER (Terminal & Mobile Experience) */
/* ============================================================= */
.camera-scanner-wrapper {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999999;
  background: #000000;
  overflow: hidden;
  user-select: none;
  touch-action: manipulation;
}

.camera-scanner-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* OCR'da çekilen ve sabitlenen fotoğraf (donmuş kare) */
#ocrFrozenShot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  z-index: 5;
  background: #000;
}

/* Fullscreen Top Header */
/* Lot Okuyucu durum balonu (mini kamera overlay) */
.lotcam-status {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 18px;
  padding: 8px 16px;
  color: #E0F2FE;
  font-size: 12px;
  font-weight: 700;
  max-width: 92%;
  text-align: center;
  z-index: 30;
  pointer-events: none;
}

/* ============ LOT ALANI TASARIMI (uzun lot kodları için) ============ */
.lot-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.lot-field-head label {
  margin: 0;
}

.lot-input {
  font-family: ui-monospace, Consolas, "Courier New", monospace !important;
  font-size: 15px !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  width: 100%;
  box-sizing: border-box;
}

.lot-preview {
  margin-top: 6px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #0369A1;
  background: rgba(2, 132, 199, 0.08);
  border: 1px dashed rgba(2, 132, 199, 0.45);
  border-radius: 8px;
  padding: 7px 9px;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.45;
  user-select: all;
}

.camera-fs-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 60;
  pointer-events: auto;
}

.camera-fs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
}

.fs-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.camera-fs-close-btn {
  background: rgba(239, 68, 68, 0.95);
  color: #FFFFFF;
  border: none;
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.camera-fs-close-btn:active {
  transform: scale(0.94);
  background: #DC2626;
}

/* Aiming Reticle in Center - Proportional, Compact & Zero-Collision */
.camera-fs-reticle {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 350px);
  height: min(46vw, 175px);
  pointer-events: none;
  border: 2px solid rgba(56, 189, 248, 0.65);
  border-radius: 16px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.45);
  z-index: 10;
  transition: all 0.2s ease;
}

.reticle-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: #38BDF8;
  border-style: solid;
}

.corner-tl { top: -3px; left: -3px; border-width: 4px 0 0 4px; border-top-left-radius: 14px; }
.corner-tr { top: -3px; right: -3px; border-width: 4px 4px 0 0; border-top-right-radius: 14px; }
.corner-bl { bottom: -3px; left: -3px; border-width: 0 0 4px 4px; border-bottom-left-radius: 14px; }
.corner-br { bottom: -3px; right: -3px; border-width: 0 4px 4px 0; border-bottom-right-radius: 14px; }

.reticle-laser {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38BDF8, #10B981, #38BDF8, transparent);
  box-shadow: 0 0 8px #38BDF8, 0 0 16px #10B981;
  animation: laser-sweep 2s infinite ease-in-out;
}

.reticle-laser.paused {
  animation-play-state: paused;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

@keyframes laser-sweep {
  0% { top: 10%; opacity: 0.3; }
  50% { top: 90%; opacity: 1; }
  100% { top: 10%; opacity: 0.3; }
}

/* Bottom Card & Tap-to-Scan Banner (Slightly more compact for handheld terminals) */
.camera-fs-bottom-card {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 410px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 10px 14px;
  color: #FFFFFF;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  z-index: 60;
}

.camera-fs-bottom-card.waiting-tap {
  border-color: #F59E0B;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35), 0 8px 28px rgba(0, 0, 0, 0.65);
}

/* ============ OCR (METİN) OKUMA ONAY KARTI — KOMPAKT ============ */
.fs-ocr-confirm {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* OCR açıkken paneli küçült: başlık, kilit çubuğu ve geri al satırları gizlenir */
.camera-fs-bottom-card.ocr-open {
  width: min(94%, 420px);
  padding: 7px 10px;
}

.camera-fs-bottom-card.ocr-open .fs-card-status-row,
.camera-fs-bottom-card.ocr-open .camera-fs-sensor-bar,
.camera-fs-bottom-card.ocr-open .fs-card-undo-row,
.camera-fs-bottom-card.ocr-open .fs-card-tap-hint,
.camera-fs-bottom-card.ocr-open .fs-card-qty-row {
  display: none !important;
}

.fs-ocr-target {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.fs-ocr-target button {
  flex: 1;
  background: rgba(255, 255, 255, 0.10) !important;
  color: #CBD5E1 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 4px;
  cursor: pointer;
}

.fs-ocr-target button.fs-ocr-btn.capture {
  flex: 1.4;
  background: #D97706 !important;
  color: #FFFFFF !important;
  border-color: #D97706 !important;
}

.fs-ocr-target button.active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #38BDF8 !important;
}

.fs-ocr-hint {
  font-size: 10.5px;
  font-weight: 600;
  color: #7DD3FC;
  text-align: center;
  margin-top: 3px;
  min-height: 12px;
}

.fs-ocr-name {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  margin-bottom: 6px;
  word-break: break-word;
  line-height: 1.35;
}

.fs-ocr-code-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: center;
  outline: none;
}

.fs-ocr-code-input:focus {
  border-color: #38BDF8;
  background: rgba(255, 255, 255, 0.16);
}

.fs-ocr-text-area {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #A5F3FC;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  padding: 5px 8px;
  resize: none;
  outline: none;
  font-family: inherit;
}

.fs-ocr-text-area:focus {
  border-color: #38BDF8;
}

.fs-ocr-resync {
  width: 100%;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 6px;
  cursor: pointer;
}

.fs-ocr-qty {
  font-size: 10.5px;
  color: #94A3B8;
  text-align: center;
  margin-top: 5px;
}

.fs-ocr-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  justify-content: center;
}

.fs-ocr-line-chip {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #E0F2FE;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  word-break: break-all;
  max-width: 100%;
}

.fs-ocr-line-chip:active {
  background: rgba(56, 189, 248, 0.35);
}

.fs-ocr-lines-title {
  width: 100%;
  font-size: 10.5px;
  color: #94A3B8;
  text-align: center;
  margin-bottom: 2px;
}

.fs-ocr-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.fs-ocr-btn {
  flex: 1;
  border: none !important;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 4px;
  cursor: pointer;
  color: #FFFFFF !important;
}

.fs-ocr-btn.approve {
  flex: 1.6;
  background: #059669 !important;
  box-shadow: 0 3px 12px rgba(5, 150, 105, 0.45);
}

.fs-ocr-btn.approve:active {
  background: #047857 !important;
}

.fs-ocr-btn.capture {
  flex: 1.2;
  background: #D97706 !important;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.45);
}

.fs-ocr-btn.capture:active {
  background: #B45309 !important;
}

.fs-ocr-btn.retry {
  background: #0284C7 !important;
}

.fs-ocr-btn.newstock {
  width: 100%;
  margin-top: 5px;
  background: #7C3AED !important;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.4);
}

.fs-ocr-btn.newstock:active {
  background: #6D28D9 !important;
}

.fs-ocr-btn.cancel {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Durum balonu: artık panelin İÇİNDE ilk satır — hiçbir şeyin üstüne bınmez */
.fs-ocr-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 5px 8px;
  color: #E0F2FE;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.fs-ocr-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38BDF8;
  border-radius: 50%;
  animation: ocrSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes ocrSpin {
  to { transform: rotate(360deg); }
}

.fs-card-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fs-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.fs-card-texts {
  flex: 1;
  min-width: 0;
}

.fs-card-main-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-card-subtitle {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-card-undo-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.fs-undo-btn {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  font-size: 12px !important;
  padding: 4px 12px !important;
  min-height: 30px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}

.fs-undo-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

.fs-card-tap-hint {
  margin-top: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #FEF08A;
  text-align: center;
  letter-spacing: 0.1px;
  animation: tap-pulse 1.6s infinite ease-in-out;
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.02); opacity: 1; border-color: #F59E0B; }
}

/* Fullscreen Camera Header Controls (Flash & Switch Camera) */
.camera-fs-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.camera-fs-tool-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.camera-fs-tool-btn:active {
  transform: scale(0.93);
}

.camera-fs-tool-btn.active-torch {
  background: rgba(245, 158, 11, 0.35) !important;
  border-color: #F59E0B !important;
  color: #FEF08A !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
}

/* Total Cumulative Quantity Badge */
.fs-card-qty-row {
  margin-top: 6px;
  text-align: center;
}

.fs-qty-badge {
  background: rgba(2, 132, 199, 0.32);
  border: 1px solid #38BDF8;
  color: #E0F2FE;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Camera In-Screen Sensor / Manual Input Bar */
.camera-fs-sensor-bar {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.camera-sensor-btn-kb {
  height: 36px;
  padding: 0 10px;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.camera-sensor-btn-kb.locked {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.65);
  color: #FEF08A;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.camera-sensor-btn-kb.locked:hover {
  background: rgba(245, 158, 11, 0.35);
  border-color: #FBBF24;
}

.camera-sensor-btn-kb.unlocked {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.75);
  color: #6EE7B7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.camera-sensor-btn-kb.unlocked:hover {
  background: rgba(16, 185, 129, 0.38);
  border-color: #34D399;
}

.camera-sensor-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0 10px;
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.camera-sensor-input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
  background: rgba(0, 0, 0, 0.85);
}

.camera-sensor-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}

.camera-sensor-btn-submit {
  height: 36px;
  padding: 0 12px;
  background: #0284C7;
  border: 1px solid #38BDF8;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.camera-sensor-btn-submit:hover {
  background: #0369A1;
  border-color: #7DD3FC;
}

.camera-sensor-btn-kb:active,
.camera-sensor-btn-submit:active {
  transform: scale(0.93);
}

/* ============================================================= */
/* ULTRA-SIMPLE INITIAL SCREEN (TOPLAM OKUTULAN + BAŞLA)         */
/* ============================================================= */
.initial-simple-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 8px auto 18px;
}

/* Mobile Start Hero Button */
.mobile-start-hero {
  width: 100%;
  margin-bottom: 0;
}

.btn-mobile-hero-start {
  width: 100%;
  min-height: 72px;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 14px 20px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.38);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.btn-mobile-hero-start:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.44);
}

.btn-mobile-hero-start:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.hero-start-icon-wrap {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.hero-start-texts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-start-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.8px;
  line-height: 1.15;
  color: #FFFFFF;
}

.hero-start-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  margin-top: 3px;
}

.hero-start-arrow {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

/* Stealth Hardware Scanner Sensor Input */
.scanner-stealth-input-wrapper {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.scanner-input-stealth {
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Scanned Items Collapsible Section */
.scanned-items-collapsible-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 30px;
}

.btn-toggle-scanned-drawer {
  width: 100%;
  min-height: 48px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-toggle-scanned-drawer:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.drawer-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-arrow {
  font-size: 12px;
  font-weight: 700;
  color: #0284C7;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 6px;
  padding: 4px 10px;
}

.scanned-drawer-body {
  margin-top: 12px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.scanned-drawer-body.collapsed {
  display: none !important;
}

/* 6. HERO STATS CARD */
.stats-hero-card {
  background: linear-gradient(135deg, #004D73 0%, #006699 50%, #0284C7 100%);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.stats-hero-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.stats-hero-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
}

.stats-hero-label {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #BAE6FD;
}

.stats-hero-val-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 8px;
}

.stats-hero-val-row .stats-hero-value,
.stats-hero-value {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1.5px;
  color: #FFFFFF;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stats-hero-val-unit {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
}

.stats-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-sub-pill {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.stats-hero-badge {
  font-size: 54px;
  opacity: 0.25;
  z-index: 1;
}

/* ============================================================= */
/* 7. SEARCH & FILTER ROW */
/* ============================================================= */
.filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  box-shadow: var(--shadow-xs);
}

.search-box:focus-within {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.search-input {
  width: 100%;
  height: 42px;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: transparent;
}

.shelf-dropdown-filter {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  min-width: 120px;
}

.shelf-dropdown-filter:focus {
  border-color: #0284C7;
}

/* ============================================================= */
/* 8. SCANNED ITEMS LIST & CARDS */
/* ============================================================= */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.list-header span#listTitle {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.list-count {
  font-size: 12px;
  font-weight: 700;
  color: #0284C7;
  background: #E0F2FE;
  padding: 3px 8px;
  border-radius: 12px;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

/* Empty State */
.empty-state {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* Item Card */
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideInUp 0.25s ease-out;
}

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

.item-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #CBD5E1;
}

/* Newly added item soft-glow animation */
.item-card.item-highlight-new {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0% { background: #DCFCE7; border-color: #10B981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25); transform: scale(1.02); }
  50% { background: #E0F2FE; border-color: #38BDF8; transform: scale(1.01); }
  100% { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-xs); transform: scale(1); }
}

/* Ultra-smooth surgical item entry and in-place update animations */
.item-card.item-entry-animated {
  animation: itemSlideDownFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes itemSlideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
    background: #DCFCE7;
    border-color: #34D399;
  }
  60% {
    background: #E0F2FE;
    border-color: #38BDF8;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    background: var(--surface);
    border-color: var(--border);
  }
}

.item-card.item-pulse-update {
  animation: pulseCardUpdate 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulseCardUpdate {
  0% {
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.4);
    background-color: #F0F9FF;
    border-color: #38BDF8;
  }
  100% {
    box-shadow: var(--shadow-xs);
    background-color: var(--surface);
    border-color: var(--border);
  }
}

.badge-unit.qty-bump {
  animation: qtyBumpPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes qtyBumpPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); background: #86EFAC; color: #065F46; }
  100% { transform: scale(1); }
}

.item-card.item-deleting {
  opacity: 0 !important;
  transform: scale(0.92) translateY(-6px) !important;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  overflow: hidden !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.item-index-barcode {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-barcode {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.item-badges-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-device {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
  font-size: 10px;
}

.badge-shelf {
  background: var(--badge-shelf-bg);
  color: var(--badge-shelf-text);
  border-color: var(--badge-shelf-border);
}

.badge-serial {
  background: var(--badge-serial-bg);
  color: var(--badge-serial-text);
  border-color: var(--badge-serial-border);
}

.badge-lot {
  background: var(--badge-lot-bg, #FEF3C7) !important;
  color: var(--badge-lot-text, #B45309) !important;
  border: 1px solid var(--badge-lot-border, #FDE68A) !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-exp {
  background: var(--badge-exp-bg);
  color: var(--badge-exp-text);
  border-color: var(--badge-exp-border);
}

.badge-unit {
  background: var(--badge-unit-bg);
  color: var(--badge-unit-text);
  border-color: var(--badge-unit-border);
}

.item-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.action-icon-btn:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.item-product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.item-extra-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 2px;
}

.item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* Stepper */
.item-quantity-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.step-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
}

.step-btn:hover {
  background: #E2E8F0;
}

.step-btn:active {
  background: #CBD5E1;
  transform: scale(0.92);
}

/* ============================================================= */
/* 9. MODALS & POPUPS */
/* ============================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

/* Form inputs */
.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: #FFFFFF;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Quick Qty Chips inside Prompt */
.quick-qty-grid {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-qty-chip {
  flex: 1;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 8px 0;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-qty-chip:hover {
  background: #0284C7;
  color: #fff;
  border-color: #0284C7;
}

/* Duplicate Alarm Modal */
#modalDuplicateAlert {
  z-index: 2000500 !important;
}

.duplicate-modal-content {
  border: 2px solid var(--danger);
  max-width: 420px;
}

.duplicate-alert-box {
  background: var(--danger-bg);
  border: 1.5px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.duplicate-icon {
  font-size: 40px;
  margin-bottom: 6px;
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.duplicate-alert-box h4 {
  color: #991B1B;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.duplicate-alert-box p {
  color: #B91C1C;
  font-size: 13px;
  line-height: 1.4;
}

/* Summary Table */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.summary-table th {
  background: var(--surface-alt);
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ============================================================= */
/* 10. MOBILE & DESKTOP DISPLAY TOGGLES */
/* ============================================================= */
.desktop-only {
  display: inline-flex !important;
}

.mobile-only {
  display: none !important;
}

.mobile-bottom-nav {
  display: none !important;
}

/* Mobile Actions Menu Sheet */
.mobile-actions-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.mobile-menu-item:hover {
  background: #E2E8F0;
  border-color: #CBD5E1;
}

.menu-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.menu-text strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.menu-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.menu-item-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.menu-item-danger .menu-text strong {
  color: #991B1B;
}

/* ============================================================= */
/* 11. MOBILE & HANDHELD TERMINAL ERGONOMICS (max-width: 768px) */
/* ============================================================= */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
  }

  .app-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Header compact single-line on mobile */
  header.app-header {
    padding: 6px 8px;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible;
  }
  
  .header-brand {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .header-logo {
    width: 32px;
    height: 32px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .header-title {
    min-width: 0;
  }

  .header-title h1 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-brand .subtitle {
    display: none;
  }

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

  .btn-user-badge {
    padding: 5px 8px;
    font-size: 11px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide Desktop buttons in mobile header */
  .desktop-only {
    display: none !important;
  }

  /* Show Mobile Menu button */
  .mobile-only {
    display: inline-flex !important;
  }

  /* Main content mobile padding */
  .app-main {
    padding: 10px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); /* Alt nav kaldirildi */
    gap: 10px;
  }

  /* Dashboard Grid collapses into a clean single column */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Large glove-friendly 2x2 action buttons */
  .scanner-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .btn {
    min-height: 46px;
    font-size: 13px;
    padding: 10px;
  }

  /* 16px font prevents iOS Safari auto-zoom */
  .scanner-input {
    height: 50px;
    font-size: 16px !important;
  }

  .shelf-quick-chip {
    padding: 6px 12px;
    font-size: 13px;
  }

  .stats-hero-card {
    padding: 12px 14px;
  }

  .stats-hero-value {
    font-size: 32px;
  }

  .stats-hero-badge {
    font-size: 40px;
  }

  .stats-sub-row {
    gap: 5px;
  }

  .stats-sub-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .mode-segmented-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .mode-card-option {
    padding: 8px 10px;
  }

  .mode-card-title {
    font-size: 12px;
  }

  .mode-card-desc {
    font-size: 10px;
  }

  .modal-content {
    padding: 16px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  /* Show Mobile Bottom Navigation Bar — KALDIRILDI: işlemler sağ üst ⋮ menüsüne taşındı */
  .mobile-bottom-nav {
    display: none !important;
  }

  .bottom-nav-item {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
  }

  .bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary-accent);
  }

  .bottom-nav-icon {
    font-size: 18px;
    line-height: 1;
  }

  .bottom-nav-label {
    font-size: 10px;
    font-weight: 700;
  }

  /* Prevent any flex or grid child horizontal overflow */
  .dashboard-col,
  .items-list,
  .item-card,
  .scanner-card,
  .shelf-bar-card,
  .mode-segmented-wrapper,
  .stats-hero-card {
    min-width: 0;
  /* Prevent any flex or child horizontal overflow */
  .dashboard-col,
  .items-list,
  .item-card,
  .scanner-card,
  .shelf-bar-card,
  .mode-segmented-wrapper,
  .stats-hero-card {
    min-width: 0;
    max-width: 100%;
  }

  .item-card {
    word-break: normal;
  }

  .item-barcode {
    word-break: keep-all;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }

  .item-product-name {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}
}

/* 12. PHONES & HANDHELDS (max-width: 480px) */
@media (max-width: 480px) {
  header.app-header {
    padding: 6px 8px;
    height: 48px;
  }

  .header-logo {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .header-title h1 {
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
  }

  /* Compact Live Indicator: Pulse dot only */
  .live-indicator {
    padding: 6px;
    min-width: unset;
  }
  .live-indicator #liveStatusText {
    display: none;
  }

  /* Compact User Badge */
  .btn-user-badge {
    padding: 5px 6px;
    font-size: 11px;
    max-width: 75px;
  }

  .header-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .app-main {
    padding: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .search-box {
    width: 100%;
  }

  .shelf-dropdown-filter {
    width: 100%;
  }

  .stats-hero-card {
    padding: 10px 12px;
  }

  .stats-hero-value {
    font-size: 28px;
  }

  .stats-hero-badge {
    font-size: 32px;
  }

  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: auto;
    padding: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* 13. COMPACT HANDHELD TERMINALS (e.g. Point Mobile PM67, PM351, Zebra TC21 <= 360px) */
@media (max-width: 360px) {
  header.app-header {
    padding: 4px 6px;
    height: 46px;
  }

  .header-brand {
    gap: 4px;
  }

  .header-logo {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .header-title h1 {
    font-size: 12px;
    max-width: 65px;
  }

  .btn-user-badge {
    padding: 4px 6px;
    font-size: 10px;
    max-width: 60px;
  }
  .btn-user-badge span:last-child {
    display: none; /* Hide arrow */
  }

  .header-icon-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .live-indicator {
    padding: 4px;
  }

  .btn {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 10px;
  }

  .terminal-quick-switch-bar {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .btn-terminal-chip {
    width: 100% !important;
    min-height: 40px !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  .mode-segmented-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .scanner-actions {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .scanner-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 13.5px !important;
  }

  .item-card {
    padding: 10px 12px !important;
    gap: 6px !important;
  }

  .item-quantity-stepper .step-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
  }

  .item-quantity-stepper .badge-unit {
    font-size: 12.5px !important;
    padding: 4px 8px !important;
  }
}

/* ============================================================= */
/* 14. OPERATOR LOGIN & USER BADGE */
/* ============================================================= */
.btn-user-badge {
  background: #F3F4F6;
  color: #374151;
  border-color: #E5E7EB;
  font-weight: 700;
}

.btn-user-badge:hover {
  background: #E5E7EB;
}

.btn-user-badge.admin-active {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.login-tabs-nav {
  display: flex;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.login-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-tab-btn.active {
  background: var(--surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.login-tab-panel {
  display: none;
}

.login-tab-panel.active {
  display: block;
}

.badge-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-chip:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
  color: #0369A1;
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 240px;
  margin: 12px auto 6px;
}

.pin-key-btn {
  height: 50px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.1s ease;
  user-select: none;
}

.pin-key-btn:active {
  background: #E2E8F0;
  transform: scale(0.96);
}

.pin-key-btn.key-clear {
  color: #EF4444;
  font-size: 16px;
}

.pin-key-btn.key-backspace {
  color: #D97706;
  font-size: 18px;
}

/* ============================================================= */
/* 15. ADMIN DASHBOARD MODAL & REALTIME COMPONENTS */
/* ============================================================= */
.modal-admin-content {
  width: 92vw !important;
  max-width: 980px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.admin-tabs-nav {
  display: flex;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  border: 1px solid #E2E8F0;
  margin-top: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.6);
}

.admin-tab-btn.active {
  color: #0284C7;
  background: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-sub-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  max-height: calc(85vh - 160px);
}

.admin-sub-panel.active {
  display: block;
}

.admin-hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-hero-metric-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}

.admin-hero-metric-card:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

.admin-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-metric-val {
  font-size: 26px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #0F172A;
  line-height: 1.2;
  margin: 4px 0 2px 0;
}

.admin-metric-hint {
  font-size: 11px;
  color: #94A3B8;
}

.admin-live-stream-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.admin-stream-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s ease;
}

.admin-stream-row:last-child {
  border-bottom: none;
}

.admin-stream-row:hover {
  background: #F8FAFC;
}

.admin-stream-row.is-new-flash {
  animation: flash-row-green 1.5s ease-out;
}

@keyframes flash-row-green {
  0% { background: #ECFDF5; }
  100% { background: transparent; }
}

.admin-stream-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748B;
  flex-shrink: 0;
  width: 60px;
}

.admin-stream-operator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.admin-stream-shelf {
  padding: 2px 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #DBEAFE;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-stream-barcode {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #0F172A;
  font-size: 13px;
  flex-shrink: 0;
}

.admin-stream-desc {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.admin-stream-qty {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-stream-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .admin-stream-desc {
    width: 100%;
    flex: none;
    order: 10;
    font-size: 12px;
    color: #334155;
    white-space: normal;
  }
}

.admin-shelf-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
}

.admin-shelf-toolbar-input {
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  padding: 8px 12px;
  text-transform: uppercase;
}

.admin-shelves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.admin-shelf-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
}

.admin-shelf-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.admin-shelf-card.shelf-card-active {
  border-color: #0284C7;
  background: #F0F9FF;
}

.admin-shelf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-shelf-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  font-family: 'JetBrains Mono', monospace;
}

.badge-active-shelf {
  font-size: 10px;
  font-weight: 700;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 2px 6px;
  border-radius: 6px;
}

.shelf-pill-variety {
  font-size: 11px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #BFDBFE;
}

.admin-shelf-card-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #64748B;
  background: #F8FAFC;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #F1F5F9;
}

.admin-shelf-card-stats strong {
  color: #0F172A;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}

.admin-shelf-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-shelf-action {
  flex: 1;
  min-height: 32px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-shelf-action:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.btn-shelf-reset {
  min-height: 32px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-shelf-reset:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.admin-system-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-catalog-table-wrapper {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Universal Data Tables (Admin Catalog, Users, Live Stream) */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  text-align: left;
}

table.data-table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

table.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

table.data-table tr:hover td {
  background: rgba(2, 132, 199, 0.04);
}

/* ==========================================================================
   AUTHENTICATION OVERLAY & MODAL SYSTEM (LOGIN / REGISTER)
   ========================================================================== */
.auth-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at top, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.88)), rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.25s ease;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 440px;
  width: 100%;
  padding: 30px;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo-badge {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px auto;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.auth-card-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: var(--surface);
  color: #0284C7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Auth Input Fields with Icons */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  pointer-events: none;
  user-select: none;
  opacity: 0.8;
}

.input-icon-wrap .form-input {
  padding-left: 38px;
}

.auth-options-row {
  margin: 12px 0 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0284C7;
  cursor: pointer;
}

.auth-error-msg {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

.btn-auth-submit {
  width: 100%;
  height: 46px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
}

.auth-demo-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-demo-fill {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-demo-fill:hover {
  background: #DBEAFE;
  color: #1E40AF;
  border-color: #93C5FD;
}

.auth-info-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}

/* ==========================================================================
   ROLE BADGES & USER MANAGEMENT TABLE
   ========================================================================== */
.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-role-admin {
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
}

.badge-role-operator {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.badge-role-viewer {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.admin-users-table-wrapper {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.user-role-select {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: all 0.15s;
}

.user-role-select:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.user-status-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s;
}

.user-status-active {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

.user-status-active:hover {
  background: #D1FAE5;
}

.user-status-inactive {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}

.user-status-inactive:hover {
  background: #FEE2E2;
}

.btn-user-delete {
  background: transparent;
  color: #EF4444;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-user-delete:hover {
  background: #FEE2E2;
  border-color: #FECACA;
}

/* Micro-flash on new live stream entry */
@keyframes streamHighlight {
  0% { background-color: #E0F2FE; transform: scale(1.01); }
  100% { background-color: transparent; transform: scale(1.0); }
}

.stream-row-flash {
  animation: streamHighlight 1.5s ease-out;
}

/* Detailed Beginner Guide System — KALDIRILDI (kullanıcı eğitimi EGITIM_REHBERI.md ile yapılır) */

/* Shelf Picker Items with Inline Rename */
.shelf-picker-item {
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 4px 6px 4px 12px;
  gap: 8px;
  transition: all 0.15s ease;
}

.shelf-picker-item:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.shelf-picker-item.active {
  border-color: #0284C7;
  background: #EFF6FF;
}

.shelf-picker-select-btn {
  flex: 1;
  background: none;
  border: none;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  padding: 4px 0;
}

.shelf-picker-edit-btn {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: #64748B;
  transition: background 0.1s;
}

.shelf-picker-edit-btn:hover {
  background: #E2E8F0;
  color: #0284C7;
}

/* Export Options */
.export-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.export-option-card:hover {
  border-color: #0284C7;
  background: #F0F9FF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

/* Shelf Management Toolbar */
.admin-shelf-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  background: var(--surface-alt);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.admin-shelf-btn-reset {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-shelf-btn-reset:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

/* ==========================================================================
   POINT MOBILE (PM67 & PM351) & COMPACT RUGGED TERMINAL OPTIMIZATIONS
   ========================================================================== */
.viewer-alert-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.06);
}

.viewer-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-alert-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.viewer-alert-text {
  font-size: 12.5px;
  color: #1E40AF;
  line-height: 1.45;
}

.viewer-alert-text strong {
  font-weight: 700;
  color: #1E3A8A;
}

.scanner-aux-btn {
  background: none;
  border: none;
  font-size: 16px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-aux-btn:hover {
  background: var(--surface-alt);
  color: var(--primary-accent);
}

.scanner-aux-btn.active {
  background: #EFF6FF;
  color: #0284C7;
  box-shadow: inset 0 0 0 1px #BFDBFE;
}

/* PM67 / PM351 Terminal Specific Screen Rules */
@media (max-width: 480px), (max-height: 650px) and (max-width: 768px) {
  :root {
    --space-md: 8px;
    --space-lg: 10px;
  }

  body.terminal-pm-mode, body {
    font-size: 13px;
  }

  /* Compact Header */
  header.app-header {
    height: 44px !important;
    padding: 4px 10px !important;
  }

  .header-logo {
    width: 28px !important;
    height: 28px !important;
    font-size: 15px !important;
  }

  .header-title h1 {
    font-size: 14px !important;
  }

  /* Main Container Compact */
  .app-main {
    padding: 6px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 8px !important;
  }

  /* Mode Selector Compact */
  .mode-segmented-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }

  .mode-card-option {
    padding: 6px 8px !important;
    border-radius: 8px !important;
  }

  .mode-card-title {
    font-size: 11.5px !important;
  }

  .mode-card-desc {
    display: none !important; /* Save vertical space on 4.0-4.3" terminal screen */
  }

  /* Scanner Card Compact & Prominent */
  .scanner-card {
    padding: 10px 10px !important;
    border-radius: 12px !important;
  }

  .scanner-header-row {
    margin-bottom: 6px !important;
  }

  .scanner-input-box {
    height: 44px !important;
    border-width: 2px !important;
  }

  .scanner-input {
    font-size: 15px !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 700 !important;
  }

  .scanner-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    margin-top: 6px !important;
  }

  .scanner-actions .btn {
    min-height: 42px !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    font-weight: 700 !important;
  }

  /* Hero Stats Card Compact */
  .stats-hero-card {
    padding: 8px 10px !important;
  }

  .stats-hero-value {
    font-size: 26px !important;
  }

  .stats-hero-badge {
    font-size: 32px !important;
  }

  /* Shelf quick chips */
  .shelf-quick-chips {
    gap: 4px !important;
    padding: 4px 0 !important;
  }

  .shelf-quick-chip {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
  }

  /* Item Cards in small screen */
  .item-card {
    padding: 9px 11px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }

  .item-top {
    margin-bottom: 4px !important;
  }

  .item-barcode {
    font-size: 13px !important;
  }

  .item-product-name {
    font-size: 12.5px !important;
    margin-bottom: 4px !important;
  }

  .item-bottom {
    margin-top: 4px !important;
  }

  .item-quantity-stepper .step-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 15px !important;
  }

  /* Bottom Navigation Compact */
  .mobile-bottom-nav {
    height: 52px !important;
  }

  .bottom-nav-icon {
    font-size: 16px !important;
  }

  .bottom-nav-label {
    font-size: 9px !important;
  }
}

/* Explicit PM Terminal High-Contrast Mode */
body.terminal-pm-mode {
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border: #CBD5E1;
  --text-main: #0F172A;
  background-color: #F8FAFC !important;
}

body.terminal-pm-mode .scanner-input-box {
  border-color: #0284C7 !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}

body.terminal-pm-mode .item-card {
  border-left: 3px solid #0284C7 !important;
}

body.terminal-pm-mode .badge-shelf {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* ============================================================= */
/* 22. TOP-RIGHT LAST SCANNED PRODUCT HUD (NOTIFICATION + UNDO) */
/* ============================================================= */
.last-scanned-hud {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  background: #FFFFFF;
  border: 1px solid #BAE6FD;
  border-left: 4px solid #0284C7;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.25), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  width: calc(100% - 28px);
  animation: hudSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s, transform 0.2s;
}

@keyframes hudSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.last-scanned-content {
  flex: 1;
  min-width: 0;
}

.last-scanned-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.last-scanned-badge {
  font-size: 11px;
  font-weight: 800;
  color: #0369A1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.last-scanned-time {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

.last-scanned-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.last-scanned-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  flex-wrap: wrap;
}

.last-scanned-undo-btn {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.last-scanned-undo-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.last-scanned-close-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.last-scanned-close-btn:hover {
  color: #0F172A;
}

/* ============================================================= */
/* 23. ELEGANT IN-APP DIALOG MODAL (Clean, Non-bloated alerts)   */
/* ============================================================= */
.app-dialog-content {
  max-width: 380px !important;
  width: 90% !important;
  text-align: center;
  padding: 22px 20px !important;
  border-radius: 16px !important;
}

.app-dialog-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.app-dialog-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.app-dialog-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.app-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Item Card 3-Dots Action Button */
.btn-card-menu-dots {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: var(--surface-alt) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.btn-card-menu-dots:hover {
  background: #E2E8F0 !important;
  border-color: #CBD5E1 !important;
}

.btn-card-menu-dots:active {
  transform: scale(0.92) !important;
  background: #CBD5E1 !important;
}

/* Fluid Responsive Button Scaling Across All Mobile Devices */
@media (max-width: 768px) {
  .scanner-actions {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr !important;
    gap: clamp(8px, 2.5vw, 12px) !important;
    margin-top: 10px !important;
  }

  .scanner-actions .btn {
    min-height: clamp(52px, 13vw, 62px) !important;
    font-size: clamp(14px, 4vw, 16.5px) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    font-weight: 800 !important;
  }

  .scanner-actions .btn-camera {
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
    letter-spacing: -0.2px !important;
  }

  .scanner-actions .btn-camera:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
  }

  .scanner-actions .btn-serial-trigger {
    background: #F5EEFD !important;
    color: #6B21A8 !important;
    border: 1.5px solid #D8B4FE !important;
  }

  .scanner-actions .btn-serial-trigger:active {
    transform: scale(0.96) !important;
  }
}

/* Fluid Responsive Layout for Handheld Terminals & All Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden !important;
  }

  /* Two clean scanner buttons with ample touch target */
  .scanner-actions {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .scanner-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    padding: 8px 10px !important;
  }

  /* Quick chips side by side with 50% width */
  .terminal-quick-switch-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .btn-terminal-chip {
    width: 100% !important;
    min-height: 40px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    padding: 6px 8px !important;
  }

  /* Mode selection cards side by side */
  .mode-segmented-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .mode-card-option {
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }

  .mode-card-title {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .mode-card-desc {
    display: none !important; /* Hide long subtitle to prevent crowding */
  }

  /* Item cards - clean, non-colliding layout */
  .item-card {
    padding: 10px 12px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .item-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-height: 28px !important;
  }

  .item-index-barcode {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .item-idx {
    width: 20px !important;
    height: 20px !important;
    font-size: 10.5px !important;
    flex-shrink: 0 !important;
  }

  .item-barcode {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    letter-spacing: 0.3px !important;
  }

  .item-badges-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .badge-shelf {
    font-size: 11px !important;
    padding: 3px 7px !important;
    white-space: nowrap !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
  }

  .item-product-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 2px 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .item-bottom {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 8px !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding-top: 6px !important;
    margin-top: 2px !important;
  }

  .item-meta {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    min-width: 0 !important;
    flex: 1 !important;
    line-height: 1.3 !important;
  }

  .item-meta-main {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .item-meta-note {
    font-size: 10.5px !important;
    color: #0284C7 !important;
    background: #F0F9FF !important;
    border: 1px solid #BAE6FD !important;
    border-radius: 4px !important;
    padding: 1px 5px !important;
    margin-top: 2px !important;
    display: inline-block !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .item-quantity-stepper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .item-quantity-stepper .step-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .item-quantity-stepper .badge-unit {
    padding: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }
}

/* Ultra-narrow devices (Point Mobile PM67 320px) */
@media (max-width: 340px) {
  .scanner-actions {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .scanner-actions .btn {
    min-height: 44px !important;
  }
  .terminal-quick-switch-bar {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================= */
/* DESKTOP REAL-TIME MONITORING & COMMAND CENTER (PC: >= 1025px) */
/* ============================================================= */
.desktop-monitoring-ribbon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
}

.desktop-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 106px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.desktop-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.desktop-kpi-card.kpi-card-highlight {
  background: linear-gradient(135deg, #004D73 0%, #006699 50%, #0284C7 100%);
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
}

.desktop-kpi-card.kpi-card-highlight .kpi-label {
  color: #BAE6FD;
}

.desktop-kpi-card.kpi-card-highlight .kpi-number {
  color: #FFFFFF;
}

.desktop-kpi-card.kpi-card-highlight .kpi-unit {
  color: rgba(255, 255, 255, 0.85);
}

.desktop-kpi-card.kpi-card-highlight .kpi-card-footer {
  color: rgba(255, 255, 255, 0.8);
}

.desktop-kpi-card.kpi-card-stream {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
}

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

.kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748B;
}

.kpi-badge-icon {
  font-size: 18px;
  opacity: 0.8;
}

.kpi-card-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}

.kpi-number {
  font-size: 32px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  color: #0F172A;
  letter-spacing: -1px;
}

.kpi-unit {
  font-size: 12px;
  font-weight: 800;
  color: #64748B;
}

.kpi-card-footer {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-indicator {
  color: #10B981;
  font-size: 12px;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.kpi-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 800;
}

.kpi-last-info {
  margin: 2px 0;
}

.kpi-last-title {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-last-sub {
  font-size: 11px;
  color: #0284C7;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2-Column Desktop Monitoring Grid */
.desktop-monitoring-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
}

.desktop-monitor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop-monitor-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sidebar Monitoring Cards */
.monitor-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.monitor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

.monitor-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sidebar-link {
  background: none;
  border: none;
  color: #0284C7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-sidebar-link:hover {
  background: #F0F9FF;
}

.stream-live-tag {
  font-size: 10px;
  font-weight: 800;
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
  padding: 2px 6px;
  border-radius: 8px;
}

/* Shelf Distribution List in Sidebar */
.desktop-shelf-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desktop-shelf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.desktop-shelf-item:hover {
  background: #F0F9FF;
  border-color: #BAE6FD;
}

.desktop-shelf-item.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.desktop-shelf-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
}

.desktop-shelf-stats-badges {
  display: flex;
  gap: 4px;
}

.shelf-pill-qty {
  background: #E0F2FE;
  color: #0369A1;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.shelf-pill-count {
  background: #F1F5F9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.desktop-shelf-item.active .shelf-pill-qty {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.desktop-shelf-item.active .shelf-pill-count {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

/* Real-Time Activity Stream */
.desktop-stream-scroll {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stream-empty-hint {
  padding: 16px 10px;
  text-align: center;
  color: #94A3B8;
  font-size: 11.5px;
}

.desktop-stream-row {
  padding: 6px 10px;
  background: #F8FAFC;
  border-radius: 8px;
  border-left: 3px solid #10B981;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s ease;
}

.desktop-stream-row.stream-action-edit {
  border-left-color: #3B82F6;
  background: #F0F7FF;
}

.desktop-stream-row.stream-action-delete {
  border-left-color: #EF4444;
  background: #FEF2F2;
}

.desktop-stream-row.stream-pulse-in {
  animation: streamPulse 0.4s ease-out;
}

.desktop-stream-row.stream-action-edit.stream-pulse-in {
  animation: streamPulseEdit 0.4s ease-out;
}

.desktop-stream-row.stream-action-delete.stream-pulse-in {
  animation: streamPulseDelete 0.4s ease-out;
}

@keyframes streamPulse {
  0% { background: #DCFCE7; transform: translateX(-4px); }
  100% { background: #F8FAFC; transform: translateX(0); }
}

@keyframes streamPulseEdit {
  0% { background: #DBEAFE; transform: translateX(-4px); }
  100% { background: #F0F7FF; transform: translateX(0); }
}

@keyframes streamPulseDelete {
  0% { background: #FEE2E2; transform: translateX(-4px); }
  100% { background: #FEF2F2; transform: translateX(0); }
}

.stream-row-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #64748B;
}

.stream-dot {
  color: #10B981;
  font-size: 10px;
}

.stream-action-edit .stream-dot {
  color: #3B82F6;
}

.stream-action-delete .stream-dot {
  color: #EF4444;
}

.stream-action-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.stream-action-tag.tag-scan {
  background: #D1FAE5;
  color: #065F46;
}
.stream-action-tag.tag-edit {
  background: #DBEAFE;
  color: #1E40AF;
}
.stream-action-tag.tag-delete {
  background: #FEE2E2;
  color: #991B1B;
}

.stream-shelf-badge {
  background: #E2E8F0;
  color: #334155;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
}

.stream-device {
  color: #94A3B8;
  margin-left: auto;
}

.stream-row-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.stream-pname {
  font-weight: 700;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.stream-pqty {
  font-weight: 800;
  color: #059669;
  font-size: 11.5px;
  flex-shrink: 0;
}

.stream-action-edit .stream-pqty {
  color: #2563EB;
}

.stream-action-delete .stream-pqty {
  color: #DC2626;
}

.stream-details-sub {
  font-size: 10px;
  color: #64748B;
  font-weight: 500;
  margin-top: -1px;
}

/* Desk USB Scanner Input Box */
.desk-scan-row {
  display: flex;
  gap: 8px;
}

.desk-scan-input {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  padding: 0 12px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  background: #F8FAFC;
  transition: all 0.15s;
}

.desk-scan-input:focus {
  outline: none;
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.desk-scan-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}

/* Monitor Table Toolbar (Desktop) */
.monitor-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.desktop-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-desk-action {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-desk-action:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.desktop-table-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.green {
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

/* ============================================================= */
/* DESKTOP REAL-TIME MONITORING & COMMAND CENTER CSS             */
/* ============================================================= */

/* 1. 5-KPI Monitoring Grid */
.desktop-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
  width: 100%;
}

.desktop-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.desktop-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  border-color: #CBD5E1;
}

/* Card 1: Highlighted Total Okutulan */
.desktop-kpi-card.kpi-card-highlight {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border: none;
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.35);
  color: #FFFFFF;
}

.desktop-kpi-card.kpi-card-highlight .kpi-label {
  color: rgba(255, 255, 255, 0.9);
}

.desktop-kpi-card.kpi-card-highlight .kpi-number {
  color: #FFFFFF;
}

.desktop-kpi-card.kpi-card-highlight .kpi-unit {
  color: rgba(255, 255, 255, 0.8);
}

.desktop-kpi-card.kpi-card-highlight .kpi-card-footer {
  color: rgba(255, 255, 255, 0.85);
}

.desktop-kpi-card.kpi-card-highlight .pulse-indicator {
  color: #86EFAC;
}

/* Card 5: Stream Card */
.desktop-kpi-card.kpi-card-stream {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}

.kpi-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748B;
  text-transform: uppercase;
}

.kpi-badge-icon {
  font-size: 18px;
  line-height: 1;
}

.kpi-card-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 8px;
}

.kpi-number {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  color: #0F172A;
}

.kpi-unit {
  font-size: 12.5px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.03em;
}

.kpi-card-footer {
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-indicator {
  color: #10B981;
  font-size: 10px;
  animation: pulseGlow 1.5s infinite;
}

.kpi-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #15803D;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.kpi-last-info {
  margin: 6px 0;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpi-last-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #166534;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-last-sub {
  font-size: 11.5px;
  color: #15803D;
  margin-top: 2px;
  font-weight: 500;
}

#desktopLastScannedTime {
  color: #16A34A;
  font-weight: 600;
}

/* 2. Desktop 2-Column Monitoring Grid */
.desktop-monitoring-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.desktop-monitor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.monitor-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.04);
}

.monitor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}

.monitor-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sidebar-link {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0284C7;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sidebar-link:hover {
  background: #E0F2FE;
  border-color: #BAE6FD;
}

.stream-live-tag {
  font-size: 10.5px;
  font-weight: 800;
  background: #DCFCE7;
  color: #15803D;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Shelf distribution list */
.desktop-shelf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.desktop-shelf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.desktop-shelf-item:hover {
  background: #F0F9FF;
  border-color: #BAE6FD;
  transform: translateX(3px);
}

.desktop-shelf-item.active {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
}

.desktop-shelf-item.active .desktop-shelf-title {
  color: #FFFFFF;
}

.desktop-shelf-item.active .shelf-pill-qty {
  background: #FFFFFF;
  color: #0284C7;
}

.desktop-shelf-item.active .shelf-pill-count {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.desktop-shelf-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-shelf-icon {
  font-size: 14px;
}

.desktop-shelf-title {
  font-weight: 700;
  font-size: 13px;
  color: #0F172A;
}

.desktop-shelf-stats-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shelf-pill-qty {
  background: #E0F2FE;
  color: #0369A1;
  font-weight: 800;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.shelf-pill-count {
  background: #F1F5F9;
  color: #475569;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
}

/* Live stream ticker */
.desktop-stream-scroll {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.desktop-stream-row {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #10B981;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.stream-empty-hint {
  padding: 24px 10px;
  text-align: center;
  color: #94A3B8;
  font-size: 12px;
  line-height: 1.5;
}

/* Desk USB scanner input */
.desk-scan-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.desk-scan-input {
  flex: 1;
  height: 42px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  background: #F8FAFC;
  color: #0F172A;
  outline: none;
  transition: all 0.2s ease;
}

.desk-scan-input:focus {
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.desk-scan-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
}

.desk-scan-btn:hover {
  background: #0369A1;
  transform: translateY(-1px);
}

/* 3. Right Column: Monitoring Main */
.desktop-monitor-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Table Toolbar */
.monitor-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 320px;
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 14px;
  height: 42px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: #0F172A;
}

.shelf-dropdown-filter {
  height: 42px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  min-width: 180px;
  outline: none;
  transition: all 0.2s ease;
}

.shelf-dropdown-filter:focus {
  border-color: #0284C7;
  background: #FFFFFF;
}

.desktop-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-desk-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #334155;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-desk-action:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0284C7;
}

#btnDesktopExcel {
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

#btnDesktopExcel:hover {
  background: #0369A1;
}

/* List Header */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #F8FAFC;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #E2E8F0;
}

.list-header-left {
  display: flex;
  align-items: center;
}

#listTitle {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

.list-count {
  background: #E0F2FE;
  color: #0284C7;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 8px;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #16A34A;
}

.legend-dot.green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  animation: pulseGlow 1.5s infinite;
}

/* ============================================================= */
/* DESKTOP SCREEN ADJUSTMENTS (>= 1025px)                        */
/* ============================================================= */
@media (min-width: 1025px) {
  .app-main {
    max-width: 1680px !important;
    margin: 0 auto !important;
    padding: 24px 32px !important;
  }

  .desktop-only {
    display: flex !important;
  }

  .desktop-kpi-grid.desktop-only {
    display: grid !important;
  }

  .desktop-monitoring-grid {
    display: grid !important;
  }

  .desktop-monitor-sidebar.desktop-only {
    display: flex !important;
    flex-direction: column !important;
  }

  .mobile-only {
    display: none !important;
  }

  .initial-simple-hero {
    display: none !important;
  }

  .btn-toggle-scanned-drawer {
    display: none !important;
  }

  .scanned-items-collapsible-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .scanned-drawer-body {
    display: block !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    margin-top: 0 !important;
  }

  .scanned-drawer-body.collapsed {
    display: block !important;
  }

  /* Desktop Clean Monitoring Card Layout for Items - Full Product Name Visibility */
  .items-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .item-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 13px 18px !important;
    border-radius: 12px !important;
    border: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    gap: 8px !important;
    transition: all 0.15s ease !important;
  }

  .item-card:hover {
    border-color: #93C5FD !important;
    background: #F8FAFC !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08) !important;
    transform: translateY(-1px) !important;
  }

  .item-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .item-product-name {
    width: 100% !important;
    flex: none !important;
    margin: 2px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
  }

  .item-extra-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .item-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 !important;
    padding-top: 8px !important;
    border-top: 1px solid #F1F5F9 !important;
    width: 100% !important;
  }

  .item-meta {
    font-size: 12px !important;
    color: #64748B !important;
  }

  .item-quantity-stepper {
    margin-left: auto !important;
  }
}

/* Mobile Barcode Entry Card (Under BAŞLA button) */
.mobile-barcode-entry-card {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Master Keyboard Lock Button (High Visibility Mobile Control) */
.btn-keyboard-master-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  user-select: none;
  border: 2px solid transparent;
}

/* Durum 1: KİLİTLİ (Varsayılan - Lazer/Sensör Açık) */
.btn-keyboard-master-toggle.locked {
  background: #F0FDF4;
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.btn-keyboard-master-toggle.locked:hover {
  background: #DCFCE7;
}

.btn-keyboard-master-toggle.locked .master-toggle-icon {
  background: #10B981;
  color: #FFFFFF;
}

.btn-keyboard-master-toggle.locked .master-toggle-title {
  color: #047857;
}

.btn-keyboard-master-toggle.locked .master-toggle-sub {
  color: #059669;
}

.btn-keyboard-master-toggle.locked .master-toggle-action-badge {
  background: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Durum 2: AÇIK (Elle Yazma Modu) */
.btn-keyboard-master-toggle.unlocked {
  background: #EFF6FF;
  border-color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.btn-keyboard-master-toggle.unlocked .master-toggle-icon {
  background: #0284C7;
  color: #FFFFFF;
}

.btn-keyboard-master-toggle.unlocked .master-toggle-title {
  color: #1D4ED8;
}

.btn-keyboard-master-toggle.unlocked .master-toggle-sub {
  color: #2563EB;
}

.btn-keyboard-master-toggle.unlocked .master-toggle-action-badge {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.master-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.master-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.master-toggle-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.master-toggle-sub {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}

.master-toggle-action-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mobile-barcode-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 4px 6px 4px 12px;
  transition: all 0.2s ease;
}

.mobile-barcode-input-row:focus-within {
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.mobile-barcode-icon {
  font-size: 18px;
  color: #0284C7;
  flex-shrink: 0;
}

.mobile-barcode-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  outline: none;
}

.mobile-barcode-input::placeholder {
  color: #94A3B8;
  font-weight: 500;
  font-size: 13.5px;
}

.mobile-barcode-clear-btn {
  background: #E2E8F0;
  color: #64748B;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-barcode-clear-btn:hover {
  background: #CBD5E1;
  color: #1E293B;
}

.camera-sensor-btn-kb.locked {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.camera-sensor-btn-kb.unlocked {
  background: #0284C7;
  color: #FFFFFF;
}

.mobile-barcode-submit-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-barcode-submit-btn:hover {
  background: #0369A1;
  transform: translateY(-1px);
}

.mobile-barcode-submit-btn:active {
  transform: scale(0.96);
}

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

.barcode-mode-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #0284C7;
}

.barcode-action-hint {
  font-size: 11px;
  color: #94A3B8;
}

/* ============================================================= */
/* MOBILE SCREEN ADJUSTMENTS (<= 1024px)                         */
/* ============================================================= */
@media (max-width: 1024px) {
  .desktop-only {
    display: none !important;
  }

  .desktop-kpi-grid {
    display: none !important;
  }

  .desktop-monitoring-grid {
    display: block !important;
  }

  .desktop-monitor-sidebar {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .mobile-only.scanned-items-collapsible-wrapper,
  .mobile-only.btn-toggle-scanned-drawer {
    display: flex !important;
  }

  .initial-simple-hero {
    display: flex !important;
    flex-direction: column !important;
    margin-top: 6px;
    gap: 14px;
  }

  .stats-hero-card {
    padding: 18px 20px !important;
  }

  .btn-mobile-hero-start {
    min-height: 76px !important;
  }

  .btn-toggle-scanned-drawer {
    display: flex !important;
  }

  .scanned-drawer-body.collapsed {
    display: none !important;
  }
}




/* =============================================================
   CANLI OKUTMA BİLDİRİM ZİLİ (Okunmamış Sayaç Rozeti)
   ============================================================= */
.btn-notif-toggle {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.45);
  border: 2px solid #fff;
  box-sizing: content-box;
  display: none;
  align-items: center;
  justify-content: center;
  animation: notifBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

@keyframes notifBadgePop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* =============================================================
   DENETİM GÜNLÜĞÜ (AUDIT LOG) GÖRÜNÜMLÜ CANLI AKIŞ
   Bildirim modali, admin paneli ve istatistik sayfasında ortak stil
   ============================================================= */
.audit-stream {
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 12px;
  background: #FDFEFF;
  overflow: hidden;
}

.audit-stream .audit-head {
  display: grid;
  grid-template-columns: 70px 84px 1fr 84px;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  background: #F1F5F9;
  border-bottom: 2px solid #E2E8F0;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748B;
  position: sticky;
  top: 0;
  z-index: 2;
}
.audit-stream .audit-head .ah-qty { text-align: right; }

.audit-body {
  max-height: 420px;
  min-height: 160px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.audit-row {
  display: grid;
  grid-template-columns: 70px 84px 1fr 84px;
  gap: 8px;
  align-items: start;
  padding: 7px 12px;
  border-bottom: 1px solid #EEF2F7;
  border-left: 3px solid transparent;
  position: relative;
  animation: auditRowIn 0.3s ease;
}
.audit-row:nth-child(even) { background: #F8FAFC; }
.audit-row:hover { background: #EFF6FF; }

.audit-row.is-scan   { border-left-color: #10B981; }
.audit-row.is-update { border-left-color: #F59E0B; }
.audit-row.is-delete { border-left-color: #EF4444; }

@keyframes auditRowIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.audit-row.is-new-flash { animation: auditFlash 1.6s ease; }
@keyframes auditFlash {
  0% { background: #FEF9C3; }
  100% { background: transparent; }
}

/* Zaman hücresi: saat + gün (tam zaman title'da) */
.audit-row .c-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
  padding-top: 1px;
}
.audit-row .c-time small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.3px;
}

/* İşlem tipi rozeti */
.audit-row .c-chip {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  border-radius: 5px;
  padding: 3px 0;
  text-align: center;
  white-space: nowrap;
  margin-top: 1px;
}
.c-chip.chip-scan   { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.c-chip.chip-update { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.c-chip.chip-delete { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }

/* Ürün adı + meta satırı */
.audit-row .c-main { min-width: 0; }
.audit-row .c-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-row .c-meta {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #64748B;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-row .c-meta .m-bc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #475569;
  font-weight: 700;
}
.audit-row .c-meta .m-sep { color: #CBD5E1; margin: 0 3px; }

/* Miktar hücresi */
.audit-row .c-qty {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  padding-top: 1px;
}
.audit-row .c-qty small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.3px;
}
.audit-row .c-qty.is-scan   { color: #047857; }
.audit-row .c-qty.is-update { color: #B45309; }
.audit-row .c-qty.is-delete { color: #B91C1C; }

.audit-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 12px;
  font-weight: 600;
}

/* Dar ekran: sütunları sıklaştır */
@media (max-width: 520px) {
  .audit-stream .audit-head { grid-template-columns: 58px 74px 1fr 66px; padding: 6px 8px; }
  .audit-row { grid-template-columns: 58px 74px 1fr 66px; gap: 6px; padding: 6px 8px; }
  .audit-row .c-name { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .audit-row .c-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* =============================================================
   KAMERA HAMBURGER ARAÇ MENÜSÜ (üst çubukta yalnız ☰ + ✕ kalır)
   ============================================================= */
.camera-fs-menu-btn {
  position: relative;
  width: 40px; height: 40px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.camera-fs-menu-btn:active { transform: scale(0.93); }

.camera-fs-menu-btn .cam-menu-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #10B981; box-shadow: 0 0 8px #10B981;
  display: none;
}
.camera-fs-menu-btn.has-active .cam-menu-dot { display: block; }

.camera-fs-menu {
  position: absolute;
  top: calc(max(14px, env(safe-area-inset-top)) + 48px);
  right: 14px;
  z-index: 75;
  min-width: 264px; max-width: min(320px, calc(100vw - 28px));
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: none;
}
.camera-fs-menu.open { display: block; animation: camMenuIn 0.18s ease; }
@keyframes camMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cam-menu-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: #94A3B8;
  padding: 6px 10px 7px;
}

.cam-menu-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  background: transparent; border: none;
  color: #FFFFFF; text-align: left;
  padding: 10px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.cam-menu-row:hover, .cam-menu-row:active { background: rgba(255, 255, 255, 0.09); }

.cam-menu-row.active-torch {
  background: rgba(16, 185, 129, 0.16);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.cam-row-ic { font-size: 19px; width: 28px; text-align: center; flex-shrink: 0; }
.cam-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cam-row-t { font-size: 13px; font-weight: 800; line-height: 1.25; }
.cam-row-d { font-size: 10.5px; color: #94A3B8; font-weight: 600; line-height: 1.3; }

/* JS'in metin güncellediği eski etiketler: görünmez ama çalışır durumda */
.cam-row-legacy { display: none; }

/* Durum çipi: .active-torch sınıfından tamamen CSS ile beslenir */
.cam-row-state {
  flex-shrink: 0;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px;
  border-radius: 999px; padding: 4px 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #CBD5E1;
}
.cam-row-state::before { content: "KAPALI"; }
.cam-menu-row.active-torch .cam-row-state {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
}
.cam-menu-row.active-torch .cam-row-state::before { content: "AÇIK"; }

/* Eylem satırı (Kamera Değiştir) — sağ ok ipucu */
.cam-menu-row.cam-row-action .cam-row-body { padding-right: 4px; }
.cam-menu-row.cam-row-action::after {
  content: "›"; font-size: 18px; font-weight: 800; color: #64748B; flex-shrink: 0;
}

/* Eski üst çubuk aracı sınıfı artık menü dışında kullanılmıyor; mini geri uyumluluk */
.camera-fs-tool-btn { display: none; }

/* Düzenleme ekranı: ürün fotoğraf küçük resimleri */
.ep-thumb {
  position: relative;
  width: 68px; height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, #E2E8F0);
  background: #F1F5F9;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-thumb .ep-del {
  position: absolute; top: 3px; right: 3px;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff; border: none;
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Ana sayfa arama düğmesi: boşken odaklar, doluyken temizler */
.search-toggle-btn {
  border: none;
  background: transparent;
  padding: 4px 6px 4px 2px;
  margin-right: 2px;
  font-size: 15px;
  cursor: pointer;
  color: #94A3B8;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.search-toggle-btn:hover { background: #F1F5F9; color: #0F172A; }
.search-toggle-btn:active { transform: scale(0.92); }
.search-toggle-btn .clearing { color: #DC2626; font-weight: 800; }

/* Arama kutusu vurgusu: 🔍 ile açıldığında nereye yazılacağı belli olsun */
.search-box.search-flash {
  animation: searchFlash 1.8s ease;
}
@keyframes searchFlash {
  0%   { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
  12%  { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.4); border-color: #0284C7; background: #F0F9FF; }
  30%  { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.25); }
  45%  { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.4); border-color: #0284C7; background: #F0F9FF; }
  70%, 100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

/* =============================================================
   ARAMA KUTUSU — GLOBAL STİLLER (mobil dahil TÜM ekranlar)
   Düzeltme: önceki kurallar yalnızca min-width:1025px medya
   sorgusundaydı; 1025px altında kutu stilsiz kalıyor, görünmüyordu.
   ============================================================= */
.toolbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 0 10px;
  height: 46px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.search-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  font-size: 14px;          /* mobilde 16px altı klavye zoom yapar */
  background: transparent;
  color: #0F172A;
  font-family: inherit;
  padding: 0 6px;
}
.search-input::placeholder { color: #94A3B8; }

/* Mobilde raf filtresi alt satıra, tam genişlik */
@media (max-width: 768px) {
  .toolbar-search-wrap { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; height: 48px; }
  .shelf-dropdown-filter { width: 100%; }
  .search-input { font-size: 16px; }  /* iOS klavye zoom'unu engeller */
}
