/* ══════════════════════════════════════════════════════════════
   Le Monde Du Tacos B2B — Kurumsal Açık Tema
   Renk: Beyaz içerik + Koyu sidebar + LMD kırmızı (#ed2939) vurgu
══════════════════════════════════════════════════════════════ */
:root {
  /* Sidebar — koyu */
  --sidebar-bg:    #1c1c2e;
  --sidebar-hover: #2a2a40;
  --sidebar-border:#2e2e45;
  --sidebar-text:  #c8c8e0;
  --sidebar-muted: #6b6b90;
  --sidebar-w:     240px;

  /* İçerik — açık */
  --bg:       #f4f5f7;
  --surface:  #ffffff;
  --elevated: #ffffff;
  --border:   #e4e6ea;
  --border-2: #d0d3da;

  /* Metin */
  --text:       #1a1d2e;
  --text-2:     #4a5568;
  --text-muted: #9aa5b4;

  /* Marka */
  --red:        #ed2939;
  --red-hover:  #c41f2e;
  --red-light:  rgba(237,41,57,.1);
  --red-border: rgba(237,41,57,.2);

  /* Semantik */
  --success:     #16a34a; --success-bg: #f0fdf4; --success-border:#bbf7d0;
  --warning:     #d97706; --warning-bg: #fffbeb; --warning-border:#fed7aa;
  --danger:      #dc2626; --danger-bg:  #fef2f2; --danger-border: #fecaca;
  --info:        #2563eb; --info-bg:    #eff6ff; --info-border:   #bfdbfe;

  /* Genel */
  --radius:    8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0,0,0,.15);
}
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar */
.topbar {
  height: 56px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.page-body { padding: 24px; flex: 1; }

/* ── Sidebar Logo ── */
.sidebar-logo {
  padding: 18px 16px; border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 10px;
  background: rgba(237,41,57,.06);
}
.sidebar-logo .logo-mark {
  width: 32px; height: 32px;
  background: var(--red); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(237,41,57,.4);
}
.sidebar-logo .logo-text { font-weight: 700; font-size: 13px; color: #fff; line-height: 1.3; }
.sidebar-logo .logo-sub  { font-size: 10px; color: var(--sidebar-muted); margin-top: 1px; }

/* ── Nav ── */
.sidebar-nav  { padding: 8px; flex: 1; }
.nav-section  { margin-bottom: 4px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--sidebar-muted);
  padding: 10px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active {
  background: rgba(237,41,57,.15); color: #fff;
  box-shadow: inset 3px 0 0 var(--red);
}
.nav-item .nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-item .badge-count {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 99px; min-width: 18px; text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px; border-top: 1px solid var(--sidebar-border);
  background: rgba(0,0,0,.1);
}

/* ══════════════════════════════════════════════════════════════
   KART
══════════════════════════════════════════════════════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: #fff; }
.card-title  { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; flex: 1; }
.card-body   { padding: 20px; }

/* ══════════════════════════════════════════════════════════════
   STAT KARTLARI (Dashboard)
══════════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }
.stat-value  { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-label  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-change { font-size: 11px; margin-top: 3px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   TABLO
══════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table, .table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th, table thead th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.table tbody td, table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tbody tr:last-child td, table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td, table tbody tr:hover td { background: #fafbfc; }

/* ══════════════════════════════════════════════════════════════
   FORM
══════════════════════════════════════════════════════════════ */
.form-group  { margin-bottom: 16px; }
.form-label, label.form-label, label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-control, input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 8px 12px; font-size: 13px; font-family: inherit;
  background: var(--surface); border: 1.5px solid var(--border-2);
  border-radius: var(--radius); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,41,57,.1);
}
select { height: 36px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; padding-top: 10px; }
.form-actions { margin-top: 20px; display: flex; gap: 8px; }

/* Form grid */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media(max-width:640px) { .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; } }

/* Settings layout */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.settings-nav-item {
  display: block; padding: 11px 16px; font-size: 13px;
  color: var(--text-2); border-left: 3px solid transparent;
  transition: all .15s; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: #fafbfc; color: var(--text); text-decoration: none; }
.settings-nav-item.active { border-left-color: var(--red); color: var(--red); background: var(--red-light); font-weight: 600; }
.settings-body { min-width: 0; }
@media(max-width:768px) { .settings-layout { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════
   BUTONLAR
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius); font-size: 13px;
  font-weight: 600; font-family: inherit; border: 1.5px solid transparent;
  cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-primary   { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 1px 4px rgba(237,41,57,.3); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-2); }
.btn-secondary:hover { background: #f4f5f7; color: var(--text); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-ghost     { background: transparent; color: var(--text-2); border-color: transparent; padding: 4px 8px; }
.btn-ghost:hover { background: var(--bg); }

/* ══════════════════════════════════════════════════════════════
   BADGE
══════════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; line-height: 1.6; }
.badge-primary { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.badge-neutral { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* ══════════════════════════════════════════════════════════════
   ALERT
══════════════════════════════════════════════════════════════ */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: #15803d; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: #b45309; }
.alert-danger, .alert-error { background: var(--danger-bg); border-color: var(--danger-border); color: #b91c1c; }
.alert-info    { background: var(--info-bg);    border-color: var(--info-border);    color: #1d4ed8; }

/* ══════════════════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.page-title { font-size: 20px; font-weight: 800; color: var(--text); }
.page-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   YARDIMCI
══════════════════════════════════════════════════════════════ */
.hidden      { display: none !important; }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.fw-600      { font-weight: 600; }
.fs-12       { font-size: 12px; }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }

/* Pagination */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 16px; }
.pagination a, .pagination span {
  padding: 5px 10px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--border-2); color: var(--text-2);
}
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination .active { background: var(--red); border-color: var(--red); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   MOBİL
══════════════════════════════════════════════════════════════ */
@media(max-width:768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   ADMIN ÖZEL — Topbar, Avatar, Dropdown, Ek sınıflar
══════════════════════════════════════════════════════════════ */

/* Topbar */
.topbar-title  { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-actions{ display: flex; align-items: center; gap: 8px; }

/* Avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; cursor: pointer;
  flex-shrink: 0;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  min-width: 180px; z-index: 200; display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: block; padding: 8px 14px; font-size: 13px;
  color: var(--text-2); transition: background .1s;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Btn warning */
.btn-warning { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.btn-warning:hover { background: #d97706; color: #fff; }

/* Admin version label */
.admin-version { font-size: 10px; color: var(--sidebar-muted); padding: 4px 12px 8px; }

/* Cart badge */
.cart-badge {
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 99px; min-width: 16px; text-align: center;
  margin-left: auto;
}

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-icon   { font-size: 40px; margin-bottom: 12px; }

/* Stat-info helper */
.stat-info { flex: 1; min-width: 0; }

/* Table header kırmızı alt çizgi */
.table thead th, table thead th {
  border-bottom: 1px solid var(--border);
  border-top: none;
}
.table.table-red thead th, table.table-red thead th {
  border-bottom: 2px solid rgba(237,41,57,.2);
}

/* ══════════════════════════════════════════════════════════════
   BAYİ PORTAL — Ek sınıflar
══════════════════════════════════════════════════════════════ */
.notif-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--red); border-radius: 50%; margin-left: 3px;
  vertical-align: middle;
}
.topbar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: background .15s; position: relative;
}
.topbar-btn:hover { background: var(--bg); }
.topbar-logo { font-weight: 700; font-size: 15px; color: var(--text); }

/* Product grid (bayi portal) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-img {
  height: 160px; display: flex; align-items: center;
  justify-content: center; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.product-img img { max-height: 130px; object-fit: contain; }
.product-info { padding: 12px; }
.product-name { font-weight: 600; font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
.product-sku  { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.product-price{ font-size: 16px; font-weight: 800; color: var(--red); }

/* Qty spinner */
.qty-spinner { display: flex; align-items: center; border: 1.5px solid var(--border-2); border-radius: var(--radius); overflow: hidden; }
.qty-btn     { background: var(--bg); border: none; width: 32px; height: 36px; cursor: pointer; font-size: 16px; color: var(--text-2); transition: background .1s; }
.qty-btn:hover { background: var(--border); }
.qty-input   { width: 48px; height: 36px; text-align: center; border: none; border-left: 1px solid var(--border-2); border-right: 1px solid var(--border-2); background: transparent; color: var(--text); font-size: 13px; font-family: inherit; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Bildirim listesi */
.notif-list  { display: flex; flex-direction: column; }
.notif-item  { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); transition: background .1s; cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-icon  { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 13px; }
.notif-body  { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 2px; }
.notif-time  { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Stock badge */
.stock-badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.stock-ok    { background: var(--success-bg); color: var(--success); }
.stock-low   { background: var(--warning-bg); color: var(--warning); }
.stock-none  { background: var(--danger-bg);  color: var(--danger); }

/* Divider */
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ══════════════════════════════════════════════════════════════
   TAB BAR — Filtre sekmeleri (Payments, Applications)
══════════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}
.tab-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.tab-item:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.tab-item.active {
  background: var(--red); color: #fff;
  box-shadow: 0 1px 4px rgba(237,41,57,.3);
}
.tab-item.active .tab-count { background: rgba(255,255,255,.25); color: #fff; }
.tab-count {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 99px; font-size: 11px; font-weight: 700;
  padding: 1px 7px; min-width: 20px; text-align: center;
  color: var(--text-muted);
}
.tab-count.warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #b45309; }

/* ══════════════════════════════════════════════════════════════
   UTILITY — Spacing, Grid
══════════════════════════════════════════════════════════════ */
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mt-2 { margin-top: 8px; }
.gap-4{ gap: 16px; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2,1fr); }
.grid-cols-3 { grid-template-columns: repeat(3,1fr); }
.grid-cols-4 { grid-template-columns: repeat(4,1fr); }
@media(max-width:900px){.grid-cols-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.grid-cols-3,.grid-cols-4{grid-template-columns:1fr}}

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.filter-bar .form-control { height: 36px; }

/* Alert info */
.alert-info { background: var(--info-bg); border-color: var(--info-border); color: #1e40af; }
