/* The pages before sign-in (first-time setup, sign-in, forgotten password, two-step code):
   one card on the canvas under the madrasa's own name and logo. Built on qalam.css tokens. */
.door { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); box-sizing: border-box; background: var(--q-canvas); color: var(--q-ink); font-family: var(--q-font-sans); -webkit-font-smoothing: antialiased; }
.door-main { width: 100%; max-width: 420px; display: grid; gap: var(--q-space-5); }
.door-wide .door-main { max-width: 540px; }

.door-brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
/* A square logo shows at 64px; a wide one (a wordmark) keeps its shape, up to the card's width. */
.door-brand img { height: 64px; width: auto; max-width: min(320px, 100%); object-fit: contain; }
.door-mark { width: 64px; height: 64px; border-radius: 15px; display: grid; place-items: center; background: var(--q-accent); color: var(--q-on-accent); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.door-name { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; }

.door-card { background: var(--q-surface); border-radius: var(--q-radius-xl); box-shadow: 0 0 0 1px var(--q-hairline), var(--q-shadow-control); padding: 28px 24px 24px; display: grid; gap: var(--q-space-5); }
@media (min-width: 480px) { .door-card { padding: 32px 32px 28px; } }
.door-head { display: grid; gap: 6px; }
.door-head h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; }
.door-head p { margin: 0; color: var(--q-ink-secondary); font-size: 15px; line-height: 21px; }
.door form { display: grid; gap: var(--q-space-4); }
.door-row { display: flex; align-items: center; justify-content: space-between; gap: var(--q-space-3); flex-wrap: wrap; }
.door-link { color: var(--q-accent); text-decoration: none; font-size: 15px; }
.door-link:hover { text-decoration: underline; }
.door-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--q-space-3); margin-top: var(--q-space-2); }
.door-actions .q-btn-filled { margin-inline-start: auto; min-width: 140px; }
@media (max-width: 479px) { .door-actions { flex-direction: column-reverse; align-items: stretch; } .door-actions .q-btn { width: 100%; } }
.door-note { margin: 0; text-align: center; color: var(--q-ink-tertiary); font-size: 13px; line-height: 18px; }
.door-split { display: grid; gap: var(--q-space-4); align-items: start; }
@media (min-width: 480px) { .door-split { grid-template-columns: 1fr 1fr; } }

/* Setup: where you are (Step 2 of 4) */
.door-steps { display: grid; gap: 8px; }
.door-steps-label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--q-ink-secondary); }
.door-steps-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.door-steps-bar span { height: 4px; border-radius: 2px; background: var(--q-fill-strong); }
.door-steps-bar span.is-done { background: var(--q-accent); }

/* Choice cards (the kind of year) */
.door-options { display: grid; gap: var(--q-space-3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.door-option { position: relative; display: block; padding: 12px 14px; border-radius: var(--q-radius-md); box-shadow: inset 0 0 0 1px var(--q-hairline); cursor: pointer; }
.door-option input { position: absolute; opacity: 0; pointer-events: none; }
.door-option span { display: grid; gap: 2px; }
.door-option b { font-weight: 600; }
.door-option small { color: var(--q-ink-secondary); font-size: 13px; line-height: 18px; }
.door-option:has(input:checked) { box-shadow: inset 0 0 0 2px var(--q-accent); background: var(--q-accent-soft); }
.door-option:has(input:focus-visible) { outline: 2px solid var(--q-focus-ring); outline-offset: 2px; }

/* The licence this copy is activated with */
.door-licence { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--q-radius-md); background: var(--q-success-soft); color: var(--q-ink); font-size: 14px; line-height: 19px; }
.door-licence .q-icon { color: var(--q-success); flex: none; }
.door-licence b { font-weight: 600; }

.door-key { font-family: var(--q-font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.door-logo { display: flex; align-items: center; gap: var(--q-space-3); }
.door-logo img { width: 48px; height: 48px; border-radius: 11px; object-fit: contain; background: var(--q-fill); }

/* Ready */
.door-ready { text-align: center; justify-items: center; }
.door-ready-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--q-success-soft); color: var(--q-success); }
.door-ready-check .q-icon { width: 32px; height: 32px; }
.door-next { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; text-align: start; width: 100%; }
.door-next li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 21px; }
.door-next li .q-icon { color: var(--q-accent); flex: none; margin-top: 2px; }

.door .q-banner { margin: 0; }
