/* My Smart Kit — design system. Matches mysmartkit.in (coral/navy/yellow, Devanagari+Poppins).
   Hand-authored tokens (Mitra --prefix- convention, like prakriti-mitra) — no build step. */

:root {
  /* Brand palette (from the website) */
  --smk-coral: #E85A4F;  --smk-coral-d: #C8453B;  --smk-coral-l: #FFF0ED;
  --smk-navy: #2A2547;   --smk-navy-d: #1C1832;
  --smk-yellow: #FECC00; --smk-amber: #FFC24B;    --smk-sky: #2E8BE6;
  --smk-cream: #FFF9F5;  --smk-blush: #FFF1EC;    --smk-white: #FFFFFF;
  --smk-ink: #2A2547;    --smk-body: #56506B;     --smk-muted: #8B84A3;
  --smk-line: rgba(42,37,71,.10);
  --smk-ok: #2E9E6B;     --smk-warn: #E8A33D;     --smk-err: #C8453B;

  /* Type */
  --smk-ff: 'Noto Sans Devanagari', system-ui, sans-serif;
  --smk-ffe: 'Poppins', system-ui, sans-serif;

  /* Shape / elevation (navy-tinted shadows) */
  --smk-r-sm: 10px; --smk-r-md: 16px; --smk-r-lg: 24px; --smk-r-pill: 100px;
  --smk-sh-sm: 0 1px 3px rgba(42,37,71,.06);
  --smk-sh-md: 0 4px 14px rgba(42,37,71,.08);
  --smk-sh-lg: 0 10px 30px rgba(42,37,71,.12);
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--smk-ff); color: var(--smk-body);
  background: var(--smk-cream); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: var(--smk-ff); color: var(--smk-ink); font-weight: 700; line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
a { color: var(--smk-coral); }
.en { font-family: var(--smk-ffe); }
.muted { color: var(--smk-muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Layout shell */
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--smk-cream); }
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  background: var(--smk-yellow); color: var(--smk-navy); padding: 10px 16px; box-shadow: var(--smk-sh-sm);
}
.appbar img { height: 34px; width: auto; display: block; }
.appbar .title { font-family: var(--smk-ffe); font-weight: 600; color: var(--smk-navy); font-size: 1.05rem; }
.appbar .spacer { flex: 1; }
.appbar .iconbtn { background: transparent; border: 0; color: var(--smk-navy); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }
.wrap { flex: 1; padding: 18px 16px 40px; }

/* Buttons — pills; navy on yellow, coral primary, per website contrast rules */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--smk-ff); font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 0; border-radius: var(--smk-r-pill); padding: 12px 22px; transition: transform .08s, background .15s;
  text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--smk-coral); color: #fff; box-shadow: var(--smk-sh-sm); }
.btn-primary:hover { background: var(--smk-coral-d); }
.btn-navy { background: var(--smk-navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--smk-navy); border: 1.5px solid var(--smk-line); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }

/* Cards */
.card { background: #fff; border-radius: var(--smk-r-md); box-shadow: var(--smk-sh-md); padding: 18px; margin: 0 0 16px; }
.card-flat { background: #fff; border: 1px solid var(--smk-line); border-radius: var(--smk-r-md); padding: 16px; }

/* Forms */
.field { margin: 0 0 14px; }
.label { display: block; font-weight: 600; color: var(--smk-ink); margin: 0 0 6px; font-size: .95rem; }
.input, textarea.input, select.input {
  width: 100%; font-family: var(--smk-ff); font-size: 1rem; color: var(--smk-ink);
  background: #fff; border: 1.5px solid var(--smk-line); border-radius: var(--smk-r-sm);
  padding: 12px 14px; outline: none;
}
.input:focus { border-color: var(--smk-coral); box-shadow: 0 0 0 3px var(--smk-coral-l); }
.hint { font-size: .85rem; color: var(--smk-muted); margin-top: 5px; }
.err-text { color: var(--smk-err); font-size: .9rem; margin-top: 6px; }

/* PIN boxes */
.pin { display: flex; gap: 10px; justify-content: center; }
.pin input { width: 54px; height: 60px; text-align: center; font-size: 1.6rem; font-weight: 700;
  border: 1.5px solid var(--smk-line); border-radius: var(--smk-r-sm); }
.pin input:focus { border-color: var(--smk-coral); box-shadow: 0 0 0 3px var(--smk-coral-l); }

/* Mascot */
.mascot { display: block; margin: 0 auto; }
.mascot-sm { width: 90px; } .mascot-md { width: 140px; } .mascot-lg { width: 190px; }

/* Child header + progress */
.childcard { display: flex; align-items: center; gap: 14px; }
.childcard .name { font-weight: 700; color: var(--smk-ink); font-size: 1.1rem; }
.progress { height: 10px; background: var(--smk-blush); border-radius: 100px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--smk-coral), var(--smk-amber)); border-radius: 100px; transition: width .4s; }
.progresslabel { display: flex; justify-content: space-between; font-size: .9rem; color: var(--smk-muted); margin-top: 6px; }

/* Activity list */
.acts { display: grid; gap: 12px; }
.act { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--smk-r-md);
  background: #fff; border: 1px solid var(--smk-line); box-shadow: var(--smk-sh-sm); text-align: left; width: 100%;
  font-family: var(--smk-ff); cursor: pointer; }
.act .num { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--smk-blush); color: var(--smk-navy); }
.act .meta { flex: 1; min-width: 0; }
.act .meta .t { font-weight: 700; color: var(--smk-ink); }
.act .meta .s { font-size: .85rem; color: var(--smk-muted); }
.act .chev { color: var(--smk-muted); }
.act.is-available { border-color: var(--smk-coral); background: var(--smk-coral-l); }
.act.is-available .num { background: var(--smk-coral); color: #fff; }
.act.is-completed .num { background: var(--smk-ok); color: #fff; }
.act.is-scheduled, .act.is-locked, .act.is-paused { cursor: default; opacity: .95; }
.act.is-locked .num, .act.is-scheduled .num, .act.is-paused .num { background: #EFEDF5; color: var(--smk-muted); }

/* Audio player */
.audio { background: var(--smk-blush); border-radius: var(--smk-r-md); padding: 14px 16px; margin: 12px 0; }
.audio .row { display: flex; align-items: center; gap: 12px; }
.audio button { background: var(--smk-coral); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.audio .bar { flex: 1; height: 6px; background: #fff; border-radius: 100px; overflow: hidden; }
.audio .bar > span { display: block; height: 100%; background: var(--smk-coral); width: 0; }
.audio .time { font-family: var(--smk-ffe); font-size: .8rem; color: var(--smk-muted); min-width: 40px; text-align: right; }

/* Photo grid */
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: var(--smk-r-sm); overflow: hidden; background: var(--smk-blush); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .add { display: grid; place-items: center; border: 2px dashed var(--smk-line); border-radius: var(--smk-r-sm);
  aspect-ratio: 1; color: var(--smk-muted); cursor: pointer; font-size: .9rem; }

/* Tabs */
.tabs { display: flex; gap: 6px; background: var(--smk-blush); padding: 5px; border-radius: var(--smk-r-pill); margin: 10px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: var(--smk-r-pill);
  font-family: var(--smk-ff); font-weight: 600; color: var(--smk-muted); cursor: pointer; }
.tabs button.active { background: #fff; color: var(--smk-navy); box-shadow: var(--smk-sh-sm); }

/* Badges + notices */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .8rem; font-weight: 600; }
.badge-ok { background: #E7F6EE; color: var(--smk-ok); }
.badge-wait { background: #FFF3E0; color: var(--smk-warn); }
.notice { background: var(--smk-coral-l); border: 1px solid var(--smk-coral); border-radius: var(--smk-r-sm); padding: 12px 14px; color: var(--smk-navy); }
.notice-warn { background: #FFF7E8; border-color: var(--smk-amber); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100;
  background: var(--smk-navy); color: #fff; padding: 12px 18px; border-radius: var(--smk-r-pill);
  box-shadow: var(--smk-sh-lg); font-size: .95rem; max-width: 90%; opacity: 0; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; }
.toast.err { background: var(--smk-err); }

/* Spinner + loader */
.spin { width: 34px; height: 34px; border: 3px solid var(--smk-coral-l); border-top-color: var(--smk-coral); border-radius: 50%; animation: sp 0.8s linear infinite; margin: 20px auto; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Slide-to-complete */
.slide { position: relative; height: 56px; border-radius: var(--smk-r-pill); background: var(--smk-blush); overflow: hidden; user-select: none; margin: 16px 0; }
.slide .knob { position: absolute; top: 4px; left: 4px; width: 48px; height: 48px; border-radius: 50%; background: var(--smk-coral); color: #fff; display: grid; place-items: center; font-size: 1.3rem; touch-action: none; cursor: grab; }
.slide .lbl { position: absolute; inset: 0; display: grid; place-items: center; color: var(--smk-muted); font-weight: 600; pointer-events: none; }

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