/* =====================================================================
   Partner portal: sign in, Become a partner, password pages (public)
   ===================================================================== */
:root {
    /* Design-system colours (same as the website / yr-tokens.css) */
    --a-ink: #04222b; --a-ink2: #3d4a5f; --a-muted: #5d6a80; --a-line: #dde5e7;
    --a-bg: #eef3f4; --a-card: #ffffff; --a-dark: #04222b; --a-primary: #0a6b8c; --a-primary-h: #085670;
    --a-soft: #e3f1f4; --a-ok-bg: #e3f4ea; --a-ok: #1e6b3a; --a-bad-bg: #fbe6e6; --a-bad: #9f2a2a;
    --a-font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    --a-head: "Bricolage Grotesque", "Outfit", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body.yr-auth { background: var(--a-bg); font-family: var(--a-font); color: var(--a-ink); -webkit-font-smoothing: antialiased; }

.yr-auth__wrap { display: grid; grid-template-columns: minmax(320px, 38%) 1fr; min-height: 100vh; }

/* Left brand panel */
.yr-auth__side { background: var(--a-dark); color: #fff; padding: 44px 44px 28px; display: flex; flex-direction: column; }
.yr-auth__brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; color: #fff; text-decoration: none; }
.yr-auth__logo { width: 36px; height: 36px; border-radius: 9px; background: var(--a-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.yr-auth__side h1 { margin: 44px 0 16px; font-family: var(--a-head); font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.yr-auth__lead { margin: 0 0 26px; font-size: 15px; line-height: 1.6; color: #c9d8dc; max-width: 420px; }
.yr-auth__ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 420px; }
.yr-auth__ticks li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; color: #e5eef0; }
.yr-auth__ticks li::before { content: "✓"; flex: 0 0 20px; height: 20px; border-radius: 50%; background: rgba(15, 108, 135, .45); color: #bfe6f1; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.yr-auth__foot { margin-top: auto; padding-top: 28px; font-size: 11px; color: #7f9aa1; }

/* Right side */
.yr-auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.yr-auth__card { width: 100%; max-width: 400px; background: var(--a-card); border: 1px solid var(--a-line); border-radius: 16px; padding: 30px 30px 24px; box-shadow: 0 2px 10px rgba(12, 42, 51, .04); }
.yr-auth__card--wide { max-width: 560px; }
.yr-auth__card h2 { margin: 0 0 4px; font-family: var(--a-head); font-size: 24px; font-weight: 700; }
.yr-auth__sub { margin: 0 0 20px; font-size: 13.5px; color: var(--a-ink2); }

.yr-auth__field { display: block; margin: 0 0 14px; }
.yr-auth__field > span { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--a-ink); }
.yr-auth__field small { font-weight: 400; color: var(--a-muted); }
.yr-auth__field input, .yr-auth__field textarea {
    width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--a-line); border-radius: 10px;
    background: #fff; font: 14px var(--a-font); color: var(--a-ink);
}
.yr-auth__field textarea { height: 86px; padding: 10px 12px; resize: vertical; }
.yr-auth__field input:focus, .yr-auth__field textarea:focus { outline: 2px solid var(--a-primary); outline-offset: 0; border-color: transparent; }
.yr-auth__help { display: block; margin-top: 5px; font-size: 11.5px; color: var(--a-muted); }
.yr-auth__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.yr-auth__grid .yr-auth__wide { grid-column: 1 / -1; }
.yr-auth__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.yr-auth__btn {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; border: 0; border-radius: 999px;
    background: var(--a-primary); color: #fff; font: 600 14.5px var(--a-font); cursor: pointer; text-decoration: none; -webkit-appearance: none; appearance: none;
}
.yr-auth__btn:hover { background: var(--a-primary-h); }
.yr-auth__btn--ghost { background: #fff; color: var(--a-ink); border: 1px solid var(--a-line); margin-top: 10px; }
.yr-auth__btn--ghost:hover { background: #f6f9fa; }
.yr-auth__btn:disabled { opacity: .6; cursor: default; }
.yr-auth__btn:focus-visible, .yr-auth__link:focus-visible { outline: 2px solid var(--a-primary); outline-offset: 2px; }

.yr-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; }
.yr-auth__link { color: var(--a-primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.yr-auth__link--strong { font-weight: 600; }
.yr-auth__check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 12.5px; color: var(--a-ink2); line-height: 1.45; cursor: pointer; }
.yr-auth__check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--a-primary); flex: 0 0 auto; }
.yr-auth__note { margin: 16px 0 0; font-size: 12px; color: var(--a-muted); text-align: center; }

.yr-auth__msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.yr-auth__msg[hidden] { display: none; }
.yr-auth__msg.is-ok { background: var(--a-ok-bg); color: var(--a-ok); }
.yr-auth__msg.is-bad { background: var(--a-bad-bg); color: var(--a-bad); }

/* Partner type cards */
.yr-auth__label { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; }
.yr-auth__types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.yr-auth__type { position: relative; display: block; padding: 11px 12px; border: 1px solid var(--a-line); border-radius: 10px; cursor: pointer; background: #fff; }
.yr-auth__type input { position: absolute; opacity: 0; pointer-events: none; }
.yr-auth__type strong { display: block; font-size: 13px; font-weight: 600; color: var(--a-ink); }
.yr-auth__type span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--a-muted); }
.yr-auth__type:has(input:checked) { border-color: var(--a-primary); background: var(--a-soft); box-shadow: 0 0 0 1px var(--a-primary) inset; }
.yr-auth__type:has(input:focus-visible) { outline: 2px solid var(--a-primary); outline-offset: 2px; }

/* 2FA popup */
.yr-auth__overlay { position: fixed; inset: 0; background: rgba(6, 34, 43, .55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.yr-auth__overlay.is-open { display: flex; }

/* Done state */
.yr-auth__done { text-align: center; padding: 10px 0 4px; }
.yr-auth__done-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--a-ok-bg); color: var(--a-ok); display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* Wide screens: the two panels sit inside a centred, rounded frame (as in the design) */
@media (min-width: 1280px) {
    body.yr-auth { display: flex; align-items: center; justify-content: center; padding: 32px; min-height: 100vh; }
    .yr-auth__wrap { width: 100%; max-width: 1180px; min-height: 0; height: min(760px, calc(100vh - 64px)); border-radius: 26px; overflow: hidden; background: var(--a-bg); box-shadow: 0 24px 60px rgba(4, 34, 43, .12); border: 1px solid var(--a-line); }
    /* Tall forms (sign-up): start at the top and scroll inside the frame; short ones stay centred */
    .yr-auth__main { overflow-y: auto; align-items: flex-start; }
    .yr-auth__main > .yr-auth__card { margin-top: auto; margin-bottom: auto; }
    /* Thin scrollbar in the theme colours (Firefox + Chrome/Safari/Edge) */
    .yr-auth__main { scrollbar-width: thin; scrollbar-color: #b9cbd0 transparent; }
    .yr-auth__main::-webkit-scrollbar { width: 8px; }
    .yr-auth__main::-webkit-scrollbar-track { background: transparent; }
    .yr-auth__main::-webkit-scrollbar-thumb { background: #b9cbd0; border-radius: 999px; border: 2px solid var(--a-bg); }
    .yr-auth__main::-webkit-scrollbar-thumb:hover { background: var(--a-primary); }
    .yr-auth__main::-webkit-scrollbar-button { display: none; height: 0; }
}
/* Failed sign-in: fields marked */
.yr-auth__field input.is-error, .yr-auth__field textarea.is-error { border-color: var(--a-bad); background: #fffafa; }
.yr-auth__msg.is-bad { border: 1px solid #f0c9c9; font-weight: 500; }

@media (max-width: 900px) {
    .yr-auth__wrap { grid-template-columns: 1fr; }
    .yr-auth__side { padding: 28px 22px; }
    .yr-auth__side h1 { margin: 22px 0 10px; font-size: 30px; }
    .yr-auth__ticks, .yr-auth__foot { display: none; }
    .yr-auth__main { padding: 24px 14px 40px; align-items: flex-start; }
}
@media (max-width: 520px) {
    .yr-auth__grid, .yr-auth__types { grid-template-columns: 1fr; }
    .yr-auth__card { padding: 24px 18px 20px; }
}
