:root {
  --bg: #f6f1e8;
  --surface: #fffdf9;
  --ink: #1e2925;
  --muted: #68736e;
  --line: #e4dccf;
  --brand: #17352c;
  --brand-2: #285346;
  --accent: #d99a3d;
  --danger: #b3382c;
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.5rem; line-height: 1.15; }
h2 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }

.signup, .home {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 24px);
}
.signup { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.brand-mark {
  width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 8px;
  border-radius: 18px; background: var(--brand); color: var(--accent);
  font: 700 2rem Georgia, serif;
}
form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input:not([type=checkbox]) {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
.consent { grid-template-columns: 22px 1fr; align-items: start; font-weight: 400; color: var(--muted); font-size: .85rem; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); }
.error { color: var(--danger); font-size: .88rem; min-height: 1.2em; }

.btn {
  min-height: 48px; padding: 10px 18px; border: 0; border-radius: 12px;
  background: var(--surface); font-weight: 700;
}
.btn.primary { width: 100%; background: var(--brand); color: #fff; }
.small-btn { min-height: 40px; padding: 8px 14px; background: var(--brand); color: #fff; font-size: .88rem; white-space: nowrap; }
.small-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.icon-btn {
  flex: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); font-weight: 800; font-size: .85rem;
}

.loyalty-card {
  display: grid; gap: 10px; padding: 20px; border-radius: 22px; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px rgb(23 53 44 / .24);
}
.card-head { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; opacity: .9; }
.points-row { display: flex; align-items: baseline; gap: 8px; }
.points-row strong { font-size: 3.2rem; line-height: 1; color: #ffd28a; }
.progress { height: 10px; overflow: hidden; border-radius: 99px; background: rgb(255 255 255 / .2); }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .3s; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.actions button {
  display: grid; justify-items: start; gap: 2px; min-height: 118px; padding: 15px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.actions small { color: var(--muted); }
.tile-icon { font-size: 1.55rem; line-height: 1.2; margin-bottom: 4px; }

.install, .demo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 14px; border-radius: 14px; background: #f0e4cf;
}
.demo { background: transparent; border: 1px dashed #b9ad9a; flex-wrap: wrap; }
.demo div { display: flex; gap: 8px; }

.sheet {
  width: 100%; max-width: 480px; max-height: 86dvh; margin: auto auto 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 22px);
  border: 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink); overflow-y: auto;
}
.sheet::backdrop { background: rgb(15 25 21 / .5); }
.sheet[open] { display: grid; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.close { width: 44px; height: 44px; margin: -6px -6px -6px 0; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; }
.qr { width: min(230px, 70vw); aspect-ratio: 1; margin: 0 auto; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; text-align: center; }
.qr svg { display: block; width: 100%; height: 100%; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chips button { flex: none; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-weight: 600; }
.chips button[aria-selected=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.menu-list li:last-child { border-bottom: 0; }
.menu-list small { display: block; color: var(--muted); }
.menu-list b:last-child { white-space: nowrap; }

.model-btn { display: inline-flex; align-items: center; min-height: 36px; margin-top: 6px; padding: 5px 12px; border: 1px solid var(--brand-2); border-radius: 99px; background: transparent; color: var(--brand-2); font-size: .82rem; font-weight: 700; }
.model-stage { position: relative; width: 100%; height: min(58dvh, 430px); overflow: hidden; border-radius: 16px; background: var(--bg); }
.model-stage model-viewer { display: block; width: 100%; height: 100%; --poster-color: transparent; }
.ar-btn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); min-height: 46px; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; white-space: nowrap; }

.wifi { display: grid; gap: 8px; margin: 0; }
.wifi div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 12px; }
.wifi dt { color: var(--muted); }
.wifi dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; text-align: right; }

.prize { display: grid; gap: 3px; padding: 18px; text-align: center; border-radius: 16px; background: var(--brand); color: #fff; }
.prize strong { font-size: 1.3rem; color: #ffd28a; }
.ticket-count { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ticket-count strong { font-size: 2.4rem; line-height: 1; }

.toast {
  position: fixed; z-index: 20; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px);
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #111a17; color: #fff;
  font-size: .9rem; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.link-btn { min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--brand-2); font-weight: 700; text-decoration: underline; }
.btn:disabled { opacity: .6; cursor: default; }
.transfer { display: grid; gap: 2px; justify-items: center; padding: 12px; border-radius: 12px; background: var(--bg); }
.transfer strong { font-size: 1.7rem; }

.staff-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 14px; }
.scanner { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 14px; background: #101815; }
.scanner video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scanner::after { content: ""; position: absolute; inset: 16%; border: 3px solid var(--accent); border-radius: 14px; }
.lookup { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0; }
.lookup .btn { background: var(--brand); color: #fff; }
.client-head { display: flex; justify-content: space-between; gap: 12px; }
.client-points { text-align: right; }
.client-points strong { display: block; font-size: 2rem; line-height: 1; }
.point-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.point-buttons .btn { background: var(--brand); color: #fff; font-size: 1.15rem; min-height: 56px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-actions .btn { flex: 1; background: transparent; border: 1px solid var(--line); font-size: .88rem; }

.rewards-home { display: grid; gap: 8px; margin-top: 16px; }
.rewards-home h2 { font-size: 1.05rem; }
.reward-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.reward-line small { display: block; color: var(--muted); }
.reward-state { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); font-size: .78rem; font-weight: 700; }
.reward-state.ready { background: var(--brand); color: #fff; }
.reward-buttons { display: grid; gap: 8px; }
.reward-buttons .btn { width: 100%; background: #f0e4cf; color: var(--ink); text-align: left; }
.reward-buttons .btn:disabled { background: var(--bg); color: var(--muted); opacity: 1; }

.cafe-logo { flex: none; width: 48px; height: 48px; object-fit: cover; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.topbar > .cafe-logo + div { flex: 1; min-width: 0; }
.brand-mark { overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-brand { display: inline-flex; align-items: center; gap: 8px; }
.card-brand img { width: 26px; height: 26px; object-fit: cover; border-radius: 7px; background: #fff; }
.cafe-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-fallback { display: inline-grid; place-items: center; background: var(--brand); color: var(--accent); font: 700 1.4rem Georgia, serif; }
.logo-editor { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.logo-preview { display: grid; place-items: center; width: 112px; height: 112px; overflow: hidden; border: 1px dashed #b9ad9a; border-radius: 18px; background: var(--bg); color: var(--muted); font-size: .8rem; text-align: center; }
.logo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo-controls { display: grid; gap: 10px; min-width: 0; }
.logo-controls input[type=file] { min-height: 0; padding: 8px; font-size: .78rem; }
.logo-controls select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.logo-controls .staff-actions .btn { flex: 1 1 auto; }
.logo-controls #logo-save { background: var(--brand); color: #fff; }

.prize-banner { display: grid; gap: 6px; margin-top: 14px; padding: 14px; border: 1px solid var(--accent); border-radius: 14px; background: #f8ead2; }
.prize-banner .btn { background: var(--brand); color: #fff; }
.draw-panel { margin-top: 0; }
.draw-result { display: grid; gap: 3px; margin-top: 14px; padding: 20px; border-radius: 16px; background: var(--brand); color: #fff; text-align: center; }
.draw-result strong { font-size: 1.7rem; color: #ffd28a; overflow-wrap: anywhere; }
.section-title { margin-top: 18px; font-size: 1.05rem; }
.winner-row { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.block { display: block; }
.badge.wait { background: #f8ead2; color: #7a4d0b; }

.dash { width: 100%; max-width: 980px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 32px); }
.owner-banner { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #f0e4cf; font-size: .88rem; }
.owner-banner a { color: var(--brand-2); font-weight: 700; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.tabs button { flex: 1 0 auto; min-height: 42px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-size: .8rem; font-weight: 700; }
.tabs button[aria-selected=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat span { color: var(--muted); font-size: .8rem; }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.quick-links { margin-top: 12px; }
.link-action { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; text-align: center; }
.danger-btn, .staff-actions .danger-btn, .small-btn.danger-btn { background: transparent; border: 1px solid #dfb2ab; color: var(--danger); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity small, .client-row small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.plus { color: var(--brand-2); }
.minus { color: var(--danger); }
.search { margin-bottom: 12px; }
.client-list, .reward-admin-list, .cafe-list, .settings { display: grid; gap: 10px; }
.reward-admin-list, .cafe-list { margin-top: 14px; }
.client-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.client-side { flex: none; display: grid; justify-items: end; gap: 3px; }
.client-side strong { font-size: 1.4rem; line-height: 1; }
.inline-form { display: grid; gap: 12px; margin: 0; }
.reward-admin, .cafe-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.reward-fields { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.reward-tools { align-items: center; }
.reward-tools .btn { flex: none; }
.reward-tools .btn.small-btn:not(.danger-btn) { background: var(--brand); border-color: var(--brand); color: #fff; }
.check { display: inline-flex; grid-template-columns: none; align-items: center; gap: 6px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.cafe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge { flex: none; padding: 4px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.badge.on { background: #dcebe3; color: var(--brand); }
.badge.off { background: #f6dfdb; color: var(--danger); }
.secret { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 14px; background: #f0e4cf; }
.secret pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; }
.menu-editor { display: grid; gap: 14px; }
.menu-section { display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.menu-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.menu-section-head input { font-weight: 700; }
.menu-row { display: grid; grid-template-columns: minmax(0, 1fr) 82px 40px; gap: 6px; align-items: center; }
.menu-row input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.icon-remove { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--danger); font-size: 1.3rem; line-height: 1; }
.save-bar { position: sticky; bottom: 12px; z-index: 2; }

@media (max-width: 520px) {
  .tabs { gap: 4px; overflow-x: visible; }
  .tabs button { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: .75rem; }
}

@media (min-width: 720px) {
  .inline-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .menu-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 90px 40px; }
  .menu-row input:nth-child(2) { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.password-field { position: relative; display: block; font-weight: 400; }
.password-field input { padding-right: 76px !important; }
.show-password { position: absolute; top: 4px; right: 4px; min-width: 62px; height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: #1f6b57; font-size: .82rem; font-weight: 700; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 14px; }
.account-actions .link-btn { font-size: .85rem; }

/* Liquid glass theme */
:root {
  --bg: #f7eee3;
  --surface: rgb(255 255 255 / .58);
  --ink: #17201d;
  --muted: #4d5954;
  --line: rgb(255 255 255 / .72);
  --brand: #17201d;
  --brand-2: #1f6b57;
  --accent: #ff9d42;
  --danger: #b42318;
  --radius: 26px;
  --glass-blur: blur(22px) saturate(175%);
  --glass-shadow: 0 14px 34px rgb(62 50 38 / .13), inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(255 255 255 / .28);
}

html { background: #f7eee3; }
body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -.01em;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38vmax 34vmax at 8% 4%, #ffc48a 0, transparent 68%),
    radial-gradient(36vmax 36vmax at 96% 16%, #b9e8d3 0, transparent 66%),
    radial-gradient(40vmax 36vmax at 88% 82%, #c9c4ff 0, transparent 68%),
    radial-gradient(36vmax 34vmax at 6% 92%, #ffd5e2 0, transparent 66%),
    #f7eee3;
}

h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.035em; }
h2 { font-weight: 800; letter-spacing: -.025em; }

.staff-panel, .stat, .client-row, .reward-admin, .cafe-card, .reward-line,
.actions button, .icon-btn, .install, .secret, .tabs, .sheet, .prize-banner,
.wifi div, .transfer, .demo {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.staff-panel, .client-row, .reward-admin, .cafe-card, .actions button, .secret, .install { border-radius: var(--radius); }
.stat, .reward-line, .prize-banner { border-radius: 22px; }

.loyalty-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgb(255 255 255 / .34);
  border-radius: 30px;
  background: linear-gradient(145deg, rgb(23 32 29 / .9), rgb(31 107 87 / .78));
  box-shadow: 0 20px 40px rgb(23 32 29 / .28), inset 0 1px 0 rgb(255 255 255 / .42);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.loyalty-card::before {
  content: "";
  position: absolute;
  inset: -40% 28% 48% -24%;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
  transform: rotate(-16deg);
  pointer-events: none;
}
.loyalty-card > * { position: relative; }
.points-row strong { font-size: 4rem; font-weight: 800; letter-spacing: -.05em; color: #ffd08f; }
.progress { height: 12px; background: rgb(255 255 255 / .2); box-shadow: inset 0 1px 2px rgb(0 0 0 / .25); }
.progress span { background: linear-gradient(90deg, #ffb35c, #ffe0a6); }

.btn { border-radius: 999px; }
.btn.primary, .small-btn, .point-buttons .btn, .lookup .btn, .ar-btn, .prize-banner .btn, .logo-controls #logo-save {
  background: linear-gradient(180deg, #2a3531, #111816);
  color: #fff;
  box-shadow: 0 8px 18px rgb(23 32 29 / .24), inset 0 1px 0 rgb(255 255 255 / .28);
}
.small-btn.ghost, .staff-actions .btn, .link-action {
  background: rgb(255 255 255 / .52);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .85);
}
.reward-tools .btn.small-btn:not(.danger-btn) {
  background: linear-gradient(180deg, #2a3531, #111816);
  border-color: transparent;
  color: #fff;
}
.danger-btn, .staff-actions .danger-btn, .small-btn.danger-btn {
  background: rgb(255 255 255 / .55);
  border: 1px solid rgb(180 35 24 / .35);
  color: var(--danger);
  box-shadow: none;
}
.btn:active, .actions button:active { transform: scale(.975); }

input:not([type=checkbox]), .logo-controls select {
  border: 1px solid rgb(255 255 255 / .8);
  border-radius: 16px;
  background: rgb(255 255 255 / .64);
  box-shadow: inset 0 1px 3px rgb(62 50 38 / .12);
}
input::placeholder { color: #66716c; }
.link-btn { color: var(--brand-2); }

.actions button { min-height: 128px; }
.tile-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border: 1px solid rgb(255 255 255 / .8);
  border-radius: 16px;
  font-size: 1.35rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .85);
}
.actions button:nth-child(1) .tile-icon { background: rgb(255 196 138 / .72); }
.actions button:nth-child(2) .tile-icon { background: rgb(174 226 245 / .78); }
.actions button:nth-child(3) .tile-icon { background: rgb(255 232 140 / .78); }
.actions button:nth-child(4) .tile-icon { background: rgb(201 196 255 / .8); }

.brand-mark, .cafe-logo { border: 1px solid rgb(255 255 255 / .85); box-shadow: 0 8px 18px rgb(62 50 38 / .16); }
.brand-mark { width: 76px; height: 76px; border-radius: 24px; }
.cafe-logo { border-radius: 15px; }
.reward-state { background: rgb(255 255 255 / .62); color: var(--muted); }
.reward-state.ready { background: var(--brand-2); color: #fff; }

.tabs { padding: 4px; border-radius: 999px; }
.tabs button { border: 0; color: var(--ink); }
.tabs button[aria-selected=true], .chips button[aria-selected=true] {
  background: linear-gradient(180deg, #2a3531, #111816);
  color: #fff;
  box-shadow: 0 5px 12px rgb(23 32 29 / .24);
}
.chips button { border-color: rgb(23 32 29 / .14); background: rgb(255 255 255 / .46); }

.sheet {
  border-width: 1px 1px 0;
  border-radius: 32px 32px 0 0;
  background: rgb(255 255 255 / .74);
}
.sheet::backdrop {
  background: rgb(30 34 32 / .3);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.menu-list li { border-bottom-color: rgb(23 32 29 / .1); }
.menu-list .model-btn { display: flex; width: fit-content; background: rgb(255 255 255 / .55); }
.activity li, .winner-row, .menu-section { border-color: rgb(23 32 29 / .1); }
.qr { background: #fff; border-color: #fff; box-shadow: 0 8px 20px rgb(62 50 38 / .12); }
.model-stage { background: rgb(255 255 255 / .42); border: 1px solid var(--line); }
.prize, .draw-result { background: linear-gradient(145deg, rgb(23 32 29 / .92), rgb(31 107 87 / .82)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); }
.prize-banner { background: rgb(255 226 176 / .68); border-color: rgb(255 255 255 / .85); }
.owner-banner { background: rgb(255 226 176 / .68); border: 1px solid var(--line); border-radius: 16px; }
.toast { background: rgb(17 24 22 / .86); border-radius: 999px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.badge.on { background: rgb(190 235 214 / .8); color: #0f4f3e; }
.badge.off { background: rgb(255 214 208 / .82); color: #8f1f15; }
.badge.wait { background: rgb(255 226 176 / .85); color: #6d4306; }
.logo-preview { background: rgb(255 255 255 / .45); border-color: rgb(23 32 29 / .28); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --surface: rgb(255 255 255 / .92); }
  .sheet { background: #fffdf9; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --surface: #fffdf9; --line: #e4dccf; }
  .staff-panel, .stat, .client-row, .reward-admin, .cafe-card, .reward-line, .actions button, .icon-btn,
  .install, .secret, .tabs, .sheet, .prize-banner, .wifi div, .transfer, .loyalty-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .sheet { background: #fffdf9; }
  .loyalty-card { background: #17352c; }
}


/* Lwafiy brand */
:root {
  --bg: #FFF8F2;
  --surface: rgb(255 255 255 / .64);
  --ink: #1F2145;
  --muted: #55577A;
  --line: rgb(255 255 255 / .82);
  --brand: #1F2145;
  --brand-2: #C93A34;
  --accent: #F04E45;
  --danger: #C93A34;
  --glass-shadow: 0 14px 34px rgb(31 33 69 / .1), inset 0 1px 0 rgb(255 255 255 / .92), inset 0 -1px 0 rgb(255 255 255 / .3);
}
html { background: #FFF8F2; }
body { font-family: "Noto Sans", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body::before {
  background:
    radial-gradient(34vmax 30vmax at 4% 2%, rgb(240 78 69 / .24) 0, transparent 70%),
    radial-gradient(34vmax 32vmax at 100% 18%, rgb(31 33 69 / .13) 0, transparent 68%),
    radial-gradient(38vmax 34vmax at 86% 92%, rgb(240 78 69 / .17) 0, transparent 70%),
    radial-gradient(30vmax 30vmax at 2% 86%, rgb(31 33 69 / .08) 0, transparent 68%),
    #FFF8F2;
}
h1, h2 { font-weight: 900; }
.loyalty-card {
  background: rgb(31 33 69 / .94);
  border-color: rgb(255 255 255 / .22);
  box-shadow: 0 20px 40px rgb(31 33 69 / .28), inset 0 1px 0 rgb(255 255 255 / .3);
}
.loyalty-card::before { background: rgb(240 78 69 / .16); }
.points-row strong { color: #FFF8F2; }
.progress span { background: #F04E45; }
.btn.primary, .small-btn, .point-buttons .btn, .lookup .btn, .ar-btn, .prize-banner .btn, .logo-controls #logo-save,
.reward-tools .btn.small-btn:not(.danger-btn), .tabs button[aria-selected=true], .chips button[aria-selected=true] {
  background: #1F2145;
  color: #FFF8F2;
  box-shadow: 0 7px 16px rgb(31 33 69 / .22), inset 0 1px 0 rgb(255 255 255 / .18);
}
.small-btn.ghost, .staff-actions .btn:not(.danger-btn), .link-action { background: rgb(255 255 255 / .58); color: #1F2145; }
.reward-tools .btn.small-btn:not(.danger-btn) { background: #1F2145; color: #FFF8F2; }
.danger-btn, .staff-actions .danger-btn, .small-btn.danger-btn { border-color: rgb(201 58 52 / .4); color: #C93A34; }
input::placeholder { color: #66688A; }
.link-btn, .show-password, .owner-banner a { color: #C93A34; }
.actions button:nth-child(odd) .tile-icon { background: rgb(240 78 69 / .16); }
.actions button:nth-child(even) .tile-icon { background: rgb(31 33 69 / .1); }
.actions button.solo { grid-column: 1 / -1; min-height: 104px; }
.brand-mark, .logo-fallback { background: #1F2145; color: #F04E45; }
.reward-state.ready { background: #1F2145; color: #FFF8F2; }
.prize, .draw-result { background: rgb(31 33 69 / .95); }
.prize strong, .draw-result strong { color: #FFF8F2; }
.prize-banner, .owner-banner { background: rgb(240 78 69 / .13); }
.toast { background: rgb(31 33 69 / .92); color: #FFF8F2; }
.badge.on { background: rgb(31 33 69 / .1); color: #1F2145; }
.badge.off { background: rgb(240 78 69 / .16); color: #A62E29; }
.badge.wait { background: rgb(240 78 69 / .13); color: #A62E29; }
.plus { color: #1F2145; }
.minus { color: #C93A34; }
.model-btn { border-color: #1F2145; color: #1F2145; }
.platform-logo { display: block; width: 190px; max-width: 70%; height: auto; margin: 0 auto 8px; }
.signup:has(.platform-logo) > h1, .signup:has(.platform-logo) > p { text-align: center; }
.admin-symbol { flex: none; width: 48px; height: 48px; }
.topbar > .admin-symbol + div { flex: 1; min-width: 0; }
.settings select, #new-type {
  width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .8); border-radius: 16px;
  background: rgb(255 255 255 / .68); color: var(--ink); font-family: inherit; font-size: 16px;
}
.module-toggles { display: grid; gap: 10px; }
.module-toggles .check { font-weight: 500; }
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: .8rem; }
.powered img { width: 22px; height: 22px; }
@media (min-width: 720px) {
  #create-form { grid-template-columns: 1fr 1fr 1fr auto; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --surface: #FFF8F2; --line: #eadfd6; }
  .sheet { background: #FFF8F2; }
  .loyalty-card { background: #1F2145; }
}


/* Merchant app theme */
:root { --m-primary: #1F2145; --m-accent: #F04E45; --m-on: #FFFFFF; --m-link: #1F2145; --m-bar: #F04E45; }
body.has-theme::before {
  background:
    radial-gradient(34vmax 30vmax at 4% 2%, color-mix(in srgb, var(--m-accent) 24%, transparent) 0, transparent 70%),
    radial-gradient(34vmax 32vmax at 100% 18%, color-mix(in srgb, var(--m-primary) 14%, transparent) 0, transparent 68%),
    radial-gradient(38vmax 34vmax at 86% 92%, color-mix(in srgb, var(--m-accent) 17%, transparent) 0, transparent 70%),
    #FFF8F2;
}
body.has-theme .loyalty-card { background: var(--m-primary); color: var(--m-on); }
body.has-theme .loyalty-card::before { background: color-mix(in srgb, var(--m-accent) 20%, transparent); }
body.has-theme .points-row strong { color: var(--m-on); }
body.has-theme .progress span { background: var(--m-bar); }
body.has-theme .btn.primary,
body.has-theme .small-btn:not(.ghost):not(.danger-btn),
body.has-theme .point-buttons .btn,
body.has-theme .lookup .btn,
body.has-theme .ar-btn,
body.has-theme .prize-banner .btn,
body.has-theme .chips button[aria-selected=true],
body.has-theme .reward-state.ready,
body.has-theme .prize,
body.has-theme .toast { background: var(--m-primary); color: var(--m-on); }
body.has-theme .prize strong { color: var(--m-on); }
body.has-theme .link-btn, body.has-theme .show-password { color: var(--m-link); }
body.has-theme .model-btn { border-color: var(--m-link); color: var(--m-link); }
body.has-theme .brand-mark { background: var(--m-primary); color: var(--m-on); }
body.has-theme .actions button:nth-child(odd) .tile-icon { background: color-mix(in srgb, var(--m-accent) 18%, transparent); }
body.has-theme .actions button:nth-child(even) .tile-icon { background: color-mix(in srgb, var(--m-primary) 12%, transparent); }
body.has-theme .prize-banner { background: color-mix(in srgb, var(--m-accent) 14%, transparent); }

#create-form { grid-template-columns: minmax(0, 1fr); }
.create-wide { grid-column: 1 / -1; }
.brand-builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.builder-fields { display: grid; gap: 12px; min-width: 0; }
.builder-fields input[type=file] { min-height: 0; padding: 9px; font-size: .82rem; }
#new-logo-bg {
  width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .8); border-radius: 16px;
  background: rgb(255 255 255 / .68); color: var(--ink); font-family: inherit; font-size: 16px;
}
.color-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.color-row input[type=color] { display: block; width: 100%; min-height: 46px; padding: 4px; border: 1px solid rgb(31 33 69 / .16); border-radius: 13px; background: rgb(255 255 255 / .7); cursor: pointer; }
.app-preview { --p-primary: #1F2145; --p-on: #FFFFFF; --p-bar: #F04E45; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 24px; background: rgb(255 255 255 / .55); }
.preview-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.preview-head > div { min-width: 0; }
.preview-head small { display: block; color: var(--muted); }
.preview-head strong { display: block; font-size: 1.2rem; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.preview-logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 14px; background: var(--p-primary); color: var(--p-on); font-size: 1.35rem; font-weight: 900; }
.preview-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-card { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: var(--p-primary); color: var(--p-on); font-size: .82rem; }
.preview-card b { font-size: 2rem; font-weight: 900; line-height: 1; }
.preview-card b small { font-size: .85rem; font-weight: 500; }
.preview-track { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: rgb(127 127 127 / .35); }
.preview-track i { display: block; width: 70%; height: 100%; background: var(--p-bar); }
.preview-button { padding: 9px; border-radius: 99px; background: var(--p-primary); color: var(--p-on); font-size: .85rem; font-weight: 700; text-align: center; }
.share-box { margin-top: 14px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#share-qr { display: block; width: min(100%, 260px); height: auto; margin: 0 auto; border-radius: 16px; background: #fff; }
.share-actions { display: grid; gap: 9px; min-width: 0; }
.share-actions input { font-size: 14px !important; }
@media (min-width: 720px) {
  #create-form { grid-template-columns: 1fr 1fr 1fr; }
  .brand-builder { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .share-grid { grid-template-columns: 260px minmax(0, 1fr); align-items: center; }
}


/* Dynamic client QR */
.qr-timer { display: grid; justify-items: center; gap: 5px; width: min(230px, 70vw); margin: 0 auto; }
.qr-timer-track { display: block; width: 100%; height: 6px; overflow: hidden; border-radius: 99px; background: rgb(31 33 69 / .12); }
.qr-timer-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--m-bar, #F04E45); transition: width .25s linear; }
.qr-timer small { color: var(--muted); font-variant-numeric: tabular-nums; }


/* Install page after QR */
.install-gate { display: grid; place-items: center; min-height: 100dvh; padding: calc(env(safe-area-inset-top) + 20px) max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 20px) max(16px, env(safe-area-inset-left)); }
.install-gate[hidden] { display: none !important; }
.gate-card { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 430px; padding: 26px 20px 18px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); box-shadow: var(--glass-shadow); text-align: center; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.gate-logo { display: grid; place-items: center; width: 92px; height: 92px; overflow: hidden; border: 1px solid rgb(255 255 255 / .9); border-radius: 26px; background: var(--m-primary); color: var(--m-on); box-shadow: 0 12px 26px rgb(31 33 69 / .18); font-size: 2.4rem; font-weight: 900; }
.gate-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gate-name { color: var(--muted); font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.gate-card h1 { font-size: 1.65rem; text-wrap: balance; }
.gate-text { max-width: 34ch; color: var(--muted); font-size: .95rem; }
.gate-steps { display: grid; gap: 8px; width: 100%; margin: 6px 0; padding: 0; list-style: none; counter-reset: gate; text-align: left; }
.gate-steps li { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / .62); counter-increment: gate; }
.gate-steps li::before { content: counter(gate); display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--m-primary); color: var(--m-on); font-size: .82rem; font-weight: 800; }
.gate-steps li > span:first-of-type { display: grid; flex: 1; min-width: 0; }
.gate-steps b { font-size: .9rem; }
.gate-steps small { color: var(--muted); font-size: .78rem; }
.gate-icon { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgb(31 33 69 / .07); color: var(--m-link); font-size: 1.1rem; font-weight: 800; }
.gate-card .btn.primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; background: var(--m-primary); color: var(--m-on); text-decoration: none; }
.gate-action { text-decoration: none; }
.gate-link { width: 100%; }
.gate-card .link-btn { color: var(--m-link); font-size: .86rem; }


/* Add points by client code */
.code-points { margin: 0 0 12px; }
.code-points h2 { font-size: 1.05rem; }
.code-points-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; align-items: end; }
.code-points-row label { min-width: 0; }
.code-points-row .btn { grid-column: 1 / -1; width: 100%; }
.code-points .error:empty { display: none; }
@media (min-width: 720px) {
  .code-points-row { grid-template-columns: minmax(0, 1fr) 120px auto; }
  .code-points-row .btn { grid-column: auto; width: auto; min-width: 130px; }
}


/* Manager history */
.history-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.history-filters select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / .72); color: var(--ink); font-family: inherit; font-size: 14px; }
.history-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.history-member { display: grid; justify-items: start; gap: 1px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--glass-shadow); text-align: left; }
.history-member.selected { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.history-member b { max-width: 100%; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.history-member strong { font-size: 1.35rem; font-weight: 900; line-height: 1.15; }
.history-member small { color: var(--muted); font-size: .72rem; }
.history-panel { margin-top: 0; }
.activity li.is-undone > div { opacity: .68; }
#history-more { justify-self: center; }
@media (max-width: 520px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 22px; }
  .tabs button { min-height: 38px; }
  .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-filters select:last-child { grid-column: 1 / -1; }
}


/* Notifications */
.top-actions { display: flex; flex: none; gap: 7px; }
.bell-btn { position: relative; font-size: 1.1rem; }
.bell-btn em { position: absolute; top: -4px; right: -4px; min-width: 19px; padding: 1px 4px; border-radius: 99px; background: #C93A34; color: #fff; font-size: .68rem; font-style: normal; font-weight: 800; line-height: 1.35; }
.push-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: 14px; background: rgb(31 33 69 / .06); }
.push-box p { flex: 1 1 170px; }
.inbox-list { display: grid; gap: 8px; }
.inbox-item { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid rgb(31 33 69 / .1); border-radius: 14px; background: rgb(255 255 255 / .72); }
.inbox-item.unread { border-color: var(--m-primary); box-shadow: inset 3px 0 0 var(--m-accent); }
.inbox-item p { font-size: .9rem; overflow-wrap: anywhere; }
.inbox-item b { overflow-wrap: anywhere; }
.inbox-item small { color: var(--muted); font-size: .74rem; }
.notify-stats { margin-bottom: 12px; }
.notify-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.notify-templates button { min-height: 38px; padding: 6px 12px; border: 1px solid rgb(31 33 69 / .16); border-radius: 99px; background: rgb(255 255 255 / .58); font-size: .82rem; font-weight: 700; }
.notify-form { display: grid; gap: 11px; margin: 0; }
.notify-form label small { float: right; color: var(--muted); font-weight: 500; }
.notify-form textarea { display: block; width: 100%; min-height: 84px; padding: 10px 14px; border: 1px solid rgb(255 255 255 / .8); border-radius: 16px; background: rgb(255 255 255 / .64); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; }
.notify-form .error:empty { display: none; }
.notify-preview { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgb(31 33 69 / .1); border-radius: 16px; background: #fff; box-shadow: 0 7px 18px rgb(31 33 69 / .1); }
.notify-preview > span:last-child { display: grid; min-width: 0; }
.notify-preview b { font-size: .88rem; overflow-wrap: anywhere; }
.notify-preview small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.notify-preview-logo { display: grid; flex: none; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 11px; background: var(--brand); color: #FFF8F2; font-weight: 900; }
.notify-preview-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.notify-history { display: grid; gap: 8px; }
.notify-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgb(31 33 69 / .1); }
.notify-item:last-child { border-bottom: 0; }
.notify-item > div { min-width: 0; }
.notify-item p { font-size: .88rem; overflow-wrap: anywhere; }
.notify-item small { color: var(--muted); font-size: .74rem; }
.notify-result { display: grid; flex: none; grid-template-columns: auto auto; align-content: start; gap: 2px 5px; text-align: right; }
.notify-result strong { font-size: .92rem; }
@media (max-width: 520px) {
  .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabs button { font-size: .7rem; }
}

@media (max-width: 520px) {
  .notify-stats .stat:last-child { grid-column: 1 / -1; }
}

.app-error { display: grid; place-content: center; justify-items: center; gap: 12px; min-height: 100dvh; padding: 24px 16px; text-align: center; }
.app-error img { width: 56px; height: 56px; }
.app-error p { max-width: 32ch; font-weight: 700; }


/* Single-use reward vouchers */
.reward-use { flex: none; min-height: 38px; padding: 6px 15px; border: 0; border-radius: 99px; background: var(--m-primary); color: var(--m-on); font-size: .82rem; font-weight: 800; }
.voucher-banner { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 14px; padding: 13px 14px; border: 1.5px solid var(--m-primary); border-radius: 18px; background: color-mix(in srgb, var(--m-accent) 14%, white); color: var(--ink); text-align: left; }
.voucher-banner > span:first-child { font-size: 1.5rem; }
.voucher-banner > span:last-child { display: grid; min-width: 0; }
.voucher-banner b { overflow-wrap: anywhere; }
.voucher-banner small { color: var(--muted); }
.voucher-live { display: grid; gap: 12px; }
.voucher-live[hidden], .voucher-done[hidden] { display: none; }
.voucher-done { display: grid; justify-items: center; gap: 4px; padding: 24px 8px; text-align: center; }
.voucher-done strong { font-size: 1.5rem; font-weight: 900; }
.voucher-done span { color: var(--muted); overflow-wrap: anywhere; }
.voucher-result { display: grid; justify-items: center; gap: 3px; margin-top: 14px; padding: 18px; border-radius: 22px; text-align: center; }
.voucher-result[hidden] { display: none !important; }
.voucher-result.ok { background: #1F2145; color: #FFF8F2; }
.voucher-result.bad { background: #C93A34; color: #fff; }
.voucher-result > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgb(255 255 255 / .18); font-size: 1.6rem; font-weight: 900; }
.voucher-result strong { font-size: 1.35rem; font-weight: 900; overflow-wrap: anywhere; }
.voucher-result small { font-size: .84rem; overflow-wrap: anywhere; }
.tabs button { position: relative; }
.tab-badge { display: inline-block; min-width: 17px; margin-left: 4px; padding: 0 4px; border-radius: 99px; background: #C93A34; color: #fff; font-size: .66rem; font-style: normal; font-weight: 800; line-height: 1.5; }
.reward-feed-panel { margin-top: 12px; }

.billing-banner { margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: #FFF0D6; color: #1F2145; font-weight: 700; }
.billing-banner.late { background: #C93A34; color: #fff; }
.impact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.impact-card { display: grid; gap: 2px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / .55); }
.impact-card span { font-size: .8rem; font-weight: 700; }
.impact-card strong { color: #1F2145; font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.impact-card small { color: var(--muted, #667); font-size: .74rem; }
.impact-bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; height: 130px; margin-bottom: 8px; }
.impact-bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 2px; min-width: 0; height: 130px; }
.impact-bar b { font-size: .72rem; }
.impact-bar small { overflow: hidden; max-width: 100%; color: var(--muted, #667); font-size: .6rem; white-space: nowrap; }
.impact-track { display: flex; align-items: flex-end; width: 100%; max-width: 30px; min-height: 0; }
.impact-track i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: #F04E45; }
.phone-team { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.phone-member { display: grid; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; }
.phone-member small { font-size: .72rem; }
.phone-member.watch { border-color: #C93A34; background: #FDE8E6; color: #A52E29; }
@media (min-width: 720px) { .impact-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.login-photo { display: none; position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #1F2145; pointer-events: none; }
.login-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(4px); transform: scale(1.06); }
.login-photo::after { content: ""; position: absolute; inset: 0; background: rgb(31 33 69 / .2); }
body:has(> #signup:not([hidden])) > .login-photo,
body:has(> #login:not([hidden])) > .login-photo,
body:has(> #install-gate:not([hidden])) > .login-photo { display: block; }
body.has-login-photo > .signup, body.has-login-photo > .install-gate { position: relative; z-index: 1; }
body.has-login-photo:has(> .signup:not([hidden])) { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 16px; }
body.has-login-photo > .signup { width: 100%; max-width: 430px; min-height: 0; margin: 0 auto; padding: 22px 20px; border: 1px solid rgb(255 255 255 / .7); border-radius: 28px; background: rgb(255 255 255 / .84); box-shadow: 0 18px 44px rgb(20 22 50 / .28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body.has-login-photo .gate-card { background: rgb(255 255 255 / .86); }
.bg-preview { display: grid; place-items: center; overflow: hidden; width: 120px; height: 160px; flex: none; border: 1px solid var(--line); border-radius: 16px; color: var(--muted, #667); font-size: .78rem; text-align: center; }
.bg-preview img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px); transform: scale(1.06); }

.social-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.social-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: #1F2145; font-size: .82rem; text-decoration: none; }
.social-link span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: .82rem; font-weight: 900; line-height: 1; }
.social-link.whatsapp span { background: #128C4B; }
.social-link.facebook span { background: #1864D9; }
.social-link.instagram span { background: #C2185B; }
