.sign-in-page {
    margin: 0;
    background: #fff;
    color: #17191d;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.sign-in-layout {
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    min-height: 100vh;
    min-height: 100svh;
}

.sign-in-product {
    position: relative;
    display: grid;
    place-items: center;
    padding: 88px clamp(24px, 5vw, 80px) 40px;
    overflow: hidden;
    background: #f5f5f2;
}

.sign-in-product-brand {
    position: absolute;
    top: 32px;
    left: clamp(24px, 5vw, 80px);
}

.sign-in-product-stage {
    width: min(100%, 440px);
    perspective: 1050px;
}

.sign-in-battery {
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
    animation: sign-in-battery-turn 9s ease-in-out infinite;
}

@keyframes sign-in-battery-turn {
    0%, 100% { transform: rotateY(-15deg) rotateZ(-2deg); }
    50% { transform: translateY(-10px) rotateY(15deg) rotateZ(1deg); }
}

.sign-in-main {
    display: grid;
    place-items: center;
    padding: clamp(24px, 6vw, 88px);
}

.sign-in-form {
    width: min(100%, 390px);
}

.sign-in-mobile-brand {
    display: none;
    margin-bottom: 28px;
}

.sign-in-submit,
.sign-in-form button.bg-indigo-600 {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #17191d;
    color: #fff;
    font-weight: 600;
}

.sign-in-submit:hover,
.sign-in-form button.bg-indigo-600:hover {
    background: #34373b;
}

.sign-in-form :is(input, button, a):focus-visible {
    outline: 2px solid #555c65;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .sign-in-layout { grid-template-columns: minmax(0, 1fr); }
    .sign-in-product { display: none; }
    .sign-in-mobile-brand { display: block; }
    .sign-in-main {
        align-items: start;
        padding: clamp(24px, 7vw, 44px) 24px;
    }
    .sign-in-form input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .sign-in-battery { animation: none; }
}
/* Interactive battery preview */
.sign-in-product {
    grid-template-rows: 1fr;
    background: #f2f3ef;
}

.battery-panel {
    width: min(100%, 420px);
    text-align: center;
}

.battery-stage {
    container-type: inline-size;
    position: relative;
    display: grid;
    place-items: center;
    min-height: 310px;
    perspective: 850px;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.battery-stage.is-dragging { cursor: grabbing; }

.battery-stage:focus-visible {
    outline: 2px solid #4b682e;
    outline-offset: 3px;
    border-radius: 14px;
}

.battery-model {
    --w: min(230px, 64cqw);
    --h: calc(var(--w) * .56);
    --d: calc(var(--w) * .58);
    position: relative;
    width: var(--w);
    height: var(--h);
    transform-style: preserve-3d;
    transform: rotateX(-17deg) rotateY(var(--battery-angle, -28deg));
}

.battery-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    backface-visibility: hidden;
    border: 1px solid #252721;
    background: #262824;
    box-shadow: inset 0 8px #3b3d36, inset 0 -5px #1a1c18;
}

.battery-front { transform: translateZ(calc(var(--d) / 2)); }
.battery-back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }

.battery-left,
.battery-right {
    left: calc((var(--w) - var(--d)) / 2);
    width: var(--d);
    background: repeating-linear-gradient(90deg, #242621 0 9px, #373a32 9px 12px);
}

.battery-left { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.battery-right { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); }

.battery-top,
.battery-bottom {
    top: calc((var(--h) - var(--d)) / 2);
    height: var(--d);
}

.battery-top {
    transform: rotateX(90deg) translateZ(calc(var(--h) / 2));
    transform-style: preserve-3d;
    background: linear-gradient(90deg, #252721 49%, #43463d 50%, #2d3029 51%);
}

.battery-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); }

.battery-terminal {
    position: absolute;
    top: 17%;
    width: 10%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid #161713;
    transform: translateZ(6px);
    box-shadow: 0 0 0 3px #242622;
}

.battery-terminal-black { left: 10%; background: #62655d; }
.battery-terminal-red { right: 10%; background: #e14c31; }

.battery-label {
    display: grid;
    justify-items: start;
    width: 58%;
    padding: 9px 12px;
    border-radius: 5px;
    background: linear-gradient(155deg, #9ad847, #55972c);
    color: #172014;
    line-height: 1.1;
}

.battery-label strong { font-size: clamp(12px, 5cqw, 21px); }
.battery-label span { margin-top: 5px; font-size: 11px; font-weight: 800; }

.battery-help { margin: 0; color: #4d554a; font-size: .8rem; }
.battery-reveal { display: none; }

@media (max-width: 767px) {
    .sign-in-product {
        display: grid;
        grid-row: 2;
        padding: 8px 24px 24px;
        background: #fff;
    }

    .sign-in-product-brand { display: none; }
    .sign-in-layout { grid-template-rows: auto 1fr; }
    .battery-preview { display: none; }

    .battery-reveal {
        display: inline-block;
        min-height: 44px;
        padding: 8px 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background: #fff;
        color: #24272b;
        font-size: .875rem;
    }

    .battery-panel.is-open .battery-preview {
        display: block;
        margin-top: 12px;
    }

    .battery-stage { min-height: 245px; }
}

/* FBM product panel */
.sign-in-product {
    background: radial-gradient(ellipse at 50% 46%, #1d3454 0%, #111f35 52%, #0a1323 100%);
}

.sign-in-fbm-brand {
    display: block;
    width: 164px;
    height: auto;
}

.battery-stage {
    min-height: 360px;
}

.battery-model {
    --w: min(230px, 62cqw);
    --h: calc(var(--w) * .99);
    --d: calc(var(--w) * .58);
}

.battery-front {
    border: 0;
    background: #131719;
    box-shadow: none;
}

.battery-fbm-photo {
    position: absolute;
    left: -0.5%;
    top: -8.4%;
    width: 101%;
    height: 108.4%;
    background: url("../images/fbm-eco.jpeg") no-repeat;
    background-size: 172.7% 211.2%;
    background-position: 50.5% 83.1%;
    /* Keep the terminals and casing. Crop out the wall and floor. */
    clip-path: polygon(
        0% 8%, 16.5% 7.4%, 16.5% 0%, 23.5% 0%, 24% 7.4%,
        76.5% 7.8%, 77% 0.5%, 83% 0.5%, 84% 7.8%, 99% 8%,
        99% 15%, 100% 15.5%, 100% 22%, 98.5% 23%,
        96% 99%, 4% 100%, 2% 23%, 0% 22%
    );
}

.battery-terminal-black {
    left: auto;
    right: 10%;
}

.battery-terminal-red {
    right: auto;
    left: 10%;
}

.battery-help {
    color: #b9c8dd;
}

@media (max-width: 767px) {
    .sign-in-product {
        background: #fff;
    }

    .battery-panel.is-open .battery-preview {
        padding: 10px 12px 16px;
        border-radius: 16px;
        background: radial-gradient(ellipse at 50% 45%, #1d3454, #0a1323);
    }

    .battery-stage {
        min-height: 290px;
    }

    .battery-model {
        --w: min(180px, 56cqw);
    }
}