:root {
  --brown: #006241;
  --brown-dark: #1e3932;
  --brown-soft: #00754a;
  --orange: #00754a;
  --orange-soft: #d4e9e2;
  --green: #00a862;
  --green-soft: #e5f3ee;
  --cream: #f2f0eb;
  --paper: #ffffff;
  --ink: #1e3932;
  --muted: #5f6f69;
  --line: #d9e1de;
  --danger: #b3261e;
  --shadow: 0 18px 50px rgba(30, 57, 50, .12);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body {
  min-height: 100%; margin: 0; color: var(--ink);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(0,117,74,.14), transparent 30rem),
    radial-gradient(circle at 95% 25%, rgba(212,233,226,.75), transparent 28rem),
    var(--cream);
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell { width: min(100%, 820px); min-height: 100vh; margin: 0 auto; padding-bottom: 44px; }
.topbar {
  position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  background: rgba(242,240,235,.9); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(0,98,65,.1);
}
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0; color: var(--brown); }
.brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 14px; }
.brand span { display: grid; text-align: left; line-height: 1; }
.brand b { font-size: 19px; letter-spacing: .04em; }
.brand small { color: var(--orange); font-weight: 900; letter-spacing: .22em; margin-top: 5px; font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
main { padding: 22px 16px 0; }
.view { display: none; animation: fade .2s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; line-height: 1.08; font-size: clamp(29px, 7vw, 48px); letter-spacing: -.04em; }
h2 { margin-bottom: 6px; font-size: 21px; letter-spacing: -.025em; }
p { line-height: 1.55; }
.eyebrow { margin: 0 0 7px; color: var(--orange); font-size: 11px; font-weight: 950; letter-spacing: .18em; }
.subtle { color: var(--muted); }
.center { text-align: center; }
.hero-card, .notice-card, .login-card, .dashboard-card, .staff-card, .selected-card, .qr-card, .history-card {
  border: 1px solid rgba(0,98,65,.1); background: rgba(255,255,255,.95); box-shadow: var(--shadow); border-radius: var(--radius);
}
.hero-card { text-align: center; padding: 36px 24px 28px; overflow: hidden; position: relative; }
.hero-card:before { content:""; position:absolute; width:220px; height:220px; border-radius:50%; background:rgba(212,233,226,.72); top:-100px; right:-60px; }
.hero-logo { width: min(210px, 58vw); height: 180px; object-fit: contain; display: block; margin: 0 auto 12px; position: relative; }
.hero-card p:not(.eyebrow) { color: var(--muted); max-width: 540px; margin: 0 auto 22px; }
.notice-card { margin-top: 15px; padding: 18px; display: grid; gap: 9px; color: var(--brown); }
.primary-button, .secondary-button, .danger-button, .mini-button {
  border-radius: 15px; min-height: 48px; padding: 12px 17px; font-weight: 850; border: 0; transition: .15s ease;
}
.primary-button { background: linear-gradient(135deg, var(--brown-dark), var(--brown)); color: white; box-shadow: 0 9px 20px rgba(0,98,65,.2); }
.secondary-button { background: #fff; color: var(--brown-dark); border: 1px solid #b8c9c3; }
.danger-button { background: #fff5f2; color: var(--danger); border: 1px solid #efc9c2; }
.mini-button { min-height: 38px; padding: 8px 11px; background: var(--brown); color: white; border-radius: 12px; font-size: 12px; }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { opacity: .55; cursor: wait; transform: none; }
.compact { min-height: 42px; padding: 9px 14px; }
.text-button { border: 0; background: transparent; color: var(--brown); font-weight: 800; padding: 8px; }
.text-button.strong { display: block; width: 100%; margin-top: 10px; }
.icon-button { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--brown); color: #fff; font-size: 24px; font-weight: 800; }
.icon-button.light { background: rgba(255,255,255,.9); color: var(--brown-dark); border: 1px solid rgba(0,98,65,.14); }
.customer-heading, .staff-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 20px; }
.customer-heading h1, .staff-heading h1 { font-size: clamp(30px, 7vw, 44px); }
.member-chip { white-space: nowrap; border-radius: 999px; background: var(--brown); color:#fff; padding: 9px 12px; font-size: 12px; font-weight:900; letter-spacing:.06em; }
.member-chip.centered { width:max-content; margin: 0 auto 14px; }
.loyalty-card { color: #fff; border-radius: 28px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); position: relative; overflow:hidden; }
.loyalty-card:after { content:""; position:absolute; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,.09); right:-75px; top:-70px; }
.coffee-card { background: linear-gradient(145deg, #1e3932, #006241 72%, #00754a); }
.shake-card { background: linear-gradient(145deg, #006241, #00754a 70%, #00a862); }
.card-head { display:flex; gap:13px; align-items:center; position:relative; z-index:1; }
.card-head .eyebrow { color:#d4e9e2; }
.shake-card .card-head .eyebrow { color:#e5f3ee; }
.card-head h2 { font-size: 18px; }
.product-icon { display:grid; place-items:center; flex:0 0 52px; height:52px; background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.2); border-radius:17px; font-size:27px; }
.stamp-grid { position:relative; z-index:1; display:grid; grid-template-columns:repeat(5,1fr); gap:9px; margin:20px 0 16px; }
.stamp { aspect-ratio:1; border-radius:50%; display:grid; place-items:center; border:2px solid rgba(255,255,255,.42); color:rgba(255,255,255,.72); font-weight:900; font-size:13px; }
.stamp.filled { background:#fff; color:var(--brown-dark); border-color:#fff; box-shadow:0 4px 12px rgba(0,0,0,.15); }
.shake-card .stamp.filled { color:var(--brown); }
.progress-row { display:flex; justify-content:space-between; gap:12px; font-size:14px; position:relative; z-index:1; }
.progress-row span { opacity:.85; }
.reward-pill { position:relative; z-index:1; margin-top:14px; padding:10px 13px; border-radius:14px; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.18); font-weight:800; }
.reward-pill.ready { background:#fff; color:var(--brown-dark); }
.qr-card { padding: 22px; margin-top: 18px; text-align:center; }
.qr-card p { color:var(--muted); }
.qr-box { width: 226px; min-height: 226px; margin: 18px auto; padding: 12px; background:#fff; border-radius:20px; display:grid; place-items:center; border:1px solid var(--line); }
.qr-box.large { width:250px; min-height:250px; }
.qr-box img, .qr-box canvas { max-width:100%; height:auto !important; border-radius:8px; }
.history-card { margin-top:16px; padding:20px; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.section-title h2 { margin:0; }
.section-title small { color:var(--muted); text-align:right; }
.history-list { margin-top:12px; }
.history-item { display:grid; grid-template-columns:42px 1fr auto; gap:11px; align-items:center; padding:12px 0; border-top:1px solid var(--line); }
.history-item:first-child { border-top:0; }
.history-icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--orange-soft); font-size:20px; }
.history-copy { display:grid; gap:3px; }
.history-copy small { color:var(--muted); }
.history-amount { font-weight:900; color:var(--brown); }
.empty-state { text-align:center; color:var(--muted); padding:25px 12px; }
.login-card { padding:28px 22px; max-width:520px; margin:0 auto; }
.login-card > img { width:82px; height:82px; border-radius:24px; margin-bottom:14px; }
label { display:block; font-size:13px; font-weight:850; color:var(--brown); margin:15px 0 7px; }
label small { color:var(--muted); font-weight:600; }
.input { width:100%; min-height:50px; border:1px solid #b8c9c3; background:#fff; border-radius:15px; padding:11px 14px; outline:none; color:var(--ink); }
.input:focus { border-color:var(--brown); box-shadow:0 0 0 4px rgba(0,98,65,.12); }
.login-card .primary-button { width:100%; margin-top:16px; }
.login-card .text-button { width:100%; margin-top:9px; }
.form-message { min-height:20px; margin-top:11px; color:var(--muted); font-size:13px; line-height:1.45; }
.form-message.error { color:var(--danger); }
.form-message.success { color:var(--brown); }
.dashboard-card, .staff-card { padding:20px; margin-bottom:16px; }
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:16px; }
.stat-grid div { border-radius:17px; background:var(--cream); padding:15px 8px; text-align:center; }
.stat-grid b { display:block; font-size:25px; color:var(--brown); }
.stat-grid span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.scan-button { width:100%; display:flex; align-items:center; gap:14px; text-align:left; border:0; border-radius:18px; background:linear-gradient(135deg,var(--brown-dark),var(--brown)); color:white; padding:17px; }
.scan-button > span { width:48px; height:48px; border-radius:16px; display:grid; place-items:center; font-size:26px; background:rgba(255,255,255,.14); }
.scan-button div { display:grid; gap:4px; }
.scan-button small { opacity:.8; }
.divider { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:11px; margin:16px 0; }
.divider:before,.divider:after { content:""; height:1px; background:var(--line); flex:1; }
.search-row { display:grid; grid-template-columns:1fr auto; gap:9px; }
.search-results { display:grid; gap:8px; margin-top:12px; }
.search-result { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; border:1px solid var(--line); background:#fff; border-radius:16px; padding:13px; text-align:left; color:var(--ink); }
.search-result div { display:grid; gap:4px; }
.search-result small { color:var(--muted); }
.search-result > b { color:var(--brown); }
.selected-card { padding:0; overflow:hidden; }
.selected-head { display:flex; justify-content:space-between; gap:12px; padding:21px; background:linear-gradient(135deg,var(--brown-dark),var(--brown)); color:white; }
.selected-head .eyebrow { color:#d4e9e2; }
.selected-head .subtle { color:rgba(255,255,255,.78); margin:0; }
.selected-grid { display:grid; gap:12px; padding:16px; }
.selected-product { border:1px solid var(--line); border-radius:20px; padding:16px; }
.selected-product-title { display:flex; align-items:center; gap:11px; margin-bottom:14px; }
.selected-product-title > span { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; font-size:24px; background:var(--orange-soft); }
.shake-block .selected-product-title > span { background:var(--green-soft); }
.selected-product-title div { display:grid; gap:2px; }
.selected-product-title small { color:var(--muted); }
.action-grid { display:grid; grid-template-columns:1fr 1fr 1.6fr; gap:8px; }
.quantity-button,.redeem-button { min-height:44px; border-radius:13px; font-weight:900; }
.quantity-button { border:0; background:var(--brown); color:white; }
.shake-block .quantity-button { background:var(--green); }
.redeem-button { border:1px solid #b8c9c3; background:#fff; color:var(--brown-dark); }
.customer-share-actions { display:grid; grid-template-columns:1.25fr 1fr; gap:9px; padding:0 16px 18px; }
.modal { position:fixed; z-index:100; inset:0; background:rgba(30,57,50,.64); backdrop-filter:blur(8px); padding:16px; display:grid; place-items:center; overflow:auto; }
.modal-card { width:min(100%,520px); max-height:calc(100vh - 32px); overflow:auto; background:var(--paper); border-radius:25px; padding:21px; box-shadow:0 30px 80px rgba(0,0,0,.28); }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.modal-head h2 { margin:0; }
.modal-card .primary-button,.modal-card .secondary-button { width:100%; margin-top:10px; }
.reader { min-height:250px; overflow:hidden; border-radius:18px; background:#10241f; margin-top:15px; }
.reader video { border-radius:18px; }
.file-label { display:grid; place-items:center; }
.share-name { text-align:center; font-size:20px; font-weight:900; margin-bottom:10px; }
.toast { position:fixed; z-index:200; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(calc(100% - 30px),460px); background:#1e3932; color:white; border-radius:16px; padding:13px 16px; box-shadow:0 15px 45px rgba(0,0,0,.28); text-align:center; font-weight:750; }
.toast.error { background:#8f2c25; }
@media (min-width:700px) {
  main { padding:30px 24px 0; }
  .selected-grid { grid-template-columns:1fr 1fr; }
  .hero-card { padding:46px; }
}
@media (max-width:560px) {
  .customer-heading,.staff-heading { align-items:flex-start; }
  .member-chip { margin-top:4px; font-size:10px; }
  .stat-grid { grid-template-columns:1fr 1fr; }
  .search-row { grid-template-columns:1fr; }
  .action-grid { grid-template-columns:1fr 1fr; }
  .redeem-button { grid-column:1/-1; }
  .customer-share-actions { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }

/* PEANUT Kahve Çarkı */
body.modal-open { overflow: hidden; }
.wheel-customer-card {
  margin: -2px 0 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(0,98,65,.14);
  background:
    radial-gradient(circle at 90% 5%, rgba(212,233,226,.95), transparent 16rem),
    linear-gradient(145deg, #ffffff, #f2f0eb);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wheel-customer-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.wheel-customer-heading h2 { margin-bottom:6px; font-size:24px; }
.wheel-customer-heading p:not(.eyebrow) { margin:0; color:var(--muted); }
.wheel-badge { flex:0 0 auto; padding:8px 10px; border-radius:999px; background:var(--brown-dark); color:#fff; font-size:10px; font-weight:900; letter-spacing:.06em; }
.spin-wheel-wrap { position:relative; width:min(310px, 82vw); aspect-ratio:1; margin:24px auto 20px; filter:drop-shadow(0 18px 24px rgba(30,57,50,.22)); }
.spin-wheel {
  position:absolute; inset:0; border-radius:50%;
  border:10px solid #fff;
  box-shadow:inset 0 0 0 5px #1e3932, 0 0 0 2px rgba(0,98,65,.12);
  background:conic-gradient(
    from 0deg,
    #006241 0deg 50.4deg,
    #d4e9e2 50.4deg 100.8deg,
    #00754a 100.8deg 151.2deg,
    #f2f0eb 151.2deg 201.6deg,
    #00a862 201.6deg 252deg,
    #cba258 252deg 259.2deg,
    #1e3932 259.2deg 309.6deg,
    #e5f3ee 309.6deg 360deg
  );
  transition:transform 4.2s cubic-bezier(.12,.7,.08,1);
  overflow:hidden;
}
.spin-wheel:after { content:""; position:absolute; inset:0; border-radius:50%; background:radial-gradient(circle, transparent 55%, rgba(255,255,255,.14) 56%, transparent 58%); pointer-events:none; }
.spin-pointer { position:absolute; z-index:5; left:50%; top:-7px; transform:translateX(-50%); width:0; height:0; border-left:17px solid transparent; border-right:17px solid transparent; border-top:0; border-bottom:31px solid #cba258; filter:drop-shadow(0 4px 3px rgba(0,0,0,.28)); }
.wheel-center { position:absolute; z-index:3; left:50%; top:50%; transform:translate(-50%,-50%); width:88px; height:88px; border-radius:50%; display:grid; place-content:center; text-align:center; background:#fff; color:var(--brown-dark); border:7px solid #1e3932; box-shadow:0 8px 18px rgba(0,0,0,.22); line-height:1; }
.wheel-center b { font-size:15px; letter-spacing:.04em; }
.wheel-center small { margin-top:5px; font-size:9px; font-weight:950; letter-spacing:.16em; color:var(--brown); }
.wheel-label { position:absolute; z-index:2; left:50%; top:50%; width:54px; margin-left:-27px; margin-top:-9px; text-align:center; font-size:12px; font-weight:950; line-height:1; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.35); }
.wheel-label.label-1 { transform:rotate(25.2deg) translateY(-112px) rotate(-25.2deg); }
.wheel-label.label-2 { transform:rotate(75.6deg) translateY(-112px) rotate(-75.6deg); color:var(--brown-dark); text-shadow:none; }
.wheel-label.label-3 { transform:rotate(126deg) translateY(-112px) rotate(-126deg); }
.wheel-label.label-4 { transform:rotate(176.4deg) translateY(-112px) rotate(-176.4deg); color:var(--brown-dark); text-shadow:none; }
.wheel-label.label-5 { transform:rotate(226.8deg) translateY(-112px) rotate(-226.8deg); font-size:9px; }
.wheel-label.label-6 { transform:rotate(255.6deg) translateY(-124px) rotate(-255.6deg); width:22px; margin-left:-11px; font-size:12px; }
.wheel-label.label-7 { transform:rotate(284.4deg) translateY(-112px) rotate(-284.4deg); }
.wheel-label.label-8 { transform:rotate(334.8deg) translateY(-112px) rotate(-334.8deg); color:var(--brown-dark); text-shadow:none; font-size:17px; }
.wheel-primary-button { width:100%; min-height:54px; border:0; border-radius:17px; padding:13px 18px; color:#fff; background:linear-gradient(135deg,#1e3932,#006241); box-shadow:0 10px 22px rgba(0,98,65,.22); font-weight:950; font-size:16px; }
.wheel-primary-button:disabled { opacity:.62; cursor:wait; }
.wheel-fineprint { margin:12px 0 0; color:var(--muted); text-align:center; font-size:11px; line-height:1.45; }
.wheel-result { margin-top:15px; border-radius:20px; padding:18px; text-align:center; background:#e5f3ee; border:1px solid rgba(0,98,65,.15); color:var(--brown-dark); animation:wheelResultPop .35s ease; }
.wheel-result.large { margin:18px 0 4px; padding:24px 18px; }
.wheel-result .result-icon { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 9px; border-radius:18px; background:#fff; color:var(--brown); font-size:22px; font-weight:950; box-shadow:0 8px 20px rgba(30,57,50,.12); }
.wheel-result small { display:block; margin-bottom:5px; color:var(--brown); font-weight:950; letter-spacing:.16em; font-size:10px; }
.wheel-result b { display:block; font-size:20px; line-height:1.2; }
.wheel-result p { margin:8px 0 0; color:var(--muted); font-size:13px; }
.wheel-result.outcome-free_coffee { background:#fff6dc; border-color:#e6c879; }
.wheel-result.outcome-blank { background:#f2f0eb; }
.wheel-result.outcome-retry { background:#d4e9e2; }
@keyframes wheelResultPop { from { opacity:0; transform:scale(.96) translateY(5px); } to { opacity:1; transform:none; } }
.wheel-action-button { width:100%; min-height:50px; margin-top:10px; border:0; border-radius:15px; padding:11px 14px; display:flex; justify-content:center; align-items:center; gap:9px; background:linear-gradient(135deg,#d4e9e2,#e5f3ee); color:var(--brown-dark); font-weight:900; box-shadow:inset 0 0 0 1px rgba(0,98,65,.14); }
.wheel-action-button span { font-size:21px; }
.wheel-action-button:disabled { opacity:.6; cursor:wait; }
.wheel-staff-note { margin:8px 3px 0; color:var(--muted); font-size:11px; line-height:1.4; }
.staff-wheel-modal-card { text-align:center; }
.staff-wheel-modal-card .modal-head { text-align:left; }
.staff-wheel-waiting { padding:22px 8px 10px; }
.staff-wheel-waiting h3 { margin:11px 0 7px; font-size:20px; }
.staff-wheel-waiting p { margin:0; color:var(--muted); }
.waiting-orbit { width:76px; height:76px; margin:0 auto; display:grid; place-items:center; border-radius:50%; background:var(--green-soft); font-size:35px; animation:waitingSpin 2s linear infinite; }
@keyframes waitingSpin { to { transform:rotate(360deg); } }
.staff-wheel-actions { display:grid; gap:8px; margin-top:13px; }
.staff-wheel-actions .primary-button,.staff-wheel-actions .danger-button { width:100%; }

@media (max-width:560px) {
  .wheel-customer-card { padding:18px; }
  .wheel-customer-heading { display:block; }
  .wheel-badge { display:inline-block; margin-top:8px; }
  .spin-wheel-wrap { width:min(286px, 82vw); }
  .wheel-label.label-1,.wheel-label.label-2,.wheel-label.label-3,.wheel-label.label-4,.wheel-label.label-5,.wheel-label.label-7,.wheel-label.label-8 { --wheel-radius:103px; }
  .wheel-label.label-1 { transform:rotate(25.2deg) translateY(-103px) rotate(-25.2deg); }
  .wheel-label.label-2 { transform:rotate(75.6deg) translateY(-103px) rotate(-75.6deg); }
  .wheel-label.label-3 { transform:rotate(126deg) translateY(-103px) rotate(-126deg); }
  .wheel-label.label-4 { transform:rotate(176.4deg) translateY(-103px) rotate(-176.4deg); }
  .wheel-label.label-5 { transform:rotate(226.8deg) translateY(-103px) rotate(-226.8deg); }
  .wheel-label.label-6 { transform:rotate(255.6deg) translateY(-113px) rotate(-255.6deg); }
  .wheel-label.label-7 { transform:rotate(284.4deg) translateY(-103px) rotate(-284.4deg); }
  .wheel-label.label-8 { transform:rotate(334.8deg) translateY(-103px) rotate(-334.8deg); }
}
