/* Lynki Auth - Clean login/register styles */
/* Uses auth-* prefixed classes to avoid Bootstrap conflicts */

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-img {
    height: 96px;
    width: auto;
    color: #0f172a;
}

.auth-body {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
}

.auth-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin: 0 0 1.5rem;
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.auth-field-row .auth-field {
    margin-bottom: 0;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.auth-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9375rem;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input.input-validation-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.auth-field-error {
    display: block;
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.375rem;
}

.auth-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.auth-error:empty {
    display: none;
}

.auth-hint {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.auth-submit {
    display: block;
    width: 100%;
    height: 48px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-submit:hover {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-submit:active {
    background: #020617;
    transform: translateY(1px);
    box-shadow: none;
}

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #4d566d;
}

.auth-links p {
    margin: 0.5rem 0 0;
}

/*
 * Links read as links. These were rendered in the same near-black as body text with no
 * underline, which is indistinguishable from bold text: on the code screen the recovery
 * route ("start pÃ¥ nytt") was effectively invisible to anyone who needed it.
 */
.auth-links a {
    color: #1f47e0;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    color: #1a37b5;
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.6875rem;
    color: #cbd5e1;
    letter-spacing: 0.5px;
}

/* --- Two-factor code entry ------------------------------------------------
 *
 * Every user meets this screen on every login, so its details matter more than
 * most UI. Colours are the Lynki brand tokens; see
 * Lynki.Brand/design/guidelines/DESIGN.md.
 */

.auth-lede {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #4d566d;
    text-align: center;
}

.auth-lede strong {
    color: #171c28;
    font-weight: 600;
}

.auth-notice {
    background: #eef4ff;
    color: #1b3190;
    border: 1px solid #bcd3ff;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/*
 * The code is the whole job of this page, so it is given room: large, monospaced
 * and widely tracked, which also makes a mistyped digit easy to spot.
 */
.auth-code-input {
    height: 58px;
    text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    /* Compensate for the trailing letter-space so the text sits optically centred. */
    text-indent: 0.4em;
    color: #020617;
}

.auth-code-input::placeholder {
    color: #adb4c3;
    font-weight: 400;
    letter-spacing: 0.4em;
}

/*
 * A resend control styled as a button but sized as a link. It is a real <button>
 * because it submits a form; it must not look like a second primary action.
 */
.auth-linkbutton {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #1f47e0;
    cursor: pointer;
}

.auth-linkbutton:hover {
    color: #1a37b5;
    text-decoration: underline;
}

/*
 * One consistent, visible focus ring. Never remove focus styling: keyboard users
 * depend on it.
 */
.auth-input:focus-visible,
.auth-submit:focus-visible,
.auth-linkbutton:focus-visible,
.auth-links a:focus-visible {
    outline: 2px solid #3366f5;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit,
    .auth-input {
        transition: none;
    }
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    border-radius: 14px;
}

/* Hide any bootstrap remnants */
body > header,
body > footer,
body > .container,
.navbar {
    display: none !important;
}
