/* =====================================================
   BLUT MUTFAK — Ortak Responsive CSS
   assets/css/blut.css
   ===================================================== */

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

/* ---- DARK TEMA (varsayılan) ---- */
:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #171717;
  --border: #1f1f1f;
  --accent: #e8b84b;
  --accent2: #c9410a;
  --text: #e8e4dc;
  --muted: #5a5550;
  --green: #4be888;
  --red: #e84b4b;
  --blue: #4b9ce8;
  --purple: #b44be8;
  --shadow: 0 2px 12px rgba(0,0,0,.6);
  --nav-height: 60px;
}

/* ---- LIGHT TEMA ---- */
[data-theme="light"] {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface2: #f0ede8;
  --border: #e0dbd2;
  --accent: #c9920a;
  --accent2: #c9410a;
  --text: #1a1714;
  --muted: #8a8078;
  --green: #1a9e50;
  --red: #d03030;
  --blue: #1a6fc9;
  --purple: #7a24c9;
  --shadow: 0 2px 12px rgba(0,0,0,.1);
  --nav-height: 60px;
}

html { font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* =====================================================
   HEADER / NAVBAR
   ===================================================== */
.blut-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 16px;
}

.blut-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  flex-shrink: 0;
}

/* Desktop nav */
.blut-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.blut-nav::-webkit-scrollbar { display: none; }
.blut-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.blut-nav a:hover { color: var(--text); border-color: var(--border); }
.blut-nav a.active { color: var(--accent); border-color: var(--accent); }

.blut-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-badge {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 768px) { .user-badge { display: none; } }

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* Tema toggle butonu */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

/* Mobile nav drawer */
.blut-drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 190;
  display: none;
  flex-direction: column;
  padding: 20px;
  gap: 6px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.blut-drawer.open { display: flex; }
.blut-drawer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.blut-drawer a:hover, .blut-drawer a.active { color: var(--accent); border-color: var(--accent); }
.blut-drawer .nav-icon { font-size: 18px; }

/* =====================================================
   TOOLBAR
   ===================================================== */
.blut-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { border-color: var(--text); color: var(--text); }
.tab-btn.active { border-color: var(--accent); color: var(--accent); }

.add-btn {
  background: var(--accent);
  border: none;
  color: var(--bg);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.add-btn:hover { background: #f0c85a; }

/* =====================================================
   CONTENT WRAPPER
   ===================================================== */
.blut-content { padding: 20px; }
@media (max-width: 768px) { .blut-content { padding: 12px; } }

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

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

/* =====================================================
   STATS CARDS
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.stat-card.yellow::before { background: var(--accent); }
.stat-card.green::before  { background: var(--green); }
.stat-card.red::before    { background: var(--red); }
.stat-card.blue::before   { background: var(--blue); }
.stat-label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-family: 'Bebas Neue', sans-serif; font-size: 36px; line-height: 1; }
.stat-value.yellow { color: var(--accent); }
.stat-value.green  { color: var(--green); }
.stat-value.red    { color: var(--red); }
.stat-value.blue   { color: var(--blue); }
.stat-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }

/* =====================================================
   PANEL / CARD
   ===================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.panel-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-title { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.panel-body { padding: 18px; }

/* =====================================================
   TABLES — Responsive
   ===================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 500px; }
th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(232,184,75,0.02); }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

input[type=text], input[type=number], input[type=password], input[type=date],
input[type=time], input[type=email], input[type=tel], textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
select option { background: var(--surface); }
input[type=checkbox] { width: auto; margin-right: 8px; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  padding: 10px 20px;
  border: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #f0c85a; }
.btn-secondary { background: none; border: 1px solid var(--border); color: var(--muted); }
.btn-secondary:hover { border-color: var(--text); color: var(--text); }
.btn-danger { background: none; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(232,75,75,0.1); }
.btn-sm { font-size: 12px; padding: 6px 12px; letter-spacing: 1px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.del:hover { border-color: var(--red); color: var(--red); }

/* =====================================================
   MODALS — Mobile optimized
   ===================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.overlay.show { display: flex; }
@media (max-width: 480px) { .overlay { padding: 0; align-items: flex-end; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 560px;
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}
@media (max-width: 480px) {
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
  }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}
.modal-close { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }

/* =====================================================
   BADGES / TAGS
   ===================================================== */
.badge {
  font-size: 9px;
  letter-spacing: 1px;
  padding: 2px 7px;
  border: 1px solid;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.green  { border-color: var(--green); color: var(--green); }
.badge.yellow { border-color: var(--accent); color: var(--accent); }
.badge.red    { border-color: var(--red); color: var(--red); }
.badge.blue   { border-color: var(--blue); color: var(--blue); }
.badge.muted  { border-color: var(--muted); color: var(--muted); }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */
#blut-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (max-width: 480px) {
  #blut-toast { bottom: 80px; right: 12px; left: 12px; }
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 18px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
}
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }
.toast.warning { border-color: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOut { to { transform: translateX(110%); opacity: 0; } }

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress-wrap { margin-bottom: 16px; }
.progress-info { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 11px; color: var(--muted); }
.progress-bar-bg { height: 4px; background: var(--border); }
.progress-bar-fill { height: 4px; transition: width 0.5s; }

/* =====================================================
   MOBILE BOTTOM NAV
   ===================================================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 190;
  padding: 0;
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  min-width: 50px;
  border: 1px solid transparent;
  transition: color 0.2s;
}
.bn-item .bn-icon { font-size: 18px; }
.bn-item.active { color: var(--accent); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .blut-nav { display: none; }
  .bottom-nav { display: block; }
  body { padding-bottom: 64px; }
  .blut-content { padding: 12px; }
}
@media (max-width: 480px) {
  .blut-toolbar { padding: 10px 12px; gap: 6px; }
  .tab-btn { padding: 6px 10px; font-size: 10px; }
  .add-btn { font-size: 13px; padding: 7px 14px; }
}

/* =====================================================
   MISC UTILITIES
   ===================================================== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.font-mono { font-family: 'Bebas Neue', sans-serif; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-width { width: 100%; }

/* Date range picker responsive */
.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .date-range { margin-left: 0; width: 100%; }
  .date-range input { flex: 1; min-width: 0; }
}

/* Search input */
.search-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 220px;
}
.search-input:focus { border-color: var(--accent); }
@media (max-width: 480px) { .search-input { width: 100%; } }

/* Loyalty stamp card */
.stamp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}
.stamp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.stamp {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s;
}
.stamp.filled { background: var(--accent); border-color: var(--accent); }
.stamp.earned { background: var(--green); border-color: var(--green); animation: pop 0.4s ease; }
@keyframes pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }
