/*
 * Auth pages (login, register, forgot/reset password, confirm e-mail, logout, message, retired invitation):
 * one centred card on the ground colour. Needs NO icon font: the login page runs under a strict CSP that
 * forbids third-party fonts. Inputs are 16px and 44px high on phones (no iOS zoom, thumb-sized targets).
 */
.ms-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 16px;
}

/* a topbar-less page: main spans the whole grid */
.ms-body > main.ms-auth { grid-column: 1 / -1; grid-row: 1 / -1; align-self: stretch; }

.ms-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    background: var(--ms-surface);
    border: 1px solid var(--ms-line);
    border-radius: 16px;
    box-shadow: var(--ms-shadow-pop);
    display: grid;
    gap: 20px;
}

.ms-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-auth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 1px solid var(--ms-line);
    border-radius: 12px;
    /* the Sedona logo is navy with a transparent S: it sits on a white tile in both themes */
    background: #fff;
}

.ms-auth-mark img { display: block; width: 36px; height: 36px; }

.ms-auth-brand strong { display: block; font-size: 1.125rem; line-height: 1.2; }
.ms-auth-brand small { display: block; margin-top: 2px; color: var(--ms-muted); font-size: 0.8125rem; }

.ms-auth-copy { display: grid; gap: 8px; }
.ms-auth-copy .ms-eyebrow { margin: 0; color: var(--ms-accent-text); }
.ms-auth-copy h1 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.ms-auth-copy p { color: var(--ms-muted); font-size: 0.9375rem; line-height: 1.55; }

.ms-auth-card .ms-form { gap: 16px; }
.ms-auth-card .ms-input { min-height: 44px; font-size: 1rem; }
.ms-auth-card .ms-btn { min-height: 44px; font-size: 1rem; }
.ms-auth-card .ms-btn-lg { min-height: 48px; }

.ms-auth-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: -4px;
    font-size: 0.875rem;
}

.ms-auth-links a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }

.ms-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ms-faint);
    font-size: 0.8125rem;
}

.ms-auth-divider::before,
.ms-auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ms-line); }

.ms-auth-help {
    padding-top: 16px;
    border-top: 1px solid var(--ms-grid);
    color: var(--ms-muted);
    font-size: 0.8125rem;
    line-height: 1.55;
}

.ms-auth-foot { text-align: center; font-size: 0.875rem; }
.ms-auth-foot a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }

/* register: wider card, two columns for the short fields */
.ms-auth-card.is-wide { max-width: 560px; }
.ms-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ms-form-grid .is-full { grid-column: 1 / -1; }
.ms-form-grid .ms-hint { margin-top: -8px; }

/* customer_message: a calm card in the portal shell (used for results and operation failures) */
.ms-message {
    align-self: center;
    width: 100%;
    max-width: 520px;
    margin: 24px auto;
    padding: 32px 28px;
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.ms-message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ms-info-bg);
    color: var(--ms-info-text);
}

.ms-message.is-ok .ms-message-icon { background: var(--ms-ok-bg); color: var(--ms-ok-text); }
.ms-message.is-error .ms-message-icon { background: var(--ms-warn-bg); color: var(--ms-warn-text); }
.ms-message h1 { font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.ms-message p { max-width: 46ch; color: var(--ms-muted); line-height: 1.55; overflow-wrap: anywhere; }
.ms-message .ms-btn { margin-top: 10px; }
.ms-auth-card .ms-banner { font-size: 0.875rem; }

@media (max-width: 560px) {
    .ms-auth { align-items: flex-start; padding: 16px 16px 32px; }
    .ms-auth-card { padding: 24px 20px; gap: 18px; border-radius: 14px; box-shadow: var(--ms-shadow); }
    .ms-auth-copy h1 { font-size: 1.375rem; }
    .ms-form-grid { grid-template-columns: minmax(0, 1fr); }
    .ms-message { margin: 8px auto; padding: 24px 20px; }
}
