/* ============================================================
   K-DESIGN Stok Yönetim Sistemi - Tüm Stiller
   Resmi Tasarım Teması: https://k-design.com.tr/
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #b38b3a;
  --primary-dark: #8c6a28;
  --primary-light: #dfba63;
  --primary-rgb: 179, 139, 58;
  --bg-dark: #f8f9fc;
  --bg-darker: #f0f2f7;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-sidebar: #141416;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #d1d5db;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --warning: #d97706;
  --warning-dark: #b45309;
  --info: #2563eb;
  --info-dark: #1d4ed8;
  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --glow-primary: 0 0 20px rgba(179, 139, 58, 0.22);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   LOGIN SAYFASI
   ============================================================ */
#login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  background: #f4f5f8;
  background-image: radial-gradient(circle at 50% 25%, rgba(179, 139, 58, 0.09) 0%, rgba(244, 245, 248, 0) 70%);
  overflow: hidden;
}

#login-section::before {
  content: '';
  position: absolute;
  width: 120vw;
  height: 120vw;
  background: radial-gradient(circle, rgba(179, 139, 58, 0.05) 0%, rgba(244, 245, 248, 0) 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulseBg 12s ease-in-out infinite alternate;
}

@keyframes pulseBg {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.login-bg-decoration {
  display: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 38px;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
}

.login-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #b38b3a, #8c6a28);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: center;
  animation: fadeIn 0.3s ease;
  font-weight: 500;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0.8;
  z-index: 10;
  transition: var(--transition);
}

.password-toggle:hover {
  opacity: 1;
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

/* ============================================================
   FORM ELEMANLARI
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 13px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Tarayıcı Autofill Beyaz Kutu/Siyah Yazı Uyumlu Ayarı */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
  border: 1.5px solid var(--border) !important;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(179, 139, 58, 0.15);
}

.form-input-lg, .form-select-lg {
  padding: 15px 18px;
  font-size: 1.05rem;
  font-weight: 500;
}

.form-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-select option {
  background: #ffffff;
  color: var(--text-primary);
}

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

.form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

textarea.form-input {
  min-height: 80px;
  resize: vertical;
}

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #b38b3a, #8c6a28);
  color: white;
  box-shadow: 0 2px 10px rgba(179, 139, 58, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(179, 139, 58, 0.35);
  background: linear-gradient(135deg, #c59b48, #9a7630);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), var(--success-dark));
  color: white;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.25);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
  color: white;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), var(--warning-dark));
  color: white;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.25);
}

.btn-warning:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
}

.btn-info {
  background: linear-gradient(135deg, var(--info), var(--info-dark));
  color: white;
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background: #f9fafb;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
}

.btn-text { display: inline; }
.btn-spinner { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .btn-spinner { display: inline; }

/* QR Scan Button */
.btn-qr-scan {
  background: #ffffff;
  border: 2px dashed var(--primary);
  color: var(--primary-dark);
  padding: 22px;
  font-size: 1.05rem;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.btn-qr-scan:hover {
  background: rgba(179, 139, 58, 0.05);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.qr-scan-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.qr-scan-text {
  display: block;
  font-weight: 700;
}

/* ============================================================
   SIDEBAR (Obsidian Luxury Dark Bar)
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid #262629;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #262629;
}

.sidebar-logo-icon {
  flex-shrink: 0;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sidebar-logo-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #9ca3af;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(179, 139, 58, 0.16);
  color: #f1cf68;
  border-left: 3px solid var(--primary);
  padding-left: 13px;
  font-weight: 600;
}

.nav-item.hidden {
  display: none;
}

.nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #262629;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  flex-shrink: 0;
}

.sidebar-user-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.sidebar-user-role {
  display: block;
  font-size: 0.72rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#logout-btn {
  background: transparent;
  border: 1px solid #374151;
  color: #d1d5db;
}

#logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: #ef4444;
}

/* Sidebar Toggle Button (Mobil) */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.sidebar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
  display: block;
}

/* ============================================================
   İÇERİK ALANI
   ============================================================ */
.content {
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
  background-color: var(--bg-dark);
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   KARTLAR
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f3f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   İSTATİSTİK KARTLARI
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-card-danger {
  border-color: #fecaca;
  background: #fffcfc;
}

.stat-card-danger:hover {
  border-color: #f87171;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon-primary { background: rgba(179, 139, 58, 0.12); color: var(--primary); }
.stat-icon-success { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.stat-icon-info { background: rgba(37, 99, 235, 0.12); color: var(--info); }
.stat-icon-danger { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
.stat-icon-warning { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

/* ============================================================
   GRAFİKLER
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  height: 280px;
}

/* ============================================================
   TABLOLAR
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.table thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}

.table tbody td {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #374151;
  border-bottom: 1px solid #f1f3f7;
  background: #ffffff;
}

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

.table tbody tr:hover td {
  background: #f8fafc;
}

.table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.table tbody tr:nth-child(even):hover td {
  background: #f1f5f9;
}

.table-empty {
  text-align: center !important;
  padding: 40px 20px !important;
  color: var(--text-muted) !important;
  font-style: italic;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Reversed row (geri alınan işlem) */
.table tbody tr.row-reversed td {
  opacity: 0.5;
  text-decoration: line-through;
}

/* ============================================================
   BADGE'LER
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-muted {
  background: #f3f4f6;
  color: #4b5563;
}

.badge-gold {
  background: rgba(179, 139, 58, 0.12);
  color: var(--primary-dark);
  border: 1px solid rgba(179, 139, 58, 0.28);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Pulse animasyonu */
.badge-danger.pulse {
  animation: pulse 2s infinite;
}

/* ============================================================
   FİLTRELER
   ============================================================ */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filters-bar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.filter-group {
  flex: 1;
  min-width: 160px;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex: none;
  min-width: auto;
  align-items: flex-end;
  padding-bottom: 0;
}

/* ============================================================
   MODALLER
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
  color: var(--text-primary);
}

.modal-sm {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f3f7;
  background: #ffffff;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 34px;
  height: 34px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: #e5e7eb;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-body-center {
  text-align: center;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f3f7;
  background: #fafbfd;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer-center {
  justify-content: center;
}

/* Onay Modal */
.confirm-message {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  padding: 12px 0;
}

/* ============================================================
   STOK FORM ALANI
   ============================================================ */
.stock-form-layout {
  max-width: 560px;
}

.stock-form-card {
  padding: 28px;
}

.product-info-card {
  background: #faf8f3;
  border: 1px solid #e8dec8;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.product-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.product-info-row + .product-info-row {
  border-top: 1px solid #eee7d5;
}

.product-info-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.product-info-value {
  font-weight: 600;
  color: var(--text-primary);
}

.product-info-stock {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
}

/* Miktar Kontrol */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
}

.quantity-btn {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--border);
  background: #f9fafb;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quantity-minus {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
}

.quantity-plus {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
}

.quantity-btn:hover {
  background: #f3f4f6;
  color: var(--primary);
}

.quantity-input {
  border-radius: 0;
  text-align: center;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  width: 120px;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Stock Divider */
.stock-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.stock-divider::before,
.stock-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.stock-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

/* ============================================================
   QR KOD
   ============================================================ */
.qr-reader-wrapper {
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
  text-align: center;
}

.qr-reader {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--primary);
  animation: qrPulse 2s infinite;
}

@keyframes qrPulse {
  0%, 100% { border-color: var(--primary); box-shadow: 0 0 0 0 rgba(179, 139, 58, 0.3); }
  50% { border-color: var(--primary-light); box-shadow: 0 0 16px 4px rgba(179, 139, 58, 0.2); }
}

.qr-preview {
  margin-top: 16px;
  text-align: center;
}

.qr-preview label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.qr-preview-image {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.qr-preview-image img {
  width: 150px;
  height: 150px;
}

.qr-display {
  margin-bottom: 16px;
}

.qr-display-img {
  width: 220px;
  height: 220px;
  background: white;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.qr-product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.qr-product-code {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ============================================================
   ALERT/BİLDİRİMLER
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
  font-weight: 500;
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.alert-danger {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* ============================================================
   TOAST BİLDİRİMLERİ
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 300px;
  max-width: 420px;
  pointer-events: all;
  animation: slideInRight 0.3s ease;
  transition: var(--transition);
}

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #1f2937;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-danger {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--info);
}

/* ============================================================
   KRİTİK STOK UYARILARI
   ============================================================ */
.critical-list {
  padding: 16px 24px;
}

.critical-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.critical-item:hover {
  background: #fee2e2;
}

.critical-item:last-child {
  margin-bottom: 0;
}

.critical-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.critical-item-icon {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

.critical-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.critical-item-code {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.critical-item-stock {
  font-weight: 700;
  color: var(--danger);
  font-size: 1.1rem;
}

/* ============================================================
   SAYFALAMA
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
}

.pagination-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.pagination-btn:hover {
  background: #f9fafb;
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   ANİMASYONLAR
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   RESPONSİVE - TABLET (768px)
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .content {
    margin-left: 0;
    padding: 20px;
    padding-top: 72px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .page-header .btn {
    width: 100%;
  }

  .filters-bar {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group {
    min-width: 100%;
  }

  .filter-actions {
    flex-direction: row;
    width: 100%;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
    max-height: 95vh;
  }

  .login-card {
    padding: 32px 24px;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 40px);
  }

  .toast-container {
    right: 10px;
    left: 10px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

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

  .stock-form-layout {
    max-width: 100%;
  }

  .table thead th,
  .table tbody td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

/* ============================================================
   RESPONSİVE - TELEFON (480px)
   ============================================================ */
@media (max-width: 480px) {
  .content {
    padding: 14px;
    padding-top: 68px;
  }

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

  .stat-card {
    padding: 14px;
  }

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

  .page-title {
    font-size: 1.3rem;
  }

  .chart-container {
    height: 220px;
  }

  .login-title {
    font-size: 1.6rem;
  }

  .btn-lg {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .quantity-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .quantity-input {
    width: 90px;
    font-size: 1.2rem !important;
  }

  .btn-qr-scan {
    padding: 20px;
  }

  .qr-scan-icon {
    font-size: 1.6rem;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* ============================================================
   YAZDIRMA
   ============================================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  .sidebar,
  .sidebar-toggle,
  .sidebar-overlay,
  .toast-container,
  .btn,
  .filters-bar,
  .page-header .btn,
  #logout-btn {
    display: none !important;
  }

  .content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .card {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
    backdrop-filter: none;
  }

  .table thead th {
    background: #f5f5f5;
    color: #333;
  }

  .table tbody td {
    color: #333;
    border-color: #ddd;
  }

  .stat-card {
    border: 1px solid #ddd;
    background: white;
  }

  .page-title {
    color: #333;
  }

  .qr-print-container {
    text-align: center;
    padding: 20px;
  }

  .qr-print-container img {
    width: 200px;
    height: 200px;
  }
}

/* ============================================================
   ÜRÜN GÖRSELLERİ, KATALOG & LIGHTBOX STİLLERİ
   ============================================================ */

/* Ürün Tablosu Küçük Görsel */
.product-table-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid var(--border);
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-table-thumb:hover {
  transform: scale(1.15);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-table-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Ürün Modalı Görsel Yükleyici */
.product-image-uploader {
  margin-top: 6px;
}

.product-image-preview-box {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--primary);
  background: #f3f4f6;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.product-image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  transition: background 0.2s;
}

.image-remove-btn:hover {
  background: #b91c1c;
}

.image-upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.or-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================================
   DİJİTAL ÜRÜN KATALOĞU (GRID & KARTLAR)
   ============================================================ */
.catalog-filters-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group-grow {
  flex: 1;
  min-width: 260px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.catalog-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
}

.catalog-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(179, 139, 58, 0.14);
}

.catalog-card-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f7;
}

.catalog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.catalog-card:hover .catalog-card-img {
  transform: scale(1.05);
}

.catalog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  background: #f8fafc;
}

.catalog-card-img-placeholder .placeholder-icon {
  font-size: 2.8rem;
  opacity: 0.6;
}

.catalog-card-img-placeholder span {
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.catalog-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #374151;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 2;
}

.catalog-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
}

.catalog-card-code {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.catalog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.catalog-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1f3f7;
}

.catalog-stock-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.catalog-stock-dot.in-stock {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

.catalog-stock-dot.low-stock {
  background: #d97706;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.5);
}

.catalog-stock-dot.out-of-stock {
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.5);
}

.catalog-stock-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.catalog-inspect-btn {
  background: #f9fafb;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.catalog-inspect-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ============================================================
   LIGHTBOX MODAL STİLLERİ
   ============================================================ */
.lightbox-modal-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 650px;
  width: 90%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUpFade 0.3s ease;
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

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

.lightbox-image-wrap {
  width: 100%;
  max-height: 480px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-image-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.lightbox-details {
  padding: 20px 24px;
  background: #ffffff;
}

.lightbox-details h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.lightbox-details p {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.lightbox-stock {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Mobil Katalog Uyumluluğu */
@media (max-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .catalog-card-body {
    padding: 12px;
  }

  .catalog-card-title {
    font-size: 0.9rem;
    height: 2.6em;
    margin-bottom: 8px;
  }

  .catalog-card-code {
    font-size: 0.72rem;
  }

  .catalog-inspect-btn span.btn-text {
    display: none;
  }
}

/* ============================================================
   EXCEL TOPLU YÜKLEME & DROPZONE STİLLERİ
   ============================================================ */
.excel-dropzone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  background: #faf8f3;
  cursor: pointer;
  transition: var(--transition);
}

.excel-dropzone:hover,
.excel-dropzone.dragover {
  background: #f5eedf;
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(179, 139, 58, 0.15);
}

.excel-dropzone:hover .dropzone-icon {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

