/* ------------------------------------------------------------------
   OLIBiz Auth pages — design language based on the Minfo template
   (Poppins, green + gold brand accents, solid card with a gradient
   accent bar, section chip, leading input icons, dot-grid form side,
   emerald promo carousel with concentric rings)

   Distinct from OLIHome: promo carousel sits on the LEFT, the form
   side is a clean dotted surface with a solid card (not glass), and
   gold is introduced as a secondary accent from the OLIBiz wordmark.
------------------------------------------------------------------ */

:root {
    --auth-page-bg: #eef2ee;         /* neutral fallback behind panels */

    --auth-form-bg: #f6f8f5;         /* form side surface */
    --auth-card: #ffffff;
    --auth-card-border: rgba(18, 38, 26, 0.08);
    --auth-card-shadow: rgba(18, 38, 26, 0.10);

    --auth-border: rgba(18, 38, 26, 0.12);
    --auth-input-bg: #ffffff;
    --auth-input-focus-bg: #ffffff;

    --auth-dot: rgba(50, 137, 59, 0.10);           /* dot-grid dots */
    --auth-glow-green: rgba(50, 137, 59, 0.12);    /* corner glow */
    --auth-glow-gold: rgba(184, 137, 47, 0.10);

    --auth-heading: #12261a;
    --auth-text: #55635a;
    --auth-muted: #9aa69d;

    --auth-theme: #32893b;           /* brand green */
    --auth-theme-hover: #1f5e29;     /* brand dark green */
    --auth-theme-light: #84bb4e;     /* brand light green */
    --auth-theme-glow: rgba(50, 137, 59, 0.30);

    --auth-gold: #b8892f;            /* brand gold (from "Biz" wordmark) */
    --auth-gold-light: #d4a94a;
    --auth-gold-soft: rgba(184, 137, 47, 0.10);
    --auth-gold-border: rgba(184, 137, 47, 0.35);

    --auth-link: #32893b;
    --auth-link-hover: #1f5e29;

    --auth-danger: #d13c4b;
    --auth-danger-bg: rgba(209, 60, 75, 0.08);
    --auth-danger-border: rgba(209, 60, 75, 0.25);

    --auth-success: #1f5e29;
    --auth-success-bg: rgba(50, 137, 59, 0.08);
    --auth-success-border: rgba(50, 137, 59, 0.25);
    --auth-autofill-text: #12261a;
}

html.dark {
    --auth-form-bg: #0b1710;
    --auth-card: #10231a;
    --auth-card-border: rgba(255, 255, 255, 0.10);
    --auth-card-shadow: rgba(0, 0, 0, 0.5);

    --auth-border: rgba(255, 255, 255, 0.14);
    --auth-input-bg: rgba(255, 255, 255, 0.03);
    --auth-input-focus-bg: rgba(255, 255, 255, 0.05);

    --auth-dot: rgba(255, 255, 255, 0.06);
    --auth-glow-green: rgba(50, 137, 59, 0.22);
    --auth-glow-gold: rgba(212, 169, 74, 0.14);

    --auth-heading: #ffffff;
    --auth-text: #cddbc7;
    --auth-muted: rgba(245, 247, 250, 0.5);

    --auth-link: #9ed373;
    --auth-link-hover: #c2e6a0;

    --auth-danger: #ff8a93;
    --auth-danger-bg: rgba(255, 90, 105, 0.12);
    --auth-danger-border: rgba(255, 90, 105, 0.3);

    --auth-success: #9ed373;
    --auth-success-bg: rgba(158, 211, 115, 0.12);
    --auth-success-border: rgba(158, 211, 115, 0.3);
    --auth-autofill-text: #ffffff;
}

body.auth-body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--auth-page-bg);
    color: var(--auth-text);
}

/* --- Page: emerald promo carousel on the left, form on the right --- */
.auth-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    box-sizing: border-box;
}

/* ==================================================================
   FORM SIDE (right) — clean dotted surface + solid card
================================================================== */
.auth-form-side {
    position: relative;
    flex: 1 1 54%;
    display: flex;
    padding: 2.5rem 1.5rem;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--auth-form-bg);
    background-image:
        radial-gradient(ellipse 55% 45% at 100% 0%, var(--auth-glow-green), transparent 60%),
        radial-gradient(ellipse 50% 45% at 0% 100%, var(--auth-glow-gold), transparent 60%),
        radial-gradient(var(--auth-dot) 1.1px, transparent 1.3px);
    background-size: auto, auto, 22px 22px;
    background-position: center, center, center;
}

/* Form sits directly on the panel — no card box. Auto margins center it
   vertically when it fits and let it scroll (not clip) when it is taller
   than the viewport, e.g. the accreditation form. */
.auth-form-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: auto;
    animation: auth-form-rise .7s cubic-bezier(.16, 1, .3, 1);
}

@keyframes auth-form-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Header: logo --- */
.auth-card-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.auth-logo {
    width: 138px;
    height: auto;
}

html.dark .auth-logo {
    filter: brightness(0) invert(1);
}

.auth-card-head {
    margin-bottom: 1.75rem;
}

.auth-title {
    position: relative;
    margin: 0 0 1rem;
    padding-bottom: .85rem;
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--auth-heading);
}

/* Short green -> gold accent under the heading (brand marker) */
.auth-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.75rem;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--auth-theme), var(--auth-gold));
}

.auth-title span {
    color: var(--auth-gold);
}

.auth-subtitle {
    margin: 0;
    font-size: .85rem;
    line-height: 1.7;
    color: var(--auth-text);
}

/* --- Form controls: bordered inputs with a leading icon --- */
.auth-field {
    position: relative;
    margin-bottom: 1.1rem;
}

/* Two fields side by side (e.g. First / Last name) */
.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

.auth-field-row .auth-field {
    margin-bottom: 0;
}

.auth-field-icon {
    position: absolute;
    left: 1.1rem;
    top: 1.7rem;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: .9rem;
    pointer-events: none;
    transition: color .2s ease;
}

.auth-input {
    width: 100%;
    height: 3.4rem;
    padding: 0 1rem 0 2.9rem;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 400;
    color: var(--auth-heading);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: .8rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.auth-input:focus {
    border-color: var(--auth-theme);
    background: var(--auth-input-focus-bg);
    box-shadow: 0 0 0 3px var(--auth-theme-glow);
}

.auth-field:focus-within .auth-field-icon {
    color: var(--auth-theme);
}

.auth-input::placeholder {
    color: var(--auth-muted);
}

input.auth-input:-webkit-autofill,
input.auth-input:-webkit-autofill:hover,
input.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-autofill-text);
    -webkit-box-shadow: 0 0 0px 1000px var(--auth-input-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-input-group .auth-input {
    padding-right: 3rem;
}

.auth-eye {
    position: absolute;
    right: 1rem;
    top: 1.7rem;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0;
    color: var(--auth-muted);
    font-size: .9rem;
    cursor: pointer;
    transition: color .2s ease;
}

.auth-eye:hover {
    color: var(--auth-theme);
}

.auth-row-end {
    display: flex;
    justify-content: flex-end;
    margin: .25rem 0 1.5rem;
}

.auth-link {
    color: var(--auth-link);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .3s;
}

.auth-link:hover {
    color: var(--auth-link-hover);
    text-decoration: underline;
    text-decoration-color: var(--auth-gold);
    text-underline-offset: 3px;
}

/* --- Button: green gradient, soft-square, glow on hover --- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    padding: 1.05rem 2rem;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(120deg, var(--auth-theme) 0%, var(--auth-theme-hover) 100%);
    border: none;
    border-radius: .85rem;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 10px 24px -10px var(--auth-theme-glow);
    transition: transform .2s ease, box-shadow .3s ease, filter .3s ease;
}

.auth-btn:hover {
    color: #fff;
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px -12px var(--auth-theme-glow);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled,
.auth-btn.is-loading {
    cursor: not-allowed;
    opacity: .75;
    transform: none;
    box-shadow: 0 10px 24px -10px var(--auth-theme-glow);
}

/* --- Footnote --- */
.auth-footnote {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: .72rem;
    color: var(--auth-muted);
}

/* --- Secondary / ghost button (Accreditation) --- */
.auth-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    padding: .95rem 2rem;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-theme);
    background: transparent;
    border: 1.5px solid var(--auth-border);
    border-radius: .85rem;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.auth-btn-ghost:hover {
    color: var(--auth-theme-hover);
    border-color: var(--auth-theme);
    background: rgba(50, 137, 59, 0.06);
}

html.dark .auth-btn-ghost:hover {
    background: rgba(132, 187, 78, 0.10);
}

/* --- "or" divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--auth-muted);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* --- Section label --- */
.auth-section-label {
    display: block;
    margin: 0 0 .85rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

/* --- Account-type selector (Supplier / Subcon) --- */
.auth-typeselect {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.auth-type {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem .9rem;
    border: 1.5px solid var(--auth-border);
    border-radius: .9rem;
    background: var(--auth-input-bg);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.auth-type input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-type-icon {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    flex: none;
    border-radius: .65rem;
    background: rgba(50, 137, 59, 0.08);
    color: var(--auth-theme);
    font-size: 1rem;
    transition: background .2s ease, color .2s ease;
}

.auth-type-label {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.auth-type-label b {
    font-size: .86rem;
    font-weight: 600;
    color: var(--auth-heading);
}

.auth-type-label small {
    font-size: .66rem;
    color: var(--auth-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-type:hover {
    border-color: var(--auth-theme-light);
}

.auth-type.is-active {
    border-color: var(--auth-theme);
    background: rgba(50, 137, 59, 0.06);
    box-shadow: 0 0 0 3px var(--auth-theme-glow);
}

.auth-type.is-active .auth-type-icon {
    background: var(--auth-theme);
    color: #fff;
}

.auth-type-check {
    position: absolute;
    top: .5rem;
    right: .55rem;
    font-size: .8rem;
    color: var(--auth-theme);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s ease, transform .2s ease;
}

.auth-type.is-active .auth-type-check {
    opacity: 1;
    transform: scale(1);
}

/* --- View toggle (login <-> accreditation) --- */
.auth-form-wrap[hidden] { display: none; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.25rem;
    width: 100%;
    justify-content: center;
    font-family: inherit;
    font-size: .8rem;
    font-weight: 500;
    color: var(--auth-link);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color .2s ease;
}

.auth-back:hover {
    color: var(--auth-link-hover);
}

.auth-resend-form {
    margin-top: 1.5rem;
}

.auth-link-row {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1rem;
}

.auth-hint {
    display: block;
    margin: -0.75rem 0 1.1rem;
    font-size: .78rem;
    color: var(--auth-muted);
}

/* --- Validation --- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1.25rem;
    padding: .75rem 1rem;
    font-size: .8rem;
    line-height: 1.6;
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    border: 1px solid var(--auth-danger-border);
    border-radius: .6rem;
}

.auth-alert i {
    margin-top: .2rem;
}

.auth-alert-success {
    color: var(--auth-success);
    background: var(--auth-success-bg);
    border-color: var(--auth-success-border);
}

.auth-field-error {
    display: block;
    margin-top: .35rem;
    font-size: .75rem;
    color: var(--auth-danger);
}

.auth-field-error:empty {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================================================================
   PROMO SIDE (left) — emerald carousel with concentric rings
================================================================== */
.auth-promo-side {
    position: relative;
    order: -1;                       /* move carousel to the left */
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
    color: #fff;
    overflow: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 85% 12%, rgba(212, 169, 74, 0.22), transparent 42%),
        radial-gradient(circle at 12% 92%, rgba(132, 187, 78, 0.20), transparent 45%),
        linear-gradient(150deg, #0d3a1c 0%, #1b5a2b 55%, #0f4020 100%);
}

/* Concentric ring outlines drifting behind the copy */
.auth-promo-ring {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.10);
    pointer-events: none;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.auth-promo-ring-1 {
    width: 34rem; height: 34rem;
    top: -10rem; right: -12rem;
    border-color: rgba(255, 255, 255, 0.12);
    animation-name: auth-ring-drift-1;
    animation-duration: 24s;
    animation-delay: -5s;
}

.auth-promo-ring-2 {
    width: 22rem; height: 22rem;
    top: -4rem; right: -4rem;
    border-color: rgba(212, 169, 74, 0.28);   /* gold ring accent */
    animation-name: auth-ring-drift-2;
    animation-duration: 19s;
    animation-delay: -9s;
}

.auth-promo-ring-3 {
    width: 16rem; height: 16rem;
    bottom: -5rem; left: -5rem;
    border-color: rgba(255, 255, 255, 0.10);
    animation-name: auth-ring-drift-3;
    animation-duration: 27s;
    animation-delay: -3s;
}

@keyframes auth-ring-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-26px, 20px) scale(1.05); }
}

@keyframes auth-ring-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(18px, 24px) scale(.95); }
}

@keyframes auth-ring-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(22px, -18px) scale(1.07); }
}

.auth-promo-logo {
    position: relative;
    z-index: 1;
    width: 150px;
    height: auto;
    margin-bottom: 3.5rem;
    filter: brightness(0) invert(1);
}

.auth-promo-slides {
    position: relative;
    z-index: 1;
    min-height: 15rem;
}

.auth-promo-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .6s ease, transform .6s ease, visibility .6s;
}

.auth-promo-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-promo-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--auth-gold-light);
}

.auth-promo-title {
    margin: 0 0 1.25rem;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-promo-text {
    margin: 0;
    max-width: 26rem;
    font-size: .95rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.auth-promo-dots {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 2.5rem;
}

.auth-promo-dot {
    width: 9px;
    height: 9px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    padding: 0;
    cursor: pointer;
    transition: width .3s, background .3s, border-radius .3s;
}

.auth-promo-dot.is-active {
    width: 2rem;
    border-radius: 5px;
    background: var(--auth-gold-light);   /* gold pill for the active slide */
}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-promo-ring { animation: none; }
}

@media (max-width: 991px) {
    .auth-promo-side { display: none; }
    .auth-form-side { flex-basis: 100%; }
}
