/* Invoice Candy sign-up page (SignUp/Index.cshtml: a standalone page, no marketing layout). tokens, .ic-btn and .ic-logo come from ic-site.css.
   jquery.validate appends label.error into the field and adds .errorRed to the input; ViewBag.Message arrives as #divMessage with inline styles */

/* periwinkle theme, like pricing */
:root { --ic-accent: #4C55C9; --ic-hero: #EEF0FF; }

html, body { height: 100%; }
body { margin: 0; background: #fff; color: var(--ic-body); font-family: var(--ic-text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.ic-auth, .ic-auth *, .ic-auth *::before, .ic-auth *::after { box-sizing: border-box; }
.ic-auth img { display: block; max-width: 100%; }
.ic-auth h1, .ic-auth p { margin: 0; }
.ic-auth :focus-visible { outline: 3px solid var(--ic-accent); outline-offset: 3px; border-radius: 6px; }

.ic-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100%; }

/* left: the form */
.ic-auth-main { display: flex; flex-direction: column; padding: 32px clamp(24px, 5vw, 72px) 28px; background: var(--ic-hero); }
.ic-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 420px; margin: 0 auto; } /* the logo lines up with the form */
.ic-auth .ic-alt { margin: 0; color: var(--ic-body); font-size: .95rem; line-height: 1.3; text-align: right; white-space: nowrap; }
.ic-auth-form-wrap { display: flex; flex: 1; flex-direction: column; justify-content: center; width: 100%; max-width: 420px; margin: 48px auto; }
.ic-auth h1 { max-width: 10ch; color: var(--ic-ink); font-family: var(--ic-display); font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 800; line-height: .95; letter-spacing: -.03em; }

/* where they came from: a generator draft, or a plan on the pricing page */
.ic-context { display: flex; align-items: center; gap: 14px; margin: 24px 0 0; padding: 12px 16px 12px 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(76, 85, 201, .18); }
.ic-context-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--ic-hero); color: var(--ic-accent); }
.ic-auth .ic-context p { color: var(--ic-ink); font-size: .98rem; line-height: 1.4; }

/* Google, then the email form */
.ic-google { min-height: 44px; margin-top: 32px; }
.ic-or { display: flex; align-items: center; gap: 14px; margin-top: 22px; color: var(--ic-muted); font-size: .9rem; line-height: 1; }
.ic-or::before, .ic-or::after { content: ""; flex: 1; height: 1px; background: rgba(0, 11, 15, .14); }

.ic-signup-form { position: relative; display: grid; gap: 18px; margin: 22px 0 0; }
#divTurnstile { position: absolute; left: 0; right: 0; } /* invisible while Cloudflare decides quietly (interaction-only): kept out of the grid's gaps */
#divTurnstile.is-interactive { position: static; } /* turnstileInteractive: it wants a click */
.ic-field { display: grid; gap: 8px; }
.ic-field > label { color: var(--ic-ink); font-family: var(--ic-display); font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.ic-field input { width: 100%; margin: 0; padding: .95rem 1rem; border: 2px solid transparent; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 11, 15, .1); color: var(--ic-ink); font: inherit; font-size: 1.05rem; line-height: 1.3; transition: border-color .15s, box-shadow .15s; }
.ic-field input::placeholder { color: #9AA0A3; }
.ic-field input:focus { outline: none; border-color: var(--ic-accent); box-shadow: 0 0 0 4px rgba(76, 85, 201, .15); }
.ic-field input.errorRed { border-color: #C0392B; }
.ic-field > label.error { display: block; color: #C0392B; font-family: var(--ic-text); font-size: .92rem; font-weight: 500; line-height: 1.35; }
.ic-pw { position: relative; }
.ic-pw input { padding-right: 4.5rem; }
.ic-pw-toggle { position: absolute; right: 8px; top: 50%; translate: 0 -50%; margin: 0; padding: .6rem .7rem .5rem; border: 0; border-radius: 10px; background: transparent; color: var(--ic-accent); font: 600 .9rem/1 var(--ic-display); cursor: pointer; }
.ic-pw-toggle:hover { background: var(--ic-hero); }

.ic-auth #divMessage { margin: 0; padding: 12px 14px !important; border-radius: 12px; background: #FDECEC; color: #A3241A !important; font-size: .95rem; line-height: 1.45; } /* the controller's error, inline-styled */
.ic-auth #divMessage a { color: inherit; font-weight: 600; }

.ic-signup-form .ic-btn { width: 100%; margin-top: 6px; padding: 18px 26px 16px; font-size: 1.1rem; }
.ic-signup-form .ic-btn[disabled], .ic-signup-form .ic-btn[disabled]:hover { background: var(--ic-ink); border-color: var(--ic-ink); opacity: .45; transform: none; cursor: default; } /* until Turnstile passes */
.ic-reassure { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: -4px; color: var(--ic-muted); font-size: .95rem; }
.ic-reassure svg { flex: none; color: var(--ic-accent); }
.ic-alt a, .ic-legal a { color: var(--ic-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--ic-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ic-auth .ic-legal { max-width: 42ch; margin: 0 auto; color: var(--ic-muted); font-size: .88rem; line-height: 1.5; text-align: center; }

/* right: what the free account includes */
.ic-auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(32px, 5vw, 80px); background: var(--ic-ink); color: #C9D1D4; }
.ic-auth-fan { position: relative; height: clamp(300px, 42vh, 420px); margin-bottom: 56px; }
.ic-auth-fan img { position: absolute; top: 50%; left: 50%; width: clamp(150px, 13vw, 210px); height: auto; aspect-ratio: 400 / 517; object-fit: cover; border-radius: 12px; background: #fff; box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .6); }
.ic-auth-fan img:nth-child(1) { transform: translate(-125%, -46%) rotate(-10deg); }
.ic-auth-fan img:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.ic-auth-fan img:nth-child(3) { transform: translate(25%, -46%) rotate(10deg); }
.ic-aside-copy { max-width: 420px; }
.ic-auth .ic-aside-title { color: #fff; font-family: var(--ic-display); font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.ic-perks { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.ic-perks li { position: relative; margin: 0; padding-left: 32px; color: #E4E9EB; font-size: 1.08rem; }
.ic-perks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%; background: var(--ic-lav) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l3 2.9 6-6.4' fill='none' stroke='%23000B0F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.ic-perks b { color: #fff; }
.ic-auth .ic-upgrade { margin-top: 22px; color: #9AA6AA; font-size: .98rem; }
.ic-upgrade a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: var(--ic-lav); text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media screen and (max-width: 900px) {
    .ic-auth { grid-template-columns: minmax(0, 1fr); }
    .ic-auth-form-wrap { margin: 36px auto 24px; }
    .ic-auth-aside { padding: 48px 24px 56px; }
    .ic-auth-fan { display: none; }
}
@media screen and (max-width: 479px) {
    .ic-alt span { display: none; } /* just "Log in" beside the logo */
}

/* short windows (a 1080p laptop at 125-150% scaling shows ~650-750px): tighten so the form fits without scrolling.
   taller screens keep the roomier spacing above */
@media screen and (max-height: 800px) {
    .ic-auth-main { padding-top: 24px; padding-bottom: 20px; }
    .ic-auth-form-wrap { margin: 28px auto 20px; }
    .ic-auth h1 { max-width: none; font-size: 2rem; line-height: 1; } /* one line in the 420px column */
    .ic-context { margin-top: 14px; padding: 0; background: none; box-shadow: none; } /* a note, not a card */
    .ic-context-icon { width: 30px; height: 30px; border-radius: 9px; background: #fff; }
    .ic-google { margin-top: 22px; }
    .ic-or { margin-top: 16px; }
    .ic-signup-form { gap: 14px; margin-top: 16px; }
    .ic-field { gap: 6px; }
    .ic-field input { padding: .72rem 1rem; }
    .ic-signup-form .ic-btn { padding: 15px 26px 13px; }
    .ic-auth-aside { padding-top: 40px; padding-bottom: 40px; }
    .ic-auth-fan { height: clamp(180px, 34vh, 300px); margin-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .ic-auth *, .ic-auth *::before, .ic-auth *::after { transition: none !important; }
}
