/* The pages that stand outside the Panel: an owner connects a club (weaver.kz/onboarding, served by the site) and sets the
   first manager's password (<club>/setup, served by the club's server, which links this very file). The Panel's look, not
   a copy of it: one glass card on the Panel's picture, its font, its field, its lime main button — every colour, size and
   corner is a name of the Panel's own theme (design/tokens.css, design/themes/club.css, modes/day.css; a test holds this).
   One card and one main action a screen; a colour only for a refusal; no icon, no frame around a frame. */

/* The Panel's picture behind the page, by the mode. Named here by its file: the theme gives it as --app-bg with an address
   relative to the theme's own file, and a browser reads such an address from the sheet that uses it (the Panel's build
   rewrites it; these pages take the sheets as they are). */
body { background: var(--bg) url("../design/art/bg-dark.jpg") center / cover fixed no-repeat; }
[data-mode="day"] body { background-image: url("../design/art/bg-light.jpg"); }

.page { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 22px;
  border-radius: var(--r-panel); background: var(--bg-panel); backdrop-filter: var(--panel-blur); box-shadow: var(--panel-edge); }

/* the mark as the Panel's login shows it: the tile by the mode and the owner's flat word in the text's colour */
.brand { display: flex; align-items: center; gap: 10px; line-height: 0; user-select: none; }
.brand img { display: block; width: 34px; height: 34px; flex: none; }
.brand .tile-day { display: none; }
[data-mode="day"] .brand .tile-day { display: block; }
[data-mode="day"] .brand .tile-night { display: none; }
.word { display: block; width: 105px; height: 16px; background: var(--text);
  -webkit-mask: url("logo/word.svg") center / contain no-repeat; mask: url("logo/word.svg") center / contain no-repeat; }

.title { margin-top: 4px; font-size: var(--fs-20); font-weight: var(--w-semi); line-height: var(--lh-tight); letter-spacing: -.01em; }
.lead { color: var(--text-2); line-height: var(--lh-text); overflow-wrap: anywhere; }
.lead b { color: var(--text); }
.form { display: flex; flex-direction: column; gap: 12px; }

/* a field: the Panel's (ui/Field): its name over a grey box, no frame until the focus */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.label { color: var(--text-2); font-size: var(--fs-12); line-height: var(--lh-tight); }
.box { display: flex; align-items: center; gap: 6px; height: var(--h-money); padding: 0 12px; border-radius: var(--r-ctl);
  background: var(--bg-control); transition: box-shadow var(--t-fast), background-color var(--t-fast); }
.box:hover { background: var(--bg-control-hover); }
.box:focus-within { box-shadow: inset 0 0 0 2px var(--text-2); background: var(--bg-control); }
.box.bad { box-shadow: inset 0 0 0 1px var(--bad); }
.input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--fs-14);
  font-weight: var(--w-regular); }
.affix { color: var(--text-3); font-size: var(--fs-14); white-space: nowrap; }
.code .input { font-size: var(--fs-20); font-weight: var(--w-semi); letter-spacing: .2em; font-variant-numeric: tabular-nums; }
/* what stands under a field: quiet words; red only when the field is refused. A field with nothing to say keeps no empty
   line: the fields stand one step apart, each with its own words close under it */
.hint { color: var(--text-3); font-size: var(--fs-12); line-height: var(--lh); }
.hint:empty { display: none; }
.hint.bad, .error { color: var(--bad); }
.error { font-size: var(--fs-12); line-height: var(--lh); }
.check { display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); font-size: var(--fs-12); line-height: var(--lh-text); cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--main); }
.check a, .foot a, .lead a { text-decoration: underline; text-underline-offset: 2px; }

/* buttons: the Panel's (ui/Button): lime for the screen's one main action, grey for the other, a word for the third */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: var(--h-money); padding: 0 16px;
  border-radius: var(--r-ctl); font-size: var(--fs-14); font-weight: var(--w-semi); white-space: nowrap; user-select: none;
  transition: background-color var(--t-fast), color var(--t-fast), opacity var(--t-fast); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--fill-edge); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost { background: var(--bg-control); color: var(--text); font-weight: var(--w-medium); }
.btn.ghost:hover:not(:disabled) { background: var(--bg-control-hover); }
.btn:disabled { background: var(--bg-control); color: var(--text-4); box-shadow: none; }
.btn:active:not(:disabled) { opacity: .9; transition-duration: 60ms; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.link { color: var(--text-2); font-size: var(--fs-13); }
.link:hover:not(:disabled) { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.link:disabled { color: var(--text-4); }

/* the steps of a club being made: words only; the one that goes now has the Panel's waiting ring, the rest are quieter */
.steps { display: flex; flex-direction: column; gap: 10px; margin: 2px 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.steps li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-4); }
.steps li[data-state="done"] { color: var(--text-2); }
.steps li[data-state="done"]::before { background: var(--text-2); box-shadow: none;
  -webkit-mask: url("check.svg") center / 14px no-repeat; mask: url("check.svg") center / 14px no-repeat; }
.steps li[data-state="now"] { color: var(--text); font-weight: var(--w-medium); }
.steps li[data-state="now"]::before { box-shadow: none; border: 1.5px solid var(--line-2); border-top-color: var(--text); animation: turn .8s linear infinite; }
@keyframes turn { to { rotate: 1turn; } }

.foot { color: var(--text-3); font-size: var(--fs-12); line-height: var(--lh-text); }

/* the long text of the consent: the same card, wider, the Panel's reading sizes */
.card.text { width: min(640px, 100%); }
.card.text h2 { margin-top: 6px; font-size: var(--fs-14); font-weight: var(--w-semi); }
.card.text p, .card.text li { color: var(--text-2); line-height: var(--lh-text); }
.card.text ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* a phone: a field under 16 px makes its browser zoom the page in at every tap */
@media (max-width: 600px) {
  .page { place-items: start center; padding: 12px 10px; }
  .card { padding: 18px; }
  .input, .affix { font-size: var(--fs-16); }
}
