/* ==========================================================================
   ICON Marketing Hub — auth.css
   Page-specific styles for the authentication pages (login, join, forgot
   password, set password). Layers on top of global.css and reuses its design
   tokens only — no new colours or fonts. All classes prefixed `mh-auth-`.

   Layout: a two-column split — a branded panel (left) and the form card
   (right). Collapses to a single stacked column on small screens.
   ========================================================================== */

/* Mobile-first: the form occupies the whole screen; the brand panel is added beside it
   once there is width for two columns. */
.mh-auth {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--bg);
}

/* ---- Branded panel ------------------------------------------------------- */
.mh-auth-brand {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.75rem;
    color: #fff;
    overflow: hidden;
    background: var(--brand-primary);
}
/* Unsplash marketing/analytics photo, darkened so the white text stays legible */
.mh-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(150deg, rgba(0, 1, 1, 0.82) 0%, rgba(4, 83, 205, 0.55) 100%),
        url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.mh-auth-brand > * { position: relative; z-index: 1; }

/* .mh-auth-logo base lives in global.css — the brand panel just runs it larger */
.mh-auth-brand .mh-auth-logo .mh-brand-mark { height: 32px; }

.mh-auth-pitch { max-width: 30rem; }
.mh-auth-pitch h2 {
    color: #fff;
    font-size: 1.9rem;
    line-height: 1.18;
    margin-bottom: 0.9rem;
}
.mh-auth-pitch p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    margin: 0;
}
.mh-auth-brand-foot { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

/* ---- Form panel ---------------------------------------------------------- */
.mh-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}
.mh-auth-card {
    width: 100%;
    max-width: 400px;
}
.mh-auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}
.mh-auth-lead {
    color: var(--gray-500);
    margin-bottom: 1.75rem;
}

/* Inline field icon / password reveal row */
.mh-auth-field-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.4rem;
    font-size: 0.82rem;
}

/* Secondary links under the form */
.mh-auth-alt {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Stands in for the hidden brand panel, so the page is still identifiable on a phone. */
.mh-auth-mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-primary);
    text-decoration: none;
}

/* Password strength meter lives inside the form; keep it tidy */
.mh-auth-card .password-meter,
.mh-auth-card #password-strength { margin-bottom: 1rem; }

/* ---- Responsive ----------------------------------------------------------
   Mobile-first: the rules above are the phone layout. */
@media (min-width: 861px) {
    .mh-auth { grid-template-columns: 1.05fr 1fr; }
    .mh-auth-brand { display: flex; }
    /* The full panel is back, so the stand-in mark would be a duplicate. */
    .mh-auth-mobile-logo { display: none; }
}
