/* ============================================================
   CUSTOMER APP — Ana CSS Dosyası
   No111 Coffee | Sadakat & Müşteri Uygulaması
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:       #0A0806;
  --surface:  #13100C;
  --surface2: #1C1712;
  --border:   #2A2018;
  --accent:   #C9A96E;
  --accent2:  #E6C48A;
  --text:     #F0E6D3;
  --muted:    #9A8B7A;
  --green:    #81C784;
  --blue:     #64B5F6;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --playfair: 'Playfair Display', Georgia, serif;
  --r-sm:     8px;
  --r-md:     14px;
  --r-lg:     20px;
  --r-xl:     28px;
  --r-full:   999px;
  --shadow:   0 8px 32px rgba(0,0,0,0.5);
  --t:        0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { height:100%; scroll-behavior:smooth; }
body { font-family:var(--font); background:var(--bg); color:var(--text); min-height:100vh; -webkit-font-smoothing:antialiased; }

/* ── App Shell ─────────────────────────────────────────────── */
.app { display:flex; flex-direction:column; min-height:100vh; max-width:480px; margin:0 auto; background:var(--surface); position:relative; }

/* ── Topnav ────────────────────────────────────────────────── */
.topnav {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topnav-brand {
  font-family: var(--playfair);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.topnav-action { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.topnav-action:hover { color: var(--text); }

/* ── Page Body ─────────────────────────────────────────────── */
.page-body { flex: 1; padding: 20px; overflow-y: auto; padding-bottom: 80px; }

/* ── Bottom Nav ────────────────────────────────────────────── */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  height: 64px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  transition: color var(--t);
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--accent); }
.bottom-nav a svg { width: 22px; height: 22px; }

/* ── Wallet Hero ───────────────────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, #1C1712 0%, #2A1E10 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.wallet-points-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.wallet-points-value { font-family: var(--playfair); font-size: 3rem; font-weight: 700; color: var(--accent); line-height: 1; }
.wallet-points-unit  { font-size: 1rem; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* ── Stamp Card ────────────────────────────────────────────── */
.stamp-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.stamp-card-title { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.stamps-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.stamp-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t);
}
.stamp-dot.filled {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: var(--accent);
}
.stamp-dot svg { width: 60%; height: 60%; color: var(--bg); }

/* ── QR Button ─────────────────────────────────────────────── */
.qr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--r-md);
  padding: 15px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background var(--t), box-shadow var(--t), transform 0.1s;
}
.qr-btn:hover   { background: var(--accent2); box-shadow: 0 0 28px rgba(201,169,110,0.3); }
.qr-btn:active  { transform: scale(0.98); }
.qr-btn svg     { width: 22px; height: 22px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.card-title  { font-size:0.9rem; font-weight:600; color:var(--text); }
.card-link   { font-size:0.8rem; color:var(--accent); text-decoration:none; }
.card-link:hover { text-decoration:underline; }

/* ── Reward Item ───────────────────────────────────────────── */
.reward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.reward-item:last-child { border-bottom: none; }
.reward-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(201,169,110,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.reward-icon svg { width: 22px; height: 22px; }
.reward-title  { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.reward-sub    { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.reward-badge  { margin-left: auto; }

/* ── History Row ───────────────────────────────────────────── */
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.history-row:last-child { border-bottom: none; }
.history-date { font-size: 0.75rem; color: var(--muted); }
.history-amount { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.history-pts { font-size: 0.72rem; color: var(--muted); }

/* ── Segment Badge ─────────────────────────────────────────── */
.segment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.segment-new      { background: rgba(100,181,246,0.12); color: #64B5F6; }
.segment-classic  { background: rgba(154,139,122,0.12); color: var(--muted); }
.segment-regular  { background: rgba(129,199,132,0.12); color: #81C784; }
.segment-vip      { background: rgba(201,169,110,0.15); color: var(--accent); }
.segment-premium  { background: linear-gradient(90deg, rgba(201,169,110,0.2), rgba(230,196,138,0.2)); color: var(--accent2); border: 1px solid rgba(201,169,110,0.3); }

/* ── Form Elements ─────────────────────────────────────────── */
.form-group  { margin-bottom: 18px; }
label { display:block; font-size:0.8rem; font-weight:500; color:var(--muted); margin-bottom:6px; }

.form-control {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,169,110,0.12); }
.form-control::placeholder { color: var(--muted); opacity: 0.5; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t), box-shadow var(--t), transform 0.1s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent2); box-shadow: 0 0 20px rgba(201,169,110,0.3); }
.btn-ghost   { background: var(--surface2); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-block   { width: 100%; justify-content: center; }
.btn:active  { transform: scale(0.98); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert { padding:12px 16px; border-radius:var(--r-sm); font-size:0.875rem; margin-bottom:16px; }
.alert-error   { background:rgba(229,115,115,0.12); border:1px solid rgba(229,115,115,0.3); color:#FFCDD2; }
.alert-success { background:rgba(129,199,132,0.12); border:1px solid rgba(129,199,132,0.3); color:#C8E6C9; }
.alert-warning { background:rgba(255,183,77,0.12);  border:1px solid rgba(255,183,77,0.3);  color:#FFE0B2; }

/* ── QR Overlay ────────────────────────────────────────────── */
.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.qr-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box {
  background: white;
  padding: 16px;
  border-radius: var(--r-lg);
  margin-bottom: 20px;
}
.qr-timer {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.qr-timer strong { color: var(--accent); font-size: 1.1rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 480px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-full); }
