/* MIYO – האזור האישי. צבעים לפי miyo-scent.com */
:root {
  --ink: #24201E;
  --ink-2: #605B58;
  --ink-3: #9A9A9A;
  --bg: #FFFFFF;
  --surface: #F2F4F5;
  --line: #E4E6E8;
  --brand: #8B1E3F;
  --brand-soft: #F6EAEE;
  --ok: #2F7D4F;
  --ok-soft: #E7F3EC;
  --warn: #A86B00;
  --warn-soft: #FBF1DE;
  --radius: 14px;
  --tabbar-h: 64px;
  --font: 'Rubik', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
}
.logo { font-family: Georgia, 'Times New Roman', serif; font-size: 24px; letter-spacing: .18em; font-weight: 400; text-decoration: none; }
.logo img { height: 30px; display: block; }
.topbar .back { background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.topbar .title { font-weight: 600; font-size: 17px; }
.icon-btn { background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; color: var(--ink-2); }

main { flex: 1; padding: 16px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
main.no-tabs { padding-bottom: 32px; }

/* ---------- Typography ---------- */
h1 { font-size: 24px; font-weight: 600; margin: 4px 0 2px; }
h2 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
h2 a { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.sub { color: var(--ink-2); font-size: 14px; margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

/* ---------- Cards ---------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 10px; }
.card.soft { background: var(--surface); border-color: transparent; }
.card.hero { background: var(--ink); color: #fff; border: 0; }
.card.hero .muted { color: rgba(255,255,255,.72); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 10px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }

.big-date { font-size: 28px; font-weight: 600; line-height: 1.15; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 500; }
.list-item .s { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-chip { width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--surface); padding: 6px 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 20px; font-weight: 600; }
.date-chip span { font-size: 12px; color: var(--ink-2); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- Buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 17px; font-weight: 500; cursor: pointer; text-decoration: none; transition: opacity .15s, transform .05s; }
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.secondary { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn.brand { background: var(--brand); border-color: var(--brand); }
.btn.small { min-height: 40px; font-size: 15px; width: auto; padding: 8px 14px; border-radius: 10px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* ---------- Forms ---------- */
label.f { display: block; font-weight: 500; margin: 18px 0 8px; }
.input, textarea.input, select.input { width: 100%; min-height: 54px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 18px; outline: none; }
textarea.input { min-height: 110px; font-size: 16px; resize: vertical; }
.input:focus { border-color: var(--ink); }
.input.ltr { direction: ltr; text-align: right; letter-spacing: .04em; }
.otp { letter-spacing: .5em; text-align: center; font-size: 26px; direction: ltr; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); padding: 10px 14px; border-radius: 999px; cursor: pointer; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.photo-drop { display: flex; align-items: center; gap: 12px; border: 1px dashed #C9CCCF; border-radius: 12px; padding: 14px; cursor: pointer; color: var(--ink-2); }
.photo-drop img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.error { color: var(--brand); font-size: 14px; margin-top: 8px; min-height: 1em; }

/* ---------- Login ---------- */
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); }
.login .logo { font-size: 34px; text-align: center; display: block; margin-bottom: 28px; }
.login .logo img { height: 46px; margin: 0 auto; }
.login h1 { text-align: center; }
.login .sub { text-align: center; margin-bottom: 18px; }
.demo-note { margin-top: 18px; text-align: center; font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 6; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 12px; color: var(--ink-3); }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.tabbar svg { width: 24px; height: 24px; }

/* ---------- Progress (devices / call tracker) ---------- */
.meter { height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.meter.low i { background: var(--brand); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 12px; }
.steps div { height: 4px; border-radius: 4px; background: var(--line); }
.steps div.on { background: var(--ink); }
.steps-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.steps-labels .on { color: var(--ink); }

/* ---------- Misc ---------- */
.balance { font-size: 34px; font-weight: 600; direction: ltr; text-align: right; }
.disclaimer { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.empty { text-align: center; color: var(--ink-2); padding: 28px 12px; }
.center { text-align: center; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 32px auto 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, #E9ECEE 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 120px; }
.skeleton + .skeleton { margin-top: 10px; height: 80px; }
@keyframes sk { to { background-position: -200% 0; } }
.point-switch { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 12px -16px 0; padding-inline: 16px; scrollbar-width: none; }
.point-switch::-webkit-scrollbar { display: none; }

#toast { position: fixed; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 20; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#recaptcha { position: fixed; bottom: 0; left: 0; }
