/* ==================== MUTFAK KAPISI - Modern CSS ==================== */

/* -------- RENK PALETİ -------- */
:root {
  --primary: #6366F1;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --secondary: #10B981;
  --secondary-dark: #059669;
  --accent: #F43F5E;
  --accent-light: #FFF1F2;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
}

/* -------- RESET & BASE -------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* -------- SCROLLBAR -------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* -------- NAVBAR -------- */
.navbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .logo { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.navbar .logo-emoji { font-size: 1.5rem; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-actions button {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}
.navbar-actions button:hover { background: rgba(255,255,255,0.25); }
.navbar .wa-status { font-size: 0.75rem; opacity: 0.8; display: flex; align-items: center; gap: 4px; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wa-dot.online { background: #4ade80; }
.wa-dot.offline { background: #f87171; }

/* -------- SIDEBAR -------- */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}
.admin-sidebar {
  width: 250px;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  transition: var(--transition);
  z-index: 900;
}
.sidebar-section-label {
  padding: 8px 20px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.sidebar-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar-item .icon { font-size: 1.1rem; width: 24px; text-align: center; }
.sidebar-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.admin-content {
  flex: 1;
  padding: 24px;
  overflow-x: auto;
  min-width: 0;
}

/* Hamburger menü */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.hamburger-btn:hover { background: rgba(255,255,255,0.15); }
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 899;
}

@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  .admin-sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    height: calc(100vh - 60px);
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .admin-content { padding: 16px; }
}

/* -------- KARTLAR -------- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h2, .card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stat kartları */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  text-align: center;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.stat-card.success .stat-value { color: var(--secondary); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--accent); }

/* -------- BUTONLAR -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-success { background: var(--secondary); color: #fff; }
.btn-success:hover { background: var(--secondary-dark); }
.btn-danger { background: var(--accent); color: #fff; }
.btn-danger:hover { background: #E11D48; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #D97706; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* -------- FORM -------- */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-white);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 150px; }
textarea.form-control { min-height: 80px; resize: vertical; }

/* Checkbox grup */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  transition: var(--transition);
}
.checkbox-group label:has(input:checked) {
  background: var(--primary-light);
  color: var(--primary);
}
.checkbox-group input[type="checkbox"] { accent-color: var(--primary); }

/* File upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.file-upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.file-upload-area .upload-text { color: var(--text-light); font-size: 0.85rem; }
.file-upload-preview { margin-top: 12px; }
.file-upload-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border);
}

/* -------- TABLO -------- */
.table-wrapper { overflow-x: auto; margin: -4px; padding: 4px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
thead th {
  background: var(--border-light);
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:hover { background: var(--primary-light); }
tbody tr:last-child td { border-bottom: none; }

/* -------- BADGE -------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-success { background: #ECFDF5; color: #059669; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-danger { background: #FFF1F2; color: #E11D48; }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-neutral { background: var(--border-light); color: var(--text-light); }

/* -------- MODAL -------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* -------- TOAST BİLDİRİM -------- */
.toast-container {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease;
  max-width: 360px;
}
.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--accent); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }

/* -------- LOGIN SAYFALARI -------- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 30%, #A78BFA 60%, #C4B5FD 100%);
  padding: 20px;
}
.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-card .logo-area {
  text-align: center;
  margin-bottom: 28px;
}
.login-card .logo-area .logo-emoji { font-size: 3rem; }
.login-card .logo-area h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 8px;
}
.login-card .logo-area p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 4px;
}
.login-card .form-control { padding: 12px 14px; }
.login-card .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 8px;
}
.login-card .divider {
  text-align: center;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  position: relative;
}
.login-card .divider::before, .login-card .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.login-card .divider::before { left: 0; }
.login-card .divider::after { right: 0; }
.login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.login-link a { font-weight: 600; }

/* -------- LANDING PAGE -------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 50%, #A78BFA 100%);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto 28px; }
.hero .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}
.hero .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.section-header p { color: var(--text-light); margin-top: 8px; }

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-body { padding: 14px; }
.product-card-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.product-card-body .product-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -------- SİPARİŞ SAYFASI -------- */
.order-section { max-width: 800px; margin: 0 auto; padding: 24px 20px; }
.order-grid {
  display: grid;
  gap: 12px;
}
.order-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.order-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.order-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.order-item-img:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; min-width: 0; }
.order-item-info h4 { font-size: 0.9rem; font-weight: 600; }
.item-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
  padding: 6px 10px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}
.order-item-info .item-meta { font-size: 0.78rem; color: var(--text-light); }
.order-item-info .item-price { font-size: 1rem; font-weight: 700; color: var(--primary); margin-top: 2px; }

.btn-remove-photo { display: block; margin-top: 8px; background: var(--accent); color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: opacity 0.2s; }
.btn-remove-photo:hover { opacity: 0.85; }
.order-item-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.qty-spinner { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: var(--border-light);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-btn:active { background: var(--primary); color: #fff; }
.qty-minus { border-right: 1px solid var(--border); }
.qty-plus { border-left: 1px solid var(--border); }
.order-item-controls input {
  width: 55px;
  text-align: center;
  padding: 6px 2px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
}
.order-item-controls input::-webkit-inner-spin-button,
.order-item-controls input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.order-item-controls input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.order-item-controls .unit { font-size: 0.75rem; color: var(--text-light); }

/* Sipariş geçmişi */
.order-history-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.order-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-history-header .order-id { font-weight: 600; font-size: 0.85rem; color: var(--primary); }
.order-history-header .order-date { font-size: 0.78rem; color: var(--text-muted); }
.order-details-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.order-details-list .detail-chip {
  background: var(--border-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* -------- SİPARİŞ YÖNETİMİ TABLO -------- */
.order-table-wrapper {
  overflow-x: auto;
}
.order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.order-table thead th {
  background: var(--border-light);
  padding: 8px 10px;
  white-space: nowrap;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
}
.order-table thead th:first-child, .order-table thead th:nth-child(2) { text-align: left; }
.order-table tbody td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.order-table tbody td:first-child, .order-table tbody td:nth-child(2) { text-align: left; }
.order-table tbody tr:hover { background: var(--primary-light); }
.order-table input[type="number"] {
  width: 60px;
  text-align: center;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}
.order-table .product-total-row td { font-weight: 700; background: var(--warning-light); }

/* -------- İNDİRİM INPUT -------- */
.approve-actions { display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 100px; }
.discount-input-group { display: flex; align-items: center; gap: 4px; }
.discount-label { font-size: 0.65rem; color: var(--text-light); white-space: nowrap; font-weight: 600; }
.discount-input { width: 65px; text-align: center; padding: 3px 4px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; }
.action-cell { white-space: nowrap; }

/* -------- ADMIN SİPARİŞ GÖRÜNÜMLERİ -------- */
.location-group {
  margin-bottom: 20px;
}
.location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}
.location-header .count {
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

/* -------- PRODUCT TOTALS -------- */
.product-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.product-total-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.product-total-card .pt-emoji { font-size: 1.5rem; }
.product-total-card .pt-name { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.product-total-card .pt-value { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.product-total-card .pt-unit { font-size: 0.72rem; color: var(--text-muted); }

/* -------- TABS (yedek) -------- */
.tab-group { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-light);
  transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* -------- SEKMELERİ GİZLE -------- */
.admin-section { display: none; }
.admin-section.active { display: block; }

/* -------- SEARCH / FILTER -------- */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-bar input, .search-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.search-bar input { flex: 1; min-width: 200px; }

/* -------- HOW IT WORKS (LANDING) -------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step-card {
  text-align: center;
  padding: 24px;
}
.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}
.step-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.step-card p { color: var(--text-light); font-size: 0.85rem; }

/* Regions  */
.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.region-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.region-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.region-card .region-emoji { font-size: 2rem; margin-bottom: 8px; }
.region-card h3 { font-size: 0.95rem; font-weight: 600; }

/* Footer */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px 20px;
  font-size: 0.82rem;
}
.footer a { color: var(--primary-light); }

/* -------- UTILITIES -------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-nowrap { white-space: nowrap; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* -------- MOBİL RESPONSIVE -------- */
@media (min-width: 769px) {
  .order-item-img { width: 110px; height: 110px; }
  .order-grid { grid-template-columns: repeat(2, 1fr); }
  .product-photo-sm { width: 64px; height: 64px; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  .hero { padding: 50px 16px; }
  .section { padding: 40px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-img { height: 120px; }
  .form-row { flex-direction: column; }
  .form-row > * { min-width: 100%; }
  .modal { max-width: 100%; border-radius: var(--radius-sm); }
  .login-card { padding: 24px; }
  .login-card .logo-area h1 { font-size: 1.3rem; }
  .card { padding: 14px; }
  table { font-size: 0.78rem; }
  thead th, tbody td { padding: 6px 8px; }
  .product-totals-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.1rem; }
  .order-table input[type="number"] { width: 50px; }

  /* Admin tabloları mobil uyum */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
  .order-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
  .order-table { min-width: 600px; font-size: 0.72rem; }
  .order-table thead th { padding: 6px 6px; font-size: 0.6rem; }
  .order-table tbody td { padding: 6px 6px; }
  .location-header { font-size: 0.85rem; padding: 10px 12px; }
  .approve-actions { min-width: 80px; }
  .discount-input { width: 50px; font-size: 0.7rem; }
  .discount-label { font-size: 0.58rem; }
  table { min-width: 500px; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input, .search-bar select { min-width: 0; flex: 1 1 45%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .search-bar input { min-width: 100%; }
  .navbar { padding: 0 12px; height: 54px; }
  .navbar .logo { font-size: 1.1rem; }
  .order-table { min-width: 500px; font-size: 0.65rem; }
  .order-table thead th { font-size: 0.55rem; padding: 4px 4px; }
  .order-table tbody td { padding: 4px 4px; }
  table { min-width: 400px; font-size: 0.7rem; }
  thead th, tbody td { padding: 4px 6px; }
  .admin-content { padding: 10px; }
  .location-header { font-size: 0.8rem; padding: 8px 10px; border-radius: 6px 6px 0 0; }
  .btn-sm { padding: 4px 8px; font-size: 0.65rem; }
  .approve-actions { min-width: 70px; gap: 4px; }
  .discount-input { width: 45px; font-size: 0.65rem; }
}

/* -------- LOADING -------- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
.loading-overlay.active { display: flex; }

/* -------- EMPTY STATE -------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* -------- PRODUCT PHOTO IN TABLE -------- */
.product-photo-sm {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.product-photo-sm:hover { transform: scale(1.1); box-shadow: var(--shadow-md); }
.product-photo-lg {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.product-photo-lg:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

/* -------- INLINE CRUD LIST -------- */
.crud-list { list-style: none; }
.crud-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.crud-list li:last-child { border-bottom: none; }
.crud-list .item-name { font-weight: 500; }
.crud-list .item-actions { display: flex; gap: 6px; }
.crud-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.crud-inline-form input { flex: 1; }

/* -------- KAR/ZARAR COLORS -------- */
.profit { color: var(--secondary); font-weight: 600; }
.loss { color: var(--accent); font-weight: 600; }

/* -------- IMAGE LIGHTBOX -------- */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  color: #fff;
  font-size: 2rem;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  padding: 8px 24px;
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius);
}

/* -------- PAYMENT TYPE -------- */
.payment-type-selector {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.payment-type-option {
  flex: 1;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-white);
}
.payment-type-option:hover { border-color: var(--primary-light); background: var(--primary-light); }
.payment-type-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 2px var(--primary); }
.payment-type-option .pt-icon { font-size: 1.8rem; margin-bottom: 6px; }
.payment-type-option .pt-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.iban-info-box {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}
.iban-info-box .iban-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; font-size: 0.9rem; }
.iban-info-box .iban-detail { font-size: 0.85rem; color: var(--text); margin: 4px 0; }
.iban-info-box .iban-number { font-family: 'Courier New', monospace; font-size: 1rem; font-weight: 700; color: var(--primary-dark); letter-spacing: 1px; }
.iban-copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 8px;
  transition: var(--transition);
}
.iban-copy-btn:hover { background: var(--primary-dark); }
.payment-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.payment-badge.paid { background: #D1FAE5; color: #065F46; }
.payment-badge.unpaid { background: #FEE2E2; color: #991B1B; }
.payment-badge.cash { background: #FEF3C7; color: #92400E; }
.payment-badge.eft { background: #DBEAFE; color: #1E40AF; }
.payment-summary-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.payment-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.payment-summary-row:last-child { border-bottom: none; font-weight: 700; }

/* -------- PRINT -------- */
@media print {
  .navbar, .admin-sidebar, .hamburger-btn, .sidebar-overlay, .btn, .navbar-actions { display: none !important; }
  .admin-content { padding: 0; }
  body { background: #fff; }
}
