/* Shared styles for the split-screen sign-in / sign-up pages (AuthShell). */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    min-height: calc(100vh - 5rem);
    margin-block: calc(-1 * var(--space-8));
}

/* ---------- Aside: identity card + trust points ---------- */
.auth-aside {
    padding: var(--space-section) max(1.25rem, 5vw);
    background:
        radial-gradient(48rem 32rem at 0% 0%, rgb(0 61 165 / 38%), transparent 62%),
        radial-gradient(34rem 26rem at 100% 100%, rgb(200 16 46 / 24%), transparent 60%),
        var(--color-black);
    color: var(--color-white);
}

.auth-aside-inner {
    position: sticky;
    top: 7rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.auth-card {
    position: relative;
    width: min(100%, 24rem);
    min-height: 15rem;
    overflow: hidden;
    padding: 1.625rem;
    border: 1px solid #333;
    background: linear-gradient(145deg, #1a1a1a, #030303);
    box-shadow: 0 2rem 4rem rgb(0 0 0 / 55%);
    transform: rotate(-2.5deg);
    transition: transform var(--motion-normal) ease;
}

.auth-card:hover {
    transform: rotate(0deg);
}

.auth-card::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 7%) 50%, transparent 65%);
    background-size: 250% 100%;
    animation: auth-sheen 7s ease-in-out infinite;
    content: "";
    pointer-events: none;
}

.auth-card::after {
    position: absolute;
    right: -9rem;
    bottom: -10rem;
    width: 20rem;
    height: 20rem;
    border: 1px solid #333;
    border-radius: 50%;
    content: "";
}

@keyframes auth-sheen {
    0%, 100% { background-position: 120% 0; }
    50% { background-position: -20% 0; }
}

.auth-card-top,
.auth-card-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.5625rem;
    letter-spacing: 0.18em;
}

.auth-card-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    width: 4rem;
    height: 4rem;
    margin-top: 2rem;
    place-items: center;
    border: 1px solid #555;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
}

.auth-card-name {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 2.25rem;
    letter-spacing: 0.06em;
    line-height: 1.05;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-card-meta,
.auth-card-code {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
    color: #aaa;
    font-size: 0.5625rem;
    letter-spacing: 0.18em;
}

.auth-card-code {
    margin-bottom: 1.25rem;
    color: #777;
}

.auth-points {
    display: grid;
    max-width: 26rem;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: var(--space-2);
    color: var(--color-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.auth-points b {
    color: var(--color-accent-hover);
    font-family: var(--font-display);
    font-size: 1.125rem;
    letter-spacing: 0.08em;
}

.auth-points a {
    color: var(--color-white);
}

/* ---------- Panel: headline, social buttons, form ---------- */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-section) max(1.25rem, 6vw);
    background: var(--color-surface-light);
    color: #080808;
}

.auth-panel-inner {
    width: min(100%, 34rem);
    margin-inline: auto;
}

.auth-panel .section-kicker {
    color: #666;
}

.auth-panel h1 {
    margin: 1.25rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(3.25rem, 6.5vw, 5.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.85;
    text-transform: uppercase;
}

.auth-panel h1 span {
    color: transparent;
    -webkit-text-stroke: 1px #111;
}

.auth-copy {
    margin-block: 1.5rem 1.75rem;
    color: #555;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: #555;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.auth-field input:not([type="checkbox"]) {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #b9b9b3;
    border-radius: 0;
    background: #fff;
    color: #080808;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.auth-field input::placeholder {
    color: #8a8a85;
}

.auth-field input:not([type="checkbox"]):focus {
    border-color: #080808;
    box-shadow: 0 0 0 3px rgb(8 8 8 / 12%);
    outline: none;
}

.auth-field input.invalid {
    border-color: #b3261e;
    outline: none;
}

.auth-field input.valid.modified {
    outline: none;
}

.auth-field input.auth-code {
    font-size: 1.25rem;
    letter-spacing: 0.3em;
}

.auth-field .validation-message {
    margin-top: 0.4rem;
    color: #b3261e;
    font-size: 0.8125rem;
}

.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 4.75rem;
}

.auth-reveal {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    padding: 0.4rem 0.6rem;
    border: 0;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-reveal:hover {
    color: var(--color-accent);
}

.auth-reveal[hidden] {
    display: none;
}

.auth-meter {
    display: flex;
    gap: 4px;
    margin-top: 0.6rem;
}

.auth-meter span {
    flex: 1;
    height: 4px;
    background: #d6d6d0;
    transition: background-color var(--motion-normal) ease;
}

.auth-meter[data-level="1"] span:nth-child(-n + 1),
.auth-meter[data-level="2"] span:nth-child(-n + 2) {
    background: var(--color-accent);
}

.auth-meter[data-level="3"] span:nth-child(-n + 3),
.auth-meter[data-level="4"] span:nth-child(-n + 4) {
    background: #c98a00;
}

.auth-meter[data-level="5"] span {
    background: #1a7f4b;
}

.auth-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-rules li {
    color: #666;
    font-size: 0.75rem;
}

.auth-rules li::before {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-right: 0.4rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    content: "";
    vertical-align: -0.05em;
}

.auth-rules li[data-met="true"] {
    color: #1a7f4b;
}

.auth-rules li[data-met="true"]::before {
    border: 0;
    border-radius: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='square'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='square'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-errors {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid #b3261e;
    background: #fbeaea;
    color: #7a1913;
    font-size: 0.875rem;
    list-style: none;
}

.auth-errors li {
    color: inherit;
}

/* "Remember me" + "Forgot password?" row on the login form */
.auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #333;
    cursor: pointer;
    font-size: 0.875rem;
}

.auth-check input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: #080808;
    color-scheme: light;
    cursor: pointer;
}

.auth-row a {
    color: #080808;
    font-size: 0.8125rem;
    text-underline-offset: 3px;
}

.auth-row a:hover {
    color: var(--color-accent);
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    min-height: 3.5rem;
}

.auth-note {
    margin: 1rem 0 0;
    color: #666;
    font-size: 0.75rem;
    line-height: 1.6;
}

.auth-note a,
.auth-switch a {
    color: #080808;
    text-underline-offset: 3px;
}

.auth-note a:hover,
.auth-switch a:hover {
    color: var(--color-accent);
}

.auth-switch {
    margin-block: 1.5rem 0;
    color: #444;
    font-size: 0.875rem;
}

.auth-switch a {
    font-weight: 700;
}

.auth-switch--quiet {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

@media (max-width: 53.125rem) {
    .auth {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-panel {
        order: 1;
    }

    .auth-aside {
        order: 2;
        padding-block: var(--space-16);
    }

    .auth-aside-inner {
        position: static;
        gap: var(--space-8);
    }
}

@media (max-width: 35rem) {
    .auth-card {
        min-height: 13rem;
    }

    .auth-card-name {
        font-size: 1.75rem;
    }
}
