/* ===== Temel ===== */
:root {
  --brand: #6d28d9;
  --bg: #f5f4f9;
  --card: #fff;
  --ink: #17151f;
  --muted: #6e6a7c;
  --line: #e8e6ef;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --wa: #25d366;
  --gift: #e11d74;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 16, 40, .04), 0 6px 24px rgba(20, 16, 40, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --brand-ink: color-mix(in srgb, var(--brand) 80%, #000);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh;
}
a { color: var(--brand-ink); text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.45rem; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
code { background: var(--brand-soft); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
.i { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
[hidden] { display: none !important; }

.main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(110px + var(--safe-b)); }
body.wide .main { max-width: 1120px; padding-bottom: 60px; }
.narrow { max-width: 680px; margin: 0 auto; }

/* ===== Üst çubuk ===== */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0); }
.topbar-in { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; padding: 10px 16px; min-height: 58px; }
body.wide .topbar-in { max-width: 1120px; }
.topbar-title { flex: 1; font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: #fff; }
.brand-dot { width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 0; cursor: pointer; flex: none; }
.icon-btn:active { background: var(--line); }
.icon-btn.light { color: #fff; background: rgba(0, 0, 0, .35); }

.tabs { display: flex; gap: 4px; max-width: 1120px; margin: 0 auto; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand-ink); border-color: var(--brand); }
.tabs .tabs-out { margin-left: auto; }

/* ===== Alt menü ===== */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bottomnav-in { display: flex; max-width: 560px; margin: 0 auto; align-items: flex-end; }
.nav-item, .nav-main { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 8px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.nav-item.on { color: var(--brand-ink); }
.nav-main { color: var(--brand-ink); position: relative; }
.nav-fab { width: 62px; height: 62px; margin-top: -30px; border-radius: 22px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent); border: 4px solid var(--bg); transition: transform .15s; }
.nav-main:active .nav-fab { transform: scale(.94); }

/* ===== Kartlar, butonlar, formlar ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-title .more { margin-left: auto; font-size: .85rem; font-weight: 600; }
.section-title { font-size: 1.05rem; margin: 22px 4px 10px; display: flex; align-items: center; gap: 8px; }
.section-title form { margin-left: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 14px; border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: center; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; border-radius: 16px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn-ghost { background: var(--brand-soft); color: var(--brand-ink); }
.btn-ghost.light { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-gift { background: linear-gradient(135deg, var(--gift), #f97316); }
.btn-danger { background: var(--err); }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.link-btn { background: none; border: 0; color: var(--brand-ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 4px; }
form.inline { display: inline; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: #3b3848; }
.form label small, .card-title small { font-weight: 400; color: var(--muted); }
.field-l { font-size: .88rem; font-weight: 600; color: #3b3848; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: #faf9fd; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: #fff; }
input[type=color] { padding: 4px; height: 48px; }
input[type=file] { padding: 10px; font-size: .9rem; }
textarea { resize: vertical; line-height: 1.45; }
.pin-input { letter-spacing: .5em; font-size: 1.3rem; text-align: center; }
.grid-2, .grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1.2fr 1.2fr .8fr; } }

.check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: .88rem !important; background: var(--brand-soft); padding: 12px; border-radius: 12px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); margin: 0; }
.check-inline { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 400 !important; }
.check-inline input { width: 18px; height: 18px; }

.toggle-2, .qty-pick, .seg { display: flex; background: #efedf5; border-radius: 14px; padding: 4px; gap: 4px; }
.toggle-2 input, .qty-pick input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-2 label, .qty-pick label { flex: 1; text-align: center; padding: 11px 6px; border-radius: 11px; font-weight: 700; color: var(--muted); cursor: pointer; flex-direction: row !important; justify-content: center; }
.toggle-2 input:checked + label, .qty-pick input:checked + label { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.qty-pick label { font-size: 1.15rem; }
.seg { margin-bottom: 14px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 11px; font-weight: 600; font-size: .88rem; color: var(--muted); }
.seg a.on { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

.quick-dates { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.quick-dates button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--brand-ink); cursor: pointer; }
.quick-dates button:active { background: var(--brand-soft); }

.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: .92rem; font-weight: 500; }
.alert-ok { background: #e8f8ee; color: #14532d; }
.alert-err { background: #fdecec; color: #7f1d1d; }
.alert-warn { background: #fff4e0; color: #7c4a03; }
.hint { font-size: .82rem; color: var(--muted); margin: 8px 2px 14px; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }
.empty .btn { margin-top: 12px; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eee; color: #444; vertical-align: middle; }
.badge-ok, .badge.state-active { background: #e3f6ea; color: #166534; }
.badge-warn, .badge.state-upcoming { background: #fff1d6; color: #92400e; }
.badge-off, .badge.state-ended { background: #fde4e4; color: #991b1b; }
.pill { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; }
.pill-gift { background: #fde7f1; color: var(--gift); }
.pill-big { display: inline-block; font-size: 1rem; padding: 8px 16px; }

details.fold { padding: 0; }
details.fold > summary { list-style: none; padding: 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > :not(summary) { margin: 0 16px 16px; }
details.fold .btn + .btn { margin-top: 10px; }
details.danger > summary { color: var(--err); }
.row-link { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.row-link .i:last-child { margin-left: auto; color: var(--muted); }

/* ===== Giriş ===== */
.auth { max-width: 400px; margin: 0 auto; padding: 48px 8px 20px; text-align: center; }
.auth .form { text-align: left; margin-top: 22px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.auth-logo .brand-dot, .auth-logo .brand-logo { width: 72px; height: 72px; border-radius: 22px; font-size: 2rem; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent); }
.auth-links { display: flex; justify-content: center; gap: 20px; margin-top: 18px; font-size: .88rem; font-weight: 600; }
.auth-links a { display: inline-flex; align-items: center; gap: 5px; }
.center-page { text-align: center; padding: 60px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.center-page .btn { min-width: 220px; }
.big-emoji { font-size: 3.5rem; }

/* ===== Damga kartı ===== */
.scard { --c: var(--brand); position: relative; background: #fff; border-radius: 22px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); overflow: hidden; }
.scard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c); }
.scard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.scard-logo { width: 54px; height: 54px; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.avatar-ico { display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--c) 12%, #fff); border: 0; }
.scard-hd { flex: 1; min-width: 0; }
.scard-store { font-weight: 800; font-size: 1.12rem; letter-spacing: .01em; }
.scard-title { color: color-mix(in srgb, var(--c) 85%, #000); font-weight: 600; font-size: .92rem; }
.scard-go { color: var(--muted); padding: 6px; }
.scard-slogan { font-family: "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive; font-style: italic; font-weight: 700; text-align: center; color: #4b4757; margin: 6px 0 2px; font-size: .98rem; }

.stamps { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; margin: 14px 0 12px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #cfcbd9; display: grid; place-items: center; position: relative; color: #a5a1b2; font-weight: 700; font-size: 1.15rem; }
.stamp.on { border: 0; background: var(--c); color: #fff; transform: rotate(var(--r)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent); animation: pop .35s ease-out both; }
.stamp-ico { font-size: 1.3rem; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)); }
.stamp small { position: absolute; bottom: 12%; font-size: .52rem; font-weight: 700; opacity: .92; letter-spacing: .02em; }
.stamp.on:has(small) .stamp-ico { margin-top: -8px; font-size: 1.1rem; }
.stamp.gift { border-style: solid; border-color: color-mix(in srgb, var(--gift) 40%, #fff); background: #fff5fa; font-size: 1.4rem; filter: grayscale(.6); opacity: .8; }
.stamp.gift.on { filter: none; opacity: 1; background: linear-gradient(135deg, var(--gift), #f97316); animation: wiggle 1.6s ease-in-out infinite; }
@keyframes pop { from { transform: scale(.4) rotate(0); opacity: 0; } to { transform: scale(1) rotate(var(--r)); opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-10deg) scale(1.08); } 40% { transform: rotate(8deg) scale(1.08); } 60% { transform: rotate(0) scale(1); } }

.scard-progress { display: flex; align-items: center; gap: 10px; }
.scard-progress .bar { flex: 1; height: 10px; background: #efedf5; border-radius: 99px; overflow: hidden; }
.scard-progress .bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .6s; }
.scard-progress b { font-size: 1rem; min-width: 38px; text-align: right; }
.scard-msg { margin-top: 10px; font-size: .95rem; }
.scard.is-ready .scard-msg { background: #fff0f7; color: #9d174d; padding: 12px; border-radius: 14px; }
.scard-gifts { margin-top: 8px; font-weight: 700; color: var(--gift); font-size: .9rem; }
.scard-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .82rem; font-weight: 600; }
.scard-foot.state-ended { color: var(--err); }

/* ===== Müşteri ekranları ===== */
.hello { padding: 4px 4px 12px; }
.hello h1 { margin-bottom: 2px; }
.hello p { font-size: .9rem; }
.install-tip { position: relative; background: #fff; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, #fff); border-radius: 16px; padding: 12px 40px 12px 14px; margin-bottom: 14px; font-size: .88rem; display: flex; flex-direction: column; gap: 4px; }
.install-tip .x { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.install-tip .install-btn { align-self: flex-start; margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border: 0; }
.timeline b { display: block; font-size: .95rem; }
.timeline small { color: var(--muted); font-size: .8rem; }
.tl-dot { --c: var(--brand); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); flex: none; font-size: 1rem; }
.tl-gift .tl-dot { background: #fde7f1; }
.tl-complete .tl-dot { background: #fff4d6; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile b { display: block; font-size: 1.08rem; }
.profile small { color: var(--muted); }
.avatar-lg { width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; object-fit: contain; }
img.avatar-lg { background: #fff; border: 1px solid var(--line); }
.avatar-sm { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; object-fit: contain; }
img.avatar-sm { background: #fff; border: 1px solid var(--line); }
.avatar-sm.avatar-ico { font-size: 1.1rem; }

.contact-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 4px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: .88rem; color: var(--ink); box-shadow: var(--shadow); }

/* QR ekranı */
.qr-overlay { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--brand) 92%, #000); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.qr-sheet, .qr-success { background: #fff; border-radius: 28px; padding: 28px 22px 22px; width: 100%; max-width: 380px; text-align: center; position: relative; }
.qr-close { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #f1eff6; cursor: pointer; display: grid; place-items: center; }
.qr-name { font-weight: 800; font-size: 1.2rem; margin-bottom: 14px; }
.qr-box { width: 100%; aspect-ratio: 1; max-width: 300px; margin: 0 auto; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-help { color: var(--muted); font-size: .88rem; margin: 14px 0 8px; }
.qr-wait { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--brand-ink); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); } 100% { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); } }
.qr-success { animation: pop2 .4s; }
.qr-success .burst { font-size: 4.5rem; animation: pop2 .5s; }
.qr-success h2 { font-size: 1.5rem; }
@keyframes pop2 { from { transform: scale(.6); opacity: 0; } }

/* ===== Mağaza paneli ===== */
.scan-cta { display: flex; align-items: center; gap: 14px; background: var(--brand); color: #fff; border-radius: 20px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 35%, transparent); }
.scan-cta-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.scan-cta b { display: block; font-size: 1.15rem; }
.scan-cta small { opacity: .85; }
.scan-cta > span:nth-child(2) { flex: 1; }
.camp-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.camp-strip small { color: var(--muted); font-weight: 500; width: 100%; padding-left: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-wide { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats-wide { grid-template-columns: repeat(5, 1fr); } }
.stat { background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat-v { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; }
.stats-3 .stat-v { font-size: 1.15rem; }
.stat-l { font-size: .76rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat-s { font-size: .7rem; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar-col i { width: 100%; max-width: 26px; background: var(--brand); border-radius: 6px 6px 3px 3px; opacity: .85; }
.bar-col small { font-size: .62rem; color: var(--muted); white-space: nowrap; }
.bar-n { font-size: .66rem; font-weight: 700; color: var(--brand-ink); }
.wide .bars .bar-col small { font-size: .56rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list.card { padding: 4px 12px; }
.list li a, .list li > div { display: flex; align-items: center; gap: 12px; padding: 11px 2px; color: var(--ink); border-bottom: 1px solid var(--line); }
.list li:last-child a { border: 0; }
.list b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list small { color: var(--muted); font-size: .8rem; }
.rank { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.mini-dots { display: flex; gap: 3px; flex-wrap: wrap; max-width: 64px; justify-content: flex-end; }
.mini-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e3e0ea; }
.mini-dots i.on { background: var(--brand); }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 0 12px; box-shadow: var(--shadow); margin-bottom: 12px; color: var(--muted); }
.search input { border: 0; background: transparent; box-shadow: none; padding: 13px 4px; }
.pager { display: flex; justify-content: center; gap: 10px; }

.done { text-align: center; padding: 20px 0 10px; }
.done-ico { width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop2 .4s; }
.cred { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.cred > div { flex: 1; background: #faf9fd; border-radius: 12px; padding: 10px 12px; }
.cred small { display: block; color: var(--muted); font-size: .75rem; }
.cred b { font-size: 1.2rem; }
.cred.highlight { border: 2px solid var(--brand); }
.msg-preview { white-space: pre-wrap; font: inherit; font-size: .88rem; background: #f0fdf4; border-radius: 12px; padding: 12px; margin: 0; }
.phone-note { font-size: .85rem; background: var(--brand-soft); padding: 10px 12px; border-radius: 12px; margin-top: -6px; }
.add-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-row > span { font-weight: 600; font-size: .9rem; }
.add-row .btn { flex: 1; }
.stepper { display: flex; align-items: center; background: #efedf5; border-radius: 14px; padding: 3px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.stepper input { width: 46px; text-align: center; border: 0; background: transparent; font-weight: 800; font-size: 1.1rem; padding: 6px 0; box-shadow: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.kv > div:last-child { border: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }

/* ===== QR okutma ekranı ===== */
body.scan-page { background: #000; overflow: hidden; }
body.scan-page .main { padding: 0; max-width: none; }
.scanner { position: fixed; inset: 0; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0)) 14px 12px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); z-index: 3; font-weight: 700; }
.scan-top span { flex: 1; text-align: center; }
.scan-frame { position: absolute; left: 50%; top: 44%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); border-radius: 26px; z-index: 2; }
.scan-frame i { position: absolute; width: 44px; height: 44px; border: 5px solid #fff; }
.scan-frame i:nth-child(1) { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 26px 0 0 0; }
.scan-frame i:nth-child(2) { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-radius: 0 26px 0 0; }
.scan-frame i:nth-child(3) { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-radius: 0 0 0 26px; }
.scan-frame i:nth-child(4) { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 26px 0; }
.scan-line { position: absolute; left: 10%; right: 10%; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), #fff, var(--brand), transparent); top: 10%; animation: scanline 2s ease-in-out infinite alternate; border-radius: 3px; box-shadow: 0 0 14px var(--brand); }
@keyframes scanline { to { top: 88%; } }
.scan-hint { position: absolute; left: 0; right: 0; top: calc(44% + min(35vw, 150px) + 26px); text-align: center; font-weight: 600; z-index: 3; padding: 0 20px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.scan-err { position: absolute; inset: 0; z-index: 4; background: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; }
.scanner.paused .scan-line { animation-play-state: paused; opacity: 0; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; color: var(--ink); border-radius: 28px 28px 0 0; padding: 22px 18px calc(18px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); animation: up .28s cubic-bezier(.2, .9, .3, 1.2); max-height: 88vh; overflow-y: auto; }
@keyframes up { from { transform: translateY(100%); } }
.res-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.res-head b { display: block; font-size: 1.1rem; }
.res-head small { color: var(--muted); }
.res-ok { text-align: center; margin-bottom: 14px; }
.res-ok .res-ico { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop2 .35s; }
.res-ok.warn .res-ico { background: var(--warn); }
.res-ok.err .res-ico { background: var(--err); }
.res-ok.gift .res-ico { background: linear-gradient(135deg, var(--gift), #f97316); font-size: 2rem; }
.res-ok h2 { font-size: 1.35rem; margin: 0; }
.res-ok p { color: var(--muted); margin: 4px 0 0; }
.res-dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.res-dots i { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed #cfcbd9; display: grid; place-items: center; font-style: normal; font-size: .9rem; }
.res-dots i.on { background: var(--brand); border: 0; }
.res-dots i.new { animation: pop .4s .1s both; }
.res-dots i.g { border-style: solid; border-color: #f8c6dc; }
.res-dots i.g.on { background: linear-gradient(135deg, var(--gift), #f97316); }
.res-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-actions .full { grid-column: 1 / -1; }

/* ===== Mağaza kampanya sayfası ===== */
body.store-page .main { padding-top: 0; }
.store-hero { --c: var(--brand); margin: 0 -16px 0; padding: 40px 20px 60px; text-align: center; color: #fff; background: radial-gradient(120% 100% at 50% 0, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); }
.hero-logo { width: 92px; height: 92px; border-radius: 26px; object-fit: contain; background: #fff; padding: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); margin-bottom: 12px; }
.store-hero .avatar-ico { display: inline-grid; font-size: 2.8rem; }
.store-hero h1 { font-size: 1.8rem; margin: 0; }
.hero-camp { font-size: 1.05rem; font-weight: 600; opacity: .95; margin-top: 4px; }
.store-body { margin-top: -40px; position: relative; }
.how ol { margin: 0; padding-left: 20px; font-size: .92rem; }
.how li { margin-bottom: 6px; }
.prose { font-size: .92rem; line-height: 1.65; }

/* ===== Admin ===== */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #faf9fd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-store { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-store b { display: block; }
.cell-store small { color: var(--muted); }
.store-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 5px solid var(--c); }
.store-head h1 { font-size: 1.3rem; margin: 0 0 2px; }
.store-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid-main { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-main { grid-template-columns: 1fr 340px; } }
.warn-card { border-left: 5px solid var(--warn); }
.logo-now { display: flex; align-items: center; gap: 10px; }
.logo-now img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.cat-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border: 0; }
.cat-row.card { padding: 12px 16px; }
.cat-row .cat-ico { width: 58px; text-align: center; font-size: 1.2rem; padding: 8px; }
.cat-row input:not(.cat-ico) { flex: 1; }
.cat-row small { white-space: nowrap; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); background: #1f1b2e; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .92rem; z-index: 90; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); animation: up .25s; }

@media (min-width: 900px) {
  .bottomnav { bottom: 16px; left: 50%; right: auto; transform: translateX(-50%); width: 520px; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); padding-bottom: 0; }
}
