:root {
  color-scheme: light;
  --ink: #0b2730;
  --muted: #60777d;
  --water: #087e8b;
  --water-dark: #05616b;
  --foam: #e9f7f7;
  --line: #d8e7e9;
  --danger: #ad2f2f;
  --shadow: 0 18px 50px rgba(9, 61, 69, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4fafa;
  color: var(--ink);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 90% 0, rgba(51, 187, 193, 0.2), transparent 28rem), linear-gradient(180deg, #f8fcfc, #edf7f7);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: 24px 18px 100px; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 42px; }
.brand__mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--water); color: white; font-size: 21px; font-weight: 800; box-shadow: 0 8px 24px rgba(8, 126, 139, 0.22); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.auth-card, .state-card, .session-card, .group-card, .roster-card { border: 1px solid rgba(216, 231, 233, .9); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.auth-card { max-width: 440px; margin: 7vh auto 0; padding: 32px; border-radius: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 8vw, 42px); line-height: 1.05; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 21px; }
.eyebrow { margin-bottom: 8px; color: var(--water); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.muted, .help { color: var(--muted); }
.help { margin: 20px 0 0; font-size: 13px; text-align: center; }
form { display: grid; gap: 18px; margin-top: 28px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
input { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid #bfd3d6; border-radius: 14px; outline: none; background: white; color: var(--ink); }
input:focus { border-color: var(--water); box-shadow: 0 0 0 4px rgba(8, 126, 139, .12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 96px; }
.password-toggle { position: absolute; top: 50%; right: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--foam); color: var(--water-dark); font-size: 13px; font-weight: 750; transform: translateY(-50%); }
.password-toggle:hover { background: #d9eeee; }
.password-toggle:focus-visible { outline: 3px solid rgba(8, 126, 139, .25); }
.primary { min-height: 52px; border: 0; border-radius: 15px; background: var(--water); color: white; font-weight: 800; }
.primary:hover { background: var(--water-dark); }
.primary:disabled { cursor: wait; opacity: .65; }
.form-error { min-height: 20px; margin: -6px 0 -8px; color: var(--danger); font-size: 14px; }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.quiet { padding: 9px 12px; border: 0; background: transparent; color: var(--muted); }
.content { display: grid; gap: 14px; }
.session-card, .group-card, .roster-card, .state-card { padding: 19px; border-radius: 20px; }
.session-card { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; border-color: var(--line); text-align: left; }
.session-card:hover { border-color: #9ac8cd; transform: translateY(-1px); }
.session-card__time { font-size: 22px; font-weight: 850; letter-spacing: -.025em; }
.session-card__meta, .group-card__meta, .roster-row small { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.group-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; border-color: var(--line); color: var(--ink); text-align: left; }
.group-card:hover { border-color: #9ac8cd; transform: translateY(-1px); }
.group-card__main { display: grid; min-width: 0; gap: 5px; }
.group-card__label { color: var(--water); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.group-card__title { overflow-wrap: anywhere; font-size: 20px; line-height: 1.2; }
.group-card__meta { display: block; line-height: 1.4; }
.count { min-width: 42px; padding: 8px 10px; border-radius: 999px; background: var(--foam); color: var(--water-dark); font-weight: 800; text-align: center; }
.back-button { width: fit-content; margin-bottom: 4px; padding: 8px 0; border: 0; background: transparent; color: var(--water-dark); font-weight: 750; }
.roster-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.roster-list { list-style: none; margin: 0; padding: 0; }
.roster-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.roster-row small { display: block; }
.roster-row:last-child { border-bottom: 0; padding-bottom: 0; }
.phone { color: var(--water-dark); font-weight: 750; text-decoration: none; }
.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 720px); margin: 0 auto; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .93); backdrop-filter: blur(18px); }
.bottom-nav button { min-height: 46px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 750; }
.bottom-nav button.is-active { background: var(--foam); color: var(--water-dark); }
.spinner { display: inline-block; width: 16px; height: 16px; margin-right: 8px; border: 2px solid var(--line); border-top-color: var(--water); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) {
  .shell { padding-top: 18px; }
  .brand { margin-bottom: 26px; }
  .auth-card { margin-top: 4vh; padding: 25px 21px; border-radius: 24px; }
  .session-card { grid-template-columns: 62px minmax(0, 1fr) auto; padding: 16px; }
  .roster-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
