/* ©2026 E.Vardi , all rights reserved. */
:root {
  --bg: #f3f7fa;
  --ink: #142433;
  --muted: #5a6b7c;
  --line: #d5dee7;
  --accent: #0b6e99;
  --accent-dark: #085578;
  --danger: #b42318;
  --ok: #067647;
  --card: #ffffff;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 55%);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}
.brand { font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.top nav { display: flex; gap: 16px; font-size: .95rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }
.lead { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }
.flash {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: #eef6ff;
  border: 1px solid #cfe3f5;
}
.flash.error { background: #fef3f2; border-color: #fecdca; color: var(--danger); }
.flash.ok { background: #ecfdf3; border-color: #abeec6; color: var(--ok); }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.form-row { margin-bottom: 14px; }
label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: #e8eef3; color: var(--ink); }
.btn.danger { background: var(--danger); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); font-size: .9rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link-row {
  display: grid;
  grid-template-columns: 110px 1fr 1.4fr;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .link-row { grid-template-columns: 1fr; }
}
.smart-page {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
  padding: 0 16px 48px;
}
.smart-page .logo {
  width: 72px; height: 72px; object-fit: cover; border-radius: 16px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--line);
}
.smart-btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
}
.smart-btn:hover { background: var(--accent-dark); text-decoration: none; }
.home-hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.home-hero img { width: min(450px, 90vw); height: auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a {
  padding: 8px 12px;
  border-radius: 8px;
  background: #e8eef3;
  color: var(--ink);
}
.tabs a.active { background: var(--accent); color: #fff; }
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.admin-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  background: #e8eef3;
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.admin-nav a.active { background: var(--accent); color: #fff; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-num { display: block; font-size: 1.6rem; font-weight: 700; }
.help {
  margin: 6px 0 0;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.45;
}
.link-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafcfd;
}
.link-block .link-row { margin-bottom: 0; }
.google-helper {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
input[readonly] {
  background: #eef3f7;
  color: var(--muted);
}
.engagement { margin-bottom: 32px; }
.eng-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.eng-head h2 { margin: 0; font-size: 1.25rem; }
.range-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.range-pills a {
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8eef3;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}
.range-pills a.active { background: var(--accent); color: #fff; }
.eng-kpis .stat-num.up { color: var(--ok); }
.eng-kpis .stat-num.down { color: var(--danger); }
.eng-kpis .stat-num.peak { font-size: 1.25rem; }
.chart-panel canvas { max-height: 280px; }
.eng-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 700px) {
  .eng-secondary { grid-template-columns: 1fr; }
}
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list li {
  display: grid;
  grid-template-columns: 88px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: .9rem;
}
.bar-label { text-transform: capitalize; color: var(--muted); }
.bar-track {
  height: 8px;
  background: #e8eef3;
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}
.bar-fill.accent2 { background: #2a9d8f; }
.bar-count { text-align: right; font-weight: 600; }
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 280px;
  margin: 20px auto;
}
.stamp-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--muted);
  background: #fff;
}
.stamp-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.loyalty-page .qr {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  background: #fff;
}

/* Apple Wallet design tool */
.wallet-design-panel { overflow: hidden; }
.wallet-design-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) {
  .wallet-design-grid { grid-template-columns: 1fr; }
}
.preview-modes {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.preview-mode {
  border: 1px solid var(--line);
  background: #eef3f7;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}
.preview-mode.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.wallet-pass {
  --pass-bg: rgb(11, 110, 153);
  --pass-fg: rgb(255, 255, 255);
  --pass-label: rgb(220, 235, 245);
  background: var(--pass-bg);
  color: var(--pass-fg);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: 0 10px 28px rgba(20, 36, 51, .18);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wallet-pass-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.wallet-pass-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.wallet-pass.logo-scale-small .wallet-pass-logo { width: 36px; height: 36px; }
.wallet-pass.logo-scale-medium .wallet-pass-logo { width: 56px; height: 40px; border-radius: 8px; }
.wallet-pass.logo-scale-large .wallet-pass-logo { width: 64px; height: 44px; border-radius: 8px; }
.wallet-pass-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.wallet-pass-logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
}
.wallet-pass-strip {
  display: none;
  margin: 0 -16px;
  height: 92px;
  background: rgba(0,0,0,.12);
  overflow: hidden;
}
.wallet-pass-strip.is-on { display: block; }
.wallet-pass-strip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.wallet-strip-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-weight: 600;
}
.wallet-pass-header { text-align: right; }
.wallet-field { display: flex; flex-direction: column; gap: 2px; }
.wallet-label {
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pass-label);
  font-weight: 600;
}
.wallet-value { font-size: .95rem; font-weight: 600; line-height: 1.25; }
.wallet-value-lg { font-size: 1.35rem; font-weight: 700; }
.wallet-pass-primary { margin-top: 4px; }
.wallet-pass-barcode {
  margin-top: auto;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.wallet-qr-fake {
  width: 88px;
  height: 88px;
  margin: 0 auto 8px;
  background:
    linear-gradient(90deg, #111 25%, transparent 25%) 0 0 / 8px 8px,
    linear-gradient(#111 25%, transparent 25%) 0 0 / 8px 8px,
    #fff;
  border: 1px solid #ddd;
}
.wallet-barcode-alt {
  color: #333;
  font-size: .75rem;
}
.color-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.color-row input[type=color] {
  width: 100%;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.design-subhead {
  font-size: 1rem;
  margin: 22px 0 8px;
}
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  resize: vertical;
}
.wallet-design-panel:target,
#design:target { scroll-margin-top: 72px; }

