/* ------------------------------------------------------------------- auth
   Sign-in and registration screens. Self-contained palette so the auth shell
   renders identically no matter what the surrounding document sets, matching
   the convention used by workspace.css.
   --------------------------------------------------------------------- */

.auth {
    --auth-bg: #f6f6f4;
    --auth-surface: #fff;
    --auth-ink: #191917;
    --auth-ink-2: #3d3d38;
    --auth-muted: #8a8a82;
    --auth-faint: #a8a8a0;
    --auth-placeholder: #b4b4ac;
    --auth-line: #e6e6e1;
    --auth-accent: oklch(0.55 0.16 152);
    --auth-accent-hover: oklch(0.49 0.16 152);
    --auth-accent-soft: oklch(0.72 0.07 152);
    --auth-danger: oklch(0.58 0.18 25);
    --auth-danger-ink: oklch(0.45 0.15 25);
    --auth-danger-bg: oklch(0.96 0.04 25);

    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 32px;
    background: var(--auth-bg);
    color: var(--auth-ink);
}

/* ------------------------------------------------------------------ brand */

.auth__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: var(--auth-ink);
}

.auth__brand:hover {
    color: var(--auth-ink);
}

.auth__mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--auth-accent);
}

.auth__name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth__badge {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--auth-muted);
    border: 1px solid var(--auth-line);
    border-radius: 5px;
    padding: 2px 5px;
}

/* ------------------------------------------------------------------- card */

.auth__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth__card {
    width: 100%;
    max-width: 376px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth__title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.auth__lede {
    font-size: 13.5px;
    color: var(--auth-muted);
}

/* ----------------------------------------------------------------- fields */

.auth__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth__field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth__label {
    font-size: 12.5px;
    font-weight: 600;
}

.auth__input {
    font: inherit;
    font-size: 13.5px;
    padding: 11px 13px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: var(--auth-surface);
    color: var(--auth-ink);
    outline: 0;
    width: 100%;
}

.auth__input::placeholder {
    color: var(--auth-placeholder);
}

.auth__input:focus {
    border-color: var(--auth-accent);
}

.auth__input.input-validation-error {
    border-color: var(--auth-danger);
}

/* The reveal button sits inside the password box, so the input reserves room
   for it on the right. */
.auth__control {
    position: relative;
    display: flex;
}

.auth__control .auth__input {
    padding-right: 62px;
}

.auth__reveal {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font: inherit;
    font-size: 11.5px;
    color: var(--auth-muted);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.auth__reveal:hover {
    color: var(--auth-ink-2);
}

.auth__error {
    font-size: 12.5px;
    color: var(--auth-danger-ink);
}

.auth__error:empty {
    display: none;
}

/* -------------------------------------------------------------- remember */

.auth__remember {
    display: flex;
    align-items: center;
    gap: 9px;
}

.auth__check {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--auth-accent);
}

.auth__check-label {
    font-size: 13px;
    color: var(--auth-ink-2);
    cursor: pointer;
}

/* -------------------------------------------------------------- summary */

.auth__summary.validation-summary-valid {
    display: none;
}

.auth__summary.validation-summary-errors {
    font-size: 12.5px;
    color: var(--auth-danger-ink);
    background: var(--auth-danger-bg);
    border-radius: 8px;
    padding: 8px 11px;
}

.auth__summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
}

/* --------------------------------------------------------------- submit */

.auth__submit {
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    cursor: pointer;
}

.auth__submit:hover {
    background: var(--auth-accent-hover);
}

.auth__submit:disabled {
    background: var(--auth-accent-soft);
    cursor: default;
}

.auth__alt {
    font-size: 13px;
    color: var(--auth-muted);
}

.auth__alt a {
    font-weight: 500;
    color: var(--auth-ink);
}

.auth__alt a:hover {
    color: var(--auth-accent);
}

/* --------------------------------------------------------------- footer */

.auth__footer {
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: var(--auth-faint);
}

.auth__footer a {
    color: var(--auth-faint);
}

.auth__footer a:hover {
    color: var(--auth-ink-2);
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 560px) {
    .auth {
        padding: 20px;
    }

    .auth__main {
        padding: 32px 0;
    }
}
