/* =========================================================================
   LastCo — main.css
   Shared design tokens, resets, typography & atmosphere.
   Loaded across the app; login-specific layout lives in login.css.
   ========================================================================= */

/* Distinctive type pairing — characterful display + clean geometric body.
   Bricolage Grotesque has personality; Hanken Grotesk keeps the body crisp. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* --- Core palette: deep space-blue with electric accent --- */
    --ink-900: #05070f;
    --ink-850: #080b16;
    --ink-800: #0b0f1d;
    --ink-700: #11172a;
    --ink-600: #1a2236;

    --brand-950: #071233;
    --brand-900: #0a1f55;
    --brand-700: #1b3aa0;
    --brand-500: #2563eb;
    --brand-400: #3b82f6;
    --brand-300: #60a5fa;
    --brand-200: #93c5fd;

    --cyan-400: #38bdf8;
    --glow:      #4f8bff;

    /* --- Text --- */
    --text-hi:  #f4f7ff;
    --text-mid: #aeb9d4;
    --text-low: #6b7796;

    /* --- Surfaces & lines --- */
    --surface:        rgba(255, 255, 255, 0.03);
    --surface-hover:  rgba(255, 255, 255, 0.06);
    --hairline:       rgba(255, 255, 255, 0.10);
    --hairline-soft:  rgba(255, 255, 255, 0.06);

    /* --- Type scale --- */
    --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
    --font-body:    'Hanken Grotesk', system-ui, sans-serif;

    /* --- Motion --- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Radii & shadow --- */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --shadow-lift: 0 18px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 0 1px rgba(79, 139, 255, 0.25), 0 12px 40px -10px rgba(37, 99, 235, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-hi);
    background-color: var(--ink-900);
    line-height: 1.55;
    font-feature-settings: 'ss01', 'cv01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

a {
    color: var(--brand-300);
    text-decoration: none;
}

/* --- Lightweight toast (used by script.js for auth feedback) --- */
.lc-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 120%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    max-width: min(90vw, 420px);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-hi);
    background: rgba(17, 23, 42, 0.92);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lift);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease);
}

.lc-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.lc-toast::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-400);
    box-shadow: 0 0 12px var(--glow);
    flex: none;
}

.lc-toast.is-error::before {
    background: #ff6b6b;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
/* =========================================================================
   LastCo — login.css
   Split-screen sign-in: brand panel (left) + auth panel (right).
   Shares the light / pastel-aurora theme used by the onboarding screen
   (begin.css): soft white surfaces, indigo + pink + green accents.
   Fonts come from main.css; this screen defines its own light palette.
   ========================================================================= */

.auth-page {
    /* light theme — override the dark globals from main.css */
    --bg:          #f6f7fc;
    --card:        rgba(255, 255, 255, 0.74);
    --card-line:   rgba(23, 28, 56, 0.08);
    --ink:         #131629;
    --ink-soft:    #5b6178;
    --indigo:      #5b5bf0;
    --indigo-700:  #4848e0;
    --green:       #18c08a;
    --pink:        #e83e8c;

    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0px, 4vw, 56px);
    overflow: hidden;
    color: var(--ink);
    background: var(--bg);
}

/* Pastel aurora blobs — lavender (top-left), cyan + pink (bottom-right) */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.85;
}

.auth-page::before {
    width: 46vmax;
    height: 46vmax;
    top: -16vmax;
    left: -14vmax;
    background: radial-gradient(circle at 40% 40%, #c9c9ff 0%, rgba(201, 201, 255, 0) 70%);
}

.auth-page::after {
    width: 48vmax;
    height: 48vmax;
    right: -18vmax;
    bottom: -20vmax;
    background:
        radial-gradient(circle at 60% 40%, #b8ecff 0%, rgba(184, 236, 255, 0) 68%),
        radial-gradient(circle at 20% 80%, #ffd0e4 0%, rgba(255, 208, 228, 0) 70%);
}

/* ---------- Shell ---------- */
.applogin-container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    width: min(1080px, 100%);
    min-height: min(640px, 92vh);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 90px -40px rgba(23, 28, 56, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: lc-shell-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lc-shell-in {
    from { opacity: 0; transform: translateY(18px) scale(0.99); }
    to   { opacity: 1; transform: none; }
}

@keyframes lc-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ========================================================================
   LEFT — Brand panel (tinted indigo wash to set it apart from the white side)
   ======================================================================== */
.applogin-blue-container {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    padding: clamp(32px, 4vw, 56px);
    overflow: hidden;
    background: linear-gradient(158deg, #eef0ff 0%, #e4e9ff 52%, #e9f5ff 100%);
}

/* soft brand glows for depth */
.applogin-blue-container::before {
    content: '';
    position: absolute;
    inset: -20%;
    z-index: -1;
    background:
        radial-gradient(34% 34% at 22% 24%, rgba(91, 91, 240, 0.22), transparent 70%),
        radial-gradient(38% 38% at 82% 84%, rgba(24, 192, 138, 0.16), transparent 72%),
        radial-gradient(40% 40% at 78% 12%, rgba(232, 62, 140, 0.12), transparent 72%);
}

.applogin-blue-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 6vh, 64px);
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

/* Logo lockup */
.applogin-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: lc-rise 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.applogin-logo {
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 10px 22px rgba(91, 91, 240, 0.3));
}

.applogin-wordmark {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.applogin-wordmark-accent { color: var(--indigo); }

/* Headline block */
.applogin-welcome-text {
    max-width: none;
    width: 100%;
}

.applogin-welcome-heading {
    font-family: var(--font-display);
    color: var(--ink);
}

.applogin-slogan {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    animation: lc-rise 0.85s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.applogin-slogan .slogan-line {
    display: block;
    white-space: nowrap;
}

/* the "+" and "=" operators in brand indigo */
.applogin-slogan .slogan-op {
    display: inline-block;
    color: var(--indigo);
    font-weight: 800;
    margin-right: 2px;
}

/* payoff line — indigo → pink gradient, echoing the onboarding accents */
.applogin-slogan .slogan-accent {
    background: linear-gradient(100deg, var(--indigo) 0%, #7b5bf0 45%, var(--pink) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.applogin-welcome-description {
    margin-top: 20px;
    width: 100%;
    font-size: clamp(1.02rem, 1.35vw, 1.18rem);
    line-height: 1.6;
    color: var(--ink-soft);
    animation: lc-rise 0.85s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ========================================================================
   RIGHT — Sign-in panel (clean white)
   ======================================================================== */
.applogin-auth-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(32px, 4vw, 60px);
    background: rgba(255, 255, 255, 0.78);
}

.applogin-auth-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lc-rise 0.85s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.applogin-auth-emblem {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    filter: drop-shadow(0 10px 24px rgba(91, 91, 240, 0.3));
}

.applogin-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.applogin-subtitle {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 1rem;
}

/* ---------- Sign-in buttons ---------- */
.applogin-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 30px;
}

/* Shared geometry — both 280x44 to align with the GIS widget below.
   Per brand guidelines: native system type, official logo, fixed labels. */
.applogin-apple-btn,
.applogin-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 280px;
    height: 44px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease,
                background-color 0.2s ease, border-color 0.2s ease;
}

/* Official logo marks from SVG assets (not recolored) */
.applogin-apple-btn::before,
.applogin-google-btn::before {
    content: '';
    flex: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* --- Apple: black button, white Apple mark, SF system font (Apple HIG) --- */
.applogin-apple-btn {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}

.applogin-apple-btn::before {
    width: 16px;
    height: 20px;
    background-image: url('img/apple-logo.svg');
    transform: translateY(-1px);
}

.applogin-apple-btn::after { content: 'Sign in with Apple'; }

.applogin-apple-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
}

.applogin-apple-btn:active { transform: translateY(0); }

/* --- Google: light "outline" theme, official 4-color G, Roboto (Google brand) --- */
.applogin-google-wrapper {
    border-radius: 10px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.applogin-google-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -14px rgba(91, 91, 240, 0.4);
}

.applogin-google-btn {
    width: 100%;
    height: 100%;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    font-family: 'Roboto', 'Google Sans', system-ui, sans-serif;
}

.applogin-google-btn::before {
    width: 18px;
    height: 18px;
    background-image: url('img/google-g.svg');
}

.applogin-google-btn::after { content: 'Sign in with Google'; }

/* Legal footer */
.applogin-legal {
    margin-top: 22px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 30ch;
}

.applogin-legal a {
    color: var(--indigo);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.applogin-legal a:hover { color: var(--indigo-700); }

/* ========================================================================
   Responsive — collapse to a single stacked column
   ======================================================================== */
@media (max-width: 860px) {
    .auth-page { padding: 0; }

    .applogin-container {
        grid-template-columns: 1fr;
        min-height: 100dvh;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .applogin-blue-container {
        min-height: 40vh;
        align-items: center;
        text-align: center;
    }

    .applogin-blue-content {
        align-items: center;
        justify-content: center;
        gap: 24px;
    }

    .applogin-logo-container { justify-content: center; }

    .applogin-slogan .slogan-line { white-space: normal; }
}

@media (max-width: 360px) {
    .applogin-apple-btn,
    .applogin-google-wrapper { width: 100% !important; }
    .applogin-google-wrapper { max-width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
    .applogin-container,
    .applogin-logo-container,
    .applogin-slogan,
    .applogin-welcome-description,
    .applogin-auth-card { animation: none; }
}
/* =========================================================================
   LastCo — begin.css
   "How would you like to begin?" onboarding (shown post-login when the
   user has no companies yet). Light, airy theme with soft pastel auroras.
   Mobile-first (matches the app mock); expands to a 2-up layout on web.
   Tokens for fonts come from main.css; this screen defines its own palette.
   ========================================================================= */

.begin-page {
    /* light theme — override the dark globals from main.css */
    --bg:          #f6f7fc;
    --card:        rgba(255, 255, 255, 0.72);
    --card-line:   rgba(23, 28, 56, 0.07);
    --ink:         #131629;
    --ink-soft:    #5b6178;
    --indigo:      #5b5bf0;
    --indigo-700:  #4848e0;
    --green:       #18c08a;
    --green-700:   #12a877;
    --pink:        #e83e8c;

    color: var(--ink);
    background: var(--bg);
}

.begin-stage {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 64px) clamp(18px, 4vw, 48px);
    overflow: hidden;
}

/* Pastel aurora blobs — lavender (top-left), cyan (bottom-right), pink (bottom-left) */
.begin-stage::before,
.begin-stage::after {
    content: '';
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.85;
}

.begin-stage::before {
    width: 46vmax;
    height: 46vmax;
    top: -16vmax;
    left: -14vmax;
    background: radial-gradient(circle at 40% 40%, #c9c9ff 0%, rgba(201, 201, 255, 0) 70%);
}

.begin-stage::after {
    width: 48vmax;
    height: 48vmax;
    right: -18vmax;
    bottom: -20vmax;
    background:
        radial-gradient(circle at 60% 40%, #b8ecff 0%, rgba(184, 236, 255, 0) 68%),
        radial-gradient(circle at 20% 80%, #ffd0e4 0%, rgba(255, 208, 228, 0) 70%);
}

/* ---------- Shell ---------- */
.begin-shell {
    position: relative;
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: begin-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes begin-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Brand ---------- */
.begin-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.begin-logo {
    width: clamp(64px, 9vw, 84px);
    height: clamp(64px, 9vw, 84px);
    filter: drop-shadow(0 12px 26px rgba(91, 91, 240, 0.28));
}

.begin-wordmark {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.begin-wordmark-accent { color: var(--indigo); }

/* ---------- Social-proof banner ---------- */
.begin-banner {
    width: 100%;
    max-width: 560px;
    padding: 16px 22px;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px -16px rgba(23, 28, 56, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.begin-banner strong {
    color: var(--pink);
    font-weight: 700;
}

/* ---------- Heading ---------- */
.begin-heading {
    margin: clamp(40px, 7vw, 72px) 0 clamp(26px, 4vw, 40px);
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.6vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
}

/* ---------- Option cards ---------- */
.begin-options {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(20px, 3vw, 28px);
}

.begin-option {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: clamp(22px, 3vw, 28px);
    text-align: left;
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: 22px;
    box-shadow: 0 18px 50px -28px rgba(23, 28, 56, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s ease;
}

.begin-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px -26px rgba(23, 28, 56, 0.4);
}

.begin-option-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.begin-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6),
                0 8px 20px -8px rgba(23, 28, 56, 0.25);
}

.begin-icon svg { width: 30px; height: 30px; }

.begin-icon--new {
    color: var(--indigo);
    background: radial-gradient(circle at 35% 30%, #eef0ff, #dfe2ff);
}

.begin-option-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.begin-option-text p {
    margin-top: 4px;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.45;
    color: var(--ink-soft);
}

/* ---------- Buttons ---------- */
.begin-btn {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 17px 20px;
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.8vw, 1.18rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s ease, filter 0.2s ease;
}

.begin-btn--new {
    background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-700) 100%);
    box-shadow: 0 16px 34px -14px rgba(91, 91, 240, 0.7);
}

.begin-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.begin-btn:active { transform: translateY(0); }

/* ---------- Footer ---------- */
.begin-footer {
    margin-top: clamp(30px, 5vw, 44px);
    font-size: 1rem;
    color: var(--ink);
}

.begin-footer a {
    color: var(--indigo);
    font-weight: 700;
    text-decoration: none;
}

.begin-footer a:hover { text-decoration: underline; }

/* ========================================================================
   Web layout — two cards side by side once there's room
   ======================================================================== */
@media (min-width: 720px) {
    .begin-options {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .begin-option { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .begin-shell { animation: none; }
}
/* =========================================================================
   LastCo — company.css
   Onboarding flows: "Create a New Company" (3-step wizard) and
   "Grow My Business" (single form). Shares the light / pastel-aurora theme
   used across auth & begin screens. Fonts come from main.css.
   ========================================================================= */

.co-page {
    --bg:          #f6f7fc;
    --card:        #ffffff;
    --field:       #ffffff;
    --line:        rgba(23, 28, 56, 0.10);
    --ink:         #131629;
    --ink-soft:    #5b6178;
    --ink-faint:   #9aa0b4;
    --indigo:      #5b5bf0;
    --indigo-700:  #4848e0;
    --indigo-tint: #eef0ff;
    --green:       #18c08a;
    --pink:        #e83e8c;

    color: var(--ink);
    background: var(--bg);
}

.co-stage {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0px, 4vw, 48px);
    overflow: hidden;
}

/* Pastel aurora blobs */
.co-stage::before,
.co-stage::after {
    content: '';
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.8;
}

.co-stage::before {
    width: 44vmax;
    height: 44vmax;
    top: -16vmax;
    left: -14vmax;
    background: radial-gradient(circle at 40% 40%, #c9c9ff 0%, rgba(201, 201, 255, 0) 70%);
}

.co-stage::after {
    width: 46vmax;
    height: 46vmax;
    right: -18vmax;
    bottom: -18vmax;
    background:
        radial-gradient(circle at 60% 40%, #b8ecff 0%, rgba(184, 236, 255, 0) 68%),
        radial-gradient(circle at 20% 80%, #ffd0e4 0%, rgba(255, 208, 228, 0) 70%);
}

/* ---------- Card ---------- */
.co-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: min(900px, 96dvh);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 40px 90px -42px rgba(23, 28, 56, 0.5);
    overflow: hidden;
    animation: co-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes co-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* On phones the card becomes the full screen */
@media (max-width: 600px) {
    .co-stage { padding: 0; }
    .co-card {
        width: 100%;
        max-height: none;
        min-height: 100dvh;
        border: none;
        border-radius: 0;
    }
}

/* ---------- Header ---------- */
.co-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px) 6px;
    flex: none;
}

.co-back {
    position: absolute;
    left: clamp(18px, 3vw, 28px);
    top: 50%;
    transform: translateY(-40%);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 16px -8px rgba(23, 28, 56, 0.4);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.co-back:hover { transform: translateY(-40%) scale(1.06); }
.co-back svg { width: 20px; height: 20px; }

.co-brand {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.co-brand-accent { color: var(--indigo); }

/* ---------- Body (scrolls if content is tall) ---------- */
.co-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: clamp(14px, 2.4vw, 22px) clamp(22px, 4vw, 40px) 8px;
}

.co-title {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-align: center;
    color: var(--ink);
}

.co-title--center { margin-bottom: 6px; }

.co-sub {
    margin-top: 6px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* ---------- Wizard steps ---------- */
.co-step { display: none; }

.co-step.is-active {
    display: block;
    animation: co-step-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes co-step-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Multi-select chips (step 1) ---------- */
.co-chips {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}

.co-chip {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 54px 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--ink);
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 20px -16px rgba(23, 28, 56, 0.4);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease,
                color 0.18s ease, transform 0.18s ease;
}

.co-chip:hover { transform: translateY(-1px); border-color: #c7c9f5; }

/* checkbox indicator on the right */
.co-chip::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: transparent;
    transition: all 0.18s ease;
}

.co-chip.is-selected {
    color: var(--indigo);
    background: var(--indigo-tint);
    border-color: var(--indigo);
}

.co-chip.is-selected::after {
    border-color: var(--indigo);
    background: var(--indigo)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
        center / 15px no-repeat;
}

/* ---------- Single-select cards (step 2) ---------- */
.co-selects {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}

.co-select {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 54px 16px 20px;
    text-align: left;
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 20px -16px rgba(23, 28, 56, 0.4);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.co-select:hover { transform: translateY(-1px); border-color: #c7c9f5; }

.co-select-text { display: block; }

.co-select-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.co-select-desc {
    display: block;
    margin-top: 3px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--ink-soft);
}

.co-select::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    transition: all 0.18s ease;
}

.co-select.is-selected {
    background: var(--indigo-tint);
    border-color: var(--indigo);
}

.co-select.is-selected .co-select-title { color: var(--indigo); }

.co-select.is-selected::after {
    border-color: var(--indigo);
    background: var(--indigo)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
        center / 15px no-repeat;
}

/* ---------- Fields / inputs ---------- */
.co-field {
    display: block;
    margin-top: 24px;
}

.co-label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
}

.co-label-soft { color: var(--ink-faint); font-weight: 500; }

.co-input {
    width: 100%;
    padding: 16px 18px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 22px -18px rgba(23, 28, 56, 0.45);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.co-input::placeholder { color: var(--ink-faint); }

.co-input:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(91, 91, 240, 0.14);
}

/* Select with custom caret */
.co-select-wrap { position: relative; }

.co-input--select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 48px;
    font-weight: 600;
    cursor: pointer;
}

.co-select-caret {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--ink-soft);
    pointer-events: none;
}

/* ---------- Textarea (step 3) ---------- */
.co-textarea {
    width: 100%;
    min-height: 160px;
    margin-top: 22px;
    padding: 18px;
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--ink);
    resize: vertical;
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 26px -18px rgba(23, 28, 56, 0.45);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.co-textarea::placeholder { color: var(--ink-faint); }

.co-textarea:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(91, 91, 240, 0.14);
}

/* OR divider */
.co-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--ink-faint);
    font-size: 0.85rem;
    font-weight: 600;
}

.co-or::before,
.co-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Surprise me (outline) */
.co-surprise {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 18px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--indigo);
    background: #fff;
    border: 1.5px solid var(--indigo);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.co-surprise:hover { background: var(--indigo-tint); transform: translateY(-1px); }
.co-surprise svg { width: 20px; height: 20px; }

.co-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ---------- Footer / CTA ---------- */
.co-foot {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 16px clamp(22px, 4vw, 40px) clamp(22px, 4vw, 34px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 40%);
}

.co-cta {
    width: 100%;
    padding: 17px 20px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-700) 100%);
    border-radius: 16px;
    box-shadow: 0 16px 34px -14px rgba(91, 91, 240, 0.7);
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.co-cta:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); }
.co-cta:active:not(:disabled) { transform: translateY(0); }

.co-cta:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    filter: saturate(0.85);
}

/* Progress dots */
.co-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

.co-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d4d7e6;
    transition: all 0.25s ease;
}

.co-dot.is-on {
    width: 26px;
    border-radius: 5px;
    background: var(--indigo);
}

@media (prefers-reduced-motion: reduce) {
    .co-card,
    .co-step.is-active { animation: none; }
}

/* =========================================================================
   Company onboarding — full-screen "creating your company" loader
   (shown while Gemini proposes the name/tagline and the company is saved)
   ========================================================================= */
.co-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(246, 247, 252, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.co-loader.is-visible { opacity: 1; visibility: visible; }

.co-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.co-loader-orb {
    position: relative;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.co-loader-orb::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #5b5bf0, #8b5cf6, #38bdf8, #5b5bf0);
    -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%);
            mask: radial-gradient(circle, transparent 58%, #000 59%);
    animation: co-spin 1.1s linear infinite;
}
.co-loader-orb::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 12px 30px -10px rgba(91, 91, 240, 0.5);
}
.co-loader-orb img {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    animation: co-orb-pulse 1.6s ease-in-out infinite;
}
.co-loader-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink, #131629);
}
.co-loader-msg {
    font-size: 0.98rem;
    color: var(--ink-soft, #5b6178);
    min-height: 1.4em;
}
.co-loader-msg.is-in { animation: co-msg-in 0.4s ease both; }

@keyframes co-spin { to { transform: rotate(360deg); } }
@keyframes co-orb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes co-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .co-loader-orb::before,
    .co-loader-orb img { animation: none; }
}
