/*
 * The back office's signed-out pages (log in, forgot / reset password, invitation):
 * the neutral charter of the account e-mails (layout/email/html/account.php), so the
 * page a link lands on looks like the e-mail that carried it. Standalone on purpose:
 * no Bootstrap, no build, no font download.
 */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body.kz-auth {
    margin: 0;
    min-height: 100vh;
    background: #f4f4f5;
    color: #3f3f46;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.kz-auth__shell {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 56px 16px 40px;
}

.kz-auth__brand {
    margin: 0 4px 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: #18181b;
    overflow-wrap: anywhere;
}

.kz-auth__card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 36px 36px 32px;
}

.kz-auth__title {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: #18181b;
}

.kz-auth__lead { margin: 0 0 24px; }

.kz-auth p { margin: 0 0 16px; }

.kz-auth__footer {
    margin: 20px 4px 0;
    font-size: 12px;
    line-height: 18px;
    color: #71717a;
}

.kz-auth__footer a { color: inherit; }

/* Fields */
.kz-field { margin: 0 0 18px; }

.kz-field__label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #18181b;
}

.kz-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.kz-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    background: #fff;
    color: #18181b;
    font: inherit;
    font-size: 16px; /* 16px or iOS zooms on focus */
    line-height: 22px;
    transition: border-color .15s, box-shadow .15s;
}

textarea.kz-input { min-height: 120px; resize: vertical; }

.kz-input::placeholder { color: #a1a1aa; }

.kz-input:focus {
    outline: none;
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, .12);
}

.kz-input[aria-invalid="true"] { border-color: #dc2626; }

.kz-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    font-size: 14px;
    cursor: pointer;
}

.kz-check input { width: 16px; height: 16px; margin: 0; accent-color: #18181b; }

.kz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* Buttons and links */
.kz-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 13px 20px;
    border: 1px solid #18181b;
    border-radius: 8px;
    background: #18181b;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s;
}

.kz-btn:hover { background: #27272a; }

.kz-btn:focus-visible { outline: 3px solid rgba(24, 24, 27, .25); outline-offset: 2px; }

.kz-btn:disabled { opacity: .5; cursor: not-allowed; }

.kz-btn--ghost { background: #fff; color: #18181b; border-color: #d4d4d8; }

.kz-btn--ghost:hover { background: #f4f4f5; }

.kz-link {
    color: #3f3f46;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kz-link:hover { color: #18181b; }

.kz-auth__aside {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e4e4e7;
    font-size: 14px;
    text-align: center;
}

/* Messages */
.kz-alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
}

.kz-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

.kz-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.kz-alert--info { background: #f4f4f5; border-color: #e4e4e7; color: #3f3f46; }

.kz-field__hint { margin: 6px 0 0; font-size: 13px; line-height: 18px; color: #71717a; }

.kz-field__hint--error { color: #b91c1c; }

@media (max-width: 480px) {
    .kz-auth__shell { padding: 24px 12px 32px; }
    .kz-auth__card { padding: 26px 20px 24px; }
    .kz-auth__title { font-size: 22px; line-height: 30px; }
    .kz-grid { grid-template-columns: 1fr; }
}
