/* ============================================
   PIXEL DROP — Festival Stok Takip
   Tasarim dili: sade, yuksek kontrastli, gunes
   isiginda bile rahat okunan bir stant araci.
   ============================================ */

:root {
  --bg-base:       #F6F5F9;
  --bg-surface:    #FFFFFF;
  --bg-surface-2:  #F1EFF6;
  --bg-raised:     #ECEAF3;
  --border:        #E1DEEA;
  --border-soft:   #E8E6F0;

  --accent:        #D6247F;
  --accent-dim:    #F6D8E8;
  --accent-glow:   rgba(214, 36, 127, 0.14);
  --cyan:          #0891A8;

  --success:       #15803D;
  --success-dim:   #E3F5E9;
  --danger:        #C0272D;
  --danger-dim:    #FBE7E7;
  --warning:       #B5680A;
  --warning-dim:   #FBEEDA;

  --text:          #201C2C;
  --text-muted:    #5B5770;
  --text-faint:    #8E8AA0;

  --font-body:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:  'SF Mono', 'Roboto Mono', Consolas, Menlo, monospace;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;

  --nav-h: 72px;
  --topbar-h: 56px;

  --shadow-card: 0 1px 2px rgba(32, 28, 44, 0.05), 0 1px 3px rgba(32, 28, 44, 0.04);
  --shadow-raised: 0 4px 14px rgba(32, 28, 44, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--accent-dim); color: var(--accent); }

/* ---------- Top bar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
}
.brand-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  color: var(--text);
}
.brand-text em {
  font-style: normal;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--text-faint);
}
.logout-link {
  width: 36px; height: 36px;
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
}
.logout-link svg { width: 18px; height: 18px; }
.logout-link:active { background: var(--bg-surface-2); color: var(--danger); }
.user-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 5px 10px;
  border-radius: 20px;
}

/* ---------- Page shell ---------- */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.page-head {
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
  color: var(--text);
}
.page-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-soft);
  z-index: 30;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: color .15s ease;
}
.nav-item svg { width: 22px; height: 22px; transition: transform .15s ease; }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { transform: translateY(-1px); }
.nav-item:active svg { transform: scale(0.9); }

/* ---------- Scoreboard (dashboard hero) ---------- */
.scoreboard {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 26px 20px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.scoreboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.scoreboard-row .scoreboard {
  margin-bottom: 0;
  padding: 18px 12px 16px;
  cursor: pointer;
  width: 100%;
}
.scoreboard-row .scoreboard-value { font-size: 27px; letter-spacing: -0.5px; }
.scoreboard-row .scoreboard-label { letter-spacing: 1.5px; }
.scoreboard-label {
  position: relative;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-faint);
  text-transform: uppercase;
}
.scoreboard-value {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.15;
  margin: 6px 0 2px;
  color: var(--accent);
  letter-spacing: -1px;
  word-break: break-word;
}
.scoreboard-sub {
  position: relative;
  font-size: 12.5px;
  color: var(--text-faint);
}

.kazanc-dagilim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height .22s ease, opacity .18s ease, margin-bottom .22s ease;
}
.kazanc-dagilim.open {
  max-height: 160px;
  opacity: 1;
  margin-bottom: 16px;
}
.dagilim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.dagilim-ad {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dagilim-tutar {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.dagilim-adet {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ---------- Tarih filtresi ---------- */
.tarih-filtre {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height .22s ease, opacity .18s ease, margin-bottom .22s ease;
}
.tarih-filtre.open {
  max-height: 420px;
  opacity: 1;
  margin-bottom: 18px;
}
.tarih-form {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 10px;
  box-shadow: var(--shadow-card);
}
.tarih-form input[type=date] {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--bg-surface-2);
  color: var(--text);
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
}
.tarih-form input[type=date]:focus {
  outline: none;
  border-color: var(--accent);
}
.gunluk-dagilim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.tarih-sonuc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--success-dim);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  margin-top: 10px;
}
.tarih-sonuc-tarih { font-weight: 800; font-size: 14px; color: var(--text); }
.tarih-sonuc-tarih span { font-weight: 600; color: var(--text-faint); font-size: 12px; margin-left: 4px; }
.tarih-sonuc-adet { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.tarih-sonuc-tutar { font-family: var(--font-mono); font-size: 19px; font-weight: 700; color: var(--success); }
.tarih-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tarih-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  padding: 7px 13px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.tarih-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-card .val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.stat-card .val.warn { color: var(--warning); }
.stat-card .lbl {
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 3px;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.quicklinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quicklink {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .12s ease, border-color .12s ease;
  box-shadow: var(--shadow-card);
}
.quicklink:active { transform: scale(0.97); border-color: var(--accent); }
.quicklink svg { width: 22px; height: 22px; color: var(--accent); }
.quicklink span { font-weight: 700; font-size: 13.5px; color: var(--text); }
.quicklink small { color: var(--text-faint); font-size: 11.5px; font-weight: 500; }

.recent-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 22px 0 10px 2px;
}

/* ---------- Search ---------- */
.search-toggle {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-s);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
}
.search-toggle svg { width: 19px; height: 19px; }
.search-toggle:active { background: var(--accent-dim); color: var(--accent); }

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  padding: 0 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height .18s ease, opacity .15s ease, margin-bottom .18s ease, border-color .15s ease;
}
.search-bar.open {
  max-height: 54px;
  opacity: 1;
  margin-bottom: 16px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-bar svg { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 13px 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  min-width: 0;
}
.search-bar input:focus { outline: none; }
.search-clear {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface-2);
  color: var(--text-faint);
  font-size: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Cards / lists ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  position: relative;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb svg { width: 34px; height: 34px; opacity: 0.4; }

.stock-badge {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  color: var(--success);
  border: 1px solid rgba(21, 128, 61, 0.25);
}
.stock-badge.low { color: var(--warning); border-color: rgba(181,104,10,0.3); }
.stock-badge.out { color: var(--danger); border-color: rgba(192,39,45,0.3); }

.owner-badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.product-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; color: var(--text); }
.product-price { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--accent); }
.product-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(8,145,168,0.1);
  border: 1px solid rgba(8,145,168,0.25);
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
}
.product-actions { display: flex; gap: 6px; margin-top: 8px; }

.product-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.list-thumb {
  width: 52px; height: 52px;
  border-radius: var(--radius-s);
  background: var(--bg-surface-2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb svg { width: 22px; height: 22px; opacity: 0.4; }
.list-body { flex: 1; min-width: 0; }
.list-body .name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.list-body .meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.list-body .meta b { color: var(--text-muted); font-weight: 600; }
.list-amount { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--success); white-space: nowrap; }
.list-amount small { display: block; font-size: 10px; color: var(--text-faint); font-weight: 500; text-align: right; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-s);
  padding: 11px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .1s ease, opacity .1s ease;
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #FFFFFF; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-secondary { background: var(--bg-surface); color: var(--text); border: 1px solid var(--border); }
.btn-success { background: var(--success); color: #FFFFFF; }
.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(192,39,45,0.25); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-sm { padding: 8px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-icon { width: 38px; height: 38px; padding: 0; flex-shrink: 0; border-radius: var(--radius-s); }
.btn-icon svg { width: 17px; height: 17px; }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px var(--accent-glow);
  border: none;
  z-index: 25;
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(0.92); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.field input[type=text],
.field input[type=number],
.field input[type=password],
.field input[type=file] {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
}
.field input[type=number] { font-family: var(--font-mono); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }

.file-drop {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-m);
  padding: 18px;
  text-align: center;
  position: relative;
  color: var(--text-faint);
  font-size: 12.5px;
  background: var(--bg-surface-2);
}
.file-drop svg { width: 24px; height: 24px; margin-bottom: 6px; opacity: 0.7; }
.file-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-preview {
  width: 100%; max-height: 160px; object-fit: contain;
  border-radius: var(--radius-s); margin-top: 10px;
}

/* ---------- Stepper (quantity) ---------- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 10px;
}
.stepper button {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: none;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.stepper button:active { background: var(--accent-dim); color: var(--accent); }
.stepper .qty-val {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  min-width: 46px;
  text-align: center;
  color: var(--text);
}

/* ---------- Sheet / modal ---------- */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(32, 28, 44, 0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  z-index: 91;
  transform: translateY(100%);
  transition: transform .22s cubic-bezier(.32,.72,0,1);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(32,28,44,0.12);
}
.sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 6px auto 14px;
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sheet-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--bg-surface-2);
  flex-shrink: 0;
}
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head .name { font-weight: 800; font-size: 15px; color: var(--text); }
.sheet-head .stock { font-size: 12px; color: var(--text-faint); }

.sheet-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--success-dim);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  margin: 16px 0;
}
.sheet-total .lbl { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.sheet-total .val { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--success); }

.sheet-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ---------- Empty states ---------- */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--text-faint);
}
.empty svg { width: 42px; height: 42px; opacity: 0.35; margin-bottom: 12px; }
.empty p { font-size: 13.5px; margin: 0 0 14px; color: var(--text-muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(32,28,44,0.25);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.toast.error .dot { background: var(--danger); }

.divider { height: 1px; background: var(--border-soft); margin: 18px 0; border: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Date group heading on log page */
.day-heading {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 20px 2px 10px;
}
.day-heading:first-child { margin-top: 0; }

/* ---------- Analiz sayfasi ---------- */
.analiz-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 5px;
  margin-bottom: 18px;
}
.analiz-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 11px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.analiz-tab.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.rank-num {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-surface-2);
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}
.rank-num.rank-1 { background: #FBEBAE; color: #8A6A00; }
.rank-num.rank-2 { background: #E7E7EE; color: #5B5B66; }
.rank-num.rank-3 { background: #F3DCC4; color: #8A4E14; }
.rank-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.rank-value.accent { color: var(--accent); font-size: 15px; }
.rank-value small {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

.gizli-liste { display: none; }
.gizli-liste.open { display: block; }
.devamini-goster { width: 100%; margin-top: 4px; margin-bottom: 8px; }

.rank-item-btn {
  width: 100%;
  border: 1px solid var(--border-soft);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.rank-item-btn:active { border-color: var(--accent); }

.kategori-filtre-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.kategori-filtre-btn {
  flex: 1;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 8px;
  border-radius: 20px;
  cursor: pointer;
}
.kategori-filtre-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.kategori-ikon { color: var(--cyan); background: rgba(8,145,168,0.08); }
.kategori-ikon svg { width: 20px; height: 20px; }

/* ---------- Login page ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 380px; }
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.login-brand .brand-text { align-items: center; text-align: center; }
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 26px 22px 24px;
  box-shadow: var(--shadow-raised);
}
.login-card h1 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
}
.login-card > p {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-faint);
}

@media (min-width: 420px) {
  .scoreboard-value { font-size: 52px; }
}

/* ---------- Stogu bitenler (panel sayfasi) ---------- */
.biten-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--warning-dim);
  border: 1px solid rgba(181,104,10,0.25);
  border-radius: var(--radius-m);
  padding: 13px 14px;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: left;
}
.biten-toggle.sifir {
  background: var(--bg-surface);
  border-color: var(--border-soft);
}
.biten-toggle svg { width: 20px; height: 20px; color: var(--warning); flex-shrink: 0; }
.biten-toggle.sifir svg { color: var(--text-faint); }
.biten-toggle span:nth-child(2) {
  flex: 1;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}
.biten-sayi {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  background: var(--warning);
  color: #FFFFFF;
  padding: 2px 9px;
  border-radius: 20px;
}
.biten-toggle.sifir .biten-sayi { background: var(--border); color: var(--text-faint); }

.biten-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height .22s ease, opacity .18s ease, margin-bottom .22s ease;
}
.biten-panel.open {
  max-height: 900px;
  opacity: 1;
  margin-bottom: 18px;
}

.uyari-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--warning-dim);
  border: 1px solid rgba(181,104,10,0.3);
  border-radius: var(--radius-m);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text);
}
.uyari-banner svg { width: 24px; height: 24px; color: var(--warning); flex-shrink: 0; }
.uyari-banner div { flex: 1; line-height: 1.4; }

/* ---------- Etkinlik kutusu (ana sayfa) ---------- */
.etkinlik-kutu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 13px 14px;
  box-shadow: var(--shadow-card);
}
.etkinlik-durum {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.etkinlik-durum.aktif { color: var(--success); }
.etkinlik-durum.kapali { color: var(--text-faint); }
.etkinlik-ad { font-weight: 800; font-size: 14px; color: var(--text); }
.etkinlik-tarih { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

.gecmis-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 0 4px;
}
.gecmis-link span { color: var(--accent); }

/* ---------- Gecmis etkinlikler sayfasi ---------- */
.etkinlik-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.etkinlik-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.etkinlik-card-ad { font-weight: 800; font-size: 14.5px; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.etkinlik-card-tarih { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.etkinlik-card-tutar { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--accent); white-space: nowrap; }
.etkinlik-card-meta { font-size: 12px; color: var(--text-faint); margin-top: 8px; }
.etkinlik-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.etkinlik-rozet {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.etkinlik-rozet.aktif { color: var(--success); border-color: rgba(21,128,61,0.3); background: var(--success-dim); }

/* =====================================================
   KATALOG YÖNETİMİ (panel) — ek stiller
   ===================================================== */
.admin-body { --nav-h: 0px; }
.admin-body .page { max-width: 1180px; }
.admin-body .fab { bottom: calc(20px + env(safe-area-inset-bottom)); }
.admin-body .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-s);
  font-size: 12.5px; font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
}
.topbar-link svg { width: 16px; height: 16px; }
.topbar-link:active { color: var(--accent); }
@media (max-width: 520px) {
  .topbar-link span { display: none; }
  .topbar-link { width: 36px; padding: 0; justify-content: center; }
}

.chip-ok  { margin-bottom: 14px; color: var(--success); border-color: rgba(21,128,61,.3) !important; background: var(--success-dim) !important; }
.chip-err { margin-bottom: 14px; color: var(--danger);  border-color: rgba(192,39,45,.3) !important; background: var(--danger-dim) !important; }

.panel-toolbar {
  display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-search { margin: 0 !important; flex: 1 1 260px; }
.tab-sayi {
  display: inline-block; min-width: 20px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 6px; border-radius: 10px;
  background: var(--bg-raised); color: var(--text-muted);
  margin-left: 4px;
}
.analiz-tab.active .tab-sayi { background: var(--accent-dim); color: var(--accent); }

.admin-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
@media (min-width: 900px) { .admin-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }

.code-badge {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(20,18,31,0.85); color: #FFFFFF;
  letter-spacing: .5px;
}
.katalog-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(255,255,255,0.94);
  color: var(--success);
  border: 1px solid rgba(21,128,61,0.25);
}
.product-card.gizli .katalog-badge { color: var(--text-faint); border-color: var(--border); }
.product-card.gizli .product-thumb img { opacity: .45; filter: grayscale(.6); }

.katalog-switch {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px; cursor: pointer; user-select: none;
}
.katalog-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 38px; height: 22px; border-radius: 22px;
  background: var(--border); position: relative; flex-shrink: 0;
  transition: background .15s ease;
}
.switch-knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.katalog-switch input:checked + .switch-track { background: var(--success); }
.katalog-switch input:checked + .switch-track .switch-knob { transform: translateX(16px); }
.katalog-switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--accent-glow); }
.switch-lbl { font-size: 12px; font-weight: 700; color: var(--text-muted); line-height: 1.3; }
.switch-lbl small { display: block; font-weight: 500; color: var(--text-faint); font-size: 11.5px; margin-top: 2px; }
.katalog-switch-lg {
  background: var(--bg-surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-s); padding: 12px; margin: 0 0 16px;
}
.katalog-switch-lg .switch-lbl { font-size: 13.5px; color: var(--text); }

.select {
  width: 100%; background: var(--bg-surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); padding: 12px 13px; font-size: 15px; font-family: inherit;
}
.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

@media (min-width: 700px) {
  .admin-body .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 480px; border-radius: var(--radius-l);
    border: 1px solid var(--border);
    transform: translate(-50%, -46%); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
    padding: 22px 22px 22px;
  }
  .admin-body .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .admin-body .sheet-handle { display: none; }
}
.admin-grid .katalog-switch { margin-top: auto; padding-top: 8px; }
.fiyat-stok { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.stok-etiket {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  color: var(--success); background: var(--success-dim); border: 1px solid rgba(21,128,61,0.2);
}
.stok-etiket.low { color: var(--warning); background: var(--warning-dim); border-color: rgba(181,104,10,0.25); }
.stok-etiket.out { color: var(--danger); background: var(--danger-dim); border-color: rgba(192,39,45,0.25); }
.stok-ozet { display: inline-block; margin-left: 4px; color: var(--text-faint); }
.stok-ozet b { font-family: var(--font-mono); color: var(--text-muted); }
.tab-sayi-uyari { background: var(--danger-dim) !important; color: var(--danger) !important; }
.analiz-tabs { overflow-x: auto; }
.analiz-tab { white-space: nowrap; }

/* ---- Ürün sahibi (Özge / Emirhan) ---- */
.etiket-satir { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sahip-etiket {
  display: inline-block; font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
  color: #6D28D9; background: #EDE7FB; border: 1px solid #D9CCF6;
}
.sahip-etiket.sahip-admin   { color: var(--accent); background: var(--accent-dim); border-color: rgba(214,36,127,0.25); }
.sahip-etiket.sahip-emirhan { color: #1D4ED8; background: #E3EBFD; border-color: #C5D5FA; }

.sahip-filtre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.sahip-filtre-lbl { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.sahip-chip {
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-muted);
  padding: 7px 12px; border-radius: 20px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.sahip-chip span { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-left: 3px; }
.sahip-chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.sahip-chip.active span { color: rgba(255,255,255,0.7); }
.sahip-chip.sahip-admin.active   { background: var(--accent); border-color: var(--accent); }
.sahip-chip.sahip-emirhan.active { background: #1D4ED8; border-color: #1D4ED8; }

.sahip-secim { display: flex; gap: 8px; }
.sahip-radio { flex: 1; cursor: pointer; }
.sahip-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.sahip-radio span {
  display: block; text-align: center; padding: 11px; border-radius: var(--radius-s);
  border: 1.5px solid var(--border); font-weight: 700; font-size: 14px; color: var(--text-muted);
  background: var(--bg-surface);
}
.sahip-radio input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.sahip-radio.sahip-emirhan input:checked + span { border-color: #1D4ED8; color: #1D4ED8; background: #E3EBFD; }

/* ---- Sipariş linkleri (panel) ---- */
.topbar-link.aktif { color: var(--accent); border-color: rgba(214,36,127,0.35); background: var(--accent-dim); }
@media (max-width: 720px) {
  .topbar-link span { display: none; }
  .topbar-link { width: 36px; padding: 0; justify-content: center; }
  .user-pill { display: none; }
}
.sip-liste { display: flex; flex-direction: column; gap: 10px; }
.sip-satir {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-m);
  padding: 13px 15px; box-shadow: var(--shadow-card);
}
.sip-sol { min-width: 0; }
.sip-no { font-family: var(--font-mono); font-weight: 800; color: var(--accent); font-size: 13.5px; }
.sip-musteri { font-weight: 700; font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sip-meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.sip-sag { text-align: right; flex-shrink: 0; }
.sip-tutar { font-family: var(--font-mono); font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.sip-btns { display: flex; gap: 6px; justify-content: flex-end; }
