/* =============================================================================
   auth.css — vibeedi sign-in / sign-up

   Split-screen pattern (canonical SaaS best practice): a navy "blueprint" brand
   panel on the left carries identity + trust; a clean white panel on the right
   holds the focused action: the work-email + password form. Loaded only on the
   auth routes, so the rules below are scoped to those pages even where
   selectors look global.
   ============================================================================= */

.ve-auth {
    --ve-ink:        #0B1E3D;
    --ve-ink-2:      #102A52;
    --ve-blue:       #1E4FA0;
    --ve-blue-bright:#3D7BE0;
    --ve-paper:      #EEF1F6;
    --ve-amber:      #E8A23D;
    --ve-line:       #C9D3E4;
    --ve-muted:      #5A6B85;
    --ve-muted-dk:   #9DB0CE;
    --ve-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --ve-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

/* Distraction-free: drop the global black nav + footer on auth pages so the
   split-screen fills the viewport. Scoped — auth.css only loads here. */
nav.ds-global-nav { display: none !important; }
footer.ds-footer, .footer { display: none !important; }
.container.mt-4 { max-width: none; padding: 0; margin-top: 0 !important; }
.container.mt-4 > .flash-messages { max-width: 460px; margin: 14px auto 0; padding: 0 20px; }

/* --- Split shell ----------------------------------------------------------- */
.ve-auth {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ve-ink);
}

/* --- Left: brand panel ----------------------------------------------------- */
.ve-auth-brand {
    background: var(--ve-ink);
    color: #E8EEF7;
    padding: clamp(40px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
/* faint segment grid in the background — EDI delimiter motif */
.ve-auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--ve-ink-2) 1px, transparent 1px);
    background-size: 100% 38px;
    opacity: .35;
    pointer-events: none;
}
.ve-auth-brand > * { position: relative; z-index: 1; }
.ve-auth-logo img { height: 40px; width: auto; display: block; }
.ve-auth-pitch { max-width: 24ch; }
.ve-auth-seg {
    font-family: var(--ve-mono);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ve-blue-bright);
    margin: 0 0 18px;
}
.ve-auth-seg b { color: var(--ve-amber); padding: 0 .15em; }
.ve-auth-pitch h2 {
    font-family: var(--ve-display);
    font-weight: 600;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0;
}
.ve-auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.ve-auth-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .98rem;
    color: var(--ve-muted-dk);
    line-height: 1.4;
}
.ve-auth-points .tick {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--ve-amber);
    font-family: var(--ve-mono);
}

/* --- Right: action panel --------------------------------------------------- */
.ve-auth-main {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px);
    min-width: 0;   /* let the grid column shrink instead of overflowing */
}
.ve-auth-card { width: 100%; max-width: 400px; min-width: 0; }
.ve-auth-eyebrow {
    font-family: var(--ve-mono);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ve-blue);
    margin: 0 0 14px;
}
.ve-auth-eyebrow b { color: var(--ve-amber); padding: 0 .15em; }
.ve-auth-card h1 {
    font-family: var(--ve-display);
    font-weight: 600;
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--ve-ink);
    margin: 0 0 10px;
}
.ve-auth-card .ve-auth-sub {
    font-size: 1rem;
    color: var(--ve-muted);
    line-height: 1.45;
    margin: 0 0 28px;
}

/* --- Work-email form -------------------------------------------------------- */
.ve-form { display: grid; gap: 16px; }
.ve-field { display: grid; gap: 6px; }
.ve-field label {
    font-family: var(--ve-mono);
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ve-muted);
}
.ve-field label .ve-optional {
    text-transform: none;
    letter-spacing: 0;
    color: var(--ve-muted-dk);
}
.ve-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    background: #fff;
    color: var(--ve-ink);
    border: 1px solid var(--ve-line);
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .98rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ve-field input:focus {
    outline: none;
    border-color: var(--ve-blue);
    box-shadow: 0 0 0 3px rgba(30, 79, 160, .15);
}
.ve-field .ve-hint {
    font-size: .82rem;
    color: var(--ve-muted);
    margin: 0;
}
.ve-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    margin-top: 4px;
    background: var(--ve-blue);
    color: #fff;
    border: 1px solid var(--ve-blue);
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .98rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.ve-submit:hover,
.ve-submit:focus-visible {
    background: var(--ve-blue-bright);
    border-color: var(--ve-blue-bright);
}
.ve-submit:focus-visible {
    outline: 2px solid var(--ve-blue);
    outline-offset: 2px;
}
.ve-submit:active { transform: scale(.99); }
.ve-submit[disabled] { opacity: .6; pointer-events: none; }

/* Verification-code entry (verify.html) */
.ve-field input.ve-code-input {
    font-family: var(--ve-mono);
    font-size: 1.35rem;
    letter-spacing: .45em;
    text-align: center;
}
.ve-resend-form { margin: 0; }
.ve-linklike {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--ve-blue);
    font-weight: 500;
    cursor: pointer;
}
.ve-linklike:hover { text-decoration: underline; }

/* Loading state (driven by auth-form.js) */
.ve-submit .ve-submit-spinner {
    display: none;
    width: 18px; height: 18px;
    flex: 0 0 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ve-auth-spin .65s linear infinite;
}
.ve-submit.is-loading .ve-submit-spinner { display: inline-block; }
@keyframes ve-auth-spin { to { transform: rotate(360deg); } }

/* --- Cross-link + legal ---------------------------------------------------- */
.ve-auth-switch {
    margin-top: 26px;
    font-size: .95rem;
    color: var(--ve-muted);
}
.ve-auth-switch a { color: var(--ve-blue); font-weight: 500; text-decoration: none; }
.ve-auth-switch a:hover { text-decoration: underline; }
.ve-auth-legal {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--ve-line);
    font-size: .82rem;
    line-height: 1.5;
    color: var(--ve-muted);
}
.ve-auth-legal a { color: var(--ve-blue); text-decoration: none; }
.ve-auth-legal a:hover { text-decoration: underline; }

/* --- Responsive: collapse to single column --------------------------------- */
@media (max-width: 900px) {
    .ve-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .ve-auth-brand {
        padding: 28px clamp(20px, 6vw, 40px);
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    .ve-auth-brand::after { background-size: 100% 28px; opacity: .25; }
    .ve-auth-pitch, .ve-auth-points { display: none; }   /* keep just the logo bar on mobile */
    .ve-auth-main { padding: 40px 22px 56px; align-items: flex-start; }
}
