/* Sign-in and sign-up.
   A split screen: the brand holds the left, the form holds the right. The form
   side is plain white on purpose - it is the part people have to read and type
   into, so the decoration stays on the other side of the fold. */

.jd-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--jd-ivory);
}

/* ---------- brand side ---------- */

.jd-auth-brand {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFF6E6;
    background:
        radial-gradient(1100px 520px at 12% -10%, rgba(201, 162, 39, .30), transparent 60%),
        linear-gradient(155deg, var(--jd-maroon) 0%, var(--jd-maroon-deep) 55%, #4A1024 100%);
}

/* The ornament tile, kept faint so the headline stays the loudest thing here. */
.jd-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/images/pattern-ornament.svg');
    background-size: 190px;
    opacity: .30;
    pointer-events: none;
}

/* A gold hairline where the two halves meet. */
.jd-auth-brand::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--jd-gold) 22%, var(--jd-gold) 78%, transparent);
}

.jd-auth-brand > * {
    position: relative;
    z-index: 1;
}

.jd-auth-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    letter-spacing: .01em;
    color: #FFF6E6;
    text-decoration: none;
}

.jd-auth-logo img { height: 46px; width: 46px; }

.jd-auth-headline {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.1vw, 3rem);
    line-height: 1.14;
    margin: 2.5rem 0 1rem;
    max-width: 15ch;
}

.jd-auth-headline em {
    font-style: normal;
    color: var(--jd-gold-soft);
}

.jd-auth-sub {
    font-size: 1.03rem;
    line-height: 1.6;
    color: rgba(255, 246, 230, .82);
    max-width: 44ch;
    margin-bottom: 2.25rem;
}

.jd-auth-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .95rem;
}

.jd-auth-points li {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    font-size: .97rem;
    color: rgba(255, 246, 230, .92);
}

.jd-auth-tick {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(201, 162, 39, .22);
    border: 1px solid rgba(245, 226, 168, .55);
    color: var(--jd-gold-soft);
    font-size: .8rem;
    line-height: 1;
}

.jd-auth-foot {
    font-size: .82rem;
    color: rgba(255, 246, 230, .6);
    margin-top: 2.5rem;
}

/* ---------- form side ---------- */

.jd-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    overflow-y: auto;
}

.jd-auth-card {
    width: 100%;
    max-width: 430px;
}

.jd-auth-card--wide { max-width: 720px; }

.jd-auth-eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .7rem;
    font-weight: 700;
    color: var(--jd-gold);
    margin-bottom: .5rem;
}

.jd-auth-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.85rem;
    color: var(--jd-maroon);
    margin-bottom: .35rem;
}

.jd-auth-lede {
    color: var(--jd-muted);
    font-size: .95rem;
    margin-bottom: 1.75rem;
}

.jd-auth-panel .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--jd-text);
    margin-bottom: .3rem;
}

/* Taller controls: these are the only fields on the page, so they can afford room. */
.jd-auth-panel .form-control,
.jd-auth-panel .form-select {
    padding: .68rem .85rem;
    border-color: #E3D9CC;
    border-radius: .55rem;
    background: #FFFDFA;
}

.jd-auth-panel .form-control:focus,
.jd-auth-panel .form-select:focus {
    border-color: var(--jd-gold);
    box-shadow: 0 0 0 .2rem rgba(201, 162, 39, .18);
    background: #fff;
}

.jd-auth-panel .form-control[readonly] {
    background: #F6F1E9;
    color: var(--jd-muted);
}

/* "optional" chip beside a label */
.jd-optional {
    font-weight: 500;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--jd-muted);
    background: #F3EDE3;
    border: 1px solid var(--jd-gold-line);
    border-radius: 999px;
    padding: .1rem .45rem;
    margin-left: .4rem;
    vertical-align: middle;
}

.jd-auth-submit {
    width: 100%;
    padding: .78rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: .55rem;
}

.jd-auth-alt {
    text-align: center;
    margin-top: 1.4rem;
    font-size: .92rem;
    color: var(--jd-muted);
}

.jd-auth-alt a {
    color: var(--jd-maroon);
    font-weight: 600;
    text-decoration: none;
}

.jd-auth-alt a:hover { text-decoration: underline; }

/* Section divider inside the sign-up form. */
.jd-auth-section {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.9rem 0 .3rem;
}

.jd-auth-section span {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--jd-maroon);
    white-space: nowrap;
}

.jd-auth-section::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--jd-gold-line);
}

/* Password visibility toggle sits inside the field. */
.jd-pw-wrap { position: relative; }

.jd-pw-toggle {
    position: absolute;
    top: 50%;
    right: .6rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--jd-muted);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    padding: .2rem .35rem;
    border-radius: .3rem;
}

.jd-pw-toggle:hover { color: var(--jd-maroon); background: #F3EDE3; }

/* File inputs read as a quieter, secondary action. */
.jd-auth-panel input[type="file"].form-control {
    padding: .45rem .6rem;
    font-size: .87rem;
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
    .jd-auth {
        grid-template-columns: 1fr;
        /* The banner takes only what it needs; the form gets the rest. Without
           this the grid stretches both rows to share the viewport, and the
           collapsed banner ends up several times taller than its contents. */
        grid-template-rows: auto 1fr;
        min-height: 100dvh;
    }

    /* The brand collapses to a banner - enough to place the product, no more. */
    .jd-auth-brand {
        padding: 1.6rem 1.5rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .jd-auth-brand::after { display: none; }

    .jd-auth-headline,
    .jd-auth-sub,
    .jd-auth-points,
    .jd-auth-foot { display: none; }

    .jd-auth-panel { padding: 2rem 1.25rem 3rem; }
}

@media (max-width: 575.98px) {
    .jd-auth-logo { font-size: 1.25rem; }
    .jd-auth-logo img { height: 38px; width: 38px; }
    .jd-auth-title { font-size: 1.55rem; }
}

/* An asp-validation-summary still renders its container when there is nothing
   wrong, which as an .alert would paint an empty red box above the form. */
.jd-auth-panel .validation-summary-valid { display: none; }
