/* ============================================================
   Barkodlu Panel — Global CSS
   Tailwind CDN kullanılıyor, bu dosya custom override için
   ============================================================ */

:root {
  --color-primary:   #2563eb;
  --color-primary-h: #1d4ed8;
  --color-success:   #16a34a;
  --color-danger:    #dc2626;
  --color-warning:   #d97706;
  --color-bg:        #f8fafc;
  --color-sidebar:   #1e293b;
  --color-text:      #0f172a;
  --font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:          0.75rem;
  --shadow:          0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md:       0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
}

/* ── Tablo Stilleri ── */
.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tbl th {
  background: #f1f5f9;
  padding: .625rem .875rem;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.tbl td {
  padding: .625rem .875rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.tbl tr:hover td { background: #f8fafc; }
.tbl tr.selected td { background: #eff6ff; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-yellow { background: #fef9c3; color: #92400e; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ── Aksiyon İkonları ── */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: .5rem;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-size: .875rem;
  text-decoration: none;
}
.action-btn.view  { background: #dbeafe; color: #1d4ed8; }
.action-btn.edit  { background: #fef9c3; color: #92400e; }
.action-btn.del   { background: #fee2e2; color: #b91c1c; }
.action-btn:hover { filter: brightness(.92); }

/* ── Sayfalama ── */
.pagenav {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .875rem;
}
.pagenav select {
  padding: .25rem .5rem;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  background: white;
  cursor: pointer;
}

/* ── Filtre Alanı ── */
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.filter-bar input,
.filter-bar select {
  padding: .45rem .75rem;
  border: 1px solid #e2e8f0;
  border-radius: .625rem;
  font-size: .875rem;
  background: white;
  outline: none;
  transition: border .15s;
}
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--color-primary); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  transform: translateY(12px);
  transition: transform .2s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }

/* ── Kart ── */
.card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--color-sidebar);
  color: #cbd5e1;
  width: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .55rem 1.25rem;
  font-size: .875rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: .5rem;
  margin: .1rem .5rem;
  transition: background .15s, color .15s;
}
.sidebar-link:hover,
.sidebar-link.active { background: #334155; color: #f1f5f9; }
.sidebar-link.active { font-weight: 600; }
