/* =====================================================
   KICKWISE V2 — AUTH UI
   Minimal inline SaaS direction.
   - Uses the public layout: header/footer stay visible
   - No auth card / no boxed container
   - Quiet centered composition with compact form widths
   - Manrope-only auth typography
   - No secondary display font dependency
===================================================== */

:root {
    --kw-auth-title: #062657;
    --kw-auth-text: #10233f;
    --kw-auth-muted: rgba(16, 35, 63, .62);
    --kw-auth-soft: rgba(16, 35, 63, .48);
    --kw-auth-line: rgba(5, 43, 93, .12);
    --kw-auth-line-strong: rgba(5, 43, 93, .20);
    --kw-auth-field-bg: rgba(255, 255, 255, .78);
    --kw-auth-field-focus: #ffffff;
    --kw-auth-field-shadow: 0 0 0 4px rgba(0, 82, 177, .075);
    --kw-auth-success-bg: rgba(20, 122, 80, .075);
    --kw-auth-success-border: rgba(20, 122, 80, .18);
    --kw-auth-success-text: #147a50;
    --kw-auth-danger-bg: rgba(180, 35, 24, .075);
    --kw-auth-danger-border: rgba(180, 35, 24, .18);
    --kw-auth-danger-text: #b42318;
    --kw-auth-link: #155aa8;
    --kw-auth-link-hover: #003172;
    --kw-auth-btn-bg: rgba(255, 255, 255, .92);
    --kw-auth-btn-border: rgba(0, 49, 114, .16);
    --kw-auth-btn-text: #052f68;
    --kw-auth-btn-shadow: 0 14px 32px rgba(0, 49, 114, .08);
    --kw-auth-primary-bg: linear-gradient(135deg, #063a82 0%, #0869c7 52%, #16a676 100%);
    --kw-auth-primary-border: rgba(255, 255, 255, .38);
    --kw-auth-primary-text: #ffffff;
    --kw-auth-primary-shadow: 0 18px 38px rgba(6, 58, 130, .18);
}


html[data-theme="dark"] {
    --kw-auth-title: #f7fbff;
    --kw-auth-text: rgba(243, 247, 252, .96);
    --kw-auth-muted: rgba(226, 235, 246, .68);
    --kw-auth-soft: rgba(226, 235, 246, .50);
    --kw-auth-line: rgba(255, 255, 255, .10);
    --kw-auth-line-strong: rgba(255, 255, 255, .18);
    --kw-auth-field-bg: rgba(255, 255, 255, .045);
    --kw-auth-field-focus: rgba(255, 255, 255, .075);
    --kw-auth-field-shadow: 0 0 0 4px rgba(128, 188, 255, .10);
    --kw-auth-success-bg: rgba(70, 211, 143, .09);
    --kw-auth-success-border: rgba(70, 211, 143, .20);
    --kw-auth-success-text: #9ff1c9;
    --kw-auth-danger-bg: rgba(255, 130, 130, .09);
    --kw-auth-danger-border: rgba(255, 130, 130, .20);
    --kw-auth-danger-text: #ffb4b4;
    --kw-auth-link: #b5d7ff;
    --kw-auth-link-hover: #ffffff;
    --kw-auth-btn-bg: rgba(19, 24, 33, .92);
    --kw-auth-btn-border: rgba(255, 255, 255, .15);
    --kw-auth-btn-text: #f7fbff;
    --kw-auth-btn-shadow: 0 18px 40px rgba(0, 0, 0, .26);
    --kw-auth-primary-bg: linear-gradient(135deg, #f6fbff 0%, #e8f4ff 52%, #dff8ee 100%);
    --kw-auth-primary-border: rgba(255, 255, 255, .18);
    --kw-auth-primary-text: #06131f;
    --kw-auth-primary-shadow: 0 20px 44px rgba(0, 0, 0, .34);
}


.kw-auth-page,
.kw-auth-page * {
    box-sizing: border-box;
}

.kw-auth-page {
    width: min(1180px, calc(100% - 32px));
    min-height: clamp(580px, calc(100vh - 300px), 860px);
    margin: 0 auto;
    padding: clamp(64px, 8vh, 108px) 0 clamp(76px, 8vh, 116px);
    display: grid;
    justify-items: center;
    align-content: start;
}

.kw-auth-shell {
    width: 100%;
    display: grid;
    justify-items: center;
}

.kw-auth-shell--compact {
    max-width: 520px;
}

.kw-auth-shell--register {
    max-width: 520px;
}

.kw-auth-flow {
    width: 100%;
}

.kw-auth-head {
    display: grid;
    gap: 0;
    margin: 0 0 28px;
    text-align: center;
}

.kw-auth-kicker {
    margin: 0 0 12px;
    color: var(--kw-auth-soft);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kw-title {
    margin: 0;
    color: var(--kw-auth-title);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: clamp(31px, 3.8vw, 44px);
    font-weight: 680;
    line-height: 1.04;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.kw-copy {
    max-width: 560px;
    margin: 14px auto 0;
    color: var(--kw-auth-muted);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 14px;
    font-weight: 480;
    line-height: 1.72;
    letter-spacing: -.012em;
    text-wrap: balance;
}

.kw-auth-alert {
    width: 100%;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 560;
    line-height: 1.6;
}

.kw-auth-alert--success {
    border-color: var(--kw-auth-success-border);
    background: var(--kw-auth-success-bg);
    color: var(--kw-auth-success-text);
}

.kw-auth-alert--danger {
    border-color: var(--kw-auth-danger-border);
    background: var(--kw-auth-danger-bg);
    color: var(--kw-auth-danger-text);
}

.kw-form {
    width: 100%;
    display: grid;
    gap: 18px;
}

.kw-auth-form--register {
    grid-template-columns: 1fr;
    gap: 18px;
}

.kw-field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.kw-field--half {
    grid-column: 1 / -1;
}

.kw-field--full,
.kw-auth-form--register > .kw-field:not(.kw-field--half),
.kw-auth-employer-fields,
.kw-auth-consent-field,
.kw-auth-action-row,
.kw-alt,
.kw-auth-actions-stack {
    grid-column: 1 / -1;
}

.kw-field > label:not(.kw-checkbox):not(.kw-auth-consent) {
    color: color-mix(in srgb, var(--kw-auth-title) 62%, var(--kw-auth-muted));
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 11px;
    font-weight: 660;
    line-height: 1;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.kw-input,
.kw-select {
    width: 100%;
    min-height: 43px;
    border: 1px solid var(--kw-auth-line);
    border-radius: 12px;
    background: var(--kw-auth-field-bg);
    color: var(--kw-auth-text);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 13.6px;
    font-weight: 500;
    line-height: 1.4;
    outline: 0;
    box-shadow: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.kw-input {
    padding: 0 14px;
}

.kw-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 44px 0 14px;
}

.kw-input::placeholder,
.kw-select:invalid {
    color: var(--kw-auth-soft);
}

.kw-input:hover,
.kw-select:hover {
    border-color: var(--kw-auth-line-strong);
}

.kw-input:focus,
.kw-select:focus {
    border-color: var(--kw-auth-line-strong);
    background: var(--kw-auth-field-focus);
    box-shadow: var(--kw-auth-field-shadow);
}

.kw-select-shell {
    position: relative;
    display: block;
}

.kw-select-shell__icon {
    position: absolute;
    top: 50%;
    right: 14px;
    display: inline-flex;
    width: 16px;
    height: 16px;
    color: var(--kw-auth-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.kw-select-shell__icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.75;
}


.kw-password-field {
    position: relative;
    display: block;
}

.kw-password-field .kw-input {
    padding-right: 46px;
}

.kw-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: color-mix(in srgb, var(--kw-auth-soft) 86%, var(--kw-auth-text));
    transform: translateY(-50%);
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.kw-password-toggle:hover,
.kw-password-toggle:focus-visible {
    border-color: var(--kw-auth-line);
    background: color-mix(in srgb, var(--kw-auth-field-focus) 72%, transparent);
    color: var(--kw-auth-text);
}

.kw-password-toggle:focus-visible {
    outline: 2px solid rgba(11, 97, 201, .34);
    outline-offset: 2px;
}

.kw-password-toggle__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.kw-password-toggle__icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.75;
}

.kw-password-toggle__icon--hide {
    display: none;
}

.kw-password-toggle[aria-pressed="true"] .kw-password-toggle__icon--show {
    display: none;
}

.kw-password-toggle[aria-pressed="true"] .kw-password-toggle__icon--hide {
    display: inline-flex;
}

.kw-auth-role-field {
    border: 0;
    padding: 0;
    margin: 0;
}

.kw-auth-role-field > legend {
    margin: 0 0 9px;
    padding: 0;
    color: color-mix(in srgb, var(--kw-auth-title) 72%, var(--kw-auth-muted));
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 11px;
    font-weight: 680;
    line-height: 1;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.kw-auth-role-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--kw-auth-line-strong) 54%, rgba(209, 218, 230, .76));
    border-radius: 13px;
    background:
        linear-gradient(180deg, rgba(250, 252, 255, .98), rgba(241, 245, 250, .82)),
        color-mix(in srgb, var(--kw-auth-field-bg) 88%, #f4f7fb);
}

.kw-auth-role-option {
    min-width: 0;
    cursor: pointer;
}

.kw-auth-role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kw-auth-role-option span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 37px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: color-mix(in srgb, var(--kw-auth-text) 58%, var(--kw-auth-muted));
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 12.9px;
    font-weight: 570;
    line-height: 1.1;
    letter-spacing: -.012em;
    text-align: center;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.kw-auth-role-option:not(:last-child) span::after {
    content: "";
    position: absolute;
    top: 9px;
    right: -1px;
    width: 1px;
    height: calc(100% - 18px);
    background: color-mix(in srgb, var(--kw-auth-line) 76%, rgba(198, 208, 220, .48));
}

.kw-auth-role-option input:checked + span {
    border-color: color-mix(in srgb, var(--kw-auth-line-strong) 68%, rgba(190, 201, 214, .66));
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--kw-auth-title);
    font-weight: 690;
    box-shadow: none;
}

.kw-auth-role-option input:checked + span::after {
    opacity: 0;
}

html[data-theme="dark"] .kw-auth-role-switcher {
    border-color: rgba(218, 228, 240, .13);
    background:
        linear-gradient(180deg, rgba(28, 33, 40, .78), rgba(15, 18, 23, .90)),
        rgba(255, 255, 255, .032);
}

html[data-theme="dark"] .kw-auth-role-option span {
    color: rgba(226, 235, 246, .70);
}

html[data-theme="dark"] .kw-auth-role-option:not(:last-child) span::after {
    background: rgba(210, 220, 232, .10);
}

html[data-theme="dark"] .kw-auth-role-option input:checked + span {
    border-color: rgba(220, 228, 238, .20);
    background: linear-gradient(180deg, rgba(42, 47, 55, .92), rgba(27, 31, 38, .88));
    color: #ffffff;
    box-shadow: none;
}

.kw-auth-role-option input:focus-visible + span {
    outline: 2px solid rgba(11, 97, 201, .36);
    outline-offset: 2px;
}

.kw-auth-field-error {
    margin: 0;
    color: var(--kw-auth-danger-text);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 12px;
    font-weight: 560;
    line-height: 1.55;
}

.kw-auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
}

.kw-auth-remember,
.kw-checkbox,
.kw-auth-consent {
    display: inline-flex;
    align-items: flex-start;
    gap: 11px;
    color: var(--kw-auth-muted);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-weight: 500;
    line-height: 1.62;
    letter-spacing: -.008em;
    cursor: pointer;
}

.kw-auth-remember {
    align-items: center;
    font-size: 15px;
    line-height: 1.3;
}

.kw-checkbox,
.kw-auth-consent {
    font-size: 14px;
}

.kw-auth-remember input,
.kw-checkbox input,
.kw-auth-consent input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #0b61c9;
}

.kw-auth-remember input {
    margin-top: 0;
}

.kw-auth-inline-link,
.kw-alt a,
.kw-auth-consent a {
    color: var(--kw-auth-link);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-weight: 620;
    text-decoration: none;
    transition: color .18s ease;
}

.kw-auth-inline-link:hover,
.kw-alt a:hover,
.kw-auth-consent a:hover {
    color: var(--kw-auth-link-hover);
}

.kw-auth-employer-fields {
    display: grid;
    gap: 18px;
    margin: 4px 0 2px;
    padding-top: 20px;
    border-top: 1px solid var(--kw-auth-line);
}

.kw-auth-employer-fields__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.kw-auth-employer-note {
    margin: 0;
    color: var(--kw-auth-muted);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 480;
    line-height: 1.72;
}

.kw-auth-consent-field {
    margin-top: 2px;
}

.kw-auth-consent {
    width: 100%;
}

.kw-auth-consent span {
    min-width: 0;
}

.kw-auth-consent-field,
.kw-auth-newsletter-field {
    margin-top: -2px;
}

.kw-auth-consent-field .kw-auth-consent,
.kw-auth-newsletter-field .kw-auth-consent {
    color: color-mix(in srgb, var(--kw-auth-text) 70%, var(--kw-auth-muted));
    font-size: 13.2px;
    font-weight: 430;
    line-height: 1.58;
    letter-spacing: -.008em;
    text-transform: none !important;
}

.kw-auth-consent-field .kw-auth-consent span,
.kw-auth-newsletter-field .kw-auth-consent span,
.kw-auth-consent a {
    text-transform: none !important;
}

.kw-auth-consent a {
    color: color-mix(in srgb, var(--kw-auth-title) 80%, var(--kw-auth-link));
    font-weight: 610;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    transition: color .18s ease, border-color .18s ease;
}

.kw-auth-consent a:hover {
    color: var(--kw-auth-link-hover);
    border-bottom-color: color-mix(in srgb, currentColor 46%, transparent);
}

html[data-theme="dark"] .kw-auth-consent-field .kw-auth-consent,
html[data-theme="dark"] .kw-auth-newsletter-field .kw-auth-consent {
    color: rgba(232, 239, 248, .76);
}

html[data-theme="dark"] .kw-auth-consent a {
    color: rgba(243, 247, 252, .92);
    border-bottom-color: rgba(243, 247, 252, .22);
}

html[data-theme="dark"] .kw-auth-consent a:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, .48);
}

.kw-auth-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.kw-auth-action-row .kw-turnstile-shell {
    flex: 0 1 auto;
    min-width: 0;
}

.kw-auth-action-row--register {
    width: min(100%, 320px);
    margin: 8px auto 0;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
    gap: 12px;
}

.kw-auth-action-row--register .kw-turnstile-shell {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    display: grid;
    justify-items: center;
    justify-self: center;
    gap: 7px;
    overflow: visible;
}

.kw-auth-action-row--register .kw-turnstile-shell > *:first-child,
.kw-auth-action-row--register .kw-turnstile-shell iframe {
    max-width: 100%;
}

.kw-auth-action-row--register .kw-auth-field-error,
.kw-auth-action-row--register .kw-turnstile-shell p,
.kw-auth-action-row--register .kw-turnstile-shell .kw-auth-field-error {
    width: 100%;
    margin-top: 2px;
    text-align: center;
}

.kw-auth-action-row--register .kw-btn {
    width: 100%;
    min-width: 0;
    justify-self: center;
    border-color: var(--kw-auth-btn-border);
    background: var(--kw-auth-btn-bg);
    color: var(--kw-auth-btn-text);
    box-shadow: var(--kw-auth-btn-shadow);
    font-weight: 560;
    transform: none;
}

.kw-auth-action-row--register .kw-btn:hover {
    border-color: var(--kw-auth-line-strong);
    background: var(--kw-auth-btn-bg);
    box-shadow: 0 18px 40px rgba(0, 49, 114, .11);
    transform: none;
}

html[data-theme="dark"] .kw-auth-action-row--register .kw-btn:hover {
    border-color: rgba(255, 255, 255, .20);
    background: var(--kw-auth-btn-bg);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .34);
    transform: none;
}

.kw-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 186px;
    min-height: 43px;
    padding: 0 22px;
    border: 1px solid var(--kw-auth-btn-border);
    border-radius: 13px;
    background: var(--kw-auth-btn-bg);
    color: var(--kw-auth-btn-text);
    box-shadow: var(--kw-auth-btn-shadow);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 540;
    line-height: 1;
    letter-spacing: -.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.kw-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -72%;
    z-index: -1;
    width: 42%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .78), transparent);
    transform: skewX(-18deg);
    transition: left .68s ease;
    pointer-events: none;
}

html[data-theme="dark"] .kw-btn::after {
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .18), transparent);
}

.kw-btn:hover {
    border-color: var(--kw-auth-line-strong);
    box-shadow: 0 18px 40px rgba(0, 49, 114, .11);
}

html[data-theme="dark"] .kw-btn:hover {
    box-shadow: 0 20px 44px rgba(0, 0, 0, .34);
}

.kw-btn:hover::after {
    left: 138%;
}

.kw-btn:focus-visible,
.kw-auth-inline-link:focus-visible,
.kw-alt a:focus-visible,
.kw-auth-consent a:focus-visible {
    outline: 2px solid rgba(11, 97, 201, .45);
    outline-offset: 4px;
}

.kw-btn-ghost {
    min-width: 154px;
    box-shadow: none;
    background: transparent;
}

.kw-alt {
    margin: 22px 0 0;
    color: var(--kw-auth-muted);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
}

.kw-auth-actions-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.kw-auth-actions-stack .kw-form {
    width: auto;
}


@media (max-width: 860px) {
    .kw-auth-page {
        width: min(100%, calc(100% - 28px));
        min-height: auto;
        padding: 52px 0 82px;
    }

    .kw-auth-shell--register {
        max-width: 520px;
    }

    .kw-auth-form--register,
    .kw-auth-employer-fields__grid {
        grid-template-columns: 1fr;
    }

    .kw-field--half {
        grid-column: 1 / -1;
    }

    .kw-auth-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .kw-auth-action-row--register {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .kw-auth-action-row .kw-turnstile-shell {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .kw-auth-action-row--register .kw-turnstile-shell {
        max-width: 100%;
        justify-items: start;
        justify-self: stretch;
        order: 2;
    }

    .kw-auth-action-row--register .kw-auth-field-error,
    .kw-auth-action-row--register .kw-turnstile-shell p,
    .kw-auth-action-row--register .kw-turnstile-shell .kw-auth-field-error {
        text-align: left;
    }

    .kw-btn,
    .kw-auth-action-row--register .kw-btn {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
        order: 1;
    }
}

@media (max-width: 620px) {
    .kw-auth-head {
        margin-bottom: 24px;
        text-align: left;
    }

    .kw-title {
        font-size: clamp(29px, 8vw, 38px);
        line-height: 1.05;
    }

    .kw-copy {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    .kw-auth-meta-row {
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
        gap: 12px;
    }

    .kw-auth-remember,
    .kw-auth-inline-link {
        font-size: 14px;
    }

    .kw-auth-actions-stack {
        display: grid;
        justify-content: stretch;
        gap: 12px;
    }

    .kw-auth-actions-stack .kw-form,
    .kw-auth-actions-stack .kw-btn {
        width: 100%;
    }

    .kw-auth-role-switcher {
        gap: 5px;
        padding: 4px;
    }

    .kw-auth-role-option span {
        min-height: 39px;
        padding: 0 7px;
        font-size: 12.4px;
    }

}
