/* ==========================================================================
   YILDIZ OTO LASTİK & SERVİS - 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;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   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;
}

.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.75rem;
}

.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: 17px;
  height: 17px;
  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);
}

.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;
}

.brand-logo {
  width: 44px;
  height: 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;
}

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

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

.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;
  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);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.45rem 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.35rem;
}

.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;
}

.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);
}

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

.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;
}

.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;
}

.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;
  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;
}

/* ==========================================================================
   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;
}

.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;
}

.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;
}

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

.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;
}

.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;
}

.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.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

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

.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);
}

.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: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;
  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;
}

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

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

/* 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;
}

.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: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.15s;
}

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

.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;
}

/* ==========================================================================
   SEPET MODAL / ÇEKMECE VEYA SEPET ALANI
   ========================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

.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: 90px;
}

.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;
}

.cart-item {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.cart-item-dim {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

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

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #334155;
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.cart-del-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1.1rem;
}

/* 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.4rem 0.6rem;
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

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

.cart-discount-input {
  width: 70px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #10b981;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  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.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* 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.75rem;
  margin-bottom: 1rem;
}

.cart-general-discount-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 0.4rem;
  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.85rem;
  margin-bottom: 1rem;
}

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

.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.3rem;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

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

/* 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.4rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  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;
}

/* ==========================================================================
   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;
}

.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.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.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.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.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;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(15px);
  transition: transform 0.2s ease;
}

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

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

.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.5rem;
  cursor: pointer;
  line-height: 1;
}

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

.modal-body {
  padding: 1.5rem;
}

.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);
}

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

@media (max-width: 580px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   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;
  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;
}

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

.toast {
  background: var(--bg-card);
  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 & BİLGİSAYAR DUYARLI (RESPONSIVE) TASARIM
   ========================================================================== */

/* 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 1rem;
  }

  .main-content {
    padding: 1rem;
  }

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

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

/* Mobil Telefon Uyumluluğu (<= 768px) */
@media (max-width: 768px) {
  .login-screen-wrapper {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.25rem;
  }

  .header-container {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

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

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .user-badge-display {
    padding: 0.3rem 0.5rem;
  }

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

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

  .btn-logout {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
  }

  .btn-logout span {
    font-size: 0.9rem;
  }

  .cart-toggle-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  /* Sekme Menüsü Yatay Kaydırma */
  .nav-bar {
    position: sticky;
    top: 54px;
    z-index: 40;
  }

  .nav-container {
    padding: 0 0.75rem;
    gap: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .nav-tab-btn {
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
  }

  /* İstatistik Kartları Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

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

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

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

  .stat-value {
    font-size: 1.15rem;
  }

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

  /* Filtre & Araç Çubukları */
  .toolbar-card {
    padding: 0.85rem;
    gap: 0.65rem;
  }

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

  .filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select, .btn {
    width: 100%;
  }

  .date-range-bar {
    padding: 0.85rem;
    gap: 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }

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

  .date-inputs-wrapper > div {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .date-input-field {
    flex: 1;
    width: 100%;
  }

  .quick-presets {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .quick-presets::-webkit-scrollbar {
    display: none;
  }

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

  .custom-table th, .custom-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.82rem;
  }

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

  .modal-container {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    max-width: 100% !important;
  }

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

  .modal-body {
    padding: 1.15rem;
  }

  .modal-footer {
    padding: 0.85rem 1.15rem;
  }

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

  /* A4 Önizleme Kartı */
  .a4-preview-card {
    padding: 1rem;
    font-size: 11px;
  }

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

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

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

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

  /* Toast Bildirimleri */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}

