/* ==========================================================================
   YILDIZ OTO LASTİK & SERVİS - DUYARLI VE MODERN CSS STİLLERİ
   ========================================================================== */

:root {
  --bg-main: #0b1329;
  --bg-card: #152238;
  --bg-card-hover: #1c2d4a;
  --bg-input: #0b1329;
  --border-color: #243656;
  --border-focus: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --primary: #f59e0b;       /* Lastikçi / Sarı Kehribar */
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.25);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  
  --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  
  /* Cihaz Güvenli Alanları (iPhone Çentik, Dynamic Island, Home Bar) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html {
  overflow-x: hidden;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

/* ==========================================================================
   GİRİŞ EKRANI (LOGIN SCREEN)
   ========================================================================== */
.login-screen-wrapper {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #1e293b, #0b1329 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  overflow-y: auto;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0,0,0,0.5);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #e11d48, #3b82f6);
}

.login-brand-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 20px var(--primary-glow);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  margin-bottom: 1.15rem;
}

.login-cloud-status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.login-cloud-status:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: -0.35rem;
  margin-bottom: 0.15rem;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.2s;
}

.remember-label:hover {
  color: var(--text-main);
}

.remember-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

.login-hint-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: left;
}

.login-hint-box table {
  width: 100%;
  margin-top: 0.4rem;
  border-collapse: collapse;
}

.login-hint-box td {
  padding: 0.2rem 0;
}

/* ==========================================================================
   HEADER / ÜST BAR
   ========================================================================== */
.app-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
  padding-top: var(--safe-top);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-badge-display {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-lg);
  color: var(--text-main);
}

.user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid var(--primary);
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.user-role-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.role-admin {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.role-staff {
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   BULUT SENKRONİZASYONU (CLOUD SYNC) STİLLERİ
   ========================================================================== */
.cloud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cloud-status-badge:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cloud-pulse-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  display: inline-block;
  background-color: #94a3b8;
  position: relative;
  transition: background-color 0.3s;
}

.cloud-pulse-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.cloud-pulse-dot.online::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.4);
  animation: cloud-pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.cloud-pulse-dot.connecting {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.cloud-pulse-dot.offline {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes cloud-pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.cloud-status-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cloud-status-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff;
}

.cart-toggle-btn {
  position: relative;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.cart-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.cart-count-bubble {
  background-color: #0f172a;
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

/* ==========================================================================
   NAVBAR SEKMELERİ
   ========================================================================== */
.nav-bar {
  background-color: #121d31;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 45;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.02);
}

.nav-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: rgba(245, 158, 11, 0.05);
}

/* ==========================================================================
   ANA İÇERİK ALANI
   ========================================================================== */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* ==========================================================================
   ÖZET İSTATİSTİK KARTLARI
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--stat-accent, var(--primary));
}

.stat-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.2rem;
  line-height: 1.2;
}

/* ==========================================================================
   ARAÇ ÇUBUĞU & FİLTRELER
   ========================================================================== */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary {
  background-color: var(--primary);
  color: #0f172a;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger-bg);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   TABLO STİLLERİ
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.mobile-table-hint {
  display: none;
  font-size: 0.76rem;
  color: var(--primary);
  padding: 0.5rem 0.85rem;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  gap: 0.4rem;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background-color: #121d31;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  font-size: 0.9rem;
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Lastik Ürün Kart Hücresi */
.tire-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tire-badge-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #0b1329;
  border: 1px solid var(--border-color);
}

.tire-brand-model {
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.tire-code {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.tire-dimension {
  font-family: 'Consolas', monospace;
  font-weight: 700;
  font-size: 0.92rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  white-space: nowrap;
}

/* Mevsim Rozetleri */
.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.season-summer {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.season-winter {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.season-allseason {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Stok Sayaç Butonları (Sadece Admin) */
.stock-counter {
  display: inline-flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stock-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.15s;
}

.stock-btn:hover {
  background: #334155;
  color: #fff;
}

.stock-btn:active {
  background: var(--primary);
  color: #0f172a;
}

.stock-val {
  min-width: 38px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0 0.4rem;
}

.stock-low {
  color: #f87171;
}

.stock-normal {
  color: #4ade80;
}

/* ==========================================================================
   HIZLI SATIŞ (POS) & SEPET ALANI
   ========================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.5rem;
  align-items: start;
}

/* Mobil Segment Seçici (Mobilde Görünür) */
.pos-mobile-nav {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.35rem;
  margin-bottom: 1rem;
  gap: 0.35rem;
}

.pos-mobile-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.pos-mobile-tab.active {
  background: var(--primary);
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.pos-cart-badge {
  background: #0f172a;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  min-width: 20px;
}

.pos-mobile-tab.active .pos-cart-badge {
  background: #0f172a;
  color: #fff;
}

/* Sepet Kartı */
.cart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 85px;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.cart-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-items-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-right: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.cart-item {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.cart-item-dim {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #334155;
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cart-qty-btn:hover {
  background: var(--primary);
  color: #0f172a;
}

.cart-del-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-left: 0.2rem;
  transition: all 0.15s;
}

.cart-del-btn:hover {
  background: var(--danger);
  color: #fff;
}

/* Sepet İçi İndirim Kontrolleri */
.cart-discount-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.cart-discount-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
}

.cart-discount-input {
  width: 75px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #10b981;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  text-align: right;
}

.cart-discount-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

/* Genel Sepet İndirimi Bölümü */
.cart-general-discount-section {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.cart-general-discount-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-general-discount-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Müşteri Giriş Formu */
.customer-form-section {
  background: rgba(11, 19, 41, 0.8);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Toplam Özet */
.cart-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-color);
}

.summary-row.total .price {
  color: var(--primary);
}

.cart-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-dim);
}

.cart-empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Mobilde Sepete Git Yüzen Barı */
.mobile-floating-cart-bar {
  display: none;
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  left: 1rem;
  right: 1rem;
  background: #1e293b;
  border: 1px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.4);
  z-index: 85;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  animation: slideUpBar 0.25s ease-out;
}

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

.floating-cart-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.floating-cart-icon {
  font-size: 1.6rem;
}

.floating-cart-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.floating-cart-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.floating-cart-action {
  background: var(--primary);
  color: #0f172a;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   TARİH ARALIĞI & RAPOR KONTROLLERİ
   ========================================================================== */
.date-range-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.quick-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preset-chip {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
}

.preset-chip:hover, .preset-chip.active {
  background: var(--primary);
  color: #0f172a;
  border-color: var(--primary);
}

.date-inputs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.date-input-field {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.date-input-field:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   MODALLER (Açılır Pencereler)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(15px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-drag-handle {
  display: none;
  width: 40px;
  height: 4px;
  background-color: #475569;
  border-radius: 999px;
  margin: 0.65rem auto 0;
}

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: rgba(11, 19, 41, 0.4);
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   KULLANICI KARTLARI
   ========================================================================== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  transition: border-color 0.2s;
}

.user-card.current-user {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-card-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--primary);
}

.user-card-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.user-card-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   DEPOLAMA / EMANET LASTİK OTELİ KARTLARI
   ========================================================================== */
.storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.storage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.storage-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.storage-card.delivered {
  opacity: 0.75;
  border-style: dashed;
}

.storage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
}

.storage-customer-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.storage-plate-badge {
  font-family: 'Consolas', monospace;
  font-weight: 800;
  font-size: 0.82rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 0.25rem;
}

.storage-phone {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.storage-status-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
}

.storage-status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.storage-status-delivered {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.storage-tires-box {
  background: rgba(11, 19, 41, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.88rem;
}

.storage-tires-title {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.storage-dates-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
}

.storage-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
}

.storage-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  flex-wrap: wrap;
}

/* Sipariş İptal Stilleri */
.sale-cancelled-row {
  opacity: 0.55;
  background-color: rgba(239, 68, 68, 0.05) !important;
}

.sale-cancelled-row td strong.sale-id-text {
  text-decoration: line-through;
  color: #ef4444 !important;
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  display: inline-block;
  margin-top: 2px;
}

/* Alış Fiyatı Rozeti */
.tire-buy-price {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

/* ==========================================================================
   TOAST BİLDİRİMLERİ
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: calc(1.5rem + var(--safe-bottom));
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: slideInRight 0.25s ease-out;
  max-width: 400px;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-danger {
  border-left-color: var(--danger);
}

.toast-info {
  border-left-color: var(--info);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   A4 EKRAN ÖNİZLEME STİLLERİ (MODAL İÇİNDE GÖRÜNÜM)
   ========================================================================== */
.a4-preview-card {
  background: #ffffff;
  color: #0f172a;
  padding: 2.2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  font-size: 13px;
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   MOBİL & TABLET DUYARLI (RESPONSIVE) TASARIM - SIKIŞIKLIĞI ÖNLEYEN AYARLAR
   ========================================================================== */

/* Mobil Cihazlarda iOS Otomatik Zoom Engelleme */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Tablet Uyumluluğu (769px - 1024px) */
@media (max-width: 1024px) {
  .header-container {
    padding: 0.75rem 1.25rem;
  }

  .main-content {
    padding: 1.25rem;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .cart-card {
    position: static;
    top: auto;
    margin-top: 1.5rem;
  }
}

/* ==========================================================================
   MOBİL TELEFON UYUMLULUĞU (<= 768px) - KUSURSUZ VE FERAH TASARIM
   ========================================================================== */
@media (max-width: 768px) {

  /* Ana Taşıyıcı ve Boşluklar */
  .main-content {
    padding: 1rem 0.85rem calc(5.5rem + var(--safe-bottom));
  }

  /* 1. Header (Üst Bar) */
  .header-container {
    padding: 0.65rem 0.85rem;
    gap: 0.45rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.2rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .cloud-status-badge {
    padding: 0.45rem 0.65rem;
    gap: 0.35rem;
  }

  .cloud-status-badge .cloud-badge-text {
    display: none; /* Mobilde sadece yanıp sönen lamba noktası */
  }

  .user-badge-display {
    padding: 0.35rem 0.55rem;
    gap: 0.4rem;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.85rem;
  }

  .user-name {
    font-size: 0.8rem;
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-role-badge {
    display: none; /* Mobilde başlık sıkışıklığını önlemek için gizlenir */
  }

  .btn-logout {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }

  .btn-logout .logout-text {
    display: none; /* Mobilde sadece kapı simgesi */
  }

  .cart-toggle-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
  }

  .cart-toggle-btn .cart-text {
    display: none; /* Mobilde sadece sepet simgesi + adet */
  }

  /* 2. Sekme Menüsü Yatay Kaydırma (Akıcı ve Ferah) */
  .nav-bar {
    position: sticky;
    top: calc(52px + var(--safe-top));
    z-index: 40;
  }

  .nav-container {
    padding: 0.4rem 0.85rem;
    gap: 0.45rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .nav-tab-btn {
    padding: 0.65rem 0.95rem;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    scroll-snap-align: start;
  }

  .nav-tab-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--primary);
    color: var(--primary);
  }

  /* 3. İstatistik Kartları Grid (2 Kolon, Ferah Değerler) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .stat-card {
    padding: 0.95rem 0.85rem;
    gap: 0.75rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.25rem;
  }

  .stat-title {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .stat-value {
    font-size: 1.2rem;
    margin-top: 0.25rem;
  }

  /* 5. İstatistik kartı mobilde tam genişlik ve öne çıkar */
  .stats-grid .stat-card:last-child {
    grid-column: 1 / -1;
  }

  /* 4. Filtre & Araç Çubukları */
  .toolbar-card {
    padding: 1rem 0.9rem;
    gap: 0.85rem;
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 100%;
    width: 100%;
  }

  .search-input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.92rem;
  }

  /* Filtre Grubu: 2 Kolonlu Düzenli Izgara */
  .filter-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .filter-select {
    width: 100%;
    padding: 0.7rem 0.65rem;
    font-size: 0.85rem;
  }

  /* Buton filtre grubunda tam genişlik */
  .filter-group .btn {
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.92rem;
  }

  /* 5. Tabloların Dokunmatik Kaydırılabilirliği ve Ferahlığı */
  .table-responsive {
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
  }

  .mobile-table-hint {
    display: flex;
  }

  /* Tablo mobilde sütunların sıkışmaması için minimum genişliğe sahiptir */
  .custom-table {
    min-width: 780px;
  }

  .custom-table th, .custom-table td {
    padding: 0.85rem 0.9rem;
    font-size: 0.85rem;
  }

  /* 6. HIZLI SATIŞ (POS) MOBİL AYARLARI */
  .pos-mobile-nav {
    display: flex;
  }

  /* POS Ürün Kartları: Mobilde Tek Kolon, BÜYÜK ve FERAH Kartlar */
  #posProductsGrid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
  }

  #posProductsGrid .stat-card {
    padding: 1.15rem 1rem;
    gap: 0.85rem;
  }

  /* Mobilde Sepet / Ürün Görünümü Ayrımı */
  .pos-layout.view-products .cart-card {
    display: none;
  }

  .pos-layout.view-cart #posCatalogSection {
    display: none;
  }

  .pos-layout.view-cart .cart-card {
    display: block;
    margin-top: 0;
  }

  /* Yüzen Sepet Barı */
  .mobile-floating-cart-bar {
    display: flex;
  }

  /* Sepet İçi Elemanlar */
  .cart-item {
    padding: 0.95rem;
    gap: 0.75rem;
  }

  .cart-qty-btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }

  .cart-del-btn {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }

  .cart-discount-box {
    padding: 0.65rem;
  }

  /* 7. Tarih Aralığı ve Filtre Çubukları */
  .date-range-bar {
    padding: 1rem 0.9rem;
    gap: 0.85rem;
    flex-direction: column;
    align-items: stretch;
  }

  .date-inputs-wrapper {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .date-inputs-wrapper .date-pickers-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
  }

  .date-input-field {
    width: 100%;
    padding: 0.65rem 0.75rem;
  }

  .quick-presets {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    gap: 0.45rem;
  }

  .preset-chip {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .history-search-row {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
  }

  .history-search-row .date-input-field {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* 8. Modallerin Mobilde Bottom-Sheet Olarak Açılması */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-container {
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    max-width: 100% !important;
    border-bottom: none;
    border-left: none;
    border-right: none;
  }

  .modal-drag-handle {
    display: block;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1.25rem 1.15rem;
  }

  .modal-footer {
    padding: 0.85rem 1.15rem calc(0.85rem + var(--safe-bottom));
    display: flex;
    gap: 0.65rem;
  }

  .modal-footer .btn {
    flex: 1;
    padding: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* 9. A4 Önizleme Kartı (Modal İçi) */
  .a4-preview-card {
    padding: 1.25rem 1rem;
    font-size: 11px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
  }

  .a4-preview-card .a4-table {
    min-width: 520px;
  }

  .a4-company-name {
    font-size: 17px !important;
  }

  .a4-info-grid {
    flex-direction: column;
    gap: 10px;
  }

  .a4-signatures {
    flex-direction: column;
    gap: 1.5rem;
  }

  .a4-signature-box {
    width: 100% !important;
  }

  /* 9.5 Depolama Kartları (Mobil) */
  .storage-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* 10. Kullanıcı Kartları (Admin) */
  .users-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* 11. Toast Bildirimleri */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + var(--safe-bottom));
  }

  .toast {
    max-width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
}

/* Küçük Ekranlar (<= 380px) Ekstra İyileştirme */
@media (max-width: 380px) {
  .header-container {
    padding: 0.55rem 0.65rem;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 1.1rem;
  }

  .brand-title {
    font-size: 0.92rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-group {
    grid-template-columns: 1fr;
  }
}
