135 lines
5.5 KiB
CSS
135 lines
5.5 KiB
CSS
.auth-stage {
|
|
display: grid; place-items: center;
|
|
padding: 40px 20px 96px;
|
|
background: var(--bg);
|
|
}
|
|
@supports (min-height: 100dvh) {
|
|
.auth-stage { min-height: 100dvh; }
|
|
}
|
|
.auth {
|
|
width: 100%; max-width: 408px;
|
|
display: flex; flex-direction: column; gap: 22px;
|
|
}
|
|
|
|
/* brand */
|
|
.auth-brand {
|
|
display: flex; align-items: center; justify-content: center; gap: 10px;
|
|
}
|
|
.auth-brand .brand-name { font-size: 16px; }
|
|
|
|
/* public landing — the ungated "/": centered intro + prominent sign-in/register actions */
|
|
.landing {
|
|
width: 100%; max-width: 560px;
|
|
display: flex; flex-direction: column; align-items: center; gap: 18px;
|
|
text-align: center;
|
|
}
|
|
.landing-title { margin: 6px 0 0; font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
|
|
.landing-lead { margin: 0; max-width: 480px; color: var(--text-muted); font-size: var(--fz); line-height: 1.65; }
|
|
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
|
|
.landing-actions .btn { height: 40px; padding: 0 20px; font-size: var(--fz); }
|
|
|
|
/* card */
|
|
.auth-card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: calc(var(--radius) + 3px);
|
|
padding: 24px;
|
|
display: flex; flex-direction: column; gap: 16px;
|
|
box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.06);
|
|
}
|
|
.auth-head { display: flex; flex-direction: column; gap: 4px; }
|
|
.auth-head h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
|
|
.auth-sub { margin: 0; color: var(--text-muted); font-size: var(--fz); }
|
|
.auth-back {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
font-size: var(--fz-sm); color: var(--text-muted); width: fit-content;
|
|
margin-bottom: 2px;
|
|
}
|
|
.auth-back:hover { color: var(--text); }
|
|
|
|
/* ---- SSO section (rendered server-side only when providers are configured) ---- */
|
|
.sso { display: flex; flex-direction: column; gap: 10px; }
|
|
|
|
.sso-list { display: flex; flex-direction: column; gap: 8px; }
|
|
.sso-btn {
|
|
display: flex; align-items: center; gap: 11px; width: 100%;
|
|
height: 40px; padding: 0 12px;
|
|
background: var(--surface); color: var(--text);
|
|
border: 1px solid var(--border-2); border-radius: var(--radius);
|
|
font: inherit; font-size: var(--fz-sm); font-weight: 550;
|
|
cursor: pointer; text-align: left;
|
|
}
|
|
.sso-btn:hover { background: var(--surface-2); }
|
|
/* logo slot — swap the initial for an <img class="sso-logo"> later */
|
|
.sso-logo {
|
|
width: 22px; height: 22px; flex: 0 0 auto;
|
|
display: grid; place-items: center; border-radius: 5px;
|
|
background: var(--surface-2); border: 1px solid var(--border);
|
|
color: var(--text-muted); font-size: 11px; font-weight: 700;
|
|
}
|
|
.sso-logo .ico { color: var(--text-muted); }
|
|
.sso-btn .sso-label { flex: 1 1 auto; }
|
|
|
|
/* divider */
|
|
.auth-divider {
|
|
display: flex; align-items: center; gap: 12px;
|
|
color: var(--text-faint); font-size: var(--fz-xs);
|
|
text-transform: uppercase; letter-spacing: .07em;
|
|
}
|
|
.auth-divider::before, .auth-divider::after {
|
|
content: ""; flex: 1 1 auto; height: 1px; background: var(--border);
|
|
}
|
|
|
|
/* ---- form fields ---- */
|
|
.auth-form { display: flex; flex-direction: column; gap: 14px; }
|
|
.field { display: flex; flex-direction: column; gap: 6px; }
|
|
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
|
|
.field label { font-size: var(--fz-sm); font-weight: 550; color: var(--text); }
|
|
.field .optional { font-size: var(--fz-xs); color: var(--text-faint); font-weight: 400; }
|
|
.field-link { font-size: var(--fz-xs); color: var(--accent); }
|
|
.field-link:hover { text-decoration: underline; }
|
|
|
|
.input-wrap { position: relative; display: flex; }
|
|
.input-ico {
|
|
position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
|
|
color: var(--text-faint); pointer-events: none;
|
|
}
|
|
.input {
|
|
width: 100%; height: 40px; padding: 0 12px;
|
|
background: var(--surface-3); color: var(--text);
|
|
border: 1px solid var(--border-2); border-radius: var(--radius);
|
|
font: inherit; font-size: var(--fz);
|
|
}
|
|
.input.has-ico { padding-left: 36px; }
|
|
.input::placeholder { color: var(--text-faint); }
|
|
.input:focus { outline: none; border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px var(--accent-bg); }
|
|
/* gentle validation feedback only after the user has interacted */
|
|
@supports selector(:user-invalid) {
|
|
.input:user-invalid { border-color: var(--neg); }
|
|
.input:user-invalid:focus { box-shadow: 0 0 0 2px var(--neg-bg); }
|
|
}
|
|
|
|
.field-hint { font-size: var(--fz-xs); color: var(--text-faint); }
|
|
|
|
/* full-width primary button (extends .btn / .btn-primary from styles.css) */
|
|
.btn-block { width: 100%; justify-content: center; height: 40px; font-size: var(--fz); }
|
|
|
|
/* alternate action line */
|
|
.auth-alt { margin: 0; text-align: center; font-size: var(--fz-sm); color: var(--text-muted); }
|
|
.auth-alt a, .auth-alt button { color: var(--accent); font-weight: 550; }
|
|
.auth-alt button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
|
|
.auth-alt a:hover, .auth-alt button:hover { text-decoration: underline; }
|
|
/* "Forgot password?" — a small link under the fields, above the submit button */
|
|
.auth-aside { margin: -4px 0 0; text-align: right; font-size: var(--fz-sm); }
|
|
.auth-aside a { color: var(--accent); }
|
|
.auth-aside a:hover { text-decoration: underline; }
|
|
|
|
.field-error {
|
|
display: none; align-items: center; gap: 6px; margin: 0;
|
|
font-size: var(--fz-xs); color: var(--neg);
|
|
}
|
|
.field.has-error .field-error { display: flex; } /* server-rendered field shows its own error */
|
|
.field-error > .ico { flex: 0 0 auto; color: var(--neg); }
|
|
.field-error a { color: var(--neg); font-weight: 600; text-decoration: underline; }
|