/* PriceWatch RO — "bon de casă" (store receipt) theme.
   Receipt paper, leaflet stickers, ink, red stamps. No emojis, no pills. */
:root {
  --paper: #f4efe2;
  --paper-2: #ece4d0;
  --card: #fdfaf2;
  --ink: #191510;
  --ink-dim: #6d6553;
  --red: #d92d20;
  --red-bg: #fde8e5;
  --gold: #f2b705;
  --gold-soft: #f9e27b;
  --green: #1a7f4e;
  --green-bg: #e4f3ea;
  --line: rgba(25, 21, 16, 0.85);
  --radius: 3px;
  --shadow: 4px 4px 0 rgba(25, 21, 16, 0.9);
  --font-disp: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body { max-width: 520px; margin: 0 auto; padding: 0 14px 44px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 2px 12px;
  position: sticky; top: 0; background: var(--paper); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 30px; flex: none;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  transform: rotate(-6deg);
  box-shadow: 2px 2px 0 rgba(25, 21, 16, 0.85);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--ink);
}
h1 { font-family: var(--font-disp); font-size: 22px; letter-spacing: .4px; line-height: 1; text-transform: uppercase; }
h1 .ro { color: var(--red); }
.tagline { font-size: 11px; color: var(--ink-dim); margin-top: 2px; font-family: var(--font-mono); }

.badge {
  padding: 4px 10px; border-radius: var(--radius);
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  border: 1.5px solid var(--ink);
}
.badge-free { background: var(--card); color: var(--ink); }
.badge-premium { background: var(--gold); color: var(--ink); }

/* ---------- tabs (leaflet stickers) ---------- */
.tabs {
  display: flex; gap: 6px; margin: 12px 0 18px;
  border-top: 2px dashed var(--ink-dim);
  border-bottom: 2px dashed var(--ink-dim);
  padding: 10px 2px;
}
.tab {
  flex: 1; border: 0; background: transparent; color: var(--ink-dim);
  padding: 8px 2px; border-radius: var(--radius);
  font-family: var(--font-disp); font-size: 13px; letter-spacing: .8px; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: transform .12s;
}
.tab .tab-label { line-height: 1.1; }
.tab.active {
  background: var(--gold);
  color: var(--ink);
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(25, 21, 16, 0.85);
}

.view { display: none; }
.view.active { display: block; }

/* ---------- tracker cards ---------- */
.tracker-list { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute; top: -1.5px; left: 14px; right: 14px;
  border-top: 2px dashed var(--ink-dim);
}
.card .name { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 8px 0 10px; }
.card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card .price {
  font-family: var(--font-mono);
  font-size: 19px; font-weight: 700;
  background: var(--gold-soft);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 2px 7px;
}
.card .retailer {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-dim); font-weight: 700;
  border: 1px solid var(--ink-dim); border-radius: var(--radius); padding: 2px 6px;
}
.card .change { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.change.down { color: var(--green); }
.change.up { color: var(--red); }
.change.flat { color: var(--ink-dim); }
.card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; }
.genius-badge {
  display: inline-block; margin-top: 10px; padding: 5px 9px;
  border: 1.5px dashed var(--green); background: var(--green-bg); color: var(--green);
  border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; line-height: 1.35;
  transform: rotate(-.5deg);
}
.card .actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- buttons (ink, sharp) ---------- */
.btn-mini {
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 7px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; background: var(--card); color: var(--ink);
  font-family: var(--font-body); transition: transform .1s, box-shadow .1s;
}
.btn-mini:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 rgba(25,21,16,.8); }
.btn-mini.gold { background: var(--gold); }
.btn-mini.danger { background: var(--red-bg); color: var(--red); border-color: var(--red); }

.empty {
  text-align: center; padding: 44px 14px; color: var(--ink-dim);
  border: 2px dashed var(--ink-dim); border-radius: var(--radius);
  background: var(--card);
}
.empty p { margin: 6px 0; }
.hint { font-size: 12px; color: var(--ink-dim); line-height: 1.5; }

/* ---------- forms ---------- */
form label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 8px; }
input[type=url], input[type=email], input[type=number], #referralLink {
  width: 100%; padding: 12px 13px; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--card); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px; margin-bottom: 12px;
}
input[type=url]:focus, input[type=email]:focus, input[type=number]:focus, #referralLink:focus { outline: 2px solid var(--gold); border-color: var(--ink); }

.view-title { font-family: var(--font-disp); font-size: 19px; letter-spacing: .6px; text-transform: uppercase; margin: 4px 0 14px; }
.radio {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--ink);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  font-size: 14px; cursor: pointer;
}
.radio input { accent-color: var(--ink); width: 18px; height: 18px; flex: none; }

.btn-primary, .btn-secondary {
  display: inline-block; text-align: center; text-decoration: none;
  width: 100%; border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 13px; font-size: 13px; font-weight: 800; letter-spacing: .5px;
  cursor: pointer; text-transform: uppercase;
  transition: transform .1s, box-shadow .1s;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translate(-1px, -1px); }
.btn-secondary { background: var(--card); color: var(--ink); }
.btn-secondary:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 rgba(25,21,16,.8); }

.msg { margin-top: 12px; font-size: 13px; min-height: 18px; font-family: var(--font-mono); }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }

.hint-box {
  margin-top: 18px; background: var(--card); border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  border-top: 3px dashed var(--ink-dim);
  padding: 14px; font-size: 13px; color: var(--ink-dim); line-height: 1.6;
}
.hint-box b { color: var(--ink); }

/* ---------- referral ticket ---------- */
.referral-box {
  margin-top: 18px; background: var(--gold-soft); border-radius: var(--radius);
  padding: 14px; border: 1.5px solid var(--ink);
  border-left: 8px solid var(--ink);
}
.referral-box h3 { font-family: var(--font-disp); font-size: 15px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.referral-box .hint { line-height: 1.6; margin-bottom: 6px; color: var(--ink-dim); }
.referral-box b { color: var(--ink); }
#referralLink { background: var(--card); }

/* ---------- premium ---------- */
.premium-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  border: 1.5px solid var(--ink); box-shadow: var(--shadow);
  border-top: 6px solid var(--gold);
}
.premium-card h2 { font-family: var(--font-disp); font-size: 19px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 12px; }
.premium-card ul { list-style: none; margin-bottom: 14px; }
.premium-card li { padding: 7px 0 7px 26px; font-size: 14px; color: var(--ink-dim); position: relative; border-bottom: 1px dashed var(--ink-dim); }
.premium-card li:last-child { border-bottom: 0; }
.premium-card li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.premium-card li b { color: var(--ink); }
.premium-status { font-size: 13px; margin-bottom: 14px; color: var(--ink-dim); font-family: var(--font-mono); }
.premium-soon { padding: 14px 16px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--ink); background: rgba(245,197,66,.12); border: 1.5px dashed var(--gold); border-radius: var(--radius); }
.premium-soon b { font-family: var(--font-disp); letter-spacing: .5px; text-transform: uppercase; }
.premium-status.active { color: var(--green); font-weight: 700; }
.plan-buttons { display: flex; flex-direction: column; gap: 10px; }
.plan { text-decoration: none; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(25, 21, 16, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 20; padding: 20px;
}
.modal-box {
  background: var(--card); border: 1.5px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 440px; padding: 16px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { font-family: var(--font-disp); font-size: 16px; letter-spacing: .4px; text-transform: uppercase; }
.close { background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--radius); width: 30px; height: 30px; cursor: pointer; font-weight: 800; }
#chart { width: 100%; height: auto; max-height: 240px; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: var(--radius); display: block; touch-action: pan-y; cursor: crosshair; }
#chartHint { margin-top: 10px; text-align: center; font-family: var(--font-mono); font-size: 11px; }
#chartHint.chart-hint { line-height: 1.6; }

/* ---------- web login (magic-link, bon de casa) ---------- */
.login-view { padding-top: 26px; }
.login-card {
  background: var(--card); border-radius: var(--radius); padding: 22px 18px 18px;
  border: 1.5px solid var(--ink); box-shadow: var(--shadow);
  border-top: 6px solid var(--gold);
}
.login-card .brand { margin-bottom: 16px; }
.login-card .view-title { margin-bottom: 10px; }
.login-card .hint { margin-bottom: 14px; }
.login-card .btn-primary { margin-top: 2px; }
#logoutRow .btn-mini { margin-top: 10px; }

/* ---------- push + RSS blocks (t_c6b7d56e) ---------- */
.push-box, .rss-box {
  margin-top: 18px; background: var(--card); border-radius: var(--radius);
  padding: 14px; border: 1.5px solid var(--ink);
}
.push-box { border-left: 8px solid var(--gold); }
.rss-box { border-left: 8px solid var(--ink-dim); }
.push-box h3, .rss-box h3 {
  font-family: var(--font-disp); font-size: 15px; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 8px;
}
.push-box .hint, .rss-box .hint { line-height: 1.6; margin-bottom: 8px; }
.push-status {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim);
  min-height: 16px; margin-bottom: 10px;
}
.push-box .btn-mini { margin-right: 8px; }
#rssLink { background: var(--card); }

/* web users: independent channel toggles (checkboxes) */
.check {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--ink);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  font-size: 14px; cursor: pointer;
}
.check input { accent-color: var(--ink); width: 18px; height: 18px; flex: none; }

/* ---------- onboarding wizard (t_01b71e9c) ---------- */
.wizard {
  position: fixed; inset: 0; z-index: 30;
  background: var(--paper);
  overflow-y: auto;
  padding: 0 14px 44px;
}
.wizard-box { max-width: 520px; margin: 0 auto; padding-top: 8px; }
.wizard-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px 10px; border-bottom: 2px dashed var(--ink-dim);
  margin-bottom: 20px;
}
.wizard-step { padding: 4px 2px; }
.wiz-lead { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.wiz-list { list-style: none; margin: 0 0 18px; }
.wiz-list li {
  padding: 10px 0 10px 30px; font-size: 14px; color: var(--ink-dim);
  border-bottom: 1px dashed var(--ink-dim); position: relative;
}
.wiz-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.wiz-list li b { color: var(--ink); }
.wiz-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.wiz-actions .btn-mini { width: 100%; }
#wizPrefsMsg { margin-top: 10px; }
.wizard .premium-card { margin-top: 4px; }
.wizard-step input[type=number] { margin-bottom: 14px; }

.hidden { display: none !important; }
.push-wiz-card { padding: 18px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--ink-dim); border-radius: var(--radius); }
.push-wiz-card h2 { font-family: var(--font-disp); font-size: 17px; letter-spacing: .3px; margin-bottom: 6px; }
.push-wiz-status { font-size: 13px; font-family: var(--font-mono); color: var(--ink-dim); margin-bottom: 10px; }
.push-wiz-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.wiz-done-summary { font-size: 14px; color: var(--ink-dim); margin-bottom: 20px; text-align: left; }
.wiz-done-summary br { content: ""; display: block; margin: 4px 0; }
