/*
VOICE: a calm, confident studio tool — quick to read between classes.
IDEA: the studio's whiteboard schedule and member cards, made tidy.
PICTURE: the live dashboard numbers and the day's timeline.
COLOUR and TYPE: warm off-white ground, white cards, black ink, the logo's yellow as the one accent; Rubik.
LAYOUT: one phone-width column, bottom tab bar, bottom sheets for every edit.
*/
:root {
  color-scheme: light;
  --bg: #F6F5F2; --card: #FFFFFF; --line: #E7E5E0; --line2: #E2E0DA; --ink: #141414; --muted: #66666D; --faint: #9A9AA0;
  --y: #F0C03A; --y-ink: #8A6608; --y-soft: #FBF1D6; --black: #0B0B0C;
  --red: #C2412D; --red-soft: #FBE4E0; --green: #1E8048; --green-soft: #E3F3EA; --blue: #2F62C9; --blue-soft: #E5ECFB; --pink: #A23C93; --pink-soft: #F6E3F2;
  --r: 18px; --sh: 0 1px 2px rgba(20, 20, 20, .04);
}
* { box-sizing: border-box; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--ink); font: 15px/1.45 Rubik, system-ui, -apple-system, sans-serif; overflow-x: clip; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 96px; }

/* header */
.top { background: var(--black); color: #F4F4F2; padding: max(14px, env(safe-area-inset-top)) 18px 14px; border-radius: 0 0 22px 22px; display: flex; align-items: center; justify-content: space-between; }
.top img { height: 42px; width: auto; display: block; }
.top .acts { display: flex; gap: 10px; align-items: center; }
.ibtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.top .ibtn { background: #161618; border-color: #2A2A2E; color: #F4F4F2; }
.ibtn .dot { position: absolute; top: 9px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--y); }
.me { width: 44px; height: 44px; border-radius: 50%; background: var(--y); color: var(--black); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; border: 0; }

.ph { display: flex; align-items: center; gap: 12px; padding: max(18px, env(safe-area-inset-top)) 18px 8px; }
.ph h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.2px; line-height: 1.15; }
.ph .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.ph .grow { flex: 1; }
.hello { padding: 18px 18px 6px; }
.hello .d { font-size: 13px; color: var(--muted); }
.hello h1 { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.hello .s { margin-top: 6px; font-size: 14px; color: var(--muted); }

.sec { margin: 18px 18px 8px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.sec .link { color: var(--y-ink); font-weight: 600; background: none; border: 0; padding: 4px 0; }
.wrap { padding: 0 18px; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.pad { padding: 16px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.k .l { font-size: 13px; color: var(--muted); }
.k .v { font-size: 26px; font-weight: 700; margin-top: 6px; line-height: 1.1; white-space: nowrap; }
.k .h { font-size: 12px; color: var(--muted); margin-top: 4px; }
.k.c { text-align: center; padding: 14px 10px; }
.k.c .v { font-size: 24px; font-weight: 800; margin-top: 0; }
.k.c .l { font-size: 12px; margin-top: 2px; }
.up { color: var(--green) !important; } .down { color: var(--red) !important; } .gold { color: var(--y-ink) !important; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.pill.y { background: var(--y); color: var(--black); } .pill.r { background: var(--red-soft); color: var(--red); } .pill.g { background: var(--green-soft); color: var(--green); }
.pill.b { background: var(--blue-soft); color: var(--blue); } .pill.p { background: var(--pink-soft); color: var(--pink); } .pill.n { background: #EEEDE9; color: var(--muted); }

/* bars */
.bars { direction: ltr; margin-top: 18px; height: 140px; display: flex; align-items: flex-end; gap: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; border-radius: 8px; background: #E4E2DC; min-height: 4px; }
.bars .b.on i { background: var(--y); }
.bars .b span { font-size: 11px; color: var(--muted); }
.bars .b.on span { color: var(--ink); font-weight: 600; }
.bars .b em { font-style: normal; font-size: 10px; color: var(--muted); }

/* lists */
.list > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; background: none; border: 0; text-align: start; }
.row .m { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row .e { font-size: 13px; color: var(--muted); text-align: end; white-space: nowrap; }
.chev { color: #B5B3AD; }
.av { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.av.sm { width: 34px; height: 34px; font-size: 12px; }
.ic { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.ac-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; width: 100%; background: none; border: 0; text-align: start; }
.ac-head .tt { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.ac-head .n { font-size: 13px; font-weight: 700; }
.ac-body { padding: 2px 16px 10px; border-top: 1px solid var(--line); }
.ac-body .li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; width: 100%; background: none; border: 0; text-align: start; }
.ac-body .li span:last-child { color: var(--muted); white-space: nowrap; }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.demo { text-align: center; font-size: 12px; color: var(--faint); margin: 22px 18px 0; }
.demo button { background: none; border: 0; color: var(--y-ink); font-weight: 600; padding: 4px; }

/* controls */
.btn { height: 50px; border-radius: 16px; border: 0; background: var(--y); color: var(--black); font-weight: 700; font-size: 15px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--ink); font-weight: 600; }
.btn.dark { background: var(--black); color: #fff; }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { height: 40px; border-radius: 12px; font-size: 13px; padding: 0 14px; }
.btn:disabled { opacity: .45; }
.add { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--y); color: var(--black); display: inline-flex; align-items: center; justify-content: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 0 12px; height: 34px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); background: var(--card); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--y); color: var(--black); border-color: var(--y); font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.seg button { height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--y); color: var(--black); font-weight: 700; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 13px; color: var(--muted); }
.in { height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); padding: 0 14px; font-size: 16px; outline: 0; width: 100%; }
textarea.in { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.in:focus { border-color: var(--y-ink); box-shadow: 0 0 0 3px var(--y-soft); }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sw { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.sw .m { flex: 1; } .sw .t { font-weight: 600; font-size: 15px; } .sw .s { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.tg { appearance: none; width: 50px; height: 30px; border-radius: 99px; background: #D6D4CE; position: relative; flex: none; margin: 0; cursor: pointer; transition: background .2s; }
.tg::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .2s; }
.tg:checked { background: var(--y); }
.tg:checked::after { transform: translateX(-20px); }
.days7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days7 button { height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-weight: 600; }
.days7 button.on { background: var(--y); border-color: var(--y); color: var(--black); }
:focus-visible { outline: 2px solid var(--y-ink); outline-offset: 2px; }

/* calendar */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 12px 18px 4px; }
.week button { text-align: center; padding: 8px 0; border-radius: 14px; border: 0; background: transparent; }
.week button .w { font-size: 11px; color: var(--muted); display: block; }
.week button .n { font-size: 17px; font-weight: 600; margin-top: 4px; display: block; }
.week button .c { width: 5px; height: 5px; border-radius: 50%; background: var(--line2); margin: 4px auto 0; display: block; }
.week button.today .n { color: var(--y-ink); }
.week button.on { background: var(--y); }
.week button.on .w, .week button.on .n { color: var(--black); }
.week button.on .c { background: var(--black); }
.wnav { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.wnav b { font-size: 14px; }
.slot { display: flex; gap: 12px; }
.slot .tm { width: 46px; font-size: 13px; color: var(--muted); padding-top: 14px; flex: none; }
.slot.now .tm { color: var(--y-ink); font-weight: 600; }
.cls { flex: 1; padding: 12px 14px; text-align: start; border: 1px solid var(--line); background: var(--card); border-radius: 16px; width: 100%; }
.slot.now .cls { border: 1.5px solid var(--y); }
.slot.past .cls { opacity: .6; }
.cls .t { font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cls .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.meter { margin-top: 10px; height: 6px; border-radius: 99px; background: #E4E2DC; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.meter i.full { background: var(--y); }
.cls .f { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; color: var(--muted); }
.coachdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; }

/* attendance */
.att { display: flex; gap: 6px; }
.att button { width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; color: var(--faint); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.att button.yes { background: var(--green-soft); border-color: var(--green-soft); color: var(--green); }
.att button.no { background: var(--red-soft); border-color: var(--red-soft); color: var(--red); }

/* funnel */
.funnel { display: flex; gap: 8px; margin-top: 14px; }
.funnel > div { flex: 1; text-align: center; }
.funnel i { display: block; height: 6px; border-radius: 99px; background: var(--y); }
.funnel b { display: block; font-size: 18px; font-weight: 800; margin-top: 8px; }
.funnel span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* profile */
.prof { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 18px 4px; }
.prof .av { width: 76px; height: 76px; font-size: 26px; }
.prof h2 { margin: 10px 0 2px; font-size: 22px; font-weight: 800; }
.prof .s { color: var(--muted); font-size: 13px; }
.qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px 18px 0; }
.qa a, .qa button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 4px; }
.qa svg { color: var(--y-ink); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: end; }

/* nav */
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.nav div { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 6px max(10px, env(safe-area-inset-bottom)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 6px 0; }
.nav a.on { color: var(--y-ink); font-weight: 600; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(11, 11, 12, .38); z-index: 40; opacity: 0; transition: opacity .22s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 520px; margin: 0 auto; background: var(--bg); border-radius: 24px 24px 0 0; max-height: 92vh; overflow: auto; transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); padding: 8px 18px max(22px, env(safe-area-inset-bottom)); }
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: #D6D4CE; margin: 4px auto 10px; }
.sheet h2 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.sheet .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.sheet form, .sheet .stack { display: flex; flex-direction: column; gap: 12px; }
.sheet .acts { display: flex; gap: 10px; margin-top: 6px; }
.sheet .acts .btn { flex: 1; }

.toast { pointer-events: none; position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--black); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; z-index: 60; opacity: 0; transition: .22s; max-width: calc(100% - 36px); text-align: center; }
.toast.open { opacity: 1; transform: translate(-50%, 0); }

.view { animation: in .22s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } .sheet, .scrim, .toast { transition: none; } }
