/* Auth pages (signup, login, forgot/reset password) — same lavender/violet
   design system as the rest of the app, self-contained so no build step
   is required. */

:root {
    --violet-50: #eaf2ff;
    --violet-100: #d6e6ff;
    --violet-200: #b3d1ff;
    --violet-500: #2a7afe;
    --violet-600: #1f6ae0;
    --violet-700: #154fb8;
    --ink: #1e2537;
    --muted: #7c8aa0;
    --green: #34c759;
    --red: #e0435c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(120% 90% at 50% -10%, #eaf2ff 0%, #e3edfd 45%, #d7e6fb 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.auth-main {
    padding: 48px 16px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 0 auto;
}

.bg-blob {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}
.bg-blob.one { top: -120px; left: -100px; background: #cfe0ff; opacity: .6; }
.bg-blob.two { top: 10%; right: -140px; background: #cdeaff; opacity: .5; }

.stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    min-width: 0;
    margin: 0 auto;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 26px;
}
.brand-row a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 16px;
}
.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(160deg, var(--violet-500), var(--violet-700));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px -6px rgba(42, 122, 254, 0.55);
    flex-shrink: 0;
}

.card {
    position: relative;
    background: linear-gradient(180deg, #fbfaff 0%, #f4f1ff 100%);
    border-radius: 28px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.8) inset,
        0 30px 60px -20px rgba(21, 79, 184, 0.35),
        0 10px 30px -15px rgba(21, 79, 184, 0.25);
    padding: 34px 30px;
}

.card-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 6px;
    text-align: center;
}
.card-subtitle {
    font-size: 13.5px;
    color: var(--muted);
    text-align: center;
    margin: 0 0 26px;
    line-height: 1.5;
}

.status-banner {
    background: #eafaef;
    color: #1f9d4a;
    border: 1px solid #c9f0d4;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.field { margin-bottom: 18px; }
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    width: 100%;
    font: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background: #ffffff;
    border: 1.5px solid var(--violet-100);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--violet-500);
    box-shadow: 0 0 0 4px var(--violet-100);
}
input[readonly] {
    background: var(--violet-50);
    color: var(--muted);
    cursor: not-allowed;
}

/* Chrome/Safari paint their own autofill background over the input,
   hiding the icon set via background-image. Neutralizing their internal
   transition keeps our own background (color + icon) visible instead. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
    transition: background-color 600000s ease-in-out 0s, color 600000s ease-in-out 0s;
}
input:autofill {
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
}
input.has-error, select.has-error {
    border-color: var(--red);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%238b87a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.field-error {
    color: var(--red);
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 6px;
}

.forgot-row {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 18px;
}
.field-hint {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--violet-600);
    text-decoration: none;
}
.field-hint:hover { color: var(--violet-700); }

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--muted);
}
.remember-row input { width: 15px; height: 15px; accent-color: var(--violet-600); }

.btn-submit {
    width: 100%;
    background: linear-gradient(160deg, var(--violet-500), var(--violet-700));
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 16px 30px -14px rgba(42, 122, 254, 0.65);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-submit:hover { transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-footer {
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 22px;
}
.form-footer a {
    color: var(--violet-600);
    font-weight: 700;
    text-decoration: none;
}
.form-footer a:hover { color: var(--violet-700); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}
.back-link:hover { color: var(--ink); }

/* ---------- Split (signup) layout ---------- */
.stage-split {
    max-width: 1040px;
}

.card-split {
    position: relative;
    display: grid;
    grid-template-columns: 42% 1fr;
    padding: 0;
    overflow: hidden;
    min-height: 620px;
}

.split-bg-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
}

.split-logo-link {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 46%;
    height: 100px;
}

.card-split-art {
    position: relative;
    z-index: 1;
    padding: 80px 28px 0 44px;
}
.split-heading {
    font-size: 27px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 12px;
}
.split-subtitle {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
    max-width: 260px;
}

.card-split-form {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 860px) {
    .card-split { grid-template-columns: 1fr; }
    .split-bg-img { position: static; width: 100%; height: 130px; object-position: left top; }
    .split-logo-link { display: none; }
    .card-split-art { padding: 22px 24px 6px; }
    .split-subtitle { max-width: none; }
    .card-split-form { padding: 28px 22px 36px; }
}

/* Split layout with an aside (signup): signup-background-art.png covers
   the whole page (its microphone sits bottom-left), the offer sits
   straight on it, and only the form is a block of its own - at its usual
   size: 604px wide (58% of the plain split card), same padding. */
/* signup-background-plain.png is signup-background-art.png without its
   microphone; the mic (signup-mic.png) is drawn on its own at a fixed size
   so it doesn't grow with the page. */
.auth-main--art {
    background: url('../images/signup-background-plain.png') left bottom / cover no-repeat;
}
.split-aside-mic {
    display: block;
    width: 170px;
    height: auto;
    margin-top: 40px;
    pointer-events: none;
}
@media (max-width: 1100px) {
    .split-aside-mic { width: 120px; margin-top: 24px; }
}
.stage-split--aside { max-width: 1300px; }
.card-split--aside {
    grid-template-columns: minmax(0, 1fr) 604px;
    gap: 40px;
    min-height: 0;
    overflow: visible;
    background: none;
    border-radius: 0;
    box-shadow: none;
}
/* Near the top, level with the start of the form - not centred on its height. */
.card-split--aside .card-split-art { align-self: start; padding: 56px 0 0 20px; }
.card-split--aside .card-split-form {
    border-radius: 22px;
    box-shadow: 0 24px 50px -30px rgba(21, 79, 184, 0.35);
}

.split-aside-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--violet-100);
    color: var(--violet-600);
    font-size: 15px;
    font-weight: 700;
}
.split-aside-title {
    margin: 22px 0 18px;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.5px;
    color: var(--ink);
}
.split-aside-title span { color: var(--violet-500); }
.split-aside-text {
    margin: 0 0 24px;
    max-width: 480px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--muted);
}
.split-aside-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}
.split-aside-points li { display: inline-flex; align-items: center; gap: 10px; }
.split-aside-points svg {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 8px;
    border-radius: 999px;
    background: var(--violet-100);
    color: var(--violet-600);
}

/* Too narrow for both side by side: the offer above, the form below. */
@media (max-width: 1100px) {
    .stage-split--aside { max-width: 700px; }
    .card-split--aside { grid-template-columns: 1fr; gap: 28px; }
    .card-split--aside .card-split-art { padding: 0 8px; }
    .split-aside-title { font-size: 34px; }
    .split-aside-text { font-size: 15.5px; max-width: none; }
}
@media (max-width: 560px) {
    .card-split--aside .card-split-art { padding: 0 4px; }
    .split-aside-title { font-size: 30px; }
}

/* ---------- Banner layout (forgot/reset password) ---------- */
.stage-banner {
    max-width: 1360px;
}

.banner-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 600px;
    border-radius: 28px;
    overflow: hidden;
    padding: 0 64px;
}

.banner-bg-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-text {
    position: relative;
    z-index: 1;
    max-width: 380px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 64px;
}
.banner-text .split-heading { font-size: 34px; }
.banner-text .split-heading span { color: var(--violet-600); }
.banner-text .split-subtitle { max-width: 320px; font-size: 15px; }

.banner-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 24px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.8) inset,
        0 30px 60px -20px rgba(21, 79, 184, 0.35),
        0 10px 30px -15px rgba(21, 79, 184, 0.25);
    padding: 36px 40px;
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
}
.banner-card .card-title,
.banner-card .card-subtitle { text-align: left; margin-left: 0; }

@media (max-width: 900px) {
    .banner-shell {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        min-height: 0;
        padding: 0;
    }
    .banner-bg-img { position: static; width: 100%; height: 180px; object-position: left center; }
    .banner-text { max-width: none; padding: 24px 24px 0; margin-top: 0; }
    .banner-text .split-subtitle { max-width: none; }
    .banner-card { max-width: none; margin: 20px 16px 24px; width: auto; }
}

/* Field icons (signup/login/forgot-password forms only, scoped to avoid affecting other auth pages) */
.card-split-form .field { margin-bottom: 16px; }
.card-split-form input[type="text"],
.card-split-form input[type="email"],
.card-split-form input[type="tel"],
.card-split-form input[type="password"],
.banner-card input[type="text"],
.banner-card input[type="email"],
.banner-card input[type="tel"],
.banner-card input[type="password"] {
    padding-left: 40px;
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px 16px;
}
.card-split-form select {
    padding-left: 40px;
    background-repeat: no-repeat, no-repeat;
    background-position: 14px center, right 14px center;
    background-size: 16px 16px, 16px 16px;
}
.card-split-form #name {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='4' stroke='%237c8aa0' stroke-width='2'/%3E%3Cpath d='M4 20c0-4 3.5-6 8-6s8 2 8 6' stroke='%237c8aa0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.card-split-form #email,
.banner-card #email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='%237c8aa0' stroke-width='2'/%3E%3Cpath d='M4 7l8 6 8-6' stroke='%237c8aa0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.card-split-form #mobile {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.5 3h3l1.5 4-2 1.5a12 12 0 0 0 6.5 6.5l1.5-2 4 1.5v3a2 2 0 0 1-2.2 2A18 18 0 0 1 4.5 5.2 2 2 0 0 1 6.5 3z' stroke='%237c8aa0' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.card-split-form #target_language {
    padding-left: 14px;
}
.card-split-form #mother_tongue,
.card-split-form #national_language {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%237c8aa0' stroke-width='2'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.5 6 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-6-3.5-9s1-6.5 3.5-9z' stroke='%237c8aa0' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%238b87a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.card-split-form #password,
.card-split-form #password_confirmation {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5' y='11' width='14' height='9' rx='2' stroke='%237c8aa0' stroke-width='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' stroke='%237c8aa0' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M2 12s3.5-6.5 10-6.5S22 12 22 12s-3.5 6.5-10 6.5S2 12 2 12z' stroke='%237c8aa0' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='3' stroke='%237c8aa0' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 14px center, right 14px center;
    background-size: 16px 16px, 16px 16px;
    padding-right: 40px;
}

/* Verify email: the countdown shown until "Resend" becomes available. */
.resend-countdown {
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    background: var(--violet-50, #f3f0ff);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0;
}
.resend-countdown strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.resend-countdown[hidden], #resend-verification-form[hidden] { display: none; }

/* NL logo in the brand row (replaces the old mic mark). */
.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    object-fit: contain;
    flex-shrink: 0;
}
.status-banner--warning {
    background: #fff7e6;
    color: #b45309;
    border-color: #fde2b3;
}

/* Secondary "Log out" action - outlined, so it doesn't compete with the
   primary button or blend into the tinted boxes above it. */
.btn-logout {
    width: 100%;
    background: #fff;
    color: var(--ink);
    border: 1.5px solid #d6deeb;
    border-radius: 14px;
    padding: 12.5px 14px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn-logout:hover {
    border-color: #f3b4b4;
    background: #fff5f5;
    color: #dc2626;
}
