/* M IN beta programme: sayim.in/beta and /beta/admin. Builds on site.css tokens. */

/* ---- Public flow ---- */
.beta { padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.beta-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: clamp(20px, 4vw, 36px); }
.lang-toggle { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--chip-bg); }
.lang-toggle button {
  font: inherit; font-size: 0.9rem; font-weight: 600; border: 0; cursor: pointer;
  padding: 8px 14px; min-height: 36px; border-radius: var(--radius-pill); background: transparent; color: var(--muted);
}
.lang-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.progress { display: flex; gap: 6px; align-items: center; }
.progress i { width: 22px; height: 4px; border-radius: 4px; background: var(--border); transition: background .25s ease; }
.progress i.on { background: var(--coral); }

.bstep { display: none; }
.bstep.is-active { display: block; animation: step-in .35s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bstep.is-active { animation: none; } }

.bstep h1 { font-size: clamp(2rem, 4.2vw + 0.6rem, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 10px 0 12px; max-width: 18ch; }
.bstep h2 { font-size: clamp(1.6rem, 2.6vw + 0.6rem, 2.2rem); line-height: 1.12; letter-spacing: -0.015em; margin: 6px 0 8px; }
.bstep .lead { margin-bottom: 0; }
.round-chip { margin-top: 18px; }

.beta-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin: clamp(24px, 4vw, 36px) 0; }
@media (min-width: 640px) { .beta-cards { grid-template-columns: 1fr 1fr; } }
.beta-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border-radius: var(--radius-card-sm); background: var(--surface); border: 1px solid var(--border);
}
.beta-card .num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coral-soft); color: var(--coral); font-weight: 700; font-size: 0.95rem;
}
.beta-card h3 { font-size: 1.05rem; margin: 4px 0 4px; }
.beta-card p { margin: 0; color: var(--text-2); font-size: 0.98rem; line-height: 1.5; }

.beta-panel { max-width: 560px; }
.beta-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.link-btn { font: inherit; background: none; border: 0; padding: 8px 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Fields ---- */
.field { display: block; margin-top: 18px; }
.field > span, .field legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; padding: 0; }
.field small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
fieldset.field { border: 0; margin-left: 0; margin-right: 0; padding: 0; min-width: 0; }
.input, .select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 13px 14px; min-height: 52px; appearance: none; -webkit-appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus, .select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--coral-soft); }
.field.has-error .input, .field.has-error .select { border-color: var(--coral); }
.error { display: none; color: var(--coral); font-size: 0.88rem; margin-top: 6px; }
.field.has-error .error { display: block; }
.dob-row { display: grid; grid-template-columns: 0.85fr 1.4fr 1.1fr; gap: 8px; }
.dob-row .select { padding-left: 12px; padding-right: 30px; background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%; }

.device-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.device {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 16px; min-height: 60px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface);
  font-weight: 600; transition: border-color .15s ease, background .15s ease;
}
.device input { position: absolute; opacity: 0; pointer-events: none; }
.device svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.device:has(input:checked) { border-color: var(--text); background: var(--chip-bg); }
.device:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--coral-soft); }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; cursor: pointer; font-size: 0.97rem; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--coral); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 14px; color: var(--coral); font-size: 0.95rem; min-height: 1.4em; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.done-mark {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coral-soft); color: var(--coral); margin-bottom: 8px;
}
.done-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Home page teaser */
.beta-teaser { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center;
  padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-card); background: var(--surface-2, var(--chip-bg)); }
.beta-teaser h2 { margin: 6px 0 6px; }
.beta-teaser p { margin: 0; color: var(--text-2); max-width: 52ch; }

/* ---- Admin ---- */
.admin { padding: 24px 0 64px; }
.admin-gate { max-width: 440px; margin: 8vh auto 0; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.admin-head h1 { font-size: 1.8rem; margin: 0; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { padding: 10px 14px; border-radius: 14px; background: var(--chip-bg); min-width: 92px; }
.stat b { display: block; font-size: 1.4rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.round-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.round-box .input { width: auto; min-width: 220px; min-height: 42px; padding: 8px 12px; }
.tabs { display: inline-flex; gap: 4px; padding: 3px; background: var(--chip-bg); border-radius: var(--radius-pill); }
.tabs button { font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.toolbar .input, .toolbar .select { width: auto; min-height: 42px; padding: 8px 12px; font-size: .92rem; }
.toolbar .select { padding-right: 34px; }
.toolbar .grow { flex: 1 1 200px; }
.band-h { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 8px; font-size: 1rem; }
.band-h small { color: var(--muted); font-weight: 500; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table.testers { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 860px; }
table.testers th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; padding: 10px 12px; background: var(--chip-bg); }
table.testers td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
table.testers td .sub { color: var(--muted); font-size: .82rem; }
table.testers .select { min-height: 36px; padding: 6px 30px 6px 10px; font-size: .88rem; border-radius: 10px; width: auto; }
table.testers .notes { min-height: 36px; padding: 6px 10px; font-size: .88rem; border-radius: 10px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--chip-bg); color: var(--text-2); }
.pill.ios { background: #111; color: #fff; }
.pill.android { background: #E8F5E9; color: #1B5E20; }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .92rem; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.toast.show { opacity: 1; }
.me-row:not([hidden]) { display: flex; gap: 12px; align-items: center; }
.compose { border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin: 4px 0 16px; max-width: 720px; }
.compose .field { margin-top: 14px; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.5; }
.pill.unsub { background: var(--coral-soft); color: var(--coral); }
.decide { display: flex; gap: 6px; }
.decide .btn { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.pill.badge-on { background: linear-gradient(90deg, #E94C41, #F2A541); color: #fff; }
